@alfatech/livechat 2025.5.1-7.2 → 2025.5.1-7.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.
Files changed (2) hide show
  1. package/dist/main.js +20 -20
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -1,4 +1,4 @@
1
- var Km=e=>{throw TypeError(e)};var BT=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Cc=(e,t,n)=>t.has(e)||Km("Cannot "+n);var T=(e,t,n)=>(Cc(e,t,"read from private field"),n?n.call(e):t.get(e)),U=(e,t,n)=>t.has(e)?Km("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 za=(e,t,n,r)=>({set _(i){D(e,t,i,n)},get _(){return T(e,t,r)}});var DI=BT((Mt,Dt)=>{function zT(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 Ks(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qv={exports:{}},_u={},Gv={exports:{}},Z={};/**
1
+ var Km=e=>{throw TypeError(e)};var BT=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var kc=(e,t,n)=>t.has(e)||Km("Cannot "+n);var T=(e,t,n)=>(kc(e,t,"read from private field"),n?n.call(e):t.get(e)),U=(e,t,n)=>t.has(e)?Km("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),D=(e,t,n,r)=>(kc(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),X=(e,t,n)=>(kc(e,t,"access private method"),n);var Ua=(e,t,n,r)=>({set _(i){D(e,t,i,n)},get _(){return T(e,t,r)}});var DI=BT((Mt,Dt)=>{function zT(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 qs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qv={exports:{}},Pu={},Gv={exports:{}},Z={};/**
2
2
  * @license React
3
3
  * react.production.min.js
4
4
  *
@@ -6,7 +6,7 @@ var Km=e=>{throw TypeError(e)};var BT=(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 wa=Symbol.for("react.element"),UT=Symbol.for("react.portal"),HT=Symbol.for("react.fragment"),WT=Symbol.for("react.strict_mode"),KT=Symbol.for("react.profiler"),qT=Symbol.for("react.provider"),GT=Symbol.for("react.context"),QT=Symbol.for("react.forward_ref"),YT=Symbol.for("react.suspense"),XT=Symbol.for("react.memo"),ZT=Symbol.for("react.lazy"),qm=Symbol.iterator;function JT(e){return e===null||typeof e!="object"?null:(e=qm&&e[qm]||e["@@iterator"],typeof e=="function"?e:null)}var Qv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Yv=Object.assign,Xv={};function qs(e,t,n){this.props=e,this.context=t,this.refs=Xv,this.updater=n||Qv}qs.prototype.isReactComponent={};qs.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")};qs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Zv(){}Zv.prototype=qs.prototype;function _h(e,t,n){this.props=e,this.context=t,this.refs=Xv,this.updater=n||Qv}var Ph=_h.prototype=new Zv;Ph.constructor=_h;Yv(Ph,qs.prototype);Ph.isPureReactComponent=!0;var Gm=Array.isArray,Jv=Object.prototype.hasOwnProperty,Ah={current:null},e1={key:!0,ref:!0,__self:!0,__source:!0};function t1(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)Jv.call(t,r)&&!e1.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:wa,type:e,key:s,ref:o,props:i,_owner:Ah.current}}function eE(e,t){return{$$typeof:wa,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===wa}function tE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Qm=/\/+/g;function kc(e,t){return typeof e=="object"&&e!==null&&e.key!=null?tE(""+e.key):t.toString(36)}function vl(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 wa:case UT:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+kc(o,0):r,Gm(i)?(n="",e!=null&&(n=e.replace(Qm,"$&/")+"/"),vl(i,t,n,"",function(u){return u})):i!=null&&(Rh(i)&&(i=eE(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Qm,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",Gm(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+kc(s,a);o+=vl(s,t,n,l,i)}else if(l=JT(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+kc(s,a++),o+=vl(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 Ua(e,t,n){if(e==null)return e;var r=[],i=0;return vl(e,r,"","",function(s){return t.call(n,s,i++)}),r}function nE(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},xl={transition:null},rE={ReactCurrentDispatcher:dt,ReactCurrentBatchConfig:xl,ReactCurrentOwner:Ah};function n1(){throw Error("act(...) is not supported in production builds of React.")}Z.Children={map:Ua,forEach:function(e,t,n){Ua(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ua(e,function(){t++}),t},toArray:function(e){return Ua(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=qs;Z.Fragment=HT;Z.Profiler=KT;Z.PureComponent=_h;Z.StrictMode=WT;Z.Suspense=YT;Z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rE;Z.act=n1;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=Yv({},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)Jv.call(t,l)&&!e1.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:wa,type:e.type,key:i,ref:s,props:r,_owner:o}};Z.createContext=function(e){return e={$$typeof:GT,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:qT,_context:e},e.Consumer=e};Z.createElement=t1;Z.createFactory=function(e){var t=t1.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=Rh;Z.lazy=function(e){return{$$typeof:ZT,_payload:{_status:-1,_result:e},_init:nE}};Z.memo=function(e,t){return{$$typeof:XT,type:e,compare:t===void 0?null:t}};Z.startTransition=function(e){var t=xl.transition;xl.transition={};try{e()}finally{xl.transition=t}};Z.unstable_act=n1;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";Gv.exports=Z;var y=Gv.exports;const R=Ks(y),Rf=zT({__proto__:null,default:R},[y]);/**
9
+ */var ba=Symbol.for("react.element"),UT=Symbol.for("react.portal"),HT=Symbol.for("react.fragment"),WT=Symbol.for("react.strict_mode"),KT=Symbol.for("react.profiler"),qT=Symbol.for("react.provider"),GT=Symbol.for("react.context"),QT=Symbol.for("react.forward_ref"),YT=Symbol.for("react.suspense"),XT=Symbol.for("react.memo"),ZT=Symbol.for("react.lazy"),qm=Symbol.iterator;function JT(e){return e===null||typeof e!="object"?null:(e=qm&&e[qm]||e["@@iterator"],typeof e=="function"?e:null)}var Qv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Yv=Object.assign,Xv={};function Gs(e,t,n){this.props=e,this.context=t,this.refs=Xv,this.updater=n||Qv}Gs.prototype.isReactComponent={};Gs.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")};Gs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Zv(){}Zv.prototype=Gs.prototype;function _h(e,t,n){this.props=e,this.context=t,this.refs=Xv,this.updater=n||Qv}var Ph=_h.prototype=new Zv;Ph.constructor=_h;Yv(Ph,Gs.prototype);Ph.isPureReactComponent=!0;var Gm=Array.isArray,Jv=Object.prototype.hasOwnProperty,Ah={current:null},e1={key:!0,ref:!0,__self:!0,__source:!0};function t1(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)Jv.call(t,r)&&!e1.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:ba,type:e,key:s,ref:o,props:i,_owner:Ah.current}}function eE(e,t){return{$$typeof:ba,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===ba}function tE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Qm=/\/+/g;function _c(e,t){return typeof e=="object"&&e!==null&&e.key!=null?tE(""+e.key):t.toString(36)}function xl(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 ba:case UT:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+_c(o,0):r,Gm(i)?(n="",e!=null&&(n=e.replace(Qm,"$&/")+"/"),xl(i,t,n,"",function(u){return u})):i!=null&&(Rh(i)&&(i=eE(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Qm,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",Gm(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+_c(s,a);o+=xl(s,t,n,l,i)}else if(l=JT(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+_c(s,a++),o+=xl(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 Ha(e,t,n){if(e==null)return e;var r=[],i=0;return xl(e,r,"","",function(s){return t.call(n,s,i++)}),r}function nE(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},wl={transition:null},rE={ReactCurrentDispatcher:dt,ReactCurrentBatchConfig:wl,ReactCurrentOwner:Ah};function n1(){throw Error("act(...) is not supported in production builds of React.")}Z.Children={map:Ha,forEach:function(e,t,n){Ha(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ha(e,function(){t++}),t},toArray:function(e){return Ha(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=Gs;Z.Fragment=HT;Z.Profiler=KT;Z.PureComponent=_h;Z.StrictMode=WT;Z.Suspense=YT;Z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rE;Z.act=n1;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=Yv({},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)Jv.call(t,l)&&!e1.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:ba,type:e.type,key:i,ref:s,props:r,_owner:o}};Z.createContext=function(e){return e={$$typeof:GT,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:qT,_context:e},e.Consumer=e};Z.createElement=t1;Z.createFactory=function(e){var t=t1.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=Rh;Z.lazy=function(e){return{$$typeof:ZT,_payload:{_status:-1,_result:e},_init:nE}};Z.memo=function(e,t){return{$$typeof:XT,type:e,compare:t===void 0?null:t}};Z.startTransition=function(e){var t=wl.transition;wl.transition={};try{e()}finally{wl.transition=t}};Z.unstable_act=n1;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";Gv.exports=Z;var y=Gv.exports;const R=qs(y),Rf=zT({__proto__:null,default:R},[y]);/**
10
10
  * @license React
11
11
  * react-jsx-runtime.production.min.js
12
12
  *
@@ -14,7 +14,7 @@ var Km=e=>{throw TypeError(e)};var BT=(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 iE=y,sE=Symbol.for("react.element"),oE=Symbol.for("react.fragment"),aE=Object.prototype.hasOwnProperty,lE=iE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,uE={key:!0,ref:!0,__self:!0,__source:!0};function r1(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)aE.call(t,r)&&!uE.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:sE,type:e,key:s,ref:o,props:i,_owner:lE.current}}_u.Fragment=oE;_u.jsx=r1;_u.jsxs=r1;qv.exports=_u;var w=qv.exports,i1={exports:{}},It={},s1={exports:{}},o1={};/**
17
+ */var iE=y,sE=Symbol.for("react.element"),oE=Symbol.for("react.fragment"),aE=Object.prototype.hasOwnProperty,lE=iE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,uE={key:!0,ref:!0,__self:!0,__source:!0};function r1(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)aE.call(t,r)&&!uE.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:sE,type:e,key:s,ref:o,props:i,_owner:lE.current}}Pu.Fragment=oE;Pu.jsx=r1;Pu.jsxs=r1;qv.exports=Pu;var w=qv.exports,i1={exports:{}},It={},s1={exports:{}},o1={};/**
18
18
  * @license React
19
19
  * scheduler.production.min.js
20
20
  *
@@ -30,14 +30,14 @@ var Km=e=>{throw TypeError(e)};var BT=(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 fE=y,Lt=cE;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 a1=new Set,$o={};function Mi(e,t){Ds(e,t),Ds(e+"Capture",t)}function Ds(e,t){for($o[e]=t,e=0;e<t.length;e++)a1.add(t[e])}var Yn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Of=Object.prototype.hasOwnProperty,dE=/^[: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]*$/,Ym={},Xm={};function hE(e){return Of.call(Xm,e)?!0:Of.call(Ym,e)?!1:dE.test(e)?Xm[e]=!0:(Ym[e]=!0,!1)}function pE(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 mE(e,t,n,r){if(t===null||typeof t>"u"||pE(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 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);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(Oh,jh);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(Oh,jh);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 Nh(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")&&(mE(t,n,i,r)&&(n=null),r||i===null?hE(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=fE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ha=Symbol.for("react.element"),Xi=Symbol.for("react.portal"),Zi=Symbol.for("react.fragment"),Mh=Symbol.for("react.strict_mode"),jf=Symbol.for("react.profiler"),l1=Symbol.for("react.provider"),u1=Symbol.for("react.context"),Dh=Symbol.for("react.forward_ref"),Nf=Symbol.for("react.suspense"),Mf=Symbol.for("react.suspense_list"),Fh=Symbol.for("react.memo"),cr=Symbol.for("react.lazy"),c1=Symbol.for("react.offscreen"),Zm=Symbol.iterator;function ro(e){return e===null||typeof e!="object"?null:(e=Zm&&e[Zm]||e["@@iterator"],typeof e=="function"?e:null)}var Te=Object.assign,_c;function mo(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(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(`
33
+ */var fE=y,Lt=cE;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 a1=new Set,Vo={};function Mi(e,t){Fs(e,t),Fs(e+"Capture",t)}function Fs(e,t){for(Vo[e]=t,e=0;e<t.length;e++)a1.add(t[e])}var Xn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Of=Object.prototype.hasOwnProperty,dE=/^[: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]*$/,Ym={},Xm={};function hE(e){return Of.call(Xm,e)?!0:Of.call(Ym,e)?!1:dE.test(e)?Xm[e]=!0:(Ym[e]=!0,!1)}function pE(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 mE(e,t,n,r){if(t===null||typeof t>"u"||pE(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 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);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(Oh,jh);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(Oh,jh);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 Nh(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")&&(mE(t,n,i,r)&&(n=null),r||i===null?hE(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=fE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Wa=Symbol.for("react.element"),Xi=Symbol.for("react.portal"),Zi=Symbol.for("react.fragment"),Mh=Symbol.for("react.strict_mode"),jf=Symbol.for("react.profiler"),l1=Symbol.for("react.provider"),u1=Symbol.for("react.context"),Dh=Symbol.for("react.forward_ref"),Nf=Symbol.for("react.suspense"),Mf=Symbol.for("react.suspense_list"),Fh=Symbol.for("react.memo"),fr=Symbol.for("react.lazy"),c1=Symbol.for("react.offscreen"),Zm=Symbol.iterator;function io(e){return e===null||typeof e!="object"?null:(e=Zm&&e[Zm]||e["@@iterator"],typeof e=="function"?e:null)}var Te=Object.assign,Pc;function go(e){if(Pc===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Pc=t&&t[1]||""}return`
34
+ `+Pc+e}var Ac=!1;function Rc(e,t){if(!e||Ac)return"";Ac=!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:"")?mo(e):""}function gE(e){switch(e.tag){case 5:return mo(e.type);case 16:return mo("Lazy");case 13:return mo("Suspense");case 19:return mo("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 Df(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 Zi:return"Fragment";case Xi:return"Portal";case jf:return"Profiler";case Mh:return"StrictMode";case Nf:return"Suspense";case Mf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case u1:return(e.displayName||"Context")+".Consumer";case l1: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:Df(e.type)||"Memo";case cr:t=e._payload,e=e._init;try{return Df(e(t))}catch{}}return null}function yE(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 Df(t);case 8:return t===Mh?"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 f1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function vE(e){var t=f1(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 Wa(e){e._valueTracker||(e._valueTracker=vE(e))}function d1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=f1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function zl(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 Ff(e,t){var n=t.checked;return Te({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Jm(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 h1(e,t){t=t.checked,t!=null&&Nh(e,"checked",t,!1)}function Lf(e,t){h1(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")?If(e,t.type,n):t.hasOwnProperty("defaultValue")&&If(e,t.type,Vr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function eg(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 If(e,t,n){(t!=="number"||zl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var go=Array.isArray;function ms(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 $f(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(A(91));return Te({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function tg(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(go(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 p1(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 ng(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function m1(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 Vf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?m1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ka,g1=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(Ka=Ka||document.createElement("div"),Ka.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ka.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Vo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var To={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},xE=["Webkit","ms","Moz","O"];Object.keys(To).forEach(function(e){xE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),To[t]=To[e]})});function y1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||To.hasOwnProperty(e)&&To[e]?(""+t).trim():t+"px"}function v1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=y1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var wE=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 Bf(e,t){if(t){if(wE[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 zf(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 Uf=null;function Lh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Hf=null,gs=null,ys=null;function rg(e){if(e=Ta(e)){if(typeof Hf!="function")throw Error(A(280));var t=e.stateNode;t&&(t=ju(t),Hf(e.stateNode,e.type,t))}}function x1(e){gs?ys?ys.push(e):ys=[e]:gs=e}function w1(){if(gs){var e=gs,t=ys;if(ys=gs=null,rg(e),t)for(e=0;e<t.length;e++)rg(t[e])}}function b1(e,t){return e(t)}function S1(){}var Rc=!1;function T1(e,t,n){if(Rc)return e(t,n);Rc=!0;try{return b1(e,t,n)}finally{Rc=!1,(gs!==null||ys!==null)&&(S1(),w1())}}function Bo(e,t){var n=e.stateNode;if(n===null)return null;var r=ju(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 Wf=!1;if(Yn)try{var io={};Object.defineProperty(io,"passive",{get:function(){Wf=!0}}),window.addEventListener("test",io,io),window.removeEventListener("test",io,io)}catch{Wf=!1}function bE(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 Eo=!1,Ul=null,Hl=!1,Kf=null,SE={onError:function(e){Eo=!0,Ul=e}};function TE(e,t,n,r,i,s,o,a,l){Eo=!1,Ul=null,bE.apply(SE,arguments)}function EE(e,t,n,r,i,s,o,a,l){if(TE.apply(this,arguments),Eo){if(Eo){var u=Ul;Eo=!1,Ul=null}else throw Error(A(198));Hl||(Hl=!0,Kf=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 E1(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 ig(e){if(Di(e)!==e)throw Error(A(188))}function CE(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 ig(i),e;if(s===r)return ig(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 C1(e){return e=CE(e),e!==null?k1(e):null}function k1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=k1(e);if(t!==null)return t;e=e.sibling}return null}var _1=Lt.unstable_scheduleCallback,sg=Lt.unstable_cancelCallback,kE=Lt.unstable_shouldYield,_E=Lt.unstable_requestPaint,Ae=Lt.unstable_now,PE=Lt.unstable_getCurrentPriorityLevel,Ih=Lt.unstable_ImmediatePriority,P1=Lt.unstable_UserBlockingPriority,Wl=Lt.unstable_NormalPriority,AE=Lt.unstable_LowPriority,A1=Lt.unstable_IdlePriority,Pu=null,_n=null;function RE(e){if(_n&&typeof _n.onCommitFiberRoot=="function")try{_n.onCommitFiberRoot(Pu,e,void 0,(e.current.flags&128)===128)}catch{}}var pn=Math.clz32?Math.clz32:NE,OE=Math.log,jE=Math.LN2;function NE(e){return e>>>=0,e===0?32:31-(OE(e)/jE|0)|0}var qa=64,Ga=4194304;function yo(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 Kl(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=yo(a):(s&=o,s!==0&&(r=yo(s)))}else o=n&~i,o!==0?r=yo(o):s!==0&&(r=yo(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 ME(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 DE(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]=ME(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function qf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function R1(){var e=qa;return qa<<=1,!(qa&4194240)&&(qa=64),e}function Oc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ba(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 FE(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 $h(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 O1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var j1,Vh,N1,M1,D1,Gf=!1,Qa=[],Pr=null,Ar=null,Rr=null,zo=new Map,Uo=new Map,hr=[],LE="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 og(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":zo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Uo.delete(t.pointerId)}}function so(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=Ta(t),t!==null&&Vh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function IE(e,t,n,r,i){switch(t){case"focusin":return Pr=so(Pr,e,t,n,r,i),!0;case"dragenter":return Ar=so(Ar,e,t,n,r,i),!0;case"mouseover":return Rr=so(Rr,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return zo.set(s,so(zo.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Uo.set(s,so(Uo.get(s)||null,e,t,n,r,i)),!0}return!1}function F1(e){var t=si(e.target);if(t!==null){var n=Di(t);if(n!==null){if(t=n.tag,t===13){if(t=E1(n),t!==null){e.blockedOn=t,D1(e.priority,function(){N1(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 wl(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);Uf=r,n.target.dispatchEvent(r),Uf=null}else return t=Ta(n),t!==null&&Vh(t),e.blockedOn=n,!1;t.shift()}return!0}function ag(e,t,n){wl(e)&&n.delete(t)}function $E(){Gf=!1,Pr!==null&&wl(Pr)&&(Pr=null),Ar!==null&&wl(Ar)&&(Ar=null),Rr!==null&&wl(Rr)&&(Rr=null),zo.forEach(ag),Uo.forEach(ag)}function oo(e,t){e.blockedOn===t&&(e.blockedOn=null,Gf||(Gf=!0,Lt.unstable_scheduleCallback(Lt.unstable_NormalPriority,$E)))}function Ho(e){function t(i){return oo(i,e)}if(0<Qa.length){oo(Qa[0],e);for(var n=1;n<Qa.length;n++){var r=Qa[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Pr!==null&&oo(Pr,e),Ar!==null&&oo(Ar,e),Rr!==null&&oo(Rr,e),zo.forEach(t),Uo.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);)F1(n),n.blockedOn===null&&hr.shift()}var vs=tr.ReactCurrentBatchConfig,ql=!0;function VE(e,t,n,r){var i=le,s=vs.transition;vs.transition=null;try{le=1,Bh(e,t,n,r)}finally{le=i,vs.transition=s}}function BE(e,t,n,r){var i=le,s=vs.transition;vs.transition=null;try{le=4,Bh(e,t,n,r)}finally{le=i,vs.transition=s}}function Bh(e,t,n,r){if(ql){var i=Qf(e,t,n,r);if(i===null)Bc(e,t,r,Gl,n),og(e,r);else if(IE(i,e,t,n,r))r.stopPropagation();else if(og(e,r),t&4&&-1<LE.indexOf(e)){for(;i!==null;){var s=Ta(i);if(s!==null&&j1(s),s=Qf(e,t,n,r),s===null&&Bc(e,t,r,Gl,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Bc(e,t,r,null,n)}}var Gl=null;function Qf(e,t,n,r){if(Gl=null,e=Lh(r),e=si(e),e!==null)if(t=Di(e),t===null)e=null;else if(n=t.tag,n===13){if(e=E1(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 Gl=e,null}function L1(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(PE()){case Ih:return 1;case P1:return 4;case Wl:case AE:return 16;case A1:return 536870912;default:return 16}default:return 16}}var Er=null,zh=null,bl=null;function I1(){if(bl)return bl;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 bl=i.slice(e,1<r?1-r:void 0)}function Sl(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 Ya(){return!0}function lg(){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)?Ya:lg,this.isPropagationStopped=lg,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=Ya)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ya)},persist:function(){},isPersistent:Ya}),t}var Gs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Uh=$t(Gs),Sa=Te({},Gs,{view:0,detail:0}),zE=$t(Sa),jc,Nc,ao,Au=Te({},Sa,{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!==ao&&(ao&&e.type==="mousemove"?(jc=e.screenX-ao.screenX,Nc=e.screenY-ao.screenY):Nc=jc=0,ao=e),jc)},movementY:function(e){return"movementY"in e?e.movementY:Nc}}),ug=$t(Au),UE=Te({},Au,{dataTransfer:0}),HE=$t(UE),WE=Te({},Sa,{relatedTarget:0}),Mc=$t(WE),KE=Te({},Gs,{animationName:0,elapsedTime:0,pseudoElement:0}),qE=$t(KE),GE=Te({},Gs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),QE=$t(GE),YE=Te({},Gs,{data:0}),cg=$t(YE),XE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ZE={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"},JE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function eC(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=JE[e])?!!t[e]:!1}function Hh(){return eC}var tC=Te({},Sa,{key:function(e){if(e.key){var t=XE[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Sl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ZE[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"?Sl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Sl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),nC=$t(tC),rC=Te({},Au,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),fg=$t(rC),iC=Te({},Sa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hh}),sC=$t(iC),oC=Te({},Gs,{propertyName:0,elapsedTime:0,pseudoElement:0}),aC=$t(oC),lC=Te({},Au,{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}),uC=$t(lC),cC=[9,13,27,32],Wh=Yn&&"CompositionEvent"in window,Co=null;Yn&&"documentMode"in document&&(Co=document.documentMode);var fC=Yn&&"TextEvent"in window&&!Co,$1=Yn&&(!Wh||Co&&8<Co&&11>=Co),dg=" ",hg=!1;function V1(e,t){switch(e){case"keyup":return cC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function B1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ji=!1;function dC(e,t){switch(e){case"compositionend":return B1(t);case"keypress":return t.which!==32?null:(hg=!0,dg);case"textInput":return e=t.data,e===dg&&hg?null:e;default:return null}}function hC(e,t){if(Ji)return e==="compositionend"||!Wh&&V1(e,t)?(e=I1(),bl=zh=Er=null,Ji=!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 $1&&t.locale!=="ko"?null:t.data;default:return null}}var pC={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 pg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!pC[e.type]:t==="textarea"}function z1(e,t,n,r){x1(r),t=Ql(t,"onChange"),0<t.length&&(n=new Uh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ko=null,Wo=null;function mC(e){J1(e,0)}function Ru(e){var t=ns(e);if(d1(t))return e}function gC(e,t){if(e==="change")return t}var U1=!1;if(Yn){var Dc;if(Yn){var Fc="oninput"in document;if(!Fc){var mg=document.createElement("div");mg.setAttribute("oninput","return;"),Fc=typeof mg.oninput=="function"}Dc=Fc}else Dc=!1;U1=Dc&&(!document.documentMode||9<document.documentMode)}function gg(){ko&&(ko.detachEvent("onpropertychange",H1),Wo=ko=null)}function H1(e){if(e.propertyName==="value"&&Ru(Wo)){var t=[];z1(t,Wo,e,Lh(e)),T1(mC,t)}}function yC(e,t,n){e==="focusin"?(gg(),ko=t,Wo=n,ko.attachEvent("onpropertychange",H1)):e==="focusout"&&gg()}function vC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ru(Wo)}function xC(e,t){if(e==="click")return Ru(t)}function wC(e,t){if(e==="input"||e==="change")return Ru(t)}function bC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gn=typeof Object.is=="function"?Object.is:bC;function Ko(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(!Of.call(t,i)||!gn(e[i],t[i]))return!1}return!0}function yg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vg(e,t){var n=yg(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=yg(n)}}function W1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?W1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function K1(){for(var e=window,t=zl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=zl(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 SC(e){var t=K1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&W1(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=vg(n,s);var o=vg(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 TC=Yn&&"documentMode"in document&&11>=document.documentMode,es=null,Yf=null,_o=null,Xf=!1;function xg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Xf||es==null||es!==zl(r)||(r=es,"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}),_o&&Ko(_o,r)||(_o=r,r=Ql(Yf,"onSelect"),0<r.length&&(t=new Uh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=es)))}function Xa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ts={animationend:Xa("Animation","AnimationEnd"),animationiteration:Xa("Animation","AnimationIteration"),animationstart:Xa("Animation","AnimationStart"),transitionend:Xa("Transition","TransitionEnd")},Lc={},q1={};Yn&&(q1=document.createElement("div").style,"AnimationEvent"in window||(delete ts.animationend.animation,delete ts.animationiteration.animation,delete ts.animationstart.animation),"TransitionEvent"in window||delete ts.transitionend.transition);function Ou(e){if(Lc[e])return Lc[e];if(!ts[e])return e;var t=ts[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in q1)return Lc[e]=t[n];return e}var G1=Ou("animationend"),Q1=Ou("animationiteration"),Y1=Ou("animationstart"),X1=Ou("transitionend"),Z1=new Map,wg="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){Z1.set(e,t),Mi(t,[e])}for(var Ic=0;Ic<wg.length;Ic++){var $c=wg[Ic],EC=$c.toLowerCase(),CC=$c[0].toUpperCase()+$c.slice(1);Wr(EC,"on"+CC)}Wr(G1,"onAnimationEnd");Wr(Q1,"onAnimationIteration");Wr(Y1,"onAnimationStart");Wr("dblclick","onDoubleClick");Wr("focusin","onFocus");Wr("focusout","onBlur");Wr(X1,"onTransitionEnd");Ds("onMouseEnter",["mouseout","mouseover"]);Ds("onMouseLeave",["mouseout","mouseover"]);Ds("onPointerEnter",["pointerout","pointerover"]);Ds("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 vo="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(" "),kC=new Set("cancel close invalid load scroll toggle".split(" ").concat(vo));function bg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,EE(r,t,void 0,e),e.currentTarget=null}function J1(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;bg(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;bg(i,a,u),s=l}}}if(Hl)throw e=Kf,Hl=!1,Kf=null,e}function pe(e,t){var n=t[nd];n===void 0&&(n=t[nd]=new Set);var r=e+"__bubble";n.has(r)||(ex(t,e,2,!1),n.add(r))}function Vc(e,t,n){var r=0;t&&(r|=4),ex(n,e,r,t)}var Za="_reactListening"+Math.random().toString(36).slice(2);function qo(e){if(!e[Za]){e[Za]=!0,a1.forEach(function(n){n!=="selectionchange"&&(kC.has(n)||Vc(n,!1,e),Vc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Za]||(t[Za]=!0,Vc("selectionchange",!1,t))}}function ex(e,t,n,r){switch(L1(t)){case 1:var i=VE;break;case 4:i=BE;break;default:i=Bh}n=i.bind(null,t,n,e),i=void 0,!Wf||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=si(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}T1(function(){var u=s,f=Lh(n),c=[];e:{var d=Z1.get(e);if(d!==void 0){var h=Uh,m=e;switch(e){case"keypress":if(Sl(n)===0)break e;case"keydown":case"keyup":h=nC;break;case"focusin":m="focus",h=Mc;break;case"focusout":m="blur",h=Mc;break;case"beforeblur":case"afterblur":h=Mc;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=ug;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=HE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=sC;break;case G1:case Q1:case Y1:h=qE;break;case X1:h=aC;break;case"scroll":h=zE;break;case"wheel":h=uC;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=fg}var v=(t&4)!==0,b=!v&&e==="scroll",p=v?d!==null?d+"Capture":null:d;v=[];for(var g=u,x;g!==null;){x=g;var E=x.stateNode;if(x.tag===5&&E!==null&&(x=E,p!==null&&(E=Bo(g,p),E!=null&&v.push(Go(g,E,x)))),b)break;g=g.return}0<v.length&&(d=new h(d,m,null,n,f),c.push({event:d,listeners:v}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==Uf&&(m=n.relatedTarget||n.fromElement)&&(si(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?si(m):null,m!==null&&(b=Di(m),m!==b||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=u),h!==m)){if(v=ug,E="onMouseLeave",p="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(v=fg,E="onPointerLeave",p="onPointerEnter",g="pointer"),b=h==null?d:ns(h),x=m==null?d:ns(m),d=new v(E,g+"leave",h,n,f),d.target=b,d.relatedTarget=x,E=null,si(f)===u&&(v=new v(p,g+"enter",m,n,f),v.target=x,v.relatedTarget=b,E=v),b=E,h&&m)t:{for(v=h,p=m,g=0,x=v;x;x=Gi(x))g++;for(x=0,E=p;E;E=Gi(E))x++;for(;0<g-x;)v=Gi(v),g--;for(;0<x-g;)p=Gi(p),x--;for(;g--;){if(v===p||p!==null&&v===p.alternate)break t;v=Gi(v),p=Gi(p)}v=null}else v=null;h!==null&&Sg(c,d,h,v,!1),m!==null&&b!==null&&Sg(c,b,m,v,!0)}}e:{if(d=u?ns(u):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var S=gC;else if(pg(d))if(U1)S=wC;else{S=vC;var C=yC}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(S=xC);if(S&&(S=S(e,u))){z1(c,S,n,f);break e}C&&C(e,d,u),e==="focusout"&&(C=d._wrapperState)&&C.controlled&&d.type==="number"&&If(d,"number",d.value)}switch(C=u?ns(u):window,e){case"focusin":(pg(C)||C.contentEditable==="true")&&(es=C,Yf=u,_o=null);break;case"focusout":_o=Yf=es=null;break;case"mousedown":Xf=!0;break;case"contextmenu":case"mouseup":case"dragend":Xf=!1,xg(c,n,f);break;case"selectionchange":if(TC)break;case"keydown":case"keyup":xg(c,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 Ji?V1(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&($1&&n.locale!=="ko"&&(Ji||P!=="onCompositionStart"?P==="onCompositionEnd"&&Ji&&(k=I1()):(Er=f,zh="value"in Er?Er.value:Er.textContent,Ji=!0)),C=Ql(u,P),0<C.length&&(P=new cg(P,e,null,n,f),c.push({event:P,listeners:C}),k?P.data=k:(k=B1(n),k!==null&&(P.data=k)))),(k=fC?dC(e,n):hC(e,n))&&(u=Ql(u,"onBeforeInput"),0<u.length&&(f=new cg("onBeforeInput","beforeinput",null,n,f),c.push({event:f,listeners:u}),f.data=k))}J1(c,t)})}function Go(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ql(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Bo(e,n),s!=null&&r.unshift(Go(e,s,i)),s=Bo(e,t),s!=null&&r.push(Go(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 Sg(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=Bo(n,s),l!=null&&o.unshift(Go(n,l,a))):i||(l=Bo(n,s),l!=null&&o.push(Go(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var _C=/\r\n?/g,PC=/\u0000|\uFFFD/g;function Tg(e){return(typeof e=="string"?e:""+e).replace(_C,`
38
- `).replace(PC,"")}function Ja(e,t,n){if(t=Tg(t),Tg(e)!==t&&n)throw Error(A(425))}function Yl(){}var Zf=null,Jf=null;function ed(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 td=typeof setTimeout=="function"?setTimeout:void 0,AC=typeof clearTimeout=="function"?clearTimeout:void 0,Eg=typeof Promise=="function"?Promise:void 0,RC=typeof queueMicrotask=="function"?queueMicrotask:typeof Eg<"u"?function(e){return Eg.resolve(null).then(e).catch(OC)}:td;function OC(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),Ho(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Ho(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 Cg(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,Xn="__reactContainer$"+Qs,nd="__reactEvents$"+Qs,jC="__reactListeners$"+Qs,NC="__reactHandles$"+Qs;function si(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=Cg(e);e!==null;){if(n=e[kn])return n;e=Cg(e)}return t}e=n,n=e.parentNode}return null}function Ta(e){return e=e[kn]||e[Xn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ns(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(A(33))}function ju(e){return e[Qo]||null}var rd=[],rs=-1;function Kr(e){return{current:e}}function ge(e){0>rs||(e.current=rd[rs],rd[rs]=null,rs--)}function de(e,t){rs++,rd[rs]=e.current,e.current=t}var Br={},st=Kr(Br),Tt=Kr(!1),Ci=Br;function Fs(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 Xl(){ge(Tt),ge(st)}function kg(e,t,n){if(st.current!==Br)throw Error(A(168));de(st,t),de(Tt,n)}function tx(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,yE(e)||"Unknown",i));return Te({},n,r)}function Zl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Br,Ci=st.current,de(st,e),de(Tt,Tt.current),!0}function _g(e,t,n){var r=e.stateNode;if(!r)throw Error(A(169));n?(e=tx(e,t,Ci),r.__reactInternalMemoizedMergedChildContext=e,ge(Tt),ge(st),de(st,e)):ge(Tt),de(Tt,n)}var Bn=null,Nu=!1,Uc=!1;function nx(e){Bn===null?Bn=[e]:Bn.push(e)}function MC(e){Nu=!0,nx(e)}function qr(){if(!Uc&&Bn!==null){Uc=!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,Nu=!1}catch(i){throw Bn!==null&&(Bn=Bn.slice(e+1)),_1(Ih,qr),i}finally{le=t,Uc=!1}}return null}var is=[],ss=0,Jl=null,eu=0,qt=[],Gt=0,ki=null,Hn=1,Wn="";function ei(e,t){is[ss++]=eu,is[ss++]=Jl,Jl=e,eu=t}function rx(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 qh(e){e.return!==null&&(ei(e,1),rx(e,1,0))}function Gh(e){for(;e===Jl;)Jl=is[--ss],is[ss]=null,eu=is[--ss],is[ss]=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 ix(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 Pg(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 id(e){return(e.mode&1)!==0&&(e.flags&128)===0}function sd(e){if(ve){var t=Nt;if(t){var n=t;if(!Pg(e,t)){if(id(e))throw Error(A(418));t=Or(n.nextSibling);var r=Ft;t&&Pg(e,t)?ix(r,n):(e.flags=e.flags&-4097|2,ve=!1,Ft=e)}}else{if(id(e))throw Error(A(418));e.flags=e.flags&-4097|2,ve=!1,Ft=e}}}function Ag(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ft=e}function el(e){if(e!==Ft)return!1;if(!ve)return Ag(e),ve=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ed(e.type,e.memoizedProps)),t&&(t=Nt)){if(id(e))throw sx(),Error(A(418));for(;t;)ix(e,t),t=Or(t.nextSibling)}if(Ag(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 sx(){for(var e=Nt;e;)e=Or(e.nextSibling)}function Ls(){Nt=Ft=null,ve=!1}function Qh(e){dn===null?dn=[e]:dn.push(e)}var DC=tr.ReactCurrentBatchConfig;function lo(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 tl(e,t){throw e=Object.prototype.toString.call(t),Error(A(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Rg(e){var t=e._init;return t(e._payload)}function ox(e){function t(p,g){if(e){var x=p.deletions;x===null?(p.deletions=[g],p.flags|=16):x.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,x){return p.index=x,e?(x=p.alternate,x!==null?(x=x.index,x<g?(p.flags|=2,g):x):(p.flags|=2,g)):(p.flags|=1048576,g)}function o(p){return e&&p.alternate===null&&(p.flags|=2),p}function a(p,g,x,E){return g===null||g.tag!==6?(g=Yc(x,p.mode,E),g.return=p,g):(g=i(g,x),g.return=p,g)}function l(p,g,x,E){var S=x.type;return S===Zi?f(p,g,x.props.children,E,x.key):g!==null&&(g.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===cr&&Rg(S)===g.type)?(E=i(g,x.props),E.ref=lo(p,g,x),E.return=p,E):(E=Al(x.type,x.key,x.props,null,p.mode,E),E.ref=lo(p,g,x),E.return=p,E)}function u(p,g,x,E){return g===null||g.tag!==4||g.stateNode.containerInfo!==x.containerInfo||g.stateNode.implementation!==x.implementation?(g=Xc(x,p.mode,E),g.return=p,g):(g=i(g,x.children||[]),g.return=p,g)}function f(p,g,x,E,S){return g===null||g.tag!==7?(g=wi(x,p.mode,E,S),g.return=p,g):(g=i(g,x),g.return=p,g)}function c(p,g,x){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Yc(""+g,p.mode,x),g.return=p,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Ha:return x=Al(g.type,g.key,g.props,null,p.mode,x),x.ref=lo(p,null,g),x.return=p,x;case Xi:return g=Xc(g,p.mode,x),g.return=p,g;case cr:var E=g._init;return c(p,E(g._payload),x)}if(go(g)||ro(g))return g=wi(g,p.mode,x,null),g.return=p,g;tl(p,g)}return null}function d(p,g,x,E){var S=g!==null?g.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return S!==null?null:a(p,g,""+x,E);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Ha:return x.key===S?l(p,g,x,E):null;case Xi:return x.key===S?u(p,g,x,E):null;case cr:return S=x._init,d(p,g,S(x._payload),E)}if(go(x)||ro(x))return S!==null?null:f(p,g,x,E,null);tl(p,x)}return null}function h(p,g,x,E,S){if(typeof E=="string"&&E!==""||typeof E=="number")return p=p.get(x)||null,a(g,p,""+E,S);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case Ha:return p=p.get(E.key===null?x:E.key)||null,l(g,p,E,S);case Xi:return p=p.get(E.key===null?x:E.key)||null,u(g,p,E,S);case cr:var C=E._init;return h(p,g,x,C(E._payload),S)}if(go(E)||ro(E))return p=p.get(x)||null,f(g,p,E,S,null);tl(g,E)}return null}function m(p,g,x,E){for(var S=null,C=null,k=g,P=g=0,j=null;k!==null&&P<x.length;P++){k.index>P?(j=k,k=null):j=k.sibling;var N=d(p,k,x[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===x.length)return n(p,k),ve&&ei(p,P),S;if(k===null){for(;P<x.length;P++)k=c(p,x[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<x.length;P++)j=h(k,p,P,x[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 v(p,g,x,E){var S=ro(x);if(typeof S!="function")throw Error(A(150));if(x=S.call(x),x==null)throw Error(A(151));for(var C=S=null,k=g,P=g=0,j=null,N=x.next();k!==null&&!N.done;P++,N=x.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=x.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=x.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,x,E){if(typeof x=="object"&&x!==null&&x.type===Zi&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Ha:e:{for(var S=x.key,C=g;C!==null;){if(C.key===S){if(S=x.type,S===Zi){if(C.tag===7){n(p,C.sibling),g=i(C,x.props.children),g.return=p,p=g;break e}}else if(C.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===cr&&Rg(S)===C.type){n(p,C.sibling),g=i(C,x.props),g.ref=lo(p,C,x),g.return=p,p=g;break e}n(p,C);break}else t(p,C);C=C.sibling}x.type===Zi?(g=wi(x.props.children,p.mode,E,x.key),g.return=p,p=g):(E=Al(x.type,x.key,x.props,null,p.mode,E),E.ref=lo(p,g,x),E.return=p,p=E)}return o(p);case Xi:e:{for(C=x.key;g!==null;){if(g.key===C)if(g.tag===4&&g.stateNode.containerInfo===x.containerInfo&&g.stateNode.implementation===x.implementation){n(p,g.sibling),g=i(g,x.children||[]),g.return=p,p=g;break e}else{n(p,g);break}else t(p,g);g=g.sibling}g=Xc(x,p.mode,E),g.return=p,p=g}return o(p);case cr:return C=x._init,b(p,g,C(x._payload),E)}if(go(x))return m(p,g,x,E);if(ro(x))return v(p,g,x,E);tl(p,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,g!==null&&g.tag===6?(n(p,g.sibling),g=i(g,x),g.return=p,p=g):(n(p,g),g=Yc(x,p.mode,E),g.return=p,p=g),o(p)):n(p,g)}return b}var Is=ox(!0),ax=ox(!1),tu=Kr(null),nu=null,os=null,Yh=null;function Xh(){Yh=os=nu=null}function Zh(e){var t=tu.current;ge(tu),e._currentValue=t}function od(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 xs(e,t){nu=e,Yh=os=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(Yh!==e)if(e={context:e,memoizedValue:t,next:null},os===null){if(nu===null)throw Error(A(308));os=e,nu.dependencies={lanes:0,firstContext:e}}else os=os.next=e;return t}var oi=null;function Jh(e){oi===null?oi=[e]:oi.push(e)}function lx(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,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 ep(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ux(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,Jh(r)):(t.next=i.next,i.next=t),r.interleaved=t,Zn(e,n)}function Tl(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 Og(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 ru(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,v=a;switch(d=t,h=n,v.tag){case 1:if(m=v.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=v.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 jg(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 Ea={},Pn=Kr(Ea),Yo=Kr(Ea),Xo=Kr(Ea);function ai(e){if(e===Ea)throw Error(A(174));return e}function tp(e,t){switch(de(Xo,t),de(Yo,e),de(Pn,Ea),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Vf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Vf(t,e)}ge(Pn),de(Pn,t)}function $s(){ge(Pn),ge(Yo),ge(Xo)}function cx(e){ai(Xo.current);var t=ai(Pn.current),n=Vf(t,e.type);t!==n&&(de(Yo,e),de(Pn,n))}function np(e){Yo.current===e&&(ge(Pn),ge(Yo))}var we=Kr(0);function iu(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 El=tr.ReactCurrentDispatcher,Wc=tr.ReactCurrentBatchConfig,_i=0,Se=null,Fe=null,Ue=null,su=!1,Po=!1,Zo=0,FC=0;function Ze(){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(!gn(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,El.current=e===null||e.memoizedState===null?VC:BC,e=n(r,i),Po){s=0;do{if(Po=!1,Zo=0,25<=s)throw Error(A(301));s+=1,Ue=Fe=null,t.updateQueue=null,El.current=zC,e=n(r,i)}while(Po)}if(El.current=ou,t=Fe!==null&&Fe.next!==null,_i=0,Ue=Fe=Se=null,su=!1,t)throw Error(A(300));return e}function op(){var e=Zo!==0;return Zo=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 Jo(e,t){return typeof t=="function"?t(e):t}function Kc(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 qc(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 fx(){}function dx(e,t){var n=Se,r=en(),i=t(),s=!gn(r.memoizedState,i);if(s&&(r.memoizedState=i,St=!0),r=r.queue,ap(mx.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Ue!==null&&Ue.memoizedState.tag&1){if(n.flags|=2048,ea(9,px.bind(null,n,r,i,t),void 0,null),He===null)throw Error(A(349));_i&30||hx(n,t,i)}return i}function hx(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 px(e,t,n,r){t.value=n,t.getSnapshot=r,gx(t)&&yx(e)}function mx(e,t,n){return n(function(){gx(t)&&yx(e)})}function gx(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!gn(e,n)}catch{return!0}}function yx(e){var t=Zn(e,1);t!==null&&mn(t,e,1,-1)}function Ng(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:Jo,lastRenderedState:e},t.queue=e,e=e.dispatch=$C.bind(null,Se,e),[t.memoizedState,e]}function ea(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 vx(){return en().memoizedState}function Cl(e,t,n,r){var i=wn();Se.flags|=e,i.memoizedState=ea(1|t,n,void 0,r===void 0?null:r)}function Mu(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&&ip(r,o.deps)){i.memoizedState=ea(t,n,s,r);return}}Se.flags|=e,i.memoizedState=ea(1|t,n,s,r)}function Mg(e,t){return Cl(8390656,8,e,t)}function ap(e,t){return Mu(2048,8,e,t)}function xx(e,t){return Mu(4,2,e,t)}function wx(e,t){return Mu(4,4,e,t)}function bx(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 Sx(e,t,n){return n=n!=null?n.concat([e]):null,Mu(4,4,bx.bind(null,t,e),n)}function lp(){}function Tx(e,t){var n=en();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 Ex(e,t){var n=en();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 Cx(e,t,n){return _i&21?(gn(n,t)||(n=R1(),Se.lanes|=n,Pi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,St=!0),e.memoizedState=n)}function LC(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 kx(){return en().memoizedState}function IC(e,t,n){var r=Mr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},_x(e))Px(t,n);else if(n=lx(e,t,n,r),n!==null){var i=ft();mn(n,e,r,i),Ax(n,t,r)}}function $C(e,t,n){var r=Mr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(_x(e))Px(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,Jh(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=lx(e,t,i,r),n!==null&&(i=ft(),mn(n,e,r,i),Ax(n,t,r))}}function _x(e){var t=e.alternate;return e===Se||t!==null&&t===Se}function Px(e,t){Po=su=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ax(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$h(e,n)}}var ou={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},VC={readContext:Jt,useCallback:function(e,t){return wn().memoizedState=[e,t===void 0?null:t],e},useContext:Jt,useEffect:Mg,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Cl(4194308,4,bx.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Cl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Cl(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=IC.bind(null,Se,e),[r.memoizedState,e]},useRef:function(e){var t=wn();return e={current:e},t.memoizedState=e},useState:Ng,useDebugValue:lp,useDeferredValue:function(e){return wn().memoizedState=e},useTransition:function(){var e=Ng(!1),t=e[0];return e=LC.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||hx(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Mg(mx.bind(null,r,s,e),[e]),r.flags|=2048,ea(9,px.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=Zo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=FC++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},BC={readContext:Jt,useCallback:Tx,useContext:Jt,useEffect:ap,useImperativeHandle:Sx,useInsertionEffect:xx,useLayoutEffect:wx,useMemo:Ex,useReducer:Kc,useRef:vx,useState:function(){return Kc(Jo)},useDebugValue:lp,useDeferredValue:function(e){var t=en();return Cx(t,Fe.memoizedState,e)},useTransition:function(){var e=Kc(Jo)[0],t=en().memoizedState;return[e,t]},useMutableSource:fx,useSyncExternalStore:dx,useId:kx,unstable_isNewReconciler:!1},zC={readContext:Jt,useCallback:Tx,useContext:Jt,useEffect:ap,useImperativeHandle:Sx,useInsertionEffect:xx,useLayoutEffect:wx,useMemo:Ex,useReducer:qc,useRef:vx,useState:function(){return qc(Jo)},useDebugValue:lp,useDeferredValue:function(e){var t=en();return Fe===null?t.memoizedState=e:Cx(t,Fe.memoizedState,e)},useTransition:function(){var e=qc(Jo)[0],t=en().memoizedState;return[e,t]},useMutableSource:fx,useSyncExternalStore:dx,useId:kx,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 ad(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 Du={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),Tl(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),Tl(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),Tl(t,e,r))}};function Dg(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?!Ko(n,r)||!Ko(i,s):!0}function Rx(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)?Fs(e,i):Br),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Du,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Fg(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&&Du.enqueueReplaceState(t,t.state,null)}function ld(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=Jt(s):(s=Et(t)?Ci:st.current,i.context=Fs(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(ad(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&&Du.enqueueReplaceState(i,i.state,null),ru(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Vs(e,t){try{var n="",r=t;do n+=gE(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{Ac=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?go(e):""}function gE(e){switch(e.tag){case 5:return go(e.type);case 16:return go("Lazy");case 13:return go("Suspense");case 19:return go("SuspenseList");case 0:case 2:case 15:return e=Rc(e.type,!1),e;case 11:return e=Rc(e.type.render,!1),e;case 1:return e=Rc(e.type,!0),e;default:return""}}function Df(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 Zi:return"Fragment";case Xi:return"Portal";case jf:return"Profiler";case Mh:return"StrictMode";case Nf:return"Suspense";case Mf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case u1:return(e.displayName||"Context")+".Consumer";case l1: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:Df(e.type)||"Memo";case fr:t=e._payload,e=e._init;try{return Df(e(t))}catch{}}return null}function yE(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 Df(t);case 8:return t===Mh?"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 Br(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function f1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function vE(e){var t=f1(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 Ka(e){e._valueTracker||(e._valueTracker=vE(e))}function d1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=f1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ul(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 Ff(e,t){var n=t.checked;return Te({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Jm(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Br(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 h1(e,t){t=t.checked,t!=null&&Nh(e,"checked",t,!1)}function Lf(e,t){h1(e,t);var n=Br(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")?If(e,t.type,n):t.hasOwnProperty("defaultValue")&&If(e,t.type,Br(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function eg(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 If(e,t,n){(t!=="number"||Ul(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var yo=Array.isArray;function ms(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=""+Br(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 $f(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(A(91));return Te({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function tg(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(yo(n)){if(1<n.length)throw Error(A(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Br(n)}}function p1(e,t){var n=Br(t.value),r=Br(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 ng(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function m1(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 Vf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?m1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var qa,g1=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(qa=qa||document.createElement("div"),qa.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=qa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Bo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Eo={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},xE=["Webkit","ms","Moz","O"];Object.keys(Eo).forEach(function(e){xE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Eo[t]=Eo[e]})});function y1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Eo.hasOwnProperty(e)&&Eo[e]?(""+t).trim():t+"px"}function v1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=y1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var wE=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 Bf(e,t){if(t){if(wE[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 zf(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 Uf=null;function Lh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Hf=null,gs=null,ys=null;function rg(e){if(e=Ea(e)){if(typeof Hf!="function")throw Error(A(280));var t=e.stateNode;t&&(t=Nu(t),Hf(e.stateNode,e.type,t))}}function x1(e){gs?ys?ys.push(e):ys=[e]:gs=e}function w1(){if(gs){var e=gs,t=ys;if(ys=gs=null,rg(e),t)for(e=0;e<t.length;e++)rg(t[e])}}function b1(e,t){return e(t)}function S1(){}var Oc=!1;function T1(e,t,n){if(Oc)return e(t,n);Oc=!0;try{return b1(e,t,n)}finally{Oc=!1,(gs!==null||ys!==null)&&(S1(),w1())}}function zo(e,t){var n=e.stateNode;if(n===null)return null;var r=Nu(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 Wf=!1;if(Xn)try{var so={};Object.defineProperty(so,"passive",{get:function(){Wf=!0}}),window.addEventListener("test",so,so),window.removeEventListener("test",so,so)}catch{Wf=!1}function bE(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 Co=!1,Hl=null,Wl=!1,Kf=null,SE={onError:function(e){Co=!0,Hl=e}};function TE(e,t,n,r,i,s,o,a,l){Co=!1,Hl=null,bE.apply(SE,arguments)}function EE(e,t,n,r,i,s,o,a,l){if(TE.apply(this,arguments),Co){if(Co){var u=Hl;Co=!1,Hl=null}else throw Error(A(198));Wl||(Wl=!0,Kf=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 E1(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 ig(e){if(Di(e)!==e)throw Error(A(188))}function CE(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 ig(i),e;if(s===r)return ig(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 C1(e){return e=CE(e),e!==null?k1(e):null}function k1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=k1(e);if(t!==null)return t;e=e.sibling}return null}var _1=Lt.unstable_scheduleCallback,sg=Lt.unstable_cancelCallback,kE=Lt.unstable_shouldYield,_E=Lt.unstable_requestPaint,Ae=Lt.unstable_now,PE=Lt.unstable_getCurrentPriorityLevel,Ih=Lt.unstable_ImmediatePriority,P1=Lt.unstable_UserBlockingPriority,Kl=Lt.unstable_NormalPriority,AE=Lt.unstable_LowPriority,A1=Lt.unstable_IdlePriority,Au=null,_n=null;function RE(e){if(_n&&typeof _n.onCommitFiberRoot=="function")try{_n.onCommitFiberRoot(Au,e,void 0,(e.current.flags&128)===128)}catch{}}var pn=Math.clz32?Math.clz32:NE,OE=Math.log,jE=Math.LN2;function NE(e){return e>>>=0,e===0?32:31-(OE(e)/jE|0)|0}var Ga=64,Qa=4194304;function vo(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 ql(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=vo(a):(s&=o,s!==0&&(r=vo(s)))}else o=n&~i,o!==0?r=vo(o):s!==0&&(r=vo(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 ME(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 DE(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]=ME(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function qf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function R1(){var e=Ga;return Ga<<=1,!(Ga&4194240)&&(Ga=64),e}function jc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Sa(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 FE(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 $h(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 O1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var j1,Vh,N1,M1,D1,Gf=!1,Ya=[],Ar=null,Rr=null,Or=null,Uo=new Map,Ho=new Map,pr=[],LE="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 og(e,t){switch(e){case"focusin":case"focusout":Ar=null;break;case"dragenter":case"dragleave":Rr=null;break;case"mouseover":case"mouseout":Or=null;break;case"pointerover":case"pointerout":Uo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ho.delete(t.pointerId)}}function oo(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=Ea(t),t!==null&&Vh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function IE(e,t,n,r,i){switch(t){case"focusin":return Ar=oo(Ar,e,t,n,r,i),!0;case"dragenter":return Rr=oo(Rr,e,t,n,r,i),!0;case"mouseover":return Or=oo(Or,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Uo.set(s,oo(Uo.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Ho.set(s,oo(Ho.get(s)||null,e,t,n,r,i)),!0}return!1}function F1(e){var t=oi(e.target);if(t!==null){var n=Di(t);if(n!==null){if(t=n.tag,t===13){if(t=E1(n),t!==null){e.blockedOn=t,D1(e.priority,function(){N1(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 bl(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);Uf=r,n.target.dispatchEvent(r),Uf=null}else return t=Ea(n),t!==null&&Vh(t),e.blockedOn=n,!1;t.shift()}return!0}function ag(e,t,n){bl(e)&&n.delete(t)}function $E(){Gf=!1,Ar!==null&&bl(Ar)&&(Ar=null),Rr!==null&&bl(Rr)&&(Rr=null),Or!==null&&bl(Or)&&(Or=null),Uo.forEach(ag),Ho.forEach(ag)}function ao(e,t){e.blockedOn===t&&(e.blockedOn=null,Gf||(Gf=!0,Lt.unstable_scheduleCallback(Lt.unstable_NormalPriority,$E)))}function Wo(e){function t(i){return ao(i,e)}if(0<Ya.length){ao(Ya[0],e);for(var n=1;n<Ya.length;n++){var r=Ya[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Ar!==null&&ao(Ar,e),Rr!==null&&ao(Rr,e),Or!==null&&ao(Or,e),Uo.forEach(t),Ho.forEach(t),n=0;n<pr.length;n++)r=pr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<pr.length&&(n=pr[0],n.blockedOn===null);)F1(n),n.blockedOn===null&&pr.shift()}var vs=nr.ReactCurrentBatchConfig,Gl=!0;function VE(e,t,n,r){var i=le,s=vs.transition;vs.transition=null;try{le=1,Bh(e,t,n,r)}finally{le=i,vs.transition=s}}function BE(e,t,n,r){var i=le,s=vs.transition;vs.transition=null;try{le=4,Bh(e,t,n,r)}finally{le=i,vs.transition=s}}function Bh(e,t,n,r){if(Gl){var i=Qf(e,t,n,r);if(i===null)zc(e,t,r,Ql,n),og(e,r);else if(IE(i,e,t,n,r))r.stopPropagation();else if(og(e,r),t&4&&-1<LE.indexOf(e)){for(;i!==null;){var s=Ea(i);if(s!==null&&j1(s),s=Qf(e,t,n,r),s===null&&zc(e,t,r,Ql,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else zc(e,t,r,null,n)}}var Ql=null;function Qf(e,t,n,r){if(Ql=null,e=Lh(r),e=oi(e),e!==null)if(t=Di(e),t===null)e=null;else if(n=t.tag,n===13){if(e=E1(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 L1(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(PE()){case Ih:return 1;case P1:return 4;case Kl:case AE:return 16;case A1:return 536870912;default:return 16}default:return 16}}var Cr=null,zh=null,Sl=null;function I1(){if(Sl)return Sl;var e,t=zh,n=t.length,r,i="value"in Cr?Cr.value:Cr.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 Sl=i.slice(e,1<r?1-r:void 0)}function Tl(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 Xa(){return!0}function lg(){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)?Xa:lg,this.isPropagationStopped=lg,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=Xa)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Xa)},persist:function(){},isPersistent:Xa}),t}var Qs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Uh=$t(Qs),Ta=Te({},Qs,{view:0,detail:0}),zE=$t(Ta),Nc,Mc,lo,Ru=Te({},Ta,{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!==lo&&(lo&&e.type==="mousemove"?(Nc=e.screenX-lo.screenX,Mc=e.screenY-lo.screenY):Mc=Nc=0,lo=e),Nc)},movementY:function(e){return"movementY"in e?e.movementY:Mc}}),ug=$t(Ru),UE=Te({},Ru,{dataTransfer:0}),HE=$t(UE),WE=Te({},Ta,{relatedTarget:0}),Dc=$t(WE),KE=Te({},Qs,{animationName:0,elapsedTime:0,pseudoElement:0}),qE=$t(KE),GE=Te({},Qs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),QE=$t(GE),YE=Te({},Qs,{data:0}),cg=$t(YE),XE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ZE={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"},JE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function eC(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=JE[e])?!!t[e]:!1}function Hh(){return eC}var tC=Te({},Ta,{key:function(e){if(e.key){var t=XE[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Tl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ZE[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"?Tl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Tl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),nC=$t(tC),rC=Te({},Ru,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),fg=$t(rC),iC=Te({},Ta,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hh}),sC=$t(iC),oC=Te({},Qs,{propertyName:0,elapsedTime:0,pseudoElement:0}),aC=$t(oC),lC=Te({},Ru,{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}),uC=$t(lC),cC=[9,13,27,32],Wh=Xn&&"CompositionEvent"in window,ko=null;Xn&&"documentMode"in document&&(ko=document.documentMode);var fC=Xn&&"TextEvent"in window&&!ko,$1=Xn&&(!Wh||ko&&8<ko&&11>=ko),dg=" ",hg=!1;function V1(e,t){switch(e){case"keyup":return cC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function B1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ji=!1;function dC(e,t){switch(e){case"compositionend":return B1(t);case"keypress":return t.which!==32?null:(hg=!0,dg);case"textInput":return e=t.data,e===dg&&hg?null:e;default:return null}}function hC(e,t){if(Ji)return e==="compositionend"||!Wh&&V1(e,t)?(e=I1(),Sl=zh=Cr=null,Ji=!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 $1&&t.locale!=="ko"?null:t.data;default:return null}}var pC={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 pg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!pC[e.type]:t==="textarea"}function z1(e,t,n,r){x1(r),t=Yl(t,"onChange"),0<t.length&&(n=new Uh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var _o=null,Ko=null;function mC(e){J1(e,0)}function Ou(e){var t=ns(e);if(d1(t))return e}function gC(e,t){if(e==="change")return t}var U1=!1;if(Xn){var Fc;if(Xn){var Lc="oninput"in document;if(!Lc){var mg=document.createElement("div");mg.setAttribute("oninput","return;"),Lc=typeof mg.oninput=="function"}Fc=Lc}else Fc=!1;U1=Fc&&(!document.documentMode||9<document.documentMode)}function gg(){_o&&(_o.detachEvent("onpropertychange",H1),Ko=_o=null)}function H1(e){if(e.propertyName==="value"&&Ou(Ko)){var t=[];z1(t,Ko,e,Lh(e)),T1(mC,t)}}function yC(e,t,n){e==="focusin"?(gg(),_o=t,Ko=n,_o.attachEvent("onpropertychange",H1)):e==="focusout"&&gg()}function vC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ou(Ko)}function xC(e,t){if(e==="click")return Ou(t)}function wC(e,t){if(e==="input"||e==="change")return Ou(t)}function bC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gn=typeof Object.is=="function"?Object.is:bC;function qo(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(!Of.call(t,i)||!gn(e[i],t[i]))return!1}return!0}function yg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vg(e,t){var n=yg(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=yg(n)}}function W1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?W1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function K1(){for(var e=window,t=Ul();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ul(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 SC(e){var t=K1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&W1(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=vg(n,s);var o=vg(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 TC=Xn&&"documentMode"in document&&11>=document.documentMode,es=null,Yf=null,Po=null,Xf=!1;function xg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Xf||es==null||es!==Ul(r)||(r=es,"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}),Po&&qo(Po,r)||(Po=r,r=Yl(Yf,"onSelect"),0<r.length&&(t=new Uh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=es)))}function Za(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ts={animationend:Za("Animation","AnimationEnd"),animationiteration:Za("Animation","AnimationIteration"),animationstart:Za("Animation","AnimationStart"),transitionend:Za("Transition","TransitionEnd")},Ic={},q1={};Xn&&(q1=document.createElement("div").style,"AnimationEvent"in window||(delete ts.animationend.animation,delete ts.animationiteration.animation,delete ts.animationstart.animation),"TransitionEvent"in window||delete ts.transitionend.transition);function ju(e){if(Ic[e])return Ic[e];if(!ts[e])return e;var t=ts[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in q1)return Ic[e]=t[n];return e}var G1=ju("animationend"),Q1=ju("animationiteration"),Y1=ju("animationstart"),X1=ju("transitionend"),Z1=new Map,wg="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 Kr(e,t){Z1.set(e,t),Mi(t,[e])}for(var $c=0;$c<wg.length;$c++){var Vc=wg[$c],EC=Vc.toLowerCase(),CC=Vc[0].toUpperCase()+Vc.slice(1);Kr(EC,"on"+CC)}Kr(G1,"onAnimationEnd");Kr(Q1,"onAnimationIteration");Kr(Y1,"onAnimationStart");Kr("dblclick","onDoubleClick");Kr("focusin","onFocus");Kr("focusout","onBlur");Kr(X1,"onTransitionEnd");Fs("onMouseEnter",["mouseout","mouseover"]);Fs("onMouseLeave",["mouseout","mouseover"]);Fs("onPointerEnter",["pointerout","pointerover"]);Fs("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 xo="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(" "),kC=new Set("cancel close invalid load scroll toggle".split(" ").concat(xo));function bg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,EE(r,t,void 0,e),e.currentTarget=null}function J1(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;bg(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;bg(i,a,u),s=l}}}if(Wl)throw e=Kf,Wl=!1,Kf=null,e}function pe(e,t){var n=t[nd];n===void 0&&(n=t[nd]=new Set);var r=e+"__bubble";n.has(r)||(ex(t,e,2,!1),n.add(r))}function Bc(e,t,n){var r=0;t&&(r|=4),ex(n,e,r,t)}var Ja="_reactListening"+Math.random().toString(36).slice(2);function Go(e){if(!e[Ja]){e[Ja]=!0,a1.forEach(function(n){n!=="selectionchange"&&(kC.has(n)||Bc(n,!1,e),Bc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ja]||(t[Ja]=!0,Bc("selectionchange",!1,t))}}function ex(e,t,n,r){switch(L1(t)){case 1:var i=VE;break;case 4:i=BE;break;default:i=Bh}n=i.bind(null,t,n,e),i=void 0,!Wf||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 zc(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}T1(function(){var u=s,f=Lh(n),c=[];e:{var d=Z1.get(e);if(d!==void 0){var h=Uh,m=e;switch(e){case"keypress":if(Tl(n)===0)break e;case"keydown":case"keyup":h=nC;break;case"focusin":m="focus",h=Dc;break;case"focusout":m="blur",h=Dc;break;case"beforeblur":case"afterblur":h=Dc;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=ug;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=HE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=sC;break;case G1:case Q1:case Y1:h=qE;break;case X1:h=aC;break;case"scroll":h=zE;break;case"wheel":h=uC;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=fg}var v=(t&4)!==0,b=!v&&e==="scroll",p=v?d!==null?d+"Capture":null:d;v=[];for(var g=u,x;g!==null;){x=g;var E=x.stateNode;if(x.tag===5&&E!==null&&(x=E,p!==null&&(E=zo(g,p),E!=null&&v.push(Qo(g,E,x)))),b)break;g=g.return}0<v.length&&(d=new h(d,m,null,n,f),c.push({event:d,listeners:v}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==Uf&&(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=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(v=ug,E="onMouseLeave",p="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(v=fg,E="onPointerLeave",p="onPointerEnter",g="pointer"),b=h==null?d:ns(h),x=m==null?d:ns(m),d=new v(E,g+"leave",h,n,f),d.target=b,d.relatedTarget=x,E=null,oi(f)===u&&(v=new v(p,g+"enter",m,n,f),v.target=x,v.relatedTarget=b,E=v),b=E,h&&m)t:{for(v=h,p=m,g=0,x=v;x;x=Gi(x))g++;for(x=0,E=p;E;E=Gi(E))x++;for(;0<g-x;)v=Gi(v),g--;for(;0<x-g;)p=Gi(p),x--;for(;g--;){if(v===p||p!==null&&v===p.alternate)break t;v=Gi(v),p=Gi(p)}v=null}else v=null;h!==null&&Sg(c,d,h,v,!1),m!==null&&b!==null&&Sg(c,b,m,v,!0)}}e:{if(d=u?ns(u):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var S=gC;else if(pg(d))if(U1)S=wC;else{S=vC;var C=yC}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(S=xC);if(S&&(S=S(e,u))){z1(c,S,n,f);break e}C&&C(e,d,u),e==="focusout"&&(C=d._wrapperState)&&C.controlled&&d.type==="number"&&If(d,"number",d.value)}switch(C=u?ns(u):window,e){case"focusin":(pg(C)||C.contentEditable==="true")&&(es=C,Yf=u,Po=null);break;case"focusout":Po=Yf=es=null;break;case"mousedown":Xf=!0;break;case"contextmenu":case"mouseup":case"dragend":Xf=!1,xg(c,n,f);break;case"selectionchange":if(TC)break;case"keydown":case"keyup":xg(c,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 Ji?V1(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&($1&&n.locale!=="ko"&&(Ji||P!=="onCompositionStart"?P==="onCompositionEnd"&&Ji&&(k=I1()):(Cr=f,zh="value"in Cr?Cr.value:Cr.textContent,Ji=!0)),C=Yl(u,P),0<C.length&&(P=new cg(P,e,null,n,f),c.push({event:P,listeners:C}),k?P.data=k:(k=B1(n),k!==null&&(P.data=k)))),(k=fC?dC(e,n):hC(e,n))&&(u=Yl(u,"onBeforeInput"),0<u.length&&(f=new cg("onBeforeInput","beforeinput",null,n,f),c.push({event:f,listeners:u}),f.data=k))}J1(c,t)})}function Qo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Yl(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=zo(e,n),s!=null&&r.unshift(Qo(e,s,i)),s=zo(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 Sg(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=zo(n,s),l!=null&&o.unshift(Qo(n,l,a))):i||(l=zo(n,s),l!=null&&o.push(Qo(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var _C=/\r\n?/g,PC=/\u0000|\uFFFD/g;function Tg(e){return(typeof e=="string"?e:""+e).replace(_C,`
38
+ `).replace(PC,"")}function el(e,t,n){if(t=Tg(t),Tg(e)!==t&&n)throw Error(A(425))}function Xl(){}var Zf=null,Jf=null;function ed(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 td=typeof setTimeout=="function"?setTimeout:void 0,AC=typeof clearTimeout=="function"?clearTimeout:void 0,Eg=typeof Promise=="function"?Promise:void 0,RC=typeof queueMicrotask=="function"?queueMicrotask:typeof Eg<"u"?function(e){return Eg.resolve(null).then(e).catch(OC)}:td;function OC(e){setTimeout(function(){throw e})}function Uc(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),Wo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Wo(t)}function jr(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 Cg(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 Ys=Math.random().toString(36).slice(2),kn="__reactFiber$"+Ys,Yo="__reactProps$"+Ys,Zn="__reactContainer$"+Ys,nd="__reactEvents$"+Ys,jC="__reactListeners$"+Ys,NC="__reactHandles$"+Ys;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=Cg(e);e!==null;){if(n=e[kn])return n;e=Cg(e)}return t}e=n,n=e.parentNode}return null}function Ea(e){return e=e[kn]||e[Zn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ns(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(A(33))}function Nu(e){return e[Yo]||null}var rd=[],rs=-1;function qr(e){return{current:e}}function ge(e){0>rs||(e.current=rd[rs],rd[rs]=null,rs--)}function de(e,t){rs++,rd[rs]=e.current,e.current=t}var zr={},st=qr(zr),Tt=qr(!1),Ci=zr;function Ls(e,t){var n=e.type.contextTypes;if(!n)return zr;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 Zl(){ge(Tt),ge(st)}function kg(e,t,n){if(st.current!==zr)throw Error(A(168));de(st,t),de(Tt,n)}function tx(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,yE(e)||"Unknown",i));return Te({},n,r)}function Jl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||zr,Ci=st.current,de(st,e),de(Tt,Tt.current),!0}function _g(e,t,n){var r=e.stateNode;if(!r)throw Error(A(169));n?(e=tx(e,t,Ci),r.__reactInternalMemoizedMergedChildContext=e,ge(Tt),ge(st),de(st,e)):ge(Tt),de(Tt,n)}var zn=null,Mu=!1,Hc=!1;function nx(e){zn===null?zn=[e]:zn.push(e)}function MC(e){Mu=!0,nx(e)}function Gr(){if(!Hc&&zn!==null){Hc=!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,Mu=!1}catch(i){throw zn!==null&&(zn=zn.slice(e+1)),_1(Ih,Gr),i}finally{le=t,Hc=!1}}return null}var is=[],ss=0,eu=null,tu=0,qt=[],Gt=0,ki=null,Wn=1,Kn="";function ti(e,t){is[ss++]=tu,is[ss++]=eu,eu=e,tu=t}function rx(e,t,n){qt[Gt++]=Wn,qt[Gt++]=Kn,qt[Gt++]=ki,ki=e;var r=Wn;e=Kn;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,Wn=1<<32-pn(t)+i|n<<i|r,Kn=s+e}else Wn=1<<s|n<<i|r,Kn=e}function qh(e){e.return!==null&&(ti(e,1),rx(e,1,0))}function Gh(e){for(;e===eu;)eu=is[--ss],is[ss]=null,tu=is[--ss],is[ss]=null;for(;e===ki;)ki=qt[--Gt],qt[Gt]=null,Kn=qt[--Gt],qt[Gt]=null,Wn=qt[--Gt],qt[Gt]=null}var Ft=null,Nt=null,ve=!1,dn=null;function ix(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 Pg(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=jr(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:Wn,overflow:Kn}: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 id(e){return(e.mode&1)!==0&&(e.flags&128)===0}function sd(e){if(ve){var t=Nt;if(t){var n=t;if(!Pg(e,t)){if(id(e))throw Error(A(418));t=jr(n.nextSibling);var r=Ft;t&&Pg(e,t)?ix(r,n):(e.flags=e.flags&-4097|2,ve=!1,Ft=e)}}else{if(id(e))throw Error(A(418));e.flags=e.flags&-4097|2,ve=!1,Ft=e}}}function Ag(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ft=e}function tl(e){if(e!==Ft)return!1;if(!ve)return Ag(e),ve=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ed(e.type,e.memoizedProps)),t&&(t=Nt)){if(id(e))throw sx(),Error(A(418));for(;t;)ix(e,t),t=jr(t.nextSibling)}if(Ag(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=jr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Nt=null}}else Nt=Ft?jr(e.stateNode.nextSibling):null;return!0}function sx(){for(var e=Nt;e;)e=jr(e.nextSibling)}function Is(){Nt=Ft=null,ve=!1}function Qh(e){dn===null?dn=[e]:dn.push(e)}var DC=nr.ReactCurrentBatchConfig;function uo(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 nl(e,t){throw e=Object.prototype.toString.call(t),Error(A(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Rg(e){var t=e._init;return t(e._payload)}function ox(e){function t(p,g){if(e){var x=p.deletions;x===null?(p.deletions=[g],p.flags|=16):x.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=Fr(p,g),p.index=0,p.sibling=null,p}function s(p,g,x){return p.index=x,e?(x=p.alternate,x!==null?(x=x.index,x<g?(p.flags|=2,g):x):(p.flags|=2,g)):(p.flags|=1048576,g)}function o(p){return e&&p.alternate===null&&(p.flags|=2),p}function a(p,g,x,E){return g===null||g.tag!==6?(g=Xc(x,p.mode,E),g.return=p,g):(g=i(g,x),g.return=p,g)}function l(p,g,x,E){var S=x.type;return S===Zi?f(p,g,x.props.children,E,x.key):g!==null&&(g.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===fr&&Rg(S)===g.type)?(E=i(g,x.props),E.ref=uo(p,g,x),E.return=p,E):(E=Rl(x.type,x.key,x.props,null,p.mode,E),E.ref=uo(p,g,x),E.return=p,E)}function u(p,g,x,E){return g===null||g.tag!==4||g.stateNode.containerInfo!==x.containerInfo||g.stateNode.implementation!==x.implementation?(g=Zc(x,p.mode,E),g.return=p,g):(g=i(g,x.children||[]),g.return=p,g)}function f(p,g,x,E,S){return g===null||g.tag!==7?(g=bi(x,p.mode,E,S),g.return=p,g):(g=i(g,x),g.return=p,g)}function c(p,g,x){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Xc(""+g,p.mode,x),g.return=p,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Wa:return x=Rl(g.type,g.key,g.props,null,p.mode,x),x.ref=uo(p,null,g),x.return=p,x;case Xi:return g=Zc(g,p.mode,x),g.return=p,g;case fr:var E=g._init;return c(p,E(g._payload),x)}if(yo(g)||io(g))return g=bi(g,p.mode,x,null),g.return=p,g;nl(p,g)}return null}function d(p,g,x,E){var S=g!==null?g.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return S!==null?null:a(p,g,""+x,E);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Wa:return x.key===S?l(p,g,x,E):null;case Xi:return x.key===S?u(p,g,x,E):null;case fr:return S=x._init,d(p,g,S(x._payload),E)}if(yo(x)||io(x))return S!==null?null:f(p,g,x,E,null);nl(p,x)}return null}function h(p,g,x,E,S){if(typeof E=="string"&&E!==""||typeof E=="number")return p=p.get(x)||null,a(g,p,""+E,S);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case Wa:return p=p.get(E.key===null?x:E.key)||null,l(g,p,E,S);case Xi:return p=p.get(E.key===null?x:E.key)||null,u(g,p,E,S);case fr:var C=E._init;return h(p,g,x,C(E._payload),S)}if(yo(E)||io(E))return p=p.get(x)||null,f(g,p,E,S,null);nl(g,E)}return null}function m(p,g,x,E){for(var S=null,C=null,k=g,P=g=0,j=null;k!==null&&P<x.length;P++){k.index>P?(j=k,k=null):j=k.sibling;var N=d(p,k,x[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===x.length)return n(p,k),ve&&ti(p,P),S;if(k===null){for(;P<x.length;P++)k=c(p,x[P],E),k!==null&&(g=s(k,g,P),C===null?S=k:C.sibling=k,C=k);return ve&&ti(p,P),S}for(k=r(p,k);P<x.length;P++)j=h(k,p,P,x[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&&ti(p,P),S}function v(p,g,x,E){var S=io(x);if(typeof S!="function")throw Error(A(150));if(x=S.call(x),x==null)throw Error(A(151));for(var C=S=null,k=g,P=g=0,j=null,N=x.next();k!==null&&!N.done;P++,N=x.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&&ti(p,P),S;if(k===null){for(;!N.done;P++,N=x.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&&ti(p,P),S}for(k=r(p,k);!N.done;P++,N=x.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&&ti(p,P),S}function b(p,g,x,E){if(typeof x=="object"&&x!==null&&x.type===Zi&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Wa:e:{for(var S=x.key,C=g;C!==null;){if(C.key===S){if(S=x.type,S===Zi){if(C.tag===7){n(p,C.sibling),g=i(C,x.props.children),g.return=p,p=g;break e}}else if(C.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===fr&&Rg(S)===C.type){n(p,C.sibling),g=i(C,x.props),g.ref=uo(p,C,x),g.return=p,p=g;break e}n(p,C);break}else t(p,C);C=C.sibling}x.type===Zi?(g=bi(x.props.children,p.mode,E,x.key),g.return=p,p=g):(E=Rl(x.type,x.key,x.props,null,p.mode,E),E.ref=uo(p,g,x),E.return=p,p=E)}return o(p);case Xi:e:{for(C=x.key;g!==null;){if(g.key===C)if(g.tag===4&&g.stateNode.containerInfo===x.containerInfo&&g.stateNode.implementation===x.implementation){n(p,g.sibling),g=i(g,x.children||[]),g.return=p,p=g;break e}else{n(p,g);break}else t(p,g);g=g.sibling}g=Zc(x,p.mode,E),g.return=p,p=g}return o(p);case fr:return C=x._init,b(p,g,C(x._payload),E)}if(yo(x))return m(p,g,x,E);if(io(x))return v(p,g,x,E);nl(p,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,g!==null&&g.tag===6?(n(p,g.sibling),g=i(g,x),g.return=p,p=g):(n(p,g),g=Xc(x,p.mode,E),g.return=p,p=g),o(p)):n(p,g)}return b}var $s=ox(!0),ax=ox(!1),nu=qr(null),ru=null,os=null,Yh=null;function Xh(){Yh=os=ru=null}function Zh(e){var t=nu.current;ge(nu),e._currentValue=t}function od(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 xs(e,t){ru=e,Yh=os=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(Yh!==e)if(e={context:e,memoizedValue:t,next:null},os===null){if(ru===null)throw Error(A(308));os=e,ru.dependencies={lanes:0,firstContext:e}}else os=os.next=e;return t}var ai=null;function Jh(e){ai===null?ai=[e]:ai.push(e)}function lx(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 dr=!1;function ep(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ux(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 Nr(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 El(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 Og(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 iu(e,t,n,r){var i=e.updateQueue;dr=!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,v=a;switch(d=t,h=n,v.tag){case 1:if(m=v.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=v.payload,d=typeof m=="function"?m.call(h,c,d):m,d==null)break e;c=Te({},c,d);break e;case 2:dr=!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 jg(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 Ca={},Pn=qr(Ca),Xo=qr(Ca),Zo=qr(Ca);function li(e){if(e===Ca)throw Error(A(174));return e}function tp(e,t){switch(de(Zo,t),de(Xo,e),de(Pn,Ca),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Vf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Vf(t,e)}ge(Pn),de(Pn,t)}function Vs(){ge(Pn),ge(Xo),ge(Zo)}function cx(e){li(Zo.current);var t=li(Pn.current),n=Vf(t,e.type);t!==n&&(de(Xo,e),de(Pn,n))}function np(e){Xo.current===e&&(ge(Pn),ge(Xo))}var we=qr(0);function su(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 Wc=[];function rp(){for(var e=0;e<Wc.length;e++)Wc[e]._workInProgressVersionPrimary=null;Wc.length=0}var Cl=nr.ReactCurrentDispatcher,Kc=nr.ReactCurrentBatchConfig,_i=0,Se=null,Fe=null,Ue=null,ou=!1,Ao=!1,Jo=0,FC=0;function Ze(){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(!gn(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,Cl.current=e===null||e.memoizedState===null?VC:BC,e=n(r,i),Ao){s=0;do{if(Ao=!1,Jo=0,25<=s)throw Error(A(301));s+=1,Ue=Fe=null,t.updateQueue=null,Cl.current=zC,e=n(r,i)}while(Ao)}if(Cl.current=au,t=Fe!==null&&Fe.next!==null,_i=0,Ue=Fe=Se=null,ou=!1,t)throw Error(A(300));return e}function op(){var e=Jo!==0;return Jo=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 ea(e,t){return typeof t=="function"?t(e):t}function qc(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 Gc(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 fx(){}function dx(e,t){var n=Se,r=en(),i=t(),s=!gn(r.memoizedState,i);if(s&&(r.memoizedState=i,St=!0),r=r.queue,ap(mx.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Ue!==null&&Ue.memoizedState.tag&1){if(n.flags|=2048,ta(9,px.bind(null,n,r,i,t),void 0,null),He===null)throw Error(A(349));_i&30||hx(n,t,i)}return i}function hx(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 px(e,t,n,r){t.value=n,t.getSnapshot=r,gx(t)&&yx(e)}function mx(e,t,n){return n(function(){gx(t)&&yx(e)})}function gx(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!gn(e,n)}catch{return!0}}function yx(e){var t=Jn(e,1);t!==null&&mn(t,e,1,-1)}function Ng(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:ea,lastRenderedState:e},t.queue=e,e=e.dispatch=$C.bind(null,Se,e),[t.memoizedState,e]}function ta(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 vx(){return en().memoizedState}function kl(e,t,n,r){var i=wn();Se.flags|=e,i.memoizedState=ta(1|t,n,void 0,r===void 0?null:r)}function Du(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&&ip(r,o.deps)){i.memoizedState=ta(t,n,s,r);return}}Se.flags|=e,i.memoizedState=ta(1|t,n,s,r)}function Mg(e,t){return kl(8390656,8,e,t)}function ap(e,t){return Du(2048,8,e,t)}function xx(e,t){return Du(4,2,e,t)}function wx(e,t){return Du(4,4,e,t)}function bx(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 Sx(e,t,n){return n=n!=null?n.concat([e]):null,Du(4,4,bx.bind(null,t,e),n)}function lp(){}function Tx(e,t){var n=en();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 Ex(e,t){var n=en();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 Cx(e,t,n){return _i&21?(gn(n,t)||(n=R1(),Se.lanes|=n,Pi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,St=!0),e.memoizedState=n)}function LC(e,t){var n=le;le=n!==0&&4>n?n:4,e(!0);var r=Kc.transition;Kc.transition={};try{e(!1),t()}finally{le=n,Kc.transition=r}}function kx(){return en().memoizedState}function IC(e,t,n){var r=Dr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},_x(e))Px(t,n);else if(n=lx(e,t,n,r),n!==null){var i=ft();mn(n,e,r,i),Ax(n,t,r)}}function $C(e,t,n){var r=Dr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(_x(e))Px(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,Jh(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=lx(e,t,i,r),n!==null&&(i=ft(),mn(n,e,r,i),Ax(n,t,r))}}function _x(e){var t=e.alternate;return e===Se||t!==null&&t===Se}function Px(e,t){Ao=ou=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ax(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$h(e,n)}}var au={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},VC={readContext:Jt,useCallback:function(e,t){return wn().memoizedState=[e,t===void 0?null:t],e},useContext:Jt,useEffect:Mg,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,kl(4194308,4,bx.bind(null,t,e),n)},useLayoutEffect:function(e,t){return kl(4194308,4,e,t)},useInsertionEffect:function(e,t){return kl(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=IC.bind(null,Se,e),[r.memoizedState,e]},useRef:function(e){var t=wn();return e={current:e},t.memoizedState=e},useState:Ng,useDebugValue:lp,useDeferredValue:function(e){return wn().memoizedState=e},useTransition:function(){var e=Ng(!1),t=e[0];return e=LC.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||hx(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Mg(mx.bind(null,r,s,e),[e]),r.flags|=2048,ta(9,px.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=wn(),t=He.identifierPrefix;if(ve){var n=Kn,r=Wn;n=(r&~(1<<32-pn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Jo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=FC++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},BC={readContext:Jt,useCallback:Tx,useContext:Jt,useEffect:ap,useImperativeHandle:Sx,useInsertionEffect:xx,useLayoutEffect:wx,useMemo:Ex,useReducer:qc,useRef:vx,useState:function(){return qc(ea)},useDebugValue:lp,useDeferredValue:function(e){var t=en();return Cx(t,Fe.memoizedState,e)},useTransition:function(){var e=qc(ea)[0],t=en().memoizedState;return[e,t]},useMutableSource:fx,useSyncExternalStore:dx,useId:kx,unstable_isNewReconciler:!1},zC={readContext:Jt,useCallback:Tx,useContext:Jt,useEffect:ap,useImperativeHandle:Sx,useInsertionEffect:xx,useLayoutEffect:wx,useMemo:Ex,useReducer:Gc,useRef:vx,useState:function(){return Gc(ea)},useDebugValue:lp,useDeferredValue:function(e){var t=en();return Fe===null?t.memoizedState=e:Cx(t,Fe.memoizedState,e)},useTransition:function(){var e=Gc(ea)[0],t=en().memoizedState;return[e,t]},useMutableSource:fx,useSyncExternalStore:dx,useId:kx,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 ad(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 Fu={isMounted:function(e){return(e=e._reactInternals)?Di(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ft(),i=Dr(e),s=Gn(r,i);s.payload=t,n!=null&&(s.callback=n),t=Nr(e,s,i),t!==null&&(mn(t,e,i,r),El(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ft(),i=Dr(e),s=Gn(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Nr(e,s,i),t!==null&&(mn(t,e,i,r),El(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ft(),r=Dr(e),i=Gn(n,r);i.tag=2,t!=null&&(i.callback=t),t=Nr(e,i,r),t!==null&&(mn(t,e,r,n),El(t,e,r))}};function Dg(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?!qo(n,r)||!qo(i,s):!0}function Rx(e,t,n){var r=!1,i=zr,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)?Ls(e,i):zr),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Fu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Fg(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&&Fu.enqueueReplaceState(t,t.state,null)}function ld(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=Jt(s):(s=Et(t)?Ci:st.current,i.context=Ls(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(ad(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&&Fu.enqueueReplaceState(i,i.state,null),iu(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Bs(e,t){try{var n="",r=t;do n+=gE(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 ud(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var UC=typeof WeakMap=="function"?WeakMap:Map;function Ox(e,t,n){n=qn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){lu||(lu=!0,xd=r),ud(e,t)},n}function jx(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(){ud(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){ud(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 Lg(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new UC;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=rk.bind(null,e,t,n),t.then(e,e))}function Ig(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 $g(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 HC=tr.ReactCurrentOwner,St=!1;function lt(e,t,n,r){t.child=e===null?ax(t,null,n,r):Is(t,e.child,n,r)}function Vg(e,t,n,r,i){n=n.render;var s=t.ref;return xs(t,i),r=sp(e,t,n,r,s,i),n=op(),e!==null&&!St?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Jn(e,t,i)):(ve&&n&&qh(t),t.flags|=1,lt(e,t,r,i),t.child)}function Bg(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,Nx(e,t,s,r,i)):(e=Al(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:Ko,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 Nx(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Ko(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 cd(e,t,n,r,i)}function Mx(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(ls,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(ls,jt),jt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,de(ls,jt),jt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,de(ls,jt),jt|=r;return lt(e,t,i,n),t.child}function Dx(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function cd(e,t,n,r,i){var s=Et(n)?Ci:st.current;return s=Fs(t,s),xs(t,i),n=sp(e,t,n,r,s,i),r=op(),e!==null&&!St?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Jn(e,t,i)):(ve&&r&&qh(t),t.flags|=1,lt(e,t,n,i),t.child)}function zg(e,t,n,r,i){if(Et(n)){var s=!0;Zl(t)}else s=!1;if(xs(t,i),t.stateNode===null)kl(e,t),Rx(t,n,r),ld(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=Fs(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)&&Fg(t,o,r,u),fr=!1;var d=t.memoizedState;o.state=d,ru(t,r,o,i),l=t.memoizedState,a!==r||d!==l||Tt.current||fr?(typeof f=="function"&&(ad(t,n,f,r),l=t.memoizedState),(a=fr||Dg(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,ux(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=Fs(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)&&Fg(t,o,r,l),fr=!1,d=t.memoizedState,o.state=d,ru(t,r,o,i);var m=t.memoizedState;a!==c||d!==m||Tt.current||fr?(typeof h=="function"&&(ad(t,n,h,r),m=t.memoizedState),(u=fr||Dg(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 fd(e,t,n,r,s,i)}function fd(e,t,n,r,i,s){Dx(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&_g(t,n,!1),Jn(e,t,s);r=t.stateNode,HC.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Is(t,e.child,null,s),t.child=Is(t,null,a,s)):lt(e,t,a,s),t.memoizedState=r.state,i&&_g(t,n,!0),t.child}function Fx(e){var t=e.stateNode;t.pendingContext?kg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&kg(e,t.context,!1),tp(e,t.containerInfo)}function Ug(e,t,n,r,i){return Ls(),Qh(i),t.flags|=256,lt(e,t,n,r),t.child}var dd={dehydrated:null,treeContext:null,retryLane:0};function hd(e){return{baseLanes:e,cachePool:null,transitions:null}}function Lx(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 sd(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=Iu(o,r,0,null),e=wi(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=hd(n),t.memoizedState=dd,e):up(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return WC(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=wi(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?hd(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=dd,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=Iu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function nl(e,t,n,r){return r!==null&&Qh(r),Is(t,e.child,null,n),e=up(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function WC(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=Gc(Error(A(422))),nl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Iu({mode:"visible",children:r.children},i,0,null),s=wi(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Is(t,e.child,null,o),t.child.memoizedState=hd(o),t.memoizedState=dd,s);if(!(t.mode&1))return nl(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),nl(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 mp(),r=Gc(Error(A(421))),nl(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=ik.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=up(t,r.children),t.flags|=4096,t)}function Hg(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),od(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 Ix(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&&Hg(e,n,t);else if(e.tag===19)Hg(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&&iu(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&&iu(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 kl(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 KC(e,t,n){switch(t.tag){case 3:Fx(t),Ls();break;case 5:cx(t);break;case 1:Et(t.type)&&Zl(t);break;case 4:tp(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;de(tu,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?Lx(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 Ix(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,Mx(e,t,n)}return Jn(e,t,n)}var $x,pd,Vx,Bx;$x=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}};pd=function(){};Vx=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,ai(Pn.current);var s=null;switch(n){case"input":i=Ff(e,i),r=Ff(e,r),s=[];break;case"select":i=Te({},i,{value:void 0}),r=Te({},r,{value:void 0}),s=[];break;case"textarea":i=$f(e,i),r=$f(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Yl)}Bf(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"&&($o.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"&&($o.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)}};Bx=function(e,t,n,r){n!==r&&(t.flags|=4)};function uo(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 qC(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 Je(t),null;case 1:return Et(t.type)&&Xl(),Je(t),null;case 3:return r=t.stateNode,$s(),ge(Tt),ge(st),rp(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(el(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,dn!==null&&(Sd(dn),dn=null))),pd(e,t),Je(t),null;case 5:np(t);var i=ai(Xo.current);if(n=t.type,e!==null&&t.stateNode!=null)Vx(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=ai(Pn.current),el(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<vo.length;i++)pe(vo[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":Jm(r,s),pe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},pe("invalid",r);break;case"textarea":tg(r,s),pe("invalid",r)}Bf(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&&Ja(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Ja(r.textContent,a,e),i=["children",""+a]):$o.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&pe("scroll",r)}switch(n){case"input":Wa(r),eg(r,s,!0);break;case"textarea":Wa(r),ng(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Yl)}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=m1(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,$x(e,t,!1,!1),t.stateNode=e;e:{switch(o=zf(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<vo.length;i++)pe(vo[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":Jm(e,r),i=Ff(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":tg(e,r),i=$f(e,r),pe("invalid",e);break;default:i=r}Bf(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?v1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&g1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Vo(e,l):typeof l=="number"&&Vo(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&($o.hasOwnProperty(s)?l!=null&&s==="onScroll"&&pe("scroll",e):l!=null&&Nh(e,s,l,o))}switch(n){case"input":Wa(e),eg(e,r,!1);break;case"textarea":Wa(e),ng(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?ms(e,!!r.multiple,s,!1):r.defaultValue!=null&&ms(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Yl)}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)Bx(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(A(166));if(n=ai(Xo.current),ai(Pn.current),el(t)){if(r=t.stateNode,n=t.memoizedProps,r[kn]=t,(s=r.nodeValue!==n)&&(e=Ft,e!==null))switch(e.tag){case 3:Ja(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ja(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))sx(),Ls(),t.flags|=98560,s=!1;else if(s=el(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 Ls(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Je(t),s=!1}else dn!==null&&(Sd(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):mp())),t.updateQueue!==null&&(t.flags|=4),Je(t),null);case 4:return $s(),pd(e,t),e===null&&qo(t.stateNode.containerInfo),Je(t),null;case 10:return Zh(t.type._context),Je(t),null;case 17:return Et(t.type)&&Xl(),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)uo(s,!1);else{if(Ie!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=iu(e),o!==null){for(t.flags|=128,uo(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()>Bs&&(t.flags|=128,r=!0,uo(s,!1),t.lanes=4194304)}else{if(!r)if(e=iu(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),uo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!ve)return Je(t),null}else 2*Ae()-s.renderingStartTime>Bs&&n!==1073741824&&(t.flags|=128,r=!0,uo(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 pp(),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 GC(e,t){switch(Gh(t),t.tag){case 1:return Et(t.type)&&Xl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $s(),ge(Tt),ge(st),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));Ls()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ge(we),null;case 4:return $s(),null;case 10:return Zh(t.type._context),null;case 22:case 23:return pp(),null;case 24:return null;default:return null}}var rl=!1,rt=!1,QC=typeof WeakSet=="function"?WeakSet:Set,F=null;function as(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 md(e,t,n){try{n()}catch(r){ke(e,t,r)}}var Wg=!1;function YC(e,t){if(Zf=ql,e=K1(),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,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(Jf={focusedElem:e,selectionRange:n},ql=!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 v=m.memoizedProps,b=m.memoizedState,p=t.stateNode,g=p.getSnapshotBeforeUpdate(t.elementType===t.type?v:ln(t.type,v),b);p.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.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=Wg,Wg=!1,m}function Ao(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&&md(t,n,s)}i=i.next}while(i!==r)}}function Fu(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 gd(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 zx(e){var t=e.alternate;t!==null&&(e.alternate=null,zx(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[nd],delete t[jC],delete t[NC])),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 Ux(e){return e.tag===5||e.tag===3||e.tag===4}function Kg(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ux(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 yd(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=Yl));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}function vd(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(vd(e,t,n),e=e.sibling;e!==null;)vd(e,t,n),e=e.sibling}var qe=null,cn=!1;function ar(e,t,n){for(n=n.child;n!==null;)Hx(e,t,n),n=n.sibling}function Hx(e,t,n){if(_n&&typeof _n.onCommitFiberUnmount=="function")try{_n.onCommitFiberUnmount(Pu,n)}catch{}switch(n.tag){case 5:rt||as(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?zc(e.parentNode,n):e.nodeType===1&&zc(e,n),Ho(e)):zc(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)&&md(n,t,o),i=i.next}while(i!==r)}ar(e,t,n);break;case 1:if(!rt&&(as(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 qg(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=sk.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));Hx(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;)Wx(t,e),t=t.sibling}function Wx(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{Ao(3,e,e.return),Fu(3,e)}catch(v){ke(e,e.return,v)}try{Ao(5,e,e.return)}catch(v){ke(e,e.return,v)}}break;case 1:sn(t,e),vn(e),r&512&&n!==null&&as(n,n.return);break;case 5:if(sn(t,e),vn(e),r&512&&n!==null&&as(n,n.return),e.flags&32){var i=e.stateNode;try{Vo(i,"")}catch(v){ke(e,e.return,v)}}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&&h1(i,s),zf(a,o);var u=zf(a,s);for(o=0;o<l.length;o+=2){var f=l[o],c=l[o+1];f==="style"?v1(i,c):f==="dangerouslySetInnerHTML"?g1(i,c):f==="children"?Vo(i,c):Nh(i,f,c,u)}switch(a){case"input":Lf(i,s);break;case"textarea":p1(i,s);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?ms(i,!!s.multiple,h,!1):d!==!!s.multiple&&(s.defaultValue!=null?ms(i,!!s.multiple,s.defaultValue,!0):ms(i,!!s.multiple,s.multiple?[]:"",!1))}i[Qo]=s}catch(v){ke(e,e.return,v)}}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(v){ke(e,e.return,v)}}break;case 3:if(sn(t,e),vn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ho(t.containerInfo)}catch(v){ke(e,e.return,v)}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||(dp=Ae())),r&4&&qg(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:Ao(4,d,d.return);break;case 1:as(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(v){ke(r,n,v)}}break;case 5:as(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=y1("display",o))}catch(v){ke(e,e.return,v)}}}else if(c.tag===6){if(f===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(v){ke(e,e.return,v)}}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&&qg(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(Ux(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&&(Vo(i,""),r.flags&=-33);var s=Kg(e);vd(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Kg(e);yd(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 XC(e,t,n){F=e,Kx(e)}function Kx(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||rl;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||rt;a=rl;var u=rt;if(rl=o,(rt=l)&&!u)for(F=i;F!==null;)o=F,l=o.child,o.tag===22&&o.memoizedState!==null?Yg(i):l!==null?(l.return=o,F=l):Yg(i);for(;s!==null;)F=s,Kx(s),s=s.sibling;F=i,rl=a,rt=u}Gg(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,F=s):Gg(e)}}function Gg(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||Fu(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&&jg(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}jg(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&&Ho(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(A(163))}rt||t.flags&512&&gd(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 Yg(e){for(;F!==null;){var t=F;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Fu(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{gd(t)}catch(l){ke(t,s,l)}break;case 5:var o=t.return;try{gd(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 ZC=Math.ceil,au=tr.ReactCurrentDispatcher,cp=tr.ReactCurrentOwner,Xt=tr.ReactCurrentBatchConfig,se=0,He=null,je=null,Qe=0,jt=0,ls=Kr(0),Ie=0,ta=null,Pi=0,Lu=0,fp=0,Ro=null,wt=null,dp=0,Bs=1/0,Vn=null,lu=!1,xd=null,Nr=null,il=!1,Cr=null,uu=0,Oo=0,wd=null,_l=-1,Pl=0;function ft(){return se&6?Ae():_l!==-1?_l:_l=Ae()}function Mr(e){return e.mode&1?se&2&&Qe!==0?Qe&-Qe:DC.transition!==null?(Pl===0&&(Pl=R1()),Pl):(e=le,e!==0||(e=window.event,e=e===void 0?16:L1(e.type)),e):1}function mn(e,t,n,r){if(50<Oo)throw Oo=0,wd=null,Error(A(185));ba(e,n,r),(!(se&2)||e!==He)&&(e===He&&(!(se&2)&&(Lu|=n),Ie===4&&pr(e,Qe)),Ct(e,r),n===1&&se===0&&!(t.mode&1)&&(Bs=Ae()+500,Nu&&qr()))}function Ct(e,t){var n=e.callbackNode;DE(e,t);var r=Kl(e,e===He?Qe:0);if(r===0)n!==null&&sg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&sg(n),t===1)e.tag===0?MC(Xg.bind(null,e)):nx(Xg.bind(null,e)),RC(function(){!(se&6)&&qr()}),n=null;else{switch(O1(r)){case 1:n=Ih;break;case 4:n=P1;break;case 16:n=Wl;break;case 536870912:n=A1;break;default:n=Wl}n=ew(n,qx.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function qx(e,t){if(_l=-1,Pl=0,se&6)throw Error(A(327));var n=e.callbackNode;if(ws()&&e.callbackNode!==n)return null;var r=Kl(e,e===He?Qe:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=cu(e,r);else{t=r;var i=se;se|=2;var s=Qx();(He!==e||Qe!==t)&&(Vn=null,Bs=Ae()+500,xi(e,t));do try{tk();break}catch(a){Gx(e,a)}while(!0);Xh(),au.current=s,se=i,je!==null?t=0:(He=null,Qe=0,t=Ie)}if(t!==0){if(t===2&&(i=qf(e),i!==0&&(r=i,t=bd(e,i))),t===1)throw n=ta,xi(e,0),pr(e,r),Ct(e,Ae()),n;if(t===6)pr(e,r);else{if(i=e.current.alternate,!(r&30)&&!JC(i)&&(t=cu(e,r),t===2&&(s=qf(e),s!==0&&(r=s,t=bd(e,s))),t===1))throw n=ta,xi(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=dp+500-Ae(),10<t)){if(Kl(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){ft(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=td(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*ZC(r/1960))-r,10<r){e.timeoutHandle=td(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?qx.bind(null,e):null}function bd(e,t){var n=Ro;return e.current.memoizedState.isDehydrated&&(xi(e,t).flags|=256),e=cu(e,t),e!==2&&(t=wt,wt=n,t!==null&&Sd(t)),e}function Sd(e){wt===null?wt=e:wt.push.apply(wt,e)}function JC(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&=~fp,t&=~Lu,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 Xg(e){if(se&6)throw Error(A(327));ws();var t=Kl(e,0);if(!(t&1))return Ct(e,Ae()),null;var n=cu(e,t);if(e.tag!==0&&n===2){var r=qf(e);r!==0&&(t=r,n=bd(e,r))}if(n===1)throw n=ta,xi(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 hp(e,t){var n=se;se|=1;try{return e(t)}finally{se=n,se===0&&(Bs=Ae()+500,Nu&&qr())}}function Ai(e){Cr!==null&&Cr.tag===0&&!(se&6)&&ws();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 pp(){jt=ls.current,ge(ls)}function xi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,AC(n)),je!==null)for(n=je.return;n!==null;){var r=n;switch(Gh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Xl();break;case 3:$s(),ge(Tt),ge(st),rp();break;case 5:np(r);break;case 4:$s();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(He=e,je=e=Dr(e.current,null),Qe=jt=t,Ie=0,ta=null,fp=Lu=Pi=0,wt=Ro=null,oi!==null){for(t=0;t<oi.length;t++)if(n=oi[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}oi=null}return e}function Gx(e,t){do{var n=je;try{if(Xh(),El.current=ou,su){for(var r=Se.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}su=!1}if(_i=0,Ue=Fe=Se=null,Po=!1,Zo=0,cp.current=null,n===null||n.return===null){Ie=1,ta=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=Ig(o);if(h!==null){h.flags&=-257,$g(h,o,a,s,t),h.mode&1&&Lg(s,u,t),t=h,l=u;var m=t.updateQueue;if(m===null){var v=new Set;v.add(l),t.updateQueue=v}else m.add(l);break e}else{if(!(t&1)){Lg(s,u,t),mp();break e}l=Error(A(426))}}else if(ve&&a.mode&1){var b=Ig(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),$g(b,o,a,s,t),Qh(Vs(l,a));break e}}s=l=Vs(l,a),Ie!==4&&(Ie=2),Ro===null?Ro=[s]:Ro.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var p=Ox(s,l,t);Og(s,p);break e;case 1:a=l;var g=s.type,x=s.stateNode;if(!(s.flags&128)&&(typeof g.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Nr===null||!Nr.has(x)))){s.flags|=65536,t&=-t,s.lanes|=t;var E=jx(s,a,t);Og(s,E);break e}}s=s.return}while(s!==null)}Xx(n)}catch(S){t=S,je===n&&n!==null&&(je=n=n.return);continue}break}while(!0)}function Qx(){var e=au.current;return au.current=ou,e===null?ou:e}function mp(){(Ie===0||Ie===3||Ie===2)&&(Ie=4),He===null||!(Pi&268435455)&&!(Lu&268435455)||pr(He,Qe)}function cu(e,t){var n=se;se|=2;var r=Qx();(He!==e||Qe!==t)&&(Vn=null,xi(e,t));do try{ek();break}catch(i){Gx(e,i)}while(!0);if(Xh(),se=n,au.current=r,je!==null)throw Error(A(261));return He=null,Qe=0,Ie}function ek(){for(;je!==null;)Yx(je)}function tk(){for(;je!==null&&!kE();)Yx(je)}function Yx(e){var t=Jx(e.alternate,e,jt);e.memoizedProps=e.pendingProps,t===null?Xx(e):je=t,cp.current=null}function Xx(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=GC(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=qC(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,nk(e,t,n,r)}finally{Xt.transition=i,le=r}return null}function nk(e,t,n,r){do ws();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(FE(e,s),e===He&&(je=He=null,Qe=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||il||(il=!0,ew(Wl,function(){return ws(),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,cp.current=null,YC(e,n),Wx(n,e),SC(Jf),ql=!!Zf,Jf=Zf=null,e.current=n,XC(n),_E(),se=a,le=o,Xt.transition=s}else e.current=n;if(il&&(il=!1,Cr=e,uu=i),s=e.pendingLanes,s===0&&(Nr=null),RE(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(lu)throw lu=!1,e=xd,xd=null,e;return uu&1&&e.tag!==0&&ws(),s=e.pendingLanes,s&1?e===wd?Oo++:(Oo=0,wd=e):Oo=0,qr(),null}function ws(){if(Cr!==null){var e=O1(uu),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,uu=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:Ao(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(zx(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 v=m.child;if(v!==null){m.child=null;do{var b=v.sibling;v.sibling=null,v=b}while(v!==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:Ao(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 x=o.child;if(o.subtreeFlags&2064&&x!==null)x.return=o,F=x;else e:for(o=g;F!==null;){if(a=F,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Fu(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(Pu,e)}catch{}r=!0}return r}finally{le=n,Xt.transition=t}}return!1}function Zg(e,t,n){t=Vs(n,t),t=Ox(e,t,1),e=jr(e,t,1),t=ft(),e!==null&&(ba(e,1,t),Ct(e,t))}function ke(e,t,n){if(e.tag===3)Zg(e,e,n);else for(;t!==null;){if(t.tag===3){Zg(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=Vs(n,e),e=jx(t,e,1),t=jr(t,e,1),e=ft(),t!==null&&(ba(t,1,e),Ct(t,e));break}}t=t.return}}function rk(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()-dp?xi(e,0):fp|=n),Ct(e,t)}function Zx(e,t){t===0&&(e.mode&1?(t=Ga,Ga<<=1,!(Ga&130023424)&&(Ga=4194304)):t=1);var n=ft();e=Zn(e,t),e!==null&&(ba(e,t,n),Ct(e,n))}function ik(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Zx(e,n)}function sk(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),Zx(e,n)}var Jx;Jx=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,KC(e,t,n);St=!!(e.flags&131072)}else St=!1,ve&&t.flags&1048576&&rx(t,eu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;kl(e,t),e=t.pendingProps;var i=Fs(t,st.current);xs(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,Et(r)?(s=!0,Zl(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ep(t),i.updater=Du,t.stateNode=i,i._reactInternals=t,ld(t,r,e,n),t=fd(null,t,r,!0,s,n)):(t.tag=0,ve&&s&&qh(t),lt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(kl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=ak(r),e=ln(r,e),i){case 0:t=cd(null,t,r,e,n);break e;case 1:t=zg(null,t,r,e,n);break e;case 11:t=Vg(null,t,r,e,n);break e;case 14:t=Bg(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),cd(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),zg(e,t,r,i,n);case 3:e:{if(Fx(t),e===null)throw Error(A(387));r=t.pendingProps,s=t.memoizedState,i=s.element,ux(e,t),ru(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=Vs(Error(A(423)),t),t=Ug(e,t,r,n,i);break e}else if(r!==i){i=Vs(Error(A(424)),t),t=Ug(e,t,r,n,i);break e}else for(Nt=Or(t.stateNode.containerInfo.firstChild),Ft=t,ve=!0,dn=null,n=ax(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ls(),r===i){t=Jn(e,t,n);break e}lt(e,t,r,n)}t=t.child}return t;case 5:return cx(t),e===null&&sd(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,ed(r,i)?o=null:s!==null&&ed(r,s)&&(t.flags|=32),Dx(e,t),lt(e,t,o,n),t.child;case 6:return e===null&&sd(t),null;case 13:return Lx(e,t,n);case 4:return tp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Is(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),Vg(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(tu,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),od(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),od(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,xs(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),Bg(e,t,r,i,n);case 15:return Nx(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),kl(e,t),t.tag=1,Et(r)?(e=!0,Zl(t)):e=!1,xs(t,n),Rx(t,r,i),ld(t,r,i,n),fd(null,t,r,!0,e,n);case 19:return Ix(e,t,n);case 22:return Mx(e,t,n)}throw Error(A(156,t.tag))};function ew(e,t){return _1(e,t)}function ok(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 ok(e,t,n,r)}function gp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ak(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=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 Al(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 Zi:return wi(n.children,i,s,t);case Mh:o=8,i|=8;break;case jf:return e=Yt(12,n,t,i|2),e.elementType=jf,e.lanes=s,e;case Nf:return e=Yt(13,n,t,i),e.elementType=Nf,e.lanes=s,e;case Mf:return e=Yt(19,n,t,i),e.elementType=Mf,e.lanes=s,e;case c1:return Iu(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case l1:o=10;break e;case u1: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=Yt(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function wi(e,t,n,r){return e=Yt(7,e,r,t),e.lanes=n,e}function Iu(e,t,n,r){return e=Yt(22,e,r,t),e.elementType=c1,e.lanes=n,e.stateNode={isHidden:!1},e}function Yc(e,t,n){return e=Yt(6,e,null,t),e.lanes=n,e}function Xc(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 lk(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 lk(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},ep(s),e}function uk(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Xi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function tw(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 tx(e,n,t)}return t}function nw(e,t,n,r,i,s,o,a,l){return e=yp(n,r,!0,e,i,s,o,a,l),e.context=tw(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,ba(e,i,r),Ct(e,r),e}function $u(e,t,n,r){var i=t.current,s=ft(),o=Mr(i);return n=tw(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),Tl(e,i,o)),o}function fu(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 Jg(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){Jg(e,t),(e=e.alternate)&&Jg(e,t)}function ck(){return null}var rw=typeof reportError=="function"?reportError:function(e){console.error(e)};function xp(e){this._internalRoot=e}Vu.prototype.render=xp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(A(409));$u(e,t,null,null)};Vu.prototype.unmount=xp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ai(function(){$u(null,e,null,null)}),t[Xn]=null}};function Vu(e){this._internalRoot=e}Vu.prototype.unstable_scheduleHydration=function(e){if(e){var t=M1();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&&F1(e)}};function wp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Bu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function e0(){}function fk(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=fu(o);s.call(u)}}var o=nw(t,r,e,0,null,!1,!1,"",e0);return e._reactRootContainer=o,e[Xn]=o.current,qo(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=fu(l);a.call(u)}}var l=yp(e,0,!1,null,null,!1,!1,"",e0);return e._reactRootContainer=l,e[Xn]=l.current,qo(e.nodeType===8?e.parentNode:e),Ai(function(){$u(t,l,n,r)}),l}function zu(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=fu(o);a.call(l)}}$u(t,o,e,i)}else o=fk(n,t,e,i,r);return fu(o)}j1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=yo(t.pendingLanes);n!==0&&($h(t,n|1),Ct(t,Ae()),!(se&6)&&(Bs=Ae()+500,qr()))}break;case 13:Ai(function(){var r=Zn(e,1);if(r!==null){var i=ft();mn(r,e,1,i)}}),vp(e,1)}};Vh=function(e){if(e.tag===13){var t=Zn(e,134217728);if(t!==null){var n=ft();mn(t,e,134217728,n)}vp(e,134217728)}};N1=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)}vp(e,t)}};M1=function(){return le};D1=function(e,t){var n=le;try{return le=e,t()}finally{le=n}};Hf=function(e,t,n){switch(t){case"input":if(Lf(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=ju(r);if(!i)throw Error(A(90));d1(r),Lf(r,i)}}}break;case"textarea":p1(e,n);break;case"select":t=n.value,t!=null&&ms(e,!!n.multiple,t,!1)}};b1=hp;S1=Ai;var dk={usingClientEntryPoint:!1,Events:[Ta,ns,ju,x1,w1,hp]},co={findFiberByHostInstance:si,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},hk={bundleType:co.bundleType,version:co.version,rendererPackageName:co.rendererPackageName,rendererConfig:co.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=C1(e),e===null?null:e.stateNode},findFiberByHostInstance:co.findFiberByHostInstance||ck,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 sl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sl.isDisabled&&sl.supportsFiber)try{Pu=sl.inject(hk),_n=sl}catch{}}It.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=dk;It.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!wp(t))throw Error(A(200));return uk(e,t,null,n)};It.createRoot=function(e,t){if(!wp(e))throw Error(A(299));var n=!1,r="",i=rw;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[Xn]=t.current,qo(e.nodeType===8?e.parentNode:e),new xp(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=C1(t),e=e===null?null:e.stateNode,e};It.flushSync=function(e){return Ai(e)};It.hydrate=function(e,t,n){if(!Bu(t))throw Error(A(200));return zu(null,e,t,!0,n)};It.hydrateRoot=function(e,t,n){if(!wp(e))throw Error(A(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=rw;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=nw(t,null,e,1,n??null,i,!1,s,o),e[Xn]=t.current,qo(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 Vu(t)};It.render=function(e,t,n){if(!Bu(t))throw Error(A(200));return zu(null,e,t,!1,n)};It.unmountComponentAtNode=function(e){if(!Bu(e))throw Error(A(40));return e._reactRootContainer?(Ai(function(){zu(null,null,e,!1,function(){e._reactRootContainer=null,e[Xn]=null})}),!0):!1};It.unstable_batchedUpdates=hp;It.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Bu(n))throw Error(A(200));if(e==null||e._reactInternals===void 0)throw Error(A(38));return zu(e,t,n,!1,r)};It.version="18.3.1-next-f1338f8080-20240426";function iw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(iw)}catch(e){console.error(e)}}iw(),i1.exports=It;var sw=i1.exports;const pk=Ks(sw);var ow,t0=sw;ow=t0.createRoot,t0.hydrateRoot;const mk="@alfatech/livechat",gk="v2025.05.17.2",yk="module",vk="https://api-live.alfatek.dev",xk="wss://api-live.alfatek.dev",wk=["dist","README.md"],bk="dist/widget.js",Sk={dev:"vite",build:"tsc -b && vite build",lint:"biome lint --write",prepare:"husky",format:"biome format --write && yarn lint"},Tk={"@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"},Ek={"@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"},aw={name:mk,private:!1,version:gk,type:yk,apiURL:vk,wsURL:xk,files:wk,main:bk,scripts:Sk,dependencies:Tk,devDependencies:Ek,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},Ck=aw.apiURL,kk=aw.wsURL,_k=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],Pk=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],Ak={429:_k,404:Pk};async function Ca(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=await fetch(`${Ck}/${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=Ak[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 Ys=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 Rk(e,t){return typeof e=="function"?e(t):e}function Td(e){return typeof e=="number"&&e>=0&&e!==1/0}function lw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function bs(e,t){return typeof e=="function"?e(t):e}function hn(e,t){return typeof e=="function"?e(t):e}function n0(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(!na(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 r0(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(!na(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)=>Ed(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function na(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!na(e[n],t[n])):!1}function uw(e,t){if(e===t)return e;const n=i0(e)&&i0(t);if(n||Ed(e)&&Ed(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]=uw(e[f],t[f]),a[f]===e[f]&&e[f]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function du(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 i0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ed(e){if(!s0(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!s0(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function s0(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ok(e){return new Promise(t=>{setTimeout(t,e)})}function Cd(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?uw(e,t):t}function jk(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Nk(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Tp=Symbol();function cw(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 di,mr,Ss,Lv,Mk=(Lv=class extends Ys{constructor(){super();U(this,di);U(this,mr);U(this,Ss);D(this,Ss,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,Ss))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,mr))==null||t.call(this),D(this,mr,void 0))}setEventListener(t){var n;D(this,Ss,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,di)!==t&&(D(this,di,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof T(this,di)=="boolean"?T(this,di):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},di=new WeakMap,mr=new WeakMap,Ss=new WeakMap,Lv),Ep=new Mk,Ts,gr,Es,Iv,Dk=(Iv=class extends Ys{constructor(){super();U(this,Ts,!0);U(this,gr);U(this,Es);D(this,Es,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,Es))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,gr))==null||t.call(this),D(this,gr,void 0))}setEventListener(t){var n;D(this,Es,t),(n=T(this,gr))==null||n.call(this),D(this,gr,t(this.setOnline.bind(this)))}setOnline(t){T(this,Ts)!==t&&(D(this,Ts,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return T(this,Ts)}},Ts=new WeakMap,gr=new WeakMap,Es=new WeakMap,Iv),hu=new Dk;function kd(){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 Fk(e){return Math.min(1e3*2**e,3e4)}function fw(e){return(e??"online")==="online"?hu.isOnline():!0}var dw=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 dw}function hw(e){let t=!1,n=0,r=!1,i;const s=kd(),o=v=>{var b;r||(d(new dw(v)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>Ep.isFocused()&&(e.networkMode==="always"||hu.isOnline())&&e.canRun(),f=()=>fw(e.networkMode)&&e.canRun(),c=v=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,v),i==null||i(),s.resolve(v))},d=v=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,v),i==null||i(),s.reject(v))},h=()=>new Promise(v=>{var b;i=p=>{(r||u())&&v(p)},(b=e.onPause)==null||b.call(e)}).then(()=>{var v;i=void 0,r||(v=e.onContinue)==null||v.call(e)}),m=()=>{if(r)return;let v;const b=n===0?e.initialPromise:void 0;try{v=b??e.fn()}catch(p){v=Promise.reject(p)}Promise.resolve(v).then(c).catch(p=>{var C;if(r)return;const g=e.retry??(Ri?0:3),x=e.retryDelay??Fk,E=typeof x=="function"?x(n,p):x,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),Ok(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 Lk(){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=Lk(),hi,$v,pw=($v=class{constructor(){U(this,hi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Td(this.gcTime)&&D(this,hi,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ri?1/0:5*60*1e3))}clearGcTimeout(){T(this,hi)&&(clearTimeout(T(this,hi)),D(this,hi,void 0))}},hi=new WeakMap,$v),Cs,ks,Wt,tt,ga,pi,un,$n,Vv,Ik=(Vv=class extends pw{constructor(t){super();U(this,un);U(this,Cs);U(this,ks);U(this,Wt);U(this,tt);U(this,ga);U(this,pi);D(this,pi,!1),D(this,ga,t.defaultOptions),this.setOptions(t.options),this.observers=[],D(this,Wt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,D(this,Cs,$k(this.options)),this.state=t.state??T(this,Cs),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,ga),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,Wt).remove(this)}setData(t,n){const r=Cd(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,Cs))}isActive(){return this.observers.some(t=>hn(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||!lw(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,pi)?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,pi,!0),r.signal)})},s=()=>{const c=cw(this.options,n),d={queryKey:this.queryKey,meta:this.meta};return i(d),D(this,pi,!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,ks,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,v;Zc(c)&&c.silent||X(this,un,$n).call(this,{type:"error",error:c}),Zc(c)||((h=(d=T(this,Wt).config).onError)==null||h.call(d,c,this),(v=(m=T(this,Wt).config).onSettled)==null||v.call(m,this.state.data,c,this)),this.scheduleGc()};return D(this,tt,hw({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:c=>{var d,h,m,v;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),(v=(m=T(this,Wt).config).onSettled)==null||v.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()}},Cs=new WeakMap,ks=new WeakMap,Wt=new WeakMap,tt=new WeakMap,ga=new WeakMap,pi=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,...mw(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,ks)?{...T(this,ks),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})})},Vv);function mw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:fw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function $k(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,Bv,Vk=(Bv=class extends Ys{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??Sp(i,n);let o=this.get(s);return o||(o=new Ik({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=>n0(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>n0(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,Bv),Tn,ot,mi,En,lr,zv,Bk=(zv=class extends pw{constructor(t){super();U(this,En);U(this,Tn);U(this,ot);U(this,mi);this.mutationId=t.mutationId,D(this,ot,t.mutationCache),D(this,Tn,[]),this.state=t.state||gw(),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,mi))==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,v,b,p,g,x,E,S,C,k;D(this,mi,hw({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,mi).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,mi).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((v=(m=this.options).onSettled)==null?void 0:v.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((x=(g=this.options).onError)==null?void 0:x.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,mi=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})})},zv);function gw(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ot,ya,Uv,zk=(Uv=class extends Ys{constructor(t={}){super();U(this,Ot);U(this,ya);this.config=t,D(this,Ot,new Map),D(this,ya,Date.now())}build(t,n,r){const i=new Bk({mutationCache:this,mutationId:++za(this,ya)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=ol(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=ol(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(ol(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(ol(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=>r0(n,r))}findAll(t={}){return this.getAll().filter(n=>r0(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,ya=new WeakMap,Uv);function ol(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function o0(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 v=!1;const b=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?v=!0:t.signal.addEventListener("abort",()=>{v=!0}),t.signal)})},p=cw(t.options,t.fetchOptions),g=async(x,E,S)=>{if(v)return Promise.reject();if(E==null&&x.pages.length)return Promise.resolve(x);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?Nk:jk;return{pages:j(x.pages,k,P),pageParams:j(x.pageParams,E,P)}};if(i&&s.length){const x=i==="backward",E=x?Uk:a0,S={pages:s,pageParams:o},C=E(r,S);a=await g(S,C,x)}else{const x=e??s.length;do{const E=l===0?o[0]??r.initialPageParam:a0(r,a);if(l>0&&E==null)break;a=await g(a,E),l++}while(l<x)}return a};t.options.persister?t.fetchFn=()=>{var v,b;return(b=(v=t.options).persister)==null?void 0:b.call(v,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function a0(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 Uk(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,_s,Ps,xr,As,Rs,Hv,Hk=(Hv=class{constructor(e={}){U(this,Ee);U(this,yr);U(this,vr);U(this,_s);U(this,Ps);U(this,xr);U(this,As);U(this,Rs);D(this,Ee,e.queryCache||new Vk),D(this,yr,e.mutationCache||new zk),D(this,vr,e.defaultOptions||{}),D(this,_s,new Map),D(this,Ps,new Map),D(this,xr,0)}mount(){za(this,xr)._++,T(this,xr)===1&&(D(this,As,Ep.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Ee).onFocus())})),D(this,Rs,hu.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Ee).onOnline())})))}unmount(){var e,t;za(this,xr)._--,T(this,xr)===0&&((e=T(this,As))==null||e.call(this),D(this,As,void 0),(t=T(this,Rs))==null||t.call(this),D(this,Rs,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(bs(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=Rk(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(bs(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=o0(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Kt).catch(Kt)}ensureInfiniteQueryData(e){return e.behavior=o0(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return hu.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,_s).set(Oi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...T(this,_s).values()],n={};return t.forEach(r=>{na(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){T(this,Ps).set(Oi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...T(this,Ps).values()];let n={};return t.forEach(r=>{na(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,_s=new WeakMap,Ps=new WeakMap,xr=new WeakMap,As=new WeakMap,Rs=new WeakMap,Hv),yt,ee,va,at,gi,Os,wr,Cn,xa,js,Ns,yi,vi,br,Ms,ae,xo,_d,Pd,Ad,Rd,Od,jd,Nd,yw,Wv,Wk=(Wv=class extends Ys{constructor(t,n){super();U(this,ae);U(this,yt);U(this,ee);U(this,va);U(this,at);U(this,gi);U(this,Os);U(this,wr);U(this,Cn);U(this,xa);U(this,js);U(this,Ns);U(this,yi);U(this,vi);U(this,br);U(this,Ms,new Set);this.options=n,D(this,yt,t),D(this,Cn,null),D(this,wr,kd()),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),l0(T(this,ee),this.options)?X(this,ae,xo).call(this):this.updateResult(),X(this,ae,Rd).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,Od).call(this),X(this,ae,jd).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,Nd).call(this),T(this,ee).setOptions(this.options),r._defaulted&&!du(this.options,r)&&T(this,yt).getQueryCache().notify({type:"observerOptionsUpdated",query:T(this,ee),observer:this});const s=this.hasListeners();s&&u0(T(this,ee),i,this.options,r)&&X(this,ae,xo).call(this),this.updateResult(n),s&&(T(this,ee)!==i||hn(this.options.enabled,T(this,ee))!==hn(r.enabled,T(this,ee))||bs(this.options.staleTime,T(this,ee))!==bs(r.staleTime,T(this,ee)))&&X(this,ae,_d).call(this);const o=X(this,ae,Pd).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,Ad).call(this,o)}getOptimisticResult(t){const n=T(this,yt).getQueryCache().build(T(this,yt),t),r=this.createResult(n,t);return qk(this,r)&&(D(this,at,r),D(this,Os,this.options),D(this,gi,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,Ms).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,xo).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,gi),a=T(this,Os),u=t!==r?t.state:T(this,va),{state:f}=t;let c={...f},d=!1,h;if(n._optimisticResults){const j=this.hasListeners(),N=!j&&l0(t,n),I=j&&u0(t,r,n,i);(N||I)&&(c={...c,...mw(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:m,errorUpdatedAt:v,status:b}=c;if(n.select&&c.data!==void 0)if(s&&c.data===(o==null?void 0:o.data)&&n.select===T(this,xa))h=T(this,js);else try{D(this,xa,n.select),h=n.select(c.data),h=Cd(s==null?void 0:s.data,h,n),D(this,js,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,Ns))==null?void 0:P.state.data,T(this,Ns)):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=Cd(s==null?void 0:s.data,j,n),d=!0)}T(this,Cn)&&(m=T(this,Cn),h=T(this,js),v=Date.now(),b="error");const p=c.fetchStatus==="fetching",g=b==="pending",x=b==="error",E=g&&p,S=h!==void 0,k={status:b,fetchStatus:c.fetchStatus,isPending:g,isSuccess:b==="success",isError:x,isInitialLoading:E,isLoading:E,data:h,dataUpdatedAt:c.dataUpdatedAt,error:m,errorUpdatedAt:v,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:x&&!S,isPaused:c.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:x&&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)},N=()=>{const re=D(this,wr,k.promise=kd());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,gi,T(this,ee).state),D(this,Os,this.options),T(this,gi).data!==void 0&&D(this,Ns,T(this,ee)),du(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,Ms).size)return!0;const l=new Set(a??T(this,Ms));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,yw).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&X(this,ae,Rd).call(this)}},yt=new WeakMap,ee=new WeakMap,va=new WeakMap,at=new WeakMap,gi=new WeakMap,Os=new WeakMap,wr=new WeakMap,Cn=new WeakMap,xa=new WeakMap,js=new WeakMap,Ns=new WeakMap,yi=new WeakMap,vi=new WeakMap,br=new WeakMap,Ms=new WeakMap,ae=new WeakSet,xo=function(t){X(this,ae,Nd).call(this);let n=T(this,ee).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Kt)),n},_d=function(){X(this,ae,Od).call(this);const t=bs(this.options.staleTime,T(this,ee));if(Ri||T(this,at).isStale||!Td(t))return;const r=lw(T(this,at).dataUpdatedAt,t)+1;D(this,yi,setTimeout(()=>{T(this,at).isStale||this.updateResult()},r))},Pd=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(T(this,ee)):this.options.refetchInterval)??!1},Ad=function(t){X(this,ae,jd).call(this),D(this,br,t),!(Ri||hn(this.options.enabled,T(this,ee))===!1||!Td(T(this,br))||T(this,br)===0)&&D(this,vi,setInterval(()=>{(this.options.refetchIntervalInBackground||Ep.isFocused())&&X(this,ae,xo).call(this)},T(this,br)))},Rd=function(){X(this,ae,_d).call(this),X(this,ae,Ad).call(this,X(this,ae,Pd).call(this))},Od=function(){T(this,yi)&&(clearTimeout(T(this,yi)),D(this,yi,void 0))},jd=function(){T(this,vi)&&(clearInterval(T(this,vi)),D(this,vi,void 0))},Nd=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,va,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},yw=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"})})},Wv);function Kk(e,t){return hn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function l0(e,t){return Kk(e,t)||e.state.data!==void 0&&Md(e,t,t.refetchOnMount)}function Md(e,t,n){if(hn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Cp(e,t)}return!1}function u0(e,t,n,r){return(e!==t||hn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Cp(e,n)}function Cp(e,t){return hn(t.enabled,e)!==!1&&e.isStaleByTime(bs(t.staleTime,e))}function qk(e,t){return!du(e.getCurrentResult(),t)}var Sr,Tr,vt,Un,Qn,Rl,Dd,Kv,Gk=(Kv=class extends Ys{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,Rl).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),du(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,Rl).call(this),X(this,Qn,Dd).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,Rl).call(this),X(this,Qn,Dd).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,Rl=function(){var n;const t=((n=T(this,vt))==null?void 0:n.state)??gw();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})},Dd=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))})})},Kv),vw=y.createContext(void 0),xw=e=>{const t=y.useContext(vw);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(vw.Provider,{value:e,children:t})),ww=y.createContext(!1),Yk=()=>y.useContext(ww);ww.Provider;function Xk(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Zk=y.createContext(Xk()),Jk=()=>y.useContext(Zk);function bw(e,t){return typeof e=="function"?e(...t):!!e}function Fd(){}var e_=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},t_=e=>{y.useEffect(()=>{e.clearReset()},[e])},n_=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&bw(n,[e.error,r]),r_=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},i_=(e,t)=>e.isLoading&&e.isFetching&&!t,s_=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,c0=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function o_(e,t,n){var f,c,d,h,m;const r=xw(),i=Yk(),s=Jk(),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",r_(o),e_(o,s),t_(s);const a=!r.getQueryCache().get(o.queryHash),[l]=y.useState(()=>new t(r,o)),u=l.getOptimisticResult(o);if(y.useSyncExternalStore(y.useCallback(v=>{const b=i?Fd:l.subscribe(Le.batchCalls(v));return l.updateResult(),b},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),y.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),s_(o,u))throw c0(o,l,s);if(n_({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&&i_(u,i)){const v=a?c0(o,l,s):(m=r.getQueryCache().get(o.queryHash))==null?void 0:m.promise;v==null||v.catch(Fd).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?u:l.trackResult(u)}function a_(e,t){return o_(e,Wk)}function Sw(e,t){const n=xw(),[r]=y.useState(()=>new Gk(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(Fd)},[r]);if(i.error&&bw(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const l_=e=>a_({queryKey:["widgets",e],queryFn:()=>u_(e)}),u_=e=>Ca(`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 c_(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 ud(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var UC=typeof WeakMap=="function"?WeakMap:Map;function Ox(e,t,n){n=Gn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){uu||(uu=!0,xd=r),ud(e,t)},n}function jx(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(){ud(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){ud(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 Lg(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new UC;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=rk.bind(null,e,t,n),t.then(e,e))}function Ig(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 $g(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,Nr(n,t,1))),n.lanes|=1),e)}var HC=nr.ReactCurrentOwner,St=!1;function lt(e,t,n,r){t.child=e===null?ax(t,null,n,r):$s(t,e.child,n,r)}function Vg(e,t,n,r,i){n=n.render;var s=t.ref;return xs(t,i),r=sp(e,t,n,r,s,i),n=op(),e!==null&&!St?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,er(e,t,i)):(ve&&n&&qh(t),t.flags|=1,lt(e,t,r,i),t.child)}function Bg(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,Nx(e,t,s,r,i)):(e=Rl(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:qo,n(o,r)&&e.ref===t.ref)return er(e,t,i)}return t.flags|=1,e=Fr(s,r),e.ref=t.ref,e.return=t,t.child=e}function Nx(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(qo(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,er(e,t,i)}return cd(e,t,n,r,i)}function Mx(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(ls,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(ls,jt),jt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,de(ls,jt),jt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,de(ls,jt),jt|=r;return lt(e,t,i,n),t.child}function Dx(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function cd(e,t,n,r,i){var s=Et(n)?Ci:st.current;return s=Ls(t,s),xs(t,i),n=sp(e,t,n,r,s,i),r=op(),e!==null&&!St?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,er(e,t,i)):(ve&&r&&qh(t),t.flags|=1,lt(e,t,n,i),t.child)}function zg(e,t,n,r,i){if(Et(n)){var s=!0;Jl(t)}else s=!1;if(xs(t,i),t.stateNode===null)_l(e,t),Rx(t,n,r),ld(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=Ls(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)&&Fg(t,o,r,u),dr=!1;var d=t.memoizedState;o.state=d,iu(t,r,o,i),l=t.memoizedState,a!==r||d!==l||Tt.current||dr?(typeof f=="function"&&(ad(t,n,f,r),l=t.memoizedState),(a=dr||Dg(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,ux(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=Ls(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)&&Fg(t,o,r,l),dr=!1,d=t.memoizedState,o.state=d,iu(t,r,o,i);var m=t.memoizedState;a!==c||d!==m||Tt.current||dr?(typeof h=="function"&&(ad(t,n,h,r),m=t.memoizedState),(u=dr||Dg(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 fd(e,t,n,r,s,i)}function fd(e,t,n,r,i,s){Dx(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&_g(t,n,!1),er(e,t,s);r=t.stateNode,HC.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=$s(t,e.child,null,s),t.child=$s(t,null,a,s)):lt(e,t,a,s),t.memoizedState=r.state,i&&_g(t,n,!0),t.child}function Fx(e){var t=e.stateNode;t.pendingContext?kg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&kg(e,t.context,!1),tp(e,t.containerInfo)}function Ug(e,t,n,r,i){return Is(),Qh(i),t.flags|=256,lt(e,t,n,r),t.child}var dd={dehydrated:null,treeContext:null,retryLane:0};function hd(e){return{baseLanes:e,cachePool:null,transitions:null}}function Lx(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 sd(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=$u(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=hd(n),t.memoizedState=dd,e):up(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return WC(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=Fr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Fr(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?hd(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=dd,r}return s=e.child,e=s.sibling,r=Fr(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=$u({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function rl(e,t,n,r){return r!==null&&Qh(r),$s(t,e.child,null,n),e=up(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function WC(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=Qc(Error(A(422))),rl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=$u({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&&$s(t,e.child,null,o),t.child.memoizedState=hd(o),t.memoizedState=dd,s);if(!(t.mode&1))return rl(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),rl(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,Jn(e,i),mn(r,e,i,-1))}return mp(),r=Qc(Error(A(421))),rl(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=ik.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Nt=jr(i.nextSibling),Ft=t,ve=!0,dn=null,e!==null&&(qt[Gt++]=Wn,qt[Gt++]=Kn,qt[Gt++]=ki,Wn=e.id,Kn=e.overflow,ki=t),t=up(t,r.children),t.flags|=4096,t)}function Hg(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),od(e.return,t,n)}function Yc(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 Ix(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&&Hg(e,n,t);else if(e.tag===19)Hg(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&&su(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Yc(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&&su(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Yc(t,!0,n,null,s);break;case"together":Yc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function _l(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=Fr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Fr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function KC(e,t,n){switch(t.tag){case 3:Fx(t),Is();break;case 5:cx(t);break;case 1:Et(t.type)&&Jl(t);break;case 4:tp(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;de(nu,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?Lx(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 Ix(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,Mx(e,t,n)}return er(e,t,n)}var $x,pd,Vx,Bx;$x=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}};pd=function(){};Vx=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=Ff(e,i),r=Ff(e,r),s=[];break;case"select":i=Te({},i,{value:void 0}),r=Te({},r,{value:void 0}),s=[];break;case"textarea":i=$f(e,i),r=$f(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Xl)}Bf(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"&&(Vo.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"&&(Vo.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)}};Bx=function(e,t,n,r){n!==r&&(t.flags|=4)};function co(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 qC(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 Je(t),null;case 1:return Et(t.type)&&Zl(),Je(t),null;case 3:return r=t.stateNode,Vs(),ge(Tt),ge(st),rp(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(tl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,dn!==null&&(Sd(dn),dn=null))),pd(e,t),Je(t),null;case 5:np(t);var i=li(Zo.current);if(n=t.type,e!==null&&t.stateNode!=null)Vx(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),tl(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[kn]=t,r[Yo]=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<xo.length;i++)pe(xo[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":Jm(r,s),pe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},pe("invalid",r);break;case"textarea":tg(r,s),pe("invalid",r)}Bf(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&&el(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&el(r.textContent,a,e),i=["children",""+a]):Vo.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&pe("scroll",r)}switch(n){case"input":Ka(r),eg(r,s,!0);break;case"textarea":Ka(r),ng(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Xl)}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=m1(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[Yo]=r,$x(e,t,!1,!1),t.stateNode=e;e:{switch(o=zf(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<xo.length;i++)pe(xo[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":Jm(e,r),i=Ff(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":tg(e,r),i=$f(e,r),pe("invalid",e);break;default:i=r}Bf(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?v1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&g1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Bo(e,l):typeof l=="number"&&Bo(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Vo.hasOwnProperty(s)?l!=null&&s==="onScroll"&&pe("scroll",e):l!=null&&Nh(e,s,l,o))}switch(n){case"input":Ka(e),eg(e,r,!1);break;case"textarea":Ka(e),ng(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Br(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?ms(e,!!r.multiple,s,!1):r.defaultValue!=null&&ms(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Xl)}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)Bx(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(A(166));if(n=li(Zo.current),li(Pn.current),tl(t)){if(r=t.stateNode,n=t.memoizedProps,r[kn]=t,(s=r.nodeValue!==n)&&(e=Ft,e!==null))switch(e.tag){case 3:el(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&el(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))sx(),Is(),t.flags|=98560,s=!1;else if(s=tl(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 Is(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Je(t),s=!1}else dn!==null&&(Sd(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):mp())),t.updateQueue!==null&&(t.flags|=4),Je(t),null);case 4:return Vs(),pd(e,t),e===null&&Go(t.stateNode.containerInfo),Je(t),null;case 10:return Zh(t.type._context),Je(t),null;case 17:return Et(t.type)&&Zl(),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)co(s,!1);else{if(Ie!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=su(e),o!==null){for(t.flags|=128,co(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()>zs&&(t.flags|=128,r=!0,co(s,!1),t.lanes=4194304)}else{if(!r)if(e=su(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),co(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!ve)return Je(t),null}else 2*Ae()-s.renderingStartTime>zs&&n!==1073741824&&(t.flags|=128,r=!0,co(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 pp(),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 GC(e,t){switch(Gh(t),t.tag){case 1:return Et(t.type)&&Zl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vs(),ge(Tt),ge(st),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));Is()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ge(we),null;case 4:return Vs(),null;case 10:return Zh(t.type._context),null;case 22:case 23:return pp(),null;case 24:return null;default:return null}}var il=!1,rt=!1,QC=typeof WeakSet=="function"?WeakSet:Set,F=null;function as(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 md(e,t,n){try{n()}catch(r){ke(e,t,r)}}var Wg=!1;function YC(e,t){if(Zf=Gl,e=K1(),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,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(Jf={focusedElem:e,selectionRange:n},Gl=!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 v=m.memoizedProps,b=m.memoizedState,p=t.stateNode,g=p.getSnapshotBeforeUpdate(t.elementType===t.type?v:ln(t.type,v),b);p.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.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=Wg,Wg=!1,m}function Ro(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&&md(t,n,s)}i=i.next}while(i!==r)}}function Lu(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 gd(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 zx(e){var t=e.alternate;t!==null&&(e.alternate=null,zx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[kn],delete t[Yo],delete t[nd],delete t[jC],delete t[NC])),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 Ux(e){return e.tag===5||e.tag===3||e.tag===4}function Kg(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ux(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 yd(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=Xl));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}function vd(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(vd(e,t,n),e=e.sibling;e!==null;)vd(e,t,n),e=e.sibling}var qe=null,cn=!1;function lr(e,t,n){for(n=n.child;n!==null;)Hx(e,t,n),n=n.sibling}function Hx(e,t,n){if(_n&&typeof _n.onCommitFiberUnmount=="function")try{_n.onCommitFiberUnmount(Au,n)}catch{}switch(n.tag){case 5:rt||as(n,t);case 6:var r=qe,i=cn;qe=null,lr(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?Uc(e.parentNode,n):e.nodeType===1&&Uc(e,n),Wo(e)):Uc(qe,n.stateNode));break;case 4:r=qe,i=cn,qe=n.stateNode.containerInfo,cn=!0,lr(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)&&md(n,t,o),i=i.next}while(i!==r)}lr(e,t,n);break;case 1:if(!rt&&(as(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)}lr(e,t,n);break;case 21:lr(e,t,n);break;case 22:n.mode&1?(rt=(r=rt)||n.memoizedState!==null,lr(e,t,n),rt=r):lr(e,t,n);break;default:lr(e,t,n)}}function qg(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=sk.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));Hx(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;)Wx(t,e),t=t.sibling}function Wx(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{Ro(3,e,e.return),Lu(3,e)}catch(v){ke(e,e.return,v)}try{Ro(5,e,e.return)}catch(v){ke(e,e.return,v)}}break;case 1:sn(t,e),vn(e),r&512&&n!==null&&as(n,n.return);break;case 5:if(sn(t,e),vn(e),r&512&&n!==null&&as(n,n.return),e.flags&32){var i=e.stateNode;try{Bo(i,"")}catch(v){ke(e,e.return,v)}}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&&h1(i,s),zf(a,o);var u=zf(a,s);for(o=0;o<l.length;o+=2){var f=l[o],c=l[o+1];f==="style"?v1(i,c):f==="dangerouslySetInnerHTML"?g1(i,c):f==="children"?Bo(i,c):Nh(i,f,c,u)}switch(a){case"input":Lf(i,s);break;case"textarea":p1(i,s);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?ms(i,!!s.multiple,h,!1):d!==!!s.multiple&&(s.defaultValue!=null?ms(i,!!s.multiple,s.defaultValue,!0):ms(i,!!s.multiple,s.multiple?[]:"",!1))}i[Yo]=s}catch(v){ke(e,e.return,v)}}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(v){ke(e,e.return,v)}}break;case 3:if(sn(t,e),vn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Wo(t.containerInfo)}catch(v){ke(e,e.return,v)}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||(dp=Ae())),r&4&&qg(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:Ro(4,d,d.return);break;case 1:as(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(v){ke(r,n,v)}}break;case 5:as(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=y1("display",o))}catch(v){ke(e,e.return,v)}}}else if(c.tag===6){if(f===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(v){ke(e,e.return,v)}}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&&qg(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(Ux(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&&(Bo(i,""),r.flags&=-33);var s=Kg(e);vd(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Kg(e);yd(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 XC(e,t,n){F=e,Kx(e)}function Kx(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||il;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||rt;a=il;var u=rt;if(il=o,(rt=l)&&!u)for(F=i;F!==null;)o=F,l=o.child,o.tag===22&&o.memoizedState!==null?Yg(i):l!==null?(l.return=o,F=l):Yg(i);for(;s!==null;)F=s,Kx(s),s=s.sibling;F=i,il=a,rt=u}Gg(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,F=s):Gg(e)}}function Gg(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||Lu(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&&jg(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}jg(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&&Wo(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(A(163))}rt||t.flags&512&&gd(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 Yg(e){for(;F!==null;){var t=F;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Lu(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{gd(t)}catch(l){ke(t,s,l)}break;case 5:var o=t.return;try{gd(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 ZC=Math.ceil,lu=nr.ReactCurrentDispatcher,cp=nr.ReactCurrentOwner,Xt=nr.ReactCurrentBatchConfig,se=0,He=null,je=null,Qe=0,jt=0,ls=qr(0),Ie=0,na=null,Pi=0,Iu=0,fp=0,Oo=null,wt=null,dp=0,zs=1/0,Bn=null,uu=!1,xd=null,Mr=null,sl=!1,kr=null,cu=0,jo=0,wd=null,Pl=-1,Al=0;function ft(){return se&6?Ae():Pl!==-1?Pl:Pl=Ae()}function Dr(e){return e.mode&1?se&2&&Qe!==0?Qe&-Qe:DC.transition!==null?(Al===0&&(Al=R1()),Al):(e=le,e!==0||(e=window.event,e=e===void 0?16:L1(e.type)),e):1}function mn(e,t,n,r){if(50<jo)throw jo=0,wd=null,Error(A(185));Sa(e,n,r),(!(se&2)||e!==He)&&(e===He&&(!(se&2)&&(Iu|=n),Ie===4&&mr(e,Qe)),Ct(e,r),n===1&&se===0&&!(t.mode&1)&&(zs=Ae()+500,Mu&&Gr()))}function Ct(e,t){var n=e.callbackNode;DE(e,t);var r=ql(e,e===He?Qe:0);if(r===0)n!==null&&sg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&sg(n),t===1)e.tag===0?MC(Xg.bind(null,e)):nx(Xg.bind(null,e)),RC(function(){!(se&6)&&Gr()}),n=null;else{switch(O1(r)){case 1:n=Ih;break;case 4:n=P1;break;case 16:n=Kl;break;case 536870912:n=A1;break;default:n=Kl}n=ew(n,qx.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function qx(e,t){if(Pl=-1,Al=0,se&6)throw Error(A(327));var n=e.callbackNode;if(ws()&&e.callbackNode!==n)return null;var r=ql(e,e===He?Qe:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=fu(e,r);else{t=r;var i=se;se|=2;var s=Qx();(He!==e||Qe!==t)&&(Bn=null,zs=Ae()+500,wi(e,t));do try{tk();break}catch(a){Gx(e,a)}while(!0);Xh(),lu.current=s,se=i,je!==null?t=0:(He=null,Qe=0,t=Ie)}if(t!==0){if(t===2&&(i=qf(e),i!==0&&(r=i,t=bd(e,i))),t===1)throw n=na,wi(e,0),mr(e,r),Ct(e,Ae()),n;if(t===6)mr(e,r);else{if(i=e.current.alternate,!(r&30)&&!JC(i)&&(t=fu(e,r),t===2&&(s=qf(e),s!==0&&(r=s,t=bd(e,s))),t===1))throw n=na,wi(e,0),mr(e,r),Ct(e,Ae()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(A(345));case 2:ni(e,wt,Bn);break;case 3:if(mr(e,r),(r&130023424)===r&&(t=dp+500-Ae(),10<t)){if(ql(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){ft(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=td(ni.bind(null,e,wt,Bn),t);break}ni(e,wt,Bn);break;case 4:if(mr(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*ZC(r/1960))-r,10<r){e.timeoutHandle=td(ni.bind(null,e,wt,Bn),r);break}ni(e,wt,Bn);break;case 5:ni(e,wt,Bn);break;default:throw Error(A(329))}}}return Ct(e,Ae()),e.callbackNode===n?qx.bind(null,e):null}function bd(e,t){var n=Oo;return e.current.memoizedState.isDehydrated&&(wi(e,t).flags|=256),e=fu(e,t),e!==2&&(t=wt,wt=n,t!==null&&Sd(t)),e}function Sd(e){wt===null?wt=e:wt.push.apply(wt,e)}function JC(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 mr(e,t){for(t&=~fp,t&=~Iu,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 Xg(e){if(se&6)throw Error(A(327));ws();var t=ql(e,0);if(!(t&1))return Ct(e,Ae()),null;var n=fu(e,t);if(e.tag!==0&&n===2){var r=qf(e);r!==0&&(t=r,n=bd(e,r))}if(n===1)throw n=na,wi(e,0),mr(e,t),Ct(e,Ae()),n;if(n===6)throw Error(A(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ni(e,wt,Bn),Ct(e,Ae()),null}function hp(e,t){var n=se;se|=1;try{return e(t)}finally{se=n,se===0&&(zs=Ae()+500,Mu&&Gr())}}function Ai(e){kr!==null&&kr.tag===0&&!(se&6)&&ws();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)&&Gr()}}function pp(){jt=ls.current,ge(ls)}function wi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,AC(n)),je!==null)for(n=je.return;n!==null;){var r=n;switch(Gh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Zl();break;case 3:Vs(),ge(Tt),ge(st),rp();break;case 5:np(r);break;case 4:Vs();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(He=e,je=e=Fr(e.current,null),Qe=jt=t,Ie=0,na=null,fp=Iu=Pi=0,wt=Oo=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 Gx(e,t){do{var n=je;try{if(Xh(),Cl.current=au,ou){for(var r=Se.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}ou=!1}if(_i=0,Ue=Fe=Se=null,Ao=!1,Jo=0,cp.current=null,n===null||n.return===null){Ie=1,na=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=Ig(o);if(h!==null){h.flags&=-257,$g(h,o,a,s,t),h.mode&1&&Lg(s,u,t),t=h,l=u;var m=t.updateQueue;if(m===null){var v=new Set;v.add(l),t.updateQueue=v}else m.add(l);break e}else{if(!(t&1)){Lg(s,u,t),mp();break e}l=Error(A(426))}}else if(ve&&a.mode&1){var b=Ig(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),$g(b,o,a,s,t),Qh(Bs(l,a));break e}}s=l=Bs(l,a),Ie!==4&&(Ie=2),Oo===null?Oo=[s]:Oo.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var p=Ox(s,l,t);Og(s,p);break e;case 1:a=l;var g=s.type,x=s.stateNode;if(!(s.flags&128)&&(typeof g.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Mr===null||!Mr.has(x)))){s.flags|=65536,t&=-t,s.lanes|=t;var E=jx(s,a,t);Og(s,E);break e}}s=s.return}while(s!==null)}Xx(n)}catch(S){t=S,je===n&&n!==null&&(je=n=n.return);continue}break}while(!0)}function Qx(){var e=lu.current;return lu.current=au,e===null?au:e}function mp(){(Ie===0||Ie===3||Ie===2)&&(Ie=4),He===null||!(Pi&268435455)&&!(Iu&268435455)||mr(He,Qe)}function fu(e,t){var n=se;se|=2;var r=Qx();(He!==e||Qe!==t)&&(Bn=null,wi(e,t));do try{ek();break}catch(i){Gx(e,i)}while(!0);if(Xh(),se=n,lu.current=r,je!==null)throw Error(A(261));return He=null,Qe=0,Ie}function ek(){for(;je!==null;)Yx(je)}function tk(){for(;je!==null&&!kE();)Yx(je)}function Yx(e){var t=Jx(e.alternate,e,jt);e.memoizedProps=e.pendingProps,t===null?Xx(e):je=t,cp.current=null}function Xx(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=GC(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=qC(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 ni(e,t,n){var r=le,i=Xt.transition;try{Xt.transition=null,le=1,nk(e,t,n,r)}finally{Xt.transition=i,le=r}return null}function nk(e,t,n,r){do ws();while(kr!==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(FE(e,s),e===He&&(je=He=null,Qe=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||sl||(sl=!0,ew(Kl,function(){return ws(),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,cp.current=null,YC(e,n),Wx(n,e),SC(Jf),Gl=!!Zf,Jf=Zf=null,e.current=n,XC(n),_E(),se=a,le=o,Xt.transition=s}else e.current=n;if(sl&&(sl=!1,kr=e,cu=i),s=e.pendingLanes,s===0&&(Mr=null),RE(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(uu)throw uu=!1,e=xd,xd=null,e;return cu&1&&e.tag!==0&&ws(),s=e.pendingLanes,s&1?e===wd?jo++:(jo=0,wd=e):jo=0,Gr(),null}function ws(){if(kr!==null){var e=O1(cu),t=Xt.transition,n=le;try{if(Xt.transition=null,le=16>e?16:e,kr===null)var r=!1;else{if(e=kr,kr=null,cu=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:Ro(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(zx(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 v=m.child;if(v!==null){m.child=null;do{var b=v.sibling;v.sibling=null,v=b}while(v!==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:Ro(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 x=o.child;if(o.subtreeFlags&2064&&x!==null)x.return=o,F=x;else e:for(o=g;F!==null;){if(a=F,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Lu(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,Gr(),_n&&typeof _n.onPostCommitFiberRoot=="function")try{_n.onPostCommitFiberRoot(Au,e)}catch{}r=!0}return r}finally{le=n,Xt.transition=t}}return!1}function Zg(e,t,n){t=Bs(n,t),t=Ox(e,t,1),e=Nr(e,t,1),t=ft(),e!==null&&(Sa(e,1,t),Ct(e,t))}function ke(e,t,n){if(e.tag===3)Zg(e,e,n);else for(;t!==null;){if(t.tag===3){Zg(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=Bs(n,e),e=jx(t,e,1),t=Nr(t,e,1),e=ft(),t!==null&&(Sa(t,1,e),Ct(t,e));break}}t=t.return}}function rk(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()-dp?wi(e,0):fp|=n),Ct(e,t)}function Zx(e,t){t===0&&(e.mode&1?(t=Qa,Qa<<=1,!(Qa&130023424)&&(Qa=4194304)):t=1);var n=ft();e=Jn(e,t),e!==null&&(Sa(e,t,n),Ct(e,n))}function ik(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Zx(e,n)}function sk(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),Zx(e,n)}var Jx;Jx=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,KC(e,t,n);St=!!(e.flags&131072)}else St=!1,ve&&t.flags&1048576&&rx(t,tu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;_l(e,t),e=t.pendingProps;var i=Ls(t,st.current);xs(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,Et(r)?(s=!0,Jl(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ep(t),i.updater=Fu,t.stateNode=i,i._reactInternals=t,ld(t,r,e,n),t=fd(null,t,r,!0,s,n)):(t.tag=0,ve&&s&&qh(t),lt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(_l(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=ak(r),e=ln(r,e),i){case 0:t=cd(null,t,r,e,n);break e;case 1:t=zg(null,t,r,e,n);break e;case 11:t=Vg(null,t,r,e,n);break e;case 14:t=Bg(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),cd(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),zg(e,t,r,i,n);case 3:e:{if(Fx(t),e===null)throw Error(A(387));r=t.pendingProps,s=t.memoizedState,i=s.element,ux(e,t),iu(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=Bs(Error(A(423)),t),t=Ug(e,t,r,n,i);break e}else if(r!==i){i=Bs(Error(A(424)),t),t=Ug(e,t,r,n,i);break e}else for(Nt=jr(t.stateNode.containerInfo.firstChild),Ft=t,ve=!0,dn=null,n=ax(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Is(),r===i){t=er(e,t,n);break e}lt(e,t,r,n)}t=t.child}return t;case 5:return cx(t),e===null&&sd(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,ed(r,i)?o=null:s!==null&&ed(r,s)&&(t.flags|=32),Dx(e,t),lt(e,t,o,n),t.child;case 6:return e===null&&sd(t),null;case 13:return Lx(e,t,n);case 4:return tp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=$s(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),Vg(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(nu,r._currentValue),r._currentValue=o,s!==null)if(gn(s.value,o)){if(s.children===i.children&&!Tt.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 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),od(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),od(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,xs(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),Bg(e,t,r,i,n);case 15:return Nx(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),_l(e,t),t.tag=1,Et(r)?(e=!0,Jl(t)):e=!1,xs(t,n),Rx(t,r,i),ld(t,r,i,n),fd(null,t,r,!0,e,n);case 19:return Ix(e,t,n);case 22:return Mx(e,t,n)}throw Error(A(156,t.tag))};function ew(e,t){return _1(e,t)}function ok(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 ok(e,t,n,r)}function gp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ak(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 Fr(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 Rl(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 Zi:return bi(n.children,i,s,t);case Mh:o=8,i|=8;break;case jf:return e=Yt(12,n,t,i|2),e.elementType=jf,e.lanes=s,e;case Nf:return e=Yt(13,n,t,i),e.elementType=Nf,e.lanes=s,e;case Mf:return e=Yt(19,n,t,i),e.elementType=Mf,e.lanes=s,e;case c1:return $u(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case l1:o=10;break e;case u1:o=9;break e;case Dh:o=11;break e;case Fh:o=14;break e;case fr: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 $u(e,t,n,r){return e=Yt(22,e,r,t),e.elementType=c1,e.lanes=n,e.stateNode={isHidden:!1},e}function Xc(e,t,n){return e=Yt(6,e,null,t),e.lanes=n,e}function Zc(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 lk(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=jc(0),this.expirationTimes=jc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jc(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function yp(e,t,n,r,i,s,o,a,l){return e=new lk(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},ep(s),e}function uk(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Xi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function tw(e){if(!e)return zr;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 tx(e,n,t)}return t}function nw(e,t,n,r,i,s,o,a,l){return e=yp(n,r,!0,e,i,s,o,a,l),e.context=tw(null),n=e.current,r=ft(),i=Dr(n),s=Gn(r,i),s.callback=t??null,Nr(n,s,i),e.current.lanes=i,Sa(e,i,r),Ct(e,r),e}function Vu(e,t,n,r){var i=t.current,s=ft(),o=Dr(i);return n=tw(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=Nr(i,t,o),e!==null&&(mn(e,i,o,s),El(e,i,o)),o}function du(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 Jg(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){Jg(e,t),(e=e.alternate)&&Jg(e,t)}function ck(){return null}var rw=typeof reportError=="function"?reportError:function(e){console.error(e)};function xp(e){this._internalRoot=e}Bu.prototype.render=xp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(A(409));Vu(e,t,null,null)};Bu.prototype.unmount=xp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ai(function(){Vu(null,e,null,null)}),t[Zn]=null}};function Bu(e){this._internalRoot=e}Bu.prototype.unstable_scheduleHydration=function(e){if(e){var t=M1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<pr.length&&t!==0&&t<pr[n].priority;n++);pr.splice(n,0,e),n===0&&F1(e)}};function wp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function zu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function e0(){}function fk(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=du(o);s.call(u)}}var o=nw(t,r,e,0,null,!1,!1,"",e0);return e._reactRootContainer=o,e[Zn]=o.current,Go(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=du(l);a.call(u)}}var l=yp(e,0,!1,null,null,!1,!1,"",e0);return e._reactRootContainer=l,e[Zn]=l.current,Go(e.nodeType===8?e.parentNode:e),Ai(function(){Vu(t,l,n,r)}),l}function Uu(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=du(o);a.call(l)}}Vu(t,o,e,i)}else o=fk(n,t,e,i,r);return du(o)}j1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=vo(t.pendingLanes);n!==0&&($h(t,n|1),Ct(t,Ae()),!(se&6)&&(zs=Ae()+500,Gr()))}break;case 13:Ai(function(){var r=Jn(e,1);if(r!==null){var i=ft();mn(r,e,1,i)}}),vp(e,1)}};Vh=function(e){if(e.tag===13){var t=Jn(e,134217728);if(t!==null){var n=ft();mn(t,e,134217728,n)}vp(e,134217728)}};N1=function(e){if(e.tag===13){var t=Dr(e),n=Jn(e,t);if(n!==null){var r=ft();mn(n,e,t,r)}vp(e,t)}};M1=function(){return le};D1=function(e,t){var n=le;try{return le=e,t()}finally{le=n}};Hf=function(e,t,n){switch(t){case"input":if(Lf(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=Nu(r);if(!i)throw Error(A(90));d1(r),Lf(r,i)}}}break;case"textarea":p1(e,n);break;case"select":t=n.value,t!=null&&ms(e,!!n.multiple,t,!1)}};b1=hp;S1=Ai;var dk={usingClientEntryPoint:!1,Events:[Ea,ns,Nu,x1,w1,hp]},fo={findFiberByHostInstance:oi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},hk={bundleType:fo.bundleType,version:fo.version,rendererPackageName:fo.rendererPackageName,rendererConfig:fo.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=C1(e),e===null?null:e.stateNode},findFiberByHostInstance:fo.findFiberByHostInstance||ck,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 ol=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ol.isDisabled&&ol.supportsFiber)try{Au=ol.inject(hk),_n=ol}catch{}}It.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=dk;It.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!wp(t))throw Error(A(200));return uk(e,t,null,n)};It.createRoot=function(e,t){if(!wp(e))throw Error(A(299));var n=!1,r="",i=rw;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,Go(e.nodeType===8?e.parentNode:e),new xp(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=C1(t),e=e===null?null:e.stateNode,e};It.flushSync=function(e){return Ai(e)};It.hydrate=function(e,t,n){if(!zu(t))throw Error(A(200));return Uu(null,e,t,!0,n)};It.hydrateRoot=function(e,t,n){if(!wp(e))throw Error(A(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=rw;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=nw(t,null,e,1,n??null,i,!1,s,o),e[Zn]=t.current,Go(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 Bu(t)};It.render=function(e,t,n){if(!zu(t))throw Error(A(200));return Uu(null,e,t,!1,n)};It.unmountComponentAtNode=function(e){if(!zu(e))throw Error(A(40));return e._reactRootContainer?(Ai(function(){Uu(null,null,e,!1,function(){e._reactRootContainer=null,e[Zn]=null})}),!0):!1};It.unstable_batchedUpdates=hp;It.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!zu(n))throw Error(A(200));if(e==null||e._reactInternals===void 0)throw Error(A(38));return Uu(e,t,n,!1,r)};It.version="18.3.1-next-f1338f8080-20240426";function iw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(iw)}catch(e){console.error(e)}}iw(),i1.exports=It;var sw=i1.exports;const pk=qs(sw);var ow,t0=sw;ow=t0.createRoot,t0.hydrateRoot;const mk="@alfatech/livechat",gk="v2025.05.17.3",yk="module",vk="https://api-live.alfatek.dev",xk="wss://api-live.alfatek.dev",wk=["dist","README.md"],bk="dist/widget.js",Sk={dev:"vite",build:"tsc -b && vite build",lint:"biome lint --write",prepare:"husky",format:"biome format --write && yarn lint"},Tk={"@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"},Ek={"@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"},aw={name:mk,private:!1,version:gk,type:yk,apiURL:vk,wsURL:xk,files:wk,main:bk,scripts:Sk,dependencies:Tk,devDependencies:Ek,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},Ck=aw.apiURL,kk=aw.wsURL,_k=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],Pk=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],Ak={429:_k,404:Pk};async function ka(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=await fetch(`${Ck}/${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=Ak[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 Xs=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 Rk(e,t){return typeof e=="function"?e(t):e}function Td(e){return typeof e=="number"&&e>=0&&e!==1/0}function lw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function bs(e,t){return typeof e=="function"?e(t):e}function hn(e,t){return typeof e=="function"?e(t):e}function n0(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(!ra(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 r0(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(!ra(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)=>Ed(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function ra(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!ra(e[n],t[n])):!1}function uw(e,t){if(e===t)return e;const n=i0(e)&&i0(t);if(n||Ed(e)&&Ed(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]=uw(e[f],t[f]),a[f]===e[f]&&e[f]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function hu(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 i0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ed(e){if(!s0(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!s0(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function s0(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ok(e){return new Promise(t=>{setTimeout(t,e)})}function Cd(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?uw(e,t):t}function jk(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Nk(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Tp=Symbol();function cw(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,gr,Ts,Lv,Mk=(Lv=class extends Xs{constructor(){super();U(this,hi);U(this,gr);U(this,Ts);D(this,Ts,t=>{if(!Ri&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}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(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,gr=new WeakMap,Ts=new WeakMap,Lv),Ep=new Mk,Es,yr,Cs,Iv,Dk=(Iv=class extends Xs{constructor(){super();U(this,Es,!0);U(this,yr);U(this,Cs);D(this,Cs,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,yr)||this.setEventListener(T(this,Cs))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,yr))==null||t.call(this),D(this,yr,void 0))}setEventListener(t){var n;D(this,Cs,t),(n=T(this,yr))==null||n.call(this),D(this,yr,t(this.setOnline.bind(this)))}setOnline(t){T(this,Es)!==t&&(D(this,Es,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return T(this,Es)}},Es=new WeakMap,yr=new WeakMap,Cs=new WeakMap,Iv),pu=new Dk;function kd(){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 Fk(e){return Math.min(1e3*2**e,3e4)}function fw(e){return(e??"online")==="online"?pu.isOnline():!0}var dw=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Jc(e){return e instanceof dw}function hw(e){let t=!1,n=0,r=!1,i;const s=kd(),o=v=>{var b;r||(d(new dw(v)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>Ep.isFocused()&&(e.networkMode==="always"||pu.isOnline())&&e.canRun(),f=()=>fw(e.networkMode)&&e.canRun(),c=v=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,v),i==null||i(),s.resolve(v))},d=v=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,v),i==null||i(),s.reject(v))},h=()=>new Promise(v=>{var b;i=p=>{(r||u())&&v(p)},(b=e.onPause)==null||b.call(e)}).then(()=>{var v;i=void 0,r||(v=e.onContinue)==null||v.call(e)}),m=()=>{if(r)return;let v;const b=n===0?e.initialPromise:void 0;try{v=b??e.fn()}catch(p){v=Promise.reject(p)}Promise.resolve(v).then(c).catch(p=>{var C;if(r)return;const g=e.retry??(Ri?0:3),x=e.retryDelay??Fk,E=typeof x=="function"?x(n,p):x,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),Ok(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 Lk(){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=Lk(),pi,$v,pw=($v=class{constructor(){U(this,pi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Td(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,$v),ks,_s,Wt,tt,ya,mi,un,Vn,Vv,Ik=(Vv=class extends pw{constructor(t){super();U(this,un);U(this,ks);U(this,_s);U(this,Wt);U(this,tt);U(this,ya);U(this,mi);D(this,mi,!1),D(this,ya,t.defaultOptions),this.setOptions(t.options),this.observers=[],D(this,Wt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,D(this,ks,$k(this.options)),this.state=t.state??T(this,ks),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,ya),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,Wt).remove(this)}setData(t,n){const r=Cd(this.state.data,t,this.options);return X(this,un,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,un,Vn).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,ks))}isActive(){return this.observers.some(t=>hn(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||!lw(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,Vn).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=cw(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,_s,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&X(this,un,Vn).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const a=c=>{var d,h,m,v;Jc(c)&&c.silent||X(this,un,Vn).call(this,{type:"error",error:c}),Jc(c)||((h=(d=T(this,Wt).config).onError)==null||h.call(d,c,this),(v=(m=T(this,Wt).config).onSettled)==null||v.call(m,this.state.data,c,this)),this.scheduleGc()};return D(this,tt,hw({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:c=>{var d,h,m,v;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),(v=(m=T(this,Wt).config).onSettled)==null||v.call(m,c,this.state.error,this),this.scheduleGc()},onError:a,onFail:(c,d)=>{X(this,un,Vn).call(this,{type:"failed",failureCount:c,error:d})},onPause:()=>{X(this,un,Vn).call(this,{type:"pause"})},onContinue:()=>{X(this,un,Vn).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),T(this,tt).start()}},ks=new WeakMap,_s=new WeakMap,Wt=new WeakMap,tt=new WeakMap,ya=new WeakMap,mi=new WeakMap,un=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,...mw(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 Jc(i)&&i.revert&&T(this,_s)?{...T(this,_s),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})})},Vv);function mw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:fw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function $k(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,Bv,Vk=(Bv=class extends Xs{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??Sp(i,n);let o=this.get(s);return o||(o=new Ik({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=>n0(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>n0(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,Bv),Tn,ot,gi,En,ur,zv,Bk=(zv=class extends pw{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||gw(),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,v,b,p,g,x,E,S,C,k;D(this,gi,hw({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(P,j)=>{X(this,En,ur).call(this,{type:"failed",failureCount:P,error:j})},onPause:()=>{X(this,En,ur).call(this,{type:"pause"})},onContinue:()=>{X(this,En,ur).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,ur).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,ur).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((v=(m=this.options).onSettled)==null?void 0:v.call(m,P,null,t,this.state.context)),X(this,En,ur).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((x=(g=this.options).onError)==null?void 0:x.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,ur).call(this,{type:"error",error:P})}}finally{T(this,ot).runNext(this)}}},Tn=new WeakMap,ot=new WeakMap,gi=new WeakMap,En=new WeakSet,ur=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})})},zv);function gw(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ot,va,Uv,zk=(Uv=class extends Xs{constructor(t={}){super();U(this,Ot);U(this,va);this.config=t,D(this,Ot,new Map),D(this,va,Date.now())}build(t,n,r){const i=new Bk({mutationCache:this,mutationId:++Ua(this,va)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=al(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=al(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(al(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(al(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=>r0(n,r))}findAll(t={}){return this.getAll().filter(n=>r0(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,va=new WeakMap,Uv);function al(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function o0(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 v=!1;const b=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?v=!0:t.signal.addEventListener("abort",()=>{v=!0}),t.signal)})},p=cw(t.options,t.fetchOptions),g=async(x,E,S)=>{if(v)return Promise.reject();if(E==null&&x.pages.length)return Promise.resolve(x);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?Nk:jk;return{pages:j(x.pages,k,P),pageParams:j(x.pageParams,E,P)}};if(i&&s.length){const x=i==="backward",E=x?Uk:a0,S={pages:s,pageParams:o},C=E(r,S);a=await g(S,C,x)}else{const x=e??s.length;do{const E=l===0?o[0]??r.initialPageParam:a0(r,a);if(l>0&&E==null)break;a=await g(a,E),l++}while(l<x)}return a};t.options.persister?t.fetchFn=()=>{var v,b;return(b=(v=t.options).persister)==null?void 0:b.call(v,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function a0(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 Uk(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,vr,xr,Ps,As,wr,Rs,Os,Hv,Hk=(Hv=class{constructor(e={}){U(this,Ee);U(this,vr);U(this,xr);U(this,Ps);U(this,As);U(this,wr);U(this,Rs);U(this,Os);D(this,Ee,e.queryCache||new Vk),D(this,vr,e.mutationCache||new zk),D(this,xr,e.defaultOptions||{}),D(this,Ps,new Map),D(this,As,new Map),D(this,wr,0)}mount(){Ua(this,wr)._++,T(this,wr)===1&&(D(this,Rs,Ep.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Ee).onFocus())})),D(this,Os,pu.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Ee).onOnline())})))}unmount(){var e,t;Ua(this,wr)._--,T(this,wr)===0&&((e=T(this,Rs))==null||e.call(this),D(this,Rs,void 0),(t=T(this,Os))==null||t.call(this),D(this,Os,void 0))}isFetching(e){return T(this,Ee).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return T(this,vr).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(bs(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=Rk(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(bs(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=o0(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Kt).catch(Kt)}ensureInfiniteQueryData(e){return e.behavior=o0(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return pu.isOnline()?T(this,vr).resumePausedMutations():Promise.resolve()}getQueryCache(){return T(this,Ee)}getMutationCache(){return T(this,vr)}getDefaultOptions(){return T(this,xr)}setDefaultOptions(e){D(this,xr,e)}setQueryDefaults(e,t){T(this,Ps).set(Oi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...T(this,Ps).values()],n={};return t.forEach(r=>{ra(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){T(this,As).set(Oi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...T(this,As).values()];let n={};return t.forEach(r=>{ra(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...T(this,xr).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,xr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){T(this,Ee).clear(),T(this,vr).clear()}},Ee=new WeakMap,vr=new WeakMap,xr=new WeakMap,Ps=new WeakMap,As=new WeakMap,wr=new WeakMap,Rs=new WeakMap,Os=new WeakMap,Hv),yt,ee,xa,at,yi,js,br,Cn,wa,Ns,Ms,vi,xi,Sr,Ds,ae,wo,_d,Pd,Ad,Rd,Od,jd,Nd,yw,Wv,Wk=(Wv=class extends Xs{constructor(t,n){super();U(this,ae);U(this,yt);U(this,ee);U(this,xa);U(this,at);U(this,yi);U(this,js);U(this,br);U(this,Cn);U(this,wa);U(this,Ns);U(this,Ms);U(this,vi);U(this,xi);U(this,Sr);U(this,Ds,new Set);this.options=n,D(this,yt,t),D(this,Cn,null),D(this,br,kd()),this.options.experimental_prefetchInRender||T(this,br).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),l0(T(this,ee),this.options)?X(this,ae,wo).call(this):this.updateResult(),X(this,ae,Rd).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,Od).call(this),X(this,ae,jd).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,Nd).call(this),T(this,ee).setOptions(this.options),r._defaulted&&!hu(this.options,r)&&T(this,yt).getQueryCache().notify({type:"observerOptionsUpdated",query:T(this,ee),observer:this});const s=this.hasListeners();s&&u0(T(this,ee),i,this.options,r)&&X(this,ae,wo).call(this),this.updateResult(n),s&&(T(this,ee)!==i||hn(this.options.enabled,T(this,ee))!==hn(r.enabled,T(this,ee))||bs(this.options.staleTime,T(this,ee))!==bs(r.staleTime,T(this,ee)))&&X(this,ae,_d).call(this);const o=X(this,ae,Pd).call(this);s&&(T(this,ee)!==i||hn(this.options.enabled,T(this,ee))!==hn(r.enabled,T(this,ee))||o!==T(this,Sr))&&X(this,ae,Ad).call(this,o)}getOptimisticResult(t){const n=T(this,yt).getQueryCache().build(T(this,yt),t),r=this.createResult(n,t);return qk(this,r)&&(D(this,at,r),D(this,js,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,Ds).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,wo).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,js),u=t!==r?t.state:T(this,xa),{state:f}=t;let c={...f},d=!1,h;if(n._optimisticResults){const j=this.hasListeners(),N=!j&&l0(t,n),I=j&&u0(t,r,n,i);(N||I)&&(c={...c,...mw(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:m,errorUpdatedAt:v,status:b}=c;if(n.select&&c.data!==void 0)if(s&&c.data===(o==null?void 0:o.data)&&n.select===T(this,wa))h=T(this,Ns);else try{D(this,wa,n.select),h=n.select(c.data),h=Cd(s==null?void 0:s.data,h,n),D(this,Ns,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,Ms))==null?void 0:P.state.data,T(this,Ms)):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=Cd(s==null?void 0:s.data,j,n),d=!0)}T(this,Cn)&&(m=T(this,Cn),h=T(this,Ns),v=Date.now(),b="error");const p=c.fetchStatus==="fetching",g=b==="pending",x=b==="error",E=g&&p,S=h!==void 0,k={status:b,fetchStatus:c.fetchStatus,isPending:g,isSuccess:b==="success",isError:x,isInitialLoading:E,isLoading:E,data:h,dataUpdatedAt:c.dataUpdatedAt,error:m,errorUpdatedAt:v,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:x&&!S,isPaused:c.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:x&&S,isStale:Cp(t,n),refetch:this.refetch,promise:T(this,br)};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,br,k.promise=kd());j(re)},I=T(this,br);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,js,this.options),T(this,yi).data!==void 0&&D(this,Ms,T(this,ee)),hu(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,Ds).size)return!0;const l=new Set(a??T(this,Ds));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,yw).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&X(this,ae,Rd).call(this)}},yt=new WeakMap,ee=new WeakMap,xa=new WeakMap,at=new WeakMap,yi=new WeakMap,js=new WeakMap,br=new WeakMap,Cn=new WeakMap,wa=new WeakMap,Ns=new WeakMap,Ms=new WeakMap,vi=new WeakMap,xi=new WeakMap,Sr=new WeakMap,Ds=new WeakMap,ae=new WeakSet,wo=function(t){X(this,ae,Nd).call(this);let n=T(this,ee).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Kt)),n},_d=function(){X(this,ae,Od).call(this);const t=bs(this.options.staleTime,T(this,ee));if(Ri||T(this,at).isStale||!Td(t))return;const r=lw(T(this,at).dataUpdatedAt,t)+1;D(this,vi,setTimeout(()=>{T(this,at).isStale||this.updateResult()},r))},Pd=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(T(this,ee)):this.options.refetchInterval)??!1},Ad=function(t){X(this,ae,jd).call(this),D(this,Sr,t),!(Ri||hn(this.options.enabled,T(this,ee))===!1||!Td(T(this,Sr))||T(this,Sr)===0)&&D(this,xi,setInterval(()=>{(this.options.refetchIntervalInBackground||Ep.isFocused())&&X(this,ae,wo).call(this)},T(this,Sr)))},Rd=function(){X(this,ae,_d).call(this),X(this,ae,Ad).call(this,X(this,ae,Pd).call(this))},Od=function(){T(this,vi)&&(clearTimeout(T(this,vi)),D(this,vi,void 0))},jd=function(){T(this,xi)&&(clearInterval(T(this,xi)),D(this,xi,void 0))},Nd=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,xa,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},yw=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"})})},Wv);function Kk(e,t){return hn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function l0(e,t){return Kk(e,t)||e.state.data!==void 0&&Md(e,t,t.refetchOnMount)}function Md(e,t,n){if(hn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Cp(e,t)}return!1}function u0(e,t,n,r){return(e!==t||hn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Cp(e,n)}function Cp(e,t){return hn(t.enabled,e)!==!1&&e.isStaleByTime(bs(t.staleTime,e))}function qk(e,t){return!hu(e.getCurrentResult(),t)}var Tr,Er,vt,Hn,Yn,Ol,Dd,Kv,Gk=(Kv=class extends Xs{constructor(t,n){super();U(this,Yn);U(this,Tr);U(this,Er);U(this,vt);U(this,Hn);D(this,Tr,t),this.setOptions(n),this.bindMethods(),X(this,Yn,Ol).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,Tr).defaultMutationOptions(t),hu(this.options,n)||T(this,Tr).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,Yn,Ol).call(this),X(this,Yn,Dd).call(this,t)}getCurrentResult(){return T(this,Er)}reset(){var t;(t=T(this,vt))==null||t.removeObserver(this),D(this,vt,void 0),X(this,Yn,Ol).call(this),X(this,Yn,Dd).call(this)}mutate(t,n){var r;return D(this,Hn,n),(r=T(this,vt))==null||r.removeObserver(this),D(this,vt,T(this,Tr).getMutationCache().build(T(this,Tr),this.options)),T(this,vt).addObserver(this),T(this,vt).execute(t)}},Tr=new WeakMap,Er=new WeakMap,vt=new WeakMap,Hn=new WeakMap,Yn=new WeakSet,Ol=function(){var n;const t=((n=T(this,vt))==null?void 0:n.state)??gw();D(this,Er,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Dd=function(t){Le.batch(()=>{var n,r,i,s,o,a,l,u;if(T(this,Hn)&&this.hasListeners()){const f=T(this,Er).variables,c=T(this,Er).context;(t==null?void 0:t.type)==="success"?((r=(n=T(this,Hn)).onSuccess)==null||r.call(n,t.data,f,c),(s=(i=T(this,Hn)).onSettled)==null||s.call(i,t.data,null,f,c)):(t==null?void 0:t.type)==="error"&&((a=(o=T(this,Hn)).onError)==null||a.call(o,t.error,f,c),(u=(l=T(this,Hn)).onSettled)==null||u.call(l,void 0,t.error,f,c))}this.listeners.forEach(f=>{f(T(this,Er))})})},Kv),vw=y.createContext(void 0),xw=e=>{const t=y.useContext(vw);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(vw.Provider,{value:e,children:t})),ww=y.createContext(!1),Yk=()=>y.useContext(ww);ww.Provider;function Xk(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Zk=y.createContext(Xk()),Jk=()=>y.useContext(Zk);function bw(e,t){return typeof e=="function"?e(...t):!!e}function Fd(){}var e_=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},t_=e=>{y.useEffect(()=>{e.clearReset()},[e])},n_=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&bw(n,[e.error,r]),r_=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},i_=(e,t)=>e.isLoading&&e.isFetching&&!t,s_=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,c0=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function o_(e,t,n){var f,c,d,h,m;const r=xw(),i=Yk(),s=Jk(),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",r_(o),e_(o,s),t_(s);const a=!r.getQueryCache().get(o.queryHash),[l]=y.useState(()=>new t(r,o)),u=l.getOptimisticResult(o);if(y.useSyncExternalStore(y.useCallback(v=>{const b=i?Fd:l.subscribe(Le.batchCalls(v));return l.updateResult(),b},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),y.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),s_(o,u))throw c0(o,l,s);if(n_({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&&i_(u,i)){const v=a?c0(o,l,s):(m=r.getQueryCache().get(o.queryHash))==null?void 0:m.promise;v==null||v.catch(Fd).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?u:l.trackResult(u)}function a_(e,t){return o_(e,Wk)}function Sw(e,t){const n=xw(),[r]=y.useState(()=>new Gk(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(Fd)},[r]);if(i.error&&bw(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const l_=e=>a_({queryKey:["widgets",e],queryFn:()=>u_(e)}),u_=e=>ka(`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 c_(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 pu(){return pu=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},pu.apply(this,arguments)}var kr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(kr||(kr={}));function f_(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,v){m===void 0&&(m=null);let b=h_(i?u().pathname:"/",h,m,v);return kp(b.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(h)),b}function c(h){return typeof h=="string"?h:Ld(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 v=f(h,m);s+=1,i.splice(s,i.length,v),r&&a&&a({action:o,location:v,delta:1})},replace(h,m){o=kr.Replace;let v=f(h,m);i[s]=v,r&&a&&a({action:o,location:v,delta:0})},go(h){o=kr.Pop;let m=l(s+h),v=i[m];s=m,a&&a({action:o,location:v,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 kp(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function d_(){return Math.random().toString(36).substr(2,8)}function h_(e,t,n,r){return n===void 0&&(n=null),pu({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Fi(t):t,{state:n,key:t&&t.key||r||d_()})}function Ld(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 f0;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(f0||(f0={}));function p_(e,t,n){return n===void 0&&(n="/"),m_(e,t,n,!1)}function m_(e,t,n,r){let i=typeof t=="string"?Fi(t):t,s=_p(i.pathname||"/",n);if(s==null)return null;let o=Tw(e);g_(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=__(s);a=C_(o[l],u,r)}return a}function Tw(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+'".')),Tw(s.children,t,f,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:T_(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 Ew(s.path))i(s,o,l)}),t}function Ew(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=Ew(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 g_(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:E_(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const y_=/^:[\w-]+$/,v_=3,x_=2,w_=1,b_=10,S_=-2,d0=e=>e==="*";function T_(e,t){let n=e.split("/"),r=n.length;return n.some(d0)&&(r+=S_),t&&(r+=x_),n.filter(i=>!d0(i)).reduce((i,s)=>i+(y_.test(s)?v_:s===""?w_:b_),r)}function E_(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 C_(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=h0({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},f),d=l.route;if(!c&&u&&n&&!r[r.length-1].route.index&&(c=h0({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:O_(Fr([s,c.pathnameBase])),route:d}),c.pathnameBase!=="/"&&(s=Fr([s,c.pathnameBase]))}return o}function h0(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=k_(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 v=a[c]||"";o=s.slice(0,s.length-v.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 k_(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){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 P_(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:A_(n,t):t,search:j_(r),hash:N_(i)}}function A_(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 R_(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Cw(e,t){let n=R_(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function kw(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Fi(e):(i=pu({},e),$e(!i.pathname||!i.pathname.includes("?"),Jc("?","pathname","search",i)),$e(!i.pathname||!i.pathname.includes("#"),Jc("#","pathname","hash",i)),$e(!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 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=P_(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,"/"),O_=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),j_=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,N_=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function M_(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const _w=["post","put","patch","delete"];new Set(_w);const D_=["get",..._w];new Set(D_);/**
49
+ */function mu(){return mu=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},mu.apply(this,arguments)}var _r;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(_r||(_r={}));function f_(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=_r.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,v){m===void 0&&(m=null);let b=h_(i?u().pathname:"/",h,m,v);return kp(b.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(h)),b}function c(h){return typeof h=="string"?h:Ld(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=_r.Push;let v=f(h,m);s+=1,i.splice(s,i.length,v),r&&a&&a({action:o,location:v,delta:1})},replace(h,m){o=_r.Replace;let v=f(h,m);i[s]=v,r&&a&&a({action:o,location:v,delta:0})},go(h){o=_r.Pop;let m=l(s+h),v=i[m];s=m,a&&a({action:o,location:v,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 kp(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function d_(){return Math.random().toString(36).substr(2,8)}function h_(e,t,n,r){return n===void 0&&(n=null),mu({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Fi(t):t,{state:n,key:t&&t.key||r||d_()})}function Ld(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 f0;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(f0||(f0={}));function p_(e,t,n){return n===void 0&&(n="/"),m_(e,t,n,!1)}function m_(e,t,n,r){let i=typeof t=="string"?Fi(t):t,s=_p(i.pathname||"/",n);if(s==null)return null;let o=Tw(e);g_(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=__(s);a=C_(o[l],u,r)}return a}function Tw(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=Lr([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+'".')),Tw(s.children,t,f,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:T_(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 Ew(s.path))i(s,o,l)}),t}function Ew(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=Ew(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 g_(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:E_(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const y_=/^:[\w-]+$/,v_=3,x_=2,w_=1,b_=10,S_=-2,d0=e=>e==="*";function T_(e,t){let n=e.split("/"),r=n.length;return n.some(d0)&&(r+=S_),t&&(r+=x_),n.filter(i=>!d0(i)).reduce((i,s)=>i+(y_.test(s)?v_:s===""?w_:b_),r)}function E_(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 C_(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=h0({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},f),d=l.route;if(!c&&u&&n&&!r[r.length-1].route.index&&(c=h0({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},f)),!c)return null;Object.assign(i,c.params),o.push({params:i,pathname:Lr([s,c.pathname]),pathnameBase:O_(Lr([s,c.pathnameBase])),route:d}),c.pathnameBase!=="/"&&(s=Lr([s,c.pathnameBase]))}return o}function h0(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=k_(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 v=a[c]||"";o=s.slice(0,s.length-v.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 k_(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){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 P_(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:A_(n,t):t,search:j_(r),hash:N_(i)}}function A_(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 ef(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 R_(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Cw(e,t){let n=R_(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function kw(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Fi(e):(i=mu({},e),$e(!i.pathname||!i.pathname.includes("?"),ef("?","pathname","search",i)),$e(!i.pathname||!i.pathname.includes("#"),ef("#","pathname","hash",i)),$e(!i.search||!i.search.includes("#"),ef("#","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=P_(i,a),u=o&&o!=="/"&&o.endsWith("/"),f=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||f)&&(l.pathname+="/"),l}const Lr=e=>e.join("/").replace(/\/\/+/g,"/"),O_=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),j_=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,N_=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function M_(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const _w=["post","put","patch","delete"];new Set(_w);const D_=["get",..._w];new Set(D_);/**
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 ra(){return ra=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},ra.apply(this,arguments)}const Pp=y.createContext(null),F_=y.createContext(null),Li=y.createContext(null),Uu=y.createContext(null),Ii=y.createContext({outlet:null,matches:[],isDataRoute:!1}),Pw=y.createContext(null);function L_(e,t){let{relative:n}=t===void 0?{}:t;ka()||$e(!1);let{basename:r,navigator:i}=y.useContext(Li),{hash:s,pathname:o,search:a}=Ow(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Fr([r,o])),i.createHref({pathname:l,search:a,hash:s})}function ka(){return y.useContext(Uu)!=null}function _a(){return ka()||$e(!1),y.useContext(Uu).location}function Aw(e){y.useContext(Li).static||y.useLayoutEffect(e)}function Rw(){let{isDataRoute:e}=y.useContext(Ii);return e?Y_():I_()}function I_(){ka()||$e(!1);let e=y.useContext(Pp),{basename:t,future:n,navigator:r}=y.useContext(Li),{matches:i}=y.useContext(Ii),{pathname:s}=_a(),o=JSON.stringify(Cw(i,n.v7_relativeSplatPath)),a=y.useRef(!1);return Aw(()=>{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=kw(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 Ow(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=y.useContext(Li),{matches:i}=y.useContext(Ii),{pathname:s}=_a(),o=JSON.stringify(Cw(i,r.v7_relativeSplatPath));return y.useMemo(()=>kw(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function $_(e,t){return V_(e,t)}function V_(e,t,n,r){ka()||$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=_a(),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=p_(e,{pathname:h}),v=W_(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&&v?y.createElement(Uu.Provider,{value:{location:ra({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:kr.Pop}},v):v}function B_(){let e=Q_(),t=M_(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 z_=y.createElement(B_,null);class U_ 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(Pw.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function H_(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(Ii.Provider,{value:t},r)}function W_(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,v=null,b=null;n&&(h=a&&c.route.id?a[c.route.id]:void 0,v=c.route.errorElement||z_,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 x;return h?x=v:m?x=b:c.route.Component?x=y.createElement(c.route.Component,null):c.route.element?x=c.route.element:x=f,y.createElement(H_,{match:c,routeContext:{outlet:f,matches:p,isDataRoute:n!=null},children:x})};return n&&(c.route.ErrorBoundary||c.route.errorElement||d===0)?y.createElement(U_,{location:n.location,revalidation:n.revalidation,component:v,error:h,children:g(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):g()},null)}var jw=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(jw||{}),mu=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}(mu||{});function K_(e){let t=y.useContext(Pp);return t||$e(!1),t}function q_(e){let t=y.useContext(F_);return t||$e(!1),t}function G_(e){let t=y.useContext(Ii);return t||$e(!1),t}function Nw(e){let t=G_(),n=t.matches[t.matches.length-1];return n.route.id||$e(!1),n.route.id}function Q_(){var e;let t=y.useContext(Pw),n=q_(mu.UseRouteError),r=Nw(mu.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Y_(){let{router:e}=K_(jw.UseNavigateStable),t=Nw(mu.UseNavigateStable),n=y.useRef(!1);return Aw(()=>{n.current=!0}),y.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,ra({fromRouteId:t},s)))},[e,t])}const p0={};function X_(e,t){p0[t]||(p0[t]=!0,console.warn(t))}const m0=(e,t,n)=>X_(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function Z_(e,t){e!=null&&e.v7_startTransition||m0("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&&m0("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}const J_="startTransition",g0=Rf[J_];function e2(e){let{basename:t,children:n,initialEntries:r,initialIndex:i,future:s}=e,o=y.useRef();o.current==null&&(o.current=f_({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&&g0?g0(()=>u(d)):u(d)},[u,f]);return y.useLayoutEffect(()=>a.listen(c),[a,c]),y.useEffect(()=>Z_(s),[s]),y.createElement(t2,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:s})}function Id(e){$e(!1)}function t2(e){let{basename:t="/",children:n=null,location:r,navigationType:i=kr.Pop,navigator:s,static:o=!1,future:a}=e;ka()&&$e(!1);let l=t.replace(/^\/*/,"/"),u=y.useMemo(()=>({basename:l,navigator:s,static:o,future:ra({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,v=y.useMemo(()=>{let b=_p(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 v==null?null:y.createElement(Li.Provider,{value:u},y.createElement(Uu.Provider,{children:n,value:v}))}function n2(e){let{children:t,location:n}=e;return $_($d(t),n)}new Promise(()=>{});function $d(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,$d(r.props.children,s));return}r.type!==Id&&$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=$d(r.props.children,s)),n.push(o)}),n}/**
58
+ */function ia(){return ia=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},ia.apply(this,arguments)}const Pp=y.createContext(null),F_=y.createContext(null),Li=y.createContext(null),Hu=y.createContext(null),Ii=y.createContext({outlet:null,matches:[],isDataRoute:!1}),Pw=y.createContext(null);function L_(e,t){let{relative:n}=t===void 0?{}:t;_a()||$e(!1);let{basename:r,navigator:i}=y.useContext(Li),{hash:s,pathname:o,search:a}=Ow(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Lr([r,o])),i.createHref({pathname:l,search:a,hash:s})}function _a(){return y.useContext(Hu)!=null}function Pa(){return _a()||$e(!1),y.useContext(Hu).location}function Aw(e){y.useContext(Li).static||y.useLayoutEffect(e)}function Rw(){let{isDataRoute:e}=y.useContext(Ii);return e?Y_():I_()}function I_(){_a()||$e(!1);let e=y.useContext(Pp),{basename:t,future:n,navigator:r}=y.useContext(Li),{matches:i}=y.useContext(Ii),{pathname:s}=Pa(),o=JSON.stringify(Cw(i,n.v7_relativeSplatPath)),a=y.useRef(!1);return Aw(()=>{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=kw(u,JSON.parse(o),s,f.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Lr([t,c.pathname])),(f.replace?r.replace:r.push)(c,f.state,f)},[t,r,o,s,e])}function Ow(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=y.useContext(Li),{matches:i}=y.useContext(Ii),{pathname:s}=Pa(),o=JSON.stringify(Cw(i,r.v7_relativeSplatPath));return y.useMemo(()=>kw(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function $_(e,t){return V_(e,t)}function V_(e,t,n,r){_a()||$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=Pa(),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=p_(e,{pathname:h}),v=W_(m&&m.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:Lr([l,i.encodeLocation?i.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:Lr([l,i.encodeLocation?i.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,n,r);return t&&v?y.createElement(Hu.Provider,{value:{location:ia({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:_r.Pop}},v):v}function B_(){let e=Q_(),t=M_(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 z_=y.createElement(B_,null);class U_ 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(Pw.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function H_(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(Ii.Provider,{value:t},r)}function W_(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,v=null,b=null;n&&(h=a&&c.route.id?a[c.route.id]:void 0,v=c.route.errorElement||z_,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 x;return h?x=v:m?x=b:c.route.Component?x=y.createElement(c.route.Component,null):c.route.element?x=c.route.element:x=f,y.createElement(H_,{match:c,routeContext:{outlet:f,matches:p,isDataRoute:n!=null},children:x})};return n&&(c.route.ErrorBoundary||c.route.errorElement||d===0)?y.createElement(U_,{location:n.location,revalidation:n.revalidation,component:v,error:h,children:g(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):g()},null)}var jw=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(jw||{}),gu=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}(gu||{});function K_(e){let t=y.useContext(Pp);return t||$e(!1),t}function q_(e){let t=y.useContext(F_);return t||$e(!1),t}function G_(e){let t=y.useContext(Ii);return t||$e(!1),t}function Nw(e){let t=G_(),n=t.matches[t.matches.length-1];return n.route.id||$e(!1),n.route.id}function Q_(){var e;let t=y.useContext(Pw),n=q_(gu.UseRouteError),r=Nw(gu.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Y_(){let{router:e}=K_(jw.UseNavigateStable),t=Nw(gu.UseNavigateStable),n=y.useRef(!1);return Aw(()=>{n.current=!0}),y.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,ia({fromRouteId:t},s)))},[e,t])}const p0={};function X_(e,t){p0[t]||(p0[t]=!0,console.warn(t))}const m0=(e,t,n)=>X_(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function Z_(e,t){e!=null&&e.v7_startTransition||m0("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&&m0("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}const J_="startTransition",g0=Rf[J_];function e2(e){let{basename:t,children:n,initialEntries:r,initialIndex:i,future:s}=e,o=y.useRef();o.current==null&&(o.current=f_({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&&g0?g0(()=>u(d)):u(d)},[u,f]);return y.useLayoutEffect(()=>a.listen(c),[a,c]),y.useEffect(()=>Z_(s),[s]),y.createElement(t2,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:s})}function Id(e){$e(!1)}function t2(e){let{basename:t="/",children:n=null,location:r,navigationType:i=_r.Pop,navigator:s,static:o=!1,future:a}=e;_a()&&$e(!1);let l=t.replace(/^\/*/,"/"),u=y.useMemo(()=>({basename:l,navigator:s,static:o,future:ia({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,v=y.useMemo(()=>{let b=_p(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 v==null?null:y.createElement(Li.Provider,{value:u},y.createElement(Hu.Provider,{children:n,value:v}))}function n2(e){let{children:t,location:n}=e;return $_($d(t),n)}new Promise(()=>{});function $d(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,$d(r.props.children,s));return}r.type!==Id&&$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=$d(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 Vd(){return Vd=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},Vd.apply(this,arguments)}function r2(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 i2(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function s2(e,t){return e.button===0&&(!t||t==="_self")&&!i2(e)}const o2=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],a2="6";try{window.__reactRouterVersion=a2}catch{}const l2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",u2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,c2=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=r2(t,o2),{basename:h}=y.useContext(Li),m,v=!1;if(typeof u=="string"&&u2.test(u)&&(m=u,l2))try{let x=new URL(window.location.href),E=u.startsWith("//")?new URL(x.protocol+u):new URL(u),S=_p(E.pathname,h);E.origin===x.origin&&S!=null?u=S+E.search+E.hash:v=!0}catch{}let b=L_(u,{relative:i}),p=f2(u,{replace:o,state:a,target:l,preventScrollReset:f,relative:i,viewTransition:c});function g(x){r&&r(x),x.defaultPrevented||p(x)}return y.createElement("a",Vd({},d,{href:m||b,onClick:v||s?r:g,ref:n,target:l}))});var y0;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(y0||(y0={}));var v0;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(v0||(v0={}));function f2(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=t===void 0?{}:t,l=Rw(),u=_a(),f=Ow(e,{relative:o});return y.useCallback(c=>{if(s2(c,n)){c.preventDefault();let d=r!==void 0?r:Ld(u)===Ld(f);l(e,{replace:d,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[u,l,f,r,i,n,e,s,o,a])}const d2={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},x0=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:()=>{(d2?"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},h2=e=>e?x0(e):x0;var Mw={exports:{}},Dw={},Fw={exports:{}},Lw={};/**
67
+ */function Vd(){return Vd=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},Vd.apply(this,arguments)}function r2(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 i2(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function s2(e,t){return e.button===0&&(!t||t==="_self")&&!i2(e)}const o2=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],a2="6";try{window.__reactRouterVersion=a2}catch{}const l2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",u2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,c2=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=r2(t,o2),{basename:h}=y.useContext(Li),m,v=!1;if(typeof u=="string"&&u2.test(u)&&(m=u,l2))try{let x=new URL(window.location.href),E=u.startsWith("//")?new URL(x.protocol+u):new URL(u),S=_p(E.pathname,h);E.origin===x.origin&&S!=null?u=S+E.search+E.hash:v=!0}catch{}let b=L_(u,{relative:i}),p=f2(u,{replace:o,state:a,target:l,preventScrollReset:f,relative:i,viewTransition:c});function g(x){r&&r(x),x.defaultPrevented||p(x)}return y.createElement("a",Vd({},d,{href:m||b,onClick:v||s?r:g,ref:n,target:l}))});var y0;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(y0||(y0={}));var v0;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(v0||(v0={}));function f2(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=t===void 0?{}:t,l=Rw(),u=Pa(),f=Ow(e,{relative:o});return y.useCallback(c=>{if(s2(c,n)){c.preventDefault();let d=r!==void 0?r:Ld(u)===Ld(f);l(e,{replace:d,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[u,l,f,r,i,n,e,s,o,a])}const d2={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},x0=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:()=>{(d2?"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},h2=e=>e?x0(e):x0;var Mw={exports:{}},Dw={},Fw={exports:{}},Lw={};/**
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 zs=y;function p2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var m2=typeof Object.is=="function"?Object.is:p2,g2=zs.useState,y2=zs.useEffect,v2=zs.useLayoutEffect,x2=zs.useDebugValue;function w2(e,t){var n=t(),r=g2({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return v2(function(){i.value=n,i.getSnapshot=t,ef(i)&&s({inst:i})},[e,n,t]),y2(function(){return ef(i)&&s({inst:i}),e(function(){ef(i)&&s({inst:i})})},[e]),x2(n),n}function ef(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!m2(e,n)}catch{return!0}}function b2(e,t){return t()}var S2=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?b2:w2;Lw.useSyncExternalStore=zs.useSyncExternalStore!==void 0?zs.useSyncExternalStore:S2;Fw.exports=Lw;var T2=Fw.exports;/**
75
+ */var Us=y;function p2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var m2=typeof Object.is=="function"?Object.is:p2,g2=Us.useState,y2=Us.useEffect,v2=Us.useLayoutEffect,x2=Us.useDebugValue;function w2(e,t){var n=t(),r=g2({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return v2(function(){i.value=n,i.getSnapshot=t,tf(i)&&s({inst:i})},[e,n,t]),y2(function(){return tf(i)&&s({inst:i}),e(function(){tf(i)&&s({inst:i})})},[e]),x2(n),n}function tf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!m2(e,n)}catch{return!0}}function b2(e,t){return t()}var S2=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?b2:w2;Lw.useSyncExternalStore=Us.useSyncExternalStore!==void 0?Us.useSyncExternalStore:S2;Fw.exports=Lw;var T2=Fw.exports;/**
76
76
  * @license React
77
77
  * use-sync-external-store-shim/with-selector.production.min.js
78
78
  *
@@ -80,11 +80,11 @@ 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 Hu=y,E2=T2;function C2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var k2=typeof Object.is=="function"?Object.is:C2,_2=E2.useSyncExternalStore,P2=Hu.useRef,A2=Hu.useEffect,R2=Hu.useMemo,O2=Hu.useDebugValue;Dw.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=P2(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=R2(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,k2(f,h))return m;var v=r(h);return i!==void 0&&i(m,v)?m:(f=h,c=v)}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=_2(e,s[0],s[1]);return A2(function(){o.hasValue=!0,o.value=a},[a]),O2(a),a};Mw.exports=Dw;var j2=Mw.exports;const N2=Ks(j2),Iw={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:M2}=R,{useSyncExternalStoreWithSelector:D2}=N2;let w0=!1;const F2=e=>e;function L2(e,t=F2,n){(Iw?"production":void 0)!=="production"&&n&&!w0&&(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"),w0=!0);const r=D2(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return M2(r),r}const b0=e=>{(Iw?"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"?h2(e):e,n=(r,i)=>L2(t,r,i);return Object.assign(n,t),n},I2=e=>e?b0(e):b0,tn=I2(e=>({widget:null,open:localStorage.getItem("lc:widget:open")==="true",isHaveChat:localStorage.getItem("lc:widget:isHaveChat")==="true",defaultValues:{},soundPath:void 0,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())},setSoundPath:t=>{e({soundPath:t})}})),$2={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"}},S0={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 $w={exports:{}};/*!
83
+ */var Wu=y,E2=T2;function C2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var k2=typeof Object.is=="function"?Object.is:C2,_2=E2.useSyncExternalStore,P2=Wu.useRef,A2=Wu.useEffect,R2=Wu.useMemo,O2=Wu.useDebugValue;Dw.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=P2(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=R2(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,k2(f,h))return m;var v=r(h);return i!==void 0&&i(m,v)?m:(f=h,c=v)}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=_2(e,s[0],s[1]);return A2(function(){o.hasValue=!0,o.value=a},[a]),O2(a),a};Mw.exports=Dw;var j2=Mw.exports;const N2=qs(j2),Iw={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:M2}=R,{useSyncExternalStoreWithSelector:D2}=N2;let w0=!1;const F2=e=>e;function L2(e,t=F2,n){(Iw?"production":void 0)!=="production"&&n&&!w0&&(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"),w0=!0);const r=D2(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return M2(r),r}const b0=e=>{(Iw?"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"?h2(e):e,n=(r,i)=>L2(t,r,i);return Object.assign(n,t),n},I2=e=>e?b0(e):b0,tn=I2(e=>({widget:null,open:localStorage.getItem("lc:widget:open")==="true",isHaveChat:localStorage.getItem("lc:widget:isHaveChat")==="true",defaultValues:{},soundPath:void 0,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())},setSoundPath:t=>{e({soundPath:t})}})),$2={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"}},S0={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 $w={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})()})($w);var V2=$w.exports;const Ne=Ks(V2),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",Vw=Op?y.useLayoutEffect:y.useEffect,Wu=y.createContext(null),jp=y.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class B2 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 z2({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: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(`
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})()})($w);var V2=$w.exports;const Ne=qs(V2),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",Vw=Op?y.useLayoutEffect:y.useEffect,Ku=y.createContext(null),jp=y.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class B2 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 z2({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: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;
@@ -92,19 +92,19 @@ Error generating stack: `+s.message+`
92
92
  ${d}px !important;
93
93
  top: ${u}px !important;
94
94
  }
95
- `),()=>{document.head.removeChild(h)}},[t]),w.jsx(B2,{isPresent:t,childRef:i,sizeRef:s,children:y.cloneElement(e,{ref:i})})}const U2=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a})=>{const l=Rp(H2),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(z2,{isPresent:n,anchorX:a,children:e})),w.jsx(Wu.Provider,{value:c,children:e})};function H2(){return new Map}function Bw(e=!0){const t=y.useContext(Wu);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 al=e=>e.key||"";function T0(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]=Bw(o),f=y.useMemo(()=>T0(e),[e]),c=o&&!l?[]:f.map(al),d=y.useRef(!0),h=y.useRef(f),m=Rp(()=>new Map),[v,b]=y.useState(f),[p,g]=y.useState(f);Vw(()=>{d.current=!1,h.current=f;for(let S=0;S<p.length;S++){const C=al(p[S]);c.includes(C)?m.delete(C):m.get(C)!==!0&&m.set(C,!1)}},[p,c.length,c.join("-")]);const x=[];if(f!==v){let S=[...f];for(let C=0;C<p.length;C++){const k=p[C],P=al(k);c.includes(P)||(S.splice(C,0,k),x.push(k))}return s==="wait"&&x.length&&(S=x),g(T0(S)),b(f),null}const{forceRender:E}=y.useContext(Ap);return w.jsx(w.Fragment,{children:p.map(S=>{const C=al(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(U2,{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 Np(e,t){e.indexOf(t)===-1&&e.push(t)}function Mp(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let Bd=()=>{};const zd={skipAnimations:!1,useManualTiming:!1};function Dp(e){let t;return()=>(t===void 0&&(t=e()),t)}const Zt=e=>e,ia=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Fp{constructor(){this.subscriptions=[]}add(t){return Np(this.subscriptions,t),()=>Mp(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 zw(e,t){return t?e*(1e3/t):0}const W2=Dp(()=>window.ScrollTimeline!==void 0);class K2{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(W2()&&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 q2 extends K2{then(t,n){return this.finished.finally(t).then(()=>{})}}const E0={value:null,addProjectionMetrics:null},Lp=e=>Array.isArray(e)&&typeof e[0]=="number",G2={};function Q2(e,t){const n=Dp(e);return()=>G2[t]??n()}const sa=Q2(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Uw=(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)})`},wo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Ud={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:wo([0,.65,.55,1]),circOut:wo([.55,0,1,.45]),backIn:wo([.31,.01,.66,-.59]),backOut:wo([.33,1.53,.69,.99])};function Hw(e,t){if(e)return typeof e=="function"&&sa()?Uw(e,t):Lp(e)?wo(e):Array.isArray(e)?e.map(n=>Hw(n,t)||Ud.easeOut):Ud[e]}function Y2(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=Hw(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 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 gu=2e4;function Vp(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<gu;)t+=n,r=e.next(t);return t>=gu?1/0:t}function X2(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Vp(r),gu);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Rn(i)}}function Ww(e){return!!(typeof e=="function"&&sa()||!e||typeof e=="string"&&(e in Ud||sa())||Lp(e)||Array.isArray(e)&&e.every(Ww))}function C0(e,t){e.timeline=t,e.onfinish=null}const ll=["read","resolveKeyframes","update","preRender","render","postRender"];function Z2(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 v=h&&i?n:r;return d&&o.add(c),v.has(c)||v.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&&E0.value&&E0.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,f.process(c))}};return f}const J2=40;function Kw(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=ll.reduce((p,g)=>(p[g]=Z2(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,J2),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:ll.reduce((p,g)=>{const x=o[g];return p[g]=(E,S=!1,C=!1)=>(n||m(),x.schedule(E,S,C)),p},{}),cancel:p=>{for(let g=0;g<ll.length;g++)o[ll[g]].cancel(p)},state:i,steps:o}}const{schedule:Bp,cancel:II}=Kw(queueMicrotask,!1),{schedule:he,cancel:zr,state:Ge,steps:tf}=Kw(typeof requestAnimationFrame<"u"?requestAnimationFrame:Zt,!0);let Ol;function eP(){Ol=void 0}const On={now:()=>(Ol===void 0&&On.set(Ge.isProcessing||zd.useManualTiming?Ge.timestamp:performance.now()),Ol),set:e=>{Ol=e,queueMicrotask(eP)}},an={x:!1,y:!1};function qw(){return an.x||an.y}function tP(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 nP(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 Gw(e,t){const n=nP(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function k0(e){return!(e.pointerType==="touch"||qw())}function rP(e,t,n={}){const[r,i,s]=Gw(e,n),o=a=>{if(!k0(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const f=c=>{k0(c)&&(u(c),l.removeEventListener("pointerleave",f))};l.addEventListener("pointerleave",f,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const Qw=(e,t)=>t?e===t?!0:Qw(e,t.parentElement):!1,zp=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,iP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function sP(e){return iP.has(e.tagName)||e.tabIndex!==-1}const bo=new WeakSet;function _0(e){return t=>{t.key==="Enter"&&e(t)}}function nf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const oP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=_0(()=>{if(bo.has(n))return;nf(n,"down");const i=_0(()=>{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 P0(e){return zp(e)&&!qw()}function aP(e,t,n={}){const[r,i,s]=Gw(e,n),o=a=>{const l=a.currentTarget;if(!P0(a)||bo.has(l))return;bo.add(l);const u=t(l,a),f=(h,m)=>{window.removeEventListener("pointerup",c),window.removeEventListener("pointercancel",d),!(!P0(h)||!bo.has(l))&&(bo.delete(l),typeof u=="function"&&u(h,{success:m}))},c=h=>{f(h,l===window||l===document||n.useGlobalTarget||Qw(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=>oP(u,i)),!sP(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}const A0=30,lP=e=>!isNaN(parseFloat(e));class uP{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=lP(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>A0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,A0);return zw(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 oa(e,t){return new uP(e,t)}const Yw=y.createContext({strict:!1}),R0={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"]},Us={};for(const e in R0)Us[e]={isEnabled:t=>R0[e].some(n=>!!t[n])};function cP(e){for(const t in e)Us[t]={...Us[t],...e[t]}}const fP=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 yu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||fP.has(e)}let Xw=e=>!yu(e);function dP(e){e&&(Xw=t=>t.startsWith("on")?!yu(t):e(t))}try{dP(require("@emotion/is-prop-valid").default)}catch{}function hP(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Xw(i)||n===!0&&yu(i)||!t&&!yu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function pP(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 Ku=y.createContext({});function qu(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function aa(e){return typeof e=="string"||Array.isArray(e)}const Up=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Hp=["initial",...Up];function Gu(e){return qu(e.animate)||Hp.some(t=>aa(e[t]))}function Zw(e){return!!(Gu(e)||e.variants)}function mP(e,t){if(Gu(e)){const{initial:n,animate:r}=e;return{initial:n===!1||aa(n)?n:void 0,animate:aa(r)?r:void 0}}return e.inherit!==!1?t:{}}function gP(e){const{initial:t,animate:n}=mP(e,y.useContext(Ku));return y.useMemo(()=>({initial:t,animate:n}),[O0(t),O0(n)])}function O0(e){return Array.isArray(e)?e.join(" "):e}const yP=Symbol.for("motionComponentSymbol");function us(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function vP(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):us(n)&&(n.current=r))},[t])}const Wp=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),xP="framerAppearId",Jw="data-"+Wp(xP),eb=y.createContext({});function wP(e,t,n,r,i){var v,b;const{visualElement:s}=y.useContext(Ku),o=y.useContext(Yw),a=y.useContext(Wu),l=y.useContext(jp).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(eb);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&bP(u.current,n,i,c);const d=y.useRef(!1);y.useInsertionEffect(()=>{f&&d.current&&f.update(n,a)});const h=n[Jw],m=y.useRef(!!h&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,h))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,h)));return Vw(()=>{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 bP(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:tb(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&us(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:f,layoutScroll:l,layoutRoot:u})}function tb(e){if(e)return e.options.allowProjection!==!1?e.projection:tb(e.parent)}function SP({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&cP(e);function s(a,l){let u;const f={...y.useContext(jp),...a,layoutId:TP(a)},{isStatic:c}=f,d=gP(a),h=r(a,c);if(!c&&Op){EP();const m=CP(f);u=m.MeasureLayout,d.visualElement=wP(i,h,f,t,m.ProjectionNode)}return w.jsxs(Ku.Provider,{value:d,children:[u&&d.visualElement?w.jsx(u,{visualElement:d.visualElement,...f}):null,n(i,a,vP(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[yP]=i,o}function TP({layoutId:e}){const t=y.useContext(Ap).id;return t&&e!==void 0?t+"-"+e:e}function EP(e,t){y.useContext(Yw).strict}function CP(e){const{drag:t,layout:n}=Us;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 nb=e=>t=>typeof t=="string"&&t.startsWith(e),Kp=nb("--"),kP=nb("var(--"),qp=e=>kP(e)?_P.test(e.split("/*")[0].trim()):!1,_P=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,la={};function PP(e){for(const t in e)la[t]=e[t],Kp(t)&&(la[t].isCSSVariable=!0)}const Xs=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],$i=new Set(Xs);function rb(e,{layout:t,layoutId:n}){return $i.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!la[e]||e==="opacity")}const it=e=>!!(e&&e.getVelocity),ib=(e,t)=>t&&typeof e=="number"?t.transform(e):e,er=(e,t,n)=>n>t?t:n<e?e:n,Zs={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ua={...Zs,transform:e=>er(0,1,e)},ul={...Zs,default:1},Pa=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ur=Pa("deg"),jn=Pa("%"),W=Pa("px"),AP=Pa("vh"),RP=Pa("vw"),j0={...jn,parse:e=>jn.parse(e)/100,transform:e=>jn.transform(e*100)},OP={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},jP={rotate:ur,rotateX:ur,rotateY:ur,rotateZ:ur,scale:ul,scaleX:ul,scaleY:ul,scaleZ:ul,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:ua,originX:j0,originY:j0,originZ:W},N0={...Zs,transform:Math.round},Gp={...OP,...jP,zIndex:N0,size:W,fillOpacity:ua,strokeOpacity:ua,numOctaves:N0},NP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},MP=Xs.length;function DP(e,t,n){let r="",i=!0;for(let s=0;s<MP;s++){const o=Xs[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=ib(a,Gp[o]);if(!l){i=!1;const f=NP[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(Kp(l)){i[l]=u;continue}else{const f=ib(u,Gp[l]);l.startsWith("origin")?(a=!0,s[l]=f):r[l]=f}}if(t.transform||(o||n?r.transform=DP(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 Yp=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function sb(e,t,n){for(const r in t)!it(t[r])&&!rb(r,n)&&(e[r]=t[r])}function FP({transformTemplate:e},t){return y.useMemo(()=>{const n=Yp();return Qp(n,t,e),Object.assign({},n.vars,n.style)},[t])}function LP(e,t){const n=e.style||{},r={};return sb(r,n,e),Object.assign(r,FP(e,t)),r}function IP(e,t){const n={},r=LP(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 $P=["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:!!($P.indexOf(e)>-1||/[A-Z]/u.test(e))}const VP={offset:"stroke-dashoffset",array:"stroke-dasharray"},BP={offset:"strokeDashoffset",array:"strokeDasharray"};function zP(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?VP:BP;e[s.offset]=W.transform(-r);const o=W.transform(t),a=W.transform(n);e[s.array]=`${o} ${a}`}function M0(e,t,n){return typeof e=="string"?e:W.transform(t+n*e)}function UP(e,t,n){const r=M0(t,e.x,e.width),i=M0(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,...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=UP(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&&zP(d,o,a,l,!1)}const ob=()=>({...Yp(),attrs:{}}),Jp=e=>typeof e=="string"&&e.toLowerCase()==="svg";function HP(e,t,n,r){const i=y.useMemo(()=>{const s=ob();return Zp(s,t,Jp(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};sb(s,e.style,e),i.style={...s,...i.style}}return i}function WP(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Xp(n)?HP:IP)(r,s,o,n),u=hP(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 D0(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]=D0(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]=D0(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const Hd=e=>Array.isArray(e),KP=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),qP=e=>Hd(e)?e[e.length-1]||0:e;function jl(e){const t=it(e)?e.get():e;return KP(t)?t.toValue():t}function GP({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 ab=e=>(t,n)=>{const r=y.useContext(Ku),i=y.useContext(Wu),s=()=>GP(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]=jl(s[d]);let{initial:o,animate:a}=e;const l=Gu(e),u=Zw(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"&&!qu(c)){const d=Array.isArray(c)?c:[c];for(let h=0;h<d.length;h++){const m=em(e,d[h]);if(m){const{transitionEnd:v,transition:b,...p}=m;for(const g in p){let x=p[g];if(Array.isArray(x)){const E=f?x.length-1:0;x=x[E]}x!==null&&(i[g]=x)}for(const g in v)i[g]=v[g]}}}return i}function tm(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(it(r[o])||t.style&&it(t.style[o])||rb(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const YP={useVisualState:ab({scrapeMotionValuesFromProps:tm,createRenderState:Yp})};function lb(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 ub(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 cb=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 fb(e,t,n,r){ub(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(cb.has(i)?i:Wp(i),t.attrs[i])}function db(e,t,n){const r=tm(e,t,n);for(const i in e)if(it(e[i])||it(t[i])){const s=Xs.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const F0=["x","y","width","height","cx","cy","r"],XP={useVisualState:ab({scrapeMotionValuesFromProps:db,createRenderState:ob,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<F0.length;a++){const l=F0[a];e[l]!==t[l]&&(o=!0)}o&&he.read(()=>{lb(n,r),he.render(()=>{Zp(r,i,Jp(n.tagName),e.transformTemplate),fb(n,r)})})}})};function ZP(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Xp(r)?XP:YP,preloadedFeatures:e,useRender:WP(i),createVisualElement:t,Component:r};return SP(o)}}function ca(e,t,n){const r=e.getProps();return em(r,t,n!==void 0?n:r.custom,e)}const hb=new Set(["width","height","top","left","right","bottom",...Xs]);function JP(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,oa(n))}function eA(e,t){const n=ca(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=qP(s[o]);JP(e,o,a)}}function tA(e){return!!(it(e)&&e.add)}function Wd(e,t){const n=e.getValue("willChange");if(tA(n))return n.add(t);if(!n&&zd.WillChange){const r=new zd.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function pb(e){return e.props[Jw]}const mb=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,nA=1e-7,rA=12;function iA(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=mb(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>nA&&++a<rA);return o}function Aa(e,t,n,r){if(e===t&&n===r)return Zt;const i=s=>iA(s,0,1,e,n);return s=>s===0||s===1?s:mb(i(s),t,r)}const gb=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,yb=e=>t=>1-e(1-t),vb=Aa(.33,1.53,.69,.99),nm=yb(vb),xb=gb(nm),wb=e=>(e*=2)<1?.5*nm(e):.5*(2-Math.pow(2,-10*(e-1))),rm=e=>1-Math.sin(Math.acos(e)),bb=yb(rm),Sb=gb(rm),Tb=e=>/^0[^.\s]+$/u.test(e);function sA(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Tb(e):!0}const jo=e=>Math.round(e*1e5)/1e5,im=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function oA(e){return e==null}const aA=/^(?:#[\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"&&aA.test(n)&&n.startsWith(e)||t&&!oA(n)&&Object.prototype.hasOwnProperty.call(n,t)),Eb=(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}},lA=e=>er(0,255,e),rf={...Zs,transform:e=>Math.round(lA(e))},li={test:sm("rgb","red"),parse:Eb("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+rf.transform(e)+", "+rf.transform(t)+", "+rf.transform(n)+", "+jo(ua.transform(r))+")"};function uA(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 Kd={test:sm("#"),parse:uA,transform:li.transform},cs={test:sm("hsl","hue"),parse:Eb("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+jn.transform(jo(t))+", "+jn.transform(jo(n))+", "+jo(ua.transform(r))+")"},nt={test:e=>li.test(e)||Kd.test(e)||cs.test(e),parse:e=>li.test(e)?li.parse(e):cs.test(e)?cs.parse(e):Kd.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?li.transform(e):cs.transform(e)},cA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function fA(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(im))==null?void 0:t.length)||0)+(((n=e.match(cA))==null?void 0:n.length)||0)>0}const Cb="number",kb="color",dA="var",hA="var(",L0="${}",pA=/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 fa(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(pA,l=>(nt.test(l)?(r.color.push(s),i.push(kb),n.push(nt.parse(l))):l.startsWith(hA)?(r.var.push(s),i.push(dA),n.push(l)):(r.number.push(s),i.push(Cb),n.push(parseFloat(l))),++s,L0)).split(L0);return{values:n,split:a,indexes:r,types:i}}function _b(e){return fa(e).values}function Pb(e){const{split:t,types:n}=fa(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===Cb?s+=jo(i[o]):a===kb?s+=nt.transform(i[o]):s+=i[o]}return s}}const mA=e=>typeof e=="number"?0:e;function gA(e){const t=_b(e);return Pb(e)(t.map(mA))}const Ur={test:fA,parse:_b,createTransformer:Pb,getAnimatableNone:gA},yA=new Set(["brightness","contrast","saturate","opacity"]);function vA(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=yA.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const xA=/\b([a-z-]*)\(.*?\)/gu,qd={...Ur,getAnimatableNone:e=>{const t=e.match(xA);return t?t.map(vA).join(" "):e}},wA={...Gp,color:nt,backgroundColor:nt,outlineColor:nt,fill:nt,stroke:nt,borderColor:nt,borderTopColor:nt,borderRightColor:nt,borderBottomColor:nt,borderLeftColor:nt,filter:qd,WebkitFilter:qd},Ab=e=>wA[e];function Rb(e,t){let n=Ab(e);return n!==qd&&(n=Ur),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const bA=new Set(["auto","none","0"]);function SA(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!bA.has(s)&&fa(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=Rb(n,i)}const ui=e=>e*180/Math.PI,Gd=e=>{const t=ui(Math.atan2(e[1],e[0]));return Qd(t)},TA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Gd,rotateZ:Gd,skewX:e=>ui(Math.atan(e[1])),skewY:e=>ui(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),I0=Gd,$0=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),V0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),EA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:$0,scaleY:V0,scale:e=>($0(e)+V0(e))/2,rotateX:e=>Qd(ui(Math.atan2(e[6],e[5]))),rotateY:e=>Qd(ui(Math.atan2(-e[2],e[0]))),rotateZ:I0,rotate:I0,skewX:e=>ui(Math.atan(e[4])),skewY:e=>ui(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function B0(e){return e.includes("scale")?1:0}function Yd(e,t){if(!e||e==="none")return B0(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=EA,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=TA,i=a}if(!i)return B0(t);const s=r[t],o=i[1].split(",").map(kA);return typeof s=="function"?s(o):o[s]}const CA=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Yd(n,t)};function kA(e){return parseFloat(e.trim())}const z0=e=>e===Zs||e===W,_A=new Set(["x","y","z"]),PA=Xs.filter(e=>!_A.has(e));function AA(e){const t=[];return PA.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Hs={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})=>Yd(t,"x"),y:(e,{transform:t})=>Yd(t,"y")};Hs.translateX=Hs.x;Hs.translateY=Hs.y;const bi=new Set;let Xd=!1,Zd=!1;function Ob(){if(Zd){const e=Array.from(bi).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=AA(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)})}Zd=!1,Xd=!1,bi.forEach(e=>e.complete()),bi.clear()}function jb(){bi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Zd=!0)})}function RA(){jb(),Ob()}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?(bi.add(this),Xd||(Xd=!0,he.read(jb),he.resolveKeyframes(Ob))):(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),bi.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,bi.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Nb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),OA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function jA(e){const t=OA.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function Mb(e,t,n=1){const[r,i]=jA(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return Nb(o)?parseFloat(o):o}return qp(i)?Mb(i,t,n+1):i}const Db=e=>t=>t.test(e),NA={test:e=>e==="auto",parse:e=>e},Fb=[Zs,W,jn,ur,RP,AP,NA],U0=e=>Fb.find(Db(e));class Lb 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 u=t[l];if(typeof u=="string"&&(u=u.trim(),qp(u))){const f=Mb(u,n.current);f!==void 0&&(t[l]=f),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!hb.has(r)||t.length!==2)return;const[i,s]=t,o=U0(i),a=U0(s);if(o!==a)if(z0(o)&&z0(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++)sA(t[i])&&r.push(i);r.length&&SA(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=Hs[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]=Hs[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 H0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ur.test(e)||e==="0")&&!e.startsWith("url("));function MA(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 DA(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=H0(i,t),a=H0(s,t);return!o||!a?!1:MA(e)||(n==="spring"||Ip(n))&&r}const FA=e=>e!==null;function Qu(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(FA),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const LA=40;class Ib{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>LA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&RA(),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&&!DA(t,r,i,s))if(o)this.options.duration=0;else{l&&l(Qu(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 IA({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 vu(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)},$A=[Kd,li,cs],VA=e=>$A.find(t=>t.test(e));function W0(e){const t=VA(e);if(!t)return!1;let n=t.parse(e);return t===cs&&(n=IA(n)),n}const K0=(e,t)=>{const n=W0(e),r=W0(t);if(!n||!r)return vu(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),li.transform(i))},BA=(e,t)=>n=>t(e(n)),Ra=(...e)=>e.reduce(BA),Jd=new Set(["none","hidden"]);function zA(e,t){return Jd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function UA(e,t){return n=>be(e,t,n)}function am(e){return typeof e=="number"?UA:typeof e=="string"?qp(e)?vu:nt.test(e)?K0:KA:Array.isArray(e)?$b:typeof e=="object"?nt.test(e)?K0:HA:vu}function $b(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 HA(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 WA(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 KA=(e,t)=>{const n=Ur.createTransformer(t),r=fa(e),i=fa(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?Jd.has(e)&&!i.values.length||Jd.has(t)&&!r.values.length?zA(e,t):Ra($b(WA(r,i),i.values),n):vu(e,t)};function Vb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?be(e,t,n):am(e)(e,t)}const qA=5;function Bb(e,t,n){const r=Math.max(t-qA,0);return zw(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 GA({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=eh(u,o),m=Math.exp(-c);return af-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),v=eh(Math.pow(u,2),o);return(-i(u)+af>0?-1:1)*((d-h)*m)/v}):(i=u=>{const f=Math.exp(-u*e),c=(u-n)*e+1;return-af+f*c},s=u=>{const f=Math.exp(-u*e),c=(n-u)*(e*e);return f*c});const a=5/e,l=YA(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 YA(e,t,n){let r=n;for(let i=1;i<QA;i++)r=r-e(r)/t(r);return r}function eh(e,t){return e*Math.sqrt(1-t*t)}const XA=["duration","bounce"],ZA=["stiffness","damping","mass"];function q0(e,t){return t.some(n=>e[n]!==void 0)}function JA(e){let t={velocity:Ce.velocity,stiffness:Ce.stiffness,damping:Ce.damping,mass:Ce.mass,isResolvedFromDuration:!1,...e};if(!q0(e,ZA)&&q0(e,XA))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=GA(e);t={...t,...n,mass:Ce.mass},t.isResolvedFromDuration=!0}return t}function xu(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}=JA({...n,velocity:-Rn(n.velocity||0)}),m=d||0,v=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 x;if(v<1){const S=eh(p,v);x=C=>{const k=Math.exp(-v*p*C);return o-k*((m+v*p*b)/S*Math.sin(S*C)+b*Math.cos(S*C))}}else if(v===1)x=S=>o-Math.exp(-p*S)*(b+(m+p*b)*S);else{const S=p*Math.sqrt(v*v-1);x=C=>{const k=Math.exp(-v*p*C),P=Math.min(S*C,300);return o-k*((m+v*p*b)*Math.sinh(P)+S*b*Math.cosh(P))/S}}const E={calculatedDuration:h&&c||null,next:S=>{const C=x(S);if(h)a.done=S>=c;else{let k=0;v<1&&(k=S===0?An(m):Bb(x,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),gu),C=Uw(k=>E.next(S*k).value,S,30);return S+"ms "+C},toTransition:()=>{}};return E}xu.applyToOptions=e=>{const t=X2(e,100,xu);return e.ease=sa()?t.ease:"easeOut",e.duration=An(t.duration),e.type="keyframes",e};function G0({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 v=n*t;const b=c+v,p=o===void 0?b:o(b);p!==b&&(v=p-c);const g=P=>-v*Math.exp(-P/r),x=P=>p+g(P),E=P=>{const j=g(P),N=x(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=xu({keyframes:[d.value,m(d.value)],velocity:Bb(x,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 eR=Aa(.42,0,1,1),tR=Aa(0,0,.58,1),zb=Aa(.42,0,.58,1),nR=e=>Array.isArray(e)&&typeof e[0]!="number",Q0={linear:Zt,easeIn:eR,easeInOut:zb,easeOut:tR,circIn:rm,circInOut:Sb,circOut:bb,backIn:nm,backInOut:xb,backOut:vb,anticipate:wb},Y0=e=>{if(Lp(e)){Bd(e.length===4);const[t,n,r,i]=e;return Aa(t,n,r,i)}else if(typeof e=="string")return Bd(Q0[e]!==void 0),Q0[e];return e};function rR(e,t,n){const r=[],i=n||Vb,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=Ra(l,a)}r.push(a)}return r}function iR(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(Bd(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=rR(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=ia(e[c],e[c+1],f);return a[c](d)};return n?f=>u(er(e[0],e[s-1],f)):u}function sR(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=ia(0,t,r);e.push(be(n,1,i))}}function oR(e){const t=[0];return sR(t,e.length-1),t}function aR(e,t){return e.map(n=>n*t)}function lR(e,t){return e.map(()=>t||zb).splice(0,e.length-1)}function wu({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=nR(r)?r.map(Y0):Y0(r),s={done:!1,value:t[0]},o=aR(n&&n.length===t.length?n:oR(t),e),a=iR(o,t,{ease:Array.isArray(i)?i:lR(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const uR=e=>{const t=({timestamp:n})=>e(n);return{start:()=>he.update(t,!0),stop:()=>zr(t),now:()=>Ge.isProcessing?Ge.timestamp:On.now()}},cR={decay:G0,inertia:G0,tween:wu,keyframes:wu,spring:xu},fR=e=>e/100;class lm extends Ib{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,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=Ip(n)?n:cR[n]||wu;let l,u;a!==wu&&typeof t[0]!="number"&&(l=Ra(fR,Vb(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=Vp(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:v,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 x=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,v&&(N-=v/c)):m==="mirror"&&(E=o)),x=er(0,1,N)*c}const S=g?{done:!1,value:l[0]}:E.next(x);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=Qu(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=uR,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 dR=new Set(["opacity","clipPath","filter","transform"]),hR=Dp(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),bu=10,pR=2e4;function mR(e){return Ip(e.type)||e.type==="spring"||!Ww(e.ease)}function gR(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<pR;)r=n.sample(s),i.push(r.value),s+=bu;return{times:void 0,keyframes:i,duration:s-bu,ease:"linear"}}const Ub={anticipate:wb,backInOut:xb,circInOut:Sb};function yR(e){return e in Ub}class X0 extends Ib{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new Lb(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"&&sa()&&yR(s)&&(s=Ub[s]),mR(this.options)){const{onComplete:c,onUpdate:d,motionValue:h,element:m,...v}=this.options,b=gR(t,v);t=b.keyframes,t.length===1&&(t[1]=t[0]),r=b.duration,i=b.times,s=b.ease,o="keyframes"}const f=Y2(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:s});return f.startTime=u??this.calcStartTime(),this.pendingTimeline?(C0(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:c}=this.options;a.set(Qu(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;C0(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 lm({...h,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),v=An(this.time);u.setWithVelocity(m.sample(v-bu).value,m.sample(v).value,bu)}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 hR()&&r&&dR.has(r)&&(r!=="transform"||!u)&&!l&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const vR={type:"spring",stiffness:500,damping:25,restSpeed:10},xR=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),wR={type:"keyframes",duration:.8},bR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},SR=(e,{keyframes:t})=>t.length>2?wR:$i.has(e)?e.startsWith("scale")?xR(t[1]):vR:bR;function TR({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 um=(e,t,n,r={},i,s)=>o=>{const a=$p(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};TR(a)||(f={...f,...SR(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=Qu(f.keyframes,a);if(d!==void 0)return he.update(()=>{f.onUpdate(d),f.onComplete()}),new q2([])}return!s&&X0.supports(f)?new X0(f):new lm(f)};function ER({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Hb(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&&ER(u,f))continue;const h={delay:n,...$p(s||{},f)};let m=!1;if(window.MotionHandoffAnimation){const b=pb(e);if(b){const p=window.MotionHandoffAnimation(b,f,he);p!==null&&(h.startTime=p,m=!0)}}Wd(e,f),c.start(um(f,c,d,e.shouldReduceMotion&&hb.has(f)?{type:!1}:h,e,m));const v=c.animation;v&&l.push(v)}return o&&Promise.all(l).then(()=>{he.update(()=>{o&&eA(e,o)})}),l}function th(e,t,n={}){var l;const r=ca(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(Hb(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:f=0,staggerChildren:c,staggerDirection:d}=i;return CR(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 CR(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(kR).forEach((u,f)=>{u.notify("AnimationStart",t),o.push(th(u,t,{...s,delay:n+l(f)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function kR(e,t){return e.sortNodePosition(t)}function _R(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>th(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=th(e,t,n);else{const i=typeof t=="function"?ca(e,t,n.custom):t;r=Promise.all(Hb(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Wb(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 PR=Hp.length;function Kb(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Kb(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<PR;n++){const r=Hp[n],i=e.props[r];(aa(i)||i===!1)&&(t[r]=i)}return t}const AR=[...Up].reverse(),RR=Up.length;function OR(e){return t=>Promise.all(t.map(({animation:n,options:r})=>_R(e,n,r)))}function jR(e){let t=OR(e),n=Z0(),r=!0;const i=l=>(u,f)=>{var d;const c=ca(e,f,l==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);if(c){const{transition:h,transitionEnd:m,...v}=c;u={...u,...v,...m}}return u};function s(l){t=l(e)}function o(l){const{props:u}=e,f=Kb(e.parent)||{},c=[],d=new Set;let h={},m=1/0;for(let b=0;b<RR;b++){const p=AR[b],g=n[p],x=u[p]!==void 0?u[p]:f[p],E=aa(x),S=p===l?g.isActive:null;S===!1&&(m=b);let C=x===f[p]&&x!==u[p]&&E;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),g.protectedKeys={...h},!g.isActive&&S===null||!x&&!g.prevProp||qu(x)||typeof x=="boolean")continue;const k=NR(g.prevProp,x);let P=k||p===l&&g.isActive&&!C&&E||b>m&&E,j=!1;const N=Array.isArray(x)?x:[x];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;Hd(O)&&Hd(L)?B=!Wb(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=x,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=ca(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),x=e.getValue(p);x&&(x.liveStyle=!0),b[p]=g??null}),c.push({animation:b})}let v=!!c.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?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=Z0(),r=!0}}}function NR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Wb(t,e):!1}function Zr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Z0(){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 MR extends Gr{constructor(t){super(t),t.animationState||(t.animationState=jR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();qu(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 DR=0;class FR extends Gr{constructor(){super(...arguments),this.id=DR++}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 LR={animation:{Feature:MR},exit:{Feature:FR}};function da(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Oa(e){return{point:{x:e.pageX,y:e.pageY}}}const IR=e=>t=>zp(t)&&e(t,Oa(t));function No(e,t,n,r){return da(e,t,IR(n),r)}function qb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function $R({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function VR(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 Gb=1e-4,BR=1-Gb,zR=1+Gb,Qb=.01,UR=0-Qb,HR=0+Qb;function ct(e){return e.max-e.min}function WR(e,t,n){return Math.abs(e-t)<=n}function J0(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>=BR&&e.scale<=zR||isNaN(e.scale))&&(e.scale=1),(e.translate>=UR&&e.translate<=HR||isNaN(e.translate))&&(e.translate=0)}function Mo(e,t,n,r){J0(e.x,t.x,n.x,r?r.originX:void 0),J0(e.y,t.y,n.y,r?r.originY:void 0)}function ey(e,t,n){e.min=n.min+t.min,e.max=e.min+ct(t)}function KR(e,t,n){ey(e.x,t.x,n.x),ey(e.y,t.y,n.y)}function ty(e,t,n){e.min=t.min-n.min,e.max=e.min+ct(t)}function Do(e,t,n){ty(e.x,t.x,n.x),ty(e.y,t.y,n.y)}const ny=()=>({translate:0,scale:1,origin:0,originPoint:0}),fs=()=>({x:ny(),y:ny()}),ry=()=>({min:0,max:0}),Pe=()=>({x:ry(),y:ry()});function Ht(e){return[e("x"),e("y")]}function lf(e){return e===void 0||e===1}function nh({scale:e,scaleX:t,scaleY:n}){return!lf(e)||!lf(t)||!lf(n)}function ni(e){return nh(e)||Yb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Yb(e){return iy(e.x)||iy(e.y)}function iy(e){return e&&e!=="0%"}function Su(e,t,n){const r=e-n,i=t*r;return n+i}function sy(e,t,n,r,i){return i!==void 0&&(e=Su(e,i,r)),Su(e,n,r)+t}function rh(e,t=0,n=1,r,i){e.min=sy(e.min,t,n,r,i),e.max=sy(e.max,t,n,r,i)}function Xb(e,{x:t,y:n}){rh(e.x,t.translate,t.scale,t.originPoint),rh(e.y,n.translate,n.scale,n.originPoint)}const oy=.999999999999,ay=1.0000000000001;function qR(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&&hs(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Xb(e,o)),r&&ni(s.latestValues)&&hs(e,s.latestValues))}t.x<ay&&t.x>oy&&(t.x=1),t.y<ay&&t.y>oy&&(t.y=1)}function ds(e,t){e.min=e.min+t,e.max=e.max+t}function ly(e,t,n,r,i=.5){const s=be(e.min,e.max,i);rh(e,t,n,s,r)}function hs(e,t){ly(e.x,t.x,t.scaleX,t.scale,t.originX),ly(e.y,t.y,t.scaleY,t.scale,t.originY)}function Zb(e,t){return qb(VR(e.getBoundingClientRect(),t))}function GR(e,t,n){const r=Zb(e,n),{scroll:i}=t;return i&&(ds(r.x,i.offset.x),ds(r.y,i.offset.y)),r}const Jb=({current:e})=>e?e.ownerDocument.defaultView:null,uy=(e,t)=>Math.abs(e-t);function QR(e,t){const n=uy(e.x,t.x),r=uy(e.y,t.y);return Math.sqrt(n**2+r**2)}class eS{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=cf(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:v}=Ge;this.history.push({...m,timestamp:v});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=uf(d,this.transformPagePoint),he.update(this.updatePoint,!0)},this.handlePointerUp=(c,d)=>{this.end();const{onEnd:h,onSessionEnd:m,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=cf(c.type==="pointercancel"?this.lastMoveEventInfo:uf(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(c,b),m&&m(c,b)},!zp(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=Oa(t),a=uf(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=Ge;this.history=[{...l,timestamp:u}];const{onSessionStart:f}=n;f&&f(t,cf(a,this.history)),this.removeListeners=Ra(No(this.contextWindow,"pointermove",this.handlePointerMove),No(this.contextWindow,"pointerup",this.handlePointerUp),No(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 cy(e,t){return{x:e.x-t.x,y:e.y-t.y}}function cf({point:e},t){return{point:e,delta:cy(e,tS(t)),offset:cy(e,YR(t)),velocity:XR(t,.1)}}function YR(e){return e[0]}function tS(e){return e[e.length-1]}function XR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=tS(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 ZR(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 fy(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 JR(e,{top:t,left:n,bottom:r,right:i}){return{x:fy(e.x,n,i),y:fy(e.y,t,r)}}function dy(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 eO(e,t){return{x:dy(e.x,t.x),y:dy(e.y,t.y)}}function tO(e,t){let n=.5;const r=ct(e),i=ct(t);return i>r?n=ia(t.min,t.max-r,e.min):r>i&&(n=ia(e.min,e.max-i,t.min)),er(0,1,n)}function nO(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 ih=.35;function rO(e=ih){return e===!1?e=0:e===!0&&(e=ih),{x:hy(e,"left","right"),y:hy(e,"top","bottom")}}function hy(e,t,n){return{min:py(e,t),max:py(e,n)}}function py(e,t){return typeof e=="number"?e:e[t]||0}const iO=new WeakMap;class sO{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(Oa(f).point)},s=(f,c)=>{const{drag:d,dragPropagation:h,onDragStart:m}=this.getProps();if(d&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=tP(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 x=g.layout.layoutBox[b];x&&(p=ct(x)*(parseFloat(p)/100))}}this.originPoint[b]=p}),m&&he.postRender(()=>m(f,c)),Wd(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},o=(f,c)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:m,onDrag:v}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:b}=c;if(h&&this.currentDirection===null){this.currentDirection=oO(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",c.point,b),this.updateAxis("y",c.point,b),this.visualElement.render(),v&&v(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 eS(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Jb(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||!cl(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=ZR(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&&us(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=JR(r.layoutBox,t):this.constraints=!1,this.elastic=rO(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ht(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=nO(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!us(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=GR(r,i.root,this.visualElement.getTransformPagePoint());let o=eO(i.layout.layoutBox,s);if(n){const a=n($R(o));this.hasMutatedConstraints=!!a,a&&(o=qb(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(!cl(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 Wd(this.visualElement,t),r.start(um(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(!cl(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(!us(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]=tO({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(!cl(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;iO.set(this.visualElement,this);const t=this.visualElement.current,n=No(t,"pointerdown",l=>{const{drag:u,dragListener:f=!0}=this.getProps();u&&f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();us(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=da(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=ih,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function cl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function oO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class aO extends Gr{constructor(t){super(t),this.removeGroupControls=Zt,this.removeListeners=Zt,this.controls=new sO(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 my=e=>(t,n)=>{e&&he.postRender(()=>e(t,n))};class lO extends Gr{constructor(){super(...arguments),this.removePointerDownListener=Zt}onPointerDown(t){this.session=new eS(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Jb(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:my(t),onStart:my(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&he.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=No(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 Nl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function gy(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const fo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(W.test(e))e=parseFloat(e);else return e;const n=gy(e,t.target.x),r=gy(e,t.target.y);return`${n}% ${r}%`}},uO={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 cO extends y.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;PP(fO),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()})),Nl.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 nS(e){const[t,n]=Bw(),r=y.useContext(Ap);return w.jsx(cO,{...e,layoutGroup:r,switchLayoutGroup:y.useContext(eb),isPresent:t,safeToRemove:n})}const fO={borderRadius:{...fo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:fo,borderTopRightRadius:fo,borderBottomLeftRadius:fo,borderBottomRightRadius:fo,boxShadow:uO};function dO(e,t,n){const r=it(e)?e:oa(e);return r.start(um("",r,t,n)),r.animation}function hO(e){return e instanceof SVGElement&&e.tagName!=="svg"}const pO=(e,t)=>e.depth-t.depth;class mO{constructor(){this.children=[],this.isDirty=!1}add(t){Np(this.children,t),this.isDirty=!0}remove(t){Mp(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(pO),this.isDirty=!1,this.children.forEach(t)}}function gO(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 rS=["TopLeft","TopRight","BottomLeft","BottomRight"],yO=rS.length,yy=e=>typeof e=="string"?parseFloat(e):e,vy=e=>typeof e=="number"||W.test(e);function vO(e,t,n,r,i,s){i?(e.opacity=be(0,n.opacity??1,xO(r)),e.opacityExit=be(t.opacity??1,0,wO(r))):s&&(e.opacity=be(t.opacity??1,n.opacity??1,r));for(let o=0;o<yO;o++){const a=`border${rS[o]}Radius`;let l=xy(t,a),u=xy(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||vy(l)===vy(u)?(e[a]=Math.max(be(yy(l),yy(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 xy(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const xO=iS(0,.5,bb),wO=iS(.5,.95,Zt);function iS(e,t,n){return r=>r<e?0:r>t?1:n(ia(e,t,r))}function wy(e,t){e.min=t.min,e.max=t.max}function zt(e,t){wy(e.x,t.x),wy(e.y,t.y)}function by(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Sy(e,t,n,r,i){return e-=t,e=Su(e,1/n,r),i!==void 0&&(e=Su(e,1/i,r)),e}function bO(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=Sy(e.min,t,n,a,i),e.max=Sy(e.max,t,n,a,i)}function Ty(e,t,[n,r,i],s,o){bO(e,t[n],t[r],t[i],t.scale,s,o)}const SO=["x","scaleX","originX"],TO=["y","scaleY","originY"];function Ey(e,t,n,r){Ty(e.x,t,SO,n?n.x:void 0,r?r.x:void 0),Ty(e.y,t,TO,n?n.y:void 0,r?r.y:void 0)}function Cy(e){return e.translate===0&&e.scale===1}function sS(e){return Cy(e.x)&&Cy(e.y)}function ky(e,t){return e.min===t.min&&e.max===t.max}function EO(e,t){return ky(e.x,t.x)&&ky(e.y,t.y)}function _y(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function oS(e,t){return _y(e.x,t.x)&&_y(e.y,t.y)}function Py(e){return ct(e.x)/ct(e.y)}function Ay(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class CO{constructor(){this.members=[]}add(t){Np(this.members,t),t.scheduleRender()}remove(t){if(Mp(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 kO(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 ff=["","X","Y","Z"],_O={visibility:"hidden"},Ry=1e3;let PO=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 aS(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=pb(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&&aS(r)}function lS({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=PO++,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(OO),this.nodes.forEach(FO),this.nodes.forEach(LO),this.nodes.forEach(jO)},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 mO)}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=hO(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=gO(d,250),Nl.hasAnimatedSinceResize&&(Nl.hasAnimatedSinceResize=!1,this.nodes.forEach(jy))})}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 v=this.options.transition||f.getDefaultTransition()||zO,{onLayoutAnimationStart:b,onLayoutAnimationComplete:p}=f.getProps(),g=!this.targetLayout||!oS(this.targetLayout,m),x=!d&&h;if(this.options.layoutRoot||this.resumeFrom||x||d&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(c,x);const E={...$p(v,"layout"),onPlay:b,onComplete:p};(f.shouldReduceMotion||this.options.layoutRoot)&&(E.delay=0,E.type=!1),this.startAnimation(E)}else d||jy(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(IO),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&&aS(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(Oy);return}this.isUpdating||this.nodes.forEach(MO),this.isUpdating=!1,this.nodes.forEach(DO),this.nodes.forEach(AO),this.nodes.forEach(RO),this.clearAllSnapshots();const a=On.now();Ge.delta=er(0,1e3/60,a-Ge.timestamp),Ge.timestamp=a,Ge.isProcessing=!0,tf.update.process(Ge),tf.preRender.process(Ge),tf.render.process(Ge),Ge.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Bp.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(NO),this.sharedNodes.forEach($O)}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&&!sS(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)),UO(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(HO))){const{scroll:f}=this.root;f&&(ds(a.x,f.offset.x),ds(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),ds(a.x,c.offset.x),ds(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&&hs(l,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),ni(f.latestValues)&&hs(l,f.latestValues)}return ni(this.latestValues)&&hs(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;nh(u.latestValues)&&u.updateSnapshot();const f=Pe(),c=u.measurePageBox();zt(f,c),Ey(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,f)}return ni(this.latestValues)&&Ey(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(),Do(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(),KR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):zt(this.target,this.layout.layoutBox),Xb(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(),Do(this.relativeTargetOrigin,this.target,h.target),zt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||nh(this.parent.latestValues)||Yb(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;qR(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():(by(this.prevProjectionDelta.x,this.projectionDelta.x),by(this.prevProjectionDelta.y,this.projectionDelta.y)),Mo(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==c||this.treeScale.y!==d||!Ay(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ay(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=fs(),this.projectionDelta=fs(),this.projectionDeltaWithTransform=fs()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},f={...this.latestValues},c=fs();(!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,v=h!==m,b=this.getStack(),p=!b||b.members.length<=1,g=!!(v&&!p&&this.options.crossfade===!0&&!this.path.some(BO));this.animationProgress=0;let x;this.mixTargetDelta=E=>{const S=E/1e3;Ny(c.x,o.x,S),Ny(c.y,o.y,S),this.setTargetDelta(c),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Do(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),VO(this.relativeTarget,this.relativeTargetOrigin,d,S),x&&EO(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Pe()),zt(x,this.relativeTarget)),v&&(this.animationValues=f,vO(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(()=>{Nl.hasAnimatedSinceResize=!0,this.currentAnimation=dO(0,Ry,{...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(Ry),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&&uS(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),hs(a,f),Mo(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new CO),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&&df("z",o,u,this.animationValues);for(let f=0;f<ff.length;f++)df(`rotate${ff[f]}`,o,u,this.animationValues),df(`skew${ff[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 _O;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=jl(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=jl(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=kO(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 la){if(f[h]===void 0)continue;const{correct:m,applyTo:v,isCSSVariable:b}=la[h],p=a.transform==="none"?f[h]:m(f[h],u);if(v){const g=v.length;for(let x=0;x<g;x++)a[v[x]]=p}else b?this.options.visualElement.renderState.vars[h]=p:a[h]=p}return this.options.layoutId&&(a.pointerEvents=u===this?jl(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(Oy),this.root.sharedNodes.clear()}}}function AO(e){e.updateLayout()}function RO(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}):uS(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=fs();Mo(a,r,t.layoutBox);const l=fs();o?Mo(l,e.applyTransform(i,!0),t.measuredBox):Mo(l,r,t.layoutBox);const u=!sS(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();Do(m,t.layoutBox,d.layoutBox);const v=Pe();Do(v,r,h.layoutBox),oS(m,v)||(f=!0),c.options.layoutRoot&&(e.relativeTarget=v,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 OO(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 jO(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function NO(e){e.clearSnapshot()}function Oy(e){e.clearMeasurements()}function MO(e){e.isLayoutDirty=!1}function DO(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function jy(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function FO(e){e.resolveTargetDelta()}function LO(e){e.calcProjection()}function IO(e){e.resetSkewAndRotation()}function $O(e){e.removeLeadSnapshot()}function Ny(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 My(e,t,n,r){e.min=be(t.min,n.min,r),e.max=be(t.max,n.max,r)}function VO(e,t,n,r){My(e.x,t.x,n.x,r),My(e.y,t.y,n.y,r)}function BO(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const zO={duration:.45,ease:[.4,0,.1,1]},Dy=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Fy=Dy("applewebkit/")&&!Dy("chrome/")?Math.round:Zt;function Ly(e){e.min=Fy(e.min),e.max=Fy(e.max)}function UO(e){Ly(e.x),Ly(e.y)}function uS(e,t,n){return e==="position"||e==="preserve-aspect"&&!WR(Py(t),Py(n),.2)}function HO(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const WO=lS({attachResizeListener:(e,t)=>da(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),hf={current:void 0},cS=lS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!hf.current){const e=new WO({});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"}),KO={pan:{Feature:lO},drag:{Feature:aO,ProjectionNode:cS,MeasureLayout:nS}};function Iy(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,Oa(t)))}class qO extends Gr{mount(){const{current:t}=this.node;t&&(this.unmount=rP(t,(n,r)=>(Iy(this.node,r,"Start"),i=>Iy(this.node,i,"End"))))}unmount(){}}class GO 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=Ra(da(this.node.current,"focus",()=>this.onFocus()),da(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function $y(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,Oa(t)))}class QO extends Gr{mount(){const{current:t}=this.node;t&&(this.unmount=aP(t,(n,r)=>($y(this.node,r,"Start"),(i,{success:s})=>$y(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const sh=new WeakMap,pf=new WeakMap,YO=e=>{const t=sh.get(e.target);t&&t(e)},XO=e=>{e.forEach(YO)};function ZO({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(XO,{root:e,...t})),r[i]}function JO(e,t,n){const r=ZO(t);return sh.set(e,n),r.observe(e),()=>{sh.delete(e),r.unobserve(e)}}const ej={some:0,all:1};class tj 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:ej[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 JO(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(nj(t,n))&&this.startObserver()}unmount(){}}function nj({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const rj={inView:{Feature:tj},tap:{Feature:QO},focus:{Feature:GO},hover:{Feature:qO}},ij={layout:{ProjectionNode:cS,MeasureLayout:nS}},oh={current:null},fS={current:!1};function sj(){if(fS.current=!0,!!Op)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>oh.current=e.matches;e.addListener(t),t()}else oh.current=!1}const oj=[...Fb,nt,Ur],aj=e=>oj.find(Db(e)),lj=new WeakMap;function uj(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,oa(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,oa(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Vy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class cj{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: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=Gu(n),this.isVariantNode=Zw(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,lj.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)),fS.current||sj(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:oh.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 Us){const n=Us[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<Vy.length;r++){const i=Vy[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=uj(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=oa(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"&&(Nb(r)||Tb(r))?r=parseFloat(r):!aj(r)&&Ur.test(n)&&(r=Rb(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=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&&!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 Fp),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class dS extends cj{constructor(){super(...arguments),this.KeyframeResolver=Lb}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 fj(e){return window.getComputedStyle(e)}class dj extends dS{constructor(){super(...arguments),this.type="html",this.renderInstance=ub}readValueFromInstance(t,n){if($i.has(n))return CA(t,n);{const r=fj(t),i=(Kp(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Zb(t,n)}build(t,n,r){Qp(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return tm(t,n,r)}}class hj extends dS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Pe,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&lb(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if($i.has(n)){const r=Ab(n);return r&&r.default||0}return n=cb.has(n)?n:Wp(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return db(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){fb(t,n,r,i)}mount(t){this.isSVGTag=Jp(t.tagName),super.mount(t)}}const pj=(e,t)=>Xp(e)?new hj(t):new dj(t,{allowProjection:e!==y.Fragment}),mj=ZP({...LR,...rj,...KO,...ij},pj),Re=pP(mj),gj=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 gj(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 hS=y.createContext({}),yj={[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")},vj={[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)"},xj=e=>{const t={...yj};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 wj({children:e,widget:t}){const n=xj(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=()=>vj[r];return w.jsx(hS.Provider,{value:{colors:n,getColor:i,getRadius:s},children:e})}const nr=()=>y.useContext(hS);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,S0[n]&&S0[n][r],$2[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 Ml=Object.create(null);Object.keys(Mn).forEach(e=>{Ml[Mn[e]]=e});const ah={type:"error",data:"parser error"},pS=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",mS=typeof ArrayBuffer=="function",gS=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,cm=({type:e,data:t},n,r)=>pS&&t instanceof Blob?n?r(t):By(t,r):mS&&(t instanceof ArrayBuffer||gS(t))?n?r(t):By(new Blob([t]),r):r(Mn[e]+(t||"")),By=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function zy(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let mf;function bj(e,t){if(pS&&e.data instanceof Blob)return e.data.arrayBuffer().then(zy).then(t);if(mS&&(e.data instanceof ArrayBuffer||gS(e.data)))return t(zy(e.data));cm(e,!1,n=>{mf||(mf=new TextEncoder),t(mf.encode(n))})}const Uy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",So=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Uy.length;e++)So[Uy.charCodeAt(e)]=e;const Sj=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=So[e.charCodeAt(r)],o=So[e.charCodeAt(r+1)],a=So[e.charCodeAt(r+2)],l=So[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},Tj=typeof ArrayBuffer=="function",fm=(e,t)=>{if(typeof e!="string")return{type:"message",data:yS(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Ej(e.substring(1),t)}:Ml[n]?e.length>1?{type:Ml[n],data:e.substring(1)}:{type:Ml[n]}:ah},Ej=(e,t)=>{if(Tj){const n=Sj(e);return yS(n,t)}else return{base64:!0,data:e}},yS=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},vS="",Cj=(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(vS))})})},kj=(e,t)=>{const n=e.split(vS),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 _j(){return new TransformStream({transform(e,t){bj(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 fl(e){return e.reduce((t,n)=>t+n.length,0)}function dl(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 Pj(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(fl(n)<1)break;const l=dl(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(fl(n)<2)break;const l=dl(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(fl(n)<8)break;const l=dl(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),f=u.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(ah);break}i=f*Math.pow(2,32)+u.getUint32(4),r=3}else{if(fl(n)<i)break;const l=dl(n,i);a.enqueue(fm(s?l:gf.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(ah);break}}}})}const xS=4;function Me(e){if(e)return Aj(e)}function Aj(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 Yu=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")(),Rj="arraybuffer";function wS(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Oj=Qt.setTimeout,jj=Qt.clearTimeout;function Xu(e,t){t.useNativeTimers?(e.setTimeoutFn=Oj.bind(Qt),e.clearTimeoutFn=jj.bind(Qt)):(e.setTimeoutFn=Qt.setTimeout.bind(Qt),e.clearTimeoutFn=Qt.clearTimeout.bind(Qt))}const Nj=1.33;function Mj(e){return typeof e=="string"?Dj(e):Math.ceil((e.byteLength||e.size)*Nj)}function Dj(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 bS(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Fj(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Lj(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 Ij extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class dm extends Me{constructor(t){super(),this.writable=!1,Xu(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 Ij(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=Fj(t);return n.length?"?"+n:""}}class $j 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)};kj(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,Cj(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]=bS()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let SS=!1;try{SS=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Vj=SS;function Bj(){}class zj extends $j{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,Xu(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=wS(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=Bj,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",Hy);else if(typeof addEventListener=="function"){const e="onpagehide"in Qt?"pagehide":"unload";addEventListener(e,Hy,!1)}}function Hy(){for(let e in Nn.requests)Nn.requests.hasOwnProperty(e)&&Nn.requests[e].abort()}const Uj=function(){const e=TS({xdomain:!1});return e&&e.responseType!==null}();class Hj extends zj{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=Uj&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Nn(TS,this.uri(),t)}}function TS(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Vj))return new XMLHttpRequest}catch{}if(!t)try{return new Qt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const ES=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Wj extends dm{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=ES?{}:wS(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&&Yu(()=>{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]=bS()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const yf=Qt.WebSocket||Qt.MozWebSocket;class Kj extends Wj{createSocket(t,n,r){return ES?new yf(t,n,r):n?new yf(t,n):new yf(t)}doWrite(t,n){this.ws.send(n)}}class qj 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=Pj(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=_j();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&&Yu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Gj={websocket:Kj,webtransport:qj,polling:Hj},Qj=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Yj=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function lh(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[Yj[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=Xj(s,s.path),s.queryKey=Zj(s,s.query),s}function Xj(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 Zj(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const uh=typeof addEventListener=="function"&&typeof removeEventListener=="function",Dl=[];uh&&addEventListener("offline",()=>{Dl.forEach(e=>e())},!1);class Lr extends Me{constructor(t,n){if(super(),this.binaryType=Rj,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=lh(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=lh(n.host).host);Xu(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=Lj(this.opts.query)),uh&&(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"})},Dl.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=xS,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+=Mj(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,Yu(()=>{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(),uh&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Dl.indexOf(this._offlineEventListener);r!==-1&&Dl.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Lr.protocol=xS;class Jj 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 eN=class extends Jj{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=>Gj[i]).filter(i=>!!i)),super(t,r)}};function tN(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=lh(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 nN=typeof ArrayBuffer=="function",rN=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,CS=Object.prototype.toString,iN=typeof Blob=="function"||typeof Blob<"u"&&CS.call(Blob)==="[object BlobConstructor]",sN=typeof File=="function"||typeof File<"u"&&CS.call(File)==="[object FileConstructor]";function hm(e){return nN&&(e instanceof ArrayBuffer||rN(e))||iN&&e instanceof Blob||sN&&e instanceof File}function Fl(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Fl(e[n]))return!0;return!1}if(hm(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Fl(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Fl(e[n]))return!0;return!1}function oN(e){const t=[],n=e.data,r=e;return r.data=ch(n,t),r.attachments=t.length,{packet:r,buffers:t}}function ch(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]=ch(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]=ch(e[r],t));return n}return e}function aN(e,t){return e.data=fh(e.data,t),delete e.attachments,e}function fh(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]=fh(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=fh(e[n],t));return e}const lN=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],uN=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 cN{constructor(t){this.replacer=t}encode(t){return(t.type===te.EVENT||t.type===te.ACK)&&Fl(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=oN(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function Wy(e){return Object.prototype.toString.call(e)==="[object Object]"}class pm 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 fN(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 Wy(n);case te.DISCONNECT:return n===void 0;case te.CONNECT_ERROR:return typeof n=="string"||Wy(n);case te.EVENT:case te.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&lN.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 fN{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=aN(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const dN=Object.freeze(Object.defineProperty({__proto__:null,Decoder:pm,Encoder:cN,get PacketType(){return te},protocol:uN},Symbol.toStringTag,{value:"Module"}));function fn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const hN=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class kS 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(hN.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 Js(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}Js.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};Js.prototype.reset=function(){this.attempts=0};Js.prototype.setMin=function(e){this.ms=e};Js.prototype.setMax=function(e){this.max=e};Js.prototype.setJitter=function(e){this.jitter=e};class dh 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,Xu(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 Js({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||dN;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 eN(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){Yu(()=>{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 kS(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 ho={};function Ll(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=tN(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=ho[i]&&s in ho[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new dh(r,t):(ho[i]||(ho[i]=new dh(r,t)),l=ho[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Ll,{Manager:dh,Socket:kS,io:Ll,connect:Ll});const Il=e=>{const t=document.cookie.split(";").find(n=>n.includes(e));return t?t.split("=")[1]:null};var Si=(e=>(e.CustomerToken="lc:customer:token",e.CustomerRefreshToken="lc:customer:refresh_token",e.DeviceId="lc:device:id",e))(Si||{});const vf=(e,t)=>{localStorage.setItem(e,t)},xf=e=>localStorage.getItem(e),Ky=()=>{localStorage.removeItem("lc:customer:token"),localStorage.removeItem("lc:customer:refresh_token"),localStorage.removeItem("lc:device:id")},_S=y.createContext(null),Vi=()=>y.useContext(_S),pN=({children:e})=>{const[t,n]=y.useState(null),[r,i]=y.useState(!1),s=()=>{const c=Ll(kk,{transports:["websocket"],auth:{customer_token:xf(Si.CustomerToken)||Il("customer_token"),device_id:xf(Si.DeviceId)||Il("device_id"),customer_refresh_token:xf(Si.CustomerRefreshToken)||Il("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(_S.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 mm=e=>{const t=Rw(),n=(r,i)=>{var o;const s=((o=RI.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}};function mN(e){return e&&typeof e=="object"&&"customer_token"in e&&"customer_refresh_token"in e}const gN=()=>Sw({mutationFn:e=>Ca(`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})})}),yN=e=>Ca(`clients/${e}/chats`),hh=e=>Ca(`clients/${e}/chats`,{method:"DELETE"}),vN=(e,t)=>Ca("review",{method:"POST",body:JSON.stringify({rating:e,comment:t})}),xN=()=>Sw({mutationFn:e=>vN(e.rating,e.comment)}),PS=(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 AS({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 wN="/notify.mp3",bN=async e=>{await new Audio(e||wN).play()};function SN({fallback:e,fallbackOpen:t}){const[n]=y.useState(window.document.title),r=Vi(),{isHaveChat:i,open:s,soundPath:o}=tn(),[a,l]=y.useState(!0),[u,f]=y.useState(0),[c,d]=y.useState(null),h=()=>{bN(o)},m=(v,b)=>{if(c&&clearInterval(c),v||!i||b===0||Number.isNaN(b)){window.document.title=n,d(null);return}const p=setInterval(()=>{if(v||!i||b===0||Number.isNaN(b)){window.document.title=n,clearInterval(p),d(null);return}const g=`${b} Yeni mesajınız var! - ${n}`;window.document.title!==g?window.document.title=g:window.document.title=n},1e3);return d(p),()=>{clearInterval(p),d(null)}};return y.useEffect(()=>m(s&&a,u),[u,s,a]),y.useEffect(()=>{const v=()=>{l(document.visibilityState==="visible")};return document.addEventListener("visibilitychange",v,!1),()=>{document.removeEventListener("visibilitychange",v)}},[]),y.useEffect(()=>{if(!r||!i||s&&a)return;const v=()=>{!i||s&&a||(f(b=>b+1),h())};return r.on(ut.MessageAgentCreate,v),r.on(ut.ChatUserAssignee,h),()=>{r.off(ut.MessageAgentCreate,v),r.off(ut.ChatUserAssignee,h)}},[r,i,s,a]),s?null:!i||u===0?t?e:null:w.jsx(AS,{text:"Yeni mesajlar var!"})}function TN({children:e,defaultOpen:t,border:n}){var p,g,x,E;const r=Vi(),{open:i,setOpen:s,setIsHaveChat:o,isHaveChat:a,widget:l}=tn(),[u]=y.useState(!0),f=mm(),c=_a(),d=nr(),h=gm();y.useEffect(()=>{a&&c.pathname==="/"&&f.push("chat")},[a]);const m=()=>{s(!0),r&&r.emit(Dn.WidgetOpen,{})},v=()=>{s(!1),r&&r.emit(Dn.WidgetClose,{})},b=()=>{s(!1),o(!1),hh(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=(x=l==null?void 0:l.appearance)==null?void 0:x.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(SN,{fallback:w.jsx(AS,{}),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:v,children:w.jsx(De.X,{className:"size-7"})})]})})]})})}function RS(e){const{widget:t}=tn();return w.jsx(wj,{widget:t,children:w.jsx(TN,{...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 EN=/[^.^\]^[]+|(?=\[\]|\.\.)/g,OS=/^\d+$/,CN=/^\d/,kN=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,_N=/^\s*(['"]?)(.*?)(\1)\s*$/,ym=512,qy=new Bi(ym),Gy=new Bi(ym),Qy=new Bi(ym),Ti={Cache:Bi,split:ph,normalizePath:wf,setter:function(e){var t=wf(e);return Gy.get(e)||Gy.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=wf(e);return Qy.get(e)||Qy.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)||OS.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){PN(Array.isArray(e)?e:ph(e),t,n)}};function wf(e){return qy.get(e)||qy.set(e,ph(e).map(function(t){return t.replace(_N,"$2")}))}function ph(e){return e.match(EN)||[""]}function PN(e,t,n){var r=e.length,i,s,o,a;for(s=0;s<r;s++)i=e[s],i&&(ON(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 AN(e){return e.match(CN)&&!e.match(OS)}function RN(e){return kN.test(e)}function ON(e){return!vm(e)&&(AN(e)||RN(e))}const jN=/[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,Zu=e=>e.match(jN)||[],Ju=e=>e[0].toUpperCase()+e.slice(1),xm=(e,t)=>Zu(e).join(t).toLowerCase(),jS=e=>Zu(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),NN=e=>Ju(jS(e)),MN=e=>xm(e,"_"),DN=e=>xm(e,"-"),FN=e=>Ju(xm(e," ")),LN=e=>Zu(e).map(Ju).join(" ");var bf={words:Zu,upperFirst:Ju,camelCase:jS,pascalCase:NN,snakeCase:MN,kebabCase:DN,sentenceCase:FN,titleCase:LN},wm={exports:{}};wm.exports=function(e){return NS(IN(e),e)};wm.exports.array=NS;function NS(e,t){var n=e.length,r=new Array(n),i={},s=n,o=$N(t),a=VN(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 IN(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 $N(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 VN(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var BN=wm.exports;const zN=Ks(BN),UN=Object.prototype.toString,HN=Error.prototype.toString,WN=RegExp.prototype.toString,KN=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",qN=/^Symbol\((.*)\)(.*)$/;function GN(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function Yy(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return GN(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return KN.call(e).replace(qN,"Symbol($1)");const r=UN.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+HN.call(e)+"]":r==="RegExp"?WN.call(e):null}function Ir(e,t){let n=Yy(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let s=Yy(this[r],t);return s!==null?s:i},2)}function MS(e){return e==null?[]:[].concat(e)}let DS,FS,LS,QN=/\$\{\s*(\w+)\s*\}/g;DS=Symbol.toStringTag;class Xy{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[DS]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],MS(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]}}FS=Symbol.hasInstance;LS=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(QN,(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 Xy(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[LS]="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[FS](t){return Xy[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"},YN={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"},mh={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},XN={isValue:"${path} field must be ${value}"},$l={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},ZN={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"},JN={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:YN,date:mh,object:$l,array:ZN,boolean:XN,tuple:JN});const bm=e=>e&&e.__isYupSchema__;class Tu{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 Tu(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(!bm(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const hl={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]===hl.context,this.isValue=this.key[0]===hl.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?hl.context:this.isValue?hl.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 ci=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:v,abortEarly:b=o.spec.abortEarly,disableStackTrace:p=o.spec.disableStackTrace}=i;function g(I){return zi.isRef(I)?I.getValue(n,m,v):I}function x(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:x,resolve:g,options:i,originalValue:s,schema:o};const C=I=>{bt.isError(I)?E(I):I?l(null):E(x())},k=I=>{bt.isError(I)?E(I):a(I)};if(h&&ci(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 eM(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 Eu 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 Eu(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function ps(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]=ps(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,ps(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(ps(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=ps(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 Eu,this._blacklist=new Eu,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=ps(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&&ci(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(B2,{isPresent:t,childRef:i,sizeRef:s,children:y.cloneElement(e,{ref:i})})}const U2=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a})=>{const l=Rp(H2),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(z2,{isPresent:n,anchorX:a,children:e})),w.jsx(Ku.Provider,{value:c,children:e})};function H2(){return new Map}function Bw(e=!0){const t=y.useContext(Ku);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 ll=e=>e.key||"";function T0(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]=Bw(o),f=y.useMemo(()=>T0(e),[e]),c=o&&!l?[]:f.map(ll),d=y.useRef(!0),h=y.useRef(f),m=Rp(()=>new Map),[v,b]=y.useState(f),[p,g]=y.useState(f);Vw(()=>{d.current=!1,h.current=f;for(let S=0;S<p.length;S++){const C=ll(p[S]);c.includes(C)?m.delete(C):m.get(C)!==!0&&m.set(C,!1)}},[p,c.length,c.join("-")]);const x=[];if(f!==v){let S=[...f];for(let C=0;C<p.length;C++){const k=p[C],P=ll(k);c.includes(P)||(S.splice(C,0,k),x.push(k))}return s==="wait"&&x.length&&(S=x),g(T0(S)),b(f),null}const{forceRender:E}=y.useContext(Ap);return w.jsx(w.Fragment,{children:p.map(S=>{const C=ll(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(U2,{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 Np(e,t){e.indexOf(t)===-1&&e.push(t)}function Mp(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let Bd=()=>{};const zd={skipAnimations:!1,useManualTiming:!1};function Dp(e){let t;return()=>(t===void 0&&(t=e()),t)}const Zt=e=>e,sa=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Fp{constructor(){this.subscriptions=[]}add(t){return Np(this.subscriptions,t),()=>Mp(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 zw(e,t){return t?e*(1e3/t):0}const W2=Dp(()=>window.ScrollTimeline!==void 0);class K2{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(W2()&&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 q2 extends K2{then(t,n){return this.finished.finally(t).then(()=>{})}}const E0={value:null,addProjectionMetrics:null},Lp=e=>Array.isArray(e)&&typeof e[0]=="number",G2={};function Q2(e,t){const n=Dp(e);return()=>G2[t]??n()}const oa=Q2(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Uw=(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)})`},bo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Ud={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:bo([0,.65,.55,1]),circOut:bo([.55,0,1,.45]),backIn:bo([.31,.01,.66,-.59]),backOut:bo([.33,1.53,.69,.99])};function Hw(e,t){if(e)return typeof e=="function"&&oa()?Uw(e,t):Lp(e)?bo(e):Array.isArray(e)?e.map(n=>Hw(n,t)||Ud.easeOut):Ud[e]}function Y2(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=Hw(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 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 yu=2e4;function Vp(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<yu;)t+=n,r=e.next(t);return t>=yu?1/0:t}function X2(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Vp(r),yu);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Rn(i)}}function Ww(e){return!!(typeof e=="function"&&oa()||!e||typeof e=="string"&&(e in Ud||oa())||Lp(e)||Array.isArray(e)&&e.every(Ww))}function C0(e,t){e.timeline=t,e.onfinish=null}const ul=["read","resolveKeyframes","update","preRender","render","postRender"];function Z2(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 v=h&&i?n:r;return d&&o.add(c),v.has(c)||v.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&&E0.value&&E0.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,f.process(c))}};return f}const J2=40;function Kw(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=ul.reduce((p,g)=>(p[g]=Z2(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,J2),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:ul.reduce((p,g)=>{const x=o[g];return p[g]=(E,S=!1,C=!1)=>(n||m(),x.schedule(E,S,C)),p},{}),cancel:p=>{for(let g=0;g<ul.length;g++)o[ul[g]].cancel(p)},state:i,steps:o}}const{schedule:Bp,cancel:II}=Kw(queueMicrotask,!1),{schedule:he,cancel:Ur,state:Ge,steps:nf}=Kw(typeof requestAnimationFrame<"u"?requestAnimationFrame:Zt,!0);let jl;function eP(){jl=void 0}const On={now:()=>(jl===void 0&&On.set(Ge.isProcessing||zd.useManualTiming?Ge.timestamp:performance.now()),jl),set:e=>{jl=e,queueMicrotask(eP)}},an={x:!1,y:!1};function qw(){return an.x||an.y}function tP(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 nP(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 Gw(e,t){const n=nP(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function k0(e){return!(e.pointerType==="touch"||qw())}function rP(e,t,n={}){const[r,i,s]=Gw(e,n),o=a=>{if(!k0(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const f=c=>{k0(c)&&(u(c),l.removeEventListener("pointerleave",f))};l.addEventListener("pointerleave",f,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const Qw=(e,t)=>t?e===t?!0:Qw(e,t.parentElement):!1,zp=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,iP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function sP(e){return iP.has(e.tagName)||e.tabIndex!==-1}const So=new WeakSet;function _0(e){return t=>{t.key==="Enter"&&e(t)}}function rf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const oP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=_0(()=>{if(So.has(n))return;rf(n,"down");const i=_0(()=>{rf(n,"up")}),s=()=>rf(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 P0(e){return zp(e)&&!qw()}function aP(e,t,n={}){const[r,i,s]=Gw(e,n),o=a=>{const l=a.currentTarget;if(!P0(a)||So.has(l))return;So.add(l);const u=t(l,a),f=(h,m)=>{window.removeEventListener("pointerup",c),window.removeEventListener("pointercancel",d),!(!P0(h)||!So.has(l))&&(So.delete(l),typeof u=="function"&&u(h,{success:m}))},c=h=>{f(h,l===window||l===document||n.useGlobalTarget||Qw(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=>oP(u,i)),!sP(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}const A0=30,lP=e=>!isNaN(parseFloat(e));class uP{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=lP(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>A0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,A0);return zw(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 aa(e,t){return new uP(e,t)}const Yw=y.createContext({strict:!1}),R0={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"]},Hs={};for(const e in R0)Hs[e]={isEnabled:t=>R0[e].some(n=>!!t[n])};function cP(e){for(const t in e)Hs[t]={...Hs[t],...e[t]}}const fP=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 vu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||fP.has(e)}let Xw=e=>!vu(e);function dP(e){e&&(Xw=t=>t.startsWith("on")?!vu(t):e(t))}try{dP(require("@emotion/is-prop-valid").default)}catch{}function hP(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Xw(i)||n===!0&&vu(i)||!t&&!vu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function pP(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 qu=y.createContext({});function Gu(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function la(e){return typeof e=="string"||Array.isArray(e)}const Up=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Hp=["initial",...Up];function Qu(e){return Gu(e.animate)||Hp.some(t=>la(e[t]))}function Zw(e){return!!(Qu(e)||e.variants)}function mP(e,t){if(Qu(e)){const{initial:n,animate:r}=e;return{initial:n===!1||la(n)?n:void 0,animate:la(r)?r:void 0}}return e.inherit!==!1?t:{}}function gP(e){const{initial:t,animate:n}=mP(e,y.useContext(qu));return y.useMemo(()=>({initial:t,animate:n}),[O0(t),O0(n)])}function O0(e){return Array.isArray(e)?e.join(" "):e}const yP=Symbol.for("motionComponentSymbol");function us(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function vP(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):us(n)&&(n.current=r))},[t])}const Wp=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),xP="framerAppearId",Jw="data-"+Wp(xP),eb=y.createContext({});function wP(e,t,n,r,i){var v,b;const{visualElement:s}=y.useContext(qu),o=y.useContext(Yw),a=y.useContext(Ku),l=y.useContext(jp).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(eb);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&bP(u.current,n,i,c);const d=y.useRef(!1);y.useInsertionEffect(()=>{f&&d.current&&f.update(n,a)});const h=n[Jw],m=y.useRef(!!h&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,h))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,h)));return Vw(()=>{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 bP(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:tb(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&us(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:f,layoutScroll:l,layoutRoot:u})}function tb(e){if(e)return e.options.allowProjection!==!1?e.projection:tb(e.parent)}function SP({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&cP(e);function s(a,l){let u;const f={...y.useContext(jp),...a,layoutId:TP(a)},{isStatic:c}=f,d=gP(a),h=r(a,c);if(!c&&Op){EP();const m=CP(f);u=m.MeasureLayout,d.visualElement=wP(i,h,f,t,m.ProjectionNode)}return w.jsxs(qu.Provider,{value:d,children:[u&&d.visualElement?w.jsx(u,{visualElement:d.visualElement,...f}):null,n(i,a,vP(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[yP]=i,o}function TP({layoutId:e}){const t=y.useContext(Ap).id;return t&&e!==void 0?t+"-"+e:e}function EP(e,t){y.useContext(Yw).strict}function CP(e){const{drag:t,layout:n}=Hs;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 nb=e=>t=>typeof t=="string"&&t.startsWith(e),Kp=nb("--"),kP=nb("var(--"),qp=e=>kP(e)?_P.test(e.split("/*")[0].trim()):!1,_P=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ua={};function PP(e){for(const t in e)ua[t]=e[t],Kp(t)&&(ua[t].isCSSVariable=!0)}const Zs=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],$i=new Set(Zs);function rb(e,{layout:t,layoutId:n}){return $i.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ua[e]||e==="opacity")}const it=e=>!!(e&&e.getVelocity),ib=(e,t)=>t&&typeof e=="number"?t.transform(e):e,tr=(e,t,n)=>n>t?t:n<e?e:n,Js={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ca={...Js,transform:e=>tr(0,1,e)},cl={...Js,default:1},Aa=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),cr=Aa("deg"),jn=Aa("%"),W=Aa("px"),AP=Aa("vh"),RP=Aa("vw"),j0={...jn,parse:e=>jn.parse(e)/100,transform:e=>jn.transform(e*100)},OP={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},jP={rotate:cr,rotateX:cr,rotateY:cr,rotateZ:cr,scale:cl,scaleX:cl,scaleY:cl,scaleZ:cl,skew:cr,skewX:cr,skewY:cr,distance:W,translateX:W,translateY:W,translateZ:W,x:W,y:W,z:W,perspective:W,transformPerspective:W,opacity:ca,originX:j0,originY:j0,originZ:W},N0={...Js,transform:Math.round},Gp={...OP,...jP,zIndex:N0,size:W,fillOpacity:ca,strokeOpacity:ca,numOctaves:N0},NP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},MP=Zs.length;function DP(e,t,n){let r="",i=!0;for(let s=0;s<MP;s++){const o=Zs[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=ib(a,Gp[o]);if(!l){i=!1;const f=NP[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(Kp(l)){i[l]=u;continue}else{const f=ib(u,Gp[l]);l.startsWith("origin")?(a=!0,s[l]=f):r[l]=f}}if(t.transform||(o||n?r.transform=DP(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 Yp=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function sb(e,t,n){for(const r in t)!it(t[r])&&!rb(r,n)&&(e[r]=t[r])}function FP({transformTemplate:e},t){return y.useMemo(()=>{const n=Yp();return Qp(n,t,e),Object.assign({},n.vars,n.style)},[t])}function LP(e,t){const n=e.style||{},r={};return sb(r,n,e),Object.assign(r,FP(e,t)),r}function IP(e,t){const n={},r=LP(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 $P=["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:!!($P.indexOf(e)>-1||/[A-Z]/u.test(e))}const VP={offset:"stroke-dashoffset",array:"stroke-dasharray"},BP={offset:"strokeDashoffset",array:"strokeDasharray"};function zP(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?VP:BP;e[s.offset]=W.transform(-r);const o=W.transform(t),a=W.transform(n);e[s.array]=`${o} ${a}`}function M0(e,t,n){return typeof e=="string"?e:W.transform(t+n*e)}function UP(e,t,n){const r=M0(t,e.x,e.width),i=M0(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,...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=UP(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&&zP(d,o,a,l,!1)}const ob=()=>({...Yp(),attrs:{}}),Jp=e=>typeof e=="string"&&e.toLowerCase()==="svg";function HP(e,t,n,r){const i=y.useMemo(()=>{const s=ob();return Zp(s,t,Jp(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};sb(s,e.style,e),i.style={...s,...i.style}}return i}function WP(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Xp(n)?HP:IP)(r,s,o,n),u=hP(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 D0(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]=D0(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]=D0(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const Hd=e=>Array.isArray(e),KP=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),qP=e=>Hd(e)?e[e.length-1]||0:e;function Nl(e){const t=it(e)?e.get():e;return KP(t)?t.toValue():t}function GP({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 ab=e=>(t,n)=>{const r=y.useContext(qu),i=y.useContext(Ku),s=()=>GP(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]=Nl(s[d]);let{initial:o,animate:a}=e;const l=Qu(e),u=Zw(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"&&!Gu(c)){const d=Array.isArray(c)?c:[c];for(let h=0;h<d.length;h++){const m=em(e,d[h]);if(m){const{transitionEnd:v,transition:b,...p}=m;for(const g in p){let x=p[g];if(Array.isArray(x)){const E=f?x.length-1:0;x=x[E]}x!==null&&(i[g]=x)}for(const g in v)i[g]=v[g]}}}return i}function tm(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(it(r[o])||t.style&&it(t.style[o])||rb(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const YP={useVisualState:ab({scrapeMotionValuesFromProps:tm,createRenderState:Yp})};function lb(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 ub(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 cb=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 fb(e,t,n,r){ub(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(cb.has(i)?i:Wp(i),t.attrs[i])}function db(e,t,n){const r=tm(e,t,n);for(const i in e)if(it(e[i])||it(t[i])){const s=Zs.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const F0=["x","y","width","height","cx","cy","r"],XP={useVisualState:ab({scrapeMotionValuesFromProps:db,createRenderState:ob,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<F0.length;a++){const l=F0[a];e[l]!==t[l]&&(o=!0)}o&&he.read(()=>{lb(n,r),he.render(()=>{Zp(r,i,Jp(n.tagName),e.transformTemplate),fb(n,r)})})}})};function ZP(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Xp(r)?XP:YP,preloadedFeatures:e,useRender:WP(i),createVisualElement:t,Component:r};return SP(o)}}function fa(e,t,n){const r=e.getProps();return em(r,t,n!==void 0?n:r.custom,e)}const hb=new Set(["width","height","top","left","right","bottom",...Zs]);function JP(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,aa(n))}function eA(e,t){const n=fa(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=qP(s[o]);JP(e,o,a)}}function tA(e){return!!(it(e)&&e.add)}function Wd(e,t){const n=e.getValue("willChange");if(tA(n))return n.add(t);if(!n&&zd.WillChange){const r=new zd.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function pb(e){return e.props[Jw]}const mb=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,nA=1e-7,rA=12;function iA(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=mb(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>nA&&++a<rA);return o}function Ra(e,t,n,r){if(e===t&&n===r)return Zt;const i=s=>iA(s,0,1,e,n);return s=>s===0||s===1?s:mb(i(s),t,r)}const gb=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,yb=e=>t=>1-e(1-t),vb=Ra(.33,1.53,.69,.99),nm=yb(vb),xb=gb(nm),wb=e=>(e*=2)<1?.5*nm(e):.5*(2-Math.pow(2,-10*(e-1))),rm=e=>1-Math.sin(Math.acos(e)),bb=yb(rm),Sb=gb(rm),Tb=e=>/^0[^.\s]+$/u.test(e);function sA(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Tb(e):!0}const No=e=>Math.round(e*1e5)/1e5,im=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function oA(e){return e==null}const aA=/^(?:#[\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"&&aA.test(n)&&n.startsWith(e)||t&&!oA(n)&&Object.prototype.hasOwnProperty.call(n,t)),Eb=(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}},lA=e=>tr(0,255,e),sf={...Js,transform:e=>Math.round(lA(e))},ui={test:sm("rgb","red"),parse:Eb("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+sf.transform(e)+", "+sf.transform(t)+", "+sf.transform(n)+", "+No(ca.transform(r))+")"};function uA(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 Kd={test:sm("#"),parse:uA,transform:ui.transform},cs={test:sm("hsl","hue"),parse:Eb("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+jn.transform(No(t))+", "+jn.transform(No(n))+", "+No(ca.transform(r))+")"},nt={test:e=>ui.test(e)||Kd.test(e)||cs.test(e),parse:e=>ui.test(e)?ui.parse(e):cs.test(e)?cs.parse(e):Kd.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ui.transform(e):cs.transform(e)},cA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function fA(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(im))==null?void 0:t.length)||0)+(((n=e.match(cA))==null?void 0:n.length)||0)>0}const Cb="number",kb="color",dA="var",hA="var(",L0="${}",pA=/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 da(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(pA,l=>(nt.test(l)?(r.color.push(s),i.push(kb),n.push(nt.parse(l))):l.startsWith(hA)?(r.var.push(s),i.push(dA),n.push(l)):(r.number.push(s),i.push(Cb),n.push(parseFloat(l))),++s,L0)).split(L0);return{values:n,split:a,indexes:r,types:i}}function _b(e){return da(e).values}function Pb(e){const{split:t,types:n}=da(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===Cb?s+=No(i[o]):a===kb?s+=nt.transform(i[o]):s+=i[o]}return s}}const mA=e=>typeof e=="number"?0:e;function gA(e){const t=_b(e);return Pb(e)(t.map(mA))}const Hr={test:fA,parse:_b,createTransformer:Pb,getAnimatableNone:gA},yA=new Set(["brightness","contrast","saturate","opacity"]);function vA(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=yA.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const xA=/\b([a-z-]*)\(.*?\)/gu,qd={...Hr,getAnimatableNone:e=>{const t=e.match(xA);return t?t.map(vA).join(" "):e}},wA={...Gp,color:nt,backgroundColor:nt,outlineColor:nt,fill:nt,stroke:nt,borderColor:nt,borderTopColor:nt,borderRightColor:nt,borderBottomColor:nt,borderLeftColor:nt,filter:qd,WebkitFilter:qd},Ab=e=>wA[e];function Rb(e,t){let n=Ab(e);return n!==qd&&(n=Hr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const bA=new Set(["auto","none","0"]);function SA(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!bA.has(s)&&da(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=Rb(n,i)}const ci=e=>e*180/Math.PI,Gd=e=>{const t=ci(Math.atan2(e[1],e[0]));return Qd(t)},TA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Gd,rotateZ:Gd,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),I0=Gd,$0=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),V0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),EA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:$0,scaleY:V0,scale:e=>($0(e)+V0(e))/2,rotateX:e=>Qd(ci(Math.atan2(e[6],e[5]))),rotateY:e=>Qd(ci(Math.atan2(-e[2],e[0]))),rotateZ:I0,rotate:I0,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 B0(e){return e.includes("scale")?1:0}function Yd(e,t){if(!e||e==="none")return B0(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=EA,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=TA,i=a}if(!i)return B0(t);const s=r[t],o=i[1].split(",").map(kA);return typeof s=="function"?s(o):o[s]}const CA=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Yd(n,t)};function kA(e){return parseFloat(e.trim())}const z0=e=>e===Js||e===W,_A=new Set(["x","y","z"]),PA=Zs.filter(e=>!_A.has(e));function AA(e){const t=[];return PA.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Ws={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})=>Yd(t,"x"),y:(e,{transform:t})=>Yd(t,"y")};Ws.translateX=Ws.x;Ws.translateY=Ws.y;const Si=new Set;let Xd=!1,Zd=!1;function Ob(){if(Zd){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=AA(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)})}Zd=!1,Xd=!1,Si.forEach(e=>e.complete()),Si.clear()}function jb(){Si.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Zd=!0)})}function RA(){jb(),Ob()}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),Xd||(Xd=!0,he.read(jb),he.resolveKeyframes(Ob))):(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 Nb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),OA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function jA(e){const t=OA.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function Mb(e,t,n=1){const[r,i]=jA(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return Nb(o)?parseFloat(o):o}return qp(i)?Mb(i,t,n+1):i}const Db=e=>t=>t.test(e),NA={test:e=>e==="auto",parse:e=>e},Fb=[Js,W,jn,cr,RP,AP,NA],U0=e=>Fb.find(Db(e));class Lb 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 u=t[l];if(typeof u=="string"&&(u=u.trim(),qp(u))){const f=Mb(u,n.current);f!==void 0&&(t[l]=f),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!hb.has(r)||t.length!==2)return;const[i,s]=t,o=U0(i),a=U0(s);if(o!==a)if(z0(o)&&z0(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++)sA(t[i])&&r.push(i);r.length&&SA(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=Ws[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]=Ws[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 H0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Hr.test(e)||e==="0")&&!e.startsWith("url("));function MA(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 DA(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=H0(i,t),a=H0(s,t);return!o||!a?!1:MA(e)||(n==="spring"||Ip(n))&&r}const FA=e=>e!==null;function Yu(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(FA),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const LA=40;class Ib{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>LA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&RA(),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&&!DA(t,r,i,s))if(o)this.options.duration=0;else{l&&l(Yu(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 of(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 IA({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=of(l,a,e+1/3),s=of(l,a,e),o=of(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function xu(e,t){return n=>n>0?t:e}const af=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},$A=[Kd,ui,cs],VA=e=>$A.find(t=>t.test(e));function W0(e){const t=VA(e);if(!t)return!1;let n=t.parse(e);return t===cs&&(n=IA(n)),n}const K0=(e,t)=>{const n=W0(e),r=W0(t);if(!n||!r)return xu(e,t);const i={...n};return s=>(i.red=af(n.red,r.red,s),i.green=af(n.green,r.green,s),i.blue=af(n.blue,r.blue,s),i.alpha=be(n.alpha,r.alpha,s),ui.transform(i))},BA=(e,t)=>n=>t(e(n)),Oa=(...e)=>e.reduce(BA),Jd=new Set(["none","hidden"]);function zA(e,t){return Jd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function UA(e,t){return n=>be(e,t,n)}function am(e){return typeof e=="number"?UA:typeof e=="string"?qp(e)?xu:nt.test(e)?K0:KA:Array.isArray(e)?$b:typeof e=="object"?nt.test(e)?K0:HA:xu}function $b(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 HA(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 WA(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 KA=(e,t)=>{const n=Hr.createTransformer(t),r=da(e),i=da(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?Jd.has(e)&&!i.values.length||Jd.has(t)&&!r.values.length?zA(e,t):Oa($b(WA(r,i),i.values),n):xu(e,t)};function Vb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?be(e,t,n):am(e)(e,t)}const qA=5;function Bb(e,t,n){const r=Math.max(t-qA,0);return zw(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},lf=.001;function GA({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=u=>{const f=u*o,c=f*e,d=f-n,h=eh(u,o),m=Math.exp(-c);return lf-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),v=eh(Math.pow(u,2),o);return(-i(u)+lf>0?-1:1)*((d-h)*m)/v}):(i=u=>{const f=Math.exp(-u*e),c=(u-n)*e+1;return-lf+f*c},s=u=>{const f=Math.exp(-u*e),c=(n-u)*(e*e);return f*c});const a=5/e,l=YA(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 YA(e,t,n){let r=n;for(let i=1;i<QA;i++)r=r-e(r)/t(r);return r}function eh(e,t){return e*Math.sqrt(1-t*t)}const XA=["duration","bounce"],ZA=["stiffness","damping","mass"];function q0(e,t){return t.some(n=>e[n]!==void 0)}function JA(e){let t={velocity:Ce.velocity,stiffness:Ce.stiffness,damping:Ce.damping,mass:Ce.mass,isResolvedFromDuration:!1,...e};if(!q0(e,ZA)&&q0(e,XA))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=GA(e);t={...t,...n,mass:Ce.mass},t.isResolvedFromDuration=!0}return t}function wu(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}=JA({...n,velocity:-Rn(n.velocity||0)}),m=d||0,v=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 x;if(v<1){const S=eh(p,v);x=C=>{const k=Math.exp(-v*p*C);return o-k*((m+v*p*b)/S*Math.sin(S*C)+b*Math.cos(S*C))}}else if(v===1)x=S=>o-Math.exp(-p*S)*(b+(m+p*b)*S);else{const S=p*Math.sqrt(v*v-1);x=C=>{const k=Math.exp(-v*p*C),P=Math.min(S*C,300);return o-k*((m+v*p*b)*Math.sinh(P)+S*b*Math.cosh(P))/S}}const E={calculatedDuration:h&&c||null,next:S=>{const C=x(S);if(h)a.done=S>=c;else{let k=0;v<1&&(k=S===0?An(m):Bb(x,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),yu),C=Uw(k=>E.next(S*k).value,S,30);return S+"ms "+C},toTransition:()=>{}};return E}wu.applyToOptions=e=>{const t=X2(e,100,wu);return e.ease=oa()?t.ease:"easeOut",e.duration=An(t.duration),e.type="keyframes",e};function G0({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 v=n*t;const b=c+v,p=o===void 0?b:o(b);p!==b&&(v=p-c);const g=P=>-v*Math.exp(-P/r),x=P=>p+g(P),E=P=>{const j=g(P),N=x(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=wu({keyframes:[d.value,m(d.value)],velocity:Bb(x,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 eR=Ra(.42,0,1,1),tR=Ra(0,0,.58,1),zb=Ra(.42,0,.58,1),nR=e=>Array.isArray(e)&&typeof e[0]!="number",Q0={linear:Zt,easeIn:eR,easeInOut:zb,easeOut:tR,circIn:rm,circInOut:Sb,circOut:bb,backIn:nm,backInOut:xb,backOut:vb,anticipate:wb},Y0=e=>{if(Lp(e)){Bd(e.length===4);const[t,n,r,i]=e;return Ra(t,n,r,i)}else if(typeof e=="string")return Bd(Q0[e]!==void 0),Q0[e];return e};function rR(e,t,n){const r=[],i=n||Vb,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=Oa(l,a)}r.push(a)}return r}function iR(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(Bd(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=rR(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=sa(e[c],e[c+1],f);return a[c](d)};return n?f=>u(tr(e[0],e[s-1],f)):u}function sR(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=sa(0,t,r);e.push(be(n,1,i))}}function oR(e){const t=[0];return sR(t,e.length-1),t}function aR(e,t){return e.map(n=>n*t)}function lR(e,t){return e.map(()=>t||zb).splice(0,e.length-1)}function bu({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=nR(r)?r.map(Y0):Y0(r),s={done:!1,value:t[0]},o=aR(n&&n.length===t.length?n:oR(t),e),a=iR(o,t,{ease:Array.isArray(i)?i:lR(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const uR=e=>{const t=({timestamp:n})=>e(n);return{start:()=>he.update(t,!0),stop:()=>Ur(t),now:()=>Ge.isProcessing?Ge.timestamp:On.now()}},cR={decay:G0,inertia:G0,tween:bu,keyframes:bu,spring:wu},fR=e=>e/100;class lm extends Ib{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,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=Ip(n)?n:cR[n]||bu;let l,u;a!==bu&&typeof t[0]!="number"&&(l=Oa(fR,Vb(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=Vp(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:v,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 x=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,v&&(N-=v/c)):m==="mirror"&&(E=o)),x=tr(0,1,N)*c}const S=g?{done:!1,value:l[0]}:E.next(x);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=Yu(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=uR,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 dR=new Set(["opacity","clipPath","filter","transform"]),hR=Dp(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Su=10,pR=2e4;function mR(e){return Ip(e.type)||e.type==="spring"||!Ww(e.ease)}function gR(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<pR;)r=n.sample(s),i.push(r.value),s+=Su;return{times:void 0,keyframes:i,duration:s-Su,ease:"linear"}}const Ub={anticipate:wb,backInOut:xb,circInOut:Sb};function yR(e){return e in Ub}class X0 extends Ib{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new Lb(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"&&oa()&&yR(s)&&(s=Ub[s]),mR(this.options)){const{onComplete:c,onUpdate:d,motionValue:h,element:m,...v}=this.options,b=gR(t,v);t=b.keyframes,t.length===1&&(t[1]=t[0]),r=b.duration,i=b.times,s=b.ease,o="keyframes"}const f=Y2(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:s});return f.startTime=u??this.calcStartTime(),this.pendingTimeline?(C0(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:c}=this.options;a.set(Yu(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;C0(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 lm({...h,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),v=An(this.time);u.setWithVelocity(m.sample(v-Su).value,m.sample(v).value,Su)}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 hR()&&r&&dR.has(r)&&(r!=="transform"||!u)&&!l&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const vR={type:"spring",stiffness:500,damping:25,restSpeed:10},xR=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),wR={type:"keyframes",duration:.8},bR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},SR=(e,{keyframes:t})=>t.length>2?wR:$i.has(e)?e.startsWith("scale")?xR(t[1]):vR:bR;function TR({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 um=(e,t,n,r={},i,s)=>o=>{const a=$p(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};TR(a)||(f={...f,...SR(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=Yu(f.keyframes,a);if(d!==void 0)return he.update(()=>{f.onUpdate(d),f.onComplete()}),new q2([])}return!s&&X0.supports(f)?new X0(f):new lm(f)};function ER({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Hb(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&&ER(u,f))continue;const h={delay:n,...$p(s||{},f)};let m=!1;if(window.MotionHandoffAnimation){const b=pb(e);if(b){const p=window.MotionHandoffAnimation(b,f,he);p!==null&&(h.startTime=p,m=!0)}}Wd(e,f),c.start(um(f,c,d,e.shouldReduceMotion&&hb.has(f)?{type:!1}:h,e,m));const v=c.animation;v&&l.push(v)}return o&&Promise.all(l).then(()=>{he.update(()=>{o&&eA(e,o)})}),l}function th(e,t,n={}){var l;const r=fa(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(Hb(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:f=0,staggerChildren:c,staggerDirection:d}=i;return CR(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 CR(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(kR).forEach((u,f)=>{u.notify("AnimationStart",t),o.push(th(u,t,{...s,delay:n+l(f)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function kR(e,t){return e.sortNodePosition(t)}function _R(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>th(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=th(e,t,n);else{const i=typeof t=="function"?fa(e,t,n.custom):t;r=Promise.all(Hb(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Wb(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 PR=Hp.length;function Kb(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Kb(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<PR;n++){const r=Hp[n],i=e.props[r];(la(i)||i===!1)&&(t[r]=i)}return t}const AR=[...Up].reverse(),RR=Up.length;function OR(e){return t=>Promise.all(t.map(({animation:n,options:r})=>_R(e,n,r)))}function jR(e){let t=OR(e),n=Z0(),r=!0;const i=l=>(u,f)=>{var d;const c=fa(e,f,l==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);if(c){const{transition:h,transitionEnd:m,...v}=c;u={...u,...v,...m}}return u};function s(l){t=l(e)}function o(l){const{props:u}=e,f=Kb(e.parent)||{},c=[],d=new Set;let h={},m=1/0;for(let b=0;b<RR;b++){const p=AR[b],g=n[p],x=u[p]!==void 0?u[p]:f[p],E=la(x),S=p===l?g.isActive:null;S===!1&&(m=b);let C=x===f[p]&&x!==u[p]&&E;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),g.protectedKeys={...h},!g.isActive&&S===null||!x&&!g.prevProp||Gu(x)||typeof x=="boolean")continue;const k=NR(g.prevProp,x);let P=k||p===l&&g.isActive&&!C&&E||b>m&&E,j=!1;const N=Array.isArray(x)?x:[x];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;Hd(O)&&Hd(L)?B=!Wb(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=x,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=fa(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),x=e.getValue(p);x&&(x.liveStyle=!0),b[p]=g??null}),c.push({animation:b})}let v=!!c.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?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=Z0(),r=!0}}}function NR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Wb(t,e):!1}function Jr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Z0(){return{animate:Jr(!0),whileInView:Jr(),whileHover:Jr(),whileTap:Jr(),whileDrag:Jr(),whileFocus:Jr(),exit:Jr()}}class Qr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class MR extends Qr{constructor(t){super(t),t.animationState||(t.animationState=jR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Gu(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 DR=0;class FR extends Qr{constructor(){super(...arguments),this.id=DR++}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 LR={animation:{Feature:MR},exit:{Feature:FR}};function ha(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function ja(e){return{point:{x:e.pageX,y:e.pageY}}}const IR=e=>t=>zp(t)&&e(t,ja(t));function Mo(e,t,n,r){return ha(e,t,IR(n),r)}function qb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function $R({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function VR(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 Gb=1e-4,BR=1-Gb,zR=1+Gb,Qb=.01,UR=0-Qb,HR=0+Qb;function ct(e){return e.max-e.min}function WR(e,t,n){return Math.abs(e-t)<=n}function J0(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>=BR&&e.scale<=zR||isNaN(e.scale))&&(e.scale=1),(e.translate>=UR&&e.translate<=HR||isNaN(e.translate))&&(e.translate=0)}function Do(e,t,n,r){J0(e.x,t.x,n.x,r?r.originX:void 0),J0(e.y,t.y,n.y,r?r.originY:void 0)}function ey(e,t,n){e.min=n.min+t.min,e.max=e.min+ct(t)}function KR(e,t,n){ey(e.x,t.x,n.x),ey(e.y,t.y,n.y)}function ty(e,t,n){e.min=t.min-n.min,e.max=e.min+ct(t)}function Fo(e,t,n){ty(e.x,t.x,n.x),ty(e.y,t.y,n.y)}const ny=()=>({translate:0,scale:1,origin:0,originPoint:0}),fs=()=>({x:ny(),y:ny()}),ry=()=>({min:0,max:0}),Pe=()=>({x:ry(),y:ry()});function Ht(e){return[e("x"),e("y")]}function uf(e){return e===void 0||e===1}function nh({scale:e,scaleX:t,scaleY:n}){return!uf(e)||!uf(t)||!uf(n)}function ri(e){return nh(e)||Yb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Yb(e){return iy(e.x)||iy(e.y)}function iy(e){return e&&e!=="0%"}function Tu(e,t,n){const r=e-n,i=t*r;return n+i}function sy(e,t,n,r,i){return i!==void 0&&(e=Tu(e,i,r)),Tu(e,n,r)+t}function rh(e,t=0,n=1,r,i){e.min=sy(e.min,t,n,r,i),e.max=sy(e.max,t,n,r,i)}function Xb(e,{x:t,y:n}){rh(e.x,t.translate,t.scale,t.originPoint),rh(e.y,n.translate,n.scale,n.originPoint)}const oy=.999999999999,ay=1.0000000000001;function qR(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&&hs(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Xb(e,o)),r&&ri(s.latestValues)&&hs(e,s.latestValues))}t.x<ay&&t.x>oy&&(t.x=1),t.y<ay&&t.y>oy&&(t.y=1)}function ds(e,t){e.min=e.min+t,e.max=e.max+t}function ly(e,t,n,r,i=.5){const s=be(e.min,e.max,i);rh(e,t,n,s,r)}function hs(e,t){ly(e.x,t.x,t.scaleX,t.scale,t.originX),ly(e.y,t.y,t.scaleY,t.scale,t.originY)}function Zb(e,t){return qb(VR(e.getBoundingClientRect(),t))}function GR(e,t,n){const r=Zb(e,n),{scroll:i}=t;return i&&(ds(r.x,i.offset.x),ds(r.y,i.offset.y)),r}const Jb=({current:e})=>e?e.ownerDocument.defaultView:null,uy=(e,t)=>Math.abs(e-t);function QR(e,t){const n=uy(e.x,t.x),r=uy(e.y,t.y);return Math.sqrt(n**2+r**2)}class eS{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=ff(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:v}=Ge;this.history.push({...m,timestamp:v});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=cf(d,this.transformPagePoint),he.update(this.updatePoint,!0)},this.handlePointerUp=(c,d)=>{this.end();const{onEnd:h,onSessionEnd:m,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=ff(c.type==="pointercancel"?this.lastMoveEventInfo:cf(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(c,b),m&&m(c,b)},!zp(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=ja(t),a=cf(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=Ge;this.history=[{...l,timestamp:u}];const{onSessionStart:f}=n;f&&f(t,ff(a,this.history)),this.removeListeners=Oa(Mo(this.contextWindow,"pointermove",this.handlePointerMove),Mo(this.contextWindow,"pointerup",this.handlePointerUp),Mo(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ur(this.updatePoint)}}function cf(e,t){return t?{point:t(e.point)}:e}function cy(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ff({point:e},t){return{point:e,delta:cy(e,tS(t)),offset:cy(e,YR(t)),velocity:XR(t,.1)}}function YR(e){return e[0]}function tS(e){return e[e.length-1]}function XR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=tS(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 ZR(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 fy(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 JR(e,{top:t,left:n,bottom:r,right:i}){return{x:fy(e.x,n,i),y:fy(e.y,t,r)}}function dy(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 eO(e,t){return{x:dy(e.x,t.x),y:dy(e.y,t.y)}}function tO(e,t){let n=.5;const r=ct(e),i=ct(t);return i>r?n=sa(t.min,t.max-r,e.min):r>i&&(n=sa(e.min,e.max-i,t.min)),tr(0,1,n)}function nO(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 ih=.35;function rO(e=ih){return e===!1?e=0:e===!0&&(e=ih),{x:hy(e,"left","right"),y:hy(e,"top","bottom")}}function hy(e,t,n){return{min:py(e,t),max:py(e,n)}}function py(e,t){return typeof e=="number"?e:e[t]||0}const iO=new WeakMap;class sO{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(ja(f).point)},s=(f,c)=>{const{drag:d,dragPropagation:h,onDragStart:m}=this.getProps();if(d&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=tP(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 x=g.layout.layoutBox[b];x&&(p=ct(x)*(parseFloat(p)/100))}}this.originPoint[b]=p}),m&&he.postRender(()=>m(f,c)),Wd(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},o=(f,c)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:m,onDrag:v}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:b}=c;if(h&&this.currentDirection===null){this.currentDirection=oO(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",c.point,b),this.updateAxis("y",c.point,b),this.visualElement.render(),v&&v(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 eS(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Jb(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||!fl(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=ZR(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&&us(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=JR(r.layoutBox,t):this.constraints=!1,this.elastic=rO(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ht(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=nO(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!us(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=GR(r,i.root,this.visualElement.getTransformPagePoint());let o=eO(i.layout.layoutBox,s);if(n){const a=n($R(o));this.hasMutatedConstraints=!!a,a&&(o=qb(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(!fl(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 Wd(this.visualElement,t),r.start(um(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(!fl(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(!us(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]=tO({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(!fl(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;iO.set(this.visualElement,this);const t=this.visualElement.current,n=Mo(t,"pointerdown",l=>{const{drag:u,dragListener:f=!0}=this.getProps();u&&f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();us(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=ha(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=ih,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function fl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function oO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class aO extends Qr{constructor(t){super(t),this.removeGroupControls=Zt,this.removeListeners=Zt,this.controls=new sO(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 my=e=>(t,n)=>{e&&he.postRender(()=>e(t,n))};class lO extends Qr{constructor(){super(...arguments),this.removePointerDownListener=Zt}onPointerDown(t){this.session=new eS(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Jb(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:my(t),onStart:my(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&he.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=Mo(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 Ml={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function gy(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ho={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(W.test(e))e=parseFloat(e);else return e;const n=gy(e,t.target.x),r=gy(e,t.target.y);return`${n}% ${r}%`}},uO={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Hr.parse(e);if(i.length>5)return r;const s=Hr.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 cO extends y.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;PP(fO),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()})),Ml.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 nS(e){const[t,n]=Bw(),r=y.useContext(Ap);return w.jsx(cO,{...e,layoutGroup:r,switchLayoutGroup:y.useContext(eb),isPresent:t,safeToRemove:n})}const fO={borderRadius:{...ho,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ho,borderTopRightRadius:ho,borderBottomLeftRadius:ho,borderBottomRightRadius:ho,boxShadow:uO};function dO(e,t,n){const r=it(e)?e:aa(e);return r.start(um("",r,t,n)),r.animation}function hO(e){return e instanceof SVGElement&&e.tagName!=="svg"}const pO=(e,t)=>e.depth-t.depth;class mO{constructor(){this.children=[],this.isDirty=!1}add(t){Np(this.children,t),this.isDirty=!0}remove(t){Mp(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(pO),this.isDirty=!1,this.children.forEach(t)}}function gO(e,t){const n=On.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(Ur(r),e(s-t))};return he.read(r,!0),()=>Ur(r)}const rS=["TopLeft","TopRight","BottomLeft","BottomRight"],yO=rS.length,yy=e=>typeof e=="string"?parseFloat(e):e,vy=e=>typeof e=="number"||W.test(e);function vO(e,t,n,r,i,s){i?(e.opacity=be(0,n.opacity??1,xO(r)),e.opacityExit=be(t.opacity??1,0,wO(r))):s&&(e.opacity=be(t.opacity??1,n.opacity??1,r));for(let o=0;o<yO;o++){const a=`border${rS[o]}Radius`;let l=xy(t,a),u=xy(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||vy(l)===vy(u)?(e[a]=Math.max(be(yy(l),yy(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 xy(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const xO=iS(0,.5,bb),wO=iS(.5,.95,Zt);function iS(e,t,n){return r=>r<e?0:r>t?1:n(sa(e,t,r))}function wy(e,t){e.min=t.min,e.max=t.max}function zt(e,t){wy(e.x,t.x),wy(e.y,t.y)}function by(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Sy(e,t,n,r,i){return e-=t,e=Tu(e,1/n,r),i!==void 0&&(e=Tu(e,1/i,r)),e}function bO(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=Sy(e.min,t,n,a,i),e.max=Sy(e.max,t,n,a,i)}function Ty(e,t,[n,r,i],s,o){bO(e,t[n],t[r],t[i],t.scale,s,o)}const SO=["x","scaleX","originX"],TO=["y","scaleY","originY"];function Ey(e,t,n,r){Ty(e.x,t,SO,n?n.x:void 0,r?r.x:void 0),Ty(e.y,t,TO,n?n.y:void 0,r?r.y:void 0)}function Cy(e){return e.translate===0&&e.scale===1}function sS(e){return Cy(e.x)&&Cy(e.y)}function ky(e,t){return e.min===t.min&&e.max===t.max}function EO(e,t){return ky(e.x,t.x)&&ky(e.y,t.y)}function _y(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function oS(e,t){return _y(e.x,t.x)&&_y(e.y,t.y)}function Py(e){return ct(e.x)/ct(e.y)}function Ay(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class CO{constructor(){this.members=[]}add(t){Np(this.members,t),t.scheduleRender()}remove(t){if(Mp(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 kO(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 df=["","X","Y","Z"],_O={visibility:"hidden"},Ry=1e3;let PO=0;function hf(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function aS(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=pb(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&&aS(r)}function lS({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=PO++,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(OO),this.nodes.forEach(FO),this.nodes.forEach(LO),this.nodes.forEach(jO)},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 mO)}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=hO(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=gO(d,250),Ml.hasAnimatedSinceResize&&(Ml.hasAnimatedSinceResize=!1,this.nodes.forEach(jy))})}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 v=this.options.transition||f.getDefaultTransition()||zO,{onLayoutAnimationStart:b,onLayoutAnimationComplete:p}=f.getProps(),g=!this.targetLayout||!oS(this.targetLayout,m),x=!d&&h;if(this.options.layoutRoot||this.resumeFrom||x||d&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(c,x);const E={...$p(v,"layout"),onPlay:b,onComplete:p};(f.shouldReduceMotion||this.options.layoutRoot)&&(E.delay=0,E.type=!1),this.startAnimation(E)}else d||jy(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,Ur(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(IO),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&&aS(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(Oy);return}this.isUpdating||this.nodes.forEach(MO),this.isUpdating=!1,this.nodes.forEach(DO),this.nodes.forEach(AO),this.nodes.forEach(RO),this.clearAllSnapshots();const a=On.now();Ge.delta=tr(0,1e3/60,a-Ge.timestamp),Ge.timestamp=a,Ge.isProcessing=!0,nf.update.process(Ge),nf.preRender.process(Ge),nf.render.process(Ge),Ge.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Bp.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(NO),this.sharedNodes.forEach($O)}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&&!sS(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,f=u!==this.prevTransformTemplateValue;o&&(a||ri(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)),UO(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(HO))){const{scroll:f}=this.root;f&&(ds(a.x,f.offset.x),ds(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),ds(a.x,c.offset.x),ds(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&&hs(l,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),ri(f.latestValues)&&hs(l,f.latestValues)}return ri(this.latestValues)&&hs(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||!ri(u.latestValues))continue;nh(u.latestValues)&&u.updateSnapshot();const f=Pe(),c=u.measurePageBox();zt(f,c),Ey(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,f)}return ri(this.latestValues)&&Ey(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(),Fo(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(),KR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):zt(this.target,this.layout.layoutBox),Xb(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(),Fo(this.relativeTargetOrigin,this.target,h.target),zt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||nh(this.parent.latestValues)||Yb(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;qR(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():(by(this.prevProjectionDelta.x,this.projectionDelta.x),by(this.prevProjectionDelta.y,this.projectionDelta.y)),Do(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==c||this.treeScale.y!==d||!Ay(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ay(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=fs(),this.projectionDelta=fs(),this.projectionDeltaWithTransform=fs()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},f={...this.latestValues},c=fs();(!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,v=h!==m,b=this.getStack(),p=!b||b.members.length<=1,g=!!(v&&!p&&this.options.crossfade===!0&&!this.path.some(BO));this.animationProgress=0;let x;this.mixTargetDelta=E=>{const S=E/1e3;Ny(c.x,o.x,S),Ny(c.y,o.y,S),this.setTargetDelta(c),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Fo(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),VO(this.relativeTarget,this.relativeTargetOrigin,d,S),x&&EO(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Pe()),zt(x,this.relativeTarget)),v&&(this.animationValues=f,vO(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&&(Ur(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=he.update(()=>{Ml.hasAnimatedSinceResize=!0,this.currentAnimation=dO(0,Ry,{...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(Ry),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&&uS(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),hs(a,f),Do(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new CO),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&&hf("z",o,u,this.animationValues);for(let f=0;f<df.length;f++)hf(`rotate${df[f]}`,o,u,this.animationValues),hf(`skew${df[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 _O;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=Nl(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=Nl(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!ri(this.latestValues)&&(h.transform=l?l({},""):"none",this.hasProjected=!1),h}const f=u.animationValues||u.latestValues;this.applyTransformsToTarget(),a.transform=kO(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 ua){if(f[h]===void 0)continue;const{correct:m,applyTo:v,isCSSVariable:b}=ua[h],p=a.transform==="none"?f[h]:m(f[h],u);if(v){const g=v.length;for(let x=0;x<g;x++)a[v[x]]=p}else b?this.options.visualElement.renderState.vars[h]=p:a[h]=p}return this.options.layoutId&&(a.pointerEvents=u===this?Nl(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(Oy),this.root.sharedNodes.clear()}}}function AO(e){e.updateLayout()}function RO(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}):uS(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=fs();Do(a,r,t.layoutBox);const l=fs();o?Do(l,e.applyTransform(i,!0),t.measuredBox):Do(l,r,t.layoutBox);const u=!sS(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();Fo(m,t.layoutBox,d.layoutBox);const v=Pe();Fo(v,r,h.layoutBox),oS(m,v)||(f=!0),c.options.layoutRoot&&(e.relativeTarget=v,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 OO(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 jO(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function NO(e){e.clearSnapshot()}function Oy(e){e.clearMeasurements()}function MO(e){e.isLayoutDirty=!1}function DO(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function jy(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function FO(e){e.resolveTargetDelta()}function LO(e){e.calcProjection()}function IO(e){e.resetSkewAndRotation()}function $O(e){e.removeLeadSnapshot()}function Ny(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 My(e,t,n,r){e.min=be(t.min,n.min,r),e.max=be(t.max,n.max,r)}function VO(e,t,n,r){My(e.x,t.x,n.x,r),My(e.y,t.y,n.y,r)}function BO(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const zO={duration:.45,ease:[.4,0,.1,1]},Dy=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Fy=Dy("applewebkit/")&&!Dy("chrome/")?Math.round:Zt;function Ly(e){e.min=Fy(e.min),e.max=Fy(e.max)}function UO(e){Ly(e.x),Ly(e.y)}function uS(e,t,n){return e==="position"||e==="preserve-aspect"&&!WR(Py(t),Py(n),.2)}function HO(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const WO=lS({attachResizeListener:(e,t)=>ha(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),pf={current:void 0},cS=lS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!pf.current){const e=new WO({});e.mount(window),e.setOptions({layoutScroll:!0}),pf.current=e}return pf.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),KO={pan:{Feature:lO},drag:{Feature:aO,ProjectionNode:cS,MeasureLayout:nS}};function Iy(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,ja(t)))}class qO extends Qr{mount(){const{current:t}=this.node;t&&(this.unmount=rP(t,(n,r)=>(Iy(this.node,r,"Start"),i=>Iy(this.node,i,"End"))))}unmount(){}}class GO extends Qr{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=Oa(ha(this.node.current,"focus",()=>this.onFocus()),ha(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function $y(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,ja(t)))}class QO extends Qr{mount(){const{current:t}=this.node;t&&(this.unmount=aP(t,(n,r)=>($y(this.node,r,"Start"),(i,{success:s})=>$y(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const sh=new WeakMap,mf=new WeakMap,YO=e=>{const t=sh.get(e.target);t&&t(e)},XO=e=>{e.forEach(YO)};function ZO({root:e,...t}){const n=e||document;mf.has(n)||mf.set(n,{});const r=mf.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(XO,{root:e,...t})),r[i]}function JO(e,t,n){const r=ZO(t);return sh.set(e,n),r.observe(e),()=>{sh.delete(e),r.unobserve(e)}}const ej={some:0,all:1};class tj extends Qr{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:ej[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 JO(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(nj(t,n))&&this.startObserver()}unmount(){}}function nj({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const rj={inView:{Feature:tj},tap:{Feature:QO},focus:{Feature:GO},hover:{Feature:qO}},ij={layout:{ProjectionNode:cS,MeasureLayout:nS}},oh={current:null},fS={current:!1};function sj(){if(fS.current=!0,!!Op)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>oh.current=e.matches;e.addListener(t),t()}else oh.current=!1}const oj=[...Fb,nt,Hr],aj=e=>oj.find(Db(e)),lj=new WeakMap;function uj(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,aa(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,aa(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Vy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class cj{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: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=Zw(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,lj.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)),fS.current||sj(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:oh.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ur(this.notifyUpdate),Ur(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 Hs){const n=Hs[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<Vy.length;r++){const i=Vy[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=uj(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=aa(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"&&(Nb(r)||Tb(r))?r=parseFloat(r):!aj(r)&&Hr.test(n)&&(r=Rb(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=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&&!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 Fp),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class dS extends cj{constructor(){super(...arguments),this.KeyframeResolver=Lb}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 fj(e){return window.getComputedStyle(e)}class dj extends dS{constructor(){super(...arguments),this.type="html",this.renderInstance=ub}readValueFromInstance(t,n){if($i.has(n))return CA(t,n);{const r=fj(t),i=(Kp(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Zb(t,n)}build(t,n,r){Qp(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return tm(t,n,r)}}class hj extends dS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Pe,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&lb(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if($i.has(n)){const r=Ab(n);return r&&r.default||0}return n=cb.has(n)?n:Wp(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return db(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){fb(t,n,r,i)}mount(t){this.isSVGTag=Jp(t.tagName),super.mount(t)}}const pj=(e,t)=>Xp(e)?new hj(t):new dj(t,{allowProjection:e!==y.Fragment}),mj=ZP({...LR,...rj,...KO,...ij},pj),Re=pP(mj),gj=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 gj(t)?n?`var(--color-${t}-${n})`:`var(--color-${e}-500)`:`var(--color-${e})`};var hr=(e=>(e.None="none",e.Sm="sm",e.Md="md",e.Lg="lg",e.Xl="xl",e.Full="full",e))(hr||{});const hS=y.createContext({}),yj={[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")},vj={[hr.None]:"0px",[hr.Sm]:"var(--radius-xs)",[hr.Md]:"var(--radius-sm)",[hr.Lg]:"var(--radius-md)",[hr.Xl]:"var(--radius-lg)",[hr.Full]:"calc(infinity * 1px)"},xj=e=>{const t={...yj};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 wj({children:e,widget:t}){const n=xj(t),r=t&&t.appearance&&t.appearance.design&&t.appearance.design.border_radius?t.appearance.design.border_radius:hr.Md,i=o=>n[o],s=()=>vj[r];return w.jsx(hS.Provider,{value:{colors:n,getColor:i,getRadius:s},children:e})}const rr=()=>y.useContext(hS);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=K.ButtonText,bgKey:u=K.ButtonBackground,animations:f={},withoutTheming:c,...d}){const h=rr();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,S0[n]&&S0[n][r],$2[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 Dn=Object.create(null);Dn.open="0";Dn.close="1";Dn.ping="2";Dn.pong="3";Dn.message="4";Dn.upgrade="5";Dn.noop="6";const Dl=Object.create(null);Object.keys(Dn).forEach(e=>{Dl[Dn[e]]=e});const ah={type:"error",data:"parser error"},pS=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",mS=typeof ArrayBuffer=="function",gS=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,cm=({type:e,data:t},n,r)=>pS&&t instanceof Blob?n?r(t):By(t,r):mS&&(t instanceof ArrayBuffer||gS(t))?n?r(t):By(new Blob([t]),r):r(Dn[e]+(t||"")),By=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function zy(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let gf;function bj(e,t){if(pS&&e.data instanceof Blob)return e.data.arrayBuffer().then(zy).then(t);if(mS&&(e.data instanceof ArrayBuffer||gS(e.data)))return t(zy(e.data));cm(e,!1,n=>{gf||(gf=new TextEncoder),t(gf.encode(n))})}const Uy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",To=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Uy.length;e++)To[Uy.charCodeAt(e)]=e;const Sj=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=To[e.charCodeAt(r)],o=To[e.charCodeAt(r+1)],a=To[e.charCodeAt(r+2)],l=To[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},Tj=typeof ArrayBuffer=="function",fm=(e,t)=>{if(typeof e!="string")return{type:"message",data:yS(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Ej(e.substring(1),t)}:Dl[n]?e.length>1?{type:Dl[n],data:e.substring(1)}:{type:Dl[n]}:ah},Ej=(e,t)=>{if(Tj){const n=Sj(e);return yS(n,t)}else return{base64:!0,data:e}},yS=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},vS="",Cj=(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(vS))})})},kj=(e,t)=>{const n=e.split(vS),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 _j(){return new TransformStream({transform(e,t){bj(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 yf;function dl(e){return e.reduce((t,n)=>t+n.length,0)}function hl(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 Pj(e,t){yf||(yf=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(dl(n)<1)break;const l=hl(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(dl(n)<2)break;const l=hl(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(dl(n)<8)break;const l=hl(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),f=u.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(ah);break}i=f*Math.pow(2,32)+u.getUint32(4),r=3}else{if(dl(n)<i)break;const l=hl(n,i);a.enqueue(fm(s?l:yf.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(ah);break}}}})}const xS=4;function Me(e){if(e)return Aj(e)}function Aj(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 Xu=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")(),Rj="arraybuffer";function wS(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Oj=Qt.setTimeout,jj=Qt.clearTimeout;function Zu(e,t){t.useNativeTimers?(e.setTimeoutFn=Oj.bind(Qt),e.clearTimeoutFn=jj.bind(Qt)):(e.setTimeoutFn=Qt.setTimeout.bind(Qt),e.clearTimeoutFn=Qt.clearTimeout.bind(Qt))}const Nj=1.33;function Mj(e){return typeof e=="string"?Dj(e):Math.ceil((e.byteLength||e.size)*Nj)}function Dj(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 bS(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Fj(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Lj(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 Ij extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class dm extends Me{constructor(t){super(),this.writable=!1,Zu(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 Ij(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=Fj(t);return n.length?"?"+n:""}}class $j 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)};kj(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,Cj(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]=bS()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let SS=!1;try{SS=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Vj=SS;function Bj(){}class zj extends $j{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,Zu(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=wS(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=Bj,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",Hy);else if(typeof addEventListener=="function"){const e="onpagehide"in Qt?"pagehide":"unload";addEventListener(e,Hy,!1)}}function Hy(){for(let e in Nn.requests)Nn.requests.hasOwnProperty(e)&&Nn.requests[e].abort()}const Uj=function(){const e=TS({xdomain:!1});return e&&e.responseType!==null}();class Hj extends zj{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=Uj&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Nn(TS,this.uri(),t)}}function TS(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Vj))return new XMLHttpRequest}catch{}if(!t)try{return new Qt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const ES=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Wj extends dm{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=ES?{}:wS(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&&Xu(()=>{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]=bS()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const vf=Qt.WebSocket||Qt.MozWebSocket;class Kj extends Wj{createSocket(t,n,r){return ES?new vf(t,n,r):n?new vf(t,n):new vf(t)}doWrite(t,n){this.ws.send(n)}}class qj 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=Pj(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=_j();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&&Xu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Gj={websocket:Kj,webtransport:qj,polling:Hj},Qj=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Yj=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function lh(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[Yj[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=Xj(s,s.path),s.queryKey=Zj(s,s.query),s}function Xj(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 Zj(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const uh=typeof addEventListener=="function"&&typeof removeEventListener=="function",Fl=[];uh&&addEventListener("offline",()=>{Fl.forEach(e=>e())},!1);class Ir extends Me{constructor(t,n){if(super(),this.binaryType=Rj,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=lh(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=lh(n.host).host);Zu(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=Lj(this.opts.query)),uh&&(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"})},Fl.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=xS,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&&Ir.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",Ir.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+=Mj(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,Xu(()=>{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(Ir.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(),uh&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Fl.indexOf(this._offlineEventListener);r!==-1&&Fl.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Ir.protocol=xS;class Jj extends Ir{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;Ir.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;Ir.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 eN=class extends Jj{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=>Gj[i]).filter(i=>!!i)),super(t,r)}};function tN(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=lh(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 nN=typeof ArrayBuffer=="function",rN=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,CS=Object.prototype.toString,iN=typeof Blob=="function"||typeof Blob<"u"&&CS.call(Blob)==="[object BlobConstructor]",sN=typeof File=="function"||typeof File<"u"&&CS.call(File)==="[object FileConstructor]";function hm(e){return nN&&(e instanceof ArrayBuffer||rN(e))||iN&&e instanceof Blob||sN&&e instanceof File}function Ll(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Ll(e[n]))return!0;return!1}if(hm(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Ll(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Ll(e[n]))return!0;return!1}function oN(e){const t=[],n=e.data,r=e;return r.data=ch(n,t),r.attachments=t.length,{packet:r,buffers:t}}function ch(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]=ch(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]=ch(e[r],t));return n}return e}function aN(e,t){return e.data=fh(e.data,t),delete e.attachments,e}function fh(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]=fh(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=fh(e[n],t));return e}const lN=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],uN=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 cN{constructor(t){this.replacer=t}encode(t){return(t.type===te.EVENT||t.type===te.ACK)&&Ll(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=oN(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function Wy(e){return Object.prototype.toString.call(e)==="[object Object]"}class pm 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 fN(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 Wy(n);case te.DISCONNECT:return n===void 0;case te.CONNECT_ERROR:return typeof n=="string"||Wy(n);case te.EVENT:case te.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&lN.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 fN{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=aN(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const dN=Object.freeze(Object.defineProperty({__proto__:null,Decoder:pm,Encoder:cN,get PacketType(){return te},protocol:uN},Symbol.toStringTag,{value:"Module"}));function fn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const hN=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class kS 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(hN.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 eo(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}eo.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};eo.prototype.reset=function(){this.attempts=0};eo.prototype.setMin=function(e){this.ms=e};eo.prototype.setMax=function(e){this.max=e};eo.prototype.setJitter=function(e){this.jitter=e};class dh 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,Zu(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 eo({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||dN;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 eN(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){Xu(()=>{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 kS(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 po={};function Il(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=tN(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=po[i]&&s in po[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new dh(r,t):(po[i]||(po[i]=new dh(r,t)),l=po[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Il,{Manager:dh,Socket:kS,io:Il,connect:Il});const $l=e=>{const t=document.cookie.split(";").find(n=>n.includes(e));return t?t.split("=")[1]:null};var Mn=(e=>(e.CustomerToken="lc:customer:token",e.CustomerRefreshToken="lc:customer:refresh_token",e.DeviceId="lc:device:id",e))(Mn||{});const xf=(e,t)=>{localStorage.setItem(e,t)},Ss=e=>localStorage.getItem(e),Ky=()=>{localStorage.removeItem("lc:customer:token"),localStorage.removeItem("lc:customer:refresh_token"),localStorage.removeItem("lc:device:id")},_S=y.createContext(null),Vi=()=>y.useContext(_S),pN=({children:e})=>{const[t,n]=y.useState(null),[r,i]=y.useState(!1),s=()=>{const c=Il(kk,{transports:["websocket"],auth:{customer_token:Ss(Mn.CustomerToken)||$l("customer_token"),device_id:Ss(Mn.DeviceId)||$l("device_id"),customer_refresh_token:Ss(Mn.CustomerRefreshToken)||$l("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(_S.Provider,{value:{socket:t,connected:r,connect:s,reconnect:o,disconnect:a,on:l,off:u,emit:f},children:e})};var Fn=(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))(Fn||{}),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 mm=e=>{const t=Rw(),n=(r,i)=>{var o;const s=((o=RI.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}};function mN(e){return e&&typeof e=="object"&&"customer_token"in e&&"customer_refresh_token"in e}const gN=()=>Sw({mutationFn:e=>ka(`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})})}),yN=e=>ka(`clients/${e}/chats`),hh=e=>ka(`clients/${e}/chats`,{method:"DELETE"}),vN=(e,t)=>ka("review",{method:"POST",body:JSON.stringify({rating:e,comment:t}),headers:{"X-Customer-Token":Ss(Mn.CustomerToken)||"","X-Customer-Refresh-Token":Ss(Mn.CustomerRefreshToken)||"","X-Device-Id":Ss(Mn.DeviceId)||""}}),xN=()=>Sw({mutationFn:e=>vN(e.rating,e.comment)}),PS=(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 AS({text:e}){var i,s,o,a;const{widget:t,isHaveChat:n}=tn(),r=rr();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 wN="/notify.mp3",bN=async e=>{await new Audio(e||wN).play()};function SN({fallback:e,fallbackOpen:t}){const[n]=y.useState(window.document.title),r=Vi(),{isHaveChat:i,open:s,soundPath:o}=tn(),[a,l]=y.useState(!0),[u,f]=y.useState(0),[c,d]=y.useState(null),h=()=>{bN(o)},m=(v,b)=>{if(c&&clearInterval(c),v||!i||b===0||Number.isNaN(b)){window.document.title=n,d(null);return}const p=setInterval(()=>{if(v||!i||b===0||Number.isNaN(b)){window.document.title=n,clearInterval(p),d(null);return}const g=`${b} Yeni mesajınız var! - ${n}`;window.document.title!==g?window.document.title=g:window.document.title=n},1e3);return d(p),()=>{clearInterval(p),d(null)}};return y.useEffect(()=>m(s&&a,u),[u,s,a]),y.useEffect(()=>{const v=()=>{l(document.visibilityState==="visible")};return document.addEventListener("visibilitychange",v,!1),()=>{document.removeEventListener("visibilitychange",v)}},[]),y.useEffect(()=>{if(!r||!i||s&&a)return;const v=()=>{!i||s&&a||(f(b=>b+1),h())};return r.on(ut.MessageAgentCreate,v),r.on(ut.ChatUserAssignee,h),()=>{r.off(ut.MessageAgentCreate,v),r.off(ut.ChatUserAssignee,h)}},[r,i,s,a]),s?null:!i||u===0?t?e:null:w.jsx(AS,{text:"Yeni mesajlar var!"})}function TN({children:e,defaultOpen:t,border:n}){var p,g,x,E;const r=Vi(),{open:i,setOpen:s,setIsHaveChat:o,isHaveChat:a,widget:l}=tn(),[u]=y.useState(!0),f=mm(),c=Pa(),d=rr(),h=gm();y.useEffect(()=>{a&&c.pathname==="/"&&f.push("chat")},[a]);const m=()=>{s(!0),r&&r.emit(Fn.WidgetOpen,{})},v=()=>{s(!1),r&&r.emit(Fn.WidgetClose,{})},b=()=>{s(!1),o(!1),hh(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=(x=l==null?void 0:l.appearance)==null?void 0:x.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(SN,{fallback:w.jsx(AS,{}),fallbackOpen:u}),!i&&w.jsxs(Qn,{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(Qn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:v,children:w.jsx(De.X,{className:"size-7"})})]})})]})})}function RS(e){const{widget:t}=tn();return w.jsx(wj,{widget:t,children:w.jsx(TN,{...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 EN=/[^.^\]^[]+|(?=\[\]|\.\.)/g,OS=/^\d+$/,CN=/^\d/,kN=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,_N=/^\s*(['"]?)(.*?)(\1)\s*$/,ym=512,qy=new Bi(ym),Gy=new Bi(ym),Qy=new Bi(ym),Ti={Cache:Bi,split:ph,normalizePath:wf,setter:function(e){var t=wf(e);return Gy.get(e)||Gy.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=wf(e);return Qy.get(e)||Qy.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)||OS.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){PN(Array.isArray(e)?e:ph(e),t,n)}};function wf(e){return qy.get(e)||qy.set(e,ph(e).map(function(t){return t.replace(_N,"$2")}))}function ph(e){return e.match(EN)||[""]}function PN(e,t,n){var r=e.length,i,s,o,a;for(s=0;s<r;s++)i=e[s],i&&(ON(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 AN(e){return e.match(CN)&&!e.match(OS)}function RN(e){return kN.test(e)}function ON(e){return!vm(e)&&(AN(e)||RN(e))}const jN=/[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,Ju=e=>e.match(jN)||[],ec=e=>e[0].toUpperCase()+e.slice(1),xm=(e,t)=>Ju(e).join(t).toLowerCase(),jS=e=>Ju(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),NN=e=>ec(jS(e)),MN=e=>xm(e,"_"),DN=e=>xm(e,"-"),FN=e=>ec(xm(e," ")),LN=e=>Ju(e).map(ec).join(" ");var bf={words:Ju,upperFirst:ec,camelCase:jS,pascalCase:NN,snakeCase:MN,kebabCase:DN,sentenceCase:FN,titleCase:LN},wm={exports:{}};wm.exports=function(e){return NS(IN(e),e)};wm.exports.array=NS;function NS(e,t){var n=e.length,r=new Array(n),i={},s=n,o=$N(t),a=VN(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 IN(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 $N(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 VN(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var BN=wm.exports;const zN=qs(BN),UN=Object.prototype.toString,HN=Error.prototype.toString,WN=RegExp.prototype.toString,KN=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",qN=/^Symbol\((.*)\)(.*)$/;function GN(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function Yy(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return GN(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return KN.call(e).replace(qN,"Symbol($1)");const r=UN.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+HN.call(e)+"]":r==="RegExp"?WN.call(e):null}function $r(e,t){let n=Yy(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let s=Yy(this[r],t);return s!==null?s:i},2)}function MS(e){return e==null?[]:[].concat(e)}let DS,FS,LS,QN=/\$\{\s*(\w+)\s*\}/g;DS=Symbol.toStringTag;class Xy{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[DS]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],MS(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]}}FS=Symbol.hasInstance;LS=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(QN,(i,s)=>$r(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 Xy(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[LS]="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[FS](t){return Xy[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 \`${$r(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${$r(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${$r(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"},YN={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"},mh={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},XN={isValue:"${path} field must be ${value}"},Vl={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},ZN={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"},JN={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: \`${$r(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: \`${$r(n,!0)}\``}return bt.formatError(bn.notType,e)}};Object.assign(Object.create(null),{mixed:bn,string:gt,number:YN,date:mh,object:Vl,array:ZN,boolean:XN,tuple:JN});const bm=e=>e&&e.__isYupSchema__;class Eu{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 Eu(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(!bm(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const pl={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]===pl.context,this.isValue=this.key[0]===pl.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?pl.context:this.isValue?pl.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:v,abortEarly:b=o.spec.abortEarly,disableStackTrace:p=o.spec.disableStackTrace}=i;function g(I){return zi.isRef(I)?I.getValue(n,m,v):I}function x(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:x,resolve:g,options:i,originalValue:s,schema:o};const C=I=>{bt.isError(I)?E(I):I?l(null):E(x())},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 eM(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 Cu 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 Cu(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function ps(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]=ps(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,ps(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(ps(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=ps(i,t)}else throw Error(`Unable to clone ${e}`);return n}class Ln{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 Cu,this._blacklist=new Cu,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=ps(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=$r(t),a=$r(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 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=v=>{i||(i=!0,n(v,o))},c=v=>{i||(i=!0,r(v,o))},d=s.length,h=[];if(!d)return c([]);let m={value:o,originalValue:a,path:l,options:u,schema:this};for(let v=0;v<s.length;v++){const b=s[v];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):ps(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=MS(t).map(s=>new zi(s));return i.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new Tu(i,n):Tu.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}=eM(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 tM=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function nM(e){const t=gh(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 gh(e){var t,n;const r=tM.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 rM=/^[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])?)*$/,iM=/^((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,sM=/^(?:[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,oM="^\\d{4}-\\d{2}-\\d{2}",aM="\\d{2}:\\d{2}:\\d{2}",lM="(([+-]\\d{2}(:?\\d{2})?)|Z)",uM=new RegExp(`${oM}T${aM}(\\.\\d+)?${lM}$`),cM=e=>ci(e)||e===e.trim(),fM={}.toString();function Cu(){return new IS}class IS 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===fM?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(rM,{name:"email",message:t,excludeEmptyString:!0})}url(t=gt.url){return this.matches(iM,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=gt.uuid){return this.matches(sM,{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(uM,{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=gh(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=gh(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:cM})}lowercase(t=gt.lowercase){return this.transform(n=>ci(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>ci(n)||n===n.toLowerCase()})}uppercase(t=gt.uppercase){return this.transform(n=>ci(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>ci(n)||n===n.toUpperCase()})}}Cu.prototype=IS.prototype;let dM=new Date(""),hM=e=>Object.prototype.toString.call(e)==="[object Date]";class ec extends Fn{constructor(){super({type:"date",check(t){return hM(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=nM(t),isNaN(t)?ec.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=mh.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=mh.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)}})}}ec.INVALID_DATE=dM;ec.prototype;function pM(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):bm(a)&&"deps"in a&&a.deps.forEach(l=>s(l,o))}return zN.array(Array.from(r),n).reverse()}function Zy(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 $S(e){return(t,n)=>Zy(e,t)-Zy(e,n)}const mM=(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 Vl(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=Vl(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Vl(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Vl)}):"optional"in e?e.optional():e}const gM=(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 Jy=e=>Object.prototype.toString.call(e)==="[object Object]";function ev(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const yM=$S([]);function Sm(e){return new VS(e)}class VS extends Fn{constructor(t){super({type:"object",check(n){return Jy(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=yM,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,v=i[c];u.path=(n.path?`${n.path}.`:"")+c,d=d.resolve({value:v,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||!Jy(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=pM(t,n),r._sortErrors=$S(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 Vl(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 gM(s,t)&&(o=Object.assign({},s),r||delete o[t],o[n]=i(s)),o})}json(){return this.transform(mM)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||$l.exact,test(n){if(n==null)return!0;const r=ev(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=$l.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=ev(this.schema,i);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=$l.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(bf.camelCase)}snakeCase(){return this.transformKeys(bf.snakeCase)}constantCase(){return this.transformKeys(t=>bf.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=VS.prototype;var vM=function(t){return xM(t)&&!wM(t)};function xM(e){return!!e&&typeof e=="object"}function wM(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||TM(e)}var bM=typeof Symbol=="function"&&Symbol.for,SM=bM?Symbol.for("react.element"):60103;function TM(e){return e.$$typeof===SM}function EM(e){return Array.isArray(e)?[]:{}}function ku(e,t){return t.clone!==!1&&t.isMergeableObject(e)?ha(EM(e),e,t):e}function CM(e,t,n){return e.concat(t).map(function(r){return ku(r,n)})}function kM(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(i){r[i]=ku(e[i],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=ku(t[i],n):r[i]=ha(e[i],t[i],n)}),r}function ha(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||CM,n.isMergeableObject=n.isMergeableObject||vM;var r=Array.isArray(t),i=Array.isArray(e),s=r===i;return s?r?n.arrayMerge(e,t,n):kM(e,t,n):ku(t,n)}ha.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return ha(r,i,n)},{})};var yh=ha,BS=typeof global=="object"&&global&&global.Object===Object&&global,_M=typeof self=="object"&&self&&self.Object===Object&&self,Ln=BS||_M||Function("return this")(),Hr=Ln.Symbol,zS=Object.prototype,PM=zS.hasOwnProperty,AM=zS.toString,po=Hr?Hr.toStringTag:void 0;function RM(e){var t=PM.call(e,po),n=e[po];try{e[po]=void 0;var r=!0}catch{}var i=AM.call(e);return r&&(t?e[po]=n:delete e[po]),i}var OM=Object.prototype,jM=OM.toString;function NM(e){return jM.call(e)}var MM="[object Null]",DM="[object Undefined]",tv=Hr?Hr.toStringTag:void 0;function Ui(e){return e==null?e===void 0?DM:MM:tv&&tv in Object(e)?RM(e):NM(e)}function US(e,t){return function(n){return e(t(n))}}var Tm=US(Object.getPrototypeOf,Object);function Hi(e){return e!=null&&typeof e=="object"}var FM="[object Object]",LM=Function.prototype,IM=Object.prototype,HS=LM.toString,$M=IM.hasOwnProperty,VM=HS.call(Object);function nv(e){if(!Hi(e)||Ui(e)!=FM)return!1;var t=Tm(e);if(t===null)return!0;var n=$M.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&HS.call(n)==VM}function BM(){this.__data__=[],this.size=0}function WS(e,t){return e===t||e!==e&&t!==t}function tc(e,t){for(var n=e.length;n--;)if(WS(e[n][0],t))return n;return-1}var zM=Array.prototype,UM=zM.splice;function HM(e){var t=this.__data__,n=tc(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():UM.call(t,n,1),--this.size,!0}function WM(e){var t=this.__data__,n=tc(t,e);return n<0?void 0:t[n][1]}function KM(e){return tc(this.__data__,e)>-1}function qM(e,t){var n=this.__data__,r=tc(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=BM;rr.prototype.delete=HM;rr.prototype.get=WM;rr.prototype.has=KM;rr.prototype.set=qM;function GM(){this.__data__=new rr,this.size=0}function QM(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function YM(e){return this.__data__.get(e)}function XM(e){return this.__data__.has(e)}function ja(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ZM="[object AsyncFunction]",JM="[object Function]",e3="[object GeneratorFunction]",t3="[object Proxy]";function KS(e){if(!ja(e))return!1;var t=Ui(e);return t==JM||t==e3||t==ZM||t==t3}var Sf=Ln["__core-js_shared__"],rv=function(){var e=/[^.]+$/.exec(Sf&&Sf.keys&&Sf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function n3(e){return!!rv&&rv in e}var r3=Function.prototype,i3=r3.toString;function Wi(e){if(e!=null){try{return i3.call(e)}catch{}try{return e+""}catch{}}return""}var s3=/[\\^$.*+?()[\]{}|]/g,o3=/^\[object .+?Constructor\]$/,a3=Function.prototype,l3=Object.prototype,u3=a3.toString,c3=l3.hasOwnProperty,f3=RegExp("^"+u3.call(c3).replace(s3,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d3(e){if(!ja(e)||n3(e))return!1;var t=KS(e)?f3:o3;return t.test(Wi(e))}function h3(e,t){return e==null?void 0:e[t]}function Ki(e,t){var n=h3(e,t);return d3(n)?n:void 0}var pa=Ki(Ln,"Map"),ma=Ki(Object,"create");function p3(){this.__data__=ma?ma(null):{},this.size=0}function m3(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var g3="__lodash_hash_undefined__",y3=Object.prototype,v3=y3.hasOwnProperty;function x3(e){var t=this.__data__;if(ma){var n=t[e];return n===g3?void 0:n}return v3.call(t,e)?t[e]:void 0}var w3=Object.prototype,b3=w3.hasOwnProperty;function S3(e){var t=this.__data__;return ma?t[e]!==void 0:b3.call(t,e)}var T3="__lodash_hash_undefined__";function E3(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ma&&t===void 0?T3: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=p3;Ni.prototype.delete=m3;Ni.prototype.get=x3;Ni.prototype.has=S3;Ni.prototype.set=E3;function C3(){this.size=0,this.__data__={hash:new Ni,map:new(pa||rr),string:new Ni}}function k3(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function nc(e,t){var n=e.__data__;return k3(t)?n[typeof t=="string"?"string":"hash"]:n.map}function _3(e){var t=nc(this,e).delete(e);return this.size-=t?1:0,t}function P3(e){return nc(this,e).get(e)}function A3(e){return nc(this,e).has(e)}function R3(e,t){var n=nc(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=C3;Qr.prototype.delete=_3;Qr.prototype.get=P3;Qr.prototype.has=A3;Qr.prototype.set=R3;var O3=200;function j3(e,t){var n=this.__data__;if(n instanceof rr){var r=n.__data__;if(!pa||r.length<O3-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 eo(e){var t=this.__data__=new rr(e);this.size=t.size}eo.prototype.clear=GM;eo.prototype.delete=QM;eo.prototype.get=YM;eo.prototype.has=XM;eo.prototype.set=j3;function N3(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var iv=function(){try{var e=Ki(Object,"defineProperty");return e({},"",{}),e}catch{}}();function qS(e,t,n){t=="__proto__"&&iv?iv(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var M3=Object.prototype,D3=M3.hasOwnProperty;function GS(e,t,n){var r=e[t];(!(D3.call(e,t)&&WS(r,n))||n===void 0&&!(t in e))&&qS(e,t,n)}function rc(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?qS(n,a,l):GS(n,a,l)}return n}function F3(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var L3="[object Arguments]";function sv(e){return Hi(e)&&Ui(e)==L3}var QS=Object.prototype,I3=QS.hasOwnProperty,$3=QS.propertyIsEnumerable,V3=sv(function(){return arguments}())?sv:function(e){return Hi(e)&&I3.call(e,"callee")&&!$3.call(e,"callee")},Na=Array.isArray;function B3(){return!1}var YS=typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,ov=YS&&typeof Dt=="object"&&Dt&&!Dt.nodeType&&Dt,z3=ov&&ov.exports===YS,av=z3?Ln.Buffer:void 0,U3=av?av.isBuffer:void 0,XS=U3||B3,H3=9007199254740991,W3=/^(?:0|[1-9]\d*)$/;function K3(e,t){var n=typeof e;return t=t??H3,!!t&&(n=="number"||n!="symbol"&&W3.test(e))&&e>-1&&e%1==0&&e<t}var q3=9007199254740991;function ZS(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=q3}var G3="[object Arguments]",Q3="[object Array]",Y3="[object Boolean]",X3="[object Date]",Z3="[object Error]",J3="[object Function]",eD="[object Map]",tD="[object Number]",nD="[object Object]",rD="[object RegExp]",iD="[object Set]",sD="[object String]",oD="[object WeakMap]",aD="[object ArrayBuffer]",lD="[object DataView]",uD="[object Float32Array]",cD="[object Float64Array]",fD="[object Int8Array]",dD="[object Int16Array]",hD="[object Int32Array]",pD="[object Uint8Array]",mD="[object Uint8ClampedArray]",gD="[object Uint16Array]",yD="[object Uint32Array]",me={};me[uD]=me[cD]=me[fD]=me[dD]=me[hD]=me[pD]=me[mD]=me[gD]=me[yD]=!0;me[G3]=me[Q3]=me[aD]=me[Y3]=me[lD]=me[X3]=me[Z3]=me[J3]=me[eD]=me[tD]=me[nD]=me[rD]=me[iD]=me[sD]=me[oD]=!1;function vD(e){return Hi(e)&&ZS(e.length)&&!!me[Ui(e)]}function Em(e){return function(t){return e(t)}}var JS=typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,Fo=JS&&typeof Dt=="object"&&Dt&&!Dt.nodeType&&Dt,xD=Fo&&Fo.exports===JS,Tf=xD&&BS.process,Ws=function(){try{var e=Fo&&Fo.require&&Fo.require("util").types;return e||Tf&&Tf.binding&&Tf.binding("util")}catch{}}(),lv=Ws&&Ws.isTypedArray,wD=lv?Em(lv):vD,bD=Object.prototype,SD=bD.hasOwnProperty;function eT(e,t){var n=Na(e),r=!n&&V3(e),i=!n&&!r&&XS(e),s=!n&&!r&&!i&&wD(e),o=n||r||i||s,a=o?F3(e.length,String):[],l=a.length;for(var u in e)(t||SD.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||K3(u,l)))&&a.push(u);return a}var TD=Object.prototype;function Cm(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||TD;return e===n}var ED=US(Object.keys,Object),CD=Object.prototype,kD=CD.hasOwnProperty;function _D(e){if(!Cm(e))return ED(e);var t=[];for(var n in Object(e))kD.call(e,n)&&n!="constructor"&&t.push(n);return t}function tT(e){return e!=null&&ZS(e.length)&&!KS(e)}function km(e){return tT(e)?eT(e):_D(e)}function PD(e,t){return e&&rc(t,km(t),e)}function AD(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var RD=Object.prototype,OD=RD.hasOwnProperty;function jD(e){if(!ja(e))return AD(e);var t=Cm(e),n=[];for(var r in e)r=="constructor"&&(t||!OD.call(e,r))||n.push(r);return n}function _m(e){return tT(e)?eT(e,!0):jD(e)}function ND(e,t){return e&&rc(t,_m(t),e)}var nT=typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,uv=nT&&typeof Dt=="object"&&Dt&&!Dt.nodeType&&Dt,MD=uv&&uv.exports===nT,cv=MD?Ln.Buffer:void 0,fv=cv?cv.allocUnsafe:void 0;function DD(e,t){if(t)return e.slice();var n=e.length,r=fv?fv(n):new e.constructor(n);return e.copy(r),r}function rT(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function FD(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 iT(){return[]}var LD=Object.prototype,ID=LD.propertyIsEnumerable,dv=Object.getOwnPropertySymbols,Pm=dv?function(e){return e==null?[]:(e=Object(e),FD(dv(e),function(t){return ID.call(e,t)}))}:iT;function $D(e,t){return rc(e,Pm(e),t)}function sT(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var VD=Object.getOwnPropertySymbols,oT=VD?function(e){for(var t=[];e;)sT(t,Pm(e)),e=Tm(e);return t}:iT;function BD(e,t){return rc(e,oT(e),t)}function aT(e,t,n){var r=t(e);return Na(e)?r:sT(r,n(e))}function zD(e){return aT(e,km,Pm)}function UD(e){return aT(e,_m,oT)}var vh=Ki(Ln,"DataView"),xh=Ki(Ln,"Promise"),wh=Ki(Ln,"Set"),bh=Ki(Ln,"WeakMap"),hv="[object Map]",HD="[object Object]",pv="[object Promise]",mv="[object Set]",gv="[object WeakMap]",yv="[object DataView]",WD=Wi(vh),KD=Wi(pa),qD=Wi(xh),GD=Wi(wh),QD=Wi(bh),zn=Ui;(vh&&zn(new vh(new ArrayBuffer(1)))!=yv||pa&&zn(new pa)!=hv||xh&&zn(xh.resolve())!=pv||wh&&zn(new wh)!=mv||bh&&zn(new bh)!=gv)&&(zn=function(e){var t=Ui(e),n=t==HD?e.constructor:void 0,r=n?Wi(n):"";if(r)switch(r){case WD:return yv;case KD:return hv;case qD:return pv;case GD:return mv;case QD:return gv}return t});var YD=Object.prototype,XD=YD.hasOwnProperty;function ZD(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&XD.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var vv=Ln.Uint8Array;function Am(e){var t=new e.constructor(e.byteLength);return new vv(t).set(new vv(e)),t}function JD(e,t){var n=t?Am(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var eF=/\w*$/;function tF(e){var t=new e.constructor(e.source,eF.exec(e));return t.lastIndex=e.lastIndex,t}var xv=Hr?Hr.prototype:void 0,wv=xv?xv.valueOf:void 0;function nF(e){return wv?Object(wv.call(e)):{}}function rF(e,t){var n=t?Am(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var iF="[object Boolean]",sF="[object Date]",oF="[object Map]",aF="[object Number]",lF="[object RegExp]",uF="[object Set]",cF="[object String]",fF="[object Symbol]",dF="[object ArrayBuffer]",hF="[object DataView]",pF="[object Float32Array]",mF="[object Float64Array]",gF="[object Int8Array]",yF="[object Int16Array]",vF="[object Int32Array]",xF="[object Uint8Array]",wF="[object Uint8ClampedArray]",bF="[object Uint16Array]",SF="[object Uint32Array]";function TF(e,t,n){var r=e.constructor;switch(t){case dF:return Am(e);case iF:case sF:return new r(+e);case hF:return JD(e,n);case pF:case mF:case gF:case yF:case vF:case xF:case wF:case bF:case SF:return rF(e,n);case oF:return new r;case aF:case cF:return new r(e);case lF:return tF(e);case uF:return new r;case fF:return nF(e)}}var bv=Object.create,EF=function(){function e(){}return function(t){if(!ja(t))return{};if(bv)return bv(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function CF(e){return typeof e.constructor=="function"&&!Cm(e)?EF(Tm(e)):{}}var kF="[object Map]";function _F(e){return Hi(e)&&zn(e)==kF}var Sv=Ws&&Ws.isMap,PF=Sv?Em(Sv):_F,AF="[object Set]";function RF(e){return Hi(e)&&zn(e)==AF}var Tv=Ws&&Ws.isSet,OF=Tv?Em(Tv):RF,jF=1,NF=2,MF=4,lT="[object Arguments]",DF="[object Array]",FF="[object Boolean]",LF="[object Date]",IF="[object Error]",uT="[object Function]",$F="[object GeneratorFunction]",VF="[object Map]",BF="[object Number]",cT="[object Object]",zF="[object RegExp]",UF="[object Set]",HF="[object String]",WF="[object Symbol]",KF="[object WeakMap]",qF="[object ArrayBuffer]",GF="[object DataView]",QF="[object Float32Array]",YF="[object Float64Array]",XF="[object Int8Array]",ZF="[object Int16Array]",JF="[object Int32Array]",e5="[object Uint8Array]",t5="[object Uint8ClampedArray]",n5="[object Uint16Array]",r5="[object Uint32Array]",fe={};fe[lT]=fe[DF]=fe[qF]=fe[GF]=fe[FF]=fe[LF]=fe[QF]=fe[YF]=fe[XF]=fe[ZF]=fe[JF]=fe[VF]=fe[BF]=fe[cT]=fe[zF]=fe[UF]=fe[HF]=fe[WF]=fe[e5]=fe[t5]=fe[n5]=fe[r5]=!0;fe[IF]=fe[uT]=fe[KF]=!1;function Lo(e,t,n,r,i,s){var o,a=t&jF,l=t&NF,u=t&MF;if(o!==void 0)return o;if(!ja(e))return e;var f=Na(e);if(f){if(o=ZD(e),!a)return rT(e,o)}else{var c=zn(e),d=c==uT||c==$F;if(XS(e))return DD(e,a);if(c==cT||c==lT||d&&!i){if(o=l||d?{}:CF(e),!a)return l?BD(e,ND(o,e)):$D(e,PD(o,e))}else{if(!fe[c])return i?e:{};o=TF(e,c,a)}}s||(s=new eo);var h=s.get(e);if(h)return h;s.set(e,o),OF(e)?e.forEach(function(b){o.add(Lo(b,t,n,b,e,s))}):PF(e)&&e.forEach(function(b,p){o.set(p,Lo(b,t,n,p,e,s))});var m=u?l?UD:zD:l?_m:km,v=f?void 0:m(e);return N3(v||e,function(b,p){v&&(p=b,b=e[p]),GS(o,p,Lo(b,t,n,p,e,s))}),o}var i5=1,s5=4;function pl(e){return Lo(e,i5|s5)}var Ev=Array.isArray,Cv=Object.keys,o5=Object.prototype.hasOwnProperty,a5=typeof Element<"u";function Sh(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=Ev(e),r=Ev(t),i,s,o;if(n&&r){if(s=e.length,s!=t.length)return!1;for(i=s;i--!==0;)if(!Sh(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=Cv(e);if(s=c.length,s!==Cv(t).length)return!1;for(i=s;i--!==0;)if(!o5.call(t,c[i]))return!1;if(a5&&e instanceof Element&&t instanceof Element)return e===t;for(i=s;i--!==0;)if(o=c[i],!(o==="_owner"&&e.$$typeof)&&!Sh(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var l5=function(t,n){try{return Sh(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=Ks(l5);var u5=4;function kv(e){return Lo(e,u5)}function fT(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 c5="[object Symbol]";function Rm(e){return typeof e=="symbol"||Hi(e)&&Ui(e)==c5}var f5="Expected a function";function Om(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(f5);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 d5=500;function h5(e){var t=Om(e,function(r){return n.size===d5&&n.clear(),r}),n=t.cache;return t}var p5=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,m5=/\\(\\)?/g,g5=h5(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(p5,function(n,r,i,s){t.push(i?s.replace(m5,"$1"):r||n)}),t}),y5=1/0;function v5(e){if(typeof e=="string"||Rm(e))return e;var t=e+"";return t=="0"&&1/e==-y5?"-0":t}var x5=1/0,_v=Hr?Hr.prototype:void 0,Pv=_v?_v.toString:void 0;function dT(e){if(typeof e=="string")return e;if(Na(e))return fT(e,dT)+"";if(Rm(e))return Pv?Pv.call(e):"";var t=e+"";return t=="0"&&1/e==-x5?"-0":t}function w5(e){return e==null?"":dT(e)}function hT(e){return Na(e)?fT(e,v5):Rm(e)?[e]:rT(g5(w5(e)))}var pT={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=v=>{i||(i=!0,n(v,o))},c=v=>{i||(i=!0,r(v,o))},d=s.length,h=[];if(!d)return c([]);let m={value:o,originalValue:a,path:l,options:u,schema:this};for(let v=0;v<s.length;v++){const b=s[v];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):ps(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=MS(t).map(s=>new zi(s));return i.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new Eu(i,n):Eu.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)}}}Ln.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Ln.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:o}=eM(this,t,n,r.context);return o[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])Ln.prototype[e]=Ln.prototype.oneOf;for(const e of["not","nope"])Ln.prototype[e]=Ln.prototype.notOneOf;const tM=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function nM(e){const t=gh(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 gh(e){var t,n;const r=tM.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 rM=/^[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])?)*$/,iM=/^((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,sM=/^(?:[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,oM="^\\d{4}-\\d{2}-\\d{2}",aM="\\d{2}:\\d{2}:\\d{2}",lM="(([+-]\\d{2}(:?\\d{2})?)|Z)",uM=new RegExp(`${oM}T${aM}(\\.\\d+)?${lM}$`),cM=e=>fi(e)||e===e.trim(),fM={}.toString();function ku(){return new IS}class IS extends Ln{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===fM?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(rM,{name:"email",message:t,excludeEmptyString:!0})}url(t=gt.url){return this.matches(iM,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=gt.uuid){return this.matches(sM,{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(uM,{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=gh(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=gh(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:cM})}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()})}}ku.prototype=IS.prototype;let dM=new Date(""),hM=e=>Object.prototype.toString.call(e)==="[object Date]";class tc extends Ln{constructor(){super({type:"date",check(t){return hM(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=nM(t),isNaN(t)?tc.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=mh.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=mh.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)}})}}tc.INVALID_DATE=dM;tc.prototype;function pM(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):bm(a)&&"deps"in a&&a.deps.forEach(l=>s(l,o))}return zN.array(Array.from(r),n).reverse()}function Zy(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 $S(e){return(t,n)=>Zy(e,t)-Zy(e,n)}const mM=(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 Bl(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=Bl(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Bl(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Bl)}):"optional"in e?e.optional():e}const gM=(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 Jy=e=>Object.prototype.toString.call(e)==="[object Object]";function ev(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const yM=$S([]);function Sm(e){return new VS(e)}class VS extends Ln{constructor(t){super({type:"object",check(n){return Jy(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=yM,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,v=i[c];u.path=(n.path?`${n.path}.`:"")+c,d=d.resolve({value:v,context:n.context,parent:l});let b=d instanceof Ln?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||!Jy(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=pM(t,n),r._sortErrors=$S(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 Bl(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 gM(s,t)&&(o=Object.assign({},s),r||delete o[t],o[n]=i(s)),o})}json(){return this.transform(mM)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Vl.exact,test(n){if(n==null)return!0;const r=ev(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=Vl.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=ev(this.schema,i);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=Vl.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(bf.camelCase)}snakeCase(){return this.transformKeys(bf.snakeCase)}constantCase(){return this.transformKeys(t=>bf.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=VS.prototype;var vM=function(t){return xM(t)&&!wM(t)};function xM(e){return!!e&&typeof e=="object"}function wM(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||TM(e)}var bM=typeof Symbol=="function"&&Symbol.for,SM=bM?Symbol.for("react.element"):60103;function TM(e){return e.$$typeof===SM}function EM(e){return Array.isArray(e)?[]:{}}function _u(e,t){return t.clone!==!1&&t.isMergeableObject(e)?pa(EM(e),e,t):e}function CM(e,t,n){return e.concat(t).map(function(r){return _u(r,n)})}function kM(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(i){r[i]=_u(e[i],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=_u(t[i],n):r[i]=pa(e[i],t[i],n)}),r}function pa(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||CM,n.isMergeableObject=n.isMergeableObject||vM;var r=Array.isArray(t),i=Array.isArray(e),s=r===i;return s?r?n.arrayMerge(e,t,n):kM(e,t,n):_u(t,n)}pa.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return pa(r,i,n)},{})};var yh=pa,BS=typeof global=="object"&&global&&global.Object===Object&&global,_M=typeof self=="object"&&self&&self.Object===Object&&self,In=BS||_M||Function("return this")(),Wr=In.Symbol,zS=Object.prototype,PM=zS.hasOwnProperty,AM=zS.toString,mo=Wr?Wr.toStringTag:void 0;function RM(e){var t=PM.call(e,mo),n=e[mo];try{e[mo]=void 0;var r=!0}catch{}var i=AM.call(e);return r&&(t?e[mo]=n:delete e[mo]),i}var OM=Object.prototype,jM=OM.toString;function NM(e){return jM.call(e)}var MM="[object Null]",DM="[object Undefined]",tv=Wr?Wr.toStringTag:void 0;function Ui(e){return e==null?e===void 0?DM:MM:tv&&tv in Object(e)?RM(e):NM(e)}function US(e,t){return function(n){return e(t(n))}}var Tm=US(Object.getPrototypeOf,Object);function Hi(e){return e!=null&&typeof e=="object"}var FM="[object Object]",LM=Function.prototype,IM=Object.prototype,HS=LM.toString,$M=IM.hasOwnProperty,VM=HS.call(Object);function nv(e){if(!Hi(e)||Ui(e)!=FM)return!1;var t=Tm(e);if(t===null)return!0;var n=$M.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&HS.call(n)==VM}function BM(){this.__data__=[],this.size=0}function WS(e,t){return e===t||e!==e&&t!==t}function nc(e,t){for(var n=e.length;n--;)if(WS(e[n][0],t))return n;return-1}var zM=Array.prototype,UM=zM.splice;function HM(e){var t=this.__data__,n=nc(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():UM.call(t,n,1),--this.size,!0}function WM(e){var t=this.__data__,n=nc(t,e);return n<0?void 0:t[n][1]}function KM(e){return nc(this.__data__,e)>-1}function qM(e,t){var n=this.__data__,r=nc(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function ir(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])}}ir.prototype.clear=BM;ir.prototype.delete=HM;ir.prototype.get=WM;ir.prototype.has=KM;ir.prototype.set=qM;function GM(){this.__data__=new ir,this.size=0}function QM(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function YM(e){return this.__data__.get(e)}function XM(e){return this.__data__.has(e)}function Na(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ZM="[object AsyncFunction]",JM="[object Function]",e3="[object GeneratorFunction]",t3="[object Proxy]";function KS(e){if(!Na(e))return!1;var t=Ui(e);return t==JM||t==e3||t==ZM||t==t3}var Sf=In["__core-js_shared__"],rv=function(){var e=/[^.]+$/.exec(Sf&&Sf.keys&&Sf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function n3(e){return!!rv&&rv in e}var r3=Function.prototype,i3=r3.toString;function Wi(e){if(e!=null){try{return i3.call(e)}catch{}try{return e+""}catch{}}return""}var s3=/[\\^$.*+?()[\]{}|]/g,o3=/^\[object .+?Constructor\]$/,a3=Function.prototype,l3=Object.prototype,u3=a3.toString,c3=l3.hasOwnProperty,f3=RegExp("^"+u3.call(c3).replace(s3,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d3(e){if(!Na(e)||n3(e))return!1;var t=KS(e)?f3:o3;return t.test(Wi(e))}function h3(e,t){return e==null?void 0:e[t]}function Ki(e,t){var n=h3(e,t);return d3(n)?n:void 0}var ma=Ki(In,"Map"),ga=Ki(Object,"create");function p3(){this.__data__=ga?ga(null):{},this.size=0}function m3(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var g3="__lodash_hash_undefined__",y3=Object.prototype,v3=y3.hasOwnProperty;function x3(e){var t=this.__data__;if(ga){var n=t[e];return n===g3?void 0:n}return v3.call(t,e)?t[e]:void 0}var w3=Object.prototype,b3=w3.hasOwnProperty;function S3(e){var t=this.__data__;return ga?t[e]!==void 0:b3.call(t,e)}var T3="__lodash_hash_undefined__";function E3(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ga&&t===void 0?T3: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=p3;Ni.prototype.delete=m3;Ni.prototype.get=x3;Ni.prototype.has=S3;Ni.prototype.set=E3;function C3(){this.size=0,this.__data__={hash:new Ni,map:new(ma||ir),string:new Ni}}function k3(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function rc(e,t){var n=e.__data__;return k3(t)?n[typeof t=="string"?"string":"hash"]:n.map}function _3(e){var t=rc(this,e).delete(e);return this.size-=t?1:0,t}function P3(e){return rc(this,e).get(e)}function A3(e){return rc(this,e).has(e)}function R3(e,t){var n=rc(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Yr(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])}}Yr.prototype.clear=C3;Yr.prototype.delete=_3;Yr.prototype.get=P3;Yr.prototype.has=A3;Yr.prototype.set=R3;var O3=200;function j3(e,t){var n=this.__data__;if(n instanceof ir){var r=n.__data__;if(!ma||r.length<O3-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Yr(r)}return n.set(e,t),this.size=n.size,this}function to(e){var t=this.__data__=new ir(e);this.size=t.size}to.prototype.clear=GM;to.prototype.delete=QM;to.prototype.get=YM;to.prototype.has=XM;to.prototype.set=j3;function N3(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var iv=function(){try{var e=Ki(Object,"defineProperty");return e({},"",{}),e}catch{}}();function qS(e,t,n){t=="__proto__"&&iv?iv(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var M3=Object.prototype,D3=M3.hasOwnProperty;function GS(e,t,n){var r=e[t];(!(D3.call(e,t)&&WS(r,n))||n===void 0&&!(t in e))&&qS(e,t,n)}function ic(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?qS(n,a,l):GS(n,a,l)}return n}function F3(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var L3="[object Arguments]";function sv(e){return Hi(e)&&Ui(e)==L3}var QS=Object.prototype,I3=QS.hasOwnProperty,$3=QS.propertyIsEnumerable,V3=sv(function(){return arguments}())?sv:function(e){return Hi(e)&&I3.call(e,"callee")&&!$3.call(e,"callee")},Ma=Array.isArray;function B3(){return!1}var YS=typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,ov=YS&&typeof Dt=="object"&&Dt&&!Dt.nodeType&&Dt,z3=ov&&ov.exports===YS,av=z3?In.Buffer:void 0,U3=av?av.isBuffer:void 0,XS=U3||B3,H3=9007199254740991,W3=/^(?:0|[1-9]\d*)$/;function K3(e,t){var n=typeof e;return t=t??H3,!!t&&(n=="number"||n!="symbol"&&W3.test(e))&&e>-1&&e%1==0&&e<t}var q3=9007199254740991;function ZS(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=q3}var G3="[object Arguments]",Q3="[object Array]",Y3="[object Boolean]",X3="[object Date]",Z3="[object Error]",J3="[object Function]",eD="[object Map]",tD="[object Number]",nD="[object Object]",rD="[object RegExp]",iD="[object Set]",sD="[object String]",oD="[object WeakMap]",aD="[object ArrayBuffer]",lD="[object DataView]",uD="[object Float32Array]",cD="[object Float64Array]",fD="[object Int8Array]",dD="[object Int16Array]",hD="[object Int32Array]",pD="[object Uint8Array]",mD="[object Uint8ClampedArray]",gD="[object Uint16Array]",yD="[object Uint32Array]",me={};me[uD]=me[cD]=me[fD]=me[dD]=me[hD]=me[pD]=me[mD]=me[gD]=me[yD]=!0;me[G3]=me[Q3]=me[aD]=me[Y3]=me[lD]=me[X3]=me[Z3]=me[J3]=me[eD]=me[tD]=me[nD]=me[rD]=me[iD]=me[sD]=me[oD]=!1;function vD(e){return Hi(e)&&ZS(e.length)&&!!me[Ui(e)]}function Em(e){return function(t){return e(t)}}var JS=typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,Lo=JS&&typeof Dt=="object"&&Dt&&!Dt.nodeType&&Dt,xD=Lo&&Lo.exports===JS,Tf=xD&&BS.process,Ks=function(){try{var e=Lo&&Lo.require&&Lo.require("util").types;return e||Tf&&Tf.binding&&Tf.binding("util")}catch{}}(),lv=Ks&&Ks.isTypedArray,wD=lv?Em(lv):vD,bD=Object.prototype,SD=bD.hasOwnProperty;function eT(e,t){var n=Ma(e),r=!n&&V3(e),i=!n&&!r&&XS(e),s=!n&&!r&&!i&&wD(e),o=n||r||i||s,a=o?F3(e.length,String):[],l=a.length;for(var u in e)(t||SD.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||K3(u,l)))&&a.push(u);return a}var TD=Object.prototype;function Cm(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||TD;return e===n}var ED=US(Object.keys,Object),CD=Object.prototype,kD=CD.hasOwnProperty;function _D(e){if(!Cm(e))return ED(e);var t=[];for(var n in Object(e))kD.call(e,n)&&n!="constructor"&&t.push(n);return t}function tT(e){return e!=null&&ZS(e.length)&&!KS(e)}function km(e){return tT(e)?eT(e):_D(e)}function PD(e,t){return e&&ic(t,km(t),e)}function AD(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var RD=Object.prototype,OD=RD.hasOwnProperty;function jD(e){if(!Na(e))return AD(e);var t=Cm(e),n=[];for(var r in e)r=="constructor"&&(t||!OD.call(e,r))||n.push(r);return n}function _m(e){return tT(e)?eT(e,!0):jD(e)}function ND(e,t){return e&&ic(t,_m(t),e)}var nT=typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,uv=nT&&typeof Dt=="object"&&Dt&&!Dt.nodeType&&Dt,MD=uv&&uv.exports===nT,cv=MD?In.Buffer:void 0,fv=cv?cv.allocUnsafe:void 0;function DD(e,t){if(t)return e.slice();var n=e.length,r=fv?fv(n):new e.constructor(n);return e.copy(r),r}function rT(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function FD(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 iT(){return[]}var LD=Object.prototype,ID=LD.propertyIsEnumerable,dv=Object.getOwnPropertySymbols,Pm=dv?function(e){return e==null?[]:(e=Object(e),FD(dv(e),function(t){return ID.call(e,t)}))}:iT;function $D(e,t){return ic(e,Pm(e),t)}function sT(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var VD=Object.getOwnPropertySymbols,oT=VD?function(e){for(var t=[];e;)sT(t,Pm(e)),e=Tm(e);return t}:iT;function BD(e,t){return ic(e,oT(e),t)}function aT(e,t,n){var r=t(e);return Ma(e)?r:sT(r,n(e))}function zD(e){return aT(e,km,Pm)}function UD(e){return aT(e,_m,oT)}var vh=Ki(In,"DataView"),xh=Ki(In,"Promise"),wh=Ki(In,"Set"),bh=Ki(In,"WeakMap"),hv="[object Map]",HD="[object Object]",pv="[object Promise]",mv="[object Set]",gv="[object WeakMap]",yv="[object DataView]",WD=Wi(vh),KD=Wi(ma),qD=Wi(xh),GD=Wi(wh),QD=Wi(bh),Un=Ui;(vh&&Un(new vh(new ArrayBuffer(1)))!=yv||ma&&Un(new ma)!=hv||xh&&Un(xh.resolve())!=pv||wh&&Un(new wh)!=mv||bh&&Un(new bh)!=gv)&&(Un=function(e){var t=Ui(e),n=t==HD?e.constructor:void 0,r=n?Wi(n):"";if(r)switch(r){case WD:return yv;case KD:return hv;case qD:return pv;case GD:return mv;case QD:return gv}return t});var YD=Object.prototype,XD=YD.hasOwnProperty;function ZD(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&XD.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var vv=In.Uint8Array;function Am(e){var t=new e.constructor(e.byteLength);return new vv(t).set(new vv(e)),t}function JD(e,t){var n=t?Am(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var eF=/\w*$/;function tF(e){var t=new e.constructor(e.source,eF.exec(e));return t.lastIndex=e.lastIndex,t}var xv=Wr?Wr.prototype:void 0,wv=xv?xv.valueOf:void 0;function nF(e){return wv?Object(wv.call(e)):{}}function rF(e,t){var n=t?Am(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var iF="[object Boolean]",sF="[object Date]",oF="[object Map]",aF="[object Number]",lF="[object RegExp]",uF="[object Set]",cF="[object String]",fF="[object Symbol]",dF="[object ArrayBuffer]",hF="[object DataView]",pF="[object Float32Array]",mF="[object Float64Array]",gF="[object Int8Array]",yF="[object Int16Array]",vF="[object Int32Array]",xF="[object Uint8Array]",wF="[object Uint8ClampedArray]",bF="[object Uint16Array]",SF="[object Uint32Array]";function TF(e,t,n){var r=e.constructor;switch(t){case dF:return Am(e);case iF:case sF:return new r(+e);case hF:return JD(e,n);case pF:case mF:case gF:case yF:case vF:case xF:case wF:case bF:case SF:return rF(e,n);case oF:return new r;case aF:case cF:return new r(e);case lF:return tF(e);case uF:return new r;case fF:return nF(e)}}var bv=Object.create,EF=function(){function e(){}return function(t){if(!Na(t))return{};if(bv)return bv(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function CF(e){return typeof e.constructor=="function"&&!Cm(e)?EF(Tm(e)):{}}var kF="[object Map]";function _F(e){return Hi(e)&&Un(e)==kF}var Sv=Ks&&Ks.isMap,PF=Sv?Em(Sv):_F,AF="[object Set]";function RF(e){return Hi(e)&&Un(e)==AF}var Tv=Ks&&Ks.isSet,OF=Tv?Em(Tv):RF,jF=1,NF=2,MF=4,lT="[object Arguments]",DF="[object Array]",FF="[object Boolean]",LF="[object Date]",IF="[object Error]",uT="[object Function]",$F="[object GeneratorFunction]",VF="[object Map]",BF="[object Number]",cT="[object Object]",zF="[object RegExp]",UF="[object Set]",HF="[object String]",WF="[object Symbol]",KF="[object WeakMap]",qF="[object ArrayBuffer]",GF="[object DataView]",QF="[object Float32Array]",YF="[object Float64Array]",XF="[object Int8Array]",ZF="[object Int16Array]",JF="[object Int32Array]",e5="[object Uint8Array]",t5="[object Uint8ClampedArray]",n5="[object Uint16Array]",r5="[object Uint32Array]",fe={};fe[lT]=fe[DF]=fe[qF]=fe[GF]=fe[FF]=fe[LF]=fe[QF]=fe[YF]=fe[XF]=fe[ZF]=fe[JF]=fe[VF]=fe[BF]=fe[cT]=fe[zF]=fe[UF]=fe[HF]=fe[WF]=fe[e5]=fe[t5]=fe[n5]=fe[r5]=!0;fe[IF]=fe[uT]=fe[KF]=!1;function Io(e,t,n,r,i,s){var o,a=t&jF,l=t&NF,u=t&MF;if(o!==void 0)return o;if(!Na(e))return e;var f=Ma(e);if(f){if(o=ZD(e),!a)return rT(e,o)}else{var c=Un(e),d=c==uT||c==$F;if(XS(e))return DD(e,a);if(c==cT||c==lT||d&&!i){if(o=l||d?{}:CF(e),!a)return l?BD(e,ND(o,e)):$D(e,PD(o,e))}else{if(!fe[c])return i?e:{};o=TF(e,c,a)}}s||(s=new to);var h=s.get(e);if(h)return h;s.set(e,o),OF(e)?e.forEach(function(b){o.add(Io(b,t,n,b,e,s))}):PF(e)&&e.forEach(function(b,p){o.set(p,Io(b,t,n,p,e,s))});var m=u?l?UD:zD:l?_m:km,v=f?void 0:m(e);return N3(v||e,function(b,p){v&&(p=b,b=e[p]),GS(o,p,Io(b,t,n,p,e,s))}),o}var i5=1,s5=4;function ml(e){return Io(e,i5|s5)}var Ev=Array.isArray,Cv=Object.keys,o5=Object.prototype.hasOwnProperty,a5=typeof Element<"u";function Sh(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=Ev(e),r=Ev(t),i,s,o;if(n&&r){if(s=e.length,s!=t.length)return!1;for(i=s;i--!==0;)if(!Sh(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=Cv(e);if(s=c.length,s!==Cv(t).length)return!1;for(i=s;i--!==0;)if(!o5.call(t,c[i]))return!1;if(a5&&e instanceof Element&&t instanceof Element)return e===t;for(i=s;i--!==0;)if(o=c[i],!(o==="_owner"&&e.$$typeof)&&!Sh(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var l5=function(t,n){try{return Sh(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 ii=qs(l5);var u5=4;function kv(e){return Io(e,u5)}function fT(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 c5="[object Symbol]";function Rm(e){return typeof e=="symbol"||Hi(e)&&Ui(e)==c5}var f5="Expected a function";function Om(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(f5);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||Yr),n}Om.Cache=Yr;var d5=500;function h5(e){var t=Om(e,function(r){return n.size===d5&&n.clear(),r}),n=t.cache;return t}var p5=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,m5=/\\(\\)?/g,g5=h5(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(p5,function(n,r,i,s){t.push(i?s.replace(m5,"$1"):r||n)}),t}),y5=1/0;function v5(e){if(typeof e=="string"||Rm(e))return e;var t=e+"";return t=="0"&&1/e==-y5?"-0":t}var x5=1/0,_v=Wr?Wr.prototype:void 0,Pv=_v?_v.toString:void 0;function dT(e){if(typeof e=="string")return e;if(Ma(e))return fT(e,dT)+"";if(Rm(e))return Pv?Pv.call(e):"";var t=e+"";return t=="0"&&1/e==-x5?"-0":t}function w5(e){return e==null?"":dT(e)}function hT(e){return Ma(e)?fT(e,v5):Rm(e)?[e]:rT(g5(w5(e)))}var pT={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 We=typeof Symbol=="function"&&Symbol.for,jm=We?Symbol.for("react.element"):60103,Nm=We?Symbol.for("react.portal"):60106,ic=We?Symbol.for("react.fragment"):60107,sc=We?Symbol.for("react.strict_mode"):60108,oc=We?Symbol.for("react.profiler"):60114,ac=We?Symbol.for("react.provider"):60109,lc=We?Symbol.for("react.context"):60110,Mm=We?Symbol.for("react.async_mode"):60111,uc=We?Symbol.for("react.concurrent_mode"):60111,cc=We?Symbol.for("react.forward_ref"):60112,fc=We?Symbol.for("react.suspense"):60113,b5=We?Symbol.for("react.suspense_list"):60120,dc=We?Symbol.for("react.memo"):60115,hc=We?Symbol.for("react.lazy"):60116,S5=We?Symbol.for("react.block"):60121,T5=We?Symbol.for("react.fundamental"):60117,E5=We?Symbol.for("react.responder"):60118,C5=We?Symbol.for("react.scope"):60119;function Vt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case jm:switch(e=e.type,e){case Mm:case uc:case ic:case oc:case sc:case fc:return e;default:switch(e=e&&e.$$typeof,e){case lc:case cc:case hc:case dc:case ac:return e;default:return t}}case Nm:return t}}}function mT(e){return Vt(e)===uc}ue.AsyncMode=Mm;ue.ConcurrentMode=uc;ue.ContextConsumer=lc;ue.ContextProvider=ac;ue.Element=jm;ue.ForwardRef=cc;ue.Fragment=ic;ue.Lazy=hc;ue.Memo=dc;ue.Portal=Nm;ue.Profiler=oc;ue.StrictMode=sc;ue.Suspense=fc;ue.isAsyncMode=function(e){return mT(e)||Vt(e)===Mm};ue.isConcurrentMode=mT;ue.isContextConsumer=function(e){return Vt(e)===lc};ue.isContextProvider=function(e){return Vt(e)===ac};ue.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===jm};ue.isForwardRef=function(e){return Vt(e)===cc};ue.isFragment=function(e){return Vt(e)===ic};ue.isLazy=function(e){return Vt(e)===hc};ue.isMemo=function(e){return Vt(e)===dc};ue.isPortal=function(e){return Vt(e)===Nm};ue.isProfiler=function(e){return Vt(e)===oc};ue.isStrictMode=function(e){return Vt(e)===sc};ue.isSuspense=function(e){return Vt(e)===fc};ue.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ic||e===uc||e===oc||e===sc||e===fc||e===b5||typeof e=="object"&&e!==null&&(e.$$typeof===hc||e.$$typeof===dc||e.$$typeof===ac||e.$$typeof===lc||e.$$typeof===cc||e.$$typeof===T5||e.$$typeof===E5||e.$$typeof===C5||e.$$typeof===S5)};ue.typeOf=Vt;pT.exports=ue;var k5=pT.exports,gT=k5,_5={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},P5={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},yT={};yT[gT.ForwardRef]=_5;yT[gT.Memo]=P5;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 vT(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 pc=y.createContext(void 0);pc.displayName="FormikContext";pc.Provider;pc.Consumer;function A5(){var e=y.useContext(pc);return e}var on=function(t){return typeof t=="function"},mc=function(t){return t!==null&&typeof t=="object"},R5=function(t){return String(Math.floor(Number(t)))===t},Ef=function(t){return Object.prototype.toString.call(t)==="[object String]"},Cf=function(t){return mc(t)&&on(t.then)};function Rt(e,t,n,r){r===void 0&&(r=0);for(var i=hT(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=kv(e),i=r,s=0,o=hT(t);s<o.length-1;s++){var a=o[s],l=Rt(e,o.slice(0,s+1));if(l&&(mc(l)||Array.isArray(l)))i=i[a]=kv(l);else{var u=o[s+1];i=i[a]=R5(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 xT(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];mc(a)?n.get(a)||(n.set(a,!0),r[o]=Array.isArray(a)?[]:{},xT(a,t,n,r[o])):r[o]=t}return r}function O5(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:xT(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={},ml={};function j5(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=vT(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),v=y.useRef(d.initialTouched||ml),b=y.useRef(d.initialStatus),p=y.useRef(!1),g=y.useRef({});y.useEffect(function(){return p.current=!0,function(){p.current=!1}},[]);var x=y.useState(0),E=x[1],S=y.useRef({values:pl(d.initialValues),errors:pl(d.initialErrors)||Jr,touched:pl(d.initialTouched)||ml,status:pl(d.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),C=S.current,k=y.useCallback(function(_){var M=S.current;S.current=O5(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):Cf(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,_):M5(_,z);return new Promise(function(oe,_e){G.then(function(){oe(Jr)},function(_t){_t.name==="ValidationError"?oe(N5(_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=yh.all([$,z,G],{arrayMerge:D5});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:v.current?v.current:d.initialTouched||{},G=_&&_.status?_.status:b.current?b.current:d.initialStatus;h.current=M,m.current=$,v.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,Da);Cf(_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(v.current,d.initialTouched)&&(v.current=d.initialTouched||ml,k({type:"SET_TOUCHED",payload:d.initialTouched||ml}))},[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 Cf($)?(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(!Ef(_)){_.persist&&_.persist();var oe=_.target?_.target:_.currentTarget,_e=oe.type,_t=oe.name,yn=oe.id,qi=oe.value,sr=oe.checked,Bm=oe.outerHTML,Ia=oe.options,$a=oe.multiple;$=M||_t||yn,z=/number|range/.test(_e)?(G=parseFloat(qi),isNaN(G)?"":G):/checkbox/.test(_e)?L5(Rt(C.values,$),sr,qi):Ia&&$a?F5(Ia):qi}$&&H($,z)},[H,C.values]),ce=Ut(function(_){if(Ef(_))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(Ef(_))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:_})},[]),to=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=no(),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 _})}),Ma=Ut(function(_){_&&_.preventDefault&&on(_.preventDefault)&&_.preventDefault(),_&&_.stopPropagation&&on(_.stopPropagation)&&_.stopPropagation(),to().catch(function(M){console.warn("Warning: An unhandled error was caught from submitForm()",M)})}),Da={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:to},no=Ut(function(){return f(C.values,Da)}),bc=Ut(function(_){_&&_.preventDefault&&on(_.preventDefault)&&_.preventDefault(),_&&_.stopPropagation&&on(_.stopPropagation)&&_.stopPropagation(),xe()}),Fa=y.useCallback(function(_){return{value:Rt(C.values,_),error:Rt(C.errors,_),touched:!!Rt(C.touched,_),initialValue:Rt(h.current,_),initialTouched:!!Rt(v.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]),La=y.useCallback(function(_){var M=mc(_),$=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]),Sc=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]),Tc=ze({},C,{initialValues:h.current,initialErrors:m.current,initialTouched:v.current,initialStatus:b.current,handleBlur:Ve,handleChange:ce,handleReset:bc,handleSubmit:Ma,resetForm:xe,setErrors:L,setFormikState:pt,setFieldTouched:ye,setFieldValue:H,setFieldError:V,setStatus:mt,setSubmitting:ir,setTouched:O,setValues:B,submitForm:to,validateForm:ie,validateField:Oe,isValid:Sc,dirty:kt,unregisterField:ne,registerField:Q,getFieldProps:La,getFieldMeta:Fa,getFieldHelpers:Yr,validateOnBlur:i,validateOnChange:n,validateOnMount:o});return Tc}function N5(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 M5(e,t,n,r){n===void 0&&(n=!1);var i=Th(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:i})}function Th(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||nv(i)?Th(i):i!==""?i:void 0}):nv(e[r])?t[r]=Th(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function D5(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?yh(Array.isArray(s)?[]:{},s,n):s}else n.isMergeableObject(s)?r[o]=yh(e[o],s,n):e.indexOf(s)===-1&&r.push(s)}),r}function F5(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function L5(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 I5=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 I5(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 $5=y.forwardRef(function(e,t){var n=e.action,r=vT(e,["action"]),i=n??"#",s=A5(),o=s.handleReset,a=s.handleSubmit;return y.createElement("form",ze({onSubmit:a,ref:t,onReset:o,action:i},r))});$5.displayName="Form";const wT=({init:e,schema:t,action:n})=>j5({initialValues:e,validationSchema:t,validateOnBlur:!1,enableReinitialize:!0,validateOnChange:!1,validateOnMount:!1,onSubmit:r=>{n(r)}});function V5(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 B5=e=>{switch(e){case"success":return H5;case"info":return K5;case"warning":return W5;case"error":return q5;default:return null}},z5=Array(12).fill(0),U5=({visible:e,className:t})=>R.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},R.createElement("div",{className:"sonner-spinner"},z5.map((n,r)=>R.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),H5=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"})),W5=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"})),K5=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"})),q5=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"})),G5=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"})),Q5=()=>{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 Eh=1;class Y5{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:Eh++,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(Z5(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)||Eh++;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 Y5,X5=(e,t)=>{const n=(t==null?void 0:t.id)||Eh++;return xt.addToast({title:e,...t,id:n}),n},Z5=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",J5=X5,eL=()=>xt.toasts,tL=()=>xt.getActiveToasts(),Av=Object.assign(J5,{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:eL,getToasts:tL});V5("[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 gl(e){return e.label!==void 0}const nL=3,rL="24px",iL="16px",Rv=4e3,sL=356,oL=14,aL=45,lL=200;function xn(...e){return e.filter(Boolean).join(" ")}function uL(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const cL=e=>{var t,n,r,i,s,o,a,l,u;const{invert:f,toast:c,unstyled:d,interacting:h,setHeights:m,visibleToasts:v,heights:b,index:p,toasts:g,expanded:x,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),[to,Ma]=R.useState(!1),[Da,no]=R.useState(0),[bc,Fa]=R.useState(0),Yr=R.useRef(c.duration||re||Rv),La=R.useRef(null),kt=R.useRef(null),Sc=p===0,Tc=p+1<=v,_=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||Rv,[c.duration,re]),_t=R.useRef(0),yn=R.useRef(0),qi=R.useRef(0),sr=R.useRef(null),[Bm,Ia]=ie.split("-"),$a=R.useMemo(()=>b.reduce((Y,Be,Xe)=>Xe>=G?Y:Y+Be.height,0),[b,G]),zm=Q5(),$T=c.invert||f,Ec=_==="loading";yn.current=R.useMemo(()=>G*xe+$a,[G,$a]),R.useEffect(()=>{Yr.current=_e},[_e]),R.useEffect(()=>{ce(!0)},[]),R.useEffect(()=>{const Y=kt.current;if(Y){const Be=Y.getBoundingClientRect().height;return Fa(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,Fa(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),no(yn.current),m(Y=>Y.filter(Be=>Be.toastId!==c.id)),setTimeout(()=>{E(c)},lL)},[c,E,m,yn]);R.useEffect(()=>{if(c.promise&&_==="loading"||c.duration===1/0||c.type==="loading")return;let Y;return x||h||zm?(()=>{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)},[x,h,c,_,zm,or]),R.useEffect(()=>{c.delete&&or()},[or,c.delete]);function VT(){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(U5,{className:xn(Q==null?void 0:Q.loader,c==null||(Y=c.classNames)==null?void 0:Y.loader),visible:_==="loading"})}var Um,Hm;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":(Um=c.richColors)!=null?Um:S,"data-styled":!(c.jsx||c.unstyled||d),"data-mounted":q,"data-promise":!!c.promise,"data-swiped":to,"data-removed":ye,"data-visible":Tc,"data-y-position":Bm,"data-x-position":Ia,"data-index":p,"data-front":Sc,"data-swiping":Ve,"data-dismissible":M,"data-type":_,"data-invert":$T,"data-swipe-out":mt,"data-swipe-direction":V,"data-expanded":!!(x||Oe&&q),style:{"--index":p,"--toasts-before":p,"--z-index":g.length-p,"--offset":`${ye?Da:yn.current}px`,"--initial-height":Oe?"auto":`${bc}px`,...k,...c.style},onDragEnd:()=>{pt(!1),B(null),sr.current=null},onPointerDown:Y=>{Ec||!M||(La.current=new Date,no(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),Va=Number(((Be=kt.current)==null?void 0:Be.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ke=new Date().getTime()-((Xe=La.current)==null?void 0:Xe.getTime()),Bt=L==="x"?Pt:Va,Ba=Math.abs(Bt)/Ke;if(Math.abs(Bt)>=aL||Ba>.11){no(yn.current),c.onDismiss==null||c.onDismiss.call(c,c),H(L==="x"?Pt>0?"right":"left":Va>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")}Ma(!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 Ba;const nn=(Ba=e.swipeDirections)!=null?Ba:uL(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 Wm=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*Wm(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*Wm(Bt);rn.x=Math.abs(Xr)<Math.abs(Bt)?Xr:Bt}(Math.abs(rn.x)>0||Math.abs(rn.y)>0)&&Ma(!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":Ec,"data-close-button":!0,onClick:Ec||!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)},(Hm=ne==null?void 0:ne.close)!=null?Hm:G5):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||VT():null,c.type!=="loading"?c.icon||(ne==null?void 0:ne[_])||B5(_):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&&gl(c.cancel)?R.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||P,onClick:Y=>{gl(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&&gl(c.action)?R.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||j,onClick:Y=>{gl(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 Ov(){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 fL(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,o=s?"--mobile-offset":"--offset",a=s?iL:rL;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 dL=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:v=nL,toastOptions:b,dir:p=Ov(),gap:g=oL,icons:x,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(()=>{pk.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"?Ov():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":`${sL}px`,"--gap":`${g}px`,...m,...fL(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(cL,{key:J.id,icons:x,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:v,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 hL(e){return Array.isArray(e)&&e[0].field!==void 0}const bT=(e,t)=>{var n;if(hL(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||Av.error(e.message);return}if(e&&e.error){t!=null&&t.noToast||Av.error(e.error);return}};function pL(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 Dm({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 kf={sm:"px-3 py-1 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-15"};function mL({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 v=nr();return w.jsxs("div",{className:Ne({"mb-2":!o},f),children:[w.jsx(Dm,{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",kf[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",kf[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:v.getColor(K.InputText),backgroundColor:v.getColor(K.InputBackground),borderColor:v.getColor(K.InputBorder),borderRadius:v.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",kf[i],{"border-red-500!":!!l}),children:n})]}),!!l&&w.jsx("p",{className:"mt-1 text-xs text-red-500",children:l})]})}const gL=(e,t)=>{document.cookie=`${e}=${t}`},ST=y.createContext({}),yL=()=>`${window.location.pathname}_$$_${document.title}`,vL=()=>{const e=localStorage.getItem("page");return!e||e===""?"/":e},xL=()=>{const e=localStorage.getItem("p-history");if(!e||e==="")return[];try{return JSON.parse(e)}catch{return[]}};function wL({children:e}){const[t,n]=y.useState("/"),[r,i]=y.useState(xL());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(ST.Provider,{value:{page:t,setPage:o,history:r,clearHistory:s},children:e})}function Fm(){return y.useContext(ST)}function bL({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(Dm,{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 jv={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:""}},SL={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"},TL={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:"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 CL({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":""} ${jv[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 ${SL[d]} ${TL[u]} ${jv[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:EL[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 kL({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 _L({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 Nv=Object.assign(kL,{Group:_L});function Lm({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 v=nr();return w.jsxs("div",{className:Ne({"mb-2":!s},i),children:[t&&w.jsx(Dm,{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:v.getColor(K.InputText),backgroundColor:v.getColor(K.InputBackground),borderColor:v.getColor(K.InputBorder),borderRadius:v.getRadius()}}),!!u&&w.jsx("p",{className:"text-red-500 mt-1 text-xs",children:u})]})}function PL({onOk:e,clientId:t,widgetId:n,appearance:r}){var h,m,v,b,p,g,x,E;const i=nr(),{defaultValues:s}=tn(),o=Fm(),a=gN(),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?Il(C.name):void 0;return S[C.name]=k||(s==null?void 0:s[C.name])||"",S},{}),u=(b=(v=r==null?void 0:r.body)==null?void 0:v.inputs)==null?void 0:b.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?Cu().required(C.label):Cu(),S),{})),c=wT({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)){mN(C)&&(vf(Si.CustomerToken,C.customer_token),vf(Si.CustomerRefreshToken,C.customer_refresh_token),vf(Si.DeviceId,C.device_id)),o.clearHistory();for(const j of((P=r==null?void 0:r.body)==null?void 0:P.inputs)||[])j.remember&&gL(j.name,S[j.name]);e==null||e();return}bT(C,{form:c})}}),d=!pL(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=(x=r==null?void 0:r.body)==null?void 0:x.inputs)==null?void 0:E.map(S=>{var C,k;if(["text","email","phone"].includes(S.type))return w.jsx(mL,{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(bL,{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(CL,{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(Nv.Group,{id:S.name,label:S.label,required:S.required,children:(k=S.options)==null?void 0:k.map(P=>w.jsx(Nv,{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(Lm,{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 AL({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 RL({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 OL(){const e=Fm(),t=y.useCallback(()=>{const n=window.location.pathname;n!==e.page&&e.setPage(n)},[e.page]);return PS("popstate",t),null}function jL(){const e=Vi(),t=Fm(),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 PS("popstate",n),y.useEffect(()=>{if(!e)return;const r=vL(),i=yL();r!==i&&(e.emit(Dn.PageChange,{page:i}),t.setPage(i))},[e]),null}function NL({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 ML(){return OL(),null}const _f=(e,t)=>{var n;return(n=e.find(r=>r.type===t))==null?void 0:n.content};function DL(){var c,d,h,m,v,b;const e=nr(),{widget:t,setOpen:n}=tn(),[r,i]=y.useState(!0),s=mm(),o=gm();if(!t)return null;const a=()=>{n(!1)};if(y.useEffect(()=>{yN(t.client_id).then(([p,g])=>{bp(g)&&s.push("chat")}).finally(()=>{i(!1)})},[]),r)return null;const l=_f(((d=(c=t.appearance)==null?void 0:c.head)==null?void 0:d.elements)||[],"text"),u=_f(((m=(h=t.appearance)==null?void 0:h.head)==null?void 0:m.elements)||[],"title"),f=_f(((b=(v=t.appearance)==null?void 0:v.head)==null?void 0:b.elements)||[],"logo");return w.jsxs(NL,{children:[w.jsxs("div",{className:"relative flex flex-col gap-3 items-center justify-center h-44",children:[o&&w.jsx(AL,{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(RL,{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(PL,{clientId:t.client_id,widgetId:t.link_id,appearance:t.appearance,onOk:()=>{s.push("chat")}})})]})}function FL(){return w.jsxs(w.Fragment,{children:[w.jsx(RS,{border:!0,children:w.jsx(DL,{})}),w.jsx(ML,{})]})}const LL=[{path:"/",component:FL,name:"registration"}];var Yi=(e=>(e.Open="open",e.Closed="closed",e.Pending="pending",e.Deleted="deleted",e.Created="created",e))(Yi||{}),TT=(e=>(e.AdminJoin="admin_join",e))(TT||{}),et=(e=>(e.Customer="customer",e.User="user",e.System="system",e.Activity="activity",e))(et||{});function IL({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 $L=Object.defineProperty,VL=(e,t,n)=>t in e?$L(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pf=(e,t,n)=>(VL(e,typeof t!="symbol"?t+"":t,n),n);let BL=class{constructor(){Pf(this,"current",this.detect()),Pf(this,"handoffState","pending"),Pf(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"}},Bl=new BL;function zL(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 zL(()=>{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 ET(){let[e]=y.useState(gc);return y.useEffect(()=>()=>e.dispose(),[e]),e}let $r=(e,t)=>{Bl.isServer?y.useEffect(e,t):y.useLayoutEffect(e,t)};function CT(e){let t=y.useRef(e);return $r(()=>{t.current=e},[e]),t}let Kn=function(e){let t=CT(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 kT=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(kT||{}),_r=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(_r||{});function _T(){let e=HL();return y.useCallback(t=>UL({mergeRefs:e,...t}),[e])}function UL({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:s=!0,name:o,mergeRefs:a}){a=a??WL;let l=PT(t,e);if(s)return yl(l,n,r,o,a);let u=i??0;if(u&2){let{static:f=!1,...c}=l;if(f)return yl(c,n,r,o,a)}if(u&1){let{unmount:f=!0,...c}=l;return yc(f?0:1,{0(){return null},1(){return yl({...c,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return yl(l,n,r,o,a)}function yl(e,t={},n,r,i){let{as:s=n,children:o,refName:a="ref",...l}=Af(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,v]of Object.entries(t))typeof v=="boolean"&&(d=!0),v===!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(ii(l)).length>0||Object.keys(ii(c)).length>0))if(!y.isValidElement(f)||Array.isArray(f)&&f.length>1){if(Object.keys(ii(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(ii(l)).concat(Object.keys(ii(c))).map(d=>` - ${d}`).join(`
105
+ */var We=typeof Symbol=="function"&&Symbol.for,jm=We?Symbol.for("react.element"):60103,Nm=We?Symbol.for("react.portal"):60106,sc=We?Symbol.for("react.fragment"):60107,oc=We?Symbol.for("react.strict_mode"):60108,ac=We?Symbol.for("react.profiler"):60114,lc=We?Symbol.for("react.provider"):60109,uc=We?Symbol.for("react.context"):60110,Mm=We?Symbol.for("react.async_mode"):60111,cc=We?Symbol.for("react.concurrent_mode"):60111,fc=We?Symbol.for("react.forward_ref"):60112,dc=We?Symbol.for("react.suspense"):60113,b5=We?Symbol.for("react.suspense_list"):60120,hc=We?Symbol.for("react.memo"):60115,pc=We?Symbol.for("react.lazy"):60116,S5=We?Symbol.for("react.block"):60121,T5=We?Symbol.for("react.fundamental"):60117,E5=We?Symbol.for("react.responder"):60118,C5=We?Symbol.for("react.scope"):60119;function Vt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case jm:switch(e=e.type,e){case Mm:case cc:case sc:case ac:case oc:case dc:return e;default:switch(e=e&&e.$$typeof,e){case uc:case fc:case pc:case hc:case lc:return e;default:return t}}case Nm:return t}}}function mT(e){return Vt(e)===cc}ue.AsyncMode=Mm;ue.ConcurrentMode=cc;ue.ContextConsumer=uc;ue.ContextProvider=lc;ue.Element=jm;ue.ForwardRef=fc;ue.Fragment=sc;ue.Lazy=pc;ue.Memo=hc;ue.Portal=Nm;ue.Profiler=ac;ue.StrictMode=oc;ue.Suspense=dc;ue.isAsyncMode=function(e){return mT(e)||Vt(e)===Mm};ue.isConcurrentMode=mT;ue.isContextConsumer=function(e){return Vt(e)===uc};ue.isContextProvider=function(e){return Vt(e)===lc};ue.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===jm};ue.isForwardRef=function(e){return Vt(e)===fc};ue.isFragment=function(e){return Vt(e)===sc};ue.isLazy=function(e){return Vt(e)===pc};ue.isMemo=function(e){return Vt(e)===hc};ue.isPortal=function(e){return Vt(e)===Nm};ue.isProfiler=function(e){return Vt(e)===ac};ue.isStrictMode=function(e){return Vt(e)===oc};ue.isSuspense=function(e){return Vt(e)===dc};ue.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===sc||e===cc||e===ac||e===oc||e===dc||e===b5||typeof e=="object"&&e!==null&&(e.$$typeof===pc||e.$$typeof===hc||e.$$typeof===lc||e.$$typeof===uc||e.$$typeof===fc||e.$$typeof===T5||e.$$typeof===E5||e.$$typeof===C5||e.$$typeof===S5)};ue.typeOf=Vt;pT.exports=ue;var k5=pT.exports,gT=k5,_5={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},P5={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},yT={};yT[gT.ForwardRef]=_5;yT[gT.Memo]=P5;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 vT(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 mc=y.createContext(void 0);mc.displayName="FormikContext";mc.Provider;mc.Consumer;function A5(){var e=y.useContext(mc);return e}var on=function(t){return typeof t=="function"},gc=function(t){return t!==null&&typeof t=="object"},R5=function(t){return String(Math.floor(Number(t)))===t},Ef=function(t){return Object.prototype.toString.call(t)==="[object String]"},Cf=function(t){return gc(t)&&on(t.then)};function Rt(e,t,n,r){r===void 0&&(r=0);for(var i=hT(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=kv(e),i=r,s=0,o=hT(t);s<o.length-1;s++){var a=o[s],l=Rt(e,o.slice(0,s+1));if(l&&(gc(l)||Array.isArray(l)))i=i[a]=kv(l);else{var u=o[s+1];i=i[a]=R5(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 xT(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];gc(a)?n.get(a)||(n.set(a,!0),r[o]=Array.isArray(a)?[]:{},xT(a,t,n,r[o])):r[o]=t}return r}function O5(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 ii(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:xT(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 ei={},gl={};function j5(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=vT(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||ei),v=y.useRef(d.initialTouched||gl),b=y.useRef(d.initialStatus),p=y.useRef(!1),g=y.useRef({});y.useEffect(function(){return p.current=!0,function(){p.current=!1}},[]);var x=y.useState(0),E=x[1],S=y.useRef({values:ml(d.initialValues),errors:ml(d.initialErrors)||ei,touched:ml(d.initialTouched)||gl,status:ml(d.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),C=S.current,k=y.useCallback(function(_){var M=S.current;S.current=O5(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?$(ei):Cf(G)?G.then(function(oe){$(oe||ei)},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,_):M5(_,z);return new Promise(function(oe,_e){G.then(function(){oe(ei)},function(_t){_t.name==="ValidationError"?oe(N5(_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=yh.all([$,z,G],{arrayMerge:D5});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&&ii(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:v.current?v.current:d.initialTouched||{},G=_&&_.status?_.status:b.current?b.current:d.initialStatus;h.current=M,m.current=$,v.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,Fa);Cf(_e)?_e.then(oe):oe()}else oe()},[d.initialErrors,d.initialStatus,d.initialTouched,d.onReset]);y.useEffect(function(){p.current===!0&&!ii(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&&!ii(m.current,d.initialErrors)&&(m.current=d.initialErrors||ei,k({type:"SET_ERRORS",payload:d.initialErrors||ei}))},[u,d.initialErrors]),y.useEffect(function(){u&&p.current===!0&&!ii(v.current,d.initialTouched)&&(v.current=d.initialTouched||gl,k({type:"SET_TOUCHED",payload:d.initialTouched||gl}))},[u,d.initialTouched]),y.useEffect(function(){u&&p.current===!0&&!ii(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 Cf($)?(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(!Ef(_)){_.persist&&_.persist();var oe=_.target?_.target:_.currentTarget,_e=oe.type,_t=oe.name,yn=oe.id,qi=oe.value,or=oe.checked,Bm=oe.outerHTML,$a=oe.options,Va=oe.multiple;$=M||_t||yn,z=/number|range/.test(_e)?(G=parseFloat(qi),isNaN(G)?"":G):/checkbox/.test(_e)?L5(Rt(C.values,$),or,qi):$a&&Va?F5($a):qi}$&&H($,z)},[H,C.values]),ce=Ut(function(_){if(Ef(_))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(Ef(_))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:_})},[]),sr=y.useCallback(function(_){k({type:"SET_ISSUBMITTING",payload:_})},[]),no=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=ro(),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 _})}),Da=Ut(function(_){_&&_.preventDefault&&on(_.preventDefault)&&_.preventDefault(),_&&_.stopPropagation&&on(_.stopPropagation)&&_.stopPropagation(),no().catch(function(M){console.warn("Warning: An unhandled error was caught from submitForm()",M)})}),Fa={resetForm:xe,validateForm:ie,validateField:Oe,setErrors:L,setFieldError:V,setFieldTouched:ye,setFieldValue:H,setStatus:mt,setSubmitting:sr,setTouched:O,setValues:B,setFormikState:pt,submitForm:no},ro=Ut(function(){return f(C.values,Fa)}),Sc=Ut(function(_){_&&_.preventDefault&&on(_.preventDefault)&&_.preventDefault(),_&&_.stopPropagation&&on(_.stopPropagation)&&_.stopPropagation(),xe()}),La=y.useCallback(function(_){return{value:Rt(C.values,_),error:Rt(C.errors,_),touched:!!Rt(C.touched,_),initialValue:Rt(h.current,_),initialTouched:!!Rt(v.current,_),initialError:Rt(m.current,_)}},[C.errors,C.touched,C.values]),Xr=y.useCallback(function(_){return{setValue:function($,z){return H(_,$,z)},setTouched:function($,z){return ye(_,$,z)},setError:function($){return V(_,$)}}},[H,ye,V]),Ia=y.useCallback(function(_){var M=gc(_),$=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!ii(h.current,C.values)},[h.current,C.values]),Tc=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]),Ec=ze({},C,{initialValues:h.current,initialErrors:m.current,initialTouched:v.current,initialStatus:b.current,handleBlur:Ve,handleChange:ce,handleReset:Sc,handleSubmit:Da,resetForm:xe,setErrors:L,setFormikState:pt,setFieldTouched:ye,setFieldValue:H,setFieldError:V,setStatus:mt,setSubmitting:sr,setTouched:O,setValues:B,submitForm:no,validateForm:ie,validateField:Oe,isValid:Tc,dirty:kt,unregisterField:ne,registerField:Q,getFieldProps:Ia,getFieldMeta:La,getFieldHelpers:Xr,validateOnBlur:i,validateOnChange:n,validateOnMount:o});return Ec}function N5(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 M5(e,t,n,r){n===void 0&&(n=!1);var i=Th(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:i})}function Th(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||nv(i)?Th(i):i!==""?i:void 0}):nv(e[r])?t[r]=Th(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function D5(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?yh(Array.isArray(s)?[]:{},s,n):s}else n.isMergeableObject(s)?r[o]=yh(e[o],s,n):e.indexOf(s)===-1&&r.push(s)}),r}function F5(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function L5(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 I5=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 I5(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 $5=y.forwardRef(function(e,t){var n=e.action,r=vT(e,["action"]),i=n??"#",s=A5(),o=s.handleReset,a=s.handleSubmit;return y.createElement("form",ze({onSubmit:a,ref:t,onReset:o,action:i},r))});$5.displayName="Form";const wT=({init:e,schema:t,action:n})=>j5({initialValues:e,validationSchema:t,validateOnBlur:!1,enableReinitialize:!0,validateOnChange:!1,validateOnMount:!1,onSubmit:r=>{n(r)}});function V5(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 B5=e=>{switch(e){case"success":return H5;case"info":return K5;case"warning":return W5;case"error":return q5;default:return null}},z5=Array(12).fill(0),U5=({visible:e,className:t})=>R.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},R.createElement("div",{className:"sonner-spinner"},z5.map((n,r)=>R.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),H5=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"})),W5=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"})),K5=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"})),q5=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"})),G5=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"})),Q5=()=>{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 Eh=1;class Y5{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:Eh++,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(Z5(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)||Eh++;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 Y5,X5=(e,t)=>{const n=(t==null?void 0:t.id)||Eh++;return xt.addToast({title:e,...t,id:n}),n},Z5=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",J5=X5,eL=()=>xt.toasts,tL=()=>xt.getActiveToasts(),Av=Object.assign(J5,{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:eL,getToasts:tL});V5("[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 yl(e){return e.label!==void 0}const nL=3,rL="24px",iL="16px",Rv=4e3,sL=356,oL=14,aL=45,lL=200;function xn(...e){return e.filter(Boolean).join(" ")}function uL(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const cL=e=>{var t,n,r,i,s,o,a,l,u;const{invert:f,toast:c,unstyled:d,interacting:h,setHeights:m,visibleToasts:v,heights:b,index:p,toasts:g,expanded:x,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,sr]=R.useState(!1),[no,Da]=R.useState(!1),[Fa,ro]=R.useState(0),[Sc,La]=R.useState(0),Xr=R.useRef(c.duration||re||Rv),Ia=R.useRef(null),kt=R.useRef(null),Tc=p===0,Ec=p+1<=v,_=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||Rv,[c.duration,re]),_t=R.useRef(0),yn=R.useRef(0),qi=R.useRef(0),or=R.useRef(null),[Bm,$a]=ie.split("-"),Va=R.useMemo(()=>b.reduce((Y,Be,Xe)=>Xe>=G?Y:Y+Be.height,0),[b,G]),zm=Q5(),$T=c.invert||f,Cc=_==="loading";yn.current=R.useMemo(()=>G*xe+Va,[G,Va]),R.useEffect(()=>{Xr.current=_e},[_e]),R.useEffect(()=>{ce(!0)},[]),R.useEffect(()=>{const Y=kt.current;if(Y){const Be=Y.getBoundingClientRect().height;return La(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,La(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 ar=R.useCallback(()=>{J(!0),ro(yn.current),m(Y=>Y.filter(Be=>Be.toastId!==c.id)),setTimeout(()=>{E(c)},lL)},[c,E,m,yn]);R.useEffect(()=>{if(c.promise&&_==="loading"||c.duration===1/0||c.type==="loading")return;let Y;return x||h||zm?(()=>{if(qi.current<_t.current){const Pt=new Date().getTime()-_t.current;Xr.current=Xr.current-Pt}qi.current=new Date().getTime()})():(()=>{Xr.current!==1/0&&(_t.current=new Date().getTime(),Y=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),ar()},Xr.current))})(),()=>clearTimeout(Y)},[x,h,c,_,zm,ar]),R.useEffect(()=>{c.delete&&ar()},[ar,c.delete]);function VT(){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(U5,{className:xn(Q==null?void 0:Q.loader,c==null||(Y=c.classNames)==null?void 0:Y.loader),visible:_==="loading"})}var Um,Hm;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":(Um=c.richColors)!=null?Um:S,"data-styled":!(c.jsx||c.unstyled||d),"data-mounted":q,"data-promise":!!c.promise,"data-swiped":no,"data-removed":ye,"data-visible":Ec,"data-y-position":Bm,"data-x-position":$a,"data-index":p,"data-front":Tc,"data-swiping":Ve,"data-dismissible":M,"data-type":_,"data-invert":$T,"data-swipe-out":mt,"data-swipe-direction":V,"data-expanded":!!(x||Oe&&q),style:{"--index":p,"--toasts-before":p,"--z-index":g.length-p,"--offset":`${ye?Fa:yn.current}px`,"--initial-height":Oe?"auto":`${Sc}px`,...k,...c.style},onDragEnd:()=>{pt(!1),B(null),or.current=null},onPointerDown:Y=>{Cc||!M||(Ia.current=new Date,ro(yn.current),Y.target.setPointerCapture(Y.pointerId),Y.target.tagName!=="BUTTON"&&(pt(!0),or.current={x:Y.clientX,y:Y.clientY}))},onPointerUp:()=>{var Y,Be,Xe;if(mt||!M)return;or.current=null;const Pt=Number(((Y=kt.current)==null?void 0:Y.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ba=Number(((Be=kt.current)==null?void 0:Be.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ke=new Date().getTime()-((Xe=Ia.current)==null?void 0:Xe.getTime()),Bt=L==="x"?Pt:Ba,za=Math.abs(Bt)/Ke;if(Math.abs(Bt)>=aL||za>.11){ro(yn.current),c.onDismiss==null||c.onDismiss.call(c,c),H(L==="x"?Pt>0?"right":"left":Ba>0?"down":"up"),ar(),sr(!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")}Da(!1),pt(!1),B(null)},onPointerMove:Y=>{var Be,Xe,Pt;if(!or.current||!M||((Be=window.getSelection())==null?void 0:Be.toString().length)>0)return;const Ke=Y.clientY-or.current.y,Bt=Y.clientX-or.current.x;var za;const nn=(za=e.swipeDirections)!=null?za:uL(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 Wm=Zr=>1/(1.5+Math.abs(Zr)/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 Zr=Ke*Wm(Ke);rn.y=Math.abs(Zr)<Math.abs(Ke)?Zr: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 Zr=Bt*Wm(Bt);rn.x=Math.abs(Zr)<Math.abs(Bt)?Zr:Bt}(Math.abs(rn.x)>0||Math.abs(rn.y)>0)&&Da(!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":Cc,"data-close-button":!0,onClick:Cc||!M?()=>{}:()=>{ar(),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)},(Hm=ne==null?void 0:ne.close)!=null?Hm:G5):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||VT():null,c.type!=="loading"?c.icon||(ne==null?void 0:ne[_])||B5(_):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&&yl(c.cancel)?R.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||P,onClick:Y=>{yl(c.cancel)&&M&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,Y),ar())},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&&yl(c.action)?R.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||j,onClick:Y=>{yl(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,Y),!Y.defaultPrevented&&ar())},className:xn(Q==null?void 0:Q.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function Ov(){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 fL(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,o=s?"--mobile-offset":"--offset",a=s?iL:rL;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 dL=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:v=nL,toastOptions:b,dir:p=Ov(),gap:g=oL,icons:x,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(()=>{pk.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"?Ov():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":`${sL}px`,"--gap":`${g}px`,...m,...fL(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(cL,{key:J.id,icons:x,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:v,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(sr=>sr.position==J.position),heights:P.filter(sr=>sr.position==J.position),setHeights:j,expandByDefault:o,gap:g,expanded:N,swipeDirections:t.swipeDirections})})):null}))});function hL(e){return Array.isArray(e)&&e[0].field!==void 0}const bT=(e,t)=>{var n;if(hL(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||Av.error(e.message);return}if(e&&e.error){t!=null&&t.noToast||Av.error(e.error);return}};function pL(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 Dm({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 kf={sm:"px-3 py-1 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-15"};function mL({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 v=rr();return w.jsxs("div",{className:Ne({"mb-2":!o},f),children:[w.jsx(Dm,{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",kf[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",kf[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:v.getColor(K.InputText),backgroundColor:v.getColor(K.InputBackground),borderColor:v.getColor(K.InputBorder),borderRadius:v.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",kf[i],{"border-red-500!":!!l}),children:n})]}),!!l&&w.jsx("p",{className:"mt-1 text-xs text-red-500",children:l})]})}const gL=(e,t)=>{document.cookie=`${e}=${t}`},ST=y.createContext({}),yL=()=>`${window.location.pathname}_$$_${document.title}`,vL=()=>{const e=localStorage.getItem("page");return!e||e===""?"/":e},xL=()=>{const e=localStorage.getItem("p-history");if(!e||e==="")return[];try{return JSON.parse(e)}catch{return[]}};function wL({children:e}){const[t,n]=y.useState("/"),[r,i]=y.useState(xL());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(ST.Provider,{value:{page:t,setPage:o,history:r,clearHistory:s},children:e})}function Fm(){return y.useContext(ST)}function bL({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(Dm,{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 jv={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:""}},SL={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"},TL={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:"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 CL({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":""} ${jv[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 ${SL[d]} ${TL[u]} ${jv[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:EL[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 kL({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 _L({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 Nv=Object.assign(kL,{Group:_L});function Lm({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 v=rr();return w.jsxs("div",{className:Ne({"mb-2":!s},i),children:[t&&w.jsx(Dm,{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:v.getColor(K.InputText),backgroundColor:v.getColor(K.InputBackground),borderColor:v.getColor(K.InputBorder),borderRadius:v.getRadius()}}),!!u&&w.jsx("p",{className:"text-red-500 mt-1 text-xs",children:u})]})}function PL({onOk:e,clientId:t,widgetId:n,appearance:r}){var h,m,v,b,p,g,x,E;const i=rr(),{defaultValues:s}=tn(),o=Fm(),a=gN(),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?$l(C.name):void 0;return S[C.name]=k||(s==null?void 0:s[C.name])||"",S},{}),u=(b=(v=r==null?void 0:r.body)==null?void 0:v.inputs)==null?void 0:b.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?ku().required(C.label):ku(),S),{})),c=wT({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)){mN(C)&&(xf(Mn.CustomerToken,C.customer_token),xf(Mn.CustomerRefreshToken,C.customer_refresh_token),xf(Mn.DeviceId,C.device_id)),o.clearHistory();for(const j of((P=r==null?void 0:r.body)==null?void 0:P.inputs)||[])j.remember&&gL(j.name,S[j.name]);e==null||e();return}bT(C,{form:c})}}),d=!pL(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=(x=r==null?void 0:r.body)==null?void 0:x.inputs)==null?void 0:E.map(S=>{var C,k;if(["text","email","phone"].includes(S.type))return w.jsx(mL,{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(bL,{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(CL,{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(Nv.Group,{id:S.name,label:S.label,required:S.required,children:(k=S.options)==null?void 0:k.map(P=>w.jsx(Nv,{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(Lm,{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(Qn,{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 AL({onClose:e}){return w.jsx(Qn,{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 RL({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 OL(){const e=Fm(),t=y.useCallback(()=>{const n=window.location.pathname;n!==e.page&&e.setPage(n)},[e.page]);return PS("popstate",t),null}function jL(){const e=Vi(),t=Fm(),n=y.useCallback(()=>{const r=window.location.pathname;if(r!==t.page){if(e){e.emit(Fn.PageChange,{page:r});return}t.setPage(r)}},[e,t.page]);return PS("popstate",n),y.useEffect(()=>{if(!e)return;const r=vL(),i=yL();r!==i&&(e.emit(Fn.PageChange,{page:i}),t.setPage(i))},[e]),null}function NL({children:e}){const t=rr(),{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 ML(){return OL(),null}const _f=(e,t)=>{var n;return(n=e.find(r=>r.type===t))==null?void 0:n.content};function DL(){var c,d,h,m,v,b;const e=rr(),{widget:t,setOpen:n}=tn(),[r,i]=y.useState(!0),s=mm(),o=gm();if(!t)return null;const a=()=>{n(!1)};if(y.useEffect(()=>{yN(t.client_id).then(([p,g])=>{bp(g)&&s.push("chat")}).finally(()=>{i(!1)})},[]),r)return null;const l=_f(((d=(c=t.appearance)==null?void 0:c.head)==null?void 0:d.elements)||[],"text"),u=_f(((m=(h=t.appearance)==null?void 0:h.head)==null?void 0:m.elements)||[],"title"),f=_f(((b=(v=t.appearance)==null?void 0:v.head)==null?void 0:b.elements)||[],"logo");return w.jsxs(NL,{children:[w.jsxs("div",{className:"relative flex flex-col gap-3 items-center justify-center h-44",children:[o&&w.jsx(AL,{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(RL,{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(PL,{clientId:t.client_id,widgetId:t.link_id,appearance:t.appearance,onOk:()=>{s.push("chat")}})})]})}function FL(){return w.jsxs(w.Fragment,{children:[w.jsx(RS,{border:!0,children:w.jsx(DL,{})}),w.jsx(ML,{})]})}const LL=[{path:"/",component:FL,name:"registration"}];var Yi=(e=>(e.Open="open",e.Closed="closed",e.Pending="pending",e.Deleted="deleted",e.Created="created",e))(Yi||{}),TT=(e=>(e.AdminJoin="admin_join",e))(TT||{}),et=(e=>(e.Customer="customer",e.User="user",e.System="system",e.Activity="activity",e))(et||{});function IL({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 $L=Object.defineProperty,VL=(e,t,n)=>t in e?$L(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pf=(e,t,n)=>(VL(e,typeof t!="symbol"?t+"":t,n),n);let BL=class{constructor(){Pf(this,"current",this.detect()),Pf(this,"handoffState","pending"),Pf(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"}},zl=new BL;function zL(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function yc(){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 zL(()=>{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=yc();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 ET(){let[e]=y.useState(yc);return y.useEffect(()=>()=>e.dispose(),[e]),e}let Vr=(e,t)=>{zl.isServer?y.useEffect(e,t):y.useLayoutEffect(e,t)};function CT(e){let t=y.useRef(e);return Vr(()=>{t.current=e},[e]),t}let qn=function(e){let t=CT(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 vc(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,vc),r}var kT=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(kT||{}),Pr=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Pr||{});function _T(){let e=HL();return y.useCallback(t=>UL({mergeRefs:e,...t}),[e])}function UL({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:s=!0,name:o,mergeRefs:a}){a=a??WL;let l=PT(t,e);if(s)return vl(l,n,r,o,a);let u=i??0;if(u&2){let{static:f=!1,...c}=l;if(f)return vl(c,n,r,o,a)}if(u&1){let{unmount:f=!0,...c}=l;return vc(f?0:1,{0(){return null},1(){return vl({...c,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return vl(l,n,r,o,a)}function vl(e,t={},n,r,i){let{as:s=n,children:o,refName:a="ref",...l}=Af(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,v]of Object.entries(t))typeof v=="boolean"&&(d=!0),v===!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),v=m?{className:m}:{},b=PT(f.props,ii(Af(l,["ref"])));for(let p in c)p in b&&delete c[p];return y.cloneElement(f,Object.assign({},b,c,u,{ref:i(KL(f),u.ref)},v))}return y.createElement(s,Object.assign({},Af(l,["ref"]),s!==y.Fragment&&u,s!==y.Fragment&&c),f)}function HL(){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 WL(...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 PT(...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 Im(e){var t;return Object.assign(y.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function ii(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Af(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function KL(e){return R.version.split(".")[0]>="19"?e.props.ref:e.ref}let qL=Symbol();function AT(...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[qL]))?void 0:n}function GL(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 QL={},Mv,Dv;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Mv=process==null?void 0:QL)==null?void 0:Mv.NODE_ENV)==="test"&&typeof((Dv=Element==null?void 0:Element.prototype)==null?void 0:Dv.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 YL=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(YL||{});function XL(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function ZL(e,t,n,r){let[i,s]=y.useState(n),{hasFlag:o,addFlag:a,removeFlag:l}=GL(e&&i?3:0),u=y.useRef(!1),f=y.useRef(!1),c=ET();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),JL(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 JL(e,{prepare:t,run:n,done:r,inFlight:i}){let s=gc();return tI(e,{prepare:t,inFlight:i}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(eI(e,r))})}),s.dispose}function eI(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 tI(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 $m=y.createContext(null);$m.displayName="OpenClosedContext";var fi=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(fi||{});function RT(){return y.useContext($m)}function nI({value:e,children:t}){return R.createElement($m.Provider,{value:e},t)}function rI(){let e=typeof document>"u";return"useSyncExternalStore"in Rf?(t=>t.useSyncExternalStore)(Rf)(()=>()=>{},()=>!1,()=>!e):!1}function OT(){let e=rI(),[t,n]=y.useState(Bl.isHandoffComplete);return t&&Bl.isHandoffComplete===!1&&n(!1),y.useEffect(()=>{t!==!0&&n(!0)},[t]),y.useEffect(()=>Bl.handoff(),[]),e?!1:t}function iI(){let e=y.useRef(!1);return $r(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function jT(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:MT)!==y.Fragment||R.Children.count(e.children)===1}let vc=y.createContext(null);vc.displayName="TransitionContext";var sI=(e=>(e.Visible="visible",e.Hidden="hidden",e))(sI||{});function oI(){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 aI(){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 NT(e,t){let n=CT(e),r=y.useRef([]),i=iI(),s=ET(),o=Kn((h,m=_r.Hidden)=>{let v=r.current.findIndex(({el:b})=>b===h);v!==-1&&(yc(m,{[_r.Unmount](){r.current.splice(v,1)},[_r.Hidden](){r.current[v].state="hidden"}}),s.microTask(()=>{var b;!wc(r)&&i.current&&((b=n.current)==null||b.call(n))}))}),a=Kn(h=>{let m=r.current.find(({el:v})=>v===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,v)=>{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(()=>v(m)):v(m)}),d=Kn((h,m,v)=>{Promise.all(f.current[m].splice(0).map(([b,p])=>p)).then(()=>{var b;(b=l.current.shift())==null||b()}).then(()=>v(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 MT=y.Fragment,DT=kT.RenderStrategy;function lI(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:v,...b}=e,[p,g]=y.useState(null),x=y.useRef(null),E=jT(e),S=AT(...E?[x,t,g]:t===null?[]:[t]),C=(n=b.unmount)==null||n?_r.Unmount:_r.Hidden,{show:k,appear:P,initial:j}=oI(),[N,I]=y.useState(k?"visible":"hidden"),re=aI(),{register:ie,unregister:xe}=re;$r(()=>ie(x),[ie,x]),$r(()=>{if(C===_r.Hidden&&x.current){if(k&&N!=="visible"){I("visible");return}return yc(N,{hidden:()=>xe(x),visible:()=>ie(x)})}},[N,x,ie,xe,k,C]);let Oe=OT();$r(()=>{if(E&&Oe&&N==="visible"&&x.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[x,N,Oe,E]);let Q=j&&!P,ne=P&&k&&j,O=y.useRef(!1),L=NT(()=>{O.current||(I("hidden"),xe(x))},re),B=Kn(Ve=>{O.current=!0;let pt=Ve?"enter":"leave";L.onStart(x,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(x,pt,mt=>{mt==="enter"?o==null||o():mt==="leave"&&(l==null||l())}),pt==="leave"&&!wc(L)&&(I("hidden"),xe(x))});y.useEffect(()=>{E&&i||(B(k),V(k))},[k,E,i]);let H=!(!i||!E||!Oe||Q),[,q]=ZL(H,p,k,{start:B,end:V}),ce=ii({ref:S,className:((r=Ch(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&&v,!q.transition&&k&&d))==null?void 0:r.trim())||void 0,...XL(q)}),ye=0;N==="visible"&&(ye|=fi.Open),N==="hidden"&&(ye|=fi.Closed),k&&N==="hidden"&&(ye|=fi.Opening),!k&&N==="visible"&&(ye|=fi.Closing);let J=_T();return R.createElement(xc.Provider,{value:L},R.createElement(nI,{value:ye},J({ourProps:ce,theirProps:b,defaultTag:MT,features:DT,visible:N==="visible",name:"Transition.Child"})))}function uI(e,t){let{show:n,appear:r=!1,unmount:i=!0,...s}=e,o=y.useRef(null),a=jT(e),l=AT(...a?[o,t]:t===null?[]:[t]);OT();let u=RT();if(n===void 0&&u!==null&&(n=(u&fi.Open)===fi.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=NT(()=>{n||c("hidden")}),[h,m]=y.useState(!0),v=y.useRef([n]);$r(()=>{h!==!1&&v.current[v.current.length-1]!==n&&(v.current.push(n),m(!1))},[v,n]);let b=y.useMemo(()=>({show:n,appear:r,initial:h}),[n,r,h]);$r(()=>{n?c("visible"):!wc(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)}),x=Kn(()=>{var S;h&&m(!1),(S=e.beforeLeave)==null||S.call(e)}),E=_T();return R.createElement(xc.Provider,{value:d},R.createElement(vc.Provider,{value:b},E({ourProps:{...p,as:y.Fragment,children:R.createElement(FT,{ref:l,...p,...s,beforeEnter:g,beforeLeave:x})},theirProps:{},defaultTag:y.Fragment,features:DT,visible:f==="visible",name:"Transition"})))}function cI(e,t){let n=y.useContext(vc)!==null,r=RT()!==null;return R.createElement(R.Fragment,null,!n&&r?R.createElement(kh,{ref:t,...e}):R.createElement(FT,{ref:t,...e}))}let kh=Im(uI),FT=Im(lI),fI=Im(cI),dI=Object.assign(kh,{Child:fI,Root:kh});const Vm=y.createContext(void 0),Io=({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(Vm.Provider,{value:{open:r,setOpen:i,toggleOpen:s},children:w.jsx(e,{ref:o,className:`dropdown ${n}`,children:t})})},hI=({type:e,children:t,className:n,id:r,title:i})=>{const{open:s,toggleOpen:o,setOpen:a}=y.useContext(Vm),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(c2,{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})})},pI=({as:e="div",className:t,children:n,placement:r})=>{const{open:i,setOpen:s}=y.useContext(Vm),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(dI,{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})})};Io.Trigger=hI;Io.Content=pI;const mI={red:"hover:bg-red-100 text-red-600 font-medium",default:"hover:bg-slate-100 text-slate-700 font-medium"};function gI({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(Io,{className:"relative flex items-center h-full",children:[w.jsx(Io.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(Io.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",mI.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 yI({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 vI={hidden:{opacity:0,y:8},visible:e=>({opacity:1,y:0,transition:{delay:e*.03,duration:.15,ease:"easeOut"}})},Fv=e=>e?(typeof e=="string"&&(e=new Date(e)),e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})):"";function xI({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:v}=r.current,b=m-h<=v+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:vI,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(yI,{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:Fv(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&&Fv(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 wI({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(Lm,{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"})})})]})}function bI({chat:e,isTyping:t,shortcutMessages:n,messages:r,onNewMessage:i,onChatClose:s}){var f,c;const{widget:o,setOpen:a}=tn(),l=nr(),u=gm();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(IL,{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(gI,{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(xI,{messages:r,isTyping:t||n.length>0}),w.jsx(wI,{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:"https://alfatekyazilim.com.tr/images/favicon.png",alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function SI({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 TI({onOk:e}){const[t,n]=y.useState(0),[r,i]=y.useState(!1),[s,o]=y.useState(10),a=xN();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=Sm({comment:Cu()}),u=wT({init:{comment:""},schema:l,action:async c=>{const[d,h]=await a.mutateAsync({rating:t,comment:c.comment});if(bp(h)){i(!0);return}bT(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(SI,{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(Lm,{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:"https://alfatekyazilim.com.tr/images/favicon.png",alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function EI({children:e}){const{widget:t}=tn();return t?w.jsx("section",{className:"h-full w-full relative",children:e}):null}function CI({children:e}){const t=Vi();return y.useEffect(()=>{t&&t.connect()},[]),!t||!t.connected?null:e}function kI(){const{widget:e,setOpen:t,setIsHaveChat:n}=tn(),r=Vi(),i=mm(),[s,o]=y.useState(null),[a,l]=y.useState([]),[u,f]=y.useState(!1),[c,d]=y.useState([]),h=()=>{if(s){o({...s,status:Yi.Closed});return}m()},m=b=>{b||(t(!1),Ky()),n(!1),o(null),l([]),d([]),hh(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),hh(e.client_id),l([]),d([]),Ky(),i.push("registration");return}o(b),n(!0)})},[]);const v=y.useCallback(b=>{s&&![Yi.Closed,Yi.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]):v(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)??Yi.Open}),v({content:` _ _${E.name}`,created_at:new Date,files:[],id:Math.random().toString(),sender_type:et.Activity,activity_type:TT.AdminJoin,sender_name:E.name})},g=()=>{f(!0)},x=()=>{h()};return r.on(ut.MessageAgentCreate,b),r.on(ut.ChatUserAssignee,p),r.on(ut.MessageAgentTyping,g),r.on(ut.ChatUserClose,x),()=>{r.off(ut.MessageAgentCreate,b),r.off(ut.ChatUserAssignee,p),r.off(ut.MessageAgentTyping,g),r.off(ut.ChatUserClose,x)}},[v]),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(()=>{v(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===Yi.Closed?w.jsx(TI,{onOk:m}):w.jsx(bI,{chat:s,isTyping:u,messages:a,shortcutMessages:c,onNewMessage:v,onChatClose:h})})})]}):null}function _I(){return jL(),null}function PI(){return w.jsxs(CI,{children:[w.jsx(RS,{defaultOpen:!0,children:w.jsx(EI,{children:w.jsx(kI,{})})}),w.jsx(_I,{})]})}const AI=[{path:"/chat",component:PI,name:"chat"}],LT=[...AI],IT=[...LL],RI=[...LT,...IT];function OI(){return w.jsx(e2,{future:{v7_startTransition:!0},children:w.jsxs(n2,{children:[LT.map((e,t)=>w.jsx(Id,{path:e.path,element:w.jsx(e.component,{})},t)),IT.map((e,t)=>w.jsx(Id,{path:e.path,element:w.jsx(e.component,{})},t))]})})}function jI({link_id:e,defaultValues:t,soundPath:n}){const{setWidget:r,widget:i,setDefaultValues:s,setSoundPath:o}=tn(),{data:a,isLoading:l}=l_(e);return y.useEffect(()=>{Array.isArray(a)&&c_(a[0])&&(r(a[0]),s(t),o(n))},[a]),l||!i?null:w.jsx(wL,{children:w.jsx(pN,{children:w.jsx(OI,{})})})}const NI=new Hk;function MI({container:e,link_id:t,defaultValues:n,soundPath:r}){ow(e).render(w.jsxs(Qk,{client:NI,children:[w.jsx(jI,{link_id:t,defaultValues:n,soundPath:r}),w.jsx(dL,{richColors:!0,style:{zIndex:999999},position:"bottom-right"})]}))}window.widget=MI});export default DI();
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),v=m?{className:m}:{},b=PT(f.props,si(Af(l,["ref"])));for(let p in c)p in b&&delete c[p];return y.cloneElement(f,Object.assign({},b,c,u,{ref:i(KL(f),u.ref)},v))}return y.createElement(s,Object.assign({},Af(l,["ref"]),s!==y.Fragment&&u,s!==y.Fragment&&c),f)}function HL(){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 WL(...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 PT(...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 Im(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 Af(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function KL(e){return R.version.split(".")[0]>="19"?e.props.ref:e.ref}let qL=Symbol();function AT(...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[qL]))?void 0:n}function GL(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 QL={},Mv,Dv;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Mv=process==null?void 0:QL)==null?void 0:Mv.NODE_ENV)==="test"&&typeof((Dv=Element==null?void 0:Element.prototype)==null?void 0:Dv.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 YL=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(YL||{});function XL(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function ZL(e,t,n,r){let[i,s]=y.useState(n),{hasFlag:o,addFlag:a,removeFlag:l}=GL(e&&i?3:0),u=y.useRef(!1),f=y.useRef(!1),c=ET();return Vr(()=>{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),JL(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 JL(e,{prepare:t,run:n,done:r,inFlight:i}){let s=yc();return tI(e,{prepare:t,inFlight:i}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(eI(e,r))})}),s.dispose}function eI(e,t){var n,r;let i=yc();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 tI(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 $m=y.createContext(null);$m.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 RT(){return y.useContext($m)}function nI({value:e,children:t}){return R.createElement($m.Provider,{value:e},t)}function rI(){let e=typeof document>"u";return"useSyncExternalStore"in Rf?(t=>t.useSyncExternalStore)(Rf)(()=>()=>{},()=>!1,()=>!e):!1}function OT(){let e=rI(),[t,n]=y.useState(zl.isHandoffComplete);return t&&zl.isHandoffComplete===!1&&n(!1),y.useEffect(()=>{t!==!0&&n(!0)},[t]),y.useEffect(()=>zl.handoff(),[]),e?!1:t}function iI(){let e=y.useRef(!1);return Vr(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function jT(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:MT)!==y.Fragment||R.Children.count(e.children)===1}let xc=y.createContext(null);xc.displayName="TransitionContext";var sI=(e=>(e.Visible="visible",e.Hidden="hidden",e))(sI||{});function oI(){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}function aI(){let e=y.useContext(wc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let wc=y.createContext(null);wc.displayName="NestingContext";function bc(e){return"children"in e?bc(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function NT(e,t){let n=CT(e),r=y.useRef([]),i=iI(),s=ET(),o=qn((h,m=Pr.Hidden)=>{let v=r.current.findIndex(({el:b})=>b===h);v!==-1&&(vc(m,{[Pr.Unmount](){r.current.splice(v,1)},[Pr.Hidden](){r.current[v].state="hidden"}}),s.microTask(()=>{var b;!bc(r)&&i.current&&((b=n.current)==null||b.call(n))}))}),a=qn(h=>{let m=r.current.find(({el:v})=>v===h);return m?m.state!=="visible"&&(m.state="visible"):r.current.push({el:h,state:"visible"}),()=>o(h,Pr.Unmount)}),l=y.useRef([]),u=y.useRef(Promise.resolve()),f=y.useRef({enter:[],leave:[]}),c=qn((h,m,v)=>{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(()=>v(m)):v(m)}),d=qn((h,m,v)=>{Promise.all(f.current[m].splice(0).map(([b,p])=>p)).then(()=>{var b;(b=l.current.shift())==null||b()}).then(()=>v(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 MT=y.Fragment,DT=kT.RenderStrategy;function lI(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:v,...b}=e,[p,g]=y.useState(null),x=y.useRef(null),E=jT(e),S=AT(...E?[x,t,g]:t===null?[]:[t]),C=(n=b.unmount)==null||n?Pr.Unmount:Pr.Hidden,{show:k,appear:P,initial:j}=oI(),[N,I]=y.useState(k?"visible":"hidden"),re=aI(),{register:ie,unregister:xe}=re;Vr(()=>ie(x),[ie,x]),Vr(()=>{if(C===Pr.Hidden&&x.current){if(k&&N!=="visible"){I("visible");return}return vc(N,{hidden:()=>xe(x),visible:()=>ie(x)})}},[N,x,ie,xe,k,C]);let Oe=OT();Vr(()=>{if(E&&Oe&&N==="visible"&&x.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[x,N,Oe,E]);let Q=j&&!P,ne=P&&k&&j,O=y.useRef(!1),L=NT(()=>{O.current||(I("hidden"),xe(x))},re),B=qn(Ve=>{O.current=!0;let pt=Ve?"enter":"leave";L.onStart(x,pt,mt=>{mt==="enter"?s==null||s():mt==="leave"&&(a==null||a())})}),V=qn(Ve=>{let pt=Ve?"enter":"leave";O.current=!1,L.onStop(x,pt,mt=>{mt==="enter"?o==null||o():mt==="leave"&&(l==null||l())}),pt==="leave"&&!bc(L)&&(I("hidden"),xe(x))});y.useEffect(()=>{E&&i||(B(k),V(k))},[k,E,i]);let H=!(!i||!E||!Oe||Q),[,q]=ZL(H,p,k,{start:B,end:V}),ce=si({ref:S,className:((r=Ch(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&&v,!q.transition&&k&&d))==null?void 0:r.trim())||void 0,...XL(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=_T();return R.createElement(wc.Provider,{value:L},R.createElement(nI,{value:ye},J({ourProps:ce,theirProps:b,defaultTag:MT,features:DT,visible:N==="visible",name:"Transition.Child"})))}function uI(e,t){let{show:n,appear:r=!1,unmount:i=!0,...s}=e,o=y.useRef(null),a=jT(e),l=AT(...a?[o,t]:t===null?[]:[t]);OT();let u=RT();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=NT(()=>{n||c("hidden")}),[h,m]=y.useState(!0),v=y.useRef([n]);Vr(()=>{h!==!1&&v.current[v.current.length-1]!==n&&(v.current.push(n),m(!1))},[v,n]);let b=y.useMemo(()=>({show:n,appear:r,initial:h}),[n,r,h]);Vr(()=>{n?c("visible"):!bc(d)&&o.current!==null&&c("hidden")},[n,d]);let p={unmount:i},g=qn(()=>{var S;h&&m(!1),(S=e.beforeEnter)==null||S.call(e)}),x=qn(()=>{var S;h&&m(!1),(S=e.beforeLeave)==null||S.call(e)}),E=_T();return R.createElement(wc.Provider,{value:d},R.createElement(xc.Provider,{value:b},E({ourProps:{...p,as:y.Fragment,children:R.createElement(FT,{ref:l,...p,...s,beforeEnter:g,beforeLeave:x})},theirProps:{},defaultTag:y.Fragment,features:DT,visible:f==="visible",name:"Transition"})))}function cI(e,t){let n=y.useContext(xc)!==null,r=RT()!==null;return R.createElement(R.Fragment,null,!n&&r?R.createElement(kh,{ref:t,...e}):R.createElement(FT,{ref:t,...e}))}let kh=Im(uI),FT=Im(lI),fI=Im(cI),dI=Object.assign(kh,{Child:fI,Root:kh});const Vm=y.createContext(void 0),$o=({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(Vm.Provider,{value:{open:r,setOpen:i,toggleOpen:s},children:w.jsx(e,{ref:o,className:`dropdown ${n}`,children:t})})},hI=({type:e,children:t,className:n,id:r,title:i})=>{const{open:s,toggleOpen:o,setOpen:a}=y.useContext(Vm),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(c2,{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})})},pI=({as:e="div",className:t,children:n,placement:r})=>{const{open:i,setOpen:s}=y.useContext(Vm),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(dI,{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})})};$o.Trigger=hI;$o.Content=pI;const mI={red:"hover:bg-red-100 text-red-600 font-medium",default:"hover:bg-slate-100 text-slate-700 font-medium"};function gI({onChatClose:e}){const[t,n]=y.useState(!1),r=Vi(),i=()=>{r==null||r.emit(Fn.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($o,{className:"relative flex items-center h-full",children:[w.jsx($o.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($o.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",mI.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 yI({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 vI={hidden:{opacity:0,y:8},visible:e=>({opacity:1,y:0,transition:{delay:e*.03,duration:.15,ease:"easeOut"}})},Fv=e=>e?(typeof e=="string"&&(e=new Date(e)),e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})):"";function xI({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:v}=r.current,b=m-h<=v+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:vI,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(yI,{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:Fv(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&&Fv(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(Qn,{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 wI({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(Fn.MessageCreate,{content:r},u=>{i(""),e(u),t.current&&(t.current.style.height="3rem",o("3rem"))}))},l=u=>{n==null||n.emit(Fn.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(Lm,{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(Qn,{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"})})})]})}function bI({chat:e,isTyping:t,shortcutMessages:n,messages:r,onNewMessage:i,onChatClose:s}){var f,c;const{widget:o,setOpen:a}=tn(),l=rr(),u=gm();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(IL,{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(gI,{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(xI,{messages:r,isTyping:t||n.length>0}),w.jsx(wI,{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:"https://alfatekyazilim.com.tr/images/favicon.png",alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function SI({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 TI({onOk:e}){const[t,n]=y.useState(0),[r,i]=y.useState(!1),[s,o]=y.useState(10),a=xN();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=Sm({comment:ku()}),u=wT({init:{comment:""},schema:l,action:async c=>{const[d,h]=await a.mutateAsync({rating:t,comment:c.comment});if(bp(h)){i(!0);return}bT(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(Qn,{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(SI,{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(Lm,{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(Qn,{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(Qn,{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:"https://alfatekyazilim.com.tr/images/favicon.png",alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function EI({children:e}){const{widget:t}=tn();return t?w.jsx("section",{className:"h-full w-full relative",children:e}):null}function CI({children:e}){const t=Vi();return y.useEffect(()=>{t&&t.connect()},[]),!t||!t.connected?null:e}function kI(){const{widget:e,setOpen:t,setIsHaveChat:n}=tn(),r=Vi(),i=mm(),[s,o]=y.useState(null),[a,l]=y.useState([]),[u,f]=y.useState(!1),[c,d]=y.useState([]),h=()=>{if(s){o({...s,status:Yi.Closed});return}m()},m=b=>{b||(t(!1),Ky()),n(!1),o(null),l([]),d([]),hh(e.client_id).then(()=>{r==null||r.disconnect(),i.push("registration")})};y.useEffect(()=>{r==null||r.emit(Fn.ChatView,{},b=>{if(b===null){t(!1),n(!1),hh(e.client_id),l([]),d([]),Ky(),i.push("registration");return}o(b),n(!0)})},[]);const v=y.useCallback(b=>{s&&![Yi.Closed,Yi.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]):v(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)??Yi.Open}),v({content:` _ _${E.name}`,created_at:new Date,files:[],id:Math.random().toString(),sender_type:et.Activity,activity_type:TT.AdminJoin,sender_name:E.name})},g=()=>{f(!0)},x=()=>{h()};return r.on(ut.MessageAgentCreate,b),r.on(ut.ChatUserAssignee,p),r.on(ut.MessageAgentTyping,g),r.on(ut.ChatUserClose,x),()=>{r.off(ut.MessageAgentCreate,b),r.off(ut.ChatUserAssignee,p),r.off(ut.MessageAgentTyping,g),r.off(ut.ChatUserClose,x)}},[v]),y.useEffect(()=>{!r||!s||r.emit(Fn.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(()=>{v(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===Yi.Closed?w.jsx(TI,{onOk:m}):w.jsx(bI,{chat:s,isTyping:u,messages:a,shortcutMessages:c,onNewMessage:v,onChatClose:h})})})]}):null}function _I(){return jL(),null}function PI(){return w.jsxs(CI,{children:[w.jsx(RS,{defaultOpen:!0,children:w.jsx(EI,{children:w.jsx(kI,{})})}),w.jsx(_I,{})]})}const AI=[{path:"/chat",component:PI,name:"chat"}],LT=[...AI],IT=[...LL],RI=[...LT,...IT];function OI(){return w.jsx(e2,{future:{v7_startTransition:!0},children:w.jsxs(n2,{children:[LT.map((e,t)=>w.jsx(Id,{path:e.path,element:w.jsx(e.component,{})},t)),IT.map((e,t)=>w.jsx(Id,{path:e.path,element:w.jsx(e.component,{})},t))]})})}function jI({link_id:e,defaultValues:t,soundPath:n}){const{setWidget:r,widget:i,setDefaultValues:s,setSoundPath:o}=tn(),{data:a,isLoading:l}=l_(e);return y.useEffect(()=>{Array.isArray(a)&&c_(a[0])&&(r(a[0]),s(t),o(n))},[a]),l||!i?null:w.jsx(wL,{children:w.jsx(pN,{children:w.jsx(OI,{})})})}const NI=new Hk;function MI({container:e,link_id:t,defaultValues:n,soundPath:r}){ow(e).render(w.jsxs(Qk,{client:NI,children:[w.jsx(jI,{link_id:t,defaultValues:n,soundPath:r}),w.jsx(dL,{richColors:!0,style:{zIndex:999999},position:"bottom-right"})]}))}window.widget=MI});export default DI();