@alfatech/livechat 2025.11.0-5.1 → 2025.11.1-0.1

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 +29 -29
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -1,4 +1,4 @@
1
- var Tg=e=>{throw TypeError(e)};var QC=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Jc=(e,t,n)=>t.has(e)||Tg("Cannot "+n);var S=(e,t,n)=>(Jc(e,t,"read from private field"),n?n.call(e):t.get(e)),X=(e,t,n)=>t.has(e)?Tg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),U=(e,t,n,r)=>(Jc(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),se=(e,t,n)=>(Jc(e,t,"access private method"),n);var fl=(e,t,n,r)=>({set _(i){U(e,t,i,n)},get _(){return S(e,t,r)}});var lB=QC((zt,Vt)=>{function YC(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 Zi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Bx={exports:{}},rc={},zx={exports:{}},oe={};/**
1
+ var Tg=e=>{throw TypeError(e)};var QC=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Jc=(e,t,n)=>t.has(e)||Tg("Cannot "+n);var S=(e,t,n)=>(Jc(e,t,"read from private field"),n?n.call(e):t.get(e)),K=(e,t,n)=>t.has(e)?Tg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),W=(e,t,n,r)=>(Jc(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),se=(e,t,n)=>(Jc(e,t,"access private method"),n);var fl=(e,t,n,r)=>({set _(i){W(e,t,i,n)},get _(){return S(e,t,r)}});var lB=QC((Ut,Ht)=>{function YC(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 Zi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Bx={exports:{}},rc={},zx={exports:{}},ae={};/**
2
2
  * @license React
3
3
  * react.production.min.js
4
4
  *
@@ -6,7 +6,7 @@ var Tg=e=>{throw TypeError(e)};var QC=(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 Ga=Symbol.for("react.element"),KC=Symbol.for("react.portal"),XC=Symbol.for("react.fragment"),ZC=Symbol.for("react.strict_mode"),JC=Symbol.for("react.profiler"),eT=Symbol.for("react.provider"),tT=Symbol.for("react.context"),nT=Symbol.for("react.forward_ref"),rT=Symbol.for("react.suspense"),iT=Symbol.for("react.memo"),sT=Symbol.for("react.lazy"),Eg=Symbol.iterator;function oT(e){return e===null||typeof e!="object"?null:(e=Eg&&e[Eg]||e["@@iterator"],typeof e=="function"?e:null)}var Vx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ux=Object.assign,Hx={};function yo(e,t,n){this.props=e,this.context=t,this.refs=Hx,this.updater=n||Vx}yo.prototype.isReactComponent={};yo.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")};yo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Wx(){}Wx.prototype=yo.prototype;function uh(e,t,n){this.props=e,this.context=t,this.refs=Hx,this.updater=n||Vx}var ch=uh.prototype=new Wx;ch.constructor=uh;Ux(ch,yo.prototype);ch.isPureReactComponent=!0;var _g=Array.isArray,qx=Object.prototype.hasOwnProperty,dh={current:null},Gx={key:!0,ref:!0,__self:!0,__source:!0};function Qx(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)qx.call(t,r)&&!Gx.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:Ga,type:e,key:s,ref:o,props:i,_owner:dh.current}}function aT(e,t){return{$$typeof:Ga,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function fh(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ga}function lT(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Pg=/\/+/g;function ed(e,t){return typeof e=="object"&&e!==null&&e.key!=null?lT(""+e.key):t.toString(36)}function Ul(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 Ga:case KC:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+ed(o,0):r,_g(i)?(n="",e!=null&&(n=e.replace(Pg,"$&/")+"/"),Ul(i,t,n,"",function(c){return c})):i!=null&&(fh(i)&&(i=aT(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Pg,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",_g(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+ed(s,a);o+=Ul(s,t,n,l,i)}else if(l=oT(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+ed(s,a++),o+=Ul(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 pl(e,t,n){if(e==null)return e;var r=[],i=0;return Ul(e,r,"","",function(s){return t.call(n,s,i++)}),r}function uT(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 bt={current:null},Hl={transition:null},cT={ReactCurrentDispatcher:bt,ReactCurrentBatchConfig:Hl,ReactCurrentOwner:dh};function Yx(){throw Error("act(...) is not supported in production builds of React.")}oe.Children={map:pl,forEach:function(e,t,n){pl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return pl(e,function(){t++}),t},toArray:function(e){return pl(e,function(t){return t})||[]},only:function(e){if(!fh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};oe.Component=yo;oe.Fragment=XC;oe.Profiler=JC;oe.PureComponent=uh;oe.StrictMode=ZC;oe.Suspense=rT;oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=cT;oe.act=Yx;oe.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=Ux({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=dh.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)qx.call(t,l)&&!Gx.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:Ga,type:e.type,key:i,ref:s,props:r,_owner:o}};oe.createContext=function(e){return e={$$typeof:tT,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:eT,_context:e},e.Consumer=e};oe.createElement=Qx;oe.createFactory=function(e){var t=Qx.bind(null,e);return t.type=e,t};oe.createRef=function(){return{current:null}};oe.forwardRef=function(e){return{$$typeof:nT,render:e}};oe.isValidElement=fh;oe.lazy=function(e){return{$$typeof:sT,_payload:{_status:-1,_result:e},_init:uT}};oe.memo=function(e,t){return{$$typeof:iT,type:e,compare:t===void 0?null:t}};oe.startTransition=function(e){var t=Hl.transition;Hl.transition={};try{e()}finally{Hl.transition=t}};oe.unstable_act=Yx;oe.useCallback=function(e,t){return bt.current.useCallback(e,t)};oe.useContext=function(e){return bt.current.useContext(e)};oe.useDebugValue=function(){};oe.useDeferredValue=function(e){return bt.current.useDeferredValue(e)};oe.useEffect=function(e,t){return bt.current.useEffect(e,t)};oe.useId=function(){return bt.current.useId()};oe.useImperativeHandle=function(e,t,n){return bt.current.useImperativeHandle(e,t,n)};oe.useInsertionEffect=function(e,t){return bt.current.useInsertionEffect(e,t)};oe.useLayoutEffect=function(e,t){return bt.current.useLayoutEffect(e,t)};oe.useMemo=function(e,t){return bt.current.useMemo(e,t)};oe.useReducer=function(e,t,n){return bt.current.useReducer(e,t,n)};oe.useRef=function(e){return bt.current.useRef(e)};oe.useState=function(e){return bt.current.useState(e)};oe.useSyncExternalStore=function(e,t,n){return bt.current.useSyncExternalStore(e,t,n)};oe.useTransition=function(){return bt.current.useTransition()};oe.version="18.3.1";zx.exports=oe;var v=zx.exports;const L=Zi(v),of=YC({__proto__:null,default:L},[v]);/**
9
+ */var Ga=Symbol.for("react.element"),KC=Symbol.for("react.portal"),XC=Symbol.for("react.fragment"),ZC=Symbol.for("react.strict_mode"),JC=Symbol.for("react.profiler"),eT=Symbol.for("react.provider"),tT=Symbol.for("react.context"),nT=Symbol.for("react.forward_ref"),rT=Symbol.for("react.suspense"),iT=Symbol.for("react.memo"),sT=Symbol.for("react.lazy"),Eg=Symbol.iterator;function oT(e){return e===null||typeof e!="object"?null:(e=Eg&&e[Eg]||e["@@iterator"],typeof e=="function"?e:null)}var Vx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ux=Object.assign,Hx={};function yo(e,t,n){this.props=e,this.context=t,this.refs=Hx,this.updater=n||Vx}yo.prototype.isReactComponent={};yo.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")};yo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Wx(){}Wx.prototype=yo.prototype;function uh(e,t,n){this.props=e,this.context=t,this.refs=Hx,this.updater=n||Vx}var ch=uh.prototype=new Wx;ch.constructor=uh;Ux(ch,yo.prototype);ch.isPureReactComponent=!0;var _g=Array.isArray,qx=Object.prototype.hasOwnProperty,dh={current:null},Gx={key:!0,ref:!0,__self:!0,__source:!0};function Qx(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)qx.call(t,r)&&!Gx.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:Ga,type:e,key:s,ref:o,props:i,_owner:dh.current}}function aT(e,t){return{$$typeof:Ga,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function fh(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ga}function lT(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var jg=/\/+/g;function ed(e,t){return typeof e=="object"&&e!==null&&e.key!=null?lT(""+e.key):t.toString(36)}function Ul(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 Ga:case KC:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+ed(o,0):r,_g(i)?(n="",e!=null&&(n=e.replace(jg,"$&/")+"/"),Ul(i,t,n,"",function(u){return u})):i!=null&&(fh(i)&&(i=aT(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(jg,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",_g(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+ed(s,a);o+=Ul(s,t,n,l,i)}else if(l=oT(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+ed(s,a++),o+=Ul(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 pl(e,t,n){if(e==null)return e;var r=[],i=0;return Ul(e,r,"","",function(s){return t.call(n,s,i++)}),r}function uT(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 bt={current:null},Hl={transition:null},cT={ReactCurrentDispatcher:bt,ReactCurrentBatchConfig:Hl,ReactCurrentOwner:dh};function Yx(){throw Error("act(...) is not supported in production builds of React.")}ae.Children={map:pl,forEach:function(e,t,n){pl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return pl(e,function(){t++}),t},toArray:function(e){return pl(e,function(t){return t})||[]},only:function(e){if(!fh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ae.Component=yo;ae.Fragment=XC;ae.Profiler=JC;ae.PureComponent=uh;ae.StrictMode=ZC;ae.Suspense=rT;ae.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=cT;ae.act=Yx;ae.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=Ux({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=dh.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)qx.call(t,l)&&!Gx.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:Ga,type:e.type,key:i,ref:s,props:r,_owner:o}};ae.createContext=function(e){return e={$$typeof:tT,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:eT,_context:e},e.Consumer=e};ae.createElement=Qx;ae.createFactory=function(e){var t=Qx.bind(null,e);return t.type=e,t};ae.createRef=function(){return{current:null}};ae.forwardRef=function(e){return{$$typeof:nT,render:e}};ae.isValidElement=fh;ae.lazy=function(e){return{$$typeof:sT,_payload:{_status:-1,_result:e},_init:uT}};ae.memo=function(e,t){return{$$typeof:iT,type:e,compare:t===void 0?null:t}};ae.startTransition=function(e){var t=Hl.transition;Hl.transition={};try{e()}finally{Hl.transition=t}};ae.unstable_act=Yx;ae.useCallback=function(e,t){return bt.current.useCallback(e,t)};ae.useContext=function(e){return bt.current.useContext(e)};ae.useDebugValue=function(){};ae.useDeferredValue=function(e){return bt.current.useDeferredValue(e)};ae.useEffect=function(e,t){return bt.current.useEffect(e,t)};ae.useId=function(){return bt.current.useId()};ae.useImperativeHandle=function(e,t,n){return bt.current.useImperativeHandle(e,t,n)};ae.useInsertionEffect=function(e,t){return bt.current.useInsertionEffect(e,t)};ae.useLayoutEffect=function(e,t){return bt.current.useLayoutEffect(e,t)};ae.useMemo=function(e,t){return bt.current.useMemo(e,t)};ae.useReducer=function(e,t,n){return bt.current.useReducer(e,t,n)};ae.useRef=function(e){return bt.current.useRef(e)};ae.useState=function(e){return bt.current.useState(e)};ae.useSyncExternalStore=function(e,t,n){return bt.current.useSyncExternalStore(e,t,n)};ae.useTransition=function(){return bt.current.useTransition()};ae.version="18.3.1";zx.exports=ae;var v=zx.exports;const L=Zi(v),of=YC({__proto__:null,default:L},[v]);/**
10
10
  * @license React
11
11
  * react-jsx-runtime.production.min.js
12
12
  *
@@ -14,7 +14,7 @@ var Tg=e=>{throw TypeError(e)};var QC=(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 dT=v,fT=Symbol.for("react.element"),pT=Symbol.for("react.fragment"),hT=Object.prototype.hasOwnProperty,mT=dT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,gT={key:!0,ref:!0,__self:!0,__source:!0};function Kx(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)hT.call(t,r)&&!gT.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:fT,type:e,key:s,ref:o,props:i,_owner:mT.current}}rc.Fragment=pT;rc.jsx=Kx;rc.jsxs=Kx;Bx.exports=rc;var y=Bx.exports,Xx={exports:{}},Wt={},Zx={exports:{}},Jx={};/**
17
+ */var dT=v,fT=Symbol.for("react.element"),pT=Symbol.for("react.fragment"),hT=Object.prototype.hasOwnProperty,mT=dT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,gT={key:!0,ref:!0,__self:!0,__source:!0};function Kx(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)hT.call(t,r)&&!gT.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:fT,type:e,key:s,ref:o,props:i,_owner:mT.current}}rc.Fragment=pT;rc.jsx=Kx;rc.jsxs=Kx;Bx.exports=rc;var y=Bx.exports,Xx={exports:{}},Gt={},Zx={exports:{}},Jx={};/**
18
18
  * @license React
19
19
  * scheduler.production.min.js
20
20
  *
@@ -22,7 +22,7 @@ var Tg=e=>{throw TypeError(e)};var QC=(e,t)=>()=>(t||e((t={exports:{}}).exports,
22
22
  *
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
- */(function(e){function t(O,$){var H=O.length;O.push($);e:for(;0<H;){var q=H-1>>>1,Q=O[q];if(0<i(Q,$))O[q]=$,O[H]=Q,H=q;else break e}}function n(O){return O.length===0?null:O[0]}function r(O){if(O.length===0)return null;var $=O[0],H=O.pop();if(H!==$){O[0]=H;e:for(var q=0,Q=O.length,te=Q>>>1;q<te;){var ce=2*(q+1)-1,ye=O[ce],re=ce+1,Ne=O[re];if(0>i(ye,H))re<Q&&0>i(Ne,ye)?(O[q]=Ne,O[re]=H,q=re):(O[q]=ye,O[ce]=H,q=ce);else if(re<Q&&0>i(Ne,H))O[q]=Ne,O[re]=H,q=re;else break e}}return $}function i(O,$){var H=O.sortIndex-$.sortIndex;return H!==0?H:O.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],c=[],d=1,u=null,f=3,p=!1,h=!1,m=!1,x=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(O){for(var $=n(c);$!==null;){if($.callback===null)r(c);else if($.startTime<=O)r(c),$.sortIndex=$.expirationTime,t(l,$);else break;$=n(c)}}function k(O){if(m=!1,b(O),!h)if(n(l)!==null)h=!0,ee(T);else{var $=n(c);$!==null&&ne(k,$.startTime-O)}}function T(O,$){h=!1,m&&(m=!1,g(P),P=-1),p=!0;var H=f;try{for(b($),u=n(l);u!==null&&(!(u.expirationTime>$)||O&&!R());){var q=u.callback;if(typeof q=="function"){u.callback=null,f=u.priorityLevel;var Q=q(u.expirationTime<=$);$=e.unstable_now(),typeof Q=="function"?u.callback=Q:u===n(l)&&r(l),b($)}else r(l);u=n(l)}if(u!==null)var te=!0;else{var ce=n(c);ce!==null&&ne(k,ce.startTime-$),te=!1}return te}finally{u=null,f=H,p=!1}}var E=!1,_=null,P=-1,M=5,N=-1;function R(){return!(e.unstable_now()-N<M)}function F(){if(_!==null){var O=e.unstable_now();N=O;var $=!0;try{$=_(!0,O)}finally{$?B():(E=!1,_=null)}}else E=!1}var B;if(typeof w=="function")B=function(){w(F)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,K=V.port2;V.port1.onmessage=F,B=function(){K.postMessage(null)}}else B=function(){x(F,0)};function ee(O){_=O,E||(E=!0,B())}function ne(O,$){P=x(function(){O(e.unstable_now())},$)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(O){O.callback=null},e.unstable_continueExecution=function(){h||p||(h=!0,ee(T))},e.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<O?Math.floor(1e3/O):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(O){switch(f){case 1:case 2:case 3:var $=3;break;default:$=f}var H=f;f=$;try{return O()}finally{f=H}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(O,$){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var H=f;f=O;try{return $()}finally{f=H}},e.unstable_scheduleCallback=function(O,$,H){var q=e.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?q+H:q):H=q,O){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=H+Q,O={id:d++,callback:$,priorityLevel:O,startTime:H,expirationTime:Q,sortIndex:-1},H>q?(O.sortIndex=H,t(c,O),n(l)===null&&O===n(c)&&(m?(g(P),P=-1):m=!0,ne(k,H-q))):(O.sortIndex=Q,t(l,O),h||p||(h=!0,ee(T))),O},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(O){var $=f;return function(){var H=f;f=$;try{return O.apply(this,arguments)}finally{f=H}}}})(Jx);Zx.exports=Jx;var vT=Zx.exports;/**
25
+ */(function(e){function t(j,D){var B=j.length;j.push(D);e:for(;0<B;){var z=B-1>>>1,H=j[z];if(0<i(H,D))j[z]=D,j[B]=H,B=z;else break e}}function n(j){return j.length===0?null:j[0]}function r(j){if(j.length===0)return null;var D=j[0],B=j.pop();if(B!==D){j[0]=B;e:for(var z=0,H=j.length,ee=H>>>1;z<ee;){var de=2*(z+1)-1,ye=j[de],re=de+1,Le=j[re];if(0>i(ye,B))re<H&&0>i(Le,ye)?(j[z]=Le,j[re]=B,z=re):(j[z]=ye,j[de]=B,z=de);else if(re<H&&0>i(Le,B))j[z]=Le,j[re]=B,z=re;else break e}}return D}function i(j,D){var B=j.sortIndex-D.sortIndex;return B!==0?B:j.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],d=1,c=null,f=3,h=!1,m=!1,p=!1,w=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(j){for(var D=n(u);D!==null;){if(D.callback===null)r(u);else if(D.startTime<=j)r(u),D.sortIndex=D.expirationTime,t(l,D);else break;D=n(u)}}function T(j){if(p=!1,b(j),!m)if(n(l)!==null)m=!0,te(E);else{var D=n(u);D!==null&&ne(T,D.startTime-j)}}function E(j,D){m=!1,p&&(p=!1,g(A),A=-1),h=!0;var B=f;try{for(b(D),c=n(l);c!==null&&(!(c.expirationTime>D)||j&&!R());){var z=c.callback;if(typeof z=="function"){c.callback=null,f=c.priorityLevel;var H=z(c.expirationTime<=D);D=e.unstable_now(),typeof H=="function"?c.callback=H:c===n(l)&&r(l),b(D)}else r(l);c=n(l)}if(c!==null)var ee=!0;else{var de=n(u);de!==null&&ne(T,de.startTime-D),ee=!1}return ee}finally{c=null,f=B,h=!1}}var C=!1,_=null,A=-1,F=5,M=-1;function R(){return!(e.unstable_now()-M<F)}function $(){if(_!==null){var j=e.unstable_now();M=j;var D=!0;try{D=_(!0,j)}finally{D?U():(C=!1,_=null)}}else C=!1}var U;if(typeof x=="function")U=function(){x($)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,J=Y.port2;Y.port1.onmessage=$,U=function(){J.postMessage(null)}}else U=function(){w($,0)};function te(j){_=j,C||(C=!0,U())}function ne(j,D){A=w(function(){j(e.unstable_now())},D)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(j){j.callback=null},e.unstable_continueExecution=function(){m||h||(m=!0,te(E))},e.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<j?Math.floor(1e3/j):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(j){switch(f){case 1:case 2:case 3:var D=3;break;default:D=f}var B=f;f=D;try{return j()}finally{f=B}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(j,D){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var B=f;f=j;try{return D()}finally{f=B}},e.unstable_scheduleCallback=function(j,D,B){var z=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?z+B:z):B=z,j){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=B+H,j={id:d++,callback:D,priorityLevel:j,startTime:B,expirationTime:H,sortIndex:-1},B>z?(j.sortIndex=B,t(u,j),n(l)===null&&j===n(u)&&(p?(g(A),A=-1):p=!0,ne(T,B-z))):(j.sortIndex=H,t(l,j),m||h||(m=!0,te(E))),j},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(j){var D=f;return function(){var B=f;f=D;try{return j.apply(this,arguments)}finally{f=B}}}})(Jx);Zx.exports=Jx;var vT=Zx.exports;/**
26
26
  * @license React
27
27
  * react-dom.production.min.js
28
28
  *
@@ -30,14 +30,14 @@ var Tg=e=>{throw TypeError(e)};var QC=(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 yT=v,Ht=vT;function I(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 e1=new Set,da={};function Ji(e,t){ro(e,t),ro(e+"Capture",t)}function ro(e,t){for(da[e]=t,e=0;e<t.length;e++)e1.add(t[e])}var cr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),af=Object.prototype.hasOwnProperty,xT=/^[: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]*$/,jg={},Rg={};function wT(e){return af.call(Rg,e)?!0:af.call(jg,e)?!1:xT.test(e)?Rg[e]=!0:(jg[e]=!0,!1)}function bT(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 ST(e,t,n,r){if(t===null||typeof t>"u"||bT(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 St(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 at={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){at[e]=new St(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];at[t]=new St(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){at[e]=new St(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){at[e]=new St(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){at[e]=new St(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){at[e]=new St(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){at[e]=new St(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){at[e]=new St(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){at[e]=new St(e,5,!1,e.toLowerCase(),null,!1,!1)});var ph=/[\-:]([a-z])/g;function hh(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(ph,hh);at[t]=new St(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(ph,hh);at[t]=new St(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(ph,hh);at[t]=new St(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){at[e]=new St(e,1,!1,e.toLowerCase(),null,!1,!1)});at.xlinkHref=new St("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){at[e]=new St(e,1,!1,e.toLowerCase(),null,!0,!0)});function mh(e,t,n,r){var i=at.hasOwnProperty(t)?at[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(ST(t,n,i,r)&&(n=null),r||i===null?wT(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 mr=yT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,hl=Symbol.for("react.element"),xs=Symbol.for("react.portal"),ws=Symbol.for("react.fragment"),gh=Symbol.for("react.strict_mode"),lf=Symbol.for("react.profiler"),t1=Symbol.for("react.provider"),n1=Symbol.for("react.context"),vh=Symbol.for("react.forward_ref"),uf=Symbol.for("react.suspense"),cf=Symbol.for("react.suspense_list"),yh=Symbol.for("react.memo"),Cr=Symbol.for("react.lazy"),r1=Symbol.for("react.offscreen"),Ag=Symbol.iterator;function jo(e){return e===null||typeof e!="object"?null:(e=Ag&&e[Ag]||e["@@iterator"],typeof e=="function"?e:null)}var Ae=Object.assign,td;function Bo(e){if(td===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);td=t&&t[1]||""}return`
34
- `+td+e}var nd=!1;function rd(e,t){if(!e||nd)return"";nd=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.stack.split(`
33
+ */var yT=v,qt=vT;function I(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 e1=new Set,da={};function Ji(e,t){ro(e,t),ro(e+"Capture",t)}function ro(e,t){for(da[e]=t,e=0;e<t.length;e++)e1.add(t[e])}var dr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),af=Object.prototype.hasOwnProperty,xT=/^[: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]*$/,Pg={},Ag={};function wT(e){return af.call(Ag,e)?!0:af.call(Pg,e)?!1:xT.test(e)?Ag[e]=!0:(Pg[e]=!0,!1)}function bT(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 ST(e,t,n,r){if(t===null||typeof t>"u"||bT(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 St(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 at={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){at[e]=new St(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];at[t]=new St(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){at[e]=new St(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){at[e]=new St(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){at[e]=new St(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){at[e]=new St(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){at[e]=new St(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){at[e]=new St(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){at[e]=new St(e,5,!1,e.toLowerCase(),null,!1,!1)});var ph=/[\-:]([a-z])/g;function hh(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(ph,hh);at[t]=new St(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(ph,hh);at[t]=new St(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(ph,hh);at[t]=new St(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){at[e]=new St(e,1,!1,e.toLowerCase(),null,!1,!1)});at.xlinkHref=new St("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){at[e]=new St(e,1,!1,e.toLowerCase(),null,!0,!0)});function mh(e,t,n,r){var i=at.hasOwnProperty(t)?at[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(ST(t,n,i,r)&&(n=null),r||i===null?wT(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 gr=yT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,hl=Symbol.for("react.element"),xs=Symbol.for("react.portal"),ws=Symbol.for("react.fragment"),gh=Symbol.for("react.strict_mode"),lf=Symbol.for("react.profiler"),t1=Symbol.for("react.provider"),n1=Symbol.for("react.context"),vh=Symbol.for("react.forward_ref"),uf=Symbol.for("react.suspense"),cf=Symbol.for("react.suspense_list"),yh=Symbol.for("react.memo"),Tr=Symbol.for("react.lazy"),r1=Symbol.for("react.offscreen"),Rg=Symbol.iterator;function Po(e){return e===null||typeof e!="object"?null:(e=Rg&&e[Rg]||e["@@iterator"],typeof e=="function"?e:null)}var Oe=Object.assign,td;function Bo(e){if(td===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);td=t&&t[1]||""}return`
34
+ `+td+e}var nd=!1;function rd(e,t){if(!e||nd)return"";nd=!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{nd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Bo(e):""}function kT(e){switch(e.tag){case 5:return Bo(e.type);case 16:return Bo("Lazy");case 13:return Bo("Suspense");case 19:return Bo("SuspenseList");case 0:case 2:case 15:return e=rd(e.type,!1),e;case 11:return e=rd(e.type.render,!1),e;case 1:return e=rd(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 ws:return"Fragment";case xs:return"Portal";case lf:return"Profiler";case gh:return"StrictMode";case uf:return"Suspense";case cf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case n1:return(e.displayName||"Context")+".Consumer";case t1:return(e._context.displayName||"Context")+".Provider";case vh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case yh: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 CT(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===gh?"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 ti(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function i1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function TT(e){var t=i1(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 ml(e){e._valueTracker||(e._valueTracker=TT(e))}function s1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=i1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function hu(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 Ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Og(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ti(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 o1(e,t){t=t.checked,t!=null&&mh(e,"checked",t,!1)}function pf(e,t){o1(e,t);var n=ti(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")?hf(e,t.type,n):t.hasOwnProperty("defaultValue")&&hf(e,t.type,ti(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Dg(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 hf(e,t,n){(t!=="number"||hu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var zo=Array.isArray;function Ls(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=""+ti(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 mf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(I(91));return Ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Fg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(I(92));if(zo(n)){if(1<n.length)throw Error(I(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ti(n)}}function a1(e,t){var n=ti(t.value),r=ti(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 Mg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function l1(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 gf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?l1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var gl,u1=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(gl=gl||document.createElement("div"),gl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=gl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function fa(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Qo={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},ET=["Webkit","ms","Moz","O"];Object.keys(Qo).forEach(function(e){ET.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Qo[t]=Qo[e]})});function c1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Qo.hasOwnProperty(e)&&Qo[e]?(""+t).trim():t+"px"}function d1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=c1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var _T=Ae({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function vf(e,t){if(t){if(_T[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(I(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(I(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(I(61))}if(t.style!=null&&typeof t.style!="object")throw Error(I(62))}}function yf(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 xf=null;function xh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wf=null,Is=null,$s=null;function Ng(e){if(e=Ka(e)){if(typeof wf!="function")throw Error(I(280));var t=e.stateNode;t&&(t=lc(t),wf(e.stateNode,e.type,t))}}function f1(e){Is?$s?$s.push(e):$s=[e]:Is=e}function p1(){if(Is){var e=Is,t=$s;if($s=Is=null,Ng(e),t)for(e=0;e<t.length;e++)Ng(t[e])}}function h1(e,t){return e(t)}function m1(){}var id=!1;function g1(e,t,n){if(id)return e(t,n);id=!0;try{return h1(e,t,n)}finally{id=!1,(Is!==null||$s!==null)&&(m1(),p1())}}function pa(e,t){var n=e.stateNode;if(n===null)return null;var r=lc(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(I(231,t,typeof n));return n}var bf=!1;if(cr)try{var Ro={};Object.defineProperty(Ro,"passive",{get:function(){bf=!0}}),window.addEventListener("test",Ro,Ro),window.removeEventListener("test",Ro,Ro)}catch{bf=!1}function PT(e,t,n,r,i,s,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var Yo=!1,mu=null,gu=!1,Sf=null,jT={onError:function(e){Yo=!0,mu=e}};function RT(e,t,n,r,i,s,o,a,l){Yo=!1,mu=null,PT.apply(jT,arguments)}function AT(e,t,n,r,i,s,o,a,l){if(RT.apply(this,arguments),Yo){if(Yo){var c=mu;Yo=!1,mu=null}else throw Error(I(198));gu||(gu=!0,Sf=c)}}function es(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 v1(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 Lg(e){if(es(e)!==e)throw Error(I(188))}function OT(e){var t=e.alternate;if(!t){if(t=es(e),t===null)throw Error(I(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 Lg(i),e;if(s===r)return Lg(i),t;s=s.sibling}throw Error(I(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(I(189))}}if(n.alternate!==r)throw Error(I(190))}if(n.tag!==3)throw Error(I(188));return n.stateNode.current===n?e:t}function y1(e){return e=OT(e),e!==null?x1(e):null}function x1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=x1(e);if(t!==null)return t;e=e.sibling}return null}var w1=Ht.unstable_scheduleCallback,Ig=Ht.unstable_cancelCallback,DT=Ht.unstable_shouldYield,FT=Ht.unstable_requestPaint,$e=Ht.unstable_now,MT=Ht.unstable_getCurrentPriorityLevel,wh=Ht.unstable_ImmediatePriority,b1=Ht.unstable_UserBlockingPriority,vu=Ht.unstable_NormalPriority,NT=Ht.unstable_LowPriority,S1=Ht.unstable_IdlePriority,ic=null,zn=null;function LT(e){if(zn&&typeof zn.onCommitFiberRoot=="function")try{zn.onCommitFiberRoot(ic,e,void 0,(e.current.flags&128)===128)}catch{}}var kn=Math.clz32?Math.clz32:BT,IT=Math.log,$T=Math.LN2;function BT(e){return e>>>=0,e===0?32:31-(IT(e)/$T|0)|0}var vl=64,yl=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 yu(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-kn(t),i=1<<n,r|=e[n],t&=~i;return r}function zT(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 VT(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-kn(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=zT(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function kf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function k1(){var e=vl;return vl<<=1,!(vl&4194240)&&(vl=64),e}function sd(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Qa(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-kn(t),e[t]=n}function UT(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-kn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function bh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-kn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var he=0;function C1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var T1,Sh,E1,_1,P1,Cf=!1,xl=[],Vr=null,Ur=null,Hr=null,ha=new Map,ma=new Map,_r=[],HT="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 $g(e,t){switch(e){case"focusin":case"focusout":Vr=null;break;case"dragenter":case"dragleave":Ur=null;break;case"mouseover":case"mouseout":Hr=null;break;case"pointerover":case"pointerout":ha.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ma.delete(t.pointerId)}}function Ao(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=Ka(t),t!==null&&Sh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function WT(e,t,n,r,i){switch(t){case"focusin":return Vr=Ao(Vr,e,t,n,r,i),!0;case"dragenter":return Ur=Ao(Ur,e,t,n,r,i),!0;case"mouseover":return Hr=Ao(Hr,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return ha.set(s,Ao(ha.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,ma.set(s,Ao(ma.get(s)||null,e,t,n,r,i)),!0}return!1}function j1(e){var t=Ti(e.target);if(t!==null){var n=es(t);if(n!==null){if(t=n.tag,t===13){if(t=v1(n),t!==null){e.blockedOn=t,P1(e.priority,function(){E1(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=Tf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);xf=r,n.target.dispatchEvent(r),xf=null}else return t=Ka(n),t!==null&&Sh(t),e.blockedOn=n,!1;t.shift()}return!0}function Bg(e,t,n){Wl(e)&&n.delete(t)}function qT(){Cf=!1,Vr!==null&&Wl(Vr)&&(Vr=null),Ur!==null&&Wl(Ur)&&(Ur=null),Hr!==null&&Wl(Hr)&&(Hr=null),ha.forEach(Bg),ma.forEach(Bg)}function Oo(e,t){e.blockedOn===t&&(e.blockedOn=null,Cf||(Cf=!0,Ht.unstable_scheduleCallback(Ht.unstable_NormalPriority,qT)))}function ga(e){function t(i){return Oo(i,e)}if(0<xl.length){Oo(xl[0],e);for(var n=1;n<xl.length;n++){var r=xl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Vr!==null&&Oo(Vr,e),Ur!==null&&Oo(Ur,e),Hr!==null&&Oo(Hr,e),ha.forEach(t),ma.forEach(t),n=0;n<_r.length;n++)r=_r[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<_r.length&&(n=_r[0],n.blockedOn===null);)j1(n),n.blockedOn===null&&_r.shift()}var Bs=mr.ReactCurrentBatchConfig,xu=!0;function GT(e,t,n,r){var i=he,s=Bs.transition;Bs.transition=null;try{he=1,kh(e,t,n,r)}finally{he=i,Bs.transition=s}}function QT(e,t,n,r){var i=he,s=Bs.transition;Bs.transition=null;try{he=4,kh(e,t,n,r)}finally{he=i,Bs.transition=s}}function kh(e,t,n,r){if(xu){var i=Tf(e,t,n,r);if(i===null)md(e,t,r,wu,n),$g(e,r);else if(WT(i,e,t,n,r))r.stopPropagation();else if($g(e,r),t&4&&-1<HT.indexOf(e)){for(;i!==null;){var s=Ka(i);if(s!==null&&T1(s),s=Tf(e,t,n,r),s===null&&md(e,t,r,wu,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else md(e,t,r,null,n)}}var wu=null;function Tf(e,t,n,r){if(wu=null,e=xh(r),e=Ti(e),e!==null)if(t=es(e),t===null)e=null;else if(n=t.tag,n===13){if(e=v1(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 wu=e,null}function R1(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(MT()){case wh:return 1;case b1:return 4;case vu:case NT:return 16;case S1:return 536870912;default:return 16}default:return 16}}var Ir=null,Ch=null,ql=null;function A1(){if(ql)return ql;var e,t=Ch,n=t.length,r,i="value"in Ir?Ir.value:Ir.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 ql=i.slice(e,1<r?1-r:void 0)}function Gl(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 wl(){return!0}function zg(){return!1}function qt(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)?wl:zg,this.isPropagationStopped=zg,this}return Ae(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=wl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=wl)},persist:function(){},isPersistent:wl}),t}var xo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Th=qt(xo),Ya=Ae({},xo,{view:0,detail:0}),YT=qt(Ya),od,ad,Do,sc=Ae({},Ya,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Eh,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!==Do&&(Do&&e.type==="mousemove"?(od=e.screenX-Do.screenX,ad=e.screenY-Do.screenY):ad=od=0,Do=e),od)},movementY:function(e){return"movementY"in e?e.movementY:ad}}),Vg=qt(sc),KT=Ae({},sc,{dataTransfer:0}),XT=qt(KT),ZT=Ae({},Ya,{relatedTarget:0}),ld=qt(ZT),JT=Ae({},xo,{animationName:0,elapsedTime:0,pseudoElement:0}),eE=qt(JT),tE=Ae({},xo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),nE=qt(tE),rE=Ae({},xo,{data:0}),Ug=qt(rE),iE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},sE={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"},oE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function aE(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=oE[e])?!!t[e]:!1}function Eh(){return aE}var lE=Ae({},Ya,{key:function(e){if(e.key){var t=iE[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Gl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?sE[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Eh,charCode:function(e){return e.type==="keypress"?Gl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Gl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),uE=qt(lE),cE=Ae({},sc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Hg=qt(cE),dE=Ae({},Ya,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Eh}),fE=qt(dE),pE=Ae({},xo,{propertyName:0,elapsedTime:0,pseudoElement:0}),hE=qt(pE),mE=Ae({},sc,{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}),gE=qt(mE),vE=[9,13,27,32],_h=cr&&"CompositionEvent"in window,Ko=null;cr&&"documentMode"in document&&(Ko=document.documentMode);var yE=cr&&"TextEvent"in window&&!Ko,O1=cr&&(!_h||Ko&&8<Ko&&11>=Ko),Wg=" ",qg=!1;function D1(e,t){switch(e){case"keyup":return vE.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function F1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var bs=!1;function xE(e,t){switch(e){case"compositionend":return F1(t);case"keypress":return t.which!==32?null:(qg=!0,Wg);case"textInput":return e=t.data,e===Wg&&qg?null:e;default:return null}}function wE(e,t){if(bs)return e==="compositionend"||!_h&&D1(e,t)?(e=A1(),ql=Ch=Ir=null,bs=!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 O1&&t.locale!=="ko"?null:t.data;default:return null}}var bE={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 Gg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!bE[e.type]:t==="textarea"}function M1(e,t,n,r){f1(r),t=bu(t,"onChange"),0<t.length&&(n=new Th("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Xo=null,va=null;function SE(e){q1(e,0)}function oc(e){var t=Cs(e);if(s1(t))return e}function kE(e,t){if(e==="change")return t}var N1=!1;if(cr){var ud;if(cr){var cd="oninput"in document;if(!cd){var Qg=document.createElement("div");Qg.setAttribute("oninput","return;"),cd=typeof Qg.oninput=="function"}ud=cd}else ud=!1;N1=ud&&(!document.documentMode||9<document.documentMode)}function Yg(){Xo&&(Xo.detachEvent("onpropertychange",L1),va=Xo=null)}function L1(e){if(e.propertyName==="value"&&oc(va)){var t=[];M1(t,va,e,xh(e)),g1(SE,t)}}function CE(e,t,n){e==="focusin"?(Yg(),Xo=t,va=n,Xo.attachEvent("onpropertychange",L1)):e==="focusout"&&Yg()}function TE(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return oc(va)}function EE(e,t){if(e==="click")return oc(t)}function _E(e,t){if(e==="input"||e==="change")return oc(t)}function PE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tn=typeof Object.is=="function"?Object.is:PE;function ya(e,t){if(Tn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!af.call(t,i)||!Tn(e[i],t[i]))return!1}return!0}function Kg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Xg(e,t){var n=Kg(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=Kg(n)}}function I1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?I1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function $1(){for(var e=window,t=hu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=hu(e.document)}return t}function Ph(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 jE(e){var t=$1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&I1(n.ownerDocument.documentElement,n)){if(r!==null&&Ph(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=Xg(n,s);var o=Xg(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 RE=cr&&"documentMode"in document&&11>=document.documentMode,Ss=null,Ef=null,Zo=null,_f=!1;function Zg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;_f||Ss==null||Ss!==hu(r)||(r=Ss,"selectionStart"in r&&Ph(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}),Zo&&ya(Zo,r)||(Zo=r,r=bu(Ef,"onSelect"),0<r.length&&(t=new Th("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ss)))}function bl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ks={animationend:bl("Animation","AnimationEnd"),animationiteration:bl("Animation","AnimationIteration"),animationstart:bl("Animation","AnimationStart"),transitionend:bl("Transition","TransitionEnd")},dd={},B1={};cr&&(B1=document.createElement("div").style,"AnimationEvent"in window||(delete ks.animationend.animation,delete ks.animationiteration.animation,delete ks.animationstart.animation),"TransitionEvent"in window||delete ks.transitionend.transition);function ac(e){if(dd[e])return dd[e];if(!ks[e])return e;var t=ks[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in B1)return dd[e]=t[n];return e}var z1=ac("animationend"),V1=ac("animationiteration"),U1=ac("animationstart"),H1=ac("transitionend"),W1=new Map,Jg="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 oi(e,t){W1.set(e,t),Ji(t,[e])}for(var fd=0;fd<Jg.length;fd++){var pd=Jg[fd],AE=pd.toLowerCase(),OE=pd[0].toUpperCase()+pd.slice(1);oi(AE,"on"+OE)}oi(z1,"onAnimationEnd");oi(V1,"onAnimationIteration");oi(U1,"onAnimationStart");oi("dblclick","onDoubleClick");oi("focusin","onFocus");oi("focusout","onBlur");oi(H1,"onTransitionEnd");ro("onMouseEnter",["mouseout","mouseover"]);ro("onMouseLeave",["mouseout","mouseover"]);ro("onPointerEnter",["pointerout","pointerover"]);ro("onPointerLeave",["pointerout","pointerover"]);Ji("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ji("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ji("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ji("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ji("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ji("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Uo="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(" "),DE=new Set("cancel close invalid load scroll toggle".split(" ").concat(Uo));function ev(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,AT(r,t,void 0,e),e.currentTarget=null}function q1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;ev(i,a,c),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;ev(i,a,c),s=l}}}if(gu)throw e=Sf,gu=!1,Sf=null,e}function ke(e,t){var n=t[Of];n===void 0&&(n=t[Of]=new Set);var r=e+"__bubble";n.has(r)||(G1(t,e,2,!1),n.add(r))}function hd(e,t,n){var r=0;t&&(r|=4),G1(n,e,r,t)}var Sl="_reactListening"+Math.random().toString(36).slice(2);function xa(e){if(!e[Sl]){e[Sl]=!0,e1.forEach(function(n){n!=="selectionchange"&&(DE.has(n)||hd(n,!1,e),hd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Sl]||(t[Sl]=!0,hd("selectionchange",!1,t))}}function G1(e,t,n,r){switch(R1(t)){case 1:var i=GT;break;case 4:i=QT;break;default:i=kh}n=i.bind(null,t,n,e),i=void 0,!bf||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 md(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=Ti(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}g1(function(){var c=s,d=xh(n),u=[];e:{var f=W1.get(e);if(f!==void 0){var p=Th,h=e;switch(e){case"keypress":if(Gl(n)===0)break e;case"keydown":case"keyup":p=uE;break;case"focusin":h="focus",p=ld;break;case"focusout":h="blur",p=ld;break;case"beforeblur":case"afterblur":p=ld;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=Vg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=XT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=fE;break;case z1:case V1:case U1:p=eE;break;case H1:p=hE;break;case"scroll":p=YT;break;case"wheel":p=gE;break;case"copy":case"cut":case"paste":p=nE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Hg}var m=(t&4)!==0,x=!m&&e==="scroll",g=m?f!==null?f+"Capture":null:f;m=[];for(var w=c,b;w!==null;){b=w;var k=b.stateNode;if(b.tag===5&&k!==null&&(b=k,g!==null&&(k=pa(w,g),k!=null&&m.push(wa(w,k,b)))),x)break;w=w.return}0<m.length&&(f=new p(f,h,null,n,d),u.push({event:f,listeners:m}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==xf&&(h=n.relatedTarget||n.fromElement)&&(Ti(h)||h[dr]))break e;if((p||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,p?(h=n.relatedTarget||n.toElement,p=c,h=h?Ti(h):null,h!==null&&(x=es(h),h!==x||h.tag!==5&&h.tag!==6)&&(h=null)):(p=null,h=c),p!==h)){if(m=Vg,k="onMouseLeave",g="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(m=Hg,k="onPointerLeave",g="onPointerEnter",w="pointer"),x=p==null?f:Cs(p),b=h==null?f:Cs(h),f=new m(k,w+"leave",p,n,d),f.target=x,f.relatedTarget=b,k=null,Ti(d)===c&&(m=new m(g,w+"enter",h,n,d),m.target=b,m.relatedTarget=x,k=m),x=k,p&&h)t:{for(m=p,g=h,w=0,b=m;b;b=gs(b))w++;for(b=0,k=g;k;k=gs(k))b++;for(;0<w-b;)m=gs(m),w--;for(;0<b-w;)g=gs(g),b--;for(;w--;){if(m===g||g!==null&&m===g.alternate)break t;m=gs(m),g=gs(g)}m=null}else m=null;p!==null&&tv(u,f,p,m,!1),h!==null&&x!==null&&tv(u,x,h,m,!0)}}e:{if(f=c?Cs(c):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var T=kE;else if(Gg(f))if(N1)T=_E;else{T=TE;var E=CE}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(T=EE);if(T&&(T=T(e,c))){M1(u,T,n,d);break e}E&&E(e,f,c),e==="focusout"&&(E=f._wrapperState)&&E.controlled&&f.type==="number"&&hf(f,"number",f.value)}switch(E=c?Cs(c):window,e){case"focusin":(Gg(E)||E.contentEditable==="true")&&(Ss=E,Ef=c,Zo=null);break;case"focusout":Zo=Ef=Ss=null;break;case"mousedown":_f=!0;break;case"contextmenu":case"mouseup":case"dragend":_f=!1,Zg(u,n,d);break;case"selectionchange":if(RE)break;case"keydown":case"keyup":Zg(u,n,d)}var _;if(_h)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 bs?D1(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(O1&&n.locale!=="ko"&&(bs||P!=="onCompositionStart"?P==="onCompositionEnd"&&bs&&(_=A1()):(Ir=d,Ch="value"in Ir?Ir.value:Ir.textContent,bs=!0)),E=bu(c,P),0<E.length&&(P=new Ug(P,e,null,n,d),u.push({event:P,listeners:E}),_?P.data=_:(_=F1(n),_!==null&&(P.data=_)))),(_=yE?xE(e,n):wE(e,n))&&(c=bu(c,"onBeforeInput"),0<c.length&&(d=new Ug("onBeforeInput","beforeinput",null,n,d),u.push({event:d,listeners:c}),d.data=_))}q1(u,t)})}function wa(e,t,n){return{instance:e,listener:t,currentTarget:n}}function bu(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=pa(e,n),s!=null&&r.unshift(wa(e,s,i)),s=pa(e,t),s!=null&&r.push(wa(e,s,i))),e=e.return}return r}function gs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function tv(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,i?(l=pa(n,s),l!=null&&o.unshift(wa(n,l,a))):i||(l=pa(n,s),l!=null&&o.push(wa(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var FE=/\r\n?/g,ME=/\u0000|\uFFFD/g;function nv(e){return(typeof e=="string"?e:""+e).replace(FE,`
38
- `).replace(ME,"")}function kl(e,t,n){if(t=nv(t),nv(e)!==t&&n)throw Error(I(425))}function Su(){}var Pf=null,jf=null;function Rf(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 Af=typeof setTimeout=="function"?setTimeout:void 0,NE=typeof clearTimeout=="function"?clearTimeout:void 0,rv=typeof Promise=="function"?Promise:void 0,LE=typeof queueMicrotask=="function"?queueMicrotask:typeof rv<"u"?function(e){return rv.resolve(null).then(e).catch(IE)}:Af;function IE(e){setTimeout(function(){throw e})}function gd(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),ga(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);ga(t)}function Wr(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 iv(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 wo=Math.random().toString(36).slice(2),$n="__reactFiber$"+wo,ba="__reactProps$"+wo,dr="__reactContainer$"+wo,Of="__reactEvents$"+wo,$E="__reactListeners$"+wo,BE="__reactHandles$"+wo;function Ti(e){var t=e[$n];if(t)return t;for(var n=e.parentNode;n;){if(t=n[dr]||n[$n]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=iv(e);e!==null;){if(n=e[$n])return n;e=iv(e)}return t}e=n,n=e.parentNode}return null}function Ka(e){return e=e[$n]||e[dr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Cs(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(I(33))}function lc(e){return e[ba]||null}var Df=[],Ts=-1;function ai(e){return{current:e}}function Te(e){0>Ts||(e.current=Df[Ts],Df[Ts]=null,Ts--)}function be(e,t){Ts++,Df[Ts]=e.current,e.current=t}var ni={},mt=ai(ni),Ot=ai(!1),Hi=ni;function io(e,t){var n=e.type.contextTypes;if(!n)return ni;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 Dt(e){return e=e.childContextTypes,e!=null}function ku(){Te(Ot),Te(mt)}function sv(e,t,n){if(mt.current!==ni)throw Error(I(168));be(mt,t),be(Ot,n)}function Q1(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(I(108,CT(e)||"Unknown",i));return Ae({},n,r)}function Cu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ni,Hi=mt.current,be(mt,e),be(Ot,Ot.current),!0}function ov(e,t,n){var r=e.stateNode;if(!r)throw Error(I(169));n?(e=Q1(e,t,Hi),r.__reactInternalMemoizedMergedChildContext=e,Te(Ot),Te(mt),be(mt,e)):Te(Ot),be(Ot,n)}var nr=null,uc=!1,vd=!1;function Y1(e){nr===null?nr=[e]:nr.push(e)}function zE(e){uc=!0,Y1(e)}function li(){if(!vd&&nr!==null){vd=!0;var e=0,t=he;try{var n=nr;for(he=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}nr=null,uc=!1}catch(i){throw nr!==null&&(nr=nr.slice(e+1)),w1(wh,li),i}finally{he=t,vd=!1}}return null}var Es=[],_s=0,Tu=null,Eu=0,tn=[],nn=0,Wi=null,sr=1,or="";function yi(e,t){Es[_s++]=Eu,Es[_s++]=Tu,Tu=e,Eu=t}function K1(e,t,n){tn[nn++]=sr,tn[nn++]=or,tn[nn++]=Wi,Wi=e;var r=sr;e=or;var i=32-kn(r)-1;r&=~(1<<i),n+=1;var s=32-kn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,sr=1<<32-kn(t)+i|n<<i|r,or=s+e}else sr=1<<s|n<<i|r,or=e}function jh(e){e.return!==null&&(yi(e,1),K1(e,1,0))}function Rh(e){for(;e===Tu;)Tu=Es[--_s],Es[_s]=null,Eu=Es[--_s],Es[_s]=null;for(;e===Wi;)Wi=tn[--nn],tn[nn]=null,or=tn[--nn],tn[nn]=null,sr=tn[--nn],tn[nn]=null}var Ut=null,Bt=null,Ee=!1,bn=null;function X1(e,t){var n=sn(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 av(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,Ut=e,Bt=Wr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ut=e,Bt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Wi!==null?{id:sr,overflow:or}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=sn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ut=e,Bt=null,!0):!1;default:return!1}}function Ff(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Mf(e){if(Ee){var t=Bt;if(t){var n=t;if(!av(e,t)){if(Ff(e))throw Error(I(418));t=Wr(n.nextSibling);var r=Ut;t&&av(e,t)?X1(r,n):(e.flags=e.flags&-4097|2,Ee=!1,Ut=e)}}else{if(Ff(e))throw Error(I(418));e.flags=e.flags&-4097|2,Ee=!1,Ut=e}}}function lv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ut=e}function Cl(e){if(e!==Ut)return!1;if(!Ee)return lv(e),Ee=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Rf(e.type,e.memoizedProps)),t&&(t=Bt)){if(Ff(e))throw Z1(),Error(I(418));for(;t;)X1(e,t),t=Wr(t.nextSibling)}if(lv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(I(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Bt=Wr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Bt=null}}else Bt=Ut?Wr(e.stateNode.nextSibling):null;return!0}function Z1(){for(var e=Bt;e;)e=Wr(e.nextSibling)}function so(){Bt=Ut=null,Ee=!1}function Ah(e){bn===null?bn=[e]:bn.push(e)}var VE=mr.ReactCurrentBatchConfig;function Fo(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(I(309));var r=n.stateNode}if(!r)throw Error(I(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(I(284));if(!n._owner)throw Error(I(290,e))}return e}function Tl(e,t){throw e=Object.prototype.toString.call(t),Error(I(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function uv(e){var t=e._init;return t(e._payload)}function J1(e){function t(g,w){if(e){var b=g.deletions;b===null?(g.deletions=[w],g.flags|=16):b.push(w)}}function n(g,w){if(!e)return null;for(;w!==null;)t(g,w),w=w.sibling;return null}function r(g,w){for(g=new Map;w!==null;)w.key!==null?g.set(w.key,w):g.set(w.index,w),w=w.sibling;return g}function i(g,w){return g=Yr(g,w),g.index=0,g.sibling=null,g}function s(g,w,b){return g.index=b,e?(b=g.alternate,b!==null?(b=b.index,b<w?(g.flags|=2,w):b):(g.flags|=2,w)):(g.flags|=1048576,w)}function o(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,w,b,k){return w===null||w.tag!==6?(w=Cd(b,g.mode,k),w.return=g,w):(w=i(w,b),w.return=g,w)}function l(g,w,b,k){var T=b.type;return T===ws?d(g,w,b.props.children,k,b.key):w!==null&&(w.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Cr&&uv(T)===w.type)?(k=i(w,b.props),k.ref=Fo(g,w,b),k.return=g,k):(k=eu(b.type,b.key,b.props,null,g.mode,k),k.ref=Fo(g,w,b),k.return=g,k)}function c(g,w,b,k){return w===null||w.tag!==4||w.stateNode.containerInfo!==b.containerInfo||w.stateNode.implementation!==b.implementation?(w=Td(b,g.mode,k),w.return=g,w):(w=i(w,b.children||[]),w.return=g,w)}function d(g,w,b,k,T){return w===null||w.tag!==7?(w=Bi(b,g.mode,k,T),w.return=g,w):(w=i(w,b),w.return=g,w)}function u(g,w,b){if(typeof w=="string"&&w!==""||typeof w=="number")return w=Cd(""+w,g.mode,b),w.return=g,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case hl:return b=eu(w.type,w.key,w.props,null,g.mode,b),b.ref=Fo(g,null,w),b.return=g,b;case xs:return w=Td(w,g.mode,b),w.return=g,w;case Cr:var k=w._init;return u(g,k(w._payload),b)}if(zo(w)||jo(w))return w=Bi(w,g.mode,b,null),w.return=g,w;Tl(g,w)}return null}function f(g,w,b,k){var T=w!==null?w.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return T!==null?null:a(g,w,""+b,k);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case hl:return b.key===T?l(g,w,b,k):null;case xs:return b.key===T?c(g,w,b,k):null;case Cr:return T=b._init,f(g,w,T(b._payload),k)}if(zo(b)||jo(b))return T!==null?null:d(g,w,b,k,null);Tl(g,b)}return null}function p(g,w,b,k,T){if(typeof k=="string"&&k!==""||typeof k=="number")return g=g.get(b)||null,a(w,g,""+k,T);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case hl:return g=g.get(k.key===null?b:k.key)||null,l(w,g,k,T);case xs:return g=g.get(k.key===null?b:k.key)||null,c(w,g,k,T);case Cr:var E=k._init;return p(g,w,b,E(k._payload),T)}if(zo(k)||jo(k))return g=g.get(b)||null,d(w,g,k,T,null);Tl(w,k)}return null}function h(g,w,b,k){for(var T=null,E=null,_=w,P=w=0,M=null;_!==null&&P<b.length;P++){_.index>P?(M=_,_=null):M=_.sibling;var N=f(g,_,b[P],k);if(N===null){_===null&&(_=M);break}e&&_&&N.alternate===null&&t(g,_),w=s(N,w,P),E===null?T=N:E.sibling=N,E=N,_=M}if(P===b.length)return n(g,_),Ee&&yi(g,P),T;if(_===null){for(;P<b.length;P++)_=u(g,b[P],k),_!==null&&(w=s(_,w,P),E===null?T=_:E.sibling=_,E=_);return Ee&&yi(g,P),T}for(_=r(g,_);P<b.length;P++)M=p(_,g,P,b[P],k),M!==null&&(e&&M.alternate!==null&&_.delete(M.key===null?P:M.key),w=s(M,w,P),E===null?T=M:E.sibling=M,E=M);return e&&_.forEach(function(R){return t(g,R)}),Ee&&yi(g,P),T}function m(g,w,b,k){var T=jo(b);if(typeof T!="function")throw Error(I(150));if(b=T.call(b),b==null)throw Error(I(151));for(var E=T=null,_=w,P=w=0,M=null,N=b.next();_!==null&&!N.done;P++,N=b.next()){_.index>P?(M=_,_=null):M=_.sibling;var R=f(g,_,N.value,k);if(R===null){_===null&&(_=M);break}e&&_&&R.alternate===null&&t(g,_),w=s(R,w,P),E===null?T=R:E.sibling=R,E=R,_=M}if(N.done)return n(g,_),Ee&&yi(g,P),T;if(_===null){for(;!N.done;P++,N=b.next())N=u(g,N.value,k),N!==null&&(w=s(N,w,P),E===null?T=N:E.sibling=N,E=N);return Ee&&yi(g,P),T}for(_=r(g,_);!N.done;P++,N=b.next())N=p(_,g,P,N.value,k),N!==null&&(e&&N.alternate!==null&&_.delete(N.key===null?P:N.key),w=s(N,w,P),E===null?T=N:E.sibling=N,E=N);return e&&_.forEach(function(F){return t(g,F)}),Ee&&yi(g,P),T}function x(g,w,b,k){if(typeof b=="object"&&b!==null&&b.type===ws&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case hl:e:{for(var T=b.key,E=w;E!==null;){if(E.key===T){if(T=b.type,T===ws){if(E.tag===7){n(g,E.sibling),w=i(E,b.props.children),w.return=g,g=w;break e}}else if(E.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Cr&&uv(T)===E.type){n(g,E.sibling),w=i(E,b.props),w.ref=Fo(g,E,b),w.return=g,g=w;break e}n(g,E);break}else t(g,E);E=E.sibling}b.type===ws?(w=Bi(b.props.children,g.mode,k,b.key),w.return=g,g=w):(k=eu(b.type,b.key,b.props,null,g.mode,k),k.ref=Fo(g,w,b),k.return=g,g=k)}return o(g);case xs:e:{for(E=b.key;w!==null;){if(w.key===E)if(w.tag===4&&w.stateNode.containerInfo===b.containerInfo&&w.stateNode.implementation===b.implementation){n(g,w.sibling),w=i(w,b.children||[]),w.return=g,g=w;break e}else{n(g,w);break}else t(g,w);w=w.sibling}w=Td(b,g.mode,k),w.return=g,g=w}return o(g);case Cr:return E=b._init,x(g,w,E(b._payload),k)}if(zo(b))return h(g,w,b,k);if(jo(b))return m(g,w,b,k);Tl(g,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,w!==null&&w.tag===6?(n(g,w.sibling),w=i(w,b),w.return=g,g=w):(n(g,w),w=Cd(b,g.mode,k),w.return=g,g=w),o(g)):n(g,w)}return x}var oo=J1(!0),ew=J1(!1),_u=ai(null),Pu=null,Ps=null,Oh=null;function Dh(){Oh=Ps=Pu=null}function Fh(e){var t=_u.current;Te(_u),e._currentValue=t}function Nf(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 zs(e,t){Pu=e,Oh=Ps=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(At=!0),e.firstContext=null)}function un(e){var t=e._currentValue;if(Oh!==e)if(e={context:e,memoizedValue:t,next:null},Ps===null){if(Pu===null)throw Error(I(308));Ps=e,Pu.dependencies={lanes:0,firstContext:e}}else Ps=Ps.next=e;return t}var Ei=null;function Mh(e){Ei===null?Ei=[e]:Ei.push(e)}function tw(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Mh(t)):(n.next=i.next,i.next=n),t.interleaved=n,fr(e,r)}function fr(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 Tr=!1;function Nh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function nw(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 lr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function qr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,de&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,fr(e,n)}return i=r.interleaved,i===null?(t.next=t,Mh(r)):(t.next=i.next,i.next=t),r.interleaved=t,fr(e,n)}function Ql(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,bh(e,n)}}function cv(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 ju(e,t,n,r){var i=e.updateQueue;Tr=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=l))}if(s!==null){var u=i.baseState;o=0,d=c=l=null,a=s;do{var f=a.lane,p=a.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,m=a;switch(f=t,p=n,m.tag){case 1:if(h=m.payload,typeof h=="function"){u=h.call(p,u,f);break e}u=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=m.payload,f=typeof h=="function"?h.call(p,u,f):h,f==null)break e;u=Ae({},u,f);break e;case 2:Tr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[a]:f.push(a))}else p={eventTime:p,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=p,l=u):d=d.next=p,o|=f;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;f=a,a=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(d===null&&(l=u),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=d,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);Gi|=o,e.lanes=o,e.memoizedState=u}}function dv(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(I(191,i));i.call(r)}}}var Xa={},Vn=ai(Xa),Sa=ai(Xa),ka=ai(Xa);function _i(e){if(e===Xa)throw Error(I(174));return e}function Lh(e,t){switch(be(ka,t),be(Sa,e),be(Vn,Xa),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:gf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=gf(t,e)}Te(Vn),be(Vn,t)}function ao(){Te(Vn),Te(Sa),Te(ka)}function rw(e){_i(ka.current);var t=_i(Vn.current),n=gf(t,e.type);t!==n&&(be(Sa,e),be(Vn,n))}function Ih(e){Sa.current===e&&(Te(Vn),Te(Sa))}var Pe=ai(0);function Ru(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var yd=[];function $h(){for(var e=0;e<yd.length;e++)yd[e]._workInProgressVersionPrimary=null;yd.length=0}var Yl=mr.ReactCurrentDispatcher,xd=mr.ReactCurrentBatchConfig,qi=0,Re=null,Ue=null,Ke=null,Au=!1,Jo=!1,Ca=0,UE=0;function ut(){throw Error(I(321))}function Bh(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Tn(e[n],t[n]))return!1;return!0}function zh(e,t,n,r,i,s){if(qi=s,Re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Yl.current=e===null||e.memoizedState===null?GE:QE,e=n(r,i),Jo){s=0;do{if(Jo=!1,Ca=0,25<=s)throw Error(I(301));s+=1,Ke=Ue=null,t.updateQueue=null,Yl.current=YE,e=n(r,i)}while(Jo)}if(Yl.current=Ou,t=Ue!==null&&Ue.next!==null,qi=0,Ke=Ue=Re=null,Au=!1,t)throw Error(I(300));return e}function Vh(){var e=Ca!==0;return Ca=0,e}function Dn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ke===null?Re.memoizedState=Ke=e:Ke=Ke.next=e,Ke}function cn(){if(Ue===null){var e=Re.alternate;e=e!==null?e.memoizedState:null}else e=Ue.next;var t=Ke===null?Re.memoizedState:Ke.next;if(t!==null)Ke=t,Ue=e;else{if(e===null)throw Error(I(310));Ue=e,e={memoizedState:Ue.memoizedState,baseState:Ue.baseState,baseQueue:Ue.baseQueue,queue:Ue.queue,next:null},Ke===null?Re.memoizedState=Ke=e:Ke=Ke.next=e}return Ke}function Ta(e,t){return typeof t=="function"?t(e):t}function wd(e){var t=cn(),n=t.queue;if(n===null)throw Error(I(311));n.lastRenderedReducer=e;var r=Ue,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,c=s;do{var d=c.lane;if((qi&d)===d)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var u={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=u,o=r):l=l.next=u,Re.lanes|=d,Gi|=d}c=c.next}while(c!==null&&c!==s);l===null?o=r:l.next=a,Tn(r,t.memoizedState)||(At=!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,Re.lanes|=s,Gi|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function bd(e){var t=cn(),n=t.queue;if(n===null)throw Error(I(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);Tn(s,t.memoizedState)||(At=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function iw(){}function sw(e,t){var n=Re,r=cn(),i=t(),s=!Tn(r.memoizedState,i);if(s&&(r.memoizedState=i,At=!0),r=r.queue,Uh(lw.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Ke!==null&&Ke.memoizedState.tag&1){if(n.flags|=2048,Ea(9,aw.bind(null,n,r,i,t),void 0,null),Xe===null)throw Error(I(349));qi&30||ow(n,t,i)}return i}function ow(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Re.updateQueue,t===null?(t={lastEffect:null,stores:null},Re.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function aw(e,t,n,r){t.value=n,t.getSnapshot=r,uw(t)&&cw(e)}function lw(e,t,n){return n(function(){uw(t)&&cw(e)})}function uw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Tn(e,n)}catch{return!0}}function cw(e){var t=fr(e,1);t!==null&&Cn(t,e,1,-1)}function fv(e){var t=Dn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:e},t.queue=e,e=e.dispatch=qE.bind(null,Re,e),[t.memoizedState,e]}function Ea(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Re.updateQueue,t===null?(t={lastEffect:null,stores:null},Re.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 dw(){return cn().memoizedState}function Kl(e,t,n,r){var i=Dn();Re.flags|=e,i.memoizedState=Ea(1|t,n,void 0,r===void 0?null:r)}function cc(e,t,n,r){var i=cn();r=r===void 0?null:r;var s=void 0;if(Ue!==null){var o=Ue.memoizedState;if(s=o.destroy,r!==null&&Bh(r,o.deps)){i.memoizedState=Ea(t,n,s,r);return}}Re.flags|=e,i.memoizedState=Ea(1|t,n,s,r)}function pv(e,t){return Kl(8390656,8,e,t)}function Uh(e,t){return cc(2048,8,e,t)}function fw(e,t){return cc(4,2,e,t)}function pw(e,t){return cc(4,4,e,t)}function hw(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 mw(e,t,n){return n=n!=null?n.concat([e]):null,cc(4,4,hw.bind(null,t,e),n)}function Hh(){}function gw(e,t){var n=cn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Bh(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function vw(e,t){var n=cn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Bh(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function yw(e,t,n){return qi&21?(Tn(n,t)||(n=k1(),Re.lanes|=n,Gi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,At=!0),e.memoizedState=n)}function HE(e,t){var n=he;he=n!==0&&4>n?n:4,e(!0);var r=xd.transition;xd.transition={};try{e(!1),t()}finally{he=n,xd.transition=r}}function xw(){return cn().memoizedState}function WE(e,t,n){var r=Qr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ww(e))bw(t,n);else if(n=tw(e,t,n,r),n!==null){var i=wt();Cn(n,e,r,i),Sw(n,t,r)}}function qE(e,t,n){var r=Qr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ww(e))bw(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,Tn(a,o)){var l=t.interleaved;l===null?(i.next=i,Mh(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=tw(e,t,i,r),n!==null&&(i=wt(),Cn(n,e,r,i),Sw(n,t,r))}}function ww(e){var t=e.alternate;return e===Re||t!==null&&t===Re}function bw(e,t){Jo=Au=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Sw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,bh(e,n)}}var Ou={readContext:un,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useInsertionEffect:ut,useLayoutEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useMutableSource:ut,useSyncExternalStore:ut,useId:ut,unstable_isNewReconciler:!1},GE={readContext:un,useCallback:function(e,t){return Dn().memoizedState=[e,t===void 0?null:t],e},useContext:un,useEffect:pv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Kl(4194308,4,hw.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=Dn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Dn();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=WE.bind(null,Re,e),[r.memoizedState,e]},useRef:function(e){var t=Dn();return e={current:e},t.memoizedState=e},useState:fv,useDebugValue:Hh,useDeferredValue:function(e){return Dn().memoizedState=e},useTransition:function(){var e=fv(!1),t=e[0];return e=HE.bind(null,e[1]),Dn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Re,i=Dn();if(Ee){if(n===void 0)throw Error(I(407));n=n()}else{if(n=t(),Xe===null)throw Error(I(349));qi&30||ow(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,pv(lw.bind(null,r,s,e),[e]),r.flags|=2048,Ea(9,aw.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Dn(),t=Xe.identifierPrefix;if(Ee){var n=or,r=sr;n=(r&~(1<<32-kn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ca++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=UE++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},QE={readContext:un,useCallback:gw,useContext:un,useEffect:Uh,useImperativeHandle:mw,useInsertionEffect:fw,useLayoutEffect:pw,useMemo:vw,useReducer:wd,useRef:dw,useState:function(){return wd(Ta)},useDebugValue:Hh,useDeferredValue:function(e){var t=cn();return yw(t,Ue.memoizedState,e)},useTransition:function(){var e=wd(Ta)[0],t=cn().memoizedState;return[e,t]},useMutableSource:iw,useSyncExternalStore:sw,useId:xw,unstable_isNewReconciler:!1},YE={readContext:un,useCallback:gw,useContext:un,useEffect:Uh,useImperativeHandle:mw,useInsertionEffect:fw,useLayoutEffect:pw,useMemo:vw,useReducer:bd,useRef:dw,useState:function(){return bd(Ta)},useDebugValue:Hh,useDeferredValue:function(e){var t=cn();return Ue===null?t.memoizedState=e:yw(t,Ue.memoizedState,e)},useTransition:function(){var e=bd(Ta)[0],t=cn().memoizedState;return[e,t]},useMutableSource:iw,useSyncExternalStore:sw,useId:xw,unstable_isNewReconciler:!1};function vn(e,t){if(e&&e.defaultProps){t=Ae({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Lf(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ae({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var dc={isMounted:function(e){return(e=e._reactInternals)?es(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=wt(),i=Qr(e),s=lr(r,i);s.payload=t,n!=null&&(s.callback=n),t=qr(e,s,i),t!==null&&(Cn(t,e,i,r),Ql(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=wt(),i=Qr(e),s=lr(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=qr(e,s,i),t!==null&&(Cn(t,e,i,r),Ql(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=wt(),r=Qr(e),i=lr(n,r);i.tag=2,t!=null&&(i.callback=t),t=qr(e,i,r),t!==null&&(Cn(t,e,r,n),Ql(t,e,r))}};function hv(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?!ya(n,r)||!ya(i,s):!0}function kw(e,t,n){var r=!1,i=ni,s=t.contextType;return typeof s=="object"&&s!==null?s=un(s):(i=Dt(t)?Hi:mt.current,r=t.contextTypes,s=(r=r!=null)?io(e,i):ni),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=dc,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function mv(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&&dc.enqueueReplaceState(t,t.state,null)}function If(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Nh(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=un(s):(s=Dt(t)?Hi:mt.current,i.context=io(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Lf(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&&dc.enqueueReplaceState(i,i.state,null),ju(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function lo(e,t){try{var n="",r=t;do n+=kT(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{nd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Bo(e):""}function kT(e){switch(e.tag){case 5:return Bo(e.type);case 16:return Bo("Lazy");case 13:return Bo("Suspense");case 19:return Bo("SuspenseList");case 0:case 2:case 15:return e=rd(e.type,!1),e;case 11:return e=rd(e.type.render,!1),e;case 1:return e=rd(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 ws:return"Fragment";case xs:return"Portal";case lf:return"Profiler";case gh:return"StrictMode";case uf:return"Suspense";case cf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case n1:return(e.displayName||"Context")+".Consumer";case t1:return(e._context.displayName||"Context")+".Provider";case vh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case yh:return t=e.displayName||null,t!==null?t:df(e.type)||"Memo";case Tr:t=e._payload,e=e._init;try{return df(e(t))}catch{}}return null}function CT(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===gh?"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 ni(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function i1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function TT(e){var t=i1(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 ml(e){e._valueTracker||(e._valueTracker=TT(e))}function s1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=i1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function hu(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 Oe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Og(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ni(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 o1(e,t){t=t.checked,t!=null&&mh(e,"checked",t,!1)}function pf(e,t){o1(e,t);var n=ni(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")?hf(e,t.type,n):t.hasOwnProperty("defaultValue")&&hf(e,t.type,ni(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Dg(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 hf(e,t,n){(t!=="number"||hu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var zo=Array.isArray;function Ls(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=""+ni(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 mf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(I(91));return Oe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Mg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(I(92));if(zo(n)){if(1<n.length)throw Error(I(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ni(n)}}function a1(e,t){var n=ni(t.value),r=ni(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 Fg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function l1(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 gf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?l1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var gl,u1=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(gl=gl||document.createElement("div"),gl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=gl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function fa(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Qo={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},ET=["Webkit","ms","Moz","O"];Object.keys(Qo).forEach(function(e){ET.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Qo[t]=Qo[e]})});function c1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Qo.hasOwnProperty(e)&&Qo[e]?(""+t).trim():t+"px"}function d1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=c1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var _T=Oe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function vf(e,t){if(t){if(_T[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(I(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(I(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(I(61))}if(t.style!=null&&typeof t.style!="object")throw Error(I(62))}}function yf(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 xf=null;function xh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wf=null,Is=null,$s=null;function Ng(e){if(e=Ka(e)){if(typeof wf!="function")throw Error(I(280));var t=e.stateNode;t&&(t=lc(t),wf(e.stateNode,e.type,t))}}function f1(e){Is?$s?$s.push(e):$s=[e]:Is=e}function p1(){if(Is){var e=Is,t=$s;if($s=Is=null,Ng(e),t)for(e=0;e<t.length;e++)Ng(t[e])}}function h1(e,t){return e(t)}function m1(){}var id=!1;function g1(e,t,n){if(id)return e(t,n);id=!0;try{return h1(e,t,n)}finally{id=!1,(Is!==null||$s!==null)&&(m1(),p1())}}function pa(e,t){var n=e.stateNode;if(n===null)return null;var r=lc(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(I(231,t,typeof n));return n}var bf=!1;if(dr)try{var Ao={};Object.defineProperty(Ao,"passive",{get:function(){bf=!0}}),window.addEventListener("test",Ao,Ao),window.removeEventListener("test",Ao,Ao)}catch{bf=!1}function jT(e,t,n,r,i,s,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var Yo=!1,mu=null,gu=!1,Sf=null,PT={onError:function(e){Yo=!0,mu=e}};function AT(e,t,n,r,i,s,o,a,l){Yo=!1,mu=null,jT.apply(PT,arguments)}function RT(e,t,n,r,i,s,o,a,l){if(AT.apply(this,arguments),Yo){if(Yo){var u=mu;Yo=!1,mu=null}else throw Error(I(198));gu||(gu=!0,Sf=u)}}function es(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 v1(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 Lg(e){if(es(e)!==e)throw Error(I(188))}function OT(e){var t=e.alternate;if(!t){if(t=es(e),t===null)throw Error(I(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 Lg(i),e;if(s===r)return Lg(i),t;s=s.sibling}throw Error(I(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(I(189))}}if(n.alternate!==r)throw Error(I(190))}if(n.tag!==3)throw Error(I(188));return n.stateNode.current===n?e:t}function y1(e){return e=OT(e),e!==null?x1(e):null}function x1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=x1(e);if(t!==null)return t;e=e.sibling}return null}var w1=qt.unstable_scheduleCallback,Ig=qt.unstable_cancelCallback,DT=qt.unstable_shouldYield,MT=qt.unstable_requestPaint,Be=qt.unstable_now,FT=qt.unstable_getCurrentPriorityLevel,wh=qt.unstable_ImmediatePriority,b1=qt.unstable_UserBlockingPriority,vu=qt.unstable_NormalPriority,NT=qt.unstable_LowPriority,S1=qt.unstable_IdlePriority,ic=null,zn=null;function LT(e){if(zn&&typeof zn.onCommitFiberRoot=="function")try{zn.onCommitFiberRoot(ic,e,void 0,(e.current.flags&128)===128)}catch{}}var Cn=Math.clz32?Math.clz32:BT,IT=Math.log,$T=Math.LN2;function BT(e){return e>>>=0,e===0?32:31-(IT(e)/$T|0)|0}var vl=64,yl=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 yu(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-Cn(t),i=1<<n,r|=e[n],t&=~i;return r}function zT(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 VT(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-Cn(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=zT(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function kf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function k1(){var e=vl;return vl<<=1,!(vl&4194240)&&(vl=64),e}function sd(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Qa(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Cn(t),e[t]=n}function UT(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-Cn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function bh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Cn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var me=0;function C1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var T1,Sh,E1,_1,j1,Cf=!1,xl=[],Ur=null,Hr=null,Wr=null,ha=new Map,ma=new Map,jr=[],HT="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 $g(e,t){switch(e){case"focusin":case"focusout":Ur=null;break;case"dragenter":case"dragleave":Hr=null;break;case"mouseover":case"mouseout":Wr=null;break;case"pointerover":case"pointerout":ha.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ma.delete(t.pointerId)}}function Ro(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Ka(t),t!==null&&Sh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function WT(e,t,n,r,i){switch(t){case"focusin":return Ur=Ro(Ur,e,t,n,r,i),!0;case"dragenter":return Hr=Ro(Hr,e,t,n,r,i),!0;case"mouseover":return Wr=Ro(Wr,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return ha.set(s,Ro(ha.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,ma.set(s,Ro(ma.get(s)||null,e,t,n,r,i)),!0}return!1}function P1(e){var t=Ti(e.target);if(t!==null){var n=es(t);if(n!==null){if(t=n.tag,t===13){if(t=v1(n),t!==null){e.blockedOn=t,j1(e.priority,function(){E1(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=Tf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);xf=r,n.target.dispatchEvent(r),xf=null}else return t=Ka(n),t!==null&&Sh(t),e.blockedOn=n,!1;t.shift()}return!0}function Bg(e,t,n){Wl(e)&&n.delete(t)}function qT(){Cf=!1,Ur!==null&&Wl(Ur)&&(Ur=null),Hr!==null&&Wl(Hr)&&(Hr=null),Wr!==null&&Wl(Wr)&&(Wr=null),ha.forEach(Bg),ma.forEach(Bg)}function Oo(e,t){e.blockedOn===t&&(e.blockedOn=null,Cf||(Cf=!0,qt.unstable_scheduleCallback(qt.unstable_NormalPriority,qT)))}function ga(e){function t(i){return Oo(i,e)}if(0<xl.length){Oo(xl[0],e);for(var n=1;n<xl.length;n++){var r=xl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Ur!==null&&Oo(Ur,e),Hr!==null&&Oo(Hr,e),Wr!==null&&Oo(Wr,e),ha.forEach(t),ma.forEach(t),n=0;n<jr.length;n++)r=jr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<jr.length&&(n=jr[0],n.blockedOn===null);)P1(n),n.blockedOn===null&&jr.shift()}var Bs=gr.ReactCurrentBatchConfig,xu=!0;function GT(e,t,n,r){var i=me,s=Bs.transition;Bs.transition=null;try{me=1,kh(e,t,n,r)}finally{me=i,Bs.transition=s}}function QT(e,t,n,r){var i=me,s=Bs.transition;Bs.transition=null;try{me=4,kh(e,t,n,r)}finally{me=i,Bs.transition=s}}function kh(e,t,n,r){if(xu){var i=Tf(e,t,n,r);if(i===null)md(e,t,r,wu,n),$g(e,r);else if(WT(i,e,t,n,r))r.stopPropagation();else if($g(e,r),t&4&&-1<HT.indexOf(e)){for(;i!==null;){var s=Ka(i);if(s!==null&&T1(s),s=Tf(e,t,n,r),s===null&&md(e,t,r,wu,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else md(e,t,r,null,n)}}var wu=null;function Tf(e,t,n,r){if(wu=null,e=xh(r),e=Ti(e),e!==null)if(t=es(e),t===null)e=null;else if(n=t.tag,n===13){if(e=v1(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 wu=e,null}function A1(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(FT()){case wh:return 1;case b1:return 4;case vu:case NT:return 16;case S1:return 536870912;default:return 16}default:return 16}}var $r=null,Ch=null,ql=null;function R1(){if(ql)return ql;var e,t=Ch,n=t.length,r,i="value"in $r?$r.value:$r.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 ql=i.slice(e,1<r?1-r:void 0)}function Gl(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 wl(){return!0}function zg(){return!1}function Qt(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)?wl:zg,this.isPropagationStopped=zg,this}return Oe(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=wl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=wl)},persist:function(){},isPersistent:wl}),t}var xo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Th=Qt(xo),Ya=Oe({},xo,{view:0,detail:0}),YT=Qt(Ya),od,ad,Do,sc=Oe({},Ya,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Eh,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!==Do&&(Do&&e.type==="mousemove"?(od=e.screenX-Do.screenX,ad=e.screenY-Do.screenY):ad=od=0,Do=e),od)},movementY:function(e){return"movementY"in e?e.movementY:ad}}),Vg=Qt(sc),KT=Oe({},sc,{dataTransfer:0}),XT=Qt(KT),ZT=Oe({},Ya,{relatedTarget:0}),ld=Qt(ZT),JT=Oe({},xo,{animationName:0,elapsedTime:0,pseudoElement:0}),eE=Qt(JT),tE=Oe({},xo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),nE=Qt(tE),rE=Oe({},xo,{data:0}),Ug=Qt(rE),iE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},sE={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"},oE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function aE(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=oE[e])?!!t[e]:!1}function Eh(){return aE}var lE=Oe({},Ya,{key:function(e){if(e.key){var t=iE[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Gl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?sE[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Eh,charCode:function(e){return e.type==="keypress"?Gl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Gl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),uE=Qt(lE),cE=Oe({},sc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Hg=Qt(cE),dE=Oe({},Ya,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Eh}),fE=Qt(dE),pE=Oe({},xo,{propertyName:0,elapsedTime:0,pseudoElement:0}),hE=Qt(pE),mE=Oe({},sc,{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}),gE=Qt(mE),vE=[9,13,27,32],_h=dr&&"CompositionEvent"in window,Ko=null;dr&&"documentMode"in document&&(Ko=document.documentMode);var yE=dr&&"TextEvent"in window&&!Ko,O1=dr&&(!_h||Ko&&8<Ko&&11>=Ko),Wg=" ",qg=!1;function D1(e,t){switch(e){case"keyup":return vE.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function M1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var bs=!1;function xE(e,t){switch(e){case"compositionend":return M1(t);case"keypress":return t.which!==32?null:(qg=!0,Wg);case"textInput":return e=t.data,e===Wg&&qg?null:e;default:return null}}function wE(e,t){if(bs)return e==="compositionend"||!_h&&D1(e,t)?(e=R1(),ql=Ch=$r=null,bs=!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 O1&&t.locale!=="ko"?null:t.data;default:return null}}var bE={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 Gg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!bE[e.type]:t==="textarea"}function F1(e,t,n,r){f1(r),t=bu(t,"onChange"),0<t.length&&(n=new Th("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Xo=null,va=null;function SE(e){q1(e,0)}function oc(e){var t=Cs(e);if(s1(t))return e}function kE(e,t){if(e==="change")return t}var N1=!1;if(dr){var ud;if(dr){var cd="oninput"in document;if(!cd){var Qg=document.createElement("div");Qg.setAttribute("oninput","return;"),cd=typeof Qg.oninput=="function"}ud=cd}else ud=!1;N1=ud&&(!document.documentMode||9<document.documentMode)}function Yg(){Xo&&(Xo.detachEvent("onpropertychange",L1),va=Xo=null)}function L1(e){if(e.propertyName==="value"&&oc(va)){var t=[];F1(t,va,e,xh(e)),g1(SE,t)}}function CE(e,t,n){e==="focusin"?(Yg(),Xo=t,va=n,Xo.attachEvent("onpropertychange",L1)):e==="focusout"&&Yg()}function TE(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return oc(va)}function EE(e,t){if(e==="click")return oc(t)}function _E(e,t){if(e==="input"||e==="change")return oc(t)}function jE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var En=typeof Object.is=="function"?Object.is:jE;function ya(e,t){if(En(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!af.call(t,i)||!En(e[i],t[i]))return!1}return!0}function Kg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Xg(e,t){var n=Kg(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=Kg(n)}}function I1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?I1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function $1(){for(var e=window,t=hu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=hu(e.document)}return t}function jh(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 PE(e){var t=$1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&I1(n.ownerDocument.documentElement,n)){if(r!==null&&jh(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=Xg(n,s);var o=Xg(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 AE=dr&&"documentMode"in document&&11>=document.documentMode,Ss=null,Ef=null,Zo=null,_f=!1;function Zg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;_f||Ss==null||Ss!==hu(r)||(r=Ss,"selectionStart"in r&&jh(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}),Zo&&ya(Zo,r)||(Zo=r,r=bu(Ef,"onSelect"),0<r.length&&(t=new Th("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ss)))}function bl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ks={animationend:bl("Animation","AnimationEnd"),animationiteration:bl("Animation","AnimationIteration"),animationstart:bl("Animation","AnimationStart"),transitionend:bl("Transition","TransitionEnd")},dd={},B1={};dr&&(B1=document.createElement("div").style,"AnimationEvent"in window||(delete ks.animationend.animation,delete ks.animationiteration.animation,delete ks.animationstart.animation),"TransitionEvent"in window||delete ks.transitionend.transition);function ac(e){if(dd[e])return dd[e];if(!ks[e])return e;var t=ks[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in B1)return dd[e]=t[n];return e}var z1=ac("animationend"),V1=ac("animationiteration"),U1=ac("animationstart"),H1=ac("transitionend"),W1=new Map,Jg="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 ai(e,t){W1.set(e,t),Ji(t,[e])}for(var fd=0;fd<Jg.length;fd++){var pd=Jg[fd],RE=pd.toLowerCase(),OE=pd[0].toUpperCase()+pd.slice(1);ai(RE,"on"+OE)}ai(z1,"onAnimationEnd");ai(V1,"onAnimationIteration");ai(U1,"onAnimationStart");ai("dblclick","onDoubleClick");ai("focusin","onFocus");ai("focusout","onBlur");ai(H1,"onTransitionEnd");ro("onMouseEnter",["mouseout","mouseover"]);ro("onMouseLeave",["mouseout","mouseover"]);ro("onPointerEnter",["pointerout","pointerover"]);ro("onPointerLeave",["pointerout","pointerover"]);Ji("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ji("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ji("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ji("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ji("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ji("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Uo="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(" "),DE=new Set("cancel close invalid load scroll toggle".split(" ").concat(Uo));function ev(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,RT(r,t,void 0,e),e.currentTarget=null}function q1(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;ev(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;ev(i,a,u),s=l}}}if(gu)throw e=Sf,gu=!1,Sf=null,e}function Ce(e,t){var n=t[Of];n===void 0&&(n=t[Of]=new Set);var r=e+"__bubble";n.has(r)||(G1(t,e,2,!1),n.add(r))}function hd(e,t,n){var r=0;t&&(r|=4),G1(n,e,r,t)}var Sl="_reactListening"+Math.random().toString(36).slice(2);function xa(e){if(!e[Sl]){e[Sl]=!0,e1.forEach(function(n){n!=="selectionchange"&&(DE.has(n)||hd(n,!1,e),hd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Sl]||(t[Sl]=!0,hd("selectionchange",!1,t))}}function G1(e,t,n,r){switch(A1(t)){case 1:var i=GT;break;case 4:i=QT;break;default:i=kh}n=i.bind(null,t,n,e),i=void 0,!bf||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 md(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=Ti(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}g1(function(){var u=s,d=xh(n),c=[];e:{var f=W1.get(e);if(f!==void 0){var h=Th,m=e;switch(e){case"keypress":if(Gl(n)===0)break e;case"keydown":case"keyup":h=uE;break;case"focusin":m="focus",h=ld;break;case"focusout":m="blur",h=ld;break;case"beforeblur":case"afterblur":h=ld;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=Vg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=XT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=fE;break;case z1:case V1:case U1:h=eE;break;case H1:h=hE;break;case"scroll":h=YT;break;case"wheel":h=gE;break;case"copy":case"cut":case"paste":h=nE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Hg}var p=(t&4)!==0,w=!p&&e==="scroll",g=p?f!==null?f+"Capture":null:f;p=[];for(var x=u,b;x!==null;){b=x;var T=b.stateNode;if(b.tag===5&&T!==null&&(b=T,g!==null&&(T=pa(x,g),T!=null&&p.push(wa(x,T,b)))),w)break;x=x.return}0<p.length&&(f=new h(f,m,null,n,d),c.push({event:f,listeners:p}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&n!==xf&&(m=n.relatedTarget||n.fromElement)&&(Ti(m)||m[fr]))break e;if((h||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,h?(m=n.relatedTarget||n.toElement,h=u,m=m?Ti(m):null,m!==null&&(w=es(m),m!==w||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=u),h!==m)){if(p=Vg,T="onMouseLeave",g="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(p=Hg,T="onPointerLeave",g="onPointerEnter",x="pointer"),w=h==null?f:Cs(h),b=m==null?f:Cs(m),f=new p(T,x+"leave",h,n,d),f.target=w,f.relatedTarget=b,T=null,Ti(d)===u&&(p=new p(g,x+"enter",m,n,d),p.target=b,p.relatedTarget=w,T=p),w=T,h&&m)t:{for(p=h,g=m,x=0,b=p;b;b=gs(b))x++;for(b=0,T=g;T;T=gs(T))b++;for(;0<x-b;)p=gs(p),x--;for(;0<b-x;)g=gs(g),b--;for(;x--;){if(p===g||g!==null&&p===g.alternate)break t;p=gs(p),g=gs(g)}p=null}else p=null;h!==null&&tv(c,f,h,p,!1),m!==null&&w!==null&&tv(c,w,m,p,!0)}}e:{if(f=u?Cs(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var E=kE;else if(Gg(f))if(N1)E=_E;else{E=TE;var C=CE}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(E=EE);if(E&&(E=E(e,u))){F1(c,E,n,d);break e}C&&C(e,f,u),e==="focusout"&&(C=f._wrapperState)&&C.controlled&&f.type==="number"&&hf(f,"number",f.value)}switch(C=u?Cs(u):window,e){case"focusin":(Gg(C)||C.contentEditable==="true")&&(Ss=C,Ef=u,Zo=null);break;case"focusout":Zo=Ef=Ss=null;break;case"mousedown":_f=!0;break;case"contextmenu":case"mouseup":case"dragend":_f=!1,Zg(c,n,d);break;case"selectionchange":if(AE)break;case"keydown":case"keyup":Zg(c,n,d)}var _;if(_h)e:{switch(e){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else bs?D1(e,n)&&(A="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(A="onCompositionStart");A&&(O1&&n.locale!=="ko"&&(bs||A!=="onCompositionStart"?A==="onCompositionEnd"&&bs&&(_=R1()):($r=d,Ch="value"in $r?$r.value:$r.textContent,bs=!0)),C=bu(u,A),0<C.length&&(A=new Ug(A,e,null,n,d),c.push({event:A,listeners:C}),_?A.data=_:(_=M1(n),_!==null&&(A.data=_)))),(_=yE?xE(e,n):wE(e,n))&&(u=bu(u,"onBeforeInput"),0<u.length&&(d=new Ug("onBeforeInput","beforeinput",null,n,d),c.push({event:d,listeners:u}),d.data=_))}q1(c,t)})}function wa(e,t,n){return{instance:e,listener:t,currentTarget:n}}function bu(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=pa(e,n),s!=null&&r.unshift(wa(e,s,i)),s=pa(e,t),s!=null&&r.push(wa(e,s,i))),e=e.return}return r}function gs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function tv(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=pa(n,s),l!=null&&o.unshift(wa(n,l,a))):i||(l=pa(n,s),l!=null&&o.push(wa(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var ME=/\r\n?/g,FE=/\u0000|\uFFFD/g;function nv(e){return(typeof e=="string"?e:""+e).replace(ME,`
38
+ `).replace(FE,"")}function kl(e,t,n){if(t=nv(t),nv(e)!==t&&n)throw Error(I(425))}function Su(){}var jf=null,Pf=null;function Af(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 Rf=typeof setTimeout=="function"?setTimeout:void 0,NE=typeof clearTimeout=="function"?clearTimeout:void 0,rv=typeof Promise=="function"?Promise:void 0,LE=typeof queueMicrotask=="function"?queueMicrotask:typeof rv<"u"?function(e){return rv.resolve(null).then(e).catch(IE)}:Rf;function IE(e){setTimeout(function(){throw e})}function gd(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),ga(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);ga(t)}function qr(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 iv(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 wo=Math.random().toString(36).slice(2),$n="__reactFiber$"+wo,ba="__reactProps$"+wo,fr="__reactContainer$"+wo,Of="__reactEvents$"+wo,$E="__reactListeners$"+wo,BE="__reactHandles$"+wo;function Ti(e){var t=e[$n];if(t)return t;for(var n=e.parentNode;n;){if(t=n[fr]||n[$n]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=iv(e);e!==null;){if(n=e[$n])return n;e=iv(e)}return t}e=n,n=e.parentNode}return null}function Ka(e){return e=e[$n]||e[fr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Cs(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(I(33))}function lc(e){return e[ba]||null}var Df=[],Ts=-1;function li(e){return{current:e}}function Ee(e){0>Ts||(e.current=Df[Ts],Df[Ts]=null,Ts--)}function Se(e,t){Ts++,Df[Ts]=e.current,e.current=t}var ri={},mt=li(ri),Mt=li(!1),Hi=ri;function io(e,t){var n=e.type.contextTypes;if(!n)return ri;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 Ft(e){return e=e.childContextTypes,e!=null}function ku(){Ee(Mt),Ee(mt)}function sv(e,t,n){if(mt.current!==ri)throw Error(I(168));Se(mt,t),Se(Mt,n)}function Q1(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(I(108,CT(e)||"Unknown",i));return Oe({},n,r)}function Cu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ri,Hi=mt.current,Se(mt,e),Se(Mt,Mt.current),!0}function ov(e,t,n){var r=e.stateNode;if(!r)throw Error(I(169));n?(e=Q1(e,t,Hi),r.__reactInternalMemoizedMergedChildContext=e,Ee(Mt),Ee(mt),Se(mt,e)):Ee(Mt),Se(Mt,n)}var rr=null,uc=!1,vd=!1;function Y1(e){rr===null?rr=[e]:rr.push(e)}function zE(e){uc=!0,Y1(e)}function ui(){if(!vd&&rr!==null){vd=!0;var e=0,t=me;try{var n=rr;for(me=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}rr=null,uc=!1}catch(i){throw rr!==null&&(rr=rr.slice(e+1)),w1(wh,ui),i}finally{me=t,vd=!1}}return null}var Es=[],_s=0,Tu=null,Eu=0,rn=[],sn=0,Wi=null,or=1,ar="";function xi(e,t){Es[_s++]=Eu,Es[_s++]=Tu,Tu=e,Eu=t}function K1(e,t,n){rn[sn++]=or,rn[sn++]=ar,rn[sn++]=Wi,Wi=e;var r=or;e=ar;var i=32-Cn(r)-1;r&=~(1<<i),n+=1;var s=32-Cn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,or=1<<32-Cn(t)+i|n<<i|r,ar=s+e}else or=1<<s|n<<i|r,ar=e}function Ph(e){e.return!==null&&(xi(e,1),K1(e,1,0))}function Ah(e){for(;e===Tu;)Tu=Es[--_s],Es[_s]=null,Eu=Es[--_s],Es[_s]=null;for(;e===Wi;)Wi=rn[--sn],rn[sn]=null,ar=rn[--sn],rn[sn]=null,or=rn[--sn],rn[sn]=null}var Wt=null,Vt=null,_e=!1,Sn=null;function X1(e,t){var n=an(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 av(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,Wt=e,Vt=qr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Wt=e,Vt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Wi!==null?{id:or,overflow:ar}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=an(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Wt=e,Vt=null,!0):!1;default:return!1}}function Mf(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ff(e){if(_e){var t=Vt;if(t){var n=t;if(!av(e,t)){if(Mf(e))throw Error(I(418));t=qr(n.nextSibling);var r=Wt;t&&av(e,t)?X1(r,n):(e.flags=e.flags&-4097|2,_e=!1,Wt=e)}}else{if(Mf(e))throw Error(I(418));e.flags=e.flags&-4097|2,_e=!1,Wt=e}}}function lv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Wt=e}function Cl(e){if(e!==Wt)return!1;if(!_e)return lv(e),_e=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Af(e.type,e.memoizedProps)),t&&(t=Vt)){if(Mf(e))throw Z1(),Error(I(418));for(;t;)X1(e,t),t=qr(t.nextSibling)}if(lv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(I(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Vt=qr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Vt=null}}else Vt=Wt?qr(e.stateNode.nextSibling):null;return!0}function Z1(){for(var e=Vt;e;)e=qr(e.nextSibling)}function so(){Vt=Wt=null,_e=!1}function Rh(e){Sn===null?Sn=[e]:Sn.push(e)}var VE=gr.ReactCurrentBatchConfig;function Mo(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(I(309));var r=n.stateNode}if(!r)throw Error(I(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(I(284));if(!n._owner)throw Error(I(290,e))}return e}function Tl(e,t){throw e=Object.prototype.toString.call(t),Error(I(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function uv(e){var t=e._init;return t(e._payload)}function J1(e){function t(g,x){if(e){var b=g.deletions;b===null?(g.deletions=[x],g.flags|=16):b.push(x)}}function n(g,x){if(!e)return null;for(;x!==null;)t(g,x),x=x.sibling;return null}function r(g,x){for(g=new Map;x!==null;)x.key!==null?g.set(x.key,x):g.set(x.index,x),x=x.sibling;return g}function i(g,x){return g=Kr(g,x),g.index=0,g.sibling=null,g}function s(g,x,b){return g.index=b,e?(b=g.alternate,b!==null?(b=b.index,b<x?(g.flags|=2,x):b):(g.flags|=2,x)):(g.flags|=1048576,x)}function o(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,x,b,T){return x===null||x.tag!==6?(x=Cd(b,g.mode,T),x.return=g,x):(x=i(x,b),x.return=g,x)}function l(g,x,b,T){var E=b.type;return E===ws?d(g,x,b.props.children,T,b.key):x!==null&&(x.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Tr&&uv(E)===x.type)?(T=i(x,b.props),T.ref=Mo(g,x,b),T.return=g,T):(T=eu(b.type,b.key,b.props,null,g.mode,T),T.ref=Mo(g,x,b),T.return=g,T)}function u(g,x,b,T){return x===null||x.tag!==4||x.stateNode.containerInfo!==b.containerInfo||x.stateNode.implementation!==b.implementation?(x=Td(b,g.mode,T),x.return=g,x):(x=i(x,b.children||[]),x.return=g,x)}function d(g,x,b,T,E){return x===null||x.tag!==7?(x=Bi(b,g.mode,T,E),x.return=g,x):(x=i(x,b),x.return=g,x)}function c(g,x,b){if(typeof x=="string"&&x!==""||typeof x=="number")return x=Cd(""+x,g.mode,b),x.return=g,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case hl:return b=eu(x.type,x.key,x.props,null,g.mode,b),b.ref=Mo(g,null,x),b.return=g,b;case xs:return x=Td(x,g.mode,b),x.return=g,x;case Tr:var T=x._init;return c(g,T(x._payload),b)}if(zo(x)||Po(x))return x=Bi(x,g.mode,b,null),x.return=g,x;Tl(g,x)}return null}function f(g,x,b,T){var E=x!==null?x.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return E!==null?null:a(g,x,""+b,T);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case hl:return b.key===E?l(g,x,b,T):null;case xs:return b.key===E?u(g,x,b,T):null;case Tr:return E=b._init,f(g,x,E(b._payload),T)}if(zo(b)||Po(b))return E!==null?null:d(g,x,b,T,null);Tl(g,b)}return null}function h(g,x,b,T,E){if(typeof T=="string"&&T!==""||typeof T=="number")return g=g.get(b)||null,a(x,g,""+T,E);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case hl:return g=g.get(T.key===null?b:T.key)||null,l(x,g,T,E);case xs:return g=g.get(T.key===null?b:T.key)||null,u(x,g,T,E);case Tr:var C=T._init;return h(g,x,b,C(T._payload),E)}if(zo(T)||Po(T))return g=g.get(b)||null,d(x,g,T,E,null);Tl(x,T)}return null}function m(g,x,b,T){for(var E=null,C=null,_=x,A=x=0,F=null;_!==null&&A<b.length;A++){_.index>A?(F=_,_=null):F=_.sibling;var M=f(g,_,b[A],T);if(M===null){_===null&&(_=F);break}e&&_&&M.alternate===null&&t(g,_),x=s(M,x,A),C===null?E=M:C.sibling=M,C=M,_=F}if(A===b.length)return n(g,_),_e&&xi(g,A),E;if(_===null){for(;A<b.length;A++)_=c(g,b[A],T),_!==null&&(x=s(_,x,A),C===null?E=_:C.sibling=_,C=_);return _e&&xi(g,A),E}for(_=r(g,_);A<b.length;A++)F=h(_,g,A,b[A],T),F!==null&&(e&&F.alternate!==null&&_.delete(F.key===null?A:F.key),x=s(F,x,A),C===null?E=F:C.sibling=F,C=F);return e&&_.forEach(function(R){return t(g,R)}),_e&&xi(g,A),E}function p(g,x,b,T){var E=Po(b);if(typeof E!="function")throw Error(I(150));if(b=E.call(b),b==null)throw Error(I(151));for(var C=E=null,_=x,A=x=0,F=null,M=b.next();_!==null&&!M.done;A++,M=b.next()){_.index>A?(F=_,_=null):F=_.sibling;var R=f(g,_,M.value,T);if(R===null){_===null&&(_=F);break}e&&_&&R.alternate===null&&t(g,_),x=s(R,x,A),C===null?E=R:C.sibling=R,C=R,_=F}if(M.done)return n(g,_),_e&&xi(g,A),E;if(_===null){for(;!M.done;A++,M=b.next())M=c(g,M.value,T),M!==null&&(x=s(M,x,A),C===null?E=M:C.sibling=M,C=M);return _e&&xi(g,A),E}for(_=r(g,_);!M.done;A++,M=b.next())M=h(_,g,A,M.value,T),M!==null&&(e&&M.alternate!==null&&_.delete(M.key===null?A:M.key),x=s(M,x,A),C===null?E=M:C.sibling=M,C=M);return e&&_.forEach(function($){return t(g,$)}),_e&&xi(g,A),E}function w(g,x,b,T){if(typeof b=="object"&&b!==null&&b.type===ws&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case hl:e:{for(var E=b.key,C=x;C!==null;){if(C.key===E){if(E=b.type,E===ws){if(C.tag===7){n(g,C.sibling),x=i(C,b.props.children),x.return=g,g=x;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Tr&&uv(E)===C.type){n(g,C.sibling),x=i(C,b.props),x.ref=Mo(g,C,b),x.return=g,g=x;break e}n(g,C);break}else t(g,C);C=C.sibling}b.type===ws?(x=Bi(b.props.children,g.mode,T,b.key),x.return=g,g=x):(T=eu(b.type,b.key,b.props,null,g.mode,T),T.ref=Mo(g,x,b),T.return=g,g=T)}return o(g);case xs:e:{for(C=b.key;x!==null;){if(x.key===C)if(x.tag===4&&x.stateNode.containerInfo===b.containerInfo&&x.stateNode.implementation===b.implementation){n(g,x.sibling),x=i(x,b.children||[]),x.return=g,g=x;break e}else{n(g,x);break}else t(g,x);x=x.sibling}x=Td(b,g.mode,T),x.return=g,g=x}return o(g);case Tr:return C=b._init,w(g,x,C(b._payload),T)}if(zo(b))return m(g,x,b,T);if(Po(b))return p(g,x,b,T);Tl(g,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,x!==null&&x.tag===6?(n(g,x.sibling),x=i(x,b),x.return=g,g=x):(n(g,x),x=Cd(b,g.mode,T),x.return=g,g=x),o(g)):n(g,x)}return w}var oo=J1(!0),ew=J1(!1),_u=li(null),ju=null,js=null,Oh=null;function Dh(){Oh=js=ju=null}function Mh(e){var t=_u.current;Ee(_u),e._currentValue=t}function Nf(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 zs(e,t){ju=e,Oh=js=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Rt=!0),e.firstContext=null)}function cn(e){var t=e._currentValue;if(Oh!==e)if(e={context:e,memoizedValue:t,next:null},js===null){if(ju===null)throw Error(I(308));js=e,ju.dependencies={lanes:0,firstContext:e}}else js=js.next=e;return t}var Ei=null;function Fh(e){Ei===null?Ei=[e]:Ei.push(e)}function tw(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Fh(t)):(n.next=i.next,i.next=n),t.interleaved=n,pr(e,r)}function pr(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 Er=!1;function Nh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function nw(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 ur(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Gr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,fe&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,pr(e,n)}return i=r.interleaved,i===null?(t.next=t,Fh(r)):(t.next=i.next,i.next=t),r.interleaved=t,pr(e,n)}function Ql(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,bh(e,n)}}function cv(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 Pu(e,t,n,r){var i=e.updateQueue;Er=!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 d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=l))}if(s!==null){var c=i.baseState;o=0,d=u=l=null,a=s;do{var f=a.lane,h=a.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,p=a;switch(f=t,h=n,p.tag){case 1:if(m=p.payload,typeof m=="function"){c=m.call(h,c,f);break e}c=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=p.payload,f=typeof m=="function"?m.call(h,c,f):m,f==null)break e;c=Oe({},c,f);break e;case 2:Er=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[a]:f.push(a))}else h={eventTime:h,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=h,l=c):d=d.next=h,o|=f;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;f=a,a=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(d===null&&(l=c),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=d,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);Gi|=o,e.lanes=o,e.memoizedState=c}}function dv(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(I(191,i));i.call(r)}}}var Xa={},Vn=li(Xa),Sa=li(Xa),ka=li(Xa);function _i(e){if(e===Xa)throw Error(I(174));return e}function Lh(e,t){switch(Se(ka,t),Se(Sa,e),Se(Vn,Xa),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:gf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=gf(t,e)}Ee(Vn),Se(Vn,t)}function ao(){Ee(Vn),Ee(Sa),Ee(ka)}function rw(e){_i(ka.current);var t=_i(Vn.current),n=gf(t,e.type);t!==n&&(Se(Sa,e),Se(Vn,n))}function Ih(e){Sa.current===e&&(Ee(Vn),Ee(Sa))}var Pe=li(0);function Au(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 yd=[];function $h(){for(var e=0;e<yd.length;e++)yd[e]._workInProgressVersionPrimary=null;yd.length=0}var Yl=gr.ReactCurrentDispatcher,xd=gr.ReactCurrentBatchConfig,qi=0,Re=null,He=null,Xe=null,Ru=!1,Jo=!1,Ca=0,UE=0;function ut(){throw Error(I(321))}function Bh(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!En(e[n],t[n]))return!1;return!0}function zh(e,t,n,r,i,s){if(qi=s,Re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Yl.current=e===null||e.memoizedState===null?GE:QE,e=n(r,i),Jo){s=0;do{if(Jo=!1,Ca=0,25<=s)throw Error(I(301));s+=1,Xe=He=null,t.updateQueue=null,Yl.current=YE,e=n(r,i)}while(Jo)}if(Yl.current=Ou,t=He!==null&&He.next!==null,qi=0,Xe=He=Re=null,Ru=!1,t)throw Error(I(300));return e}function Vh(){var e=Ca!==0;return Ca=0,e}function Dn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xe===null?Re.memoizedState=Xe=e:Xe=Xe.next=e,Xe}function dn(){if(He===null){var e=Re.alternate;e=e!==null?e.memoizedState:null}else e=He.next;var t=Xe===null?Re.memoizedState:Xe.next;if(t!==null)Xe=t,He=e;else{if(e===null)throw Error(I(310));He=e,e={memoizedState:He.memoizedState,baseState:He.baseState,baseQueue:He.baseQueue,queue:He.queue,next:null},Xe===null?Re.memoizedState=Xe=e:Xe=Xe.next=e}return Xe}function Ta(e,t){return typeof t=="function"?t(e):t}function wd(e){var t=dn(),n=t.queue;if(n===null)throw Error(I(311));n.lastRenderedReducer=e;var r=He,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 d=u.lane;if((qi&d)===d)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:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=c,o=r):l=l.next=c,Re.lanes|=d,Gi|=d}u=u.next}while(u!==null&&u!==s);l===null?o=r:l.next=a,En(r,t.memoizedState)||(Rt=!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,Re.lanes|=s,Gi|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function bd(e){var t=dn(),n=t.queue;if(n===null)throw Error(I(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);En(s,t.memoizedState)||(Rt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function iw(){}function sw(e,t){var n=Re,r=dn(),i=t(),s=!En(r.memoizedState,i);if(s&&(r.memoizedState=i,Rt=!0),r=r.queue,Uh(lw.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Xe!==null&&Xe.memoizedState.tag&1){if(n.flags|=2048,Ea(9,aw.bind(null,n,r,i,t),void 0,null),Ze===null)throw Error(I(349));qi&30||ow(n,t,i)}return i}function ow(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Re.updateQueue,t===null?(t={lastEffect:null,stores:null},Re.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function aw(e,t,n,r){t.value=n,t.getSnapshot=r,uw(t)&&cw(e)}function lw(e,t,n){return n(function(){uw(t)&&cw(e)})}function uw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!En(e,n)}catch{return!0}}function cw(e){var t=pr(e,1);t!==null&&Tn(t,e,1,-1)}function fv(e){var t=Dn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:e},t.queue=e,e=e.dispatch=qE.bind(null,Re,e),[t.memoizedState,e]}function Ea(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Re.updateQueue,t===null?(t={lastEffect:null,stores:null},Re.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 dw(){return dn().memoizedState}function Kl(e,t,n,r){var i=Dn();Re.flags|=e,i.memoizedState=Ea(1|t,n,void 0,r===void 0?null:r)}function cc(e,t,n,r){var i=dn();r=r===void 0?null:r;var s=void 0;if(He!==null){var o=He.memoizedState;if(s=o.destroy,r!==null&&Bh(r,o.deps)){i.memoizedState=Ea(t,n,s,r);return}}Re.flags|=e,i.memoizedState=Ea(1|t,n,s,r)}function pv(e,t){return Kl(8390656,8,e,t)}function Uh(e,t){return cc(2048,8,e,t)}function fw(e,t){return cc(4,2,e,t)}function pw(e,t){return cc(4,4,e,t)}function hw(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 mw(e,t,n){return n=n!=null?n.concat([e]):null,cc(4,4,hw.bind(null,t,e),n)}function Hh(){}function gw(e,t){var n=dn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Bh(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function vw(e,t){var n=dn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Bh(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function yw(e,t,n){return qi&21?(En(n,t)||(n=k1(),Re.lanes|=n,Gi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Rt=!0),e.memoizedState=n)}function HE(e,t){var n=me;me=n!==0&&4>n?n:4,e(!0);var r=xd.transition;xd.transition={};try{e(!1),t()}finally{me=n,xd.transition=r}}function xw(){return dn().memoizedState}function WE(e,t,n){var r=Yr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ww(e))bw(t,n);else if(n=tw(e,t,n,r),n!==null){var i=wt();Tn(n,e,r,i),Sw(n,t,r)}}function qE(e,t,n){var r=Yr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ww(e))bw(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,En(a,o)){var l=t.interleaved;l===null?(i.next=i,Fh(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=tw(e,t,i,r),n!==null&&(i=wt(),Tn(n,e,r,i),Sw(n,t,r))}}function ww(e){var t=e.alternate;return e===Re||t!==null&&t===Re}function bw(e,t){Jo=Ru=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Sw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,bh(e,n)}}var Ou={readContext:cn,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useInsertionEffect:ut,useLayoutEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useMutableSource:ut,useSyncExternalStore:ut,useId:ut,unstable_isNewReconciler:!1},GE={readContext:cn,useCallback:function(e,t){return Dn().memoizedState=[e,t===void 0?null:t],e},useContext:cn,useEffect:pv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Kl(4194308,4,hw.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=Dn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Dn();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=WE.bind(null,Re,e),[r.memoizedState,e]},useRef:function(e){var t=Dn();return e={current:e},t.memoizedState=e},useState:fv,useDebugValue:Hh,useDeferredValue:function(e){return Dn().memoizedState=e},useTransition:function(){var e=fv(!1),t=e[0];return e=HE.bind(null,e[1]),Dn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Re,i=Dn();if(_e){if(n===void 0)throw Error(I(407));n=n()}else{if(n=t(),Ze===null)throw Error(I(349));qi&30||ow(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,pv(lw.bind(null,r,s,e),[e]),r.flags|=2048,Ea(9,aw.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Dn(),t=Ze.identifierPrefix;if(_e){var n=ar,r=or;n=(r&~(1<<32-Cn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ca++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=UE++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},QE={readContext:cn,useCallback:gw,useContext:cn,useEffect:Uh,useImperativeHandle:mw,useInsertionEffect:fw,useLayoutEffect:pw,useMemo:vw,useReducer:wd,useRef:dw,useState:function(){return wd(Ta)},useDebugValue:Hh,useDeferredValue:function(e){var t=dn();return yw(t,He.memoizedState,e)},useTransition:function(){var e=wd(Ta)[0],t=dn().memoizedState;return[e,t]},useMutableSource:iw,useSyncExternalStore:sw,useId:xw,unstable_isNewReconciler:!1},YE={readContext:cn,useCallback:gw,useContext:cn,useEffect:Uh,useImperativeHandle:mw,useInsertionEffect:fw,useLayoutEffect:pw,useMemo:vw,useReducer:bd,useRef:dw,useState:function(){return bd(Ta)},useDebugValue:Hh,useDeferredValue:function(e){var t=dn();return He===null?t.memoizedState=e:yw(t,He.memoizedState,e)},useTransition:function(){var e=bd(Ta)[0],t=dn().memoizedState;return[e,t]},useMutableSource:iw,useSyncExternalStore:sw,useId:xw,unstable_isNewReconciler:!1};function yn(e,t){if(e&&e.defaultProps){t=Oe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Lf(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Oe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var dc={isMounted:function(e){return(e=e._reactInternals)?es(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=wt(),i=Yr(e),s=ur(r,i);s.payload=t,n!=null&&(s.callback=n),t=Gr(e,s,i),t!==null&&(Tn(t,e,i,r),Ql(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=wt(),i=Yr(e),s=ur(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Gr(e,s,i),t!==null&&(Tn(t,e,i,r),Ql(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=wt(),r=Yr(e),i=ur(n,r);i.tag=2,t!=null&&(i.callback=t),t=Gr(e,i,r),t!==null&&(Tn(t,e,r,n),Ql(t,e,r))}};function hv(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?!ya(n,r)||!ya(i,s):!0}function kw(e,t,n){var r=!1,i=ri,s=t.contextType;return typeof s=="object"&&s!==null?s=cn(s):(i=Ft(t)?Hi:mt.current,r=t.contextTypes,s=(r=r!=null)?io(e,i):ri),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=dc,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function mv(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&&dc.enqueueReplaceState(t,t.state,null)}function If(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Nh(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=cn(s):(s=Ft(t)?Hi:mt.current,i.context=io(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Lf(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&&dc.enqueueReplaceState(i,i.state,null),Pu(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function lo(e,t){try{var n="",r=t;do n+=kT(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 Sd(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function $f(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var KE=typeof WeakMap=="function"?WeakMap:Map;function Cw(e,t,n){n=lr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Fu||(Fu=!0,Yf=r),$f(e,t)},n}function Tw(e,t,n){n=lr(-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(){$f(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){$f(e,t),typeof r!="function"&&(Gr===null?Gr=new Set([this]):Gr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function gv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new KE;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=c_.bind(null,e,t,n),t.then(e,e))}function vv(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 yv(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=lr(-1,1),t.tag=2,qr(n,t,1))),n.lanes|=1),e)}var XE=mr.ReactCurrentOwner,At=!1;function yt(e,t,n,r){t.child=e===null?ew(t,null,n,r):oo(t,e.child,n,r)}function xv(e,t,n,r,i){n=n.render;var s=t.ref;return zs(t,i),r=zh(e,t,n,r,s,i),n=Vh(),e!==null&&!At?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,pr(e,t,i)):(Ee&&n&&jh(t),t.flags|=1,yt(e,t,r,i),t.child)}function wv(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!Zh(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Ew(e,t,s,r,i)):(e=eu(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:ya,n(o,r)&&e.ref===t.ref)return pr(e,t,i)}return t.flags|=1,e=Yr(s,r),e.ref=t.ref,e.return=t,t.child=e}function Ew(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(ya(s,r)&&e.ref===t.ref)if(At=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(At=!0);else return t.lanes=e.lanes,pr(e,t,i)}return Bf(e,t,n,r,i)}function _w(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},be(Rs,$t),$t|=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,be(Rs,$t),$t|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,be(Rs,$t),$t|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,be(Rs,$t),$t|=r;return yt(e,t,i,n),t.child}function Pw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Bf(e,t,n,r,i){var s=Dt(n)?Hi:mt.current;return s=io(t,s),zs(t,i),n=zh(e,t,n,r,s,i),r=Vh(),e!==null&&!At?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,pr(e,t,i)):(Ee&&r&&jh(t),t.flags|=1,yt(e,t,n,i),t.child)}function bv(e,t,n,r,i){if(Dt(n)){var s=!0;Cu(t)}else s=!1;if(zs(t,i),t.stateNode===null)Xl(e,t),kw(t,n,r),If(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=un(c):(c=Dt(n)?Hi:mt.current,c=io(t,c));var d=n.getDerivedStateFromProps,u=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";u||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&mv(t,o,r,c),Tr=!1;var f=t.memoizedState;o.state=f,ju(t,r,o,i),l=t.memoizedState,a!==r||f!==l||Ot.current||Tr?(typeof d=="function"&&(Lf(t,n,d,r),l=t.memoizedState),(a=Tr||hv(t,n,a,r,f,l,c))?(u||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,nw(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:vn(t.type,a),o.props=c,u=t.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=un(l):(l=Dt(n)?Hi:mt.current,l=io(t,l));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==u||f!==l)&&mv(t,o,r,l),Tr=!1,f=t.memoizedState,o.state=f,ju(t,r,o,i);var h=t.memoizedState;a!==u||f!==h||Ot.current||Tr?(typeof p=="function"&&(Lf(t,n,p,r),h=t.memoizedState),(c=Tr||hv(t,n,c,r,f,h,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,h,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,h,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),o.props=r,o.state=h,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return zf(e,t,n,r,s,i)}function zf(e,t,n,r,i,s){Pw(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&ov(t,n,!1),pr(e,t,s);r=t.stateNode,XE.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=oo(t,e.child,null,s),t.child=oo(t,null,a,s)):yt(e,t,a,s),t.memoizedState=r.state,i&&ov(t,n,!0),t.child}function jw(e){var t=e.stateNode;t.pendingContext?sv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&sv(e,t.context,!1),Lh(e,t.containerInfo)}function Sv(e,t,n,r,i){return so(),Ah(i),t.flags|=256,yt(e,t,n,r),t.child}var Vf={dehydrated:null,treeContext:null,retryLane:0};function Uf(e){return{baseLanes:e,cachePool:null,transitions:null}}function Rw(e,t,n){var r=t.pendingProps,i=Pe.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),be(Pe,i&1),e===null)return Mf(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=hc(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=Uf(n),t.memoizedState=Vf,e):Wh(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return ZE(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=Yr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Yr(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?Uf(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=Vf,r}return s=e.child,e=s.sibling,r=Yr(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 Wh(e,t){return t=hc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function El(e,t,n,r){return r!==null&&Ah(r),oo(t,e.child,null,n),e=Wh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ZE(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=Sd(Error(I(422))),El(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=hc({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&&oo(t,e.child,null,o),t.child.memoizedState=Uf(o),t.memoizedState=Vf,s);if(!(t.mode&1))return El(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(I(419)),r=Sd(s,r,void 0),El(e,t,o,r)}if(a=(o&e.childLanes)!==0,At||a){if(r=Xe,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,fr(e,i),Cn(r,e,i,-1))}return Xh(),r=Sd(Error(I(421))),El(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=d_.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Bt=Wr(i.nextSibling),Ut=t,Ee=!0,bn=null,e!==null&&(tn[nn++]=sr,tn[nn++]=or,tn[nn++]=Wi,sr=e.id,or=e.overflow,Wi=t),t=Wh(t,r.children),t.flags|=4096,t)}function kv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Nf(e.return,t,n)}function kd(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 Aw(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(yt(e,t,r.children,n),r=Pe.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&&kv(e,n,t);else if(e.tag===19)kv(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(be(Pe,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Ru(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),kd(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ru(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}kd(t,!0,n,null,s);break;case"together":kd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Xl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function pr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Gi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(I(153));if(t.child!==null){for(e=t.child,n=Yr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Yr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function JE(e,t,n){switch(t.tag){case 3:jw(t),so();break;case 5:rw(t);break;case 1:Dt(t.type)&&Cu(t);break;case 4:Lh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;be(_u,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(be(Pe,Pe.current&1),t.flags|=128,null):n&t.child.childLanes?Rw(e,t,n):(be(Pe,Pe.current&1),e=pr(e,t,n),e!==null?e.sibling:null);be(Pe,Pe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Aw(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),be(Pe,Pe.current),r)break;return null;case 22:case 23:return t.lanes=0,_w(e,t,n)}return pr(e,t,n)}var Ow,Hf,Dw,Fw;Ow=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}};Hf=function(){};Dw=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,_i(Vn.current);var s=null;switch(n){case"input":i=ff(e,i),r=ff(e,r),s=[];break;case"select":i=Ae({},i,{value:void 0}),r=Ae({},r,{value:void 0}),s=[];break;case"textarea":i=mf(e,i),r=mf(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Su)}vf(n,r);var o;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(da.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(da.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&ke("scroll",e),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};Fw=function(e,t,n,r){n!==r&&(t.flags|=4)};function Mo(e,t){if(!Ee)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 ct(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 e_(e,t,n){var r=t.pendingProps;switch(Rh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ct(t),null;case 1:return Dt(t.type)&&ku(),ct(t),null;case 3:return r=t.stateNode,ao(),Te(Ot),Te(mt),$h(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Cl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,bn!==null&&(Zf(bn),bn=null))),Hf(e,t),ct(t),null;case 5:Ih(t);var i=_i(ka.current);if(n=t.type,e!==null&&t.stateNode!=null)Dw(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(I(166));return ct(t),null}if(e=_i(Vn.current),Cl(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[$n]=t,r[ba]=s,e=(t.mode&1)!==0,n){case"dialog":ke("cancel",r),ke("close",r);break;case"iframe":case"object":case"embed":ke("load",r);break;case"video":case"audio":for(i=0;i<Uo.length;i++)ke(Uo[i],r);break;case"source":ke("error",r);break;case"img":case"image":case"link":ke("error",r),ke("load",r);break;case"details":ke("toggle",r);break;case"input":Og(r,s),ke("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},ke("invalid",r);break;case"textarea":Fg(r,s),ke("invalid",r)}vf(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&kl(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&kl(r.textContent,a,e),i=["children",""+a]):da.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&ke("scroll",r)}switch(n){case"input":ml(r),Dg(r,s,!0);break;case"textarea":ml(r),Mg(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Su)}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=l1(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[$n]=t,e[ba]=r,Ow(e,t,!1,!1),t.stateNode=e;e:{switch(o=yf(n,r),n){case"dialog":ke("cancel",e),ke("close",e),i=r;break;case"iframe":case"object":case"embed":ke("load",e),i=r;break;case"video":case"audio":for(i=0;i<Uo.length;i++)ke(Uo[i],e);i=r;break;case"source":ke("error",e),i=r;break;case"img":case"image":case"link":ke("error",e),ke("load",e),i=r;break;case"details":ke("toggle",e),i=r;break;case"input":Og(e,r),i=ff(e,r),ke("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Ae({},r,{value:void 0}),ke("invalid",e);break;case"textarea":Fg(e,r),i=mf(e,r),ke("invalid",e);break;default:i=r}vf(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?d1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&u1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&fa(e,l):typeof l=="number"&&fa(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(da.hasOwnProperty(s)?l!=null&&s==="onScroll"&&ke("scroll",e):l!=null&&mh(e,s,l,o))}switch(n){case"input":ml(e),Dg(e,r,!1);break;case"textarea":ml(e),Mg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ti(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Ls(e,!!r.multiple,s,!1):r.defaultValue!=null&&Ls(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Su)}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 ct(t),null;case 6:if(e&&t.stateNode!=null)Fw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(I(166));if(n=_i(ka.current),_i(Vn.current),Cl(t)){if(r=t.stateNode,n=t.memoizedProps,r[$n]=t,(s=r.nodeValue!==n)&&(e=Ut,e!==null))switch(e.tag){case 3:kl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&kl(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[$n]=t,t.stateNode=r}return ct(t),null;case 13:if(Te(Pe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ee&&Bt!==null&&t.mode&1&&!(t.flags&128))Z1(),so(),t.flags|=98560,s=!1;else if(s=Cl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(I(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(I(317));s[$n]=t}else so(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ct(t),s=!1}else bn!==null&&(Zf(bn),bn=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||Pe.current&1?We===0&&(We=3):Xh())),t.updateQueue!==null&&(t.flags|=4),ct(t),null);case 4:return ao(),Hf(e,t),e===null&&xa(t.stateNode.containerInfo),ct(t),null;case 10:return Fh(t.type._context),ct(t),null;case 17:return Dt(t.type)&&ku(),ct(t),null;case 19:if(Te(Pe),s=t.memoizedState,s===null)return ct(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)Mo(s,!1);else{if(We!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Ru(e),o!==null){for(t.flags|=128,Mo(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 be(Pe,Pe.current&1|2),t.child}e=e.sibling}s.tail!==null&&$e()>uo&&(t.flags|=128,r=!0,Mo(s,!1),t.lanes=4194304)}else{if(!r)if(e=Ru(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Mo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Ee)return ct(t),null}else 2*$e()-s.renderingStartTime>uo&&n!==1073741824&&(t.flags|=128,r=!0,Mo(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=$e(),t.sibling=null,n=Pe.current,be(Pe,r?n&1|2:n&1),t):(ct(t),null);case 22:case 23:return Kh(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?$t&1073741824&&(ct(t),t.subtreeFlags&6&&(t.flags|=8192)):ct(t),null;case 24:return null;case 25:return null}throw Error(I(156,t.tag))}function t_(e,t){switch(Rh(t),t.tag){case 1:return Dt(t.type)&&ku(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ao(),Te(Ot),Te(mt),$h(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ih(t),null;case 13:if(Te(Pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));so()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Te(Pe),null;case 4:return ao(),null;case 10:return Fh(t.type._context),null;case 22:case 23:return Kh(),null;case 24:return null;default:return null}}var _l=!1,pt=!1,n_=typeof WeakSet=="function"?WeakSet:Set,W=null;function js(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Me(e,t,r)}else n.current=null}function Wf(e,t,n){try{n()}catch(r){Me(e,t,r)}}var Cv=!1;function r_(e,t){if(Pf=xu,e=$1(),Ph(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,d=0,u=e,f=null;t:for(;;){for(var p;u!==n||i!==0&&u.nodeType!==3||(a=o+i),u!==s||r!==0&&u.nodeType!==3||(l=o+r),u.nodeType===3&&(o+=u.nodeValue.length),(p=u.firstChild)!==null;)f=u,u=p;for(;;){if(u===e)break t;if(f===n&&++c===i&&(a=o),f===s&&++d===r&&(l=o),(p=u.nextSibling)!==null)break;u=f,f=u.parentNode}u=p}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},xu=!1,W=t;W!==null;)if(t=W,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,W=e;else for(;W!==null;){t=W;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var m=h.memoizedProps,x=h.memoizedState,g=t.stateNode,w=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:vn(t.type,m),x);g.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(I(163))}}catch(k){Me(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,W=e;break}W=t.return}return h=Cv,Cv=!1,h}function ea(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&&Wf(t,n,s)}i=i.next}while(i!==r)}}function fc(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 qf(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 Mw(e){var t=e.alternate;t!==null&&(e.alternate=null,Mw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[$n],delete t[ba],delete t[Of],delete t[$E],delete t[BE])),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 Nw(e){return e.tag===5||e.tag===3||e.tag===4}function Tv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Nw(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 Gf(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=Su));else if(r!==4&&(e=e.child,e!==null))for(Gf(e,t,n),e=e.sibling;e!==null;)Gf(e,t,n),e=e.sibling}function Qf(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(Qf(e,t,n),e=e.sibling;e!==null;)Qf(e,t,n),e=e.sibling}var rt=null,xn=!1;function br(e,t,n){for(n=n.child;n!==null;)Lw(e,t,n),n=n.sibling}function Lw(e,t,n){if(zn&&typeof zn.onCommitFiberUnmount=="function")try{zn.onCommitFiberUnmount(ic,n)}catch{}switch(n.tag){case 5:pt||js(n,t);case 6:var r=rt,i=xn;rt=null,br(e,t,n),rt=r,xn=i,rt!==null&&(xn?(e=rt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):rt.removeChild(n.stateNode));break;case 18:rt!==null&&(xn?(e=rt,n=n.stateNode,e.nodeType===8?gd(e.parentNode,n):e.nodeType===1&&gd(e,n),ga(e)):gd(rt,n.stateNode));break;case 4:r=rt,i=xn,rt=n.stateNode.containerInfo,xn=!0,br(e,t,n),rt=r,xn=i;break;case 0:case 11:case 14:case 15:if(!pt&&(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)&&Wf(n,t,o),i=i.next}while(i!==r)}br(e,t,n);break;case 1:if(!pt&&(js(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Me(n,t,a)}br(e,t,n);break;case 21:br(e,t,n);break;case 22:n.mode&1?(pt=(r=pt)||n.memoizedState!==null,br(e,t,n),pt=r):br(e,t,n);break;default:br(e,t,n)}}function Ev(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new n_),t.forEach(function(r){var i=f_.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function hn(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:rt=a.stateNode,xn=!1;break e;case 3:rt=a.stateNode.containerInfo,xn=!0;break e;case 4:rt=a.stateNode.containerInfo,xn=!0;break e}a=a.return}if(rt===null)throw Error(I(160));Lw(s,o,i),rt=null,xn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){Me(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Iw(t,e),t=t.sibling}function Iw(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(hn(t,e),Rn(e),r&4){try{ea(3,e,e.return),fc(3,e)}catch(m){Me(e,e.return,m)}try{ea(5,e,e.return)}catch(m){Me(e,e.return,m)}}break;case 1:hn(t,e),Rn(e),r&512&&n!==null&&js(n,n.return);break;case 5:if(hn(t,e),Rn(e),r&512&&n!==null&&js(n,n.return),e.flags&32){var i=e.stateNode;try{fa(i,"")}catch(m){Me(e,e.return,m)}}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&&o1(i,s),yf(a,o);var c=yf(a,s);for(o=0;o<l.length;o+=2){var d=l[o],u=l[o+1];d==="style"?d1(i,u):d==="dangerouslySetInnerHTML"?u1(i,u):d==="children"?fa(i,u):mh(i,d,u,c)}switch(a){case"input":pf(i,s);break;case"textarea":a1(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?Ls(i,!!s.multiple,p,!1):f!==!!s.multiple&&(s.defaultValue!=null?Ls(i,!!s.multiple,s.defaultValue,!0):Ls(i,!!s.multiple,s.multiple?[]:"",!1))}i[ba]=s}catch(m){Me(e,e.return,m)}}break;case 6:if(hn(t,e),Rn(e),r&4){if(e.stateNode===null)throw Error(I(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(m){Me(e,e.return,m)}}break;case 3:if(hn(t,e),Rn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ga(t.containerInfo)}catch(m){Me(e,e.return,m)}break;case 4:hn(t,e),Rn(e);break;case 13:hn(t,e),Rn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Qh=$e())),r&4&&Ev(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(pt=(c=pt)||d,hn(t,e),pt=c):hn(t,e),Rn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(W=e,d=e.child;d!==null;){for(u=W=d;W!==null;){switch(f=W,p=f.child,f.tag){case 0:case 11:case 14:case 15:ea(4,f,f.return);break;case 1:js(f,f.return);var h=f.stateNode;if(typeof h.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(m){Me(r,n,m)}}break;case 5:js(f,f.return);break;case 22:if(f.memoizedState!==null){Pv(u);continue}}p!==null?(p.return=f,W=p):Pv(u)}d=d.sibling}e:for(d=null,u=e;;){if(u.tag===5){if(d===null){d=u;try{i=u.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=u.stateNode,l=u.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=c1("display",o))}catch(m){Me(e,e.return,m)}}}else if(u.tag===6){if(d===null)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(m){Me(e,e.return,m)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===e)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;u.sibling===null;){if(u.return===null||u.return===e)break e;d===u&&(d=null),u=u.return}d===u&&(d=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:hn(t,e),Rn(e),r&4&&Ev(e);break;case 21:break;default:hn(t,e),Rn(e)}}function Rn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Nw(n)){var r=n;break e}n=n.return}throw Error(I(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(fa(i,""),r.flags&=-33);var s=Tv(e);Qf(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Tv(e);Gf(e,a,o);break;default:throw Error(I(161))}}catch(l){Me(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function i_(e,t,n){W=e,$w(e)}function $w(e,t,n){for(var r=(e.mode&1)!==0;W!==null;){var i=W,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||_l;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||pt;a=_l;var c=pt;if(_l=o,(pt=l)&&!c)for(W=i;W!==null;)o=W,l=o.child,o.tag===22&&o.memoizedState!==null?jv(i):l!==null?(l.return=o,W=l):jv(i);for(;s!==null;)W=s,$w(s),s=s.sibling;W=i,_l=a,pt=c}_v(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,W=s):_v(e)}}function _v(e){for(;W!==null;){var t=W;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:pt||fc(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!pt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:vn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&dv(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}dv(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var u=d.dehydrated;u!==null&&ga(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(I(163))}pt||t.flags&512&&qf(t)}catch(f){Me(t,t.return,f)}}if(t===e){W=null;break}if(n=t.sibling,n!==null){n.return=t.return,W=n;break}W=t.return}}function Pv(e){for(;W!==null;){var t=W;if(t===e){W=null;break}var n=t.sibling;if(n!==null){n.return=t.return,W=n;break}W=t.return}}function jv(e){for(;W!==null;){var t=W;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{fc(4,t)}catch(l){Me(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Me(t,i,l)}}var s=t.return;try{qf(t)}catch(l){Me(t,s,l)}break;case 5:var o=t.return;try{qf(t)}catch(l){Me(t,o,l)}}}catch(l){Me(t,t.return,l)}if(t===e){W=null;break}var a=t.sibling;if(a!==null){a.return=t.return,W=a;break}W=t.return}}var s_=Math.ceil,Du=mr.ReactCurrentDispatcher,qh=mr.ReactCurrentOwner,an=mr.ReactCurrentBatchConfig,de=0,Xe=null,Be=null,ot=0,$t=0,Rs=ai(0),We=0,_a=null,Gi=0,pc=0,Gh=0,ta=null,jt=null,Qh=0,uo=1/0,tr=null,Fu=!1,Yf=null,Gr=null,Pl=!1,$r=null,Mu=0,na=0,Kf=null,Zl=-1,Jl=0;function wt(){return de&6?$e():Zl!==-1?Zl:Zl=$e()}function Qr(e){return e.mode&1?de&2&&ot!==0?ot&-ot:VE.transition!==null?(Jl===0&&(Jl=k1()),Jl):(e=he,e!==0||(e=window.event,e=e===void 0?16:R1(e.type)),e):1}function Cn(e,t,n,r){if(50<na)throw na=0,Kf=null,Error(I(185));Qa(e,n,r),(!(de&2)||e!==Xe)&&(e===Xe&&(!(de&2)&&(pc|=n),We===4&&Pr(e,ot)),Ft(e,r),n===1&&de===0&&!(t.mode&1)&&(uo=$e()+500,uc&&li()))}function Ft(e,t){var n=e.callbackNode;VT(e,t);var r=yu(e,e===Xe?ot:0);if(r===0)n!==null&&Ig(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Ig(n),t===1)e.tag===0?zE(Rv.bind(null,e)):Y1(Rv.bind(null,e)),LE(function(){!(de&6)&&li()}),n=null;else{switch(C1(r)){case 1:n=wh;break;case 4:n=b1;break;case 16:n=vu;break;case 536870912:n=S1;break;default:n=vu}n=Gw(n,Bw.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Bw(e,t){if(Zl=-1,Jl=0,de&6)throw Error(I(327));var n=e.callbackNode;if(Vs()&&e.callbackNode!==n)return null;var r=yu(e,e===Xe?ot:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Nu(e,r);else{t=r;var i=de;de|=2;var s=Vw();(Xe!==e||ot!==t)&&(tr=null,uo=$e()+500,$i(e,t));do try{l_();break}catch(a){zw(e,a)}while(!0);Dh(),Du.current=s,de=i,Be!==null?t=0:(Xe=null,ot=0,t=We)}if(t!==0){if(t===2&&(i=kf(e),i!==0&&(r=i,t=Xf(e,i))),t===1)throw n=_a,$i(e,0),Pr(e,r),Ft(e,$e()),n;if(t===6)Pr(e,r);else{if(i=e.current.alternate,!(r&30)&&!o_(i)&&(t=Nu(e,r),t===2&&(s=kf(e),s!==0&&(r=s,t=Xf(e,s))),t===1))throw n=_a,$i(e,0),Pr(e,r),Ft(e,$e()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(I(345));case 2:xi(e,jt,tr);break;case 3:if(Pr(e,r),(r&130023424)===r&&(t=Qh+500-$e(),10<t)){if(yu(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){wt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Af(xi.bind(null,e,jt,tr),t);break}xi(e,jt,tr);break;case 4:if(Pr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-kn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=$e()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*s_(r/1960))-r,10<r){e.timeoutHandle=Af(xi.bind(null,e,jt,tr),r);break}xi(e,jt,tr);break;case 5:xi(e,jt,tr);break;default:throw Error(I(329))}}}return Ft(e,$e()),e.callbackNode===n?Bw.bind(null,e):null}function Xf(e,t){var n=ta;return e.current.memoizedState.isDehydrated&&($i(e,t).flags|=256),e=Nu(e,t),e!==2&&(t=jt,jt=n,t!==null&&Zf(t)),e}function Zf(e){jt===null?jt=e:jt.push.apply(jt,e)}function o_(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(!Tn(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&=~Gh,t&=~pc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-kn(t),r=1<<n;e[n]=-1,t&=~r}}function Rv(e){if(de&6)throw Error(I(327));Vs();var t=yu(e,0);if(!(t&1))return Ft(e,$e()),null;var n=Nu(e,t);if(e.tag!==0&&n===2){var r=kf(e);r!==0&&(t=r,n=Xf(e,r))}if(n===1)throw n=_a,$i(e,0),Pr(e,t),Ft(e,$e()),n;if(n===6)throw Error(I(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,xi(e,jt,tr),Ft(e,$e()),null}function Yh(e,t){var n=de;de|=1;try{return e(t)}finally{de=n,de===0&&(uo=$e()+500,uc&&li())}}function Qi(e){$r!==null&&$r.tag===0&&!(de&6)&&Vs();var t=de;de|=1;var n=an.transition,r=he;try{if(an.transition=null,he=1,e)return e()}finally{he=r,an.transition=n,de=t,!(de&6)&&li()}}function Kh(){$t=Rs.current,Te(Rs)}function $i(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,NE(n)),Be!==null)for(n=Be.return;n!==null;){var r=n;switch(Rh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ku();break;case 3:ao(),Te(Ot),Te(mt),$h();break;case 5:Ih(r);break;case 4:ao();break;case 13:Te(Pe);break;case 19:Te(Pe);break;case 10:Fh(r.type._context);break;case 22:case 23:Kh()}n=n.return}if(Xe=e,Be=e=Yr(e.current,null),ot=$t=t,We=0,_a=null,Gh=pc=Gi=0,jt=ta=null,Ei!==null){for(t=0;t<Ei.length;t++)if(n=Ei[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}Ei=null}return e}function zw(e,t){do{var n=Be;try{if(Dh(),Yl.current=Ou,Au){for(var r=Re.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Au=!1}if(qi=0,Ke=Ue=Re=null,Jo=!1,Ca=0,qh.current=null,n===null||n.return===null){We=1,_a=t,Be=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=ot,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,d=a,u=d.tag;if(!(d.mode&1)&&(u===0||u===11||u===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=vv(o);if(p!==null){p.flags&=-257,yv(p,o,a,s,t),p.mode&1&&gv(s,c,t),t=p,l=c;var h=t.updateQueue;if(h===null){var m=new Set;m.add(l),t.updateQueue=m}else h.add(l);break e}else{if(!(t&1)){gv(s,c,t),Xh();break e}l=Error(I(426))}}else if(Ee&&a.mode&1){var x=vv(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),yv(x,o,a,s,t),Ah(lo(l,a));break e}}s=l=lo(l,a),We!==4&&(We=2),ta===null?ta=[s]:ta.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var g=Cw(s,l,t);cv(s,g);break e;case 1:a=l;var w=s.type,b=s.stateNode;if(!(s.flags&128)&&(typeof w.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Gr===null||!Gr.has(b)))){s.flags|=65536,t&=-t,s.lanes|=t;var k=Tw(s,a,t);cv(s,k);break e}}s=s.return}while(s!==null)}Hw(n)}catch(T){t=T,Be===n&&n!==null&&(Be=n=n.return);continue}break}while(!0)}function Vw(){var e=Du.current;return Du.current=Ou,e===null?Ou:e}function Xh(){(We===0||We===3||We===2)&&(We=4),Xe===null||!(Gi&268435455)&&!(pc&268435455)||Pr(Xe,ot)}function Nu(e,t){var n=de;de|=2;var r=Vw();(Xe!==e||ot!==t)&&(tr=null,$i(e,t));do try{a_();break}catch(i){zw(e,i)}while(!0);if(Dh(),de=n,Du.current=r,Be!==null)throw Error(I(261));return Xe=null,ot=0,We}function a_(){for(;Be!==null;)Uw(Be)}function l_(){for(;Be!==null&&!DT();)Uw(Be)}function Uw(e){var t=qw(e.alternate,e,$t);e.memoizedProps=e.pendingProps,t===null?Hw(e):Be=t,qh.current=null}function Hw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=t_(n,t),n!==null){n.flags&=32767,Be=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{We=6,Be=null;return}}else if(n=e_(n,t,$t),n!==null){Be=n;return}if(t=t.sibling,t!==null){Be=t;return}Be=t=e}while(t!==null);We===0&&(We=5)}function xi(e,t,n){var r=he,i=an.transition;try{an.transition=null,he=1,u_(e,t,n,r)}finally{an.transition=i,he=r}return null}function u_(e,t,n,r){do Vs();while($r!==null);if(de&6)throw Error(I(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(I(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(UT(e,s),e===Xe&&(Be=Xe=null,ot=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Pl||(Pl=!0,Gw(vu,function(){return Vs(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=an.transition,an.transition=null;var o=he;he=1;var a=de;de|=4,qh.current=null,r_(e,n),Iw(n,e),jE(jf),xu=!!Pf,jf=Pf=null,e.current=n,i_(n),FT(),de=a,he=o,an.transition=s}else e.current=n;if(Pl&&(Pl=!1,$r=e,Mu=i),s=e.pendingLanes,s===0&&(Gr=null),LT(n.stateNode),Ft(e,$e()),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(Fu)throw Fu=!1,e=Yf,Yf=null,e;return Mu&1&&e.tag!==0&&Vs(),s=e.pendingLanes,s&1?e===Kf?na++:(na=0,Kf=e):na=0,li(),null}function Vs(){if($r!==null){var e=C1(Mu),t=an.transition,n=he;try{if(an.transition=null,he=16>e?16:e,$r===null)var r=!1;else{if(e=$r,$r=null,Mu=0,de&6)throw Error(I(331));var i=de;for(de|=4,W=e.current;W!==null;){var s=W,o=s.child;if(W.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(W=c;W!==null;){var d=W;switch(d.tag){case 0:case 11:case 15:ea(8,d,s)}var u=d.child;if(u!==null)u.return=d,W=u;else for(;W!==null;){d=W;var f=d.sibling,p=d.return;if(Mw(d),d===c){W=null;break}if(f!==null){f.return=p,W=f;break}W=p}}}var h=s.alternate;if(h!==null){var m=h.child;if(m!==null){h.child=null;do{var x=m.sibling;m.sibling=null,m=x}while(m!==null)}}W=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,W=o;else e:for(;W!==null;){if(s=W,s.flags&2048)switch(s.tag){case 0:case 11:case 15:ea(9,s,s.return)}var g=s.sibling;if(g!==null){g.return=s.return,W=g;break e}W=s.return}}var w=e.current;for(W=w;W!==null;){o=W;var b=o.child;if(o.subtreeFlags&2064&&b!==null)b.return=o,W=b;else e:for(o=w;W!==null;){if(a=W,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:fc(9,a)}}catch(T){Me(a,a.return,T)}if(a===o){W=null;break e}var k=a.sibling;if(k!==null){k.return=a.return,W=k;break e}W=a.return}}if(de=i,li(),zn&&typeof zn.onPostCommitFiberRoot=="function")try{zn.onPostCommitFiberRoot(ic,e)}catch{}r=!0}return r}finally{he=n,an.transition=t}}return!1}function Av(e,t,n){t=lo(n,t),t=Cw(e,t,1),e=qr(e,t,1),t=wt(),e!==null&&(Qa(e,1,t),Ft(e,t))}function Me(e,t,n){if(e.tag===3)Av(e,e,n);else for(;t!==null;){if(t.tag===3){Av(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Gr===null||!Gr.has(r))){e=lo(n,e),e=Tw(t,e,1),t=qr(t,e,1),e=wt(),t!==null&&(Qa(t,1,e),Ft(t,e));break}}t=t.return}}function c_(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=wt(),e.pingedLanes|=e.suspendedLanes&n,Xe===e&&(ot&n)===n&&(We===4||We===3&&(ot&130023424)===ot&&500>$e()-Qh?$i(e,0):Gh|=n),Ft(e,t)}function Ww(e,t){t===0&&(e.mode&1?(t=yl,yl<<=1,!(yl&130023424)&&(yl=4194304)):t=1);var n=wt();e=fr(e,t),e!==null&&(Qa(e,t,n),Ft(e,n))}function d_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ww(e,n)}function f_(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(I(314))}r!==null&&r.delete(t),Ww(e,n)}var qw;qw=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ot.current)At=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return At=!1,JE(e,t,n);At=!!(e.flags&131072)}else At=!1,Ee&&t.flags&1048576&&K1(t,Eu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Xl(e,t),e=t.pendingProps;var i=io(t,mt.current);zs(t,n),i=zh(null,t,r,e,i,n);var s=Vh();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,Dt(r)?(s=!0,Cu(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Nh(t),i.updater=dc,t.stateNode=i,i._reactInternals=t,If(t,r,e,n),t=zf(null,t,r,!0,s,n)):(t.tag=0,Ee&&s&&jh(t),yt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Xl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=h_(r),e=vn(r,e),i){case 0:t=Bf(null,t,r,e,n);break e;case 1:t=bv(null,t,r,e,n);break e;case 11:t=xv(null,t,r,e,n);break e;case 14:t=wv(null,t,r,vn(r.type,e),n);break e}throw Error(I(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vn(r,i),Bf(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vn(r,i),bv(e,t,r,i,n);case 3:e:{if(jw(t),e===null)throw Error(I(387));r=t.pendingProps,s=t.memoizedState,i=s.element,nw(e,t),ju(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=lo(Error(I(423)),t),t=Sv(e,t,r,n,i);break e}else if(r!==i){i=lo(Error(I(424)),t),t=Sv(e,t,r,n,i);break e}else for(Bt=Wr(t.stateNode.containerInfo.firstChild),Ut=t,Ee=!0,bn=null,n=ew(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(so(),r===i){t=pr(e,t,n);break e}yt(e,t,r,n)}t=t.child}return t;case 5:return rw(t),e===null&&Mf(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Rf(r,i)?o=null:s!==null&&Rf(r,s)&&(t.flags|=32),Pw(e,t),yt(e,t,o,n),t.child;case 6:return e===null&&Mf(t),null;case 13:return Rw(e,t,n);case 4:return Lh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=oo(t,null,r,n):yt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vn(r,i),xv(e,t,r,i,n);case 7:return yt(e,t,t.pendingProps,n),t.child;case 8:return yt(e,t,t.pendingProps.children,n),t.child;case 12:return yt(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,be(_u,r._currentValue),r._currentValue=o,s!==null)if(Tn(s.value,o)){if(s.children===i.children&&!Ot.current){t=pr(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=lr(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Nf(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(I(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Nf(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}yt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,zs(t,n),i=un(i),r=r(i),t.flags|=1,yt(e,t,r,n),t.child;case 14:return r=t.type,i=vn(r,t.pendingProps),i=vn(r.type,i),wv(e,t,r,i,n);case 15:return Ew(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vn(r,i),Xl(e,t),t.tag=1,Dt(r)?(e=!0,Cu(t)):e=!1,zs(t,n),kw(t,r,i),If(t,r,i,n),zf(null,t,r,!0,e,n);case 19:return Aw(e,t,n);case 22:return _w(e,t,n)}throw Error(I(156,t.tag))};function Gw(e,t){return w1(e,t)}function p_(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 sn(e,t,n,r){return new p_(e,t,n,r)}function Zh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function h_(e){if(typeof e=="function")return Zh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===vh)return 11;if(e===yh)return 14}return 2}function Yr(e,t){var n=e.alternate;return n===null?(n=sn(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 eu(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")Zh(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case ws:return Bi(n.children,i,s,t);case gh:o=8,i|=8;break;case lf:return e=sn(12,n,t,i|2),e.elementType=lf,e.lanes=s,e;case uf:return e=sn(13,n,t,i),e.elementType=uf,e.lanes=s,e;case cf:return e=sn(19,n,t,i),e.elementType=cf,e.lanes=s,e;case r1:return hc(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case t1:o=10;break e;case n1:o=9;break e;case vh:o=11;break e;case yh:o=14;break e;case Cr:o=16,r=null;break e}throw Error(I(130,e==null?e:typeof e,""))}return t=sn(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Bi(e,t,n,r){return e=sn(7,e,r,t),e.lanes=n,e}function hc(e,t,n,r){return e=sn(22,e,r,t),e.elementType=r1,e.lanes=n,e.stateNode={isHidden:!1},e}function Cd(e,t,n){return e=sn(6,e,null,t),e.lanes=n,e}function Td(e,t,n){return t=sn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function m_(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=sd(0),this.expirationTimes=sd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=sd(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Jh(e,t,n,r,i,s,o,a,l){return e=new m_(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=sn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Nh(s),e}function g_(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:xs,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Qw(e){if(!e)return ni;e=e._reactInternals;e:{if(es(e)!==e||e.tag!==1)throw Error(I(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Dt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(I(171))}if(e.tag===1){var n=e.type;if(Dt(n))return Q1(e,n,t)}return t}function Yw(e,t,n,r,i,s,o,a,l){return e=Jh(n,r,!0,e,i,s,o,a,l),e.context=Qw(null),n=e.current,r=wt(),i=Qr(n),s=lr(r,i),s.callback=t??null,qr(n,s,i),e.current.lanes=i,Qa(e,i,r),Ft(e,r),e}function mc(e,t,n,r){var i=t.current,s=wt(),o=Qr(i);return n=Qw(n),t.context===null?t.context=n:t.pendingContext=n,t=lr(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=qr(i,t,o),e!==null&&(Cn(e,i,o,s),Ql(e,i,o)),o}function Lu(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 Ov(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function em(e,t){Ov(e,t),(e=e.alternate)&&Ov(e,t)}function v_(){return null}var Kw=typeof reportError=="function"?reportError:function(e){console.error(e)};function tm(e){this._internalRoot=e}gc.prototype.render=tm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(I(409));mc(e,t,null,null)};gc.prototype.unmount=tm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Qi(function(){mc(null,e,null,null)}),t[dr]=null}};function gc(e){this._internalRoot=e}gc.prototype.unstable_scheduleHydration=function(e){if(e){var t=_1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<_r.length&&t!==0&&t<_r[n].priority;n++);_r.splice(n,0,e),n===0&&j1(e)}};function nm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function vc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Dv(){}function y_(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var c=Lu(o);s.call(c)}}var o=Yw(t,r,e,0,null,!1,!1,"",Dv);return e._reactRootContainer=o,e[dr]=o.current,xa(e.nodeType===8?e.parentNode:e),Qi(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var c=Lu(l);a.call(c)}}var l=Jh(e,0,!1,null,null,!1,!1,"",Dv);return e._reactRootContainer=l,e[dr]=l.current,xa(e.nodeType===8?e.parentNode:e),Qi(function(){mc(t,l,n,r)}),l}function yc(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=Lu(o);a.call(l)}}mc(t,o,e,i)}else o=y_(n,t,e,i,r);return Lu(o)}T1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Vo(t.pendingLanes);n!==0&&(bh(t,n|1),Ft(t,$e()),!(de&6)&&(uo=$e()+500,li()))}break;case 13:Qi(function(){var r=fr(e,1);if(r!==null){var i=wt();Cn(r,e,1,i)}}),em(e,1)}};Sh=function(e){if(e.tag===13){var t=fr(e,134217728);if(t!==null){var n=wt();Cn(t,e,134217728,n)}em(e,134217728)}};E1=function(e){if(e.tag===13){var t=Qr(e),n=fr(e,t);if(n!==null){var r=wt();Cn(n,e,t,r)}em(e,t)}};_1=function(){return he};P1=function(e,t){var n=he;try{return he=e,t()}finally{he=n}};wf=function(e,t,n){switch(t){case"input":if(pf(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=lc(r);if(!i)throw Error(I(90));s1(r),pf(r,i)}}}break;case"textarea":a1(e,n);break;case"select":t=n.value,t!=null&&Ls(e,!!n.multiple,t,!1)}};h1=Yh;m1=Qi;var x_={usingClientEntryPoint:!1,Events:[Ka,Cs,lc,f1,p1,Yh]},No={findFiberByHostInstance:Ti,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},w_={bundleType:No.bundleType,version:No.version,rendererPackageName:No.rendererPackageName,rendererConfig:No.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:mr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=y1(e),e===null?null:e.stateNode},findFiberByHostInstance:No.findFiberByHostInstance||v_,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 jl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!jl.isDisabled&&jl.supportsFiber)try{ic=jl.inject(w_),zn=jl}catch{}}Wt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=x_;Wt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!nm(t))throw Error(I(200));return g_(e,t,null,n)};Wt.createRoot=function(e,t){if(!nm(e))throw Error(I(299));var n=!1,r="",i=Kw;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Jh(e,1,!1,null,null,n,!1,r,i),e[dr]=t.current,xa(e.nodeType===8?e.parentNode:e),new tm(t)};Wt.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(I(188)):(e=Object.keys(e).join(","),Error(I(268,e)));return e=y1(t),e=e===null?null:e.stateNode,e};Wt.flushSync=function(e){return Qi(e)};Wt.hydrate=function(e,t,n){if(!vc(t))throw Error(I(200));return yc(null,e,t,!0,n)};Wt.hydrateRoot=function(e,t,n){if(!nm(e))throw Error(I(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=Kw;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Yw(t,null,e,1,n??null,i,!1,s,o),e[dr]=t.current,xa(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 gc(t)};Wt.render=function(e,t,n){if(!vc(t))throw Error(I(200));return yc(null,e,t,!1,n)};Wt.unmountComponentAtNode=function(e){if(!vc(e))throw Error(I(40));return e._reactRootContainer?(Qi(function(){yc(null,null,e,!1,function(){e._reactRootContainer=null,e[dr]=null})}),!0):!1};Wt.unstable_batchedUpdates=Yh;Wt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!vc(n))throw Error(I(200));if(e==null||e._reactInternals===void 0)throw Error(I(38));return yc(e,t,n,!1,r)};Wt.version="18.3.1-next-f1338f8080-20240426";function Xw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Xw)}catch(e){console.error(e)}}Xw(),Xx.exports=Wt;var Zw=Xx.exports;const b_=Zi(Zw);var Jw,Fv=Zw;Jw=Fv.createRoot,Fv.hydrateRoot;const S_="@alfatech/livechat",k_="v2025.11.05.1",C_="module",T_="https://api-live.alfatek.dev",E_="wss://api-live.alfatek.dev",__=["dist","README.md","component/chatier.js"],P_="dist/widget.js",j_={dev:"vite",dev2:"vite --config vite.config.2.ts",build:"tsc -b && vite build",lint:"biome lint --write",prepare:"husky",format:"biome format --write && yarn lint"},R_={"@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","lucide-react":"^0.511.0",react:"^18.3.1","react-dom":"^18.3.1","react-dropzone":"^14.3.8","react-router-dom":"^6.26.2","socket.io-client":"^4.8.1",sonner:"^2.0.1",yup:"^1.4.0",zustand:"^4.5.5"},A_={"@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"},eb={name:S_,private:!1,version:k_,type:C_,apiURL:T_,wsURL:E_,files:__,main:P_,scripts:j_,dependencies:R_,devDependencies:A_,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},O_=eb.apiURL,D_=eb.wsURL,F_=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],M_=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],N_={429:F_,404:M_};async function bo(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=await fetch(`${O_}/${e}`,{...t,credentials:"include",headers:{...t.headers,...n}}).catch(s=>new Response(null,{status:500}));if(!r.ok){let s={};try{return s=await r.json(),[s,r.status]}catch{}const o=N_[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 Za=e=>[200,201,204].includes(e),L_=(e,{arrayWithBrackets:t=!1,arrayWithBracketAndIndex:n=!0}={})=>{const r=new FormData;for(const[i,s]of Object.entries(e)){if(Array.isArray(s)){for(const o in s)t?r.append(`${i}[]`,s[o]):n?r.append(`${i}[${o}]`,s[o]):r.append(i,s[o]);continue}typeof s<"u"&&s!==null&&r.append(i,s)}return r};var So=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(){}},Yi=typeof window>"u"||"Deno"in globalThis;function en(){}function I_(e,t){return typeof e=="function"?e(t):e}function Jf(e){return typeof e=="number"&&e>=0&&e!==1/0}function tb(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Us(e,t){return typeof e=="function"?e(t):e}function Sn(e,t){return typeof e=="function"?e(t):e}function Mv(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==rm(o,t.options))return!1}else if(!Pa(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 Nv(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Ki(t.options.mutationKey)!==Ki(s))return!1}else if(!Pa(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function rm(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ki)(e)}function Ki(e){return JSON.stringify(e,(t,n)=>ep(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Pa(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Pa(e[n],t[n])):!1}function nb(e,t){if(e===t)return e;const n=Lv(e)&&Lv(t);if(n||ep(e)&&ep(t)){const r=n?e:Object.keys(e),i=r.length,s=n?t:Object.keys(t),o=s.length,a=n?[]:{};let l=0;for(let c=0;c<o;c++){const d=n?c:s[c];(!n&&r.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,l++):(a[d]=nb(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function Iu(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 Lv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ep(e){if(!Iv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Iv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Iv(e){return Object.prototype.toString.call(e)==="[object Object]"}function $_(e){return new Promise(t=>{setTimeout(t,e)})}function tp(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?nb(e,t):t}function B_(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function z_(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var im=Symbol();function rb(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===im?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Oi,jr,Hs,Rx,V_=(Rx=class extends So{constructor(){super();X(this,Oi);X(this,jr);X(this,Hs);U(this,Hs,t=>{if(!Yi&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){S(this,jr)||this.setEventListener(S(this,Hs))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,jr))==null||t.call(this),U(this,jr,void 0))}setEventListener(t){var n;U(this,Hs,t),(n=S(this,jr))==null||n.call(this),U(this,jr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){S(this,Oi)!==t&&(U(this,Oi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof S(this,Oi)=="boolean"?S(this,Oi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Oi=new WeakMap,jr=new WeakMap,Hs=new WeakMap,Rx),sm=new V_,Ws,Rr,qs,Ax,U_=(Ax=class extends So{constructor(){super();X(this,Ws,!0);X(this,Rr);X(this,qs);U(this,qs,t=>{if(!Yi&&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(){S(this,Rr)||this.setEventListener(S(this,qs))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,Rr))==null||t.call(this),U(this,Rr,void 0))}setEventListener(t){var n;U(this,qs,t),(n=S(this,Rr))==null||n.call(this),U(this,Rr,t(this.setOnline.bind(this)))}setOnline(t){S(this,Ws)!==t&&(U(this,Ws,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return S(this,Ws)}},Ws=new WeakMap,Rr=new WeakMap,qs=new WeakMap,Ax),$u=new U_;function np(){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 H_(e){return Math.min(1e3*2**e,3e4)}function ib(e){return(e??"online")==="online"?$u.isOnline():!0}var sb=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ed(e){return e instanceof sb}function ob(e){let t=!1,n=0,r=!1,i;const s=np(),o=m=>{var x;r||(f(new sb(m)),(x=e.abort)==null||x.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>sm.isFocused()&&(e.networkMode==="always"||$u.isOnline())&&e.canRun(),d=()=>ib(e.networkMode)&&e.canRun(),u=m=>{var x;r||(r=!0,(x=e.onSuccess)==null||x.call(e,m),i==null||i(),s.resolve(m))},f=m=>{var x;r||(r=!0,(x=e.onError)==null||x.call(e,m),i==null||i(),s.reject(m))},p=()=>new Promise(m=>{var x;i=g=>{(r||c())&&m(g)},(x=e.onPause)==null||x.call(e)}).then(()=>{var m;i=void 0,r||(m=e.onContinue)==null||m.call(e)}),h=()=>{if(r)return;let m;const x=n===0?e.initialPromise:void 0;try{m=x??e.fn()}catch(g){m=Promise.reject(g)}Promise.resolve(m).then(u).catch(g=>{var E;if(r)return;const w=e.retry??(Yi?0:3),b=e.retryDelay??H_,k=typeof b=="function"?b(n,g):b,T=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,g);if(t||!T){f(g);return}n++,(E=e.onFail)==null||E.call(e,n,g),$_(k).then(()=>c()?void 0:p()).then(()=>{t?f(g):h()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?h():p().then(h),s)}}function W_(){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 He=W_(),Di,Ox,ab=(Ox=class{constructor(){X(this,Di)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Jf(this.gcTime)&&U(this,Di,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Yi?1/0:5*60*1e3))}clearGcTimeout(){S(this,Di)&&(clearTimeout(S(this,Di)),U(this,Di,void 0))}},Di=new WeakMap,Ox),Gs,Qs,Jt,dt,Ua,Fi,yn,er,Dx,q_=(Dx=class extends ab{constructor(t){super();X(this,yn);X(this,Gs);X(this,Qs);X(this,Jt);X(this,dt);X(this,Ua);X(this,Fi);U(this,Fi,!1),U(this,Ua,t.defaultOptions),this.setOptions(t.options),this.observers=[],U(this,Jt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,U(this,Gs,G_(this.options)),this.state=t.state??S(this,Gs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=S(this,dt))==null?void 0:t.promise}setOptions(t){this.options={...S(this,Ua),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&S(this,Jt).remove(this)}setData(t,n){const r=tp(this.state.data,t,this.options);return se(this,yn,er).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){se(this,yn,er).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=S(this,dt))==null?void 0:r.promise;return(i=S(this,dt))==null||i.cancel(t),n?n.then(en).catch(en):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(S(this,Gs))}isActive(){return this.observers.some(t=>Sn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===im||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||!tb(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,dt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,dt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),S(this,Jt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(S(this,dt)&&(S(this,Fi)?S(this,dt).cancel({revert:!0}):S(this,dt).cancelRetry()),this.scheduleGc()),S(this,Jt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||se(this,yn,er).call(this,{type:"invalidate"})}fetch(t,n){var l,c,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(S(this,dt))return S(this,dt).continueRetry(),S(this,dt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const u=this.observers.find(f=>f.options.queryFn);u&&this.setOptions(u.options)}const r=new AbortController,i=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(U(this,Fi,!0),r.signal)})},s=()=>{const u=rb(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return i(f),U(this,Fi,!1),this.options.persister?this.options.persister(u,f,this):u(f)},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),U(this,Qs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=o.fetchOptions)==null?void 0:c.meta))&&se(this,yn,er).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const a=u=>{var f,p,h,m;Ed(u)&&u.silent||se(this,yn,er).call(this,{type:"error",error:u}),Ed(u)||((p=(f=S(this,Jt).config).onError)==null||p.call(f,u,this),(m=(h=S(this,Jt).config).onSettled)==null||m.call(h,this.state.data,u,this)),this.scheduleGc()};return U(this,dt,ob({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:u=>{var f,p,h,m;if(u===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(x){a(x);return}(p=(f=S(this,Jt).config).onSuccess)==null||p.call(f,u,this),(m=(h=S(this,Jt).config).onSettled)==null||m.call(h,u,this.state.error,this),this.scheduleGc()},onError:a,onFail:(u,f)=>{se(this,yn,er).call(this,{type:"failed",failureCount:u,error:f})},onPause:()=>{se(this,yn,er).call(this,{type:"pause"})},onContinue:()=>{se(this,yn,er).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),S(this,dt).start()}},Gs=new WeakMap,Qs=new WeakMap,Jt=new WeakMap,dt=new WeakMap,Ua=new WeakMap,Fi=new WeakMap,yn=new WeakSet,er=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,...lb(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 Ed(i)&&i.revert&&S(this,Qs)?{...S(this,Qs),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),He.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),S(this,Jt).notify({query:this,type:"updated",action:t})})},Dx);function lb(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ib(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function G_(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 Mn,Fx,Q_=(Fx=class extends So{constructor(t={}){super();X(this,Mn);this.config=t,U(this,Mn,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??rm(i,n);let o=this.get(s);return o||(o=new q_({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){S(this,Mn).has(t.queryHash)||(S(this,Mn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=S(this,Mn).get(t.queryHash);n&&(t.destroy(),n===t&&S(this,Mn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){He.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return S(this,Mn).get(t)}getAll(){return[...S(this,Mn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Mv(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Mv(t,r)):n}notify(t){He.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){He.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){He.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Mn=new WeakMap,Fx),Nn,gt,Mi,Ln,Sr,Mx,Y_=(Mx=class extends ab{constructor(t){super();X(this,Ln);X(this,Nn);X(this,gt);X(this,Mi);this.mutationId=t.mutationId,U(this,gt,t.mutationCache),U(this,Nn,[]),this.state=t.state||ub(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){S(this,Nn).includes(t)||(S(this,Nn).push(t),this.clearGcTimeout(),S(this,gt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){U(this,Nn,S(this,Nn).filter(n=>n!==t)),this.scheduleGc(),S(this,gt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){S(this,Nn).length||(this.state.status==="pending"?this.scheduleGc():S(this,gt).remove(this))}continue(){var t;return((t=S(this,Mi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,c,d,u,f,p,h,m,x,g,w,b,k,T,E,_;U(this,Mi,ob({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(P,M)=>{se(this,Ln,Sr).call(this,{type:"failed",failureCount:P,error:M})},onPause:()=>{se(this,Ln,Sr).call(this,{type:"pause"})},onContinue:()=>{se(this,Ln,Sr).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,gt).canRun(this)}));const n=this.state.status==="pending",r=!S(this,Mi).canStart();try{if(!n){se(this,Ln,Sr).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(i=S(this,gt).config).onMutate)==null?void 0:s.call(i,t,this));const M=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));M!==this.state.context&&se(this,Ln,Sr).call(this,{type:"pending",context:M,variables:t,isPaused:r})}const P=await S(this,Mi).start();return await((c=(l=S(this,gt).config).onSuccess)==null?void 0:c.call(l,P,t,this.state.context,this)),await((u=(d=this.options).onSuccess)==null?void 0:u.call(d,P,t,this.state.context)),await((p=(f=S(this,gt).config).onSettled)==null?void 0:p.call(f,P,null,this.state.variables,this.state.context,this)),await((m=(h=this.options).onSettled)==null?void 0:m.call(h,P,null,t,this.state.context)),se(this,Ln,Sr).call(this,{type:"success",data:P}),P}catch(P){try{throw await((g=(x=S(this,gt).config).onError)==null?void 0:g.call(x,P,t,this.state.context,this)),await((b=(w=this.options).onError)==null?void 0:b.call(w,P,t,this.state.context)),await((T=(k=S(this,gt).config).onSettled)==null?void 0:T.call(k,void 0,P,this.state.variables,this.state.context,this)),await((_=(E=this.options).onSettled)==null?void 0:_.call(E,void 0,P,t,this.state.context)),P}finally{se(this,Ln,Sr).call(this,{type:"error",error:P})}}finally{S(this,gt).runNext(this)}}},Nn=new WeakMap,gt=new WeakMap,Mi=new WeakMap,Ln=new WeakSet,Sr=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),He.batch(()=>{S(this,Nn).forEach(r=>{r.onMutationUpdate(t)}),S(this,gt).notify({mutation:this,type:"updated",action:t})})},Mx);function ub(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var It,Ha,Nx,K_=(Nx=class extends So{constructor(t={}){super();X(this,It);X(this,Ha);this.config=t,U(this,It,new Map),U(this,Ha,Date.now())}build(t,n,r){const i=new Y_({mutationCache:this,mutationId:++fl(this,Ha)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=Rl(t),r=S(this,It).get(n)??[];r.push(t),S(this,It).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=Rl(t);if(S(this,It).has(n)){const i=(r=S(this,It).get(n))==null?void 0:r.filter(s=>s!==t);i&&(i.length===0?S(this,It).delete(n):S(this,It).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=S(this,It).get(Rl(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=S(this,It).get(Rl(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){He.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...S(this,It).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Nv(n,r))}findAll(t={}){return this.getAll().filter(n=>Nv(t,n))}notify(t){He.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return He.batch(()=>Promise.all(t.map(n=>n.continue().catch(en))))}},It=new WeakMap,Ha=new WeakMap,Nx);function Rl(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function $v(e){return{onFetch:(t,n)=>{var d,u,f,p,h;const r=t.options,i=(f=(u=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:u.fetchMore)==null?void 0:f.direction,s=((p=t.state.data)==null?void 0:p.pages)||[],o=((h=t.state.data)==null?void 0:h.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let m=!1;const x=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},g=rb(t.options,t.fetchOptions),w=async(b,k,T)=>{if(m)return Promise.reject();if(k==null&&b.pages.length)return Promise.resolve(b);const E={queryKey:t.queryKey,pageParam:k,direction:T?"backward":"forward",meta:t.options.meta};x(E);const _=await g(E),{maxPages:P}=t.options,M=T?z_:B_;return{pages:M(b.pages,_,P),pageParams:M(b.pageParams,k,P)}};if(i&&s.length){const b=i==="backward",k=b?X_:Bv,T={pages:s,pageParams:o},E=k(r,T);a=await w(T,E,b)}else{const b=e??s.length;do{const k=l===0?o[0]??r.initialPageParam:Bv(r,a);if(l>0&&k==null)break;a=await w(a,k),l++}while(l<b)}return a};t.options.persister?t.fetchFn=()=>{var m,x;return(x=(m=t.options).persister)==null?void 0:x.call(m,c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function Bv(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 X_(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 De,Ar,Or,Ys,Ks,Dr,Xs,Zs,Lx,Z_=(Lx=class{constructor(e={}){X(this,De);X(this,Ar);X(this,Or);X(this,Ys);X(this,Ks);X(this,Dr);X(this,Xs);X(this,Zs);U(this,De,e.queryCache||new Q_),U(this,Ar,e.mutationCache||new K_),U(this,Or,e.defaultOptions||{}),U(this,Ys,new Map),U(this,Ks,new Map),U(this,Dr,0)}mount(){fl(this,Dr)._++,S(this,Dr)===1&&(U(this,Xs,sm.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,De).onFocus())})),U(this,Zs,$u.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,De).onOnline())})))}unmount(){var e,t;fl(this,Dr)._--,S(this,Dr)===0&&((e=S(this,Xs))==null||e.call(this),U(this,Xs,void 0),(t=S(this,Zs))==null||t.call(this),U(this,Zs,void 0))}isFetching(e){return S(this,De).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return S(this,Ar).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,De).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=S(this,De).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Us(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return S(this,De).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=S(this,De).get(r.queryHash),s=i==null?void 0:i.state.data,o=I_(t,s);if(o!==void 0)return S(this,De).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return He.batch(()=>S(this,De).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,De).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=S(this,De);He.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=S(this,De),r={type:"active",...e};return He.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=He.batch(()=>S(this,De).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(en).catch(en)}invalidateQueries(e,t={}){return He.batch(()=>{if(S(this,De).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=He.batch(()=>S(this,De).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(en)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(en)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=S(this,De).build(this,t);return n.isStaleByTime(Us(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(en).catch(en)}fetchInfiniteQuery(e){return e.behavior=$v(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(en).catch(en)}ensureInfiniteQueryData(e){return e.behavior=$v(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return $u.isOnline()?S(this,Ar).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,De)}getMutationCache(){return S(this,Ar)}getDefaultOptions(){return S(this,Or)}setDefaultOptions(e){U(this,Or,e)}setQueryDefaults(e,t){S(this,Ys).set(Ki(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...S(this,Ys).values()],n={};return t.forEach(r=>{Pa(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){S(this,Ks).set(Ki(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...S(this,Ks).values()];let n={};return t.forEach(r=>{Pa(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...S(this,Or).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=rm(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===im&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...S(this,Or).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){S(this,De).clear(),S(this,Ar).clear()}},De=new WeakMap,Ar=new WeakMap,Or=new WeakMap,Ys=new WeakMap,Ks=new WeakMap,Dr=new WeakMap,Xs=new WeakMap,Zs=new WeakMap,Lx),Et,le,Wa,vt,Ni,Js,Fr,In,qa,eo,to,Li,Ii,Mr,no,pe,Ho,rp,ip,sp,op,ap,lp,up,cb,Ix,J_=(Ix=class extends So{constructor(t,n){super();X(this,pe);X(this,Et);X(this,le);X(this,Wa);X(this,vt);X(this,Ni);X(this,Js);X(this,Fr);X(this,In);X(this,qa);X(this,eo);X(this,to);X(this,Li);X(this,Ii);X(this,Mr);X(this,no,new Set);this.options=n,U(this,Et,t),U(this,In,null),U(this,Fr,np()),this.options.experimental_prefetchInRender||S(this,Fr).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&&(S(this,le).addObserver(this),zv(S(this,le),this.options)?se(this,pe,Ho).call(this):this.updateResult(),se(this,pe,op).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return cp(S(this,le),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return cp(S(this,le),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,se(this,pe,ap).call(this),se(this,pe,lp).call(this),S(this,le).removeObserver(this)}setOptions(t,n){const r=this.options,i=S(this,le);if(this.options=S(this,Et).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Sn(this.options.enabled,S(this,le))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");se(this,pe,up).call(this),S(this,le).setOptions(this.options),r._defaulted&&!Iu(this.options,r)&&S(this,Et).getQueryCache().notify({type:"observerOptionsUpdated",query:S(this,le),observer:this});const s=this.hasListeners();s&&Vv(S(this,le),i,this.options,r)&&se(this,pe,Ho).call(this),this.updateResult(n),s&&(S(this,le)!==i||Sn(this.options.enabled,S(this,le))!==Sn(r.enabled,S(this,le))||Us(this.options.staleTime,S(this,le))!==Us(r.staleTime,S(this,le)))&&se(this,pe,rp).call(this);const o=se(this,pe,ip).call(this);s&&(S(this,le)!==i||Sn(this.options.enabled,S(this,le))!==Sn(r.enabled,S(this,le))||o!==S(this,Mr))&&se(this,pe,sp).call(this,o)}getOptimisticResult(t){const n=S(this,Et).getQueryCache().build(S(this,Et),t),r=this.createResult(n,t);return t2(this,r)&&(U(this,vt,r),U(this,Js,this.options),U(this,Ni,S(this,le).state)),r}getCurrentResult(){return S(this,vt)}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){S(this,no).add(t)}getCurrentQuery(){return S(this,le)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=S(this,Et).defaultQueryOptions(t),r=S(this,Et).getQueryCache().build(S(this,Et),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return se(this,pe,Ho).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),S(this,vt)))}createResult(t,n){var P;const r=S(this,le),i=this.options,s=S(this,vt),o=S(this,Ni),a=S(this,Js),c=t!==r?t.state:S(this,Wa),{state:d}=t;let u={...d},f=!1,p;if(n._optimisticResults){const M=this.hasListeners(),N=!M&&zv(t,n),R=M&&Vv(t,r,n,i);(N||R)&&(u={...u,...lb(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:h,errorUpdatedAt:m,status:x}=u;if(n.select&&u.data!==void 0)if(s&&u.data===(o==null?void 0:o.data)&&n.select===S(this,qa))p=S(this,eo);else try{U(this,qa,n.select),p=n.select(u.data),p=tp(s==null?void 0:s.data,p,n),U(this,eo,p),U(this,In,null)}catch(M){U(this,In,M)}else p=u.data;if(n.placeholderData!==void 0&&p===void 0&&x==="pending"){let M;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))M=s.data;else if(M=typeof n.placeholderData=="function"?n.placeholderData((P=S(this,to))==null?void 0:P.state.data,S(this,to)):n.placeholderData,n.select&&M!==void 0)try{M=n.select(M),U(this,In,null)}catch(N){U(this,In,N)}M!==void 0&&(x="success",p=tp(s==null?void 0:s.data,M,n),f=!0)}S(this,In)&&(h=S(this,In),p=S(this,eo),m=Date.now(),x="error");const g=u.fetchStatus==="fetching",w=x==="pending",b=x==="error",k=w&&g,T=p!==void 0,_={status:x,fetchStatus:u.fetchStatus,isPending:w,isSuccess:x==="success",isError:b,isInitialLoading:k,isLoading:k,data:p,dataUpdatedAt:u.dataUpdatedAt,error:h,errorUpdatedAt:m,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:g,isRefetching:g&&!w,isLoadingError:b&&!T,isPaused:u.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:b&&T,isStale:om(t,n),refetch:this.refetch,promise:S(this,Fr)};if(this.options.experimental_prefetchInRender){const M=F=>{_.status==="error"?F.reject(_.error):_.data!==void 0&&F.resolve(_.data)},N=()=>{const F=U(this,Fr,_.promise=np());M(F)},R=S(this,Fr);switch(R.status){case"pending":t.queryHash===r.queryHash&&M(R);break;case"fulfilled":(_.status==="error"||_.data!==R.value)&&N();break;case"rejected":(_.status!=="error"||_.error!==R.reason)&&N();break}}return _}updateResult(t){const n=S(this,vt),r=this.createResult(S(this,le),this.options);if(U(this,Ni,S(this,le).state),U(this,Js,this.options),S(this,Ni).data!==void 0&&U(this,to,S(this,le)),Iu(r,n))return;U(this,vt,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!S(this,no).size)return!0;const l=new Set(a??S(this,no));return this.options.throwOnError&&l.add("error"),Object.keys(S(this,vt)).some(c=>{const d=c;return S(this,vt)[d]!==n[d]&&l.has(d)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),se(this,pe,cb).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&se(this,pe,op).call(this)}},Et=new WeakMap,le=new WeakMap,Wa=new WeakMap,vt=new WeakMap,Ni=new WeakMap,Js=new WeakMap,Fr=new WeakMap,In=new WeakMap,qa=new WeakMap,eo=new WeakMap,to=new WeakMap,Li=new WeakMap,Ii=new WeakMap,Mr=new WeakMap,no=new WeakMap,pe=new WeakSet,Ho=function(t){se(this,pe,up).call(this);let n=S(this,le).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(en)),n},rp=function(){se(this,pe,ap).call(this);const t=Us(this.options.staleTime,S(this,le));if(Yi||S(this,vt).isStale||!Jf(t))return;const r=tb(S(this,vt).dataUpdatedAt,t)+1;U(this,Li,setTimeout(()=>{S(this,vt).isStale||this.updateResult()},r))},ip=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(S(this,le)):this.options.refetchInterval)??!1},sp=function(t){se(this,pe,lp).call(this),U(this,Mr,t),!(Yi||Sn(this.options.enabled,S(this,le))===!1||!Jf(S(this,Mr))||S(this,Mr)===0)&&U(this,Ii,setInterval(()=>{(this.options.refetchIntervalInBackground||sm.isFocused())&&se(this,pe,Ho).call(this)},S(this,Mr)))},op=function(){se(this,pe,rp).call(this),se(this,pe,sp).call(this,se(this,pe,ip).call(this))},ap=function(){S(this,Li)&&(clearTimeout(S(this,Li)),U(this,Li,void 0))},lp=function(){S(this,Ii)&&(clearInterval(S(this,Ii)),U(this,Ii,void 0))},up=function(){const t=S(this,Et).getQueryCache().build(S(this,Et),this.options);if(t===S(this,le))return;const n=S(this,le);U(this,le,t),U(this,Wa,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},cb=function(t){He.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(S(this,vt))}),S(this,Et).getQueryCache().notify({query:S(this,le),type:"observerResultsUpdated"})})},Ix);function e2(e,t){return Sn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function zv(e,t){return e2(e,t)||e.state.data!==void 0&&cp(e,t,t.refetchOnMount)}function cp(e,t,n){if(Sn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&om(e,t)}return!1}function Vv(e,t,n,r){return(e!==t||Sn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&om(e,n)}function om(e,t){return Sn(t.enabled,e)!==!1&&e.isStaleByTime(Us(t.staleTime,e))}function t2(e,t){return!Iu(e.getCurrentResult(),t)}var Nr,Lr,_t,ir,ur,tu,dp,$x,n2=($x=class extends So{constructor(t,n){super();X(this,ur);X(this,Nr);X(this,Lr);X(this,_t);X(this,ir);U(this,Nr,t),this.setOptions(n),this.bindMethods(),se(this,ur,tu).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=S(this,Nr).defaultMutationOptions(t),Iu(this.options,n)||S(this,Nr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:S(this,_t),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Ki(n.mutationKey)!==Ki(this.options.mutationKey)?this.reset():((r=S(this,_t))==null?void 0:r.state.status)==="pending"&&S(this,_t).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=S(this,_t))==null||t.removeObserver(this)}onMutationUpdate(t){se(this,ur,tu).call(this),se(this,ur,dp).call(this,t)}getCurrentResult(){return S(this,Lr)}reset(){var t;(t=S(this,_t))==null||t.removeObserver(this),U(this,_t,void 0),se(this,ur,tu).call(this),se(this,ur,dp).call(this)}mutate(t,n){var r;return U(this,ir,n),(r=S(this,_t))==null||r.removeObserver(this),U(this,_t,S(this,Nr).getMutationCache().build(S(this,Nr),this.options)),S(this,_t).addObserver(this),S(this,_t).execute(t)}},Nr=new WeakMap,Lr=new WeakMap,_t=new WeakMap,ir=new WeakMap,ur=new WeakSet,tu=function(){var n;const t=((n=S(this,_t))==null?void 0:n.state)??ub();U(this,Lr,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},dp=function(t){He.batch(()=>{var n,r,i,s,o,a,l,c;if(S(this,ir)&&this.hasListeners()){const d=S(this,Lr).variables,u=S(this,Lr).context;(t==null?void 0:t.type)==="success"?((r=(n=S(this,ir)).onSuccess)==null||r.call(n,t.data,d,u),(s=(i=S(this,ir)).onSettled)==null||s.call(i,t.data,null,d,u)):(t==null?void 0:t.type)==="error"&&((a=(o=S(this,ir)).onError)==null||a.call(o,t.error,d,u),(c=(l=S(this,ir)).onSettled)==null||c.call(l,void 0,t.error,d,u))}this.listeners.forEach(d=>{d(S(this,Lr))})})},$x),db=v.createContext(void 0),fb=e=>{const t=v.useContext(db);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},r2=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),y.jsx(db.Provider,{value:e,children:t})),pb=v.createContext(!1),i2=()=>v.useContext(pb);pb.Provider;function s2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var o2=v.createContext(s2()),a2=()=>v.useContext(o2);function hb(e,t){return typeof e=="function"?e(...t):!!e}function fp(){}var l2=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},u2=e=>{v.useEffect(()=>{e.clearReset()},[e])},c2=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&hb(n,[e.error,r]),d2=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},f2=(e,t)=>e.isLoading&&e.isFetching&&!t,p2=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Uv=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function h2(e,t,n){var d,u,f,p,h;const r=fb(),i=i2(),s=a2(),o=r.defaultQueryOptions(e);(u=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||u.call(d,o),o._optimisticResults=i?"isRestoring":"optimistic",d2(o),l2(o,s),u2(s);const a=!r.getQueryCache().get(o.queryHash),[l]=v.useState(()=>new t(r,o)),c=l.getOptimisticResult(o);if(v.useSyncExternalStore(v.useCallback(m=>{const x=i?fp:l.subscribe(He.batchCalls(m));return l.updateResult(),x},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),v.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),p2(o,c))throw Uv(o,l,s);if(c2({result:c,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw c.error;if((p=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||p.call(f,o,c),o.experimental_prefetchInRender&&!Yi&&f2(c,i)){const m=a?Uv(o,l,s):(h=r.getQueryCache().get(o.queryHash))==null?void 0:h.promise;m==null||m.catch(fp).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function m2(e,t){return h2(e,J_)}function am(e,t){const n=fb(),[r]=v.useState(()=>new n2(n,e));v.useEffect(()=>{r.setOptions(e)},[r,e]);const i=v.useSyncExternalStore(v.useCallback(o=>r.subscribe(He.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=v.useCallback((o,a)=>{r.mutate(o,a).catch(fp)},[r]);if(i.error&&hb(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const g2=(e,t)=>m2({queryKey:["widgets",e,t],queryFn:()=>v2(e,t),retry:!1,throwOnError:!1}),v2=async(e,t)=>{const n=`widgets/with-link/${e}${t?`?device_id=${t}`:""}`,[r,i]=await bo(n);if(i===204)throw new Error("User is banned");return r};var C=(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.CloseButtonBackground="widget_close_button_background",e.CloseButtonText="widget_close_button_text",e.CloseButtonHover="widget_close_button_hover",e.IconColor="widget_icon_color",e.IconBackground="widget_icon_background",e.ErrorBackground="widget_error_background",e.ErrorText="widget_error_text",e.ErrorBorder="widget_error_border",e.SuccessBackground="widget_success_background",e.SuccessText="widget_success_text",e.SuccessBorder="widget_success_border",e.WarningBackground="widget_warning_background",e.WarningText="widget_warning_text",e.WarningBorder="widget_warning_border",e.LinkColor="widget_link_color",e.LinkHoverColor="widget_link_hover_color",e.DividerColor="widget_divider_color",e.ShadowColor="widget_shadow_color",e.StarActiveColor="widget_star_active_color",e.StarInactiveColor="widget_star_inactive_color",e.ModalOverlayColor="widget_modal_overlay_color",e.ChatCloseConfirmText="widget_chat_close_confirm_text",e.RatingHeaderBackground="widget_rating_header_background",e.RatingHeaderText="widget_rating_header_text",e.RatingSuccessBackground="widget_rating_success_background",e.RatingSuccessText="widget_rating_success_text",e.RatingRateConversationText="widget_rating_rate_conversation_text",e))(C||{}),Y=(e=>(e.TooltipDefault="tooltip_default",e.TooltipActive="tooltip_active",e.CloseButtonAria="close_button_aria",e.MessagePlaceholder="message_placeholder",e.FileUploadDisabled="file_upload_disabled",e.NewMessagesNotification="new_messages_notification",e.ChatCloseConfirm="chat_close_confirm",e.ChatCloseWarning="chat_close_warning",e.ChatSettings="chat_settings",e.ChatEndConversation="chat_end_conversation",e.CancelAction="cancel_action",e.CloseAction="close_action",e.QuickActions="quick_actions",e.GreetingStartChat="greeting_start_chat",e.RateLimitMessage="rate_limit_message",e.RatingHeaderEvaluate="rating_header_evaluate",e.RatingHeaderThanks="rating_header_thanks",e.RatingDescription="rating_description",e.RatingRateConversation="rating_rate_conversation",e.RatingComment="rating_comment",e.RatingCommentPlaceholder="rating_comment_placeholder",e.RatingSubmit="rating_submit",e.RatingNewConversation="rating_new_conversation",e.RatingThankYouTitle="rating_thank_you_title",e.RatingThankYouDescription="rating_thank_you_description",e.RatingCountdown="rating_countdown",e.RatingMinimumError="rating_minimum_error",e.RatingYourScore="rating_your_score",e.PoweredBy="powered_by",e))(Y||{});function y2(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 Sd(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function $f(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var KE=typeof WeakMap=="function"?WeakMap:Map;function Cw(e,t,n){n=ur(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Mu||(Mu=!0,Yf=r),$f(e,t)},n}function Tw(e,t,n){n=ur(-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(){$f(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){$f(e,t),typeof r!="function"&&(Qr===null?Qr=new Set([this]):Qr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function gv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new KE;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=c_.bind(null,e,t,n),t.then(e,e))}function vv(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 yv(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=ur(-1,1),t.tag=2,Gr(n,t,1))),n.lanes|=1),e)}var XE=gr.ReactCurrentOwner,Rt=!1;function yt(e,t,n,r){t.child=e===null?ew(t,null,n,r):oo(t,e.child,n,r)}function xv(e,t,n,r,i){n=n.render;var s=t.ref;return zs(t,i),r=zh(e,t,n,r,s,i),n=Vh(),e!==null&&!Rt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,hr(e,t,i)):(_e&&n&&Ph(t),t.flags|=1,yt(e,t,r,i),t.child)}function wv(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!Zh(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Ew(e,t,s,r,i)):(e=eu(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:ya,n(o,r)&&e.ref===t.ref)return hr(e,t,i)}return t.flags|=1,e=Kr(s,r),e.ref=t.ref,e.return=t,t.child=e}function Ew(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(ya(s,r)&&e.ref===t.ref)if(Rt=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Rt=!0);else return t.lanes=e.lanes,hr(e,t,i)}return Bf(e,t,n,r,i)}function _w(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},Se(As,zt),zt|=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,Se(As,zt),zt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Se(As,zt),zt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,Se(As,zt),zt|=r;return yt(e,t,i,n),t.child}function jw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Bf(e,t,n,r,i){var s=Ft(n)?Hi:mt.current;return s=io(t,s),zs(t,i),n=zh(e,t,n,r,s,i),r=Vh(),e!==null&&!Rt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,hr(e,t,i)):(_e&&r&&Ph(t),t.flags|=1,yt(e,t,n,i),t.child)}function bv(e,t,n,r,i){if(Ft(n)){var s=!0;Cu(t)}else s=!1;if(zs(t,i),t.stateNode===null)Xl(e,t),kw(t,n,r),If(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=cn(u):(u=Ft(n)?Hi:mt.current,u=io(t,u));var d=n.getDerivedStateFromProps,c=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";c||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&mv(t,o,r,u),Er=!1;var f=t.memoizedState;o.state=f,Pu(t,r,o,i),l=t.memoizedState,a!==r||f!==l||Mt.current||Er?(typeof d=="function"&&(Lf(t,n,d,r),l=t.memoizedState),(a=Er||hv(t,n,a,r,f,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,nw(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:yn(t.type,a),o.props=u,c=t.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=cn(l):(l=Ft(n)?Hi:mt.current,l=io(t,l));var h=n.getDerivedStateFromProps;(d=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==c||f!==l)&&mv(t,o,r,l),Er=!1,f=t.memoizedState,o.state=f,Pu(t,r,o,i);var m=t.memoizedState;a!==c||f!==m||Mt.current||Er?(typeof h=="function"&&(Lf(t,n,h,r),m=t.memoizedState),(u=Er||hv(t,n,u,r,f,m,l)||!1)?(d||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&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===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&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return zf(e,t,n,r,s,i)}function zf(e,t,n,r,i,s){jw(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&ov(t,n,!1),hr(e,t,s);r=t.stateNode,XE.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=oo(t,e.child,null,s),t.child=oo(t,null,a,s)):yt(e,t,a,s),t.memoizedState=r.state,i&&ov(t,n,!0),t.child}function Pw(e){var t=e.stateNode;t.pendingContext?sv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&sv(e,t.context,!1),Lh(e,t.containerInfo)}function Sv(e,t,n,r,i){return so(),Rh(i),t.flags|=256,yt(e,t,n,r),t.child}var Vf={dehydrated:null,treeContext:null,retryLane:0};function Uf(e){return{baseLanes:e,cachePool:null,transitions:null}}function Aw(e,t,n){var r=t.pendingProps,i=Pe.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),Se(Pe,i&1),e===null)return Ff(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=hc(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=Uf(n),t.memoizedState=Vf,e):Wh(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return ZE(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=Kr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Kr(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?Uf(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=Vf,r}return s=e.child,e=s.sibling,r=Kr(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 Wh(e,t){return t=hc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function El(e,t,n,r){return r!==null&&Rh(r),oo(t,e.child,null,n),e=Wh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ZE(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=Sd(Error(I(422))),El(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=hc({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&&oo(t,e.child,null,o),t.child.memoizedState=Uf(o),t.memoizedState=Vf,s);if(!(t.mode&1))return El(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(I(419)),r=Sd(s,r,void 0),El(e,t,o,r)}if(a=(o&e.childLanes)!==0,Rt||a){if(r=Ze,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,pr(e,i),Tn(r,e,i,-1))}return Xh(),r=Sd(Error(I(421))),El(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=d_.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Vt=qr(i.nextSibling),Wt=t,_e=!0,Sn=null,e!==null&&(rn[sn++]=or,rn[sn++]=ar,rn[sn++]=Wi,or=e.id,ar=e.overflow,Wi=t),t=Wh(t,r.children),t.flags|=4096,t)}function kv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Nf(e.return,t,n)}function kd(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 Rw(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(yt(e,t,r.children,n),r=Pe.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&&kv(e,n,t);else if(e.tag===19)kv(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(Se(Pe,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&&Au(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),kd(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&&Au(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}kd(t,!0,n,null,s);break;case"together":kd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Xl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function hr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Gi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(I(153));if(t.child!==null){for(e=t.child,n=Kr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Kr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function JE(e,t,n){switch(t.tag){case 3:Pw(t),so();break;case 5:rw(t);break;case 1:Ft(t.type)&&Cu(t);break;case 4:Lh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Se(_u,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Se(Pe,Pe.current&1),t.flags|=128,null):n&t.child.childLanes?Aw(e,t,n):(Se(Pe,Pe.current&1),e=hr(e,t,n),e!==null?e.sibling:null);Se(Pe,Pe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Rw(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Se(Pe,Pe.current),r)break;return null;case 22:case 23:return t.lanes=0,_w(e,t,n)}return hr(e,t,n)}var Ow,Hf,Dw,Mw;Ow=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}};Hf=function(){};Dw=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,_i(Vn.current);var s=null;switch(n){case"input":i=ff(e,i),r=ff(e,r),s=[];break;case"select":i=Oe({},i,{value:void 0}),r=Oe({},r,{value:void 0}),s=[];break;case"textarea":i=mf(e,i),r=mf(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Su)}vf(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"&&(da.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"&&(da.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Ce("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)}};Mw=function(e,t,n,r){n!==r&&(t.flags|=4)};function Fo(e,t){if(!_e)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 ct(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 e_(e,t,n){var r=t.pendingProps;switch(Ah(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ct(t),null;case 1:return Ft(t.type)&&ku(),ct(t),null;case 3:return r=t.stateNode,ao(),Ee(Mt),Ee(mt),$h(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Cl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Sn!==null&&(Zf(Sn),Sn=null))),Hf(e,t),ct(t),null;case 5:Ih(t);var i=_i(ka.current);if(n=t.type,e!==null&&t.stateNode!=null)Dw(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(I(166));return ct(t),null}if(e=_i(Vn.current),Cl(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[$n]=t,r[ba]=s,e=(t.mode&1)!==0,n){case"dialog":Ce("cancel",r),Ce("close",r);break;case"iframe":case"object":case"embed":Ce("load",r);break;case"video":case"audio":for(i=0;i<Uo.length;i++)Ce(Uo[i],r);break;case"source":Ce("error",r);break;case"img":case"image":case"link":Ce("error",r),Ce("load",r);break;case"details":Ce("toggle",r);break;case"input":Og(r,s),Ce("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Ce("invalid",r);break;case"textarea":Mg(r,s),Ce("invalid",r)}vf(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&kl(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&kl(r.textContent,a,e),i=["children",""+a]):da.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&Ce("scroll",r)}switch(n){case"input":ml(r),Dg(r,s,!0);break;case"textarea":ml(r),Fg(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Su)}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=l1(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[$n]=t,e[ba]=r,Ow(e,t,!1,!1),t.stateNode=e;e:{switch(o=yf(n,r),n){case"dialog":Ce("cancel",e),Ce("close",e),i=r;break;case"iframe":case"object":case"embed":Ce("load",e),i=r;break;case"video":case"audio":for(i=0;i<Uo.length;i++)Ce(Uo[i],e);i=r;break;case"source":Ce("error",e),i=r;break;case"img":case"image":case"link":Ce("error",e),Ce("load",e),i=r;break;case"details":Ce("toggle",e),i=r;break;case"input":Og(e,r),i=ff(e,r),Ce("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Oe({},r,{value:void 0}),Ce("invalid",e);break;case"textarea":Mg(e,r),i=mf(e,r),Ce("invalid",e);break;default:i=r}vf(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?d1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&u1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&fa(e,l):typeof l=="number"&&fa(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(da.hasOwnProperty(s)?l!=null&&s==="onScroll"&&Ce("scroll",e):l!=null&&mh(e,s,l,o))}switch(n){case"input":ml(e),Dg(e,r,!1);break;case"textarea":ml(e),Fg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ni(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Ls(e,!!r.multiple,s,!1):r.defaultValue!=null&&Ls(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Su)}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 ct(t),null;case 6:if(e&&t.stateNode!=null)Mw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(I(166));if(n=_i(ka.current),_i(Vn.current),Cl(t)){if(r=t.stateNode,n=t.memoizedProps,r[$n]=t,(s=r.nodeValue!==n)&&(e=Wt,e!==null))switch(e.tag){case 3:kl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&kl(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[$n]=t,t.stateNode=r}return ct(t),null;case 13:if(Ee(Pe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(_e&&Vt!==null&&t.mode&1&&!(t.flags&128))Z1(),so(),t.flags|=98560,s=!1;else if(s=Cl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(I(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(I(317));s[$n]=t}else so(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ct(t),s=!1}else Sn!==null&&(Zf(Sn),Sn=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||Pe.current&1?qe===0&&(qe=3):Xh())),t.updateQueue!==null&&(t.flags|=4),ct(t),null);case 4:return ao(),Hf(e,t),e===null&&xa(t.stateNode.containerInfo),ct(t),null;case 10:return Mh(t.type._context),ct(t),null;case 17:return Ft(t.type)&&ku(),ct(t),null;case 19:if(Ee(Pe),s=t.memoizedState,s===null)return ct(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)Fo(s,!1);else{if(qe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Au(e),o!==null){for(t.flags|=128,Fo(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 Se(Pe,Pe.current&1|2),t.child}e=e.sibling}s.tail!==null&&Be()>uo&&(t.flags|=128,r=!0,Fo(s,!1),t.lanes=4194304)}else{if(!r)if(e=Au(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Fo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!_e)return ct(t),null}else 2*Be()-s.renderingStartTime>uo&&n!==1073741824&&(t.flags|=128,r=!0,Fo(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=Be(),t.sibling=null,n=Pe.current,Se(Pe,r?n&1|2:n&1),t):(ct(t),null);case 22:case 23:return Kh(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?zt&1073741824&&(ct(t),t.subtreeFlags&6&&(t.flags|=8192)):ct(t),null;case 24:return null;case 25:return null}throw Error(I(156,t.tag))}function t_(e,t){switch(Ah(t),t.tag){case 1:return Ft(t.type)&&ku(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ao(),Ee(Mt),Ee(mt),$h(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ih(t),null;case 13:if(Ee(Pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));so()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ee(Pe),null;case 4:return ao(),null;case 10:return Mh(t.type._context),null;case 22:case 23:return Kh(),null;case 24:return null;default:return null}}var _l=!1,pt=!1,n_=typeof WeakSet=="function"?WeakSet:Set,q=null;function Ps(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ne(e,t,r)}else n.current=null}function Wf(e,t,n){try{n()}catch(r){Ne(e,t,r)}}var Cv=!1;function r_(e,t){if(jf=xu,e=$1(),jh(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,d=0,c=e,f=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;)f=c,c=h;for(;;){if(c===e)break t;if(f===n&&++u===i&&(a=o),f===s&&++d===r&&(l=o),(h=c.nextSibling)!==null)break;c=f,f=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(Pf={focusedElem:e,selectionRange:n},xu=!1,q=t;q!==null;)if(t=q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,q=e;else for(;q!==null;){t=q;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 p=m.memoizedProps,w=m.memoizedState,g=t.stateNode,x=g.getSnapshotBeforeUpdate(t.elementType===t.type?p:yn(t.type,p),w);g.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(I(163))}}catch(T){Ne(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,q=e;break}q=t.return}return m=Cv,Cv=!1,m}function ea(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&&Wf(t,n,s)}i=i.next}while(i!==r)}}function fc(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 qf(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 Fw(e){var t=e.alternate;t!==null&&(e.alternate=null,Fw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[$n],delete t[ba],delete t[Of],delete t[$E],delete t[BE])),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 Nw(e){return e.tag===5||e.tag===3||e.tag===4}function Tv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Nw(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 Gf(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=Su));else if(r!==4&&(e=e.child,e!==null))for(Gf(e,t,n),e=e.sibling;e!==null;)Gf(e,t,n),e=e.sibling}function Qf(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(Qf(e,t,n),e=e.sibling;e!==null;)Qf(e,t,n),e=e.sibling}var it=null,wn=!1;function Sr(e,t,n){for(n=n.child;n!==null;)Lw(e,t,n),n=n.sibling}function Lw(e,t,n){if(zn&&typeof zn.onCommitFiberUnmount=="function")try{zn.onCommitFiberUnmount(ic,n)}catch{}switch(n.tag){case 5:pt||Ps(n,t);case 6:var r=it,i=wn;it=null,Sr(e,t,n),it=r,wn=i,it!==null&&(wn?(e=it,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):it.removeChild(n.stateNode));break;case 18:it!==null&&(wn?(e=it,n=n.stateNode,e.nodeType===8?gd(e.parentNode,n):e.nodeType===1&&gd(e,n),ga(e)):gd(it,n.stateNode));break;case 4:r=it,i=wn,it=n.stateNode.containerInfo,wn=!0,Sr(e,t,n),it=r,wn=i;break;case 0:case 11:case 14:case 15:if(!pt&&(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)&&Wf(n,t,o),i=i.next}while(i!==r)}Sr(e,t,n);break;case 1:if(!pt&&(Ps(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ne(n,t,a)}Sr(e,t,n);break;case 21:Sr(e,t,n);break;case 22:n.mode&1?(pt=(r=pt)||n.memoizedState!==null,Sr(e,t,n),pt=r):Sr(e,t,n);break;default:Sr(e,t,n)}}function Ev(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new n_),t.forEach(function(r){var i=f_.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function mn(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:it=a.stateNode,wn=!1;break e;case 3:it=a.stateNode.containerInfo,wn=!0;break e;case 4:it=a.stateNode.containerInfo,wn=!0;break e}a=a.return}if(it===null)throw Error(I(160));Lw(s,o,i),it=null,wn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){Ne(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Iw(t,e),t=t.sibling}function Iw(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(mn(t,e),An(e),r&4){try{ea(3,e,e.return),fc(3,e)}catch(p){Ne(e,e.return,p)}try{ea(5,e,e.return)}catch(p){Ne(e,e.return,p)}}break;case 1:mn(t,e),An(e),r&512&&n!==null&&Ps(n,n.return);break;case 5:if(mn(t,e),An(e),r&512&&n!==null&&Ps(n,n.return),e.flags&32){var i=e.stateNode;try{fa(i,"")}catch(p){Ne(e,e.return,p)}}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&&o1(i,s),yf(a,o);var u=yf(a,s);for(o=0;o<l.length;o+=2){var d=l[o],c=l[o+1];d==="style"?d1(i,c):d==="dangerouslySetInnerHTML"?u1(i,c):d==="children"?fa(i,c):mh(i,d,c,u)}switch(a){case"input":pf(i,s);break;case"textarea":a1(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?Ls(i,!!s.multiple,h,!1):f!==!!s.multiple&&(s.defaultValue!=null?Ls(i,!!s.multiple,s.defaultValue,!0):Ls(i,!!s.multiple,s.multiple?[]:"",!1))}i[ba]=s}catch(p){Ne(e,e.return,p)}}break;case 6:if(mn(t,e),An(e),r&4){if(e.stateNode===null)throw Error(I(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(p){Ne(e,e.return,p)}}break;case 3:if(mn(t,e),An(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ga(t.containerInfo)}catch(p){Ne(e,e.return,p)}break;case 4:mn(t,e),An(e);break;case 13:mn(t,e),An(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Qh=Be())),r&4&&Ev(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(pt=(u=pt)||d,mn(t,e),pt=u):mn(t,e),An(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(q=e,d=e.child;d!==null;){for(c=q=d;q!==null;){switch(f=q,h=f.child,f.tag){case 0:case 11:case 14:case 15:ea(4,f,f.return);break;case 1:Ps(f,f.return);var m=f.stateNode;if(typeof m.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(p){Ne(r,n,p)}}break;case 5:Ps(f,f.return);break;case 22:if(f.memoizedState!==null){jv(c);continue}}h!==null?(h.return=f,q=h):jv(c)}d=d.sibling}e:for(d=null,c=e;;){if(c.tag===5){if(d===null){d=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=c1("display",o))}catch(p){Ne(e,e.return,p)}}}else if(c.tag===6){if(d===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(p){Ne(e,e.return,p)}}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;d===c&&(d=null),c=c.return}d===c&&(d=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:mn(t,e),An(e),r&4&&Ev(e);break;case 21:break;default:mn(t,e),An(e)}}function An(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Nw(n)){var r=n;break e}n=n.return}throw Error(I(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(fa(i,""),r.flags&=-33);var s=Tv(e);Qf(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Tv(e);Gf(e,a,o);break;default:throw Error(I(161))}}catch(l){Ne(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function i_(e,t,n){q=e,$w(e)}function $w(e,t,n){for(var r=(e.mode&1)!==0;q!==null;){var i=q,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||_l;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||pt;a=_l;var u=pt;if(_l=o,(pt=l)&&!u)for(q=i;q!==null;)o=q,l=o.child,o.tag===22&&o.memoizedState!==null?Pv(i):l!==null?(l.return=o,q=l):Pv(i);for(;s!==null;)q=s,$w(s),s=s.sibling;q=i,_l=a,pt=u}_v(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,q=s):_v(e)}}function _v(e){for(;q!==null;){var t=q;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:pt||fc(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!pt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:yn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&dv(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}dv(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 d=u.memoizedState;if(d!==null){var c=d.dehydrated;c!==null&&ga(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(I(163))}pt||t.flags&512&&qf(t)}catch(f){Ne(t,t.return,f)}}if(t===e){q=null;break}if(n=t.sibling,n!==null){n.return=t.return,q=n;break}q=t.return}}function jv(e){for(;q!==null;){var t=q;if(t===e){q=null;break}var n=t.sibling;if(n!==null){n.return=t.return,q=n;break}q=t.return}}function Pv(e){for(;q!==null;){var t=q;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{fc(4,t)}catch(l){Ne(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Ne(t,i,l)}}var s=t.return;try{qf(t)}catch(l){Ne(t,s,l)}break;case 5:var o=t.return;try{qf(t)}catch(l){Ne(t,o,l)}}}catch(l){Ne(t,t.return,l)}if(t===e){q=null;break}var a=t.sibling;if(a!==null){a.return=t.return,q=a;break}q=t.return}}var s_=Math.ceil,Du=gr.ReactCurrentDispatcher,qh=gr.ReactCurrentOwner,ln=gr.ReactCurrentBatchConfig,fe=0,Ze=null,ze=null,ot=0,zt=0,As=li(0),qe=0,_a=null,Gi=0,pc=0,Gh=0,ta=null,Pt=null,Qh=0,uo=1/0,tr=null,Mu=!1,Yf=null,Qr=null,jl=!1,Br=null,Fu=0,na=0,Kf=null,Zl=-1,Jl=0;function wt(){return fe&6?Be():Zl!==-1?Zl:Zl=Be()}function Yr(e){return e.mode&1?fe&2&&ot!==0?ot&-ot:VE.transition!==null?(Jl===0&&(Jl=k1()),Jl):(e=me,e!==0||(e=window.event,e=e===void 0?16:A1(e.type)),e):1}function Tn(e,t,n,r){if(50<na)throw na=0,Kf=null,Error(I(185));Qa(e,n,r),(!(fe&2)||e!==Ze)&&(e===Ze&&(!(fe&2)&&(pc|=n),qe===4&&Pr(e,ot)),Nt(e,r),n===1&&fe===0&&!(t.mode&1)&&(uo=Be()+500,uc&&ui()))}function Nt(e,t){var n=e.callbackNode;VT(e,t);var r=yu(e,e===Ze?ot:0);if(r===0)n!==null&&Ig(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Ig(n),t===1)e.tag===0?zE(Av.bind(null,e)):Y1(Av.bind(null,e)),LE(function(){!(fe&6)&&ui()}),n=null;else{switch(C1(r)){case 1:n=wh;break;case 4:n=b1;break;case 16:n=vu;break;case 536870912:n=S1;break;default:n=vu}n=Gw(n,Bw.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Bw(e,t){if(Zl=-1,Jl=0,fe&6)throw Error(I(327));var n=e.callbackNode;if(Vs()&&e.callbackNode!==n)return null;var r=yu(e,e===Ze?ot:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Nu(e,r);else{t=r;var i=fe;fe|=2;var s=Vw();(Ze!==e||ot!==t)&&(tr=null,uo=Be()+500,$i(e,t));do try{l_();break}catch(a){zw(e,a)}while(!0);Dh(),Du.current=s,fe=i,ze!==null?t=0:(Ze=null,ot=0,t=qe)}if(t!==0){if(t===2&&(i=kf(e),i!==0&&(r=i,t=Xf(e,i))),t===1)throw n=_a,$i(e,0),Pr(e,r),Nt(e,Be()),n;if(t===6)Pr(e,r);else{if(i=e.current.alternate,!(r&30)&&!o_(i)&&(t=Nu(e,r),t===2&&(s=kf(e),s!==0&&(r=s,t=Xf(e,s))),t===1))throw n=_a,$i(e,0),Pr(e,r),Nt(e,Be()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(I(345));case 2:wi(e,Pt,tr);break;case 3:if(Pr(e,r),(r&130023424)===r&&(t=Qh+500-Be(),10<t)){if(yu(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){wt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Rf(wi.bind(null,e,Pt,tr),t);break}wi(e,Pt,tr);break;case 4:if(Pr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-Cn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=Be()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*s_(r/1960))-r,10<r){e.timeoutHandle=Rf(wi.bind(null,e,Pt,tr),r);break}wi(e,Pt,tr);break;case 5:wi(e,Pt,tr);break;default:throw Error(I(329))}}}return Nt(e,Be()),e.callbackNode===n?Bw.bind(null,e):null}function Xf(e,t){var n=ta;return e.current.memoizedState.isDehydrated&&($i(e,t).flags|=256),e=Nu(e,t),e!==2&&(t=Pt,Pt=n,t!==null&&Zf(t)),e}function Zf(e){Pt===null?Pt=e:Pt.push.apply(Pt,e)}function o_(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(!En(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&=~Gh,t&=~pc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Cn(t),r=1<<n;e[n]=-1,t&=~r}}function Av(e){if(fe&6)throw Error(I(327));Vs();var t=yu(e,0);if(!(t&1))return Nt(e,Be()),null;var n=Nu(e,t);if(e.tag!==0&&n===2){var r=kf(e);r!==0&&(t=r,n=Xf(e,r))}if(n===1)throw n=_a,$i(e,0),Pr(e,t),Nt(e,Be()),n;if(n===6)throw Error(I(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wi(e,Pt,tr),Nt(e,Be()),null}function Yh(e,t){var n=fe;fe|=1;try{return e(t)}finally{fe=n,fe===0&&(uo=Be()+500,uc&&ui())}}function Qi(e){Br!==null&&Br.tag===0&&!(fe&6)&&Vs();var t=fe;fe|=1;var n=ln.transition,r=me;try{if(ln.transition=null,me=1,e)return e()}finally{me=r,ln.transition=n,fe=t,!(fe&6)&&ui()}}function Kh(){zt=As.current,Ee(As)}function $i(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,NE(n)),ze!==null)for(n=ze.return;n!==null;){var r=n;switch(Ah(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ku();break;case 3:ao(),Ee(Mt),Ee(mt),$h();break;case 5:Ih(r);break;case 4:ao();break;case 13:Ee(Pe);break;case 19:Ee(Pe);break;case 10:Mh(r.type._context);break;case 22:case 23:Kh()}n=n.return}if(Ze=e,ze=e=Kr(e.current,null),ot=zt=t,qe=0,_a=null,Gh=pc=Gi=0,Pt=ta=null,Ei!==null){for(t=0;t<Ei.length;t++)if(n=Ei[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}Ei=null}return e}function zw(e,t){do{var n=ze;try{if(Dh(),Yl.current=Ou,Ru){for(var r=Re.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Ru=!1}if(qi=0,Xe=He=Re=null,Jo=!1,Ca=0,qh.current=null,n===null||n.return===null){qe=1,_a=t,ze=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=ot,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=a,c=d.tag;if(!(d.mode&1)&&(c===0||c===11||c===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var h=vv(o);if(h!==null){h.flags&=-257,yv(h,o,a,s,t),h.mode&1&&gv(s,u,t),t=h,l=u;var m=t.updateQueue;if(m===null){var p=new Set;p.add(l),t.updateQueue=p}else m.add(l);break e}else{if(!(t&1)){gv(s,u,t),Xh();break e}l=Error(I(426))}}else if(_e&&a.mode&1){var w=vv(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),yv(w,o,a,s,t),Rh(lo(l,a));break e}}s=l=lo(l,a),qe!==4&&(qe=2),ta===null?ta=[s]:ta.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var g=Cw(s,l,t);cv(s,g);break e;case 1:a=l;var x=s.type,b=s.stateNode;if(!(s.flags&128)&&(typeof x.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Qr===null||!Qr.has(b)))){s.flags|=65536,t&=-t,s.lanes|=t;var T=Tw(s,a,t);cv(s,T);break e}}s=s.return}while(s!==null)}Hw(n)}catch(E){t=E,ze===n&&n!==null&&(ze=n=n.return);continue}break}while(!0)}function Vw(){var e=Du.current;return Du.current=Ou,e===null?Ou:e}function Xh(){(qe===0||qe===3||qe===2)&&(qe=4),Ze===null||!(Gi&268435455)&&!(pc&268435455)||Pr(Ze,ot)}function Nu(e,t){var n=fe;fe|=2;var r=Vw();(Ze!==e||ot!==t)&&(tr=null,$i(e,t));do try{a_();break}catch(i){zw(e,i)}while(!0);if(Dh(),fe=n,Du.current=r,ze!==null)throw Error(I(261));return Ze=null,ot=0,qe}function a_(){for(;ze!==null;)Uw(ze)}function l_(){for(;ze!==null&&!DT();)Uw(ze)}function Uw(e){var t=qw(e.alternate,e,zt);e.memoizedProps=e.pendingProps,t===null?Hw(e):ze=t,qh.current=null}function Hw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=t_(n,t),n!==null){n.flags&=32767,ze=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{qe=6,ze=null;return}}else if(n=e_(n,t,zt),n!==null){ze=n;return}if(t=t.sibling,t!==null){ze=t;return}ze=t=e}while(t!==null);qe===0&&(qe=5)}function wi(e,t,n){var r=me,i=ln.transition;try{ln.transition=null,me=1,u_(e,t,n,r)}finally{ln.transition=i,me=r}return null}function u_(e,t,n,r){do Vs();while(Br!==null);if(fe&6)throw Error(I(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(I(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(UT(e,s),e===Ze&&(ze=Ze=null,ot=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||jl||(jl=!0,Gw(vu,function(){return Vs(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=ln.transition,ln.transition=null;var o=me;me=1;var a=fe;fe|=4,qh.current=null,r_(e,n),Iw(n,e),PE(Pf),xu=!!jf,Pf=jf=null,e.current=n,i_(n),MT(),fe=a,me=o,ln.transition=s}else e.current=n;if(jl&&(jl=!1,Br=e,Fu=i),s=e.pendingLanes,s===0&&(Qr=null),LT(n.stateNode),Nt(e,Be()),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(Mu)throw Mu=!1,e=Yf,Yf=null,e;return Fu&1&&e.tag!==0&&Vs(),s=e.pendingLanes,s&1?e===Kf?na++:(na=0,Kf=e):na=0,ui(),null}function Vs(){if(Br!==null){var e=C1(Fu),t=ln.transition,n=me;try{if(ln.transition=null,me=16>e?16:e,Br===null)var r=!1;else{if(e=Br,Br=null,Fu=0,fe&6)throw Error(I(331));var i=fe;for(fe|=4,q=e.current;q!==null;){var s=q,o=s.child;if(q.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(q=u;q!==null;){var d=q;switch(d.tag){case 0:case 11:case 15:ea(8,d,s)}var c=d.child;if(c!==null)c.return=d,q=c;else for(;q!==null;){d=q;var f=d.sibling,h=d.return;if(Fw(d),d===u){q=null;break}if(f!==null){f.return=h,q=f;break}q=h}}}var m=s.alternate;if(m!==null){var p=m.child;if(p!==null){m.child=null;do{var w=p.sibling;p.sibling=null,p=w}while(p!==null)}}q=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,q=o;else e:for(;q!==null;){if(s=q,s.flags&2048)switch(s.tag){case 0:case 11:case 15:ea(9,s,s.return)}var g=s.sibling;if(g!==null){g.return=s.return,q=g;break e}q=s.return}}var x=e.current;for(q=x;q!==null;){o=q;var b=o.child;if(o.subtreeFlags&2064&&b!==null)b.return=o,q=b;else e:for(o=x;q!==null;){if(a=q,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:fc(9,a)}}catch(E){Ne(a,a.return,E)}if(a===o){q=null;break e}var T=a.sibling;if(T!==null){T.return=a.return,q=T;break e}q=a.return}}if(fe=i,ui(),zn&&typeof zn.onPostCommitFiberRoot=="function")try{zn.onPostCommitFiberRoot(ic,e)}catch{}r=!0}return r}finally{me=n,ln.transition=t}}return!1}function Rv(e,t,n){t=lo(n,t),t=Cw(e,t,1),e=Gr(e,t,1),t=wt(),e!==null&&(Qa(e,1,t),Nt(e,t))}function Ne(e,t,n){if(e.tag===3)Rv(e,e,n);else for(;t!==null;){if(t.tag===3){Rv(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Qr===null||!Qr.has(r))){e=lo(n,e),e=Tw(t,e,1),t=Gr(t,e,1),e=wt(),t!==null&&(Qa(t,1,e),Nt(t,e));break}}t=t.return}}function c_(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=wt(),e.pingedLanes|=e.suspendedLanes&n,Ze===e&&(ot&n)===n&&(qe===4||qe===3&&(ot&130023424)===ot&&500>Be()-Qh?$i(e,0):Gh|=n),Nt(e,t)}function Ww(e,t){t===0&&(e.mode&1?(t=yl,yl<<=1,!(yl&130023424)&&(yl=4194304)):t=1);var n=wt();e=pr(e,t),e!==null&&(Qa(e,t,n),Nt(e,n))}function d_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ww(e,n)}function f_(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(I(314))}r!==null&&r.delete(t),Ww(e,n)}var qw;qw=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Mt.current)Rt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Rt=!1,JE(e,t,n);Rt=!!(e.flags&131072)}else Rt=!1,_e&&t.flags&1048576&&K1(t,Eu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Xl(e,t),e=t.pendingProps;var i=io(t,mt.current);zs(t,n),i=zh(null,t,r,e,i,n);var s=Vh();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,Ft(r)?(s=!0,Cu(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Nh(t),i.updater=dc,t.stateNode=i,i._reactInternals=t,If(t,r,e,n),t=zf(null,t,r,!0,s,n)):(t.tag=0,_e&&s&&Ph(t),yt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Xl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=h_(r),e=yn(r,e),i){case 0:t=Bf(null,t,r,e,n);break e;case 1:t=bv(null,t,r,e,n);break e;case 11:t=xv(null,t,r,e,n);break e;case 14:t=wv(null,t,r,yn(r.type,e),n);break e}throw Error(I(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:yn(r,i),Bf(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:yn(r,i),bv(e,t,r,i,n);case 3:e:{if(Pw(t),e===null)throw Error(I(387));r=t.pendingProps,s=t.memoizedState,i=s.element,nw(e,t),Pu(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=lo(Error(I(423)),t),t=Sv(e,t,r,n,i);break e}else if(r!==i){i=lo(Error(I(424)),t),t=Sv(e,t,r,n,i);break e}else for(Vt=qr(t.stateNode.containerInfo.firstChild),Wt=t,_e=!0,Sn=null,n=ew(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(so(),r===i){t=hr(e,t,n);break e}yt(e,t,r,n)}t=t.child}return t;case 5:return rw(t),e===null&&Ff(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Af(r,i)?o=null:s!==null&&Af(r,s)&&(t.flags|=32),jw(e,t),yt(e,t,o,n),t.child;case 6:return e===null&&Ff(t),null;case 13:return Aw(e,t,n);case 4:return Lh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=oo(t,null,r,n):yt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:yn(r,i),xv(e,t,r,i,n);case 7:return yt(e,t,t.pendingProps,n),t.child;case 8:return yt(e,t,t.pendingProps.children,n),t.child;case 12:return yt(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,Se(_u,r._currentValue),r._currentValue=o,s!==null)if(En(s.value,o)){if(s.children===i.children&&!Mt.current){t=hr(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=ur(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Nf(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(I(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Nf(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}yt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,zs(t,n),i=cn(i),r=r(i),t.flags|=1,yt(e,t,r,n),t.child;case 14:return r=t.type,i=yn(r,t.pendingProps),i=yn(r.type,i),wv(e,t,r,i,n);case 15:return Ew(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:yn(r,i),Xl(e,t),t.tag=1,Ft(r)?(e=!0,Cu(t)):e=!1,zs(t,n),kw(t,r,i),If(t,r,i,n),zf(null,t,r,!0,e,n);case 19:return Rw(e,t,n);case 22:return _w(e,t,n)}throw Error(I(156,t.tag))};function Gw(e,t){return w1(e,t)}function p_(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 an(e,t,n,r){return new p_(e,t,n,r)}function Zh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function h_(e){if(typeof e=="function")return Zh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===vh)return 11;if(e===yh)return 14}return 2}function Kr(e,t){var n=e.alternate;return n===null?(n=an(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 eu(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")Zh(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case ws:return Bi(n.children,i,s,t);case gh:o=8,i|=8;break;case lf:return e=an(12,n,t,i|2),e.elementType=lf,e.lanes=s,e;case uf:return e=an(13,n,t,i),e.elementType=uf,e.lanes=s,e;case cf:return e=an(19,n,t,i),e.elementType=cf,e.lanes=s,e;case r1:return hc(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case t1:o=10;break e;case n1:o=9;break e;case vh:o=11;break e;case yh:o=14;break e;case Tr:o=16,r=null;break e}throw Error(I(130,e==null?e:typeof e,""))}return t=an(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Bi(e,t,n,r){return e=an(7,e,r,t),e.lanes=n,e}function hc(e,t,n,r){return e=an(22,e,r,t),e.elementType=r1,e.lanes=n,e.stateNode={isHidden:!1},e}function Cd(e,t,n){return e=an(6,e,null,t),e.lanes=n,e}function Td(e,t,n){return t=an(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function m_(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=sd(0),this.expirationTimes=sd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=sd(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Jh(e,t,n,r,i,s,o,a,l){return e=new m_(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=an(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Nh(s),e}function g_(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:xs,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Qw(e){if(!e)return ri;e=e._reactInternals;e:{if(es(e)!==e||e.tag!==1)throw Error(I(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ft(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(I(171))}if(e.tag===1){var n=e.type;if(Ft(n))return Q1(e,n,t)}return t}function Yw(e,t,n,r,i,s,o,a,l){return e=Jh(n,r,!0,e,i,s,o,a,l),e.context=Qw(null),n=e.current,r=wt(),i=Yr(n),s=ur(r,i),s.callback=t??null,Gr(n,s,i),e.current.lanes=i,Qa(e,i,r),Nt(e,r),e}function mc(e,t,n,r){var i=t.current,s=wt(),o=Yr(i);return n=Qw(n),t.context===null?t.context=n:t.pendingContext=n,t=ur(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Gr(i,t,o),e!==null&&(Tn(e,i,o,s),Ql(e,i,o)),o}function Lu(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 Ov(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function em(e,t){Ov(e,t),(e=e.alternate)&&Ov(e,t)}function v_(){return null}var Kw=typeof reportError=="function"?reportError:function(e){console.error(e)};function tm(e){this._internalRoot=e}gc.prototype.render=tm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(I(409));mc(e,t,null,null)};gc.prototype.unmount=tm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Qi(function(){mc(null,e,null,null)}),t[fr]=null}};function gc(e){this._internalRoot=e}gc.prototype.unstable_scheduleHydration=function(e){if(e){var t=_1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<jr.length&&t!==0&&t<jr[n].priority;n++);jr.splice(n,0,e),n===0&&P1(e)}};function nm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function vc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Dv(){}function y_(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=Lu(o);s.call(u)}}var o=Yw(t,r,e,0,null,!1,!1,"",Dv);return e._reactRootContainer=o,e[fr]=o.current,xa(e.nodeType===8?e.parentNode:e),Qi(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=Lu(l);a.call(u)}}var l=Jh(e,0,!1,null,null,!1,!1,"",Dv);return e._reactRootContainer=l,e[fr]=l.current,xa(e.nodeType===8?e.parentNode:e),Qi(function(){mc(t,l,n,r)}),l}function yc(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=Lu(o);a.call(l)}}mc(t,o,e,i)}else o=y_(n,t,e,i,r);return Lu(o)}T1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Vo(t.pendingLanes);n!==0&&(bh(t,n|1),Nt(t,Be()),!(fe&6)&&(uo=Be()+500,ui()))}break;case 13:Qi(function(){var r=pr(e,1);if(r!==null){var i=wt();Tn(r,e,1,i)}}),em(e,1)}};Sh=function(e){if(e.tag===13){var t=pr(e,134217728);if(t!==null){var n=wt();Tn(t,e,134217728,n)}em(e,134217728)}};E1=function(e){if(e.tag===13){var t=Yr(e),n=pr(e,t);if(n!==null){var r=wt();Tn(n,e,t,r)}em(e,t)}};_1=function(){return me};j1=function(e,t){var n=me;try{return me=e,t()}finally{me=n}};wf=function(e,t,n){switch(t){case"input":if(pf(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=lc(r);if(!i)throw Error(I(90));s1(r),pf(r,i)}}}break;case"textarea":a1(e,n);break;case"select":t=n.value,t!=null&&Ls(e,!!n.multiple,t,!1)}};h1=Yh;m1=Qi;var x_={usingClientEntryPoint:!1,Events:[Ka,Cs,lc,f1,p1,Yh]},No={findFiberByHostInstance:Ti,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},w_={bundleType:No.bundleType,version:No.version,rendererPackageName:No.rendererPackageName,rendererConfig:No.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:gr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=y1(e),e===null?null:e.stateNode},findFiberByHostInstance:No.findFiberByHostInstance||v_,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 Pl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pl.isDisabled&&Pl.supportsFiber)try{ic=Pl.inject(w_),zn=Pl}catch{}}Gt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=x_;Gt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!nm(t))throw Error(I(200));return g_(e,t,null,n)};Gt.createRoot=function(e,t){if(!nm(e))throw Error(I(299));var n=!1,r="",i=Kw;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Jh(e,1,!1,null,null,n,!1,r,i),e[fr]=t.current,xa(e.nodeType===8?e.parentNode:e),new tm(t)};Gt.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(I(188)):(e=Object.keys(e).join(","),Error(I(268,e)));return e=y1(t),e=e===null?null:e.stateNode,e};Gt.flushSync=function(e){return Qi(e)};Gt.hydrate=function(e,t,n){if(!vc(t))throw Error(I(200));return yc(null,e,t,!0,n)};Gt.hydrateRoot=function(e,t,n){if(!nm(e))throw Error(I(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=Kw;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Yw(t,null,e,1,n??null,i,!1,s,o),e[fr]=t.current,xa(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 gc(t)};Gt.render=function(e,t,n){if(!vc(t))throw Error(I(200));return yc(null,e,t,!1,n)};Gt.unmountComponentAtNode=function(e){if(!vc(e))throw Error(I(40));return e._reactRootContainer?(Qi(function(){yc(null,null,e,!1,function(){e._reactRootContainer=null,e[fr]=null})}),!0):!1};Gt.unstable_batchedUpdates=Yh;Gt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!vc(n))throw Error(I(200));if(e==null||e._reactInternals===void 0)throw Error(I(38));return yc(e,t,n,!1,r)};Gt.version="18.3.1-next-f1338f8080-20240426";function Xw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Xw)}catch(e){console.error(e)}}Xw(),Xx.exports=Gt;var Zw=Xx.exports;const b_=Zi(Zw);var Jw,Mv=Zw;Jw=Mv.createRoot,Mv.hydrateRoot;const S_="@alfatech/livechat",k_="v2025.11.10.1",C_="module",T_="https://api-live.alfatek.dev",E_="wss://api-live.alfatek.dev",__=["dist","README.md","component/chatier.js"],j_="dist/widget.js",P_={dev:"vite",dev2:"vite --config vite.config.2.ts",build:"tsc -b && vite build",lint:"biome lint --write",prepare:"husky",format:"biome format --write && yarn lint"},A_={"@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","lucide-react":"^0.511.0",react:"^18.3.1","react-dom":"^18.3.1","react-dropzone":"^14.3.8","react-router-dom":"^6.26.2","socket.io-client":"^4.8.1",sonner:"^2.0.1",yup:"^1.4.0",zustand:"^4.5.5"},R_={"@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"},eb={name:S_,private:!1,version:k_,type:C_,apiURL:T_,wsURL:E_,files:__,main:j_,scripts:P_,dependencies:A_,devDependencies:R_,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},O_=eb.apiURL,D_=eb.wsURL,M_=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],F_=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],N_={429:M_,404:F_};async function bo(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=await fetch(`${O_}/${e}`,{...t,credentials:"include",headers:{...t.headers,...n}}).catch(s=>new Response(null,{status:500}));if(!r.ok){let s={};try{return s=await r.json(),[s,r.status]}catch{}const o=N_[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 Za=e=>[200,201,204].includes(e),L_=(e,{arrayWithBrackets:t=!1,arrayWithBracketAndIndex:n=!0}={})=>{const r=new FormData;for(const[i,s]of Object.entries(e)){if(Array.isArray(s)){for(const o in s)t?r.append(`${i}[]`,s[o]):n?r.append(`${i}[${o}]`,s[o]):r.append(i,s[o]);continue}typeof s<"u"&&s!==null&&r.append(i,s)}return r};var So=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(){}},Yi=typeof window>"u"||"Deno"in globalThis;function nn(){}function I_(e,t){return typeof e=="function"?e(t):e}function Jf(e){return typeof e=="number"&&e>=0&&e!==1/0}function tb(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Us(e,t){return typeof e=="function"?e(t):e}function kn(e,t){return typeof e=="function"?e(t):e}function Fv(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==rm(o,t.options))return!1}else if(!ja(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 Nv(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Ki(t.options.mutationKey)!==Ki(s))return!1}else if(!ja(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function rm(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ki)(e)}function Ki(e){return JSON.stringify(e,(t,n)=>ep(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function ja(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!ja(e[n],t[n])):!1}function nb(e,t){if(e===t)return e;const n=Lv(e)&&Lv(t);if(n||ep(e)&&ep(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 d=n?u:s[u];(!n&&r.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,l++):(a[d]=nb(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function Iu(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 Lv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ep(e){if(!Iv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Iv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Iv(e){return Object.prototype.toString.call(e)==="[object Object]"}function $_(e){return new Promise(t=>{setTimeout(t,e)})}function tp(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?nb(e,t):t}function B_(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function z_(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var im=Symbol();function rb(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===im?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Oi,Ar,Hs,Ax,V_=(Ax=class extends So{constructor(){super();K(this,Oi);K(this,Ar);K(this,Hs);W(this,Hs,t=>{if(!Yi&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){S(this,Ar)||this.setEventListener(S(this,Hs))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,Ar))==null||t.call(this),W(this,Ar,void 0))}setEventListener(t){var n;W(this,Hs,t),(n=S(this,Ar))==null||n.call(this),W(this,Ar,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){S(this,Oi)!==t&&(W(this,Oi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof S(this,Oi)=="boolean"?S(this,Oi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Oi=new WeakMap,Ar=new WeakMap,Hs=new WeakMap,Ax),sm=new V_,Ws,Rr,qs,Rx,U_=(Rx=class extends So{constructor(){super();K(this,Ws,!0);K(this,Rr);K(this,qs);W(this,qs,t=>{if(!Yi&&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(){S(this,Rr)||this.setEventListener(S(this,qs))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,Rr))==null||t.call(this),W(this,Rr,void 0))}setEventListener(t){var n;W(this,qs,t),(n=S(this,Rr))==null||n.call(this),W(this,Rr,t(this.setOnline.bind(this)))}setOnline(t){S(this,Ws)!==t&&(W(this,Ws,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return S(this,Ws)}},Ws=new WeakMap,Rr=new WeakMap,qs=new WeakMap,Rx),$u=new U_;function np(){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 H_(e){return Math.min(1e3*2**e,3e4)}function ib(e){return(e??"online")==="online"?$u.isOnline():!0}var sb=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ed(e){return e instanceof sb}function ob(e){let t=!1,n=0,r=!1,i;const s=np(),o=p=>{var w;r||(f(new sb(p)),(w=e.abort)==null||w.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>sm.isFocused()&&(e.networkMode==="always"||$u.isOnline())&&e.canRun(),d=()=>ib(e.networkMode)&&e.canRun(),c=p=>{var w;r||(r=!0,(w=e.onSuccess)==null||w.call(e,p),i==null||i(),s.resolve(p))},f=p=>{var w;r||(r=!0,(w=e.onError)==null||w.call(e,p),i==null||i(),s.reject(p))},h=()=>new Promise(p=>{var w;i=g=>{(r||u())&&p(g)},(w=e.onPause)==null||w.call(e)}).then(()=>{var p;i=void 0,r||(p=e.onContinue)==null||p.call(e)}),m=()=>{if(r)return;let p;const w=n===0?e.initialPromise:void 0;try{p=w??e.fn()}catch(g){p=Promise.reject(g)}Promise.resolve(p).then(c).catch(g=>{var C;if(r)return;const x=e.retry??(Yi?0:3),b=e.retryDelay??H_,T=typeof b=="function"?b(n,g):b,E=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,g);if(t||!E){f(g);return}n++,(C=e.onFail)==null||C.call(e,n,g),$_(T).then(()=>u()?void 0:h()).then(()=>{t?f(g):m()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?m():h().then(m),s)}}function W_(){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 We=W_(),Di,Ox,ab=(Ox=class{constructor(){K(this,Di)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Jf(this.gcTime)&&W(this,Di,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Yi?1/0:5*60*1e3))}clearGcTimeout(){S(this,Di)&&(clearTimeout(S(this,Di)),W(this,Di,void 0))}},Di=new WeakMap,Ox),Gs,Qs,tn,dt,Ua,Mi,xn,er,Dx,q_=(Dx=class extends ab{constructor(t){super();K(this,xn);K(this,Gs);K(this,Qs);K(this,tn);K(this,dt);K(this,Ua);K(this,Mi);W(this,Mi,!1),W(this,Ua,t.defaultOptions),this.setOptions(t.options),this.observers=[],W(this,tn,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,W(this,Gs,G_(this.options)),this.state=t.state??S(this,Gs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=S(this,dt))==null?void 0:t.promise}setOptions(t){this.options={...S(this,Ua),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&S(this,tn).remove(this)}setData(t,n){const r=tp(this.state.data,t,this.options);return se(this,xn,er).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){se(this,xn,er).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=S(this,dt))==null?void 0:r.promise;return(i=S(this,dt))==null||i.cancel(t),n?n.then(nn).catch(nn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(S(this,Gs))}isActive(){return this.observers.some(t=>kn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===im||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||!tb(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,dt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,dt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),S(this,tn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(S(this,dt)&&(S(this,Mi)?S(this,dt).cancel({revert:!0}):S(this,dt).cancelRetry()),this.scheduleGc()),S(this,tn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||se(this,xn,er).call(this,{type:"invalidate"})}fetch(t,n){var l,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(S(this,dt))return S(this,dt).continueRetry(),S(this,dt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const c=this.observers.find(f=>f.options.queryFn);c&&this.setOptions(c.options)}const r=new AbortController,i=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(W(this,Mi,!0),r.signal)})},s=()=>{const c=rb(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return i(f),W(this,Mi,!1),this.options.persister?this.options.persister(c,f,this):c(f)},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),W(this,Qs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&se(this,xn,er).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const a=c=>{var f,h,m,p;Ed(c)&&c.silent||se(this,xn,er).call(this,{type:"error",error:c}),Ed(c)||((h=(f=S(this,tn).config).onError)==null||h.call(f,c,this),(p=(m=S(this,tn).config).onSettled)==null||p.call(m,this.state.data,c,this)),this.scheduleGc()};return W(this,dt,ob({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:c=>{var f,h,m,p;if(c===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(w){a(w);return}(h=(f=S(this,tn).config).onSuccess)==null||h.call(f,c,this),(p=(m=S(this,tn).config).onSettled)==null||p.call(m,c,this.state.error,this),this.scheduleGc()},onError:a,onFail:(c,f)=>{se(this,xn,er).call(this,{type:"failed",failureCount:c,error:f})},onPause:()=>{se(this,xn,er).call(this,{type:"pause"})},onContinue:()=>{se(this,xn,er).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),S(this,dt).start()}},Gs=new WeakMap,Qs=new WeakMap,tn=new WeakMap,dt=new WeakMap,Ua=new WeakMap,Mi=new WeakMap,xn=new WeakSet,er=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,...lb(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 Ed(i)&&i.revert&&S(this,Qs)?{...S(this,Qs),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),We.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),S(this,tn).notify({query:this,type:"updated",action:t})})},Dx);function lb(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ib(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function G_(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 Fn,Mx,Q_=(Mx=class extends So{constructor(t={}){super();K(this,Fn);this.config=t,W(this,Fn,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??rm(i,n);let o=this.get(s);return o||(o=new q_({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){S(this,Fn).has(t.queryHash)||(S(this,Fn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=S(this,Fn).get(t.queryHash);n&&(t.destroy(),n===t&&S(this,Fn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){We.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return S(this,Fn).get(t)}getAll(){return[...S(this,Fn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Fv(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Fv(t,r)):n}notify(t){We.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){We.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){We.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Fn=new WeakMap,Mx),Nn,gt,Fi,Ln,kr,Fx,Y_=(Fx=class extends ab{constructor(t){super();K(this,Ln);K(this,Nn);K(this,gt);K(this,Fi);this.mutationId=t.mutationId,W(this,gt,t.mutationCache),W(this,Nn,[]),this.state=t.state||ub(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){S(this,Nn).includes(t)||(S(this,Nn).push(t),this.clearGcTimeout(),S(this,gt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){W(this,Nn,S(this,Nn).filter(n=>n!==t)),this.scheduleGc(),S(this,gt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){S(this,Nn).length||(this.state.status==="pending"?this.scheduleGc():S(this,gt).remove(this))}continue(){var t;return((t=S(this,Fi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,u,d,c,f,h,m,p,w,g,x,b,T,E,C,_;W(this,Fi,ob({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(A,F)=>{se(this,Ln,kr).call(this,{type:"failed",failureCount:A,error:F})},onPause:()=>{se(this,Ln,kr).call(this,{type:"pause"})},onContinue:()=>{se(this,Ln,kr).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,gt).canRun(this)}));const n=this.state.status==="pending",r=!S(this,Fi).canStart();try{if(!n){se(this,Ln,kr).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(i=S(this,gt).config).onMutate)==null?void 0:s.call(i,t,this));const F=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));F!==this.state.context&&se(this,Ln,kr).call(this,{type:"pending",context:F,variables:t,isPaused:r})}const A=await S(this,Fi).start();return await((u=(l=S(this,gt).config).onSuccess)==null?void 0:u.call(l,A,t,this.state.context,this)),await((c=(d=this.options).onSuccess)==null?void 0:c.call(d,A,t,this.state.context)),await((h=(f=S(this,gt).config).onSettled)==null?void 0:h.call(f,A,null,this.state.variables,this.state.context,this)),await((p=(m=this.options).onSettled)==null?void 0:p.call(m,A,null,t,this.state.context)),se(this,Ln,kr).call(this,{type:"success",data:A}),A}catch(A){try{throw await((g=(w=S(this,gt).config).onError)==null?void 0:g.call(w,A,t,this.state.context,this)),await((b=(x=this.options).onError)==null?void 0:b.call(x,A,t,this.state.context)),await((E=(T=S(this,gt).config).onSettled)==null?void 0:E.call(T,void 0,A,this.state.variables,this.state.context,this)),await((_=(C=this.options).onSettled)==null?void 0:_.call(C,void 0,A,t,this.state.context)),A}finally{se(this,Ln,kr).call(this,{type:"error",error:A})}}finally{S(this,gt).runNext(this)}}},Nn=new WeakMap,gt=new WeakMap,Fi=new WeakMap,Ln=new WeakSet,kr=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),We.batch(()=>{S(this,Nn).forEach(r=>{r.onMutationUpdate(t)}),S(this,gt).notify({mutation:this,type:"updated",action:t})})},Fx);function ub(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Bt,Ha,Nx,K_=(Nx=class extends So{constructor(t={}){super();K(this,Bt);K(this,Ha);this.config=t,W(this,Bt,new Map),W(this,Ha,Date.now())}build(t,n,r){const i=new Y_({mutationCache:this,mutationId:++fl(this,Ha)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=Al(t),r=S(this,Bt).get(n)??[];r.push(t),S(this,Bt).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=Al(t);if(S(this,Bt).has(n)){const i=(r=S(this,Bt).get(n))==null?void 0:r.filter(s=>s!==t);i&&(i.length===0?S(this,Bt).delete(n):S(this,Bt).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=S(this,Bt).get(Al(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=S(this,Bt).get(Al(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){We.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...S(this,Bt).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Nv(n,r))}findAll(t={}){return this.getAll().filter(n=>Nv(t,n))}notify(t){We.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return We.batch(()=>Promise.all(t.map(n=>n.continue().catch(nn))))}},Bt=new WeakMap,Ha=new WeakMap,Nx);function Al(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function $v(e){return{onFetch:(t,n)=>{var d,c,f,h,m;const r=t.options,i=(f=(c=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:c.fetchMore)==null?void 0:f.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 p=!1;const w=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},g=rb(t.options,t.fetchOptions),x=async(b,T,E)=>{if(p)return Promise.reject();if(T==null&&b.pages.length)return Promise.resolve(b);const C={queryKey:t.queryKey,pageParam:T,direction:E?"backward":"forward",meta:t.options.meta};w(C);const _=await g(C),{maxPages:A}=t.options,F=E?z_:B_;return{pages:F(b.pages,_,A),pageParams:F(b.pageParams,T,A)}};if(i&&s.length){const b=i==="backward",T=b?X_:Bv,E={pages:s,pageParams:o},C=T(r,E);a=await x(E,C,b)}else{const b=e??s.length;do{const T=l===0?o[0]??r.initialPageParam:Bv(r,a);if(l>0&&T==null)break;a=await x(a,T),l++}while(l<b)}return a};t.options.persister?t.fetchFn=()=>{var p,w;return(w=(p=t.options).persister)==null?void 0:w.call(p,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Bv(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 X_(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 Me,Or,Dr,Ys,Ks,Mr,Xs,Zs,Lx,Z_=(Lx=class{constructor(e={}){K(this,Me);K(this,Or);K(this,Dr);K(this,Ys);K(this,Ks);K(this,Mr);K(this,Xs);K(this,Zs);W(this,Me,e.queryCache||new Q_),W(this,Or,e.mutationCache||new K_),W(this,Dr,e.defaultOptions||{}),W(this,Ys,new Map),W(this,Ks,new Map),W(this,Mr,0)}mount(){fl(this,Mr)._++,S(this,Mr)===1&&(W(this,Xs,sm.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,Me).onFocus())})),W(this,Zs,$u.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,Me).onOnline())})))}unmount(){var e,t;fl(this,Mr)._--,S(this,Mr)===0&&((e=S(this,Xs))==null||e.call(this),W(this,Xs,void 0),(t=S(this,Zs))==null||t.call(this),W(this,Zs,void 0))}isFetching(e){return S(this,Me).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return S(this,Or).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,Me).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=S(this,Me).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Us(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return S(this,Me).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=S(this,Me).get(r.queryHash),s=i==null?void 0:i.state.data,o=I_(t,s);if(o!==void 0)return S(this,Me).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return We.batch(()=>S(this,Me).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,Me).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=S(this,Me);We.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=S(this,Me),r={type:"active",...e};return We.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=We.batch(()=>S(this,Me).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(nn).catch(nn)}invalidateQueries(e,t={}){return We.batch(()=>{if(S(this,Me).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=We.batch(()=>S(this,Me).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(nn)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(nn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=S(this,Me).build(this,t);return n.isStaleByTime(Us(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(nn).catch(nn)}fetchInfiniteQuery(e){return e.behavior=$v(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(nn).catch(nn)}ensureInfiniteQueryData(e){return e.behavior=$v(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return $u.isOnline()?S(this,Or).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,Me)}getMutationCache(){return S(this,Or)}getDefaultOptions(){return S(this,Dr)}setDefaultOptions(e){W(this,Dr,e)}setQueryDefaults(e,t){S(this,Ys).set(Ki(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...S(this,Ys).values()],n={};return t.forEach(r=>{ja(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){S(this,Ks).set(Ki(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...S(this,Ks).values()];let n={};return t.forEach(r=>{ja(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...S(this,Dr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=rm(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===im&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...S(this,Dr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){S(this,Me).clear(),S(this,Or).clear()}},Me=new WeakMap,Or=new WeakMap,Dr=new WeakMap,Ys=new WeakMap,Ks=new WeakMap,Mr=new WeakMap,Xs=new WeakMap,Zs=new WeakMap,Lx),Et,ue,Wa,vt,Ni,Js,Fr,In,qa,eo,to,Li,Ii,Nr,no,pe,Ho,rp,ip,sp,op,ap,lp,up,cb,Ix,J_=(Ix=class extends So{constructor(t,n){super();K(this,pe);K(this,Et);K(this,ue);K(this,Wa);K(this,vt);K(this,Ni);K(this,Js);K(this,Fr);K(this,In);K(this,qa);K(this,eo);K(this,to);K(this,Li);K(this,Ii);K(this,Nr);K(this,no,new Set);this.options=n,W(this,Et,t),W(this,In,null),W(this,Fr,np()),this.options.experimental_prefetchInRender||S(this,Fr).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&&(S(this,ue).addObserver(this),zv(S(this,ue),this.options)?se(this,pe,Ho).call(this):this.updateResult(),se(this,pe,op).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return cp(S(this,ue),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return cp(S(this,ue),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,se(this,pe,ap).call(this),se(this,pe,lp).call(this),S(this,ue).removeObserver(this)}setOptions(t,n){const r=this.options,i=S(this,ue);if(this.options=S(this,Et).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof kn(this.options.enabled,S(this,ue))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");se(this,pe,up).call(this),S(this,ue).setOptions(this.options),r._defaulted&&!Iu(this.options,r)&&S(this,Et).getQueryCache().notify({type:"observerOptionsUpdated",query:S(this,ue),observer:this});const s=this.hasListeners();s&&Vv(S(this,ue),i,this.options,r)&&se(this,pe,Ho).call(this),this.updateResult(n),s&&(S(this,ue)!==i||kn(this.options.enabled,S(this,ue))!==kn(r.enabled,S(this,ue))||Us(this.options.staleTime,S(this,ue))!==Us(r.staleTime,S(this,ue)))&&se(this,pe,rp).call(this);const o=se(this,pe,ip).call(this);s&&(S(this,ue)!==i||kn(this.options.enabled,S(this,ue))!==kn(r.enabled,S(this,ue))||o!==S(this,Nr))&&se(this,pe,sp).call(this,o)}getOptimisticResult(t){const n=S(this,Et).getQueryCache().build(S(this,Et),t),r=this.createResult(n,t);return t2(this,r)&&(W(this,vt,r),W(this,Js,this.options),W(this,Ni,S(this,ue).state)),r}getCurrentResult(){return S(this,vt)}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){S(this,no).add(t)}getCurrentQuery(){return S(this,ue)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=S(this,Et).defaultQueryOptions(t),r=S(this,Et).getQueryCache().build(S(this,Et),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return se(this,pe,Ho).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),S(this,vt)))}createResult(t,n){var A;const r=S(this,ue),i=this.options,s=S(this,vt),o=S(this,Ni),a=S(this,Js),u=t!==r?t.state:S(this,Wa),{state:d}=t;let c={...d},f=!1,h;if(n._optimisticResults){const F=this.hasListeners(),M=!F&&zv(t,n),R=F&&Vv(t,r,n,i);(M||R)&&(c={...c,...lb(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:m,errorUpdatedAt:p,status:w}=c;if(n.select&&c.data!==void 0)if(s&&c.data===(o==null?void 0:o.data)&&n.select===S(this,qa))h=S(this,eo);else try{W(this,qa,n.select),h=n.select(c.data),h=tp(s==null?void 0:s.data,h,n),W(this,eo,h),W(this,In,null)}catch(F){W(this,In,F)}else h=c.data;if(n.placeholderData!==void 0&&h===void 0&&w==="pending"){let F;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))F=s.data;else if(F=typeof n.placeholderData=="function"?n.placeholderData((A=S(this,to))==null?void 0:A.state.data,S(this,to)):n.placeholderData,n.select&&F!==void 0)try{F=n.select(F),W(this,In,null)}catch(M){W(this,In,M)}F!==void 0&&(w="success",h=tp(s==null?void 0:s.data,F,n),f=!0)}S(this,In)&&(m=S(this,In),h=S(this,eo),p=Date.now(),w="error");const g=c.fetchStatus==="fetching",x=w==="pending",b=w==="error",T=x&&g,E=h!==void 0,_={status:w,fetchStatus:c.fetchStatus,isPending:x,isSuccess:w==="success",isError:b,isInitialLoading:T,isLoading:T,data:h,dataUpdatedAt:c.dataUpdatedAt,error:m,errorUpdatedAt:p,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:g,isRefetching:g&&!x,isLoadingError:b&&!E,isPaused:c.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:b&&E,isStale:om(t,n),refetch:this.refetch,promise:S(this,Fr)};if(this.options.experimental_prefetchInRender){const F=$=>{_.status==="error"?$.reject(_.error):_.data!==void 0&&$.resolve(_.data)},M=()=>{const $=W(this,Fr,_.promise=np());F($)},R=S(this,Fr);switch(R.status){case"pending":t.queryHash===r.queryHash&&F(R);break;case"fulfilled":(_.status==="error"||_.data!==R.value)&&M();break;case"rejected":(_.status!=="error"||_.error!==R.reason)&&M();break}}return _}updateResult(t){const n=S(this,vt),r=this.createResult(S(this,ue),this.options);if(W(this,Ni,S(this,ue).state),W(this,Js,this.options),S(this,Ni).data!==void 0&&W(this,to,S(this,ue)),Iu(r,n))return;W(this,vt,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!S(this,no).size)return!0;const l=new Set(a??S(this,no));return this.options.throwOnError&&l.add("error"),Object.keys(S(this,vt)).some(u=>{const d=u;return S(this,vt)[d]!==n[d]&&l.has(d)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),se(this,pe,cb).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&se(this,pe,op).call(this)}},Et=new WeakMap,ue=new WeakMap,Wa=new WeakMap,vt=new WeakMap,Ni=new WeakMap,Js=new WeakMap,Fr=new WeakMap,In=new WeakMap,qa=new WeakMap,eo=new WeakMap,to=new WeakMap,Li=new WeakMap,Ii=new WeakMap,Nr=new WeakMap,no=new WeakMap,pe=new WeakSet,Ho=function(t){se(this,pe,up).call(this);let n=S(this,ue).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(nn)),n},rp=function(){se(this,pe,ap).call(this);const t=Us(this.options.staleTime,S(this,ue));if(Yi||S(this,vt).isStale||!Jf(t))return;const r=tb(S(this,vt).dataUpdatedAt,t)+1;W(this,Li,setTimeout(()=>{S(this,vt).isStale||this.updateResult()},r))},ip=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(S(this,ue)):this.options.refetchInterval)??!1},sp=function(t){se(this,pe,lp).call(this),W(this,Nr,t),!(Yi||kn(this.options.enabled,S(this,ue))===!1||!Jf(S(this,Nr))||S(this,Nr)===0)&&W(this,Ii,setInterval(()=>{(this.options.refetchIntervalInBackground||sm.isFocused())&&se(this,pe,Ho).call(this)},S(this,Nr)))},op=function(){se(this,pe,rp).call(this),se(this,pe,sp).call(this,se(this,pe,ip).call(this))},ap=function(){S(this,Li)&&(clearTimeout(S(this,Li)),W(this,Li,void 0))},lp=function(){S(this,Ii)&&(clearInterval(S(this,Ii)),W(this,Ii,void 0))},up=function(){const t=S(this,Et).getQueryCache().build(S(this,Et),this.options);if(t===S(this,ue))return;const n=S(this,ue);W(this,ue,t),W(this,Wa,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},cb=function(t){We.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(S(this,vt))}),S(this,Et).getQueryCache().notify({query:S(this,ue),type:"observerResultsUpdated"})})},Ix);function e2(e,t){return kn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function zv(e,t){return e2(e,t)||e.state.data!==void 0&&cp(e,t,t.refetchOnMount)}function cp(e,t,n){if(kn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&om(e,t)}return!1}function Vv(e,t,n,r){return(e!==t||kn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&om(e,n)}function om(e,t){return kn(t.enabled,e)!==!1&&e.isStaleByTime(Us(t.staleTime,e))}function t2(e,t){return!Iu(e.getCurrentResult(),t)}var Lr,Ir,_t,sr,cr,tu,dp,$x,n2=($x=class extends So{constructor(t,n){super();K(this,cr);K(this,Lr);K(this,Ir);K(this,_t);K(this,sr);W(this,Lr,t),this.setOptions(n),this.bindMethods(),se(this,cr,tu).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=S(this,Lr).defaultMutationOptions(t),Iu(this.options,n)||S(this,Lr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:S(this,_t),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Ki(n.mutationKey)!==Ki(this.options.mutationKey)?this.reset():((r=S(this,_t))==null?void 0:r.state.status)==="pending"&&S(this,_t).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=S(this,_t))==null||t.removeObserver(this)}onMutationUpdate(t){se(this,cr,tu).call(this),se(this,cr,dp).call(this,t)}getCurrentResult(){return S(this,Ir)}reset(){var t;(t=S(this,_t))==null||t.removeObserver(this),W(this,_t,void 0),se(this,cr,tu).call(this),se(this,cr,dp).call(this)}mutate(t,n){var r;return W(this,sr,n),(r=S(this,_t))==null||r.removeObserver(this),W(this,_t,S(this,Lr).getMutationCache().build(S(this,Lr),this.options)),S(this,_t).addObserver(this),S(this,_t).execute(t)}},Lr=new WeakMap,Ir=new WeakMap,_t=new WeakMap,sr=new WeakMap,cr=new WeakSet,tu=function(){var n;const t=((n=S(this,_t))==null?void 0:n.state)??ub();W(this,Ir,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},dp=function(t){We.batch(()=>{var n,r,i,s,o,a,l,u;if(S(this,sr)&&this.hasListeners()){const d=S(this,Ir).variables,c=S(this,Ir).context;(t==null?void 0:t.type)==="success"?((r=(n=S(this,sr)).onSuccess)==null||r.call(n,t.data,d,c),(s=(i=S(this,sr)).onSettled)==null||s.call(i,t.data,null,d,c)):(t==null?void 0:t.type)==="error"&&((a=(o=S(this,sr)).onError)==null||a.call(o,t.error,d,c),(u=(l=S(this,sr)).onSettled)==null||u.call(l,void 0,t.error,d,c))}this.listeners.forEach(d=>{d(S(this,Ir))})})},$x),db=v.createContext(void 0),fb=e=>{const t=v.useContext(db);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},r2=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),y.jsx(db.Provider,{value:e,children:t})),pb=v.createContext(!1),i2=()=>v.useContext(pb);pb.Provider;function s2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var o2=v.createContext(s2()),a2=()=>v.useContext(o2);function hb(e,t){return typeof e=="function"?e(...t):!!e}function fp(){}var l2=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},u2=e=>{v.useEffect(()=>{e.clearReset()},[e])},c2=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&hb(n,[e.error,r]),d2=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},f2=(e,t)=>e.isLoading&&e.isFetching&&!t,p2=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Uv=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function h2(e,t,n){var d,c,f,h,m;const r=fb(),i=i2(),s=a2(),o=r.defaultQueryOptions(e);(c=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||c.call(d,o),o._optimisticResults=i?"isRestoring":"optimistic",d2(o),l2(o,s),u2(s);const a=!r.getQueryCache().get(o.queryHash),[l]=v.useState(()=>new t(r,o)),u=l.getOptimisticResult(o);if(v.useSyncExternalStore(v.useCallback(p=>{const w=i?fp:l.subscribe(We.batchCalls(p));return l.updateResult(),w},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),v.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),p2(o,u))throw Uv(o,l,s);if(c2({result:u,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw u.error;if((h=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||h.call(f,o,u),o.experimental_prefetchInRender&&!Yi&&f2(u,i)){const p=a?Uv(o,l,s):(m=r.getQueryCache().get(o.queryHash))==null?void 0:m.promise;p==null||p.catch(fp).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?u:l.trackResult(u)}function m2(e,t){return h2(e,J_)}function am(e,t){const n=fb(),[r]=v.useState(()=>new n2(n,e));v.useEffect(()=>{r.setOptions(e)},[r,e]);const i=v.useSyncExternalStore(v.useCallback(o=>r.subscribe(We.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=v.useCallback((o,a)=>{r.mutate(o,a).catch(fp)},[r]);if(i.error&&hb(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const g2=(e,t)=>m2({queryKey:["widgets",e,t],queryFn:()=>v2(e,t),retry:!1,throwOnError:!1}),v2=async(e,t)=>{const n=`widgets/with-link/${e}${t?`?device_id=${t}`:""}`,[r,i]=await bo(n);if(i===204)throw new Error("User is banned");return r};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.CloseButtonBackground="widget_close_button_background",e.CloseButtonText="widget_close_button_text",e.CloseButtonHover="widget_close_button_hover",e.IconColor="widget_icon_color",e.IconBackground="widget_icon_background",e.ErrorBackground="widget_error_background",e.ErrorText="widget_error_text",e.ErrorBorder="widget_error_border",e.SuccessBackground="widget_success_background",e.SuccessText="widget_success_text",e.SuccessBorder="widget_success_border",e.WarningBackground="widget_warning_background",e.WarningText="widget_warning_text",e.WarningBorder="widget_warning_border",e.LinkColor="widget_link_color",e.LinkHoverColor="widget_link_hover_color",e.DividerColor="widget_divider_color",e.ShadowColor="widget_shadow_color",e.StarActiveColor="widget_star_active_color",e.StarInactiveColor="widget_star_inactive_color",e.ModalOverlayColor="widget_modal_overlay_color",e.ChatCloseConfirmText="widget_chat_close_confirm_text",e.RatingHeaderBackground="widget_rating_header_background",e.RatingHeaderText="widget_rating_header_text",e.RatingSuccessBackground="widget_rating_success_background",e.RatingSuccessText="widget_rating_success_text",e.RatingRateConversationText="widget_rating_rate_conversation_text",e))(k||{}),Q=(e=>(e.TooltipDefault="tooltip_default",e.TooltipActive="tooltip_active",e.CloseButtonAria="close_button_aria",e.MessagePlaceholder="message_placeholder",e.FileUploadDisabled="file_upload_disabled",e.NewMessagesNotification="new_messages_notification",e.ChatCloseConfirm="chat_close_confirm",e.ChatCloseWarning="chat_close_warning",e.ChatSettings="chat_settings",e.ChatEndConversation="chat_end_conversation",e.CancelAction="cancel_action",e.CloseAction="close_action",e.QuickActions="quick_actions",e.GreetingStartChat="greeting_start_chat",e.RateLimitMessage="rate_limit_message",e.RatingHeaderEvaluate="rating_header_evaluate",e.RatingHeaderThanks="rating_header_thanks",e.RatingDescription="rating_description",e.RatingRateConversation="rating_rate_conversation",e.RatingComment="rating_comment",e.RatingCommentPlaceholder="rating_comment_placeholder",e.RatingSubmit="rating_submit",e.RatingNewConversation="rating_new_conversation",e.RatingThankYouTitle="rating_thank_you_title",e.RatingThankYouDescription="rating_thank_you_description",e.RatingCountdown="rating_countdown",e.RatingMinimumError="rating_minimum_error",e.RatingYourScore="rating_your_score",e.PoweredBy="powered_by",e))(Q||{});function y2(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 Bu(){return Bu=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},Bu.apply(this,arguments)}var Br;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Br||(Br={}));function x2(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((p,h)=>d(p,typeof p=="string"?null:p.state,h===0?"default":void 0));let s=l(n??i.length-1),o=Br.Pop,a=null;function l(p){return Math.min(Math.max(p,0),i.length-1)}function c(){return i[s]}function d(p,h,m){h===void 0&&(h=null);let x=b2(i?c().pathname:"/",p,h,m);return lm(x.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(p)),x}function u(p){return typeof p=="string"?p:pp(p)}return{get index(){return s},get action(){return o},get location(){return c()},createHref:u,createURL(p){return new URL(u(p),"http://localhost")},encodeLocation(p){let h=typeof p=="string"?ts(p):p;return{pathname:h.pathname||"",search:h.search||"",hash:h.hash||""}},push(p,h){o=Br.Push;let m=d(p,h);s+=1,i.splice(s,i.length,m),r&&a&&a({action:o,location:m,delta:1})},replace(p,h){o=Br.Replace;let m=d(p,h);i[s]=m,r&&a&&a({action:o,location:m,delta:0})},go(p){o=Br.Pop;let h=l(s+p),m=i[h];s=h,a&&a({action:o,location:m,delta:p})},listen(p){return a=p,()=>{a=null}}}}function qe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function lm(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function w2(){return Math.random().toString(36).substr(2,8)}function b2(e,t,n,r){return n===void 0&&(n=null),Bu({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ts(t):t,{state:n,key:t&&t.key||r||w2()})}function pp(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 ts(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 Hv;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Hv||(Hv={}));function S2(e,t,n){return n===void 0&&(n="/"),k2(e,t,n,!1)}function k2(e,t,n,r){let i=typeof t=="string"?ts(t):t,s=um(i.pathname||"/",n);if(s==null)return null;let o=mb(e);C2(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=M2(s);a=D2(o[l],c,r)}return a}function mb(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("/")&&(qe(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Kr([r,l.relativePath]),d=n.concat(l);s.children&&s.children.length>0&&(qe(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),mb(s.children,t,d,c)),!(s.path==null&&!s.index)&&t.push({path:c,score:A2(c,s.index),routesMeta:d})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of gb(s.path))i(s,o,l)}),t}function gb(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=gb(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 C2(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:O2(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const T2=/^:[\w-]+$/,E2=3,_2=2,P2=1,j2=10,R2=-2,Wv=e=>e==="*";function A2(e,t){let n=e.split("/"),r=n.length;return n.some(Wv)&&(r+=R2),t&&(r+=_2),n.filter(i=>!Wv(i)).reduce((i,s)=>i+(T2.test(s)?E2:s===""?P2:j2),r)}function O2(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 D2(e,t,n){let{routesMeta:r}=e,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,d=s==="/"?t:t.slice(s.length)||"/",u=qv({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d),f=l.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=qv({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:Kr([s,u.pathname]),pathnameBase:$2(Kr([s,u.pathnameBase])),route:f}),u.pathnameBase!=="/"&&(s=Kr([s,u.pathnameBase]))}return o}function qv(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=F2(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((c,d,u)=>{let{paramName:f,isOptional:p}=d;if(f==="*"){let m=a[u]||"";o=s.slice(0,s.length-m.length).replace(/(.)\/+$/,"$1")}const h=a[u];return p&&!h?c[f]=void 0:c[f]=(h||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:o,pattern:e}}function F2(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),lm(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 M2(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return lm(!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 um(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 N2(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?ts(e):e;return{pathname:n?n.startsWith("/")?n:L2(n,t):t,search:B2(r),hash:z2(i)}}function L2(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 _d(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 I2(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function vb(e,t){let n=I2(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function yb(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=ts(e):(i=Bu({},e),qe(!i.pathname||!i.pathname.includes("?"),_d("?","pathname","search",i)),qe(!i.pathname||!i.pathname.includes("#"),_d("#","pathname","hash",i)),qe(!i.search||!i.search.includes("#"),_d("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let u=t.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),u-=1;i.pathname=f.join("/")}a=u>=0?t[u]:"/"}let l=N2(i,a),c=o&&o!=="/"&&o.endsWith("/"),d=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const Kr=e=>e.join("/").replace(/\/\/+/g,"/"),$2=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),B2=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,z2=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function V2(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const xb=["post","put","patch","delete"];new Set(xb);const U2=["get",...xb];new Set(U2);/**
49
+ */function Bu(){return Bu=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},Bu.apply(this,arguments)}var zr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(zr||(zr={}));function x2(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((h,m)=>d(h,typeof h=="string"?null:h.state,m===0?"default":void 0));let s=l(n??i.length-1),o=zr.Pop,a=null;function l(h){return Math.min(Math.max(h,0),i.length-1)}function u(){return i[s]}function d(h,m,p){m===void 0&&(m=null);let w=b2(i?u().pathname:"/",h,m,p);return lm(w.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(h)),w}function c(h){return typeof h=="string"?h:pp(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"?ts(h):h;return{pathname:m.pathname||"",search:m.search||"",hash:m.hash||""}},push(h,m){o=zr.Push;let p=d(h,m);s+=1,i.splice(s,i.length,p),r&&a&&a({action:o,location:p,delta:1})},replace(h,m){o=zr.Replace;let p=d(h,m);i[s]=p,r&&a&&a({action:o,location:p,delta:0})},go(h){o=zr.Pop;let m=l(s+h),p=i[m];s=m,a&&a({action:o,location:p,delta:h})},listen(h){return a=h,()=>{a=null}}}}function Ge(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function lm(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function w2(){return Math.random().toString(36).substr(2,8)}function b2(e,t,n,r){return n===void 0&&(n=null),Bu({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ts(t):t,{state:n,key:t&&t.key||r||w2()})}function pp(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 ts(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 Hv;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Hv||(Hv={}));function S2(e,t,n){return n===void 0&&(n="/"),k2(e,t,n,!1)}function k2(e,t,n,r){let i=typeof t=="string"?ts(t):t,s=um(i.pathname||"/",n);if(s==null)return null;let o=mb(e);C2(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=F2(s);a=D2(o[l],u,r)}return a}function mb(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("/")&&(Ge(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=Xr([r,l.relativePath]),d=n.concat(l);s.children&&s.children.length>0&&(Ge(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),mb(s.children,t,d,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:R2(u,s.index),routesMeta:d})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of gb(s.path))i(s,o,l)}),t}function gb(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=gb(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 C2(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:O2(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const T2=/^:[\w-]+$/,E2=3,_2=2,j2=1,P2=10,A2=-2,Wv=e=>e==="*";function R2(e,t){let n=e.split("/"),r=n.length;return n.some(Wv)&&(r+=A2),t&&(r+=_2),n.filter(i=>!Wv(i)).reduce((i,s)=>i+(T2.test(s)?E2:s===""?j2:P2),r)}function O2(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 D2(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,d=s==="/"?t:t.slice(s.length)||"/",c=qv({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),f=l.route;if(!c&&u&&n&&!r[r.length-1].route.index&&(c=qv({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!c)return null;Object.assign(i,c.params),o.push({params:i,pathname:Xr([s,c.pathname]),pathnameBase:$2(Xr([s,c.pathnameBase])),route:f}),c.pathnameBase!=="/"&&(s=Xr([s,c.pathnameBase]))}return o}function qv(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=M2(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,d,c)=>{let{paramName:f,isOptional:h}=d;if(f==="*"){let p=a[c]||"";o=s.slice(0,s.length-p.length).replace(/(.)\/+$/,"$1")}const m=a[c];return h&&!m?u[f]=void 0:u[f]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:e}}function M2(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),lm(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 F2(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return lm(!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 um(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 N2(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?ts(e):e;return{pathname:n?n.startsWith("/")?n:L2(n,t):t,search:B2(r),hash:z2(i)}}function L2(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 _d(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 I2(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function vb(e,t){let n=I2(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function yb(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=ts(e):(i=Bu({},e),Ge(!i.pathname||!i.pathname.includes("?"),_d("?","pathname","search",i)),Ge(!i.pathname||!i.pathname.includes("#"),_d("#","pathname","hash",i)),Ge(!i.search||!i.search.includes("#"),_d("#","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 f=o.split("/");for(;f[0]==="..";)f.shift(),c-=1;i.pathname=f.join("/")}a=c>=0?t[c]:"/"}let l=N2(i,a),u=o&&o!=="/"&&o.endsWith("/"),d=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const Xr=e=>e.join("/").replace(/\/\/+/g,"/"),$2=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),B2=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,z2=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function V2(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const xb=["post","put","patch","delete"];new Set(xb);const U2=["get",...xb];new Set(U2);/**
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 ja(){return ja=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},ja.apply(this,arguments)}const cm=v.createContext(null),H2=v.createContext(null),ns=v.createContext(null),xc=v.createContext(null),rs=v.createContext({outlet:null,matches:[],isDataRoute:!1}),wb=v.createContext(null);function W2(e,t){let{relative:n}=t===void 0?{}:t;Ja()||qe(!1);let{basename:r,navigator:i}=v.useContext(ns),{hash:s,pathname:o,search:a}=kb(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Kr([r,o])),i.createHref({pathname:l,search:a,hash:s})}function Ja(){return v.useContext(xc)!=null}function el(){return Ja()||qe(!1),v.useContext(xc).location}function bb(e){v.useContext(ns).static||v.useLayoutEffect(e)}function Sb(){let{isDataRoute:e}=v.useContext(rs);return e?iP():q2()}function q2(){Ja()||qe(!1);let e=v.useContext(cm),{basename:t,future:n,navigator:r}=v.useContext(ns),{matches:i}=v.useContext(rs),{pathname:s}=el(),o=JSON.stringify(vb(i,n.v7_relativeSplatPath)),a=v.useRef(!1);return bb(()=>{a.current=!0}),v.useCallback(function(c,d){if(d===void 0&&(d={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let u=yb(c,JSON.parse(o),s,d.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:Kr([t,u.pathname])),(d.replace?r.replace:r.push)(u,d.state,d)},[t,r,o,s,e])}function kb(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=v.useContext(ns),{matches:i}=v.useContext(rs),{pathname:s}=el(),o=JSON.stringify(vb(i,r.v7_relativeSplatPath));return v.useMemo(()=>yb(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function G2(e,t){return Q2(e,t)}function Q2(e,t,n,r){Ja()||qe(!1);let{navigator:i}=v.useContext(ns),{matches:s}=v.useContext(rs),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=el(),d;if(t){var u;let x=typeof t=="string"?ts(t):t;l==="/"||(u=x.pathname)!=null&&u.startsWith(l)||qe(!1),d=x}else d=c;let f=d.pathname||"/",p=f;if(l!=="/"){let x=l.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(x.length).join("/")}let h=S2(e,{pathname:p}),m=J2(h&&h.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:Kr([l,i.encodeLocation?i.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:Kr([l,i.encodeLocation?i.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),s,n,r);return t&&m?v.createElement(xc.Provider,{value:{location:ja({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Br.Pop}},m):m}function Y2(){let e=rP(),t=V2(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 v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:i},n):null,null)}const K2=v.createElement(Y2,null);class X2 extends v.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,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?v.createElement(rs.Provider,{value:this.props.routeContext},v.createElement(wb.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Z2(e){let{routeContext:t,match:n,children:r}=e,i=v.useContext(cm);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(rs.Provider,{value:t},r)}function J2(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 d=o.findIndex(u=>u.route.id&&(a==null?void 0:a[u.route.id])!==void 0);d>=0||qe(!1),o=o.slice(0,Math.min(o.length,d+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<o.length;d++){let u=o[d];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(c=d),u.route.id){let{loaderData:f,errors:p}=n,h=u.route.loader&&f[u.route.id]===void 0&&(!p||p[u.route.id]===void 0);if(u.route.lazy||h){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((d,u,f)=>{let p,h=!1,m=null,x=null;n&&(p=a&&u.route.id?a[u.route.id]:void 0,m=u.route.errorElement||K2,l&&(c<0&&f===0?(h=!0,x=null):c===f&&(h=!0,x=u.route.hydrateFallbackElement||null)));let g=t.concat(o.slice(0,f+1)),w=()=>{let b;return p?b=m:h?b=x:u.route.Component?b=v.createElement(u.route.Component,null):u.route.element?b=u.route.element:b=d,v.createElement(Z2,{match:u,routeContext:{outlet:d,matches:g,isDataRoute:n!=null},children:b})};return n&&(u.route.ErrorBoundary||u.route.errorElement||f===0)?v.createElement(X2,{location:n.location,revalidation:n.revalidation,component:m,error:p,children:w(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):w()},null)}var Cb=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Cb||{}),zu=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}(zu||{});function eP(e){let t=v.useContext(cm);return t||qe(!1),t}function tP(e){let t=v.useContext(H2);return t||qe(!1),t}function nP(e){let t=v.useContext(rs);return t||qe(!1),t}function Tb(e){let t=nP(),n=t.matches[t.matches.length-1];return n.route.id||qe(!1),n.route.id}function rP(){var e;let t=v.useContext(wb),n=tP(zu.UseRouteError),r=Tb(zu.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function iP(){let{router:e}=eP(Cb.UseNavigateStable),t=Tb(zu.UseNavigateStable),n=v.useRef(!1);return bb(()=>{n.current=!0}),v.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,ja({fromRouteId:t},s)))},[e,t])}const Gv={};function sP(e,t){Gv[t]||(Gv[t]=!0,console.warn(t))}const Qv=(e,t,n)=>sP(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function oP(e,t){e!=null&&e.v7_startTransition||Qv("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&&Qv("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}const aP="startTransition",Yv=of[aP];function lP(e){let{basename:t,children:n,initialEntries:r,initialIndex:i,future:s}=e,o=v.useRef();o.current==null&&(o.current=x2({initialEntries:r,initialIndex:i,v5Compat:!0}));let a=o.current,[l,c]=v.useState({action:a.action,location:a.location}),{v7_startTransition:d}=s||{},u=v.useCallback(f=>{d&&Yv?Yv(()=>c(f)):c(f)},[c,d]);return v.useLayoutEffect(()=>a.listen(u),[a,u]),v.useEffect(()=>oP(s),[s]),v.createElement(uP,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:s})}function hp(e){qe(!1)}function uP(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Br.Pop,navigator:s,static:o=!1,future:a}=e;Ja()&&qe(!1);let l=t.replace(/^\/*/,"/"),c=v.useMemo(()=>({basename:l,navigator:s,static:o,future:ja({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r=="string"&&(r=ts(r));let{pathname:d="/",search:u="",hash:f="",state:p=null,key:h="default"}=r,m=v.useMemo(()=>{let x=um(d,l);return x==null?null:{location:{pathname:x,search:u,hash:f,state:p,key:h},navigationType:i}},[l,d,u,f,p,h,i]);return m==null?null:v.createElement(ns.Provider,{value:c},v.createElement(xc.Provider,{children:n,value:m}))}function cP(e){let{children:t,location:n}=e;return G2(mp(t),n)}new Promise(()=>{});function mp(e,t){t===void 0&&(t=[]);let n=[];return v.Children.forEach(e,(r,i)=>{if(!v.isValidElement(r))return;let s=[...t,i];if(r.type===v.Fragment){n.push.apply(n,mp(r.props.children,s));return}r.type!==hp&&qe(!1),!r.props.index||!r.props.children||qe(!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=mp(r.props.children,s)),n.push(o)}),n}/**
58
+ */function Pa(){return Pa=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},Pa.apply(this,arguments)}const cm=v.createContext(null),H2=v.createContext(null),ns=v.createContext(null),xc=v.createContext(null),rs=v.createContext({outlet:null,matches:[],isDataRoute:!1}),wb=v.createContext(null);function W2(e,t){let{relative:n}=t===void 0?{}:t;Ja()||Ge(!1);let{basename:r,navigator:i}=v.useContext(ns),{hash:s,pathname:o,search:a}=kb(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Xr([r,o])),i.createHref({pathname:l,search:a,hash:s})}function Ja(){return v.useContext(xc)!=null}function el(){return Ja()||Ge(!1),v.useContext(xc).location}function bb(e){v.useContext(ns).static||v.useLayoutEffect(e)}function Sb(){let{isDataRoute:e}=v.useContext(rs);return e?ij():q2()}function q2(){Ja()||Ge(!1);let e=v.useContext(cm),{basename:t,future:n,navigator:r}=v.useContext(ns),{matches:i}=v.useContext(rs),{pathname:s}=el(),o=JSON.stringify(vb(i,n.v7_relativeSplatPath)),a=v.useRef(!1);return bb(()=>{a.current=!0}),v.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let c=yb(u,JSON.parse(o),s,d.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Xr([t,c.pathname])),(d.replace?r.replace:r.push)(c,d.state,d)},[t,r,o,s,e])}function kb(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=v.useContext(ns),{matches:i}=v.useContext(rs),{pathname:s}=el(),o=JSON.stringify(vb(i,r.v7_relativeSplatPath));return v.useMemo(()=>yb(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function G2(e,t){return Q2(e,t)}function Q2(e,t,n,r){Ja()||Ge(!1);let{navigator:i}=v.useContext(ns),{matches:s}=v.useContext(rs),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=el(),d;if(t){var c;let w=typeof t=="string"?ts(t):t;l==="/"||(c=w.pathname)!=null&&c.startsWith(l)||Ge(!1),d=w}else d=u;let f=d.pathname||"/",h=f;if(l!=="/"){let w=l.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(w.length).join("/")}let m=S2(e,{pathname:h}),p=J2(m&&m.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:Xr([l,i.encodeLocation?i.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:Xr([l,i.encodeLocation?i.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),s,n,r);return t&&p?v.createElement(xc.Provider,{value:{location:Pa({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:zr.Pop}},p):p}function Y2(){let e=rj(),t=V2(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 v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:i},n):null,null)}const K2=v.createElement(Y2,null);class X2 extends v.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,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?v.createElement(rs.Provider,{value:this.props.routeContext},v.createElement(wb.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Z2(e){let{routeContext:t,match:n,children:r}=e,i=v.useContext(cm);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(rs.Provider,{value:t},r)}function J2(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 d=o.findIndex(c=>c.route.id&&(a==null?void 0:a[c.route.id])!==void 0);d>=0||Ge(!1),o=o.slice(0,Math.min(o.length,d+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<o.length;d++){let c=o[d];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(u=d),c.route.id){let{loaderData:f,errors:h}=n,m=c.route.loader&&f[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((d,c,f)=>{let h,m=!1,p=null,w=null;n&&(h=a&&c.route.id?a[c.route.id]:void 0,p=c.route.errorElement||K2,l&&(u<0&&f===0?(m=!0,w=null):u===f&&(m=!0,w=c.route.hydrateFallbackElement||null)));let g=t.concat(o.slice(0,f+1)),x=()=>{let b;return h?b=p:m?b=w:c.route.Component?b=v.createElement(c.route.Component,null):c.route.element?b=c.route.element:b=d,v.createElement(Z2,{match:c,routeContext:{outlet:d,matches:g,isDataRoute:n!=null},children:b})};return n&&(c.route.ErrorBoundary||c.route.errorElement||f===0)?v.createElement(X2,{location:n.location,revalidation:n.revalidation,component:p,error:h,children:x(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):x()},null)}var Cb=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Cb||{}),zu=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}(zu||{});function ej(e){let t=v.useContext(cm);return t||Ge(!1),t}function tj(e){let t=v.useContext(H2);return t||Ge(!1),t}function nj(e){let t=v.useContext(rs);return t||Ge(!1),t}function Tb(e){let t=nj(),n=t.matches[t.matches.length-1];return n.route.id||Ge(!1),n.route.id}function rj(){var e;let t=v.useContext(wb),n=tj(zu.UseRouteError),r=Tb(zu.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function ij(){let{router:e}=ej(Cb.UseNavigateStable),t=Tb(zu.UseNavigateStable),n=v.useRef(!1);return bb(()=>{n.current=!0}),v.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Pa({fromRouteId:t},s)))},[e,t])}const Gv={};function sj(e,t){Gv[t]||(Gv[t]=!0,console.warn(t))}const Qv=(e,t,n)=>sj(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function oj(e,t){e!=null&&e.v7_startTransition||Qv("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&&Qv("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}const aj="startTransition",Yv=of[aj];function lj(e){let{basename:t,children:n,initialEntries:r,initialIndex:i,future:s}=e,o=v.useRef();o.current==null&&(o.current=x2({initialEntries:r,initialIndex:i,v5Compat:!0}));let a=o.current,[l,u]=v.useState({action:a.action,location:a.location}),{v7_startTransition:d}=s||{},c=v.useCallback(f=>{d&&Yv?Yv(()=>u(f)):u(f)},[u,d]);return v.useLayoutEffect(()=>a.listen(c),[a,c]),v.useEffect(()=>oj(s),[s]),v.createElement(uj,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:s})}function hp(e){Ge(!1)}function uj(e){let{basename:t="/",children:n=null,location:r,navigationType:i=zr.Pop,navigator:s,static:o=!1,future:a}=e;Ja()&&Ge(!1);let l=t.replace(/^\/*/,"/"),u=v.useMemo(()=>({basename:l,navigator:s,static:o,future:Pa({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r=="string"&&(r=ts(r));let{pathname:d="/",search:c="",hash:f="",state:h=null,key:m="default"}=r,p=v.useMemo(()=>{let w=um(d,l);return w==null?null:{location:{pathname:w,search:c,hash:f,state:h,key:m},navigationType:i}},[l,d,c,f,h,m,i]);return p==null?null:v.createElement(ns.Provider,{value:u},v.createElement(xc.Provider,{children:n,value:p}))}function cj(e){let{children:t,location:n}=e;return G2(mp(t),n)}new Promise(()=>{});function mp(e,t){t===void 0&&(t=[]);let n=[];return v.Children.forEach(e,(r,i)=>{if(!v.isValidElement(r))return;let s=[...t,i];if(r.type===v.Fragment){n.push.apply(n,mp(r.props.children,s));return}r.type!==hp&&Ge(!1),!r.props.index||!r.props.children||Ge(!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=mp(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 gp(){return gp=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},gp.apply(this,arguments)}function dP(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 fP(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function pP(e,t){return e.button===0&&(!t||t==="_self")&&!fP(e)}const hP=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],mP="6";try{window.__reactRouterVersion=mP}catch{}const gP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",vP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,yP=v.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:c,preventScrollReset:d,viewTransition:u}=t,f=dP(t,hP),{basename:p}=v.useContext(ns),h,m=!1;if(typeof c=="string"&&vP.test(c)&&(h=c,gP))try{let b=new URL(window.location.href),k=c.startsWith("//")?new URL(b.protocol+c):new URL(c),T=um(k.pathname,p);k.origin===b.origin&&T!=null?c=T+k.search+k.hash:m=!0}catch{}let x=W2(c,{relative:i}),g=xP(c,{replace:o,state:a,target:l,preventScrollReset:d,relative:i,viewTransition:u});function w(b){r&&r(b),b.defaultPrevented||g(b)}return v.createElement("a",gp({},f,{href:h||x,onClick:m||s?r:w,ref:n,target:l}))});var Kv;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Kv||(Kv={}));var Xv;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Xv||(Xv={}));function xP(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=t===void 0?{}:t,l=Sb(),c=el(),d=kb(e,{relative:o});return v.useCallback(u=>{if(pP(u,n)){u.preventDefault();let f=r!==void 0?r:pp(c)===pp(d);l(e,{replace:f,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[c,l,d,r,i,n,e,s,o,a])}const wP={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Zv=e=>{let t;const n=new Set,r=(d,u)=>{const f=typeof d=="function"?d(t):d;if(!Object.is(f,t)){const p=t;t=u??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(h=>h(t,p))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>c,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(wP?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=t=e(r,i,l);return l},bP=e=>e?Zv(e):Zv;var Eb={exports:{}},_b={},Pb={exports:{}},jb={};/**
67
+ */function gp(){return gp=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},gp.apply(this,arguments)}function dj(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 fj(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function pj(e,t){return e.button===0&&(!t||t==="_self")&&!fj(e)}const hj=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],mj="6";try{window.__reactRouterVersion=mj}catch{}const gj=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",vj=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,yj=v.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:d,viewTransition:c}=t,f=dj(t,hj),{basename:h}=v.useContext(ns),m,p=!1;if(typeof u=="string"&&vj.test(u)&&(m=u,gj))try{let b=new URL(window.location.href),T=u.startsWith("//")?new URL(b.protocol+u):new URL(u),E=um(T.pathname,h);T.origin===b.origin&&E!=null?u=E+T.search+T.hash:p=!0}catch{}let w=W2(u,{relative:i}),g=xj(u,{replace:o,state:a,target:l,preventScrollReset:d,relative:i,viewTransition:c});function x(b){r&&r(b),b.defaultPrevented||g(b)}return v.createElement("a",gp({},f,{href:m||w,onClick:p||s?r:x,ref:n,target:l}))});var Kv;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Kv||(Kv={}));var Xv;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Xv||(Xv={}));function xj(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=t===void 0?{}:t,l=Sb(),u=el(),d=kb(e,{relative:o});return v.useCallback(c=>{if(pj(c,n)){c.preventDefault();let f=r!==void 0?r:pp(u)===pp(d);l(e,{replace:f,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[u,l,d,r,i,n,e,s,o,a])}const wj={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Zv=e=>{let t;const n=new Set,r=(d,c)=>{const f=typeof d=="function"?d(t):d;if(!Object.is(f,t)){const h=t;t=c??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(m=>m(t,h))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>u,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(wj?"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},bj=e=>e?Zv(e):Zv;var Eb={exports:{}},_b={},jb={exports:{}},Pb={};/**
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 co=v;function SP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kP=typeof Object.is=="function"?Object.is:SP,CP=co.useState,TP=co.useEffect,EP=co.useLayoutEffect,_P=co.useDebugValue;function PP(e,t){var n=t(),r=CP({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return EP(function(){i.value=n,i.getSnapshot=t,Pd(i)&&s({inst:i})},[e,n,t]),TP(function(){return Pd(i)&&s({inst:i}),e(function(){Pd(i)&&s({inst:i})})},[e]),_P(n),n}function Pd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!kP(e,n)}catch{return!0}}function jP(e,t){return t()}var RP=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?jP:PP;jb.useSyncExternalStore=co.useSyncExternalStore!==void 0?co.useSyncExternalStore:RP;Pb.exports=jb;var AP=Pb.exports;/**
75
+ */var co=v;function Sj(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kj=typeof Object.is=="function"?Object.is:Sj,Cj=co.useState,Tj=co.useEffect,Ej=co.useLayoutEffect,_j=co.useDebugValue;function jj(e,t){var n=t(),r=Cj({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return Ej(function(){i.value=n,i.getSnapshot=t,jd(i)&&s({inst:i})},[e,n,t]),Tj(function(){return jd(i)&&s({inst:i}),e(function(){jd(i)&&s({inst:i})})},[e]),_j(n),n}function jd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!kj(e,n)}catch{return!0}}function Pj(e,t){return t()}var Aj=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Pj:jj;Pb.useSyncExternalStore=co.useSyncExternalStore!==void 0?co.useSyncExternalStore:Aj;jb.exports=Pb;var Rj=jb.exports;/**
76
76
  * @license React
77
77
  * use-sync-external-store-shim/with-selector.production.min.js
78
78
  *
@@ -80,39 +80,39 @@ 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 wc=v,OP=AP;function DP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var FP=typeof Object.is=="function"?Object.is:DP,MP=OP.useSyncExternalStore,NP=wc.useRef,LP=wc.useEffect,IP=wc.useMemo,$P=wc.useDebugValue;_b.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=NP(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=IP(function(){function l(p){if(!c){if(c=!0,d=p,p=r(p),i!==void 0&&o.hasValue){var h=o.value;if(i(h,p))return u=h}return u=p}if(h=u,FP(d,p))return h;var m=r(p);return i!==void 0&&i(h,m)?h:(d=p,u=m)}var c=!1,d,u,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,i]);var a=MP(e,s[0],s[1]);return LP(function(){o.hasValue=!0,o.value=a},[a]),$P(a),a};Eb.exports=_b;var BP=Eb.exports;const zP=Zi(BP),Rb={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:VP}=L,{useSyncExternalStoreWithSelector:UP}=zP;let Jv=!1;const HP=e=>e;function WP(e,t=HP,n){(Rb?"production":void 0)!=="production"&&n&&!Jv&&(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"),Jv=!0);const r=UP(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return VP(r),r}const ey=e=>{(Rb?"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"?bP(e):e,n=(r,i)=>WP(t,r,i);return Object.assign(n,t),n},qP=e=>e?ey(e):ey,kt=qP(e=>({widget:null,open:localStorage.getItem("lc:widget:isHaveChat")==="true",isInputFocused:!1,isHaveChat:localStorage.getItem("lc:widget:isHaveChat")==="true",defaultValues:{},soundPath:void 0,isTooltipVisible:!0,onTooltipClose:void 0,setIsTooltipVisible:t=>e({isTooltipVisible:t}),setOnTooltipClose:t=>e({onTooltipClose:t}),setOpen:t=>{e({open:t})},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})},onOpen:void 0,onClose:void 0,setOnOpen:t=>e({onOpen:t}),setOnClose:t=>e({onClose:t}),setIsInputFocused:t=>e({isInputFocused:t})})),GP={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"}},ty={primary:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"},secondary:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"},danger:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"},success:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"},warning:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"}};var Ab={exports:{}};/*!
83
+ */var wc=v,Oj=Rj;function Dj(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Mj=typeof Object.is=="function"?Object.is:Dj,Fj=Oj.useSyncExternalStore,Nj=wc.useRef,Lj=wc.useEffect,Ij=wc.useMemo,$j=wc.useDebugValue;_b.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=Nj(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=Ij(function(){function l(h){if(!u){if(u=!0,d=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,Mj(d,h))return m;var p=r(h);return i!==void 0&&i(m,p)?m:(d=h,c=p)}var u=!1,d,c,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,i]);var a=Fj(e,s[0],s[1]);return Lj(function(){o.hasValue=!0,o.value=a},[a]),$j(a),a};Eb.exports=_b;var Bj=Eb.exports;const zj=Zi(Bj),Ab={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:Vj}=L,{useSyncExternalStoreWithSelector:Uj}=zj;let Jv=!1;const Hj=e=>e;function Wj(e,t=Hj,n){(Ab?"production":void 0)!=="production"&&n&&!Jv&&(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"),Jv=!0);const r=Uj(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Vj(r),r}const ey=e=>{(Ab?"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"?bj(e):e,n=(r,i)=>Wj(t,r,i);return Object.assign(n,t),n},qj=e=>e?ey(e):ey,kt=qj(e=>({widget:null,open:localStorage.getItem("lc:widget:isHaveChat")==="true",isInputFocused:!1,isHaveChat:localStorage.getItem("lc:widget:isHaveChat")==="true",defaultValues:{},soundPath:void 0,isTooltipVisible:!0,onTooltipClose:void 0,anyAdmin:!0,setIsTooltipVisible:t=>e({isTooltipVisible:t}),setOnTooltipClose:t=>e({onTooltipClose:t}),setOpen:t=>{e({open:t})},setAnyAdmin:t=>e({anyAdmin:t}),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})},onOpen:void 0,onClose:void 0,setOnOpen:t=>e({onOpen:t}),setOnClose:t=>e({onClose:t}),setIsInputFocused:t=>e({isInputFocused:t})})),Gj={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"}},ty={primary:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"},secondary:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"},danger:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"},success:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"},warning:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"}};var Rb={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})()})(Ab);var QP=Ab.exports;const ge=Zi(QP),dm=v.createContext({});function bc(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}const fm=typeof window<"u",Ob=fm?v.useLayoutEffect:v.useEffect,Sc=v.createContext(null),pm=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class YP extends v.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 KP({children:e,isPresent:t,anchorX:n}){const r=v.useId(),i=v.useRef(null),s=v.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:o}=v.useContext(pm);return v.useInsertionEffect(()=>{const{width:a,height:l,top:c,left:d,right:u}=s.current;if(t||!i.current||!a||!l)return;const f=n==="left"?`left: ${d}`:`right: ${u}`;i.current.dataset.motionPopId=r;const p=document.createElement("style");return o&&(p.nonce=o),document.head.appendChild(p),p.sheet&&p.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})()})(Rb);var Qj=Rb.exports;const ve=Zi(Qj),dm=v.createContext({});function bc(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}const fm=typeof window<"u",Ob=fm?v.useLayoutEffect:v.useEffect,Sc=v.createContext(null),pm=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class Yj extends v.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 Kj({children:e,isPresent:t,anchorX:n}){const r=v.useId(),i=v.useRef(null),s=v.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:o}=v.useContext(pm);return v.useInsertionEffect(()=>{const{width:a,height:l,top:u,left:d,right:c}=s.current;if(t||!i.current||!a||!l)return;const f=n==="left"?`left: ${d}`:`right: ${c}`;i.current.dataset.motionPopId=r;const h=document.createElement("style");return o&&(h.nonce=o),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`
88
88
  [data-motion-pop-id="${r}"] {
89
89
  position: absolute !important;
90
90
  width: ${a}px !important;
91
91
  height: ${l}px !important;
92
92
  ${f}px !important;
93
- top: ${c}px !important;
93
+ top: ${u}px !important;
94
94
  }
95
- `),()=>{document.head.removeChild(p)}},[t]),y.jsx(YP,{isPresent:t,childRef:i,sizeRef:s,children:v.cloneElement(e,{ref:i})})}const XP=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a})=>{const l=bc(ZP),c=v.useId();let d=!0,u=v.useMemo(()=>(d=!1,{id:c,initial:t,isPresent:n,custom:i,onExitComplete:f=>{l.set(f,!0);for(const p of l.values())if(!p)return;r&&r()},register:f=>(l.set(f,!1),()=>l.delete(f))}),[n,l,r]);return s&&d&&(u={...u}),v.useMemo(()=>{l.forEach((f,p)=>l.set(p,!1))},[n]),v.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(e=y.jsx(KP,{isPresent:n,anchorX:a,children:e})),y.jsx(Sc.Provider,{value:u,children:e})};function ZP(){return new Map}function Db(e=!0){const t=v.useContext(Sc);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=v.useId();v.useEffect(()=>{if(e)return i(s)},[e]);const o=v.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const Al=e=>e.key||"";function ny(e){const t=[];return v.Children.forEach(e,n=>{v.isValidElement(n)&&t.push(n)}),t}const Xr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left"})=>{const[l,c]=Db(o),d=v.useMemo(()=>ny(e),[e]),u=o&&!l?[]:d.map(Al),f=v.useRef(!0),p=v.useRef(d),h=bc(()=>new Map),[m,x]=v.useState(d),[g,w]=v.useState(d);Ob(()=>{f.current=!1,p.current=d;for(let T=0;T<g.length;T++){const E=Al(g[T]);u.includes(E)?h.delete(E):h.get(E)!==!0&&h.set(E,!1)}},[g,u.length,u.join("-")]);const b=[];if(d!==m){let T=[...d];for(let E=0;E<g.length;E++){const _=g[E],P=Al(_);u.includes(P)||(T.splice(E,0,_),b.push(_))}return s==="wait"&&b.length&&(T=b),w(ny(T)),x(d),null}const{forceRender:k}=v.useContext(dm);return y.jsx(y.Fragment,{children:g.map(T=>{const E=Al(T),_=o&&!l?!1:d===g||u.includes(E),P=()=>{if(h.has(E))h.set(E,!0);else return;let M=!0;h.forEach(N=>{N||(M=!1)}),M&&(k==null||k(),w(p.current),o&&(c==null||c()),r&&r())};return y.jsx(XP,{isPresent:_,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,onExitComplete:_?void 0:P,anchorX:a,children:T},E)})})};function hm(e,t){e.indexOf(t)===-1&&e.push(t)}function mm(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let vp=()=>{};const yp={skipAnimations:!1,useManualTiming:!1};function gm(e){let t;return()=>(t===void 0&&(t=e()),t)}const ln=e=>e,Ra=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class vm{constructor(){this.subscriptions=[]}add(t){return hm(this.subscriptions,t),()=>mm(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 Un=e=>e*1e3,Hn=e=>e/1e3;function Fb(e,t){return t?e*(1e3/t):0}const JP=gm(()=>window.ScrollTimeline!==void 0);class ej{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(JP()&&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 tj extends ej{then(t,n){return this.finished.finally(t).then(()=>{})}}const ry={value:null,addProjectionMetrics:null},ym=e=>Array.isArray(e)&&typeof e[0]=="number",nj={};function rj(e,t){const n=gm(e);return()=>nj[t]??n()}const Aa=rj(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Mb=(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})`,xp={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 Nb(e,t){if(e)return typeof e=="function"&&Aa()?Mb(e,t):ym(e)?Wo(e):Array.isArray(e)?e.map(n=>Nb(n,t)||xp.easeOut):xp[e]}function ij(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeInOut",times:l}={},c=void 0){const d={[t]:n};l&&(d.offset=l);const u=Nb(a,i);return Array.isArray(u)&&(d.easing=u),e.animate(d,{delay:r,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal",pseudoElement:c})}function xm(e){return typeof e=="function"&&"applyToOptions"in e}function wm(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Vu=2e4;function bm(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Vu;)t+=n,r=e.next(t);return t>=Vu?1/0:t}function sj(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(bm(r),Vu);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Hn(i)}}function Lb(e){return!!(typeof e=="function"&&Aa()||!e||typeof e=="string"&&(e in xp||Aa())||ym(e)||Array.isArray(e)&&e.every(Lb))}function iy(e,t){e.timeline=t,e.onfinish=null}const Ol=["read","resolveKeyframes","update","preRender","render","postRender"];function oj(e,t){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(u){o.has(u)&&(d.schedule(u),e()),l++,u(a)}const d={schedule:(u,f=!1,p=!1)=>{const m=p&&i?n:r;return f&&o.add(u),m.has(u)||m.add(u),u},cancel:u=>{r.delete(u),o.delete(u)},process:u=>{if(a=u,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(c),t&&ry.value&&ry.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,d.process(u))}};return d}const aj=40;function Ib(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Ol.reduce((g,w)=>(g[w]=oj(s,t?w:void 0),g),{}),{read:a,resolveKeyframes:l,update:c,preRender:d,render:u,postRender:f}=o,p=()=>{const g=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(g-i.timestamp,aj),1),i.timestamp=g,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),d.process(i),u.process(i),f.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))},h=()=>{n=!0,r=!0,i.isProcessing||e(p)};return{schedule:Ol.reduce((g,w)=>{const b=o[w];return g[w]=(k,T=!1,E=!1)=>(n||h(),b.schedule(k,T,E)),g},{}),cancel:g=>{for(let w=0;w<Ol.length;w++)o[Ol[w]].cancel(g)},state:i,steps:o}}const{schedule:Sm,cancel:dB}=Ib(queueMicrotask,!1),{schedule:Se,cancel:ri,state:it,steps:jd}=Ib(typeof requestAnimationFrame<"u"?requestAnimationFrame:ln,!0);let nu;function lj(){nu=void 0}const Wn={now:()=>(nu===void 0&&Wn.set(it.isProcessing||yp.useManualTiming?it.timestamp:performance.now()),nu),set:e=>{nu=e,queueMicrotask(lj)}},gn={x:!1,y:!1};function $b(){return gn.x||gn.y}function uj(e){return e==="x"||e==="y"?gn[e]?null:(gn[e]=!0,()=>{gn[e]=!1}):gn.x||gn.y?null:(gn.x=gn.y=!0,()=>{gn.x=gn.y=!1})}function cj(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 Bb(e,t){const n=cj(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function sy(e){return!(e.pointerType==="touch"||$b())}function dj(e,t,n={}){const[r,i,s]=Bb(e,n),o=a=>{if(!sy(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const d=u=>{sy(u)&&(c(u),l.removeEventListener("pointerleave",d))};l.addEventListener("pointerleave",d,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const zb=(e,t)=>t?e===t?!0:zb(e,t.parentElement):!1,km=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,fj=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function pj(e){return fj.has(e.tagName)||e.tabIndex!==-1}const qo=new WeakSet;function oy(e){return t=>{t.key==="Enter"&&e(t)}}function Rd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const hj=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=oy(()=>{if(qo.has(n))return;Rd(n,"down");const i=oy(()=>{Rd(n,"up")}),s=()=>Rd(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 ay(e){return km(e)&&!$b()}function mj(e,t,n={}){const[r,i,s]=Bb(e,n),o=a=>{const l=a.currentTarget;if(!ay(a)||qo.has(l))return;qo.add(l);const c=t(l,a),d=(p,h)=>{window.removeEventListener("pointerup",u),window.removeEventListener("pointercancel",f),!(!ay(p)||!qo.has(l))&&(qo.delete(l),typeof c=="function"&&c(p,{success:h}))},u=p=>{d(p,l===window||l===document||n.useGlobalTarget||zb(l,p.target))},f=p=>{d(p,!1)};window.addEventListener("pointerup",u,i),window.addEventListener("pointercancel",f,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a instanceof HTMLElement&&(a.addEventListener("focus",c=>hj(c,i)),!pj(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}const ly=30,gj=e=>!isNaN(parseFloat(e));class vj{constructor(t,n={}){this.version="12.7.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=Wn.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=Wn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=gj(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 vm);const r=this.events[t].add(n);return t==="change"?()=>{r(),Se.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=Wn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ly)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ly);return Fb(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 vj(e,t)}const Vb=v.createContext({strict:!1}),uy={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"]},fo={};for(const e in uy)fo[e]={isEnabled:t=>uy[e].some(n=>!!t[n])};function yj(e){for(const t in e)fo[t]={...fo[t],...e[t]}}const xj=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 Uu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||xj.has(e)}let Ub=e=>!Uu(e);function wj(e){e&&(Ub=t=>t.startsWith("on")?!Uu(t):e(t))}try{wj(require("@emotion/is-prop-valid").default)}catch{}function bj(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Ub(i)||n===!0&&Uu(i)||!t&&!Uu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function Sj(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 kc=v.createContext({});function Cc(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Da(e){return typeof e=="string"||Array.isArray(e)}const Cm=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Tm=["initial",...Cm];function Tc(e){return Cc(e.animate)||Tm.some(t=>Da(e[t]))}function Hb(e){return!!(Tc(e)||e.variants)}function kj(e,t){if(Tc(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Da(n)?n:void 0,animate:Da(r)?r:void 0}}return e.inherit!==!1?t:{}}function Cj(e){const{initial:t,animate:n}=kj(e,v.useContext(kc));return v.useMemo(()=>({initial:t,animate:n}),[cy(t),cy(n)])}function cy(e){return Array.isArray(e)?e.join(" "):e}const Tj=Symbol.for("motionComponentSymbol");function As(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Ej(e,t,n){return v.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):As(n)&&(n.current=r))},[t])}const Em=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),_j="framerAppearId",Wb="data-"+Em(_j),qb=v.createContext({});function Pj(e,t,n,r,i){var m,x;const{visualElement:s}=v.useContext(kc),o=v.useContext(Vb),a=v.useContext(Sc),l=v.useContext(pm).reducedMotion,c=v.useRef(null);r=r||o.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const d=c.current,u=v.useContext(qb);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&jj(c.current,n,i,u);const f=v.useRef(!1);v.useInsertionEffect(()=>{d&&f.current&&d.update(n,a)});const p=n[Wb],h=v.useRef(!!p&&!((m=window.MotionHandoffIsComplete)!=null&&m.call(window,p))&&((x=window.MotionHasOptimisedAnimation)==null?void 0:x.call(window,p)));return Ob(()=>{d&&(f.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),Sm.render(d.render),h.current&&d.animationState&&d.animationState.animateChanges())}),v.useEffect(()=>{d&&(!h.current&&d.animationState&&d.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{var g;(g=window.MotionHandoffMarkAsComplete)==null||g.call(window,p)}),h.current=!1))}),d}function jj(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Gb(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&As(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:c})}function Gb(e){if(e)return e.options.allowProjection!==!1?e.projection:Gb(e.parent)}function Rj({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&yj(e);function s(a,l){let c;const d={...v.useContext(pm),...a,layoutId:Aj(a)},{isStatic:u}=d,f=Cj(a),p=r(a,u);if(!u&&fm){Oj();const h=Dj(d);c=h.MeasureLayout,f.visualElement=Pj(i,p,d,t,h.ProjectionNode)}return y.jsxs(kc.Provider,{value:f,children:[c&&f.visualElement?y.jsx(c,{visualElement:f.visualElement,...d}):null,n(i,a,Ej(p,f.visualElement,l),p,u,f.visualElement)]})}s.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=v.forwardRef(s);return o[Tj]=i,o}function Aj({layoutId:e}){const t=v.useContext(dm).id;return t&&e!==void 0?t+"-"+e:e}function Oj(e,t){v.useContext(Vb).strict}function Dj(e){const{drag:t,layout:n}=fo;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 Qb=e=>t=>typeof t=="string"&&t.startsWith(e),_m=Qb("--"),Fj=Qb("var(--"),Pm=e=>Fj(e)?Mj.test(e.split("/*")[0].trim()):!1,Mj=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Fa={};function Nj(e){for(const t in e)Fa[t]=e[t],_m(t)&&(Fa[t].isCSSVariable=!0)}const ko=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],is=new Set(ko);function Yb(e,{layout:t,layoutId:n}){return is.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Fa[e]||e==="opacity")}const ht=e=>!!(e&&e.getVelocity),Kb=(e,t)=>t&&typeof e=="number"?t.transform(e):e,hr=(e,t,n)=>n>t?t:n<e?e:n,Co={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ma={...Co,transform:e=>hr(0,1,e)},Dl={...Co,default:1},tl=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),kr=tl("deg"),qn=tl("%"),J=tl("px"),Lj=tl("vh"),Ij=tl("vw"),dy={...qn,parse:e=>qn.parse(e)/100,transform:e=>qn.transform(e*100)},$j={borderWidth:J,borderTopWidth:J,borderRightWidth:J,borderBottomWidth:J,borderLeftWidth:J,borderRadius:J,radius:J,borderTopLeftRadius:J,borderTopRightRadius:J,borderBottomRightRadius:J,borderBottomLeftRadius:J,width:J,maxWidth:J,height:J,maxHeight:J,top:J,right:J,bottom:J,left:J,padding:J,paddingTop:J,paddingRight:J,paddingBottom:J,paddingLeft:J,margin:J,marginTop:J,marginRight:J,marginBottom:J,marginLeft:J,backgroundPositionX:J,backgroundPositionY:J},Bj={rotate:kr,rotateX:kr,rotateY:kr,rotateZ:kr,scale:Dl,scaleX:Dl,scaleY:Dl,scaleZ:Dl,skew:kr,skewX:kr,skewY:kr,distance:J,translateX:J,translateY:J,translateZ:J,x:J,y:J,z:J,perspective:J,transformPerspective:J,opacity:Ma,originX:dy,originY:dy,originZ:J},fy={...Co,transform:Math.round},jm={...$j,...Bj,zIndex:fy,size:J,fillOpacity:Ma,strokeOpacity:Ma,numOctaves:fy},zj={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Vj=ko.length;function Uj(e,t,n){let r="",i=!0;for(let s=0;s<Vj;s++){const o=ko[s],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=Kb(a,jm[o]);if(!l){i=!1;const d=zj[o]||o;r+=`${d}(${c}) `}n&&(t[o]=c)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Rm(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const c=t[l];if(is.has(l)){o=!0;continue}else if(_m(l)){i[l]=c;continue}else{const d=Kb(c,jm[l]);l.startsWith("origin")?(a=!0,s[l]=d):r[l]=d}}if(t.transform||(o||n?r.transform=Uj(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:d=0}=s;r.transformOrigin=`${l} ${c} ${d}`}}const Am=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Xb(e,t,n){for(const r in t)!ht(t[r])&&!Yb(r,n)&&(e[r]=t[r])}function Hj({transformTemplate:e},t){return v.useMemo(()=>{const n=Am();return Rm(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Wj(e,t){const n=e.style||{},r={};return Xb(r,n,e),Object.assign(r,Hj(e,t)),r}function qj(e,t){const n={},r=Wj(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 Gj=["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 Om(e){return typeof e!="string"||e.includes("-")?!1:!!(Gj.indexOf(e)>-1||/[A-Z]/u.test(e))}const Qj={offset:"stroke-dashoffset",array:"stroke-dasharray"},Yj={offset:"strokeDashoffset",array:"strokeDasharray"};function Kj(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?Qj:Yj;e[s.offset]=J.transform(-r);const o=J.transform(t),a=J.transform(n);e[s.array]=`${o} ${a}`}function py(e,t,n){return typeof e=="string"?e:J.transform(t+n*e)}function Xj(e,t,n){const r=py(t,e.x,e.width),i=py(n,e.y,e.height);return`${r} ${i}`}function Dm(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},d,u){if(Rm(e,c,u),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:h}=e;f.transform&&(h&&(p.transform=f.transform),delete f.transform),h&&(i!==void 0||s!==void 0||p.transform)&&(p.transformOrigin=Xj(h,i!==void 0?i:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&Kj(f,o,a,l,!1)}const Zb=()=>({...Am(),attrs:{}}),Fm=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Zj(e,t,n,r){const i=v.useMemo(()=>{const s=Zb();return Dm(s,t,Fm(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Xb(s,e.style,e),i.style={...s,...i.style}}return i}function Jj(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Om(n)?Zj:qj)(r,s,o,n),c=bj(r,typeof n=="string",e),d=n!==v.Fragment?{...c,...l,ref:i}:{},{children:u}=r,f=v.useMemo(()=>ht(u)?u.get():u,[u]);return v.createElement(n,{...d,children:f})}}function hy(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Mm(e,t,n,r){if(typeof t=="function"){const[i,s]=hy(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]=hy(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const wp=e=>Array.isArray(e),eR=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),tR=e=>wp(e)?e[e.length-1]||0:e;function ru(e){const t=ht(e)?e.get():e;return eR(t)?t.toValue():t}function nR({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,s){const o={latestValues:rR(r,i,s,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const Jb=e=>(t,n)=>{const r=v.useContext(kc),i=v.useContext(Sc),s=()=>nR(e,t,r,i);return n?s():bc(s)};function rR(e,t,n,r){const i={},s=r(e,{});for(const f in s)i[f]=ru(s[f]);let{initial:o,animate:a}=e;const l=Tc(e),c=Hb(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const u=d?a:o;if(u&&typeof u!="boolean"&&!Cc(u)){const f=Array.isArray(u)?u:[u];for(let p=0;p<f.length;p++){const h=Mm(e,f[p]);if(h){const{transitionEnd:m,transition:x,...g}=h;for(const w in g){let b=g[w];if(Array.isArray(b)){const k=d?b.length-1:0;b=b[k]}b!==null&&(i[w]=b)}for(const w in m)i[w]=m[w]}}}return i}function Nm(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(ht(r[o])||t.style&&ht(t.style[o])||Yb(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const iR={useVisualState:Jb({scrapeMotionValuesFromProps:Nm,createRenderState:Am})};function eS(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 tS(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 nS=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 rS(e,t,n,r){tS(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(nS.has(i)?i:Em(i),t.attrs[i])}function iS(e,t,n){const r=Nm(e,t,n);for(const i in e)if(ht(e[i])||ht(t[i])){const s=ko.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const my=["x","y","width","height","cx","cy","r"],sR={useVisualState:Jb({scrapeMotionValuesFromProps:iS,createRenderState:Zb,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(is.has(a)){s=!0;break}}if(!s)return;let o=!t;if(t)for(let a=0;a<my.length;a++){const l=my[a];e[l]!==t[l]&&(o=!0)}o&&Se.read(()=>{eS(n,r),Se.render(()=>{Dm(r,i,Fm(n.tagName),e.transformTemplate),rS(n,r)})})}})};function oR(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Om(r)?sR:iR,preloadedFeatures:e,useRender:Jj(i),createVisualElement:t,Component:r};return Rj(o)}}function Na(e,t,n){const r=e.getProps();return Mm(r,t,n!==void 0?n:r.custom,e)}const sS=new Set(["width","height","top","left","right","bottom",...ko]);function aR(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Oa(n))}function lR(e,t){const n=Na(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=tR(s[o]);aR(e,o,a)}}function uR(e){return!!(ht(e)&&e.add)}function bp(e,t){const n=e.getValue("willChange");if(uR(n))return n.add(t);if(!n&&yp.WillChange){const r=new yp.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function oS(e){return e.props[Wb]}const aS=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,cR=1e-7,dR=12;function fR(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=aS(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>cR&&++a<dR);return o}function nl(e,t,n,r){if(e===t&&n===r)return ln;const i=s=>fR(s,0,1,e,n);return s=>s===0||s===1?s:aS(i(s),t,r)}const lS=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,uS=e=>t=>1-e(1-t),cS=nl(.33,1.53,.69,.99),Lm=uS(cS),dS=lS(Lm),fS=e=>(e*=2)<1?.5*Lm(e):.5*(2-Math.pow(2,-10*(e-1))),Im=e=>1-Math.sin(Math.acos(e)),pS=uS(Im),hS=lS(Im),mS=e=>/^0[^.\s]+$/u.test(e);function pR(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||mS(e):!0}const ra=e=>Math.round(e*1e5)/1e5,$m=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function hR(e){return e==null}const mR=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Bm=(e,t)=>n=>!!(typeof n=="string"&&mR.test(n)&&n.startsWith(e)||t&&!hR(n)&&Object.prototype.hasOwnProperty.call(n,t)),gS=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match($m);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},gR=e=>hr(0,255,e),Ad={...Co,transform:e=>Math.round(gR(e))},Pi={test:Bm("rgb","red"),parse:gS("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ad.transform(e)+", "+Ad.transform(t)+", "+Ad.transform(n)+", "+ra(Ma.transform(r))+")"};function vR(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 Sp={test:Bm("#"),parse:vR,transform:Pi.transform},Os={test:Bm("hsl","hue"),parse:gS("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+qn.transform(ra(t))+", "+qn.transform(ra(n))+", "+ra(Ma.transform(r))+")"},ft={test:e=>Pi.test(e)||Sp.test(e)||Os.test(e),parse:e=>Pi.test(e)?Pi.parse(e):Os.test(e)?Os.parse(e):Sp.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Pi.transform(e):Os.transform(e)},yR=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function xR(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match($m))==null?void 0:t.length)||0)+(((n=e.match(yR))==null?void 0:n.length)||0)>0}const vS="number",yS="color",wR="var",bR="var(",gy="${}",SR=/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 La(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(SR,l=>(ft.test(l)?(r.color.push(s),i.push(yS),n.push(ft.parse(l))):l.startsWith(bR)?(r.var.push(s),i.push(wR),n.push(l)):(r.number.push(s),i.push(vS),n.push(parseFloat(l))),++s,gy)).split(gy);return{values:n,split:a,indexes:r,types:i}}function xS(e){return La(e).values}function wS(e){const{split:t,types:n}=La(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===vS?s+=ra(i[o]):a===yS?s+=ft.transform(i[o]):s+=i[o]}return s}}const kR=e=>typeof e=="number"?0:e;function CR(e){const t=xS(e);return wS(e)(t.map(kR))}const ii={test:xR,parse:xS,createTransformer:wS,getAnimatableNone:CR},TR=new Set(["brightness","contrast","saturate","opacity"]);function ER(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match($m)||[];if(!r)return e;const i=n.replace(r,"");let s=TR.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const _R=/\b([a-z-]*)\(.*?\)/gu,kp={...ii,getAnimatableNone:e=>{const t=e.match(_R);return t?t.map(ER).join(" "):e}},PR={...jm,color:ft,backgroundColor:ft,outlineColor:ft,fill:ft,stroke:ft,borderColor:ft,borderTopColor:ft,borderRightColor:ft,borderBottomColor:ft,borderLeftColor:ft,filter:kp,WebkitFilter:kp},bS=e=>PR[e];function SS(e,t){let n=bS(e);return n!==kp&&(n=ii),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const jR=new Set(["auto","none","0"]);function RR(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!jR.has(s)&&La(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=SS(n,i)}const ji=e=>e*180/Math.PI,Cp=e=>{const t=ji(Math.atan2(e[1],e[0]));return Tp(t)},AR={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Cp,rotateZ:Cp,skewX:e=>ji(Math.atan(e[1])),skewY:e=>ji(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Tp=e=>(e=e%360,e<0&&(e+=360),e),vy=Cp,yy=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),xy=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),OR={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:yy,scaleY:xy,scale:e=>(yy(e)+xy(e))/2,rotateX:e=>Tp(ji(Math.atan2(e[6],e[5]))),rotateY:e=>Tp(ji(Math.atan2(-e[2],e[0]))),rotateZ:vy,rotate:vy,skewX:e=>ji(Math.atan(e[4])),skewY:e=>ji(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function wy(e){return e.includes("scale")?1:0}function Ep(e,t){if(!e||e==="none")return wy(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=OR,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=AR,i=a}if(!i)return wy(t);const s=r[t],o=i[1].split(",").map(FR);return typeof s=="function"?s(o):o[s]}const DR=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Ep(n,t)};function FR(e){return parseFloat(e.trim())}const by=e=>e===Co||e===J,MR=new Set(["x","y","z"]),NR=ko.filter(e=>!MR.has(e));function LR(e){const t=[];return NR.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const po={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})=>Ep(t,"x"),y:(e,{transform:t})=>Ep(t,"y")};po.translateX=po.x;po.translateY=po.y;const zi=new Set;let _p=!1,Pp=!1;function kS(){if(Pp){const e=Array.from(zi).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=LR(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)})}Pp=!1,_p=!1,zi.forEach(e=>e.complete()),zi.clear()}function CS(){zi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Pp=!0)})}function IR(){CS(),kS()}class zm{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?(zi.add(this),_p||(_p=!0,Se.read(CS),Se.resolveKeyframes(kS))):(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),zi.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,zi.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const TS=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),$R=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function BR(e){const t=$R.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function ES(e,t,n=1){const[r,i]=BR(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return TS(o)?parseFloat(o):o}return Pm(i)?ES(i,t,n+1):i}const _S=e=>t=>t.test(e),zR={test:e=>e==="auto",parse:e=>e},PS=[Co,J,qn,kr,Ij,Lj,zR],Sy=e=>PS.find(_S(e));class jS extends zm{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Pm(c))){const d=ES(c,n.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!sS.has(r)||t.length!==2)return;const[i,s]=t,o=Sy(i),a=Sy(s);if(o!==a)if(by(o)&&by(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)pR(t[i])&&r.push(i);r.length&&RR(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=po[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]=po[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const ky=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ii.test(e)||e==="0")&&!e.startsWith("url("));function VR(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 UR(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=ky(i,t),a=ky(s,t);return!o||!a?!1:VR(e)||(n==="spring"||xm(n))&&r}const HR=e=>e!==null;function Ec(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(HR),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const WR=40;class RS{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=Wn.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>WR?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&IR(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Wn.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!UR(t,r,i,s))if(o)this.options.duration=0;else{l&&l(Ec(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},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 je=(e,t,n)=>e+(t-e)*n;function Od(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 qR({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=Od(l,a,e+1/3),s=Od(l,a,e),o=Od(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function Hu(e,t){return n=>n>0?t:e}const Dd=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},GR=[Sp,Pi,Os],QR=e=>GR.find(t=>t.test(e));function Cy(e){const t=QR(e);if(!t)return!1;let n=t.parse(e);return t===Os&&(n=qR(n)),n}const Ty=(e,t)=>{const n=Cy(e),r=Cy(t);if(!n||!r)return Hu(e,t);const i={...n};return s=>(i.red=Dd(n.red,r.red,s),i.green=Dd(n.green,r.green,s),i.blue=Dd(n.blue,r.blue,s),i.alpha=je(n.alpha,r.alpha,s),Pi.transform(i))},YR=(e,t)=>n=>t(e(n)),rl=(...e)=>e.reduce(YR),jp=new Set(["none","hidden"]);function KR(e,t){return jp.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function XR(e,t){return n=>je(e,t,n)}function Vm(e){return typeof e=="number"?XR:typeof e=="string"?Pm(e)?Hu:ft.test(e)?Ty:eA:Array.isArray(e)?AS:typeof e=="object"?ft.test(e)?Ty:ZR:Hu}function AS(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>Vm(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function ZR(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Vm(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function JR(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 eA=(e,t)=>{const n=ii.createTransformer(t),r=La(e),i=La(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?jp.has(e)&&!i.values.length||jp.has(t)&&!r.values.length?KR(e,t):rl(AS(JR(r,i),i.values),n):Hu(e,t)};function OS(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?je(e,t,n):Vm(e)(e,t)}const tA=5;function DS(e,t,n){const r=Math.max(t-tA,0);return Fb(n-e(r),t-r)}const Fe={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},Fd=.001;function nA({duration:e=Fe.duration,bounce:t=Fe.bounce,velocity:n=Fe.velocity,mass:r=Fe.mass}){let i,s,o=1-t;o=hr(Fe.minDamping,Fe.maxDamping,o),e=hr(Fe.minDuration,Fe.maxDuration,Hn(e)),o<1?(i=c=>{const d=c*o,u=d*e,f=d-n,p=Rp(c,o),h=Math.exp(-u);return Fd-f/p*h},s=c=>{const u=c*o*e,f=u*n+n,p=Math.pow(o,2)*Math.pow(c,2)*e,h=Math.exp(-u),m=Rp(Math.pow(c,2),o);return(-i(c)+Fd>0?-1:1)*((f-p)*h)/m}):(i=c=>{const d=Math.exp(-c*e),u=(c-n)*e+1;return-Fd+d*u},s=c=>{const d=Math.exp(-c*e),u=(n-c)*(e*e);return d*u});const a=5/e,l=iA(i,s,a);if(e=Un(e),isNaN(l))return{stiffness:Fe.stiffness,damping:Fe.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const rA=12;function iA(e,t,n){let r=n;for(let i=1;i<rA;i++)r=r-e(r)/t(r);return r}function Rp(e,t){return e*Math.sqrt(1-t*t)}const sA=["duration","bounce"],oA=["stiffness","damping","mass"];function Ey(e,t){return t.some(n=>e[n]!==void 0)}function aA(e){let t={velocity:Fe.velocity,stiffness:Fe.stiffness,damping:Fe.damping,mass:Fe.mass,isResolvedFromDuration:!1,...e};if(!Ey(e,oA)&&Ey(e,sA))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*hr(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Fe.mass,stiffness:i,damping:s}}else{const n=nA(e);t={...t,...n,mass:Fe.mass},t.isResolvedFromDuration=!0}return t}function Wu(e=Fe.visualDuration,t=Fe.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:d,duration:u,velocity:f,isResolvedFromDuration:p}=aA({...n,velocity:-Hn(n.velocity||0)}),h=f||0,m=c/(2*Math.sqrt(l*d)),x=o-s,g=Hn(Math.sqrt(l/d)),w=Math.abs(x)<5;r||(r=w?Fe.restSpeed.granular:Fe.restSpeed.default),i||(i=w?Fe.restDelta.granular:Fe.restDelta.default);let b;if(m<1){const T=Rp(g,m);b=E=>{const _=Math.exp(-m*g*E);return o-_*((h+m*g*x)/T*Math.sin(T*E)+x*Math.cos(T*E))}}else if(m===1)b=T=>o-Math.exp(-g*T)*(x+(h+g*x)*T);else{const T=g*Math.sqrt(m*m-1);b=E=>{const _=Math.exp(-m*g*E),P=Math.min(T*E,300);return o-_*((h+m*g*x)*Math.sinh(P)+T*x*Math.cosh(P))/T}}const k={calculatedDuration:p&&u||null,next:T=>{const E=b(T);if(p)a.done=T>=u;else{let _=0;m<1&&(_=T===0?Un(h):DS(b,T,E));const P=Math.abs(_)<=r,M=Math.abs(o-E)<=i;a.done=P&&M}return a.value=a.done?o:E,a},toString:()=>{const T=Math.min(bm(k),Vu),E=Mb(_=>k.next(T*_).value,T,30);return T+"ms "+E},toTransition:()=>{}};return k}Wu.applyToOptions=e=>{const t=sj(e,100,Wu);return e.ease=Aa()?t.ease:"easeOut",e.duration=Un(t.duration),e.type="keyframes",e};function _y({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:d}){const u=e[0],f={done:!1,value:u},p=P=>a!==void 0&&P<a||l!==void 0&&P>l,h=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let m=n*t;const x=u+m,g=o===void 0?x:o(x);g!==x&&(m=g-u);const w=P=>-m*Math.exp(-P/r),b=P=>g+w(P),k=P=>{const M=w(P),N=b(P);f.done=Math.abs(M)<=c,f.value=f.done?g:N};let T,E;const _=P=>{p(f.value)&&(T=P,E=Wu({keyframes:[f.value,h(f.value)],velocity:DS(b,P,f.value),damping:i,stiffness:s,restDelta:c,restSpeed:d}))};return _(0),{calculatedDuration:null,next:P=>{let M=!1;return!E&&T===void 0&&(M=!0,k(P),_(P)),T!==void 0&&P>=T?E.next(P-T):(!M&&k(P),f)}}}const lA=nl(.42,0,1,1),uA=nl(0,0,.58,1),FS=nl(.42,0,.58,1),cA=e=>Array.isArray(e)&&typeof e[0]!="number",Py={linear:ln,easeIn:lA,easeInOut:FS,easeOut:uA,circIn:Im,circInOut:hS,circOut:pS,backIn:Lm,backInOut:dS,backOut:cS,anticipate:fS},jy=e=>{if(ym(e)){vp(e.length===4);const[t,n,r,i]=e;return nl(t,n,r,i)}else if(typeof e=="string")return vp(Py[e]!==void 0),Py[e];return e};function dA(e,t,n){const r=[],i=n||OS,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]||ln:t;a=rl(l,a)}r.push(a)}return r}function fA(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(vp(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=dA(t,r,i),l=a.length,c=d=>{if(o&&d<e[0])return t[0];let u=0;if(l>1)for(;u<e.length-2&&!(d<e[u+1]);u++);const f=Ra(e[u],e[u+1],d);return a[u](f)};return n?d=>c(hr(e[0],e[s-1],d)):c}function pA(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Ra(0,t,r);e.push(je(n,1,i))}}function hA(e){const t=[0];return pA(t,e.length-1),t}function mA(e,t){return e.map(n=>n*t)}function gA(e,t){return e.map(()=>t||FS).splice(0,e.length-1)}function qu({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=cA(r)?r.map(jy):jy(r),s={done:!1,value:t[0]},o=mA(n&&n.length===t.length?n:hA(t),e),a=fA(o,t,{ease:Array.isArray(i)?i:gA(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const vA=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Se.update(t,!0),stop:()=>ri(t),now:()=>it.isProcessing?it.timestamp:Wn.now()}},yA={decay:_y,inertia:_y,tween:qu,keyframes:qu,spring:Wu},xA=e=>e/100;class Um extends RS{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)||zm,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new o(s,a,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,a=xm(n)?n:yA[n]||qu;let l,c;a!==qu&&typeof t[0]!="number"&&(l=rl(xA,OS(t[0],t[1])),t=[0,100]);const d=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),d.calculatedDuration===null&&(d.calculatedDuration=bm(d));const{calculatedDuration:u}=d,f=u+i,p=f*(r+1)-i;return{generator:d,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:u,resolvedDuration:f,totalDuration:p}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:d,resolvedDuration:u}=r;if(this.startTime===null)return s.next(0);const{delay:f,repeat:p,repeatType:h,repeatDelay:m,onUpdate:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/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 g=this.currentTime-f*(this.speed>=0?1:-1),w=this.speed>=0?g<0:g>d;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let b=this.currentTime,k=s;if(p){const P=Math.min(this.currentTime,d)/u;let M=Math.floor(P),N=P%1;!N&&P>=1&&(N=1),N===1&&M--,M=Math.min(M,p+1),!!(M%2)&&(h==="reverse"?(N=1-N,m&&(N-=m/u)):h==="mirror"&&(k=o)),b=hr(0,1,N)*u}const T=w?{done:!1,value:l[0]}:k.next(b);a&&(T.value=a(T.value));let{done:E}=T;!w&&c!==null&&(E=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const _=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return _&&i!==void 0&&(T.value=Ec(l,this.options,i)),x&&x(T.value),_&&this.finish(),T}get duration(){const{resolved:t}=this;return t?Hn(t.calculatedDuration):0}get time(){return Hn(this.currentTime)}set time(t){t=Un(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=Hn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=vA,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 wA=new Set(["opacity","clipPath","filter","transform"]),bA=gm(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Gu=10,SA=2e4;function kA(e){return xm(e.type)||e.type==="spring"||!Lb(e.ease)}function CA(e,t){const n=new Um({...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<SA;)r=n.sample(s),i.push(r.value),s+=Gu;return{times:void 0,keyframes:i,duration:s-Gu,ease:"linear"}}const MS={anticipate:fS,backInOut:dS,circInOut:hS};function TA(e){return e in MS}class Ry extends RS{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new jS(s,(o,a)=>this.onKeyframesResolved(o,a),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:i,ease:s,type:o,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&Aa()&&TA(s)&&(s=MS[s]),kA(this.options)){const{onComplete:u,onUpdate:f,motionValue:p,element:h,...m}=this.options,x=CA(t,m);t=x.keyframes,t.length===1&&(t[1]=t[0]),r=x.duration,i=x.times,s=x.ease,o="keyframes"}const d=ij(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:s});return d.startTime=c??this.calcStartTime(),this.pendingTimeline?(iy(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:u}=this.options;a.set(Ec(t,this.options,n)),u&&u(),this.cancel(),this.resolveFinishedPromise()},{animation:d,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 Hn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Hn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Un(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 ln;const{animation:r}=n;iy(r,t)}return ln}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:s,ease:o,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:d,onComplete:u,element:f,...p}=this.options,h=new Um({...p,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),m=Un(this.time);c.setWithVelocity(h.sample(m-Gu).value,h.sample(m).value,Gu)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:s,damping:o,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return bA()&&r&&wA.has(r)&&(r!=="transform"||!c)&&!l&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const EA={type:"spring",stiffness:500,damping:25,restSpeed:10},_A=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),PA={type:"keyframes",duration:.8},jA={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},RA=(e,{keyframes:t})=>t.length>2?PA:is.has(e)?e.startsWith("scale")?_A(t[1]):EA:jA;function AA({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:c,...d}){return!!Object.keys(d).length}const Hm=(e,t,n,r={},i,s)=>o=>{const a=wm(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Un(l);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};AA(a)||(d={...d,...RA(e,d)}),d.duration&&(d.duration=Un(d.duration)),d.repeatDelay&&(d.repeatDelay=Un(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let u=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(u=!0)),d.allowFlatten=!a.type&&!a.ease,u&&!s&&t.get()!==void 0){const f=Ec(d.keyframes,a);if(f!==void 0)return Se.update(()=>{d.onUpdate(f),d.onComplete()}),new tj([])}return!s&&Ry.supports(d)?new Ry(d):new Um(d)};function OA({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function NS(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:o,...a}=t;r&&(s=r);const l=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const d in a){const u=e.getValue(d,e.latestValues[d]??null),f=a[d];if(f===void 0||c&&OA(c,d))continue;const p={delay:n,...wm(s||{},d)};let h=!1;if(window.MotionHandoffAnimation){const x=oS(e);if(x){const g=window.MotionHandoffAnimation(x,d,Se);g!==null&&(p.startTime=g,h=!0)}}bp(e,d),u.start(Hm(d,u,f,e.shouldReduceMotion&&sS.has(d)?{type:!1}:p,e,h));const m=u.animation;m&&l.push(m)}return o&&Promise.all(l).then(()=>{Se.update(()=>{o&&lR(e,o)})}),l}function Ap(e,t,n={}){var l;const r=Na(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(NS(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:u,staggerDirection:f}=i;return DA(e,t,d+c,u,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,d]=a==="beforeChildren"?[s,o]:[o,s];return c().then(()=>d())}else return Promise.all([s(),o(n.delay)])}function DA(e,t,n=0,r=0,i=1,s){const o=[],a=(e.variantChildren.size-1)*r,l=i===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(FA).forEach((c,d)=>{c.notify("AnimationStart",t),o.push(Ap(c,t,{...s,delay:n+l(d)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(o)}function FA(e,t){return e.sortNodePosition(t)}function MA(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Ap(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Ap(e,t,n);else{const i=typeof t=="function"?Na(e,t,n.custom):t;r=Promise.all(NS(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function LS(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 NA=Tm.length;function IS(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?IS(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<NA;n++){const r=Tm[n],i=e.props[r];(Da(i)||i===!1)&&(t[r]=i)}return t}const LA=[...Cm].reverse(),IA=Cm.length;function $A(e){return t=>Promise.all(t.map(({animation:n,options:r})=>MA(e,n,r)))}function BA(e){let t=$A(e),n=Ay(),r=!0;const i=l=>(c,d)=>{var f;const u=Na(e,d,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(u){const{transition:p,transitionEnd:h,...m}=u;c={...c,...m,...h}}return c};function s(l){t=l(e)}function o(l){const{props:c}=e,d=IS(e.parent)||{},u=[],f=new Set;let p={},h=1/0;for(let x=0;x<IA;x++){const g=LA[x],w=n[g],b=c[g]!==void 0?c[g]:d[g],k=Da(b),T=g===l?w.isActive:null;T===!1&&(h=x);let E=b===d[g]&&b!==c[g]&&k;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),w.protectedKeys={...p},!w.isActive&&T===null||!b&&!w.prevProp||Cc(b)||typeof b=="boolean")continue;const _=zA(w.prevProp,b);let P=_||g===l&&w.isActive&&!E&&k||x>h&&k,M=!1;const N=Array.isArray(b)?b:[b];let R=N.reduce(i(g),{});T===!1&&(R={});const{prevResolvedValues:F={}}=w,B={...F,...R},V=ne=>{P=!0,f.has(ne)&&(M=!0,f.delete(ne)),w.needsAnimating[ne]=!0;const O=e.getValue(ne);O&&(O.liveStyle=!1)};for(const ne in B){const O=R[ne],$=F[ne];if(p.hasOwnProperty(ne))continue;let H=!1;wp(O)&&wp($)?H=!LS(O,$):H=O!==$,H?O!=null?V(ne):f.add(ne):O!==void 0&&f.has(ne)?V(ne):w.protectedKeys[ne]=!0}w.prevProp=b,w.prevResolvedValues=R,w.isActive&&(p={...p,...R}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(E&&_)||M)&&u.push(...N.map(ne=>({animation:ne,options:{type:g}})))}if(f.size){const x={};if(typeof c.initial!="boolean"){const g=Na(e,Array.isArray(c.initial)?c.initial[0]:c.initial);g&&g.transition&&(x.transition=g.transition)}f.forEach(g=>{const w=e.getBaseTarget(g),b=e.getValue(g);b&&(b.liveStyle=!0),x[g]=w??null}),u.push({animation:x})}let m=!!u.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(u):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)==null||u.forEach(f=>{var p;return(p=f.animationState)==null?void 0:p.setActive(l,c)}),n[l].isActive=c;const d=o(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Ay(),r=!0}}}function zA(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!LS(t,e):!1}function gi(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ay(){return{animate:gi(!0),whileInView:gi(),whileHover:gi(),whileTap:gi(),whileDrag:gi(),whileFocus:gi(),exit:gi()}}class ui{constructor(t){this.isMounted=!1,this.node=t}update(){}}class VA extends ui{constructor(t){super(t),t.animationState||(t.animationState=BA(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Cc(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 UA=0;class HA extends ui{constructor(){super(...arguments),this.id=UA++}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 WA={animation:{Feature:VA},exit:{Feature:HA}};function Ia(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function il(e){return{point:{x:e.pageX,y:e.pageY}}}const qA=e=>t=>km(t)&&e(t,il(t));function ia(e,t,n,r){return Ia(e,t,qA(n),r)}function $S({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function GA({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function QA(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 BS=1e-4,YA=1-BS,KA=1+BS,zS=.01,XA=0-zS,ZA=0+zS;function xt(e){return e.max-e.min}function JA(e,t,n){return Math.abs(e-t)<=n}function Oy(e,t,n,r=.5){e.origin=r,e.originPoint=je(t.min,t.max,e.origin),e.scale=xt(n)/xt(t),e.translate=je(n.min,n.max,e.origin)-e.originPoint,(e.scale>=YA&&e.scale<=KA||isNaN(e.scale))&&(e.scale=1),(e.translate>=XA&&e.translate<=ZA||isNaN(e.translate))&&(e.translate=0)}function sa(e,t,n,r){Oy(e.x,t.x,n.x,r?r.originX:void 0),Oy(e.y,t.y,n.y,r?r.originY:void 0)}function Dy(e,t,n){e.min=n.min+t.min,e.max=e.min+xt(t)}function eO(e,t,n){Dy(e.x,t.x,n.x),Dy(e.y,t.y,n.y)}function Fy(e,t,n){e.min=t.min-n.min,e.max=e.min+xt(t)}function oa(e,t,n){Fy(e.x,t.x,n.x),Fy(e.y,t.y,n.y)}const My=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ds=()=>({x:My(),y:My()}),Ny=()=>({min:0,max:0}),Ie=()=>({x:Ny(),y:Ny()});function Zt(e){return[e("x"),e("y")]}function Md(e){return e===void 0||e===1}function Op({scale:e,scaleX:t,scaleY:n}){return!Md(e)||!Md(t)||!Md(n)}function wi(e){return Op(e)||VS(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function VS(e){return Ly(e.x)||Ly(e.y)}function Ly(e){return e&&e!=="0%"}function Qu(e,t,n){const r=e-n,i=t*r;return n+i}function Iy(e,t,n,r,i){return i!==void 0&&(e=Qu(e,i,r)),Qu(e,n,r)+t}function Dp(e,t=0,n=1,r,i){e.min=Iy(e.min,t,n,r,i),e.max=Iy(e.max,t,n,r,i)}function US(e,{x:t,y:n}){Dp(e.x,t.translate,t.scale,t.originPoint),Dp(e.y,n.translate,n.scale,n.originPoint)}const $y=.999999999999,By=1.0000000000001;function tO(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&&Ms(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,US(e,o)),r&&wi(s.latestValues)&&Ms(e,s.latestValues))}t.x<By&&t.x>$y&&(t.x=1),t.y<By&&t.y>$y&&(t.y=1)}function Fs(e,t){e.min=e.min+t,e.max=e.max+t}function zy(e,t,n,r,i=.5){const s=je(e.min,e.max,i);Dp(e,t,n,s,r)}function Ms(e,t){zy(e.x,t.x,t.scaleX,t.scale,t.originX),zy(e.y,t.y,t.scaleY,t.scale,t.originY)}function HS(e,t){return $S(QA(e.getBoundingClientRect(),t))}function nO(e,t,n){const r=HS(e,n),{scroll:i}=t;return i&&(Fs(r.x,i.offset.x),Fs(r.y,i.offset.y)),r}const WS=({current:e})=>e?e.ownerDocument.defaultView:null,Vy=(e,t)=>Math.abs(e-t);function rO(e,t){const n=Vy(e.x,t.x),r=Vy(e.y,t.y);return Math.sqrt(n**2+r**2)}class qS{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Ld(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=rO(u.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:h}=u,{timestamp:m}=it;this.history.push({...h,timestamp:m});const{onStart:x,onMove:g}=this.handlers;f||(x&&x(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,u)},this.handlePointerMove=(u,f)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=Nd(f,this.transformPagePoint),Se.update(this.updatePoint,!0)},this.handlePointerUp=(u,f)=>{this.end();const{onEnd:p,onSessionEnd:h,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Ld(u.type==="pointercancel"?this.lastMoveEventInfo:Nd(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(u,x),h&&h(u,x)},!km(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=il(t),a=Nd(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=it;this.history=[{...l,timestamp:c}];const{onSessionStart:d}=n;d&&d(t,Ld(a,this.history)),this.removeListeners=rl(ia(this.contextWindow,"pointermove",this.handlePointerMove),ia(this.contextWindow,"pointerup",this.handlePointerUp),ia(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ri(this.updatePoint)}}function Nd(e,t){return t?{point:t(e.point)}:e}function Uy(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ld({point:e},t){return{point:e,delta:Uy(e,GS(t)),offset:Uy(e,iO(t)),velocity:sO(t,.1)}}function iO(e){return e[0]}function GS(e){return e[e.length-1]}function sO(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=GS(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Un(t)));)n--;if(!r)return{x:0,y:0};const s=Hn(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 oO(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?je(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?je(n,e,r.max):Math.min(e,n)),e}function Hy(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 aO(e,{top:t,left:n,bottom:r,right:i}){return{x:Hy(e.x,n,i),y:Hy(e.y,t,r)}}function Wy(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 lO(e,t){return{x:Wy(e.x,t.x),y:Wy(e.y,t.y)}}function uO(e,t){let n=.5;const r=xt(e),i=xt(t);return i>r?n=Ra(t.min,t.max-r,e.min):r>i&&(n=Ra(e.min,e.max-i,t.min)),hr(0,1,n)}function cO(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 Fp=.35;function dO(e=Fp){return e===!1?e=0:e===!0&&(e=Fp),{x:qy(e,"left","right"),y:qy(e,"top","bottom")}}function qy(e,t,n){return{min:Gy(e,t),max:Gy(e,n)}}function Gy(e,t){return typeof e=="number"?e:e[t]||0}const fO=new WeakMap;class pO{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=Ie(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=d=>{const{dragSnapToOrigin:u}=this.getProps();u?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(il(d).point)},s=(d,u)=>{const{drag:f,dragPropagation:p,onDragStart:h}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=uj(f),!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),Zt(x=>{let g=this.getAxisMotionValue(x).get()||0;if(qn.test(g)){const{projection:w}=this.visualElement;if(w&&w.layout){const b=w.layout.layoutBox[x];b&&(g=xt(b)*(parseFloat(g)/100))}}this.originPoint[x]=g}),h&&Se.postRender(()=>h(d,u)),bp(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},o=(d,u)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:h,onDrag:m}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:x}=u;if(p&&this.currentDirection===null){this.currentDirection=hO(x),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",u.point,x),this.updateAxis("y",u.point,x),this.visualElement.render(),m&&m(d,u)},a=(d,u)=>this.stop(d,u),l=()=>Zt(d=>{var u;return this.getAnimationState(d)==="paused"&&((u=this.getAxisMotionValue(d).animation)==null?void 0:u.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new qS(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:WS(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&&Se.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=oO(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;t&&As(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=aO(r.layoutBox,t):this.constraints=!1,this.elastic=dO(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Zt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=cO(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!As(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=nO(r,i.root,this.visualElement.getTransformPagePoint());let o=lO(i.layout.layoutBox,s);if(n){const a=n(GA(o));this.hasMutatedConstraints=!!a,a&&(o=$S(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Zt(d=>{if(!Fl(d,n,this.currentDirection))return;let u=l&&l[d]||{};o&&(u={min:0,max:0});const f=i?200:1e6,p=i?40:1e7,h={type:"inertia",velocity:r?t[d]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...s,...u};return this.startAxisValueAnimation(d,h)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return bp(this.visualElement,t),r.start(Hm(t,r,0,n,this.visualElement,!1))}stopAnimation(){Zt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Zt(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){Zt(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]-je(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!As(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Zt(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=uO({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(),Zt(o=>{if(!Fl(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(je(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;fO.set(this.visualElement,this);const t=this.visualElement.current,n=ia(t,"pointerdown",l=>{const{drag:c,dragListener:d=!0}=this.getProps();c&&d&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();As(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Se.read(r);const o=Ia(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Zt(d=>{const u=this.getAxisMotionValue(d);u&&(this.originPoint[d]+=l[d].translate,u.set(u.get()+l[d].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=Fp,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 hO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class mO extends ui{constructor(t){super(t),this.removeGroupControls=ln,this.removeListeners=ln,this.controls=new pO(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ln}unmount(){this.removeGroupControls(),this.removeListeners()}}const Qy=e=>(t,n)=>{e&&Se.postRender(()=>e(t,n))};class gO extends ui{constructor(){super(...arguments),this.removePointerDownListener=ln}onPointerDown(t){this.session=new qS(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:WS(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Qy(t),onStart:Qy(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&Se.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=ia(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 iu={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Yy(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Lo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(J.test(e))e=parseFloat(e);else return e;const n=Yy(e,t.target.x),r=Yy(e,t.target.y);return`${n}% ${r}%`}},vO={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=ii.parse(e);if(i.length>5)return r;const s=ii.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const c=je(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),s(i)}};class yO extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;Nj(xO),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()})),iu.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()||Se.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Sm.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 QS(e){const[t,n]=Db(),r=v.useContext(dm);return y.jsx(yO,{...e,layoutGroup:r,switchLayoutGroup:v.useContext(qb),isPresent:t,safeToRemove:n})}const xO={borderRadius:{...Lo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Lo,borderTopRightRadius:Lo,borderBottomLeftRadius:Lo,borderBottomRightRadius:Lo,boxShadow:vO};function wO(e,t,n){const r=ht(e)?e:Oa(e);return r.start(Hm("",r,t,n)),r.animation}function bO(e){return e instanceof SVGElement&&e.tagName!=="svg"}const SO=(e,t)=>e.depth-t.depth;class kO{constructor(){this.children=[],this.isDirty=!1}add(t){hm(this.children,t),this.isDirty=!0}remove(t){mm(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(SO),this.isDirty=!1,this.children.forEach(t)}}function CO(e,t){const n=Wn.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(ri(r),e(s-t))};return Se.read(r,!0),()=>ri(r)}const YS=["TopLeft","TopRight","BottomLeft","BottomRight"],TO=YS.length,Ky=e=>typeof e=="string"?parseFloat(e):e,Xy=e=>typeof e=="number"||J.test(e);function EO(e,t,n,r,i,s){i?(e.opacity=je(0,n.opacity??1,_O(r)),e.opacityExit=je(t.opacity??1,0,PO(r))):s&&(e.opacity=je(t.opacity??1,n.opacity??1,r));for(let o=0;o<TO;o++){const a=`border${YS[o]}Radius`;let l=Zy(t,a),c=Zy(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Xy(l)===Xy(c)?(e[a]=Math.max(je(Ky(l),Ky(c),r),0),(qn.test(c)||qn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=je(t.rotate||0,n.rotate||0,r))}function Zy(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const _O=KS(0,.5,pS),PO=KS(.5,.95,ln);function KS(e,t,n){return r=>r<e?0:r>t?1:n(Ra(e,t,r))}function Jy(e,t){e.min=t.min,e.max=t.max}function Kt(e,t){Jy(e.x,t.x),Jy(e.y,t.y)}function e0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function t0(e,t,n,r,i){return e-=t,e=Qu(e,1/n,r),i!==void 0&&(e=Qu(e,1/i,r)),e}function jO(e,t=0,n=1,r=.5,i,s=e,o=e){if(qn.test(t)&&(t=parseFloat(t),t=je(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=je(s.min,s.max,r);e===s&&(a-=t),e.min=t0(e.min,t,n,a,i),e.max=t0(e.max,t,n,a,i)}function n0(e,t,[n,r,i],s,o){jO(e,t[n],t[r],t[i],t.scale,s,o)}const RO=["x","scaleX","originX"],AO=["y","scaleY","originY"];function r0(e,t,n,r){n0(e.x,t,RO,n?n.x:void 0,r?r.x:void 0),n0(e.y,t,AO,n?n.y:void 0,r?r.y:void 0)}function i0(e){return e.translate===0&&e.scale===1}function XS(e){return i0(e.x)&&i0(e.y)}function s0(e,t){return e.min===t.min&&e.max===t.max}function OO(e,t){return s0(e.x,t.x)&&s0(e.y,t.y)}function o0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ZS(e,t){return o0(e.x,t.x)&&o0(e.y,t.y)}function a0(e){return xt(e.x)/xt(e.y)}function l0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class DO{constructor(){this.members=[]}add(t){hm(this.members,t),t.scheduleRender()}remove(t){if(mm(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 FO(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:d,rotateX:u,rotateY:f,skewX:p,skewY:h}=n;c&&(r=`perspective(${c}px) ${r}`),d&&(r+=`rotate(${d}deg) `),u&&(r+=`rotateX(${u}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),h&&(r+=`skewY(${h}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 Id=["","X","Y","Z"],MO={visibility:"hidden"},u0=1e3;let NO=0;function $d(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function JS(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=oS(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Se,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&JS(r)}function ek({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=NO++,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($O),this.nodes.forEach(HO),this.nodes.forEach(WO),this.nodes.forEach(BO)},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 kO)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new vm),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=bO(o),this.instance=o;const{layoutId:l,layout:c,visualElement:d}=this.options;if(d&&!d.current&&d.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let u;const f=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=CO(f,250),iu.hasAnimatedSinceResize&&(iu.hasAnimatedSinceResize=!1,this.nodes.forEach(d0))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:p,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||d.getDefaultTransition()||KO,{onLayoutAnimationStart:x,onLayoutAnimationComplete:g}=d.getProps(),w=!this.targetLayout||!ZS(this.targetLayout,h),b=!f&&p;if(this.options.layoutRoot||this.resumeFrom||b||f&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(u,b);const k={...wm(m,"layout"),onPlay:x,onComplete:g};(d.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k)}else f||d0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}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,ri(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(qO),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&&JS(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const u=this.path[d];u.shouldResetTransform=!0,u.updateScroll("snapshot"),u.options.layoutRoot&&u.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(c0);return}this.isUpdating||this.nodes.forEach(VO),this.isUpdating=!1,this.nodes.forEach(UO),this.nodes.forEach(LO),this.nodes.forEach(IO),this.clearAllSnapshots();const a=Wn.now();it.delta=hr(0,1e3/60,a-it.timestamp),it.timestamp=a,it.isProcessing=!0,jd.update.process(it),jd.preRender.process(it),jd.render.process(it),it.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Sm.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(zO),this.sharedNodes.forEach(GO)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Se.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Se.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!xt(this.snapshot.measuredBox.x)&&!xt(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=Ie(),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&&!XS(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,d=c!==this.prevTransformTemplateValue;o&&(a||wi(this.latestValues)||d)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),XO(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:o}=this.options;if(!o)return Ie();const a=o.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(ZO))){const{scroll:d}=this.root;d&&(Fs(a.x,d.offset.x),Fs(a.y,d.offset.y))}return a}removeElementScroll(o){var l;const a=Ie();if(Kt(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const d=this.path[c],{scroll:u,options:f}=d;d!==this.root&&u&&f.layoutScroll&&(u.wasRoot&&Kt(a,o),Fs(a.x,u.offset.x),Fs(a.y,u.offset.y))}return a}applyTransform(o,a=!1){const l=Ie();Kt(l,o);for(let c=0;c<this.path.length;c++){const d=this.path[c];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Ms(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),wi(d.latestValues)&&Ms(l,d.latestValues)}return wi(this.latestValues)&&Ms(l,this.latestValues),l}removeTransform(o){const a=Ie();Kt(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!wi(c.latestValues))continue;Op(c.latestValues)&&c.updateSnapshot();const d=Ie(),u=c.measurePageBox();Kt(d,u),r0(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,d)}return wi(this.latestValues)&&r0(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!==it.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var f;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||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:u}=this.options;if(!(!this.layout||!(d||u))){if(this.resolvedRelativeTargetAt=it.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ie(),this.relativeTargetOrigin=Ie(),oa(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),Kt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ie(),this.targetWithTransforms=Ie()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),eO(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Kt(this.target,this.layout.layoutBox),US(this.target,this.targetDelta)):Kt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ie(),this.relativeTargetOrigin=Ie(),oa(this.relativeTargetOrigin,this.target,p.target),Kt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Op(this.parent.latestValues)||VS(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 h;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(h=this.parent)!=null&&h.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===it.timestamp&&(l=!1),l)return;const{layout:c,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||d))return;Kt(this.layoutCorrected,this.layout.layoutBox);const u=this.treeScale.x,f=this.treeScale.y;tO(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=Ie());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(e0(this.prevProjectionDelta.x,this.projectionDelta.x),e0(this.prevProjectionDelta.y,this.projectionDelta.y)),sa(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==u||this.treeScale.y!==f||!l0(this.projectionDelta.x,this.prevProjectionDelta.x)||!l0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}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=Ds(),this.projectionDelta=Ds(),this.projectionDeltaWithTransform=Ds()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},d={...this.latestValues},u=Ds();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Ie(),p=l?l.source:void 0,h=this.layout?this.layout.source:void 0,m=p!==h,x=this.getStack(),g=!x||x.members.length<=1,w=!!(m&&!g&&this.options.crossfade===!0&&!this.path.some(YO));this.animationProgress=0;let b;this.mixTargetDelta=k=>{const T=k/1e3;f0(u.x,o.x,T),f0(u.y,o.y,T),this.setTargetDelta(u),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(oa(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),QO(this.relativeTarget,this.relativeTargetOrigin,f,T),b&&OO(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Ie()),Kt(b,this.relativeTarget)),m&&(this.animationValues=d,EO(d,c,this.latestValues,T,w,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},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&&(ri(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Se.update(()=>{iu.hasAnimatedSinceResize=!0,this.currentAnimation=wO(0,u0,{...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(u0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:d}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&tk(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Ie();const u=xt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const f=xt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}Kt(a,l),Ms(a,d),sa(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new DO),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&$d("z",o,c,this.animationValues);for(let d=0;d<Id.length;d++)$d(`rotate${Id[d]}`,o,c,this.animationValues),$d(`skew${Id[d]}`,o,c,this.animationValues);o.render();for(const d in c)o.setStaticValue(d,c[d]),this.animationValues&&(this.animationValues[d]=c[d]);o.scheduleRender()}getProjectionStyles(o){if(!this.instance||this.isSVG)return;if(!this.isVisible)return MO;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=ru(o==null?void 0:o.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){const p={};return this.options.layoutId&&(p.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,p.pointerEvents=ru(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!wi(this.latestValues)&&(p.transform=l?l({},""):"none",this.hasProjected=!1),p}const d=c.animationValues||c.latestValues;this.applyTransformsToTarget(),a.transform=FO(this.projectionDeltaWithTransform,this.treeScale,d),l&&(a.transform=l(d,a.transform));const{x:u,y:f}=this.projectionDelta;a.transformOrigin=`${u.origin*100}% ${f.origin*100}% 0`,c.animationValues?a.opacity=c===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:a.opacity=c===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const p in Fa){if(d[p]===void 0)continue;const{correct:h,applyTo:m,isCSSVariable:x}=Fa[p],g=a.transform==="none"?d[p]:h(d[p],c);if(m){const w=m.length;for(let b=0;b<w;b++)a[m[b]]=g}else x?this.options.visualElement.renderState.vars[p]=g:a[p]=g}return this.options.layoutId&&(a.pointerEvents=c===this?ru(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(c0),this.root.sharedNodes.clear()}}}function LO(e){e.updateLayout()}function IO(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"?Zt(u=>{const f=o?t.measuredBox[u]:t.layoutBox[u],p=xt(f);f.min=r[u].min,f.max=f.min+p}):tk(s,t.layoutBox,r)&&Zt(u=>{const f=o?t.measuredBox[u]:t.layoutBox[u],p=xt(r[u]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+p)});const a=Ds();sa(a,r,t.layoutBox);const l=Ds();o?sa(l,e.applyTransform(i,!0),t.measuredBox):sa(l,r,t.layoutBox);const c=!XS(a);let d=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:f,layout:p}=u;if(f&&p){const h=Ie();oa(h,t.layoutBox,f.layoutBox);const m=Ie();oa(m,r,p.layoutBox),ZS(h,m)||(d=!0),u.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=h,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function $O(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 BO(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function zO(e){e.clearSnapshot()}function c0(e){e.clearMeasurements()}function VO(e){e.isLayoutDirty=!1}function UO(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function d0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function HO(e){e.resolveTargetDelta()}function WO(e){e.calcProjection()}function qO(e){e.resetSkewAndRotation()}function GO(e){e.removeLeadSnapshot()}function f0(e,t,n){e.translate=je(t.translate,0,n),e.scale=je(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function p0(e,t,n,r){e.min=je(t.min,n.min,r),e.max=je(t.max,n.max,r)}function QO(e,t,n,r){p0(e.x,t.x,n.x,r),p0(e.y,t.y,n.y,r)}function YO(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const KO={duration:.45,ease:[.4,0,.1,1]},h0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),m0=h0("applewebkit/")&&!h0("chrome/")?Math.round:ln;function g0(e){e.min=m0(e.min),e.max=m0(e.max)}function XO(e){g0(e.x),g0(e.y)}function tk(e,t,n){return e==="position"||e==="preserve-aspect"&&!JA(a0(t),a0(n),.2)}function ZO(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const JO=ek({attachResizeListener:(e,t)=>Ia(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Bd={current:void 0},nk=ek({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Bd.current){const e=new JO({});e.mount(window),e.setOptions({layoutScroll:!0}),Bd.current=e}return Bd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),e3={pan:{Feature:gO},drag:{Feature:mO,ProjectionNode:nk,MeasureLayout:QS}};function v0(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&&Se.postRender(()=>s(t,il(t)))}class t3 extends ui{mount(){const{current:t}=this.node;t&&(this.unmount=dj(t,(n,r)=>(v0(this.node,r,"Start"),i=>v0(this.node,i,"End"))))}unmount(){}}class n3 extends ui{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=rl(Ia(this.node.current,"focus",()=>this.onFocus()),Ia(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function y0(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&&Se.postRender(()=>s(t,il(t)))}class r3 extends ui{mount(){const{current:t}=this.node;t&&(this.unmount=mj(t,(n,r)=>(y0(this.node,r,"Start"),(i,{success:s})=>y0(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Mp=new WeakMap,zd=new WeakMap,i3=e=>{const t=Mp.get(e.target);t&&t(e)},s3=e=>{e.forEach(i3)};function o3({root:e,...t}){const n=e||document;zd.has(n)||zd.set(n,{});const r=zd.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(s3,{root:e,...t})),r[i]}function a3(e,t,n){const r=o3(t);return Mp.set(e,n),r.observe(e),()=>{Mp.delete(e),r.unobserve(e)}}const l3={some:0,all:1};class u3 extends ui{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:l3[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:d,onViewportLeave:u}=this.node.getProps(),f=c?d:u;f&&f(l)};return a3(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(c3(t,n))&&this.startObserver()}unmount(){}}function c3({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const d3={inView:{Feature:u3},tap:{Feature:r3},focus:{Feature:n3},hover:{Feature:t3}},f3={layout:{ProjectionNode:nk,MeasureLayout:QS}},Np={current:null},rk={current:!1};function p3(){if(rk.current=!0,!!fm)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Np.current=e.matches;e.addListener(t),t()}else Np.current=!1}const h3=[...PS,ft,ii],m3=e=>h3.find(_S(e)),g3=new WeakMap;function v3(e,t,n){for(const r in t){const i=t[r],s=n[r];if(ht(i))e.addValue(r,i);else if(ht(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 x0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class y3{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=zm,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 p=Wn.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,Se.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:d}=o;this.onUpdate=d,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=Tc(n),this.isVariantNode=Hb(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const h=f[p];l[p]!==void 0&&ht(h)&&h.set(l[p],!1)}}mount(t){this.current=t,g3.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)),rk.current||p3(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Np.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ri(this.notifyUpdate),ri(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=is.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Se.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 fo){const n=fo[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):Ie()}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<x0.length;r++){const i=x0[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=v3(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"&&(TS(r)||mS(r))?r=parseFloat(r):!m3(r)&&ii.test(n)&&(r=SS(t,n)),this.setBaseTarget(t,ht(r)?r.get():r)),ht(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=Mm(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&&!ht(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 vm),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class ik extends y3{constructor(){super(...arguments),this.KeyframeResolver=jS}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;ht(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function x3(e){return window.getComputedStyle(e)}class w3 extends ik{constructor(){super(...arguments),this.type="html",this.renderInstance=tS}readValueFromInstance(t,n){if(is.has(n))return DR(t,n);{const r=x3(t),i=(_m(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return HS(t,n)}build(t,n,r){Rm(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Nm(t,n,r)}}class b3 extends ik{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ie,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&eS(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(is.has(n)){const r=bS(n);return r&&r.default||0}return n=nS.has(n)?n:Em(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return iS(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&Se.postRender(this.updateDimensions)}build(t,n,r){Dm(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){rS(t,n,r,i)}mount(t){this.isSVGTag=Fm(t.tagName),super.mount(t)}}const S3=(e,t)=>Om(e)?new b3(t):new w3(t,{allowProjection:e!==v.Fragment}),k3=oR({...WA,...d3,...e3,...f3},S3),ve=Sj(k3);class C3{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}}const T3=()=>new C3;function E3(){return bc(T3)}var Er=(e=>(e.None="none",e.Sm="sm",e.Md="md",e.Lg="lg",e.Xl="xl",e.Full="full",e))(Er||{});const sk=v.createContext({}),_3={[Y.TooltipDefault]:"Bizimle sohbet edin!",[Y.TooltipActive]:"Yeni mesajlar var!",[Y.CloseButtonAria]:"Kapat",[Y.MessagePlaceholder]:"Mesajınızı yazın",[Y.FileUploadDisabled]:"Dosya gönderim izniniz olmadığı için yükleyemezsiniz",[Y.NewMessagesNotification]:"Yeni mesajlar var!",[Y.ChatCloseConfirm]:"Sohbeti kapatmak istediğinizden emin misiniz?",[Y.ChatCloseWarning]:"Bu işlem geri alınamaz.",[Y.ChatSettings]:"Sohbet Ayarları",[Y.ChatEndConversation]:"Sohbeti Sonlandır",[Y.CancelAction]:"Vazgeç",[Y.CloseAction]:"Kapat",[Y.QuickActions]:"Hızlı işlemler",[Y.GreetingStartChat]:"Sohbete başla",[Y.RateLimitMessage]:"Çok fazla mesaj gönderdiniz. Lütfen {seconds} saniye bekleyin.",[Y.RatingHeaderEvaluate]:"Görüşmenizi Değerlendirin",[Y.RatingHeaderThanks]:"Teşekkürler!",[Y.RatingDescription]:"Lütfen hizmetimizi değerlendirin. Görüşleriniz bizim için önemli.",[Y.RatingRateConversation]:"Görüşmeyi puanlayın",[Y.RatingComment]:"Yorumunuz (İsteğe bağlı)",[Y.RatingCommentPlaceholder]:"Görüşme hakkında düşüncelerinizi paylaşın...",[Y.RatingSubmit]:"Değerlendirmeyi Gönder",[Y.RatingNewConversation]:"Yeni Görüşme Başlat",[Y.RatingThankYouTitle]:"Değerlendirmeniz için teşekkürler!",[Y.RatingThankYouDescription]:"Geri bildiriminiz bizim için çok değerli.",[Y.RatingCountdown]:"Ekran {seconds} saniye içinde kapanacaktır.",[Y.RatingMinimumError]:"Lütfen en az 1 yıldız seçiniz.",[Y.RatingYourScore]:"Puanınız: {score}",[Y.PoweredBy]:"Powered by"},P3={[C.Background]:"#ffffff",[C.Border]:"#e2e8f0",[C.TooltipText]:"#1e40af",[C.TooltipBackground]:"#dbeafe",[C.TooltipBorder]:"#3b82f6",[C.HeaderBackground]:"#2563eb",[C.HeaderBorder]:"#e2e8f0",[C.HeaderText]:"#ffffff",[C.FooterBackground]:"#f8fafc",[C.FooterBorder]:"#e2e8f0",[C.FooterText]:"#475569",[C.MessageAdminBackground]:"#f1f5f9",[C.MessageAdminText]:"#334155",[C.MessageVisitorBackground]:"#3b82f6",[C.MessageVisitorText]:"#ffffff",[C.GreeterBackground]:"#ffffff",[C.GreeterText]:"#334155",[C.GreeterBorder]:"#e2e8f0",[C.GreeterTopBackground]:"linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%)",[C.GreeterTopText]:"#ffffff",[C.GreeterButtonBackground]:"#4f46e5",[C.GreeterButtonText]:"#ffffff",[C.ButtonBackground]:"#4f46e5",[C.ButtonText]:"#ffffff",[C.InputBackground]:"#ffffff",[C.InputText]:"#1e293b",[C.InputBorder]:"#e2e8f0",[C.CloseButtonBackground]:"#f1f5f9",[C.CloseButtonText]:"#475569",[C.CloseButtonHover]:"#e2e8f0",[C.IconColor]:"#64748b",[C.IconBackground]:"transparent",[C.ErrorBackground]:"#fef2f2",[C.ErrorText]:"#dc2626",[C.ErrorBorder]:"#fca5a5",[C.SuccessBackground]:"#f0fdf4",[C.SuccessText]:"#16a34a",[C.SuccessBorder]:"#86efac",[C.WarningBackground]:"#fffbeb",[C.WarningText]:"#d97706",[C.WarningBorder]:"#fcd34d",[C.LinkColor]:"#2563eb",[C.LinkHoverColor]:"#1d4ed8",[C.DividerColor]:"#e2e8f0",[C.ShadowColor]:"rgba(0, 0, 0, 0.1)",[C.StarActiveColor]:"#3b82f6",[C.StarInactiveColor]:"#e2e8f0",[C.ModalOverlayColor]:"rgba(0, 0, 0, 0.4)",[C.ChatCloseConfirmText]:"#dc2626",[C.RatingHeaderBackground]:"#4F46E5",[C.RatingHeaderText]:"#ffffff",[C.RatingSuccessBackground]:"#ffffff",[C.RatingSuccessText]:"#334155",[C.RatingRateConversationText]:"#1e293b"},j3={[Er.None]:"0px",[Er.Sm]:"var(--radius-xs)",[Er.Md]:"var(--radius-sm)",[Er.Lg]:"var(--radius-md)",[Er.Xl]:"var(--radius-lg)",[Er.Full]:"calc(infinity * 1px)"},R3=e=>{const t={..._3};if(!e||!e.appearance||!e.appearance.design||!e.appearance.design.texts)return t;for(const n in e.appearance.design.texts){const r=n;e.appearance.design.texts[r]&&(t[r]=e.appearance.design.texts[r])}return t},A3=e=>{const t={...P3};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 O3({children:e,widget:t}){const n=A3(t),r=R3(t),i=t&&t.appearance&&t.appearance.design&&t.appearance.design.border_radius?t.appearance.design.border_radius:Er.Md,s=l=>n[l],o=l=>r[l],a=()=>j3[i];return y.jsx(sk.Provider,{value:{colors:n,texts:r,getColor:s,getText:o,getRadius:a},children:e})}const Oe=()=>v.useContext(sk),sl=()=>Oe().getText;function on({children:e,type:t="button",variant:n="primary",kind:r="solid",size:i="md",disabled:s=!1,rounded:o=!1,className:a,style:l,textKey:c=C.ButtonText,bgKey:d=C.ButtonBackground,animations:u={},withoutTheming:f,...p}){const h=Oe();return y.jsx(ve.button,{type:t,className:ge("flex items-center justify-center focus:!ring-0 font-medium",{"rounded-full":o&&i!=="xs","rounded-lg":!o},a,ty[n]&&ty[n][r],GP[i][o?"rounded":"default"]),disabled:s,style:{...!f&&{color:h.getColor(c),backgroundColor:h.getColor(d),...o?{}:{borderRadius:h.getRadius()}},...l},...u,...p,children:e})}function fe(){}fe.Home=function(t){return y.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:y.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"})})};fe.Chat=e=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:y.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"})});fe.Menu=e=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})});fe.MessageTyping=({className:e="size-5",...t})=>y.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:y.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"})});fe.Check=function(t){return y.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",height:"1em",width:"1em",...t,children:y.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"})})};fe.Website=function(t){return y.jsxs("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:[y.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"}),y.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"}),y.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"})]})};fe.ArrowDown=e=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"})});fe.XCircle=({className:e="e-5",...t})=>y.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:y.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"})});fe.X=({className:e="e-5",...t})=>y.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:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})});fe.PaperAirplane=({className:e="e-5",...t})=>y.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:y.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"})});fe.Spin=function(t){return y.jsx("svg",{"data-name":"Layer 1",viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:y.jsx("path",{d:"M6.804 15a1 1 0 00-1.366-.366l-1.732 1a1 1 0 001 1.732l1.732-1A1 1 0 006.804 15zM3.706 8.366l1.732 1a1 1 0 101-1.732l-1.732-1a1 1 0 00-1 1.732zM6 12a1 1 0 00-1-1H3a1 1 0 000 2h2a1 1 0 001-1zm11.196-3a1 1 0 001.366.366l1.732-1a1 1 0 10-1-1.732l-1.732 1A1 1 0 0017.196 9zM15 6.804a1 1 0 001.366-.366l1-1.732a1 1 0 10-1.732-1l-1 1.732A1 1 0 0015 6.804zm5.294 8.83l-1.732-1a1 1 0 10-1 1.732l1.732 1a1 1 0 001-1.732zm-3.928 1.928a1 1 0 10-1.732 1l1 1.732a1 1 0 101.732-1zM21 11h-2a1 1 0 000 2h2a1 1 0 000-2zm-9 7a1 1 0 00-1 1v2a1 1 0 002 0v-2a1 1 0 00-1-1zm-3-.804a1 1 0 00-1.366.366l-1 1.732a1 1 0 001.732 1l1-1.732A1 1 0 009 17.196zM12 2a1 1 0 00-1 1v2a1 1 0 002 0V3a1 1 0 00-1-1z"})})};fe.ExternalLink=e=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})});fe.Phone=e=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 002.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 01-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 00-1.091-.852H4.5A2.25 2.25 0 002.25 4.5v2.25z"})});fe.Mail=e=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})});const Yn=Object.create(null);Yn.open="0";Yn.close="1";Yn.ping="2";Yn.pong="3";Yn.message="4";Yn.upgrade="5";Yn.noop="6";const su=Object.create(null);Object.keys(Yn).forEach(e=>{su[Yn[e]]=e});const Lp={type:"error",data:"parser error"},ok=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ak=typeof ArrayBuffer=="function",lk=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Wm=({type:e,data:t},n,r)=>ok&&t instanceof Blob?n?r(t):w0(t,r):ak&&(t instanceof ArrayBuffer||lk(t))?n?r(t):w0(new Blob([t]),r):r(Yn[e]+(t||"")),w0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function b0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Vd;function D3(e,t){if(ok&&e.data instanceof Blob)return e.data.arrayBuffer().then(b0).then(t);if(ak&&(e.data instanceof ArrayBuffer||lk(e.data)))return t(b0(e.data));Wm(e,!1,n=>{Vd||(Vd=new TextEncoder),t(Vd.encode(n))})}const S0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Go=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<S0.length;e++)Go[S0.charCodeAt(e)]=e;const F3=e=>{let t=e.length*.75,n=e.length,r,i=0,s,o,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),d=new Uint8Array(c);for(r=0;r<n;r+=4)s=Go[e.charCodeAt(r)],o=Go[e.charCodeAt(r+1)],a=Go[e.charCodeAt(r+2)],l=Go[e.charCodeAt(r+3)],d[i++]=s<<2|o>>4,d[i++]=(o&15)<<4|a>>2,d[i++]=(a&3)<<6|l&63;return c},M3=typeof ArrayBuffer=="function",qm=(e,t)=>{if(typeof e!="string")return{type:"message",data:uk(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:N3(e.substring(1),t)}:su[n]?e.length>1?{type:su[n],data:e.substring(1)}:{type:su[n]}:Lp},N3=(e,t)=>{if(M3){const n=F3(e);return uk(n,t)}else return{base64:!0,data:e}},uk=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},ck="",L3=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{Wm(s,!1,a=>{r[o]=a,++i===n&&t(r.join(ck))})})},I3=(e,t)=>{const n=e.split(ck),r=[];for(let i=0;i<n.length;i++){const s=qm(n[i],t);if(r.push(s),s.type==="error")break}return r};function $3(){return new TransformStream({transform(e,t){D3(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 Ud;function Ml(e){return e.reduce((t,n)=>t+n.length,0)}function Nl(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 B3(e,t){Ud||(Ud=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(Ml(n)<1)break;const l=Nl(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(Ml(n)<2)break;const l=Nl(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(Ml(n)<8)break;const l=Nl(n,8),c=new DataView(l.buffer,l.byteOffset,l.length),d=c.getUint32(0);if(d>Math.pow(2,21)-1){a.enqueue(Lp);break}i=d*Math.pow(2,32)+c.getUint32(4),r=3}else{if(Ml(n)<i)break;const l=Nl(n,i);a.enqueue(qm(s?l:Ud.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(Lp);break}}}})}const dk=4;function ze(e){if(e)return z3(e)}function z3(e){for(var t in ze.prototype)e[t]=ze.prototype[t];return e}ze.prototype.on=ze.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};ze.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};ze.prototype.off=ze.prototype.removeListener=ze.prototype.removeAllListeners=ze.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};ze.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};ze.prototype.emitReserved=ze.prototype.emit;ze.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};ze.prototype.hasListeners=function(e){return!!this.listeners(e).length};const _c=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),rn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),V3="arraybuffer";function fk(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const U3=rn.setTimeout,H3=rn.clearTimeout;function Pc(e,t){t.useNativeTimers?(e.setTimeoutFn=U3.bind(rn),e.clearTimeoutFn=H3.bind(rn)):(e.setTimeoutFn=rn.setTimeout.bind(rn),e.clearTimeoutFn=rn.clearTimeout.bind(rn))}const W3=1.33;function q3(e){return typeof e=="string"?G3(e):Math.ceil((e.byteLength||e.size)*W3)}function G3(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 pk(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Q3(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Y3(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 K3 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Gm extends ze{constructor(t){super(),this.writable=!1,Pc(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 K3(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=qm(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=Q3(t);return n.length?"?"+n:""}}class X3 extends Gm{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)};I3(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,L3(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]=pk()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let hk=!1;try{hk=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Z3=hk;function J3(){}class eD extends X3{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 Gn extends ze{constructor(t,n,r){super(),this.createRequest=t,Pc(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=fk(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=Gn.requestsCount++,Gn.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=J3,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Gn.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()}}Gn.requestsCount=0;Gn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",k0);else if(typeof addEventListener=="function"){const e="onpagehide"in rn?"pagehide":"unload";addEventListener(e,k0,!1)}}function k0(){for(let e in Gn.requests)Gn.requests.hasOwnProperty(e)&&Gn.requests[e].abort()}const tD=function(){const e=mk({xdomain:!1});return e&&e.responseType!==null}();class nD extends eD{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=tD&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Gn(mk,this.uri(),t)}}function mk(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Z3))return new XMLHttpRequest}catch{}if(!t)try{return new rn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const gk=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class rD extends Gm{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=gk?{}:fk(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;Wm(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}i&&_c(()=>{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]=pk()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Hd=rn.WebSocket||rn.MozWebSocket;class iD extends rD{createSocket(t,n,r){return gk?new Hd(t,n,r):n?new Hd(t,n):new Hd(t)}doWrite(t,n){this.ws.send(n)}}class sD extends Gm{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=B3(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=$3();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&&_c(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const oD={websocket:iD,webtransport:sD,polling:nD},aD=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,lD=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ip(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=aD.exec(e||""),s={},o=14;for(;o--;)s[lD[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=uD(s,s.path),s.queryKey=cD(s,s.query),s}function uD(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 cD(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const $p=typeof addEventListener=="function"&&typeof removeEventListener=="function",ou=[];$p&&addEventListener("offline",()=>{ou.forEach(e=>e())},!1);class Zr extends ze{constructor(t,n){if(super(),this.binaryType=V3,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=Ip(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=Ip(n.host).host);Pc(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=Y3(this.opts.query)),$p&&(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"})},ou.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=dk,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&&Zr.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",Zr.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+=q3(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,_c(()=>{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(Zr.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(),$p&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=ou.indexOf(this._offlineEventListener);r!==-1&&ou.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Zr.protocol=dk;class dD extends Zr{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;Zr.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",u=>{if(!r)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Zr.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=n.name,this.emitReserved("upgradeError",f)}}))};function s(){r||(r=!0,d(),n.close(),n=null)}const o=u=>{const f=new Error("probe error: "+u);f.transport=n.name,s(),this.emitReserved("upgradeError",f)};function a(){o("transport closed")}function l(){o("socket closed")}function c(u){n&&u.name!==n.name&&s()}const d=()=>{n.removeListener("open",i),n.removeListener("error",o),n.removeListener("close",a),this.off("close",l),this.off("upgrading",c)};n.once("open",i),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",c),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let fD=class extends dD{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=>oD[i]).filter(i=>!!i)),super(t,r)}};function pD(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=Ip(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 hD=typeof ArrayBuffer=="function",mD=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,vk=Object.prototype.toString,gD=typeof Blob=="function"||typeof Blob<"u"&&vk.call(Blob)==="[object BlobConstructor]",vD=typeof File=="function"||typeof File<"u"&&vk.call(File)==="[object FileConstructor]";function Qm(e){return hD&&(e instanceof ArrayBuffer||mD(e))||gD&&e instanceof Blob||vD&&e instanceof File}function au(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(au(e[n]))return!0;return!1}if(Qm(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return au(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&au(e[n]))return!0;return!1}function yD(e){const t=[],n=e.data,r=e;return r.data=Bp(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Bp(e,t){if(!e)return e;if(Qm(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]=Bp(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]=Bp(e[r],t));return n}return e}function xD(e,t){return e.data=zp(e.data,t),delete e.attachments,e}function zp(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]=zp(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=zp(e[n],t));return e}const wD=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],bD=5;var ue;(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"})(ue||(ue={}));class SD{constructor(t){this.replacer=t}encode(t){return(t.type===ue.EVENT||t.type===ue.ACK)&&au(t)?this.encodeAsBinary({type:t.type===ue.EVENT?ue.BINARY_EVENT:ue.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===ue.BINARY_EVENT||t.type===ue.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=yD(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function C0(e){return Object.prototype.toString.call(e)==="[object Object]"}class Ym extends ze{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===ue.BINARY_EVENT;r||n.type===ue.BINARY_ACK?(n.type=r?ue.EVENT:ue.ACK,this.reconstructor=new kD(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Qm(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(ue[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===ue.BINARY_EVENT||r.type===ue.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(Ym.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 ue.CONNECT:return C0(n);case ue.DISCONNECT:return n===void 0;case ue.CONNECT_ERROR:return typeof n=="string"||C0(n);case ue.EVENT:case ue.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&wD.indexOf(n[0])===-1);case ue.ACK:case ue.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class kD{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=xD(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const CD=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Ym,Encoder:SD,get PacketType(){return ue},protocol:bD},Symbol.toStringTag,{value:"Module"}));function wn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const TD=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class yk extends ze{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=[wn(t,"open",this.onopen.bind(this)),wn(t,"packet",this.onpacket.bind(this)),wn(t,"error",this.onerror.bind(this)),wn(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(TD.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:ue.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const d=this.ids++,u=n.pop();this._registerAckCallback(d,u),o.id=d}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:ue.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 ue.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 ue.EVENT:case ue.BINARY_EVENT:this.onevent(t);break;case ue.ACK:case ue.BINARY_ACK:this.onack(t);break;case ue.DISCONNECT:this.ondisconnect();break;case ue.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:ue.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:ue.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 To(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}To.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};To.prototype.reset=function(){this.attempts=0};To.prototype.setMin=function(e){this.ms=e};To.prototype.setMax=function(e){this.max=e};To.prototype.setJitter=function(e){this.jitter=e};class Vp extends ze{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,Pc(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 To({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||CD;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 fD(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=wn(n,"open",function(){r.onopen(),t&&t()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=wn(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(wn(t,"ping",this.onping.bind(this)),wn(t,"data",this.ondata.bind(this)),wn(t,"error",this.onerror.bind(this)),wn(t,"close",this.onclose.bind(this)),wn(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){_c(()=>{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 yk(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 Io={};function lu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=pD(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=Io[i]&&s in Io[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new Vp(r,t):(Io[i]||(Io[i]=new Vp(r,t)),l=Io[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(lu,{Manager:Vp,Socket:yk,io:lu,connect:lu});const uu=e=>{const t=document.cookie.split(";").find(n=>n.includes(e));return t?t.split("=")[1]:null};var Qn=(e=>(e.CustomerToken="lc:customer:token",e.CustomerRefreshToken="lc:customer:refresh_token",e.DeviceId="lc:device:id",e))(Qn||{});const Wd=(e,t,n)=>{let r=e;["lc:customer:token","lc:customer:refresh_token"].includes(e)&&(r=`${n}:${e}`),localStorage.setItem(r,t)},cu=(e,t)=>{let n=e;return["lc:customer:token","lc:customer:refresh_token"].includes(e)&&(n=`${t}:${e}`),localStorage.getItem(n)},aa=e=>{localStorage.removeItem(`${e}:lc:customer:token`),localStorage.removeItem(`${e}:lc:customer:refresh_token`)},xk=v.createContext(null),ci=()=>{const e=v.useContext(xk);if(!e)throw new Error("useWebsocket must be used within a WebSocketProvider");return e},ED=({children:e})=>{const{widget:t,isHaveChat:n}=kt(),r=v.useRef(null),i=v.useRef(!1),[s,o]=v.useState(!1),a=v.useCallback(()=>{r.current&&(console.log("WS: Cleaning up existing socket."),r.current.removeAllListeners(),r.current.disconnect(),r.current=null),o(!1),i.current=!1},[]),l=v.useCallback(x=>{if(i.current||r.current&&r.current.connected){console.log("WS: Connect called but already connecting or connected.");return}if(!n){console.log("WS: Connect skipped - no active chat");return}const g=cu(Qn.CustomerToken,x)||uu("customer_token"),w=cu(Qn.CustomerRefreshToken,x)||uu("customer_refresh_token");if(!g||!w){console.log("WS: Connect skipped - missing required tokens");return}r.current&&a(),console.log("WS: Attempting to connect..."),i.current=!0;const b=lu(D_,{transports:["websocket"],forceNew:!0,timeout:1e4,auth:{customer_token:g,device_id:cu(Qn.DeviceId,x)||uu("device_id"),customer_refresh_token:w}});b.removeAllListeners(),b.on("error",k=>{console.error("WS: Websocket error",k),i.current=!1}),b.on("connect_error",k=>{console.error("WS: Connect error",k),i.current=!1,o(!1),r.current=null}),b.on("disconnect",k=>{console.log("WS: Disconnected",k),o(!1),i.current=!1,r.current===b&&(r.current=null)}),b.on("connect",()=>{console.log("WS: Connected successfully"),r.current=b,o(!0),i.current=!1})},[a,n]);v.useEffect(()=>{const x=t==null?void 0:t.link_id;return x&&n?(console.log("WS: Auto-connecting due to linkId and isHaveChat"),l(x)):(console.log("WS: Auto-disconnect due to missing linkId or isHaveChat"),a()),()=>{console.log("WS: Cleanup on effect change"),a()}},[t==null?void 0:t.link_id,n]);const c=v.useCallback(()=>{const x=t==null?void 0:t.link_id;x?l(x):console.warn("WS: Manual connect failed, no link_id available.")},[t==null?void 0:t.link_id,l]),d=v.useCallback(()=>{console.log("WS: Reconnecting..."),a();const x=t==null?void 0:t.link_id;x&&l(x)},[t==null?void 0:t.link_id,l,a]),u=v.useCallback(()=>{console.log("WS: Manual disconnect"),a()},[a]),f=v.useCallback((x,g)=>{var w;(w=r.current)==null||w.on(x,g)},[]),p=v.useCallback((x,g)=>{var w;(w=r.current)==null||w.off(x,g)},[]),h=v.useCallback((x,g,w)=>{r.current&&r.current.connected?r.current.emit(x,g,w):console.warn(`WS: Cannot emit event '${x}', socket not connected.`)},[]),m=v.useMemo(()=>({connected:s,connect:c,reconnect:d,disconnect:u,on:f,off:p,emit:h}),[s,c,d,u,f,p,h]);return y.jsx(xk.Provider,{value:m,children:e})};var En=(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.MessageRead="message:read",e))(En||{}),st=(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.ChatToggleUpload="chat:user:upload:toggle",e))(st||{});const jc=e=>{const t=Sb(),n=(r,i)=>{var o;const s=((o=rB.find(a=>a.name===r))==null?void 0:o.path)??"/";return typeof i=="object"&&s.includes(":")?Object.entries(i).reduce((a,[l,c])=>a.replace(`:${l}`,c),s):i?`${s}?${i}`:s};return{push:(r,i)=>{t(n(r,i),e)},path:n}},_D=e=>({accessToken:localStorage.getItem(`${e}:${Qn.CustomerToken}`)||"",refreshToken:localStorage.getItem(`${e}:${Qn.CustomerRefreshToken}`)||""}),ol=()=>{const{widget:e}=kt();return e?_D(e.link_id):null},ho=e=>{if(!e)return{};const{accessToken:t,refreshToken:n}=e,r={};return t&&(r["X-Customer-Token"]=t),n&&(r["X-Customer-Refresh-Token"]=n),{...r}};function PD(e){return e&&typeof e=="object"&&"customer_token"in e&&"customer_refresh_token"in e}const jD=()=>am({mutationFn:e=>bo(`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})})}),RD=(e,t)=>bo(`clients/${e}/chats`,{headers:t}),Up=(e,t)=>bo(`clients/${e}/chats`,{method:"DELETE",headers:t}),AD=(e,t,n)=>bo("review",{method:"POST",body:JSON.stringify({rating:e,comment:t||void 0}),headers:{...n,"X-Device-Id":cu(Qn.DeviceId,"")||""}}),OD=()=>{const e=ol();return am({mutationFn:t=>AD(t.rating,t.comment,ho(e))})},DD=e=>{const t=ol();return am({mutationFn:n=>bo(`clients/${e}/chats/files`,{method:"POST",headers:ho(t),body:L_({files:n},{arrayWithBracketAndIndex:!1,arrayWithBrackets:!1})})})};function FD(e){return e&&typeof e=="object"&&"file_urls"in e}const Km=(e,t,n)=>{const r=typeof window<"u"?window:void 0;v.useEffect(()=>(r.addEventListener(e,t),()=>{r.removeEventListener(e,t,!1)}),[e,t,r])},ss=()=>{let e=!1,t=!1;return typeof window<"u"&&(e=new URLSearchParams(window.location.search).get("fullscreen")==="true",t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent)),e||t},Xm=()=>{let e=!1;return typeof window<"u"&&(e=new URLSearchParams(window.location.search).get("fullscreen")==="true"),e};function Hp({text:e}){var c,d,u,f;const{widget:t,isHaveChat:n,isTooltipVisible:r,setIsTooltipVisible:i,onTooltipClose:s}=kt(),o=Oe(),a=sl(),l=()=>{i(!1),s&&s()};return r?y.jsxs(ve.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:ge("absolute bottom-full mb-3 p-3 shadow-lg whitespace-nowrap","w-auto right-0"),style:{borderRadius:o.getRadius(),backgroundColor:o.getColor(C.TooltipBackground),color:o.getColor(C.TooltipText)},children:[y.jsx("button",{onClick:l,className:"absolute top-2 right-2 p-1 rounded-full hover:bg-black/10 transition-colors","aria-label":a(Y.CloseButtonAria),children:y.jsx(fe.X,{className:"size-3"})}),y.jsx(ve.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.1,duration:.3},className:"text-sm font-medium pr-5",style:{color:o.getColor(C.TooltipText)},children:e||(n?(d=(c=t==null?void 0:t.appearance)==null?void 0:c.design)==null?void 0:d.tooltip_message_active:(f=(u=t==null?void 0:t.appearance)==null?void 0:u.design)==null?void 0:f.tooltip_message)||a(n?Y.TooltipActive:Y.TooltipDefault)}),y.jsx("div",{className:ge("absolute bottom-0 right-4 w-3 h-3 transform rotate-45 translate-y-1.5 bg-blue-100")})]},"widget-tooltip"):null}const MD="/notify.mp3",ND=async e=>{await new Audio(e||MD).play()};function T0({fallback:e,fallbackOpen:t}){const[n]=v.useState(window.document.title),r=ci(),{isHaveChat:i,open:s,soundPath:o}=kt(),[a,l]=v.useState(!0),[c,d]=v.useState(0),[u,f]=v.useState(null),p=sl(),h=()=>{ND(o)},m=(x,g)=>{if(u&&clearInterval(u),x||!i||g===0||Number.isNaN(g)){window.document.title=n,f(null);return}const w=setInterval(()=>{if(x||!i||g===0||Number.isNaN(g)){window.document.title=n,clearInterval(w),f(null);return}const b=`${g} ${p(Y.NewMessagesNotification)} - ${n}`;window.document.title!==b?window.document.title=b:window.document.title=n},1e3);return f(w),()=>{clearInterval(w),f(null)}};return v.useEffect(()=>m(s&&a,c),[c,s,a]),v.useEffect(()=>{const x=()=>{l(document.visibilityState==="visible")};return document.addEventListener("visibilitychange",x,!1),()=>{document.removeEventListener("visibilitychange",x)}},[]),v.useEffect(()=>{if(i&&s&&a&&d(0),!r||!i||s&&a)return;const x=()=>{!i||s&&a||(d(g=>g+1),h())};return r.on(st.MessageAgentCreate,x),r.on(st.ChatUserAssignee,h),()=>{r.off(st.MessageAgentCreate,x),r.off(st.ChatUserAssignee,h)}},[r,i,s,a]),s?null:!i||c===0?t?e:null:y.jsx(Hp,{text:p(Y.NewMessagesNotification)})}function LD({children:e,border:t}){var B,V,K,ee;const n=ci(),{open:r,setOpen:i,setIsHaveChat:s,isHaveChat:o,widget:a,onOpen:l,onClose:c}=kt(),[d]=v.useState(!0),u=jc(),f=ol(),p=el(),h=Oe(),m=ss(),x=Xm(),[g,w]=v.useState({x:0,y:0}),b=E3(),k=v.useRef(null),T=v.useRef(null),[E,_]=v.useState(!1);v.useEffect(()=>((()=>{_("ontouchstart"in window||navigator.maxTouchPoints>0)})(),window.addEventListener("touchstart",()=>{_(!0)},{once:!0}),()=>{window.removeEventListener("touchstart",()=>{_(!0)})}),[]),v.useEffect(()=>{o&&p.pathname==="/"&&f&&f.accessToken&&u.push("chat")},[o]);const P=ne=>{if(!k.current||!T.current)return ne;const O=k.current.getBoundingClientRect(),$={width:window.innerWidth,height:window.innerHeight},H={top:20,right:20,bottom:40,left:20};let q=ne.x,Q=ne.y;return O.right+q-g.x>$.width-H.right&&(q=$.width-H.right-O.width-(O.left-g.x)),O.left+q-g.x<H.left&&(q=H.left-(O.left-g.x)),O.bottom+Q-g.y>$.height-H.bottom&&(Q=$.height-H.bottom-O.height-(O.top-g.y)),O.top+Q-g.y<H.top&&(Q=H.top-(O.top-g.y)),{x:q,y:Q}},M=()=>{i(!0),n&&(n.emit(En.WidgetOpen,{}),l&&l())},N=()=>{i(!1),n&&(n.emit(En.WidgetClose,{}),c&&c())},R=()=>{i(!1),s(!1),Up(a.client_id,ho(f)),u.push("registration")};v.useEffect(()=>{if(m&&(o||x)&&M(),!(!n||!a))return n.on(st.Banned,R),()=>{n.off(st.Banned,R)}},[]);function F(ne){E&&b.start(ne)}return y.jsx("section",{className:"relative w-full h-full",ref:T,children:y.jsxs(Xr,{children:[r&&y.jsx(ve.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:m?"100%":((V=(B=a==null?void 0:a.appearance)==null?void 0:B.design)==null?void 0:V.width)||"21rem",height:m?"var(--app-height, 100dvh)":((ee=(K=a==null?void 0:a.appearance)==null?void 0:K.design)==null?void 0:ee.height)||"30rem",left:m?"0":"",right:m?"0px !important":"",maxHeight:m?"var(--app-height, 100dvh)":"",boxShadow:m?"":`0 10px 25px -5px ${h.getColor(C.ShadowColor)}, 0 8px 10px -6px ${h.getColor(C.ShadowColor)}`},className:ge("fixed z-300 overflow-hidden",{"border border-solid dark:border-zink-500 ":t,"bottom-12 right-12 rounded-t-xl":!m,"!bottom-0 !right-0":m}),children:e},"widget-container"),!E&&y.jsxs("div",{className:"fixed bottom-[40px] right-[20px] z-400",children:[y.jsx(T0,{fallback:y.jsx(Hp,{}),fallbackOpen:d}),y.jsxs(Xr,{mode:"wait",children:[!r&&y.jsxs(on,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:M,children:[y.jsx(ve.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:ge("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:h.getColor(C.ButtonBackground)}}),y.jsx(fe.Chat,{className:"size-7"})]},"desktop-open-button"),r&&!m&&y.jsx(on,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:N,children:y.jsx(fe.X,{className:"size-7"})},"desktop-close-button")]})]}),E&&y.jsx(ve.div,{ref:k,className:"fixed z-400 bottom-24 right-5",initial:{bottom:"96px",right:"20px"},animate:{x:g.x,y:g.y},drag:E,dragControls:b,dragMomentum:!1,dragElastic:0,onDragEnd:(ne,O)=>{const $={x:g.x+O.offset.x,y:g.y+O.offset.y},H=P($);w(H)},children:y.jsxs(Xr,{children:[y.jsx(T0,{fallback:y.jsx(Hp,{}),fallbackOpen:d}),!r&&y.jsx("div",{className:"cursor-move",onPointerDown:F,children:y.jsxs(on,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:M,children:[y.jsx(ve.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:ge("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:h.getColor(C.ButtonBackground)}}),y.jsx(fe.Chat,{className:"size-7"})]})},"chat-button"),r&&!m&&y.jsx(on,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:N,children:y.jsx(fe.X,{className:"size-7"})},"desktop-close-button")]})})]})})}function wk(e){const{widget:t}=kt();return y.jsx(O3,{widget:t,children:y.jsx(LD,{...e})})}function os(e){this._maxSize=e,this.clear()}os.prototype.clear=function(){this._size=0,this._values=Object.create(null)};os.prototype.get=function(e){return this._values[e]};os.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var ID=/[^.^\]^[]+|(?=\[\]|\.\.)/g,bk=/^\d+$/,$D=/^\d/,BD=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,zD=/^\s*(['"]?)(.*?)(\1)\s*$/,Zm=512,E0=new os(Zm),_0=new os(Zm),P0=new os(Zm),Vi={Cache:os,split:Wp,normalizePath:qd,setter:function(e){var t=qd(e);return _0.get(e)||_0.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=qd(e);return P0.get(e)||P0.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+(Jm(n)||bk.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){VD(Array.isArray(e)?e:Wp(e),t,n)}};function qd(e){return E0.get(e)||E0.set(e,Wp(e).map(function(t){return t.replace(zD,"$2")}))}function Wp(e){return e.match(ID)||[""]}function VD(e,t,n){var r=e.length,i,s,o,a;for(s=0;s<r;s++)i=e[s],i&&(WD(i)&&(i='"'+i+'"'),a=Jm(i),o=!a&&/^\d+$/.test(i),t.call(n,i,a,o,s,e))}function Jm(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function UD(e){return e.match($D)&&!e.match(bk)}function HD(e){return BD.test(e)}function WD(e){return!Jm(e)&&(UD(e)||HD(e))}const qD=/[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,Rc=e=>e.match(qD)||[],Ac=e=>e[0].toUpperCase()+e.slice(1),eg=(e,t)=>Rc(e).join(t).toLowerCase(),Sk=e=>Rc(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),GD=e=>Ac(Sk(e)),QD=e=>eg(e,"_"),YD=e=>eg(e,"-"),KD=e=>Ac(eg(e," ")),XD=e=>Rc(e).map(Ac).join(" ");var Gd={words:Rc,upperFirst:Ac,camelCase:Sk,pascalCase:GD,snakeCase:QD,kebabCase:YD,sentenceCase:KD,titleCase:XD},tg={exports:{}};tg.exports=function(e){return kk(ZD(e),e)};tg.exports.array=kk;function kk(e,t){var n=e.length,r=new Array(n),i={},s=n,o=JD(t),a=eF(e);for(t.forEach(function(c){if(!a.has(c[0])||!a.has(c[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)i[s]||l(e[s],s,new Set);return r;function l(c,d,u){if(u.has(c)){var f;try{f=", node was:"+JSON.stringify(c)}catch{f=""}throw new Error("Cyclic dependency"+f)}if(!a.has(c))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(c));if(!i[d]){i[d]=!0;var p=o.get(c)||new Set;if(p=Array.from(p),d=p.length){u.add(c);do{var h=p[--d];l(h,a.get(h),u)}while(d);u.delete(c)}r[--n]=c}}}function ZD(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 JD(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 eF(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var tF=tg.exports;const nF=Zi(tF),rF=Object.prototype.toString,iF=Error.prototype.toString,sF=RegExp.prototype.toString,oF=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",aF=/^Symbol\((.*)\)(.*)$/;function lF(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function j0(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return lF(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return oF.call(e).replace(aF,"Symbol($1)");const r=rF.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+iF.call(e)+"]":r==="RegExp"?sF.call(e):null}function Jr(e,t){let n=j0(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let s=j0(this[r],t);return s!==null?s:i},2)}function Ck(e){return e==null?[]:[].concat(e)}let Tk,Ek,_k,uF=/\$\{\s*(\w+)\s*\}/g;Tk=Symbol.toStringTag;class R0{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[Tk]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],Ck(t).forEach(s=>{if(Rt.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]}}Ek=Symbol.hasInstance;_k=Symbol.toStringTag;class Rt 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(uF,(i,s)=>Jr(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 R0(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[_k]="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,Rt)}static[Ek](t){return R0[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Fn={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 \`${Jr(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Jr(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Jr(n,!0)}\``+i}},Tt={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"},cF={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"},qp={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},dF={isValue:"${path} field must be ${value}"},du={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},fF={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"},pF={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: \`${Jr(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: \`${Jr(n,!0)}\``}return Rt.formatError(Fn.notType,e)}};Object.assign(Object.create(null),{mixed:Fn,string:Tt,number:cF,date:qp,object:du,array:fF,boolean:dF,tuple:pF});const ng=e=>e&&e.__isYupSchema__;class Yu{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 Yu(t,(a,l)=>{var c;let d=o(...a)?i:s;return(c=d==null?void 0:d(l))!=null?c:l})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(s=>s.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),i=this.fn(r,t,n);if(i===void 0||i===t)return t;if(!ng(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const Ll={context:"$",value:"."};class as{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]===Ll.context,this.isValue=this.key[0]===Ll.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?Ll.context:this.isValue?Ll.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&Vi.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}}as.prototype.__isYupRef=!0;const Ri=e=>e==null;function vs(e){function t({value:n,path:r="",options:i,originalValue:s,schema:o},a,l){const{name:c,test:d,params:u,message:f,skipAbsent:p}=e;let{parent:h,context:m,abortEarly:x=o.spec.abortEarly,disableStackTrace:g=o.spec.disableStackTrace}=i;function w(R){return as.isRef(R)?R.getValue(n,h,m):R}function b(R={}){const F=Object.assign({value:n,originalValue:s,label:o.spec.label,path:R.path||r,spec:o.spec,disableStackTrace:R.disableStackTrace||g},u,R.params);for(const V of Object.keys(F))F[V]=w(F[V]);const B=new Rt(Rt.formatError(R.message||f,F),n,F.path,R.type||c,F.disableStackTrace);return B.params=F,B}const k=x?a:l;let T={path:r,parent:h,type:c,from:i.from,createError:b,resolve:w,options:i,originalValue:s,schema:o};const E=R=>{Rt.isError(R)?k(R):R?l(null):k(b())},_=R=>{Rt.isError(R)?k(R):a(R)};if(p&&Ri(n))return E(!0);let M;try{var N;if(M=d.call(T,n,T),typeof((N=M)==null?void 0:N.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${T.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(M).then(E,_)}}catch(R){_(R);return}E(M)}return t.OPTIONS=e,t}function hF(e,t,n,r=n){let i,s,o;return t?(Vi.forEach(t,(a,l,c)=>{let d=l?a.slice(1,a.length-1):a;e=e.resolve({context:r,parent:i,value:n});let u=e.type==="tuple",f=c?parseInt(d,10):0;if(e.innerType||u){if(u&&!c)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(n&&f>=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[f],e=u?e.spec.types[f]:e.innerType}if(!c){if(!e.fields||!e.fields[d])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[d],e=e.fields[d]}s=d,o=l?"["+a+"]":"."+a}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}class Ku extends Set{describe(){const t=[];for(const n of this.values())t.push(as.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 Ku(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function Ns(e,t=new Map){if(ng(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]=Ns(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,Ns(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(Ns(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=Ns(i,t)}else throw Error(`Unable to clone ${e}`);return n}class Kn{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 Ku,this._blacklist=new Ku,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Fn.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=Ns(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&&Ri(s))return s;let o=Jr(t),a=Jr(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]),y.jsx(Yj,{isPresent:t,childRef:i,sizeRef:s,children:v.cloneElement(e,{ref:i})})}const Xj=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a})=>{const l=bc(Zj),u=v.useId();let d=!0,c=v.useMemo(()=>(d=!1,{id:u,initial:t,isPresent:n,custom:i,onExitComplete:f=>{l.set(f,!0);for(const h of l.values())if(!h)return;r&&r()},register:f=>(l.set(f,!1),()=>l.delete(f))}),[n,l,r]);return s&&d&&(c={...c}),v.useMemo(()=>{l.forEach((f,h)=>l.set(h,!1))},[n]),v.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(e=y.jsx(Kj,{isPresent:n,anchorX:a,children:e})),y.jsx(Sc.Provider,{value:c,children:e})};function Zj(){return new Map}function Db(e=!0){const t=v.useContext(Sc);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=v.useId();v.useEffect(()=>{if(e)return i(s)},[e]);const o=v.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const Rl=e=>e.key||"";function ny(e){const t=[];return v.Children.forEach(e,n=>{v.isValidElement(n)&&t.push(n)}),t}const Zr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left"})=>{const[l,u]=Db(o),d=v.useMemo(()=>ny(e),[e]),c=o&&!l?[]:d.map(Rl),f=v.useRef(!0),h=v.useRef(d),m=bc(()=>new Map),[p,w]=v.useState(d),[g,x]=v.useState(d);Ob(()=>{f.current=!1,h.current=d;for(let E=0;E<g.length;E++){const C=Rl(g[E]);c.includes(C)?m.delete(C):m.get(C)!==!0&&m.set(C,!1)}},[g,c.length,c.join("-")]);const b=[];if(d!==p){let E=[...d];for(let C=0;C<g.length;C++){const _=g[C],A=Rl(_);c.includes(A)||(E.splice(C,0,_),b.push(_))}return s==="wait"&&b.length&&(E=b),x(ny(E)),w(d),null}const{forceRender:T}=v.useContext(dm);return y.jsx(y.Fragment,{children:g.map(E=>{const C=Rl(E),_=o&&!l?!1:d===g||c.includes(C),A=()=>{if(m.has(C))m.set(C,!0);else return;let F=!0;m.forEach(M=>{M||(F=!1)}),F&&(T==null||T(),x(h.current),o&&(u==null||u()),r&&r())};return y.jsx(Xj,{isPresent:_,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,onExitComplete:_?void 0:A,anchorX:a,children:E},C)})})};function hm(e,t){e.indexOf(t)===-1&&e.push(t)}function mm(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let vp=()=>{};const yp={skipAnimations:!1,useManualTiming:!1};function gm(e){let t;return()=>(t===void 0&&(t=e()),t)}const un=e=>e,Aa=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class vm{constructor(){this.subscriptions=[]}add(t){return hm(this.subscriptions,t),()=>mm(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 Un=e=>e*1e3,Hn=e=>e/1e3;function Mb(e,t){return t?e*(1e3/t):0}const Jj=gm(()=>window.ScrollTimeline!==void 0);class eP{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(Jj()&&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 tP extends eP{then(t,n){return this.finished.finally(t).then(()=>{})}}const ry={value:null,addProjectionMetrics:null},ym=e=>Array.isArray(e)&&typeof e[0]=="number",nP={};function rP(e,t){const n=gm(e);return()=>nP[t]??n()}const Ra=rP(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Fb=(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})`,xp={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 Nb(e,t){if(e)return typeof e=="function"&&Ra()?Fb(e,t):ym(e)?Wo(e):Array.isArray(e)?e.map(n=>Nb(n,t)||xp.easeOut):xp[e]}function iP(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeInOut",times:l}={},u=void 0){const d={[t]:n};l&&(d.offset=l);const c=Nb(a,i);return Array.isArray(c)&&(d.easing=c),e.animate(d,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal",pseudoElement:u})}function xm(e){return typeof e=="function"&&"applyToOptions"in e}function wm(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Vu=2e4;function bm(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Vu;)t+=n,r=e.next(t);return t>=Vu?1/0:t}function sP(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(bm(r),Vu);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Hn(i)}}function Lb(e){return!!(typeof e=="function"&&Ra()||!e||typeof e=="string"&&(e in xp||Ra())||ym(e)||Array.isArray(e)&&e.every(Lb))}function iy(e,t){e.timeline=t,e.onfinish=null}const Ol=["read","resolveKeyframes","update","preRender","render","postRender"];function oP(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)&&(d.schedule(c),e()),l++,c(a)}const d={schedule:(c,f=!1,h=!1)=>{const p=h&&i?n:r;return f&&o.add(c),p.has(c)||p.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&&ry.value&&ry.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,d.process(c))}};return d}const aP=40;function Ib(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Ol.reduce((g,x)=>(g[x]=oP(s,t?x:void 0),g),{}),{read:a,resolveKeyframes:l,update:u,preRender:d,render:c,postRender:f}=o,h=()=>{const g=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(g-i.timestamp,aP),1),i.timestamp=g,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),d.process(i),c.process(i),f.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},m=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:Ol.reduce((g,x)=>{const b=o[x];return g[x]=(T,E=!1,C=!1)=>(n||m(),b.schedule(T,E,C)),g},{}),cancel:g=>{for(let x=0;x<Ol.length;x++)o[Ol[x]].cancel(g)},state:i,steps:o}}const{schedule:Sm,cancel:dB}=Ib(queueMicrotask,!1),{schedule:ke,cancel:ii,state:st,steps:Pd}=Ib(typeof requestAnimationFrame<"u"?requestAnimationFrame:un,!0);let nu;function lP(){nu=void 0}const Wn={now:()=>(nu===void 0&&Wn.set(st.isProcessing||yp.useManualTiming?st.timestamp:performance.now()),nu),set:e=>{nu=e,queueMicrotask(lP)}},vn={x:!1,y:!1};function $b(){return vn.x||vn.y}function uP(e){return e==="x"||e==="y"?vn[e]?null:(vn[e]=!0,()=>{vn[e]=!1}):vn.x||vn.y?null:(vn.x=vn.y=!0,()=>{vn.x=vn.y=!1})}function cP(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 Bb(e,t){const n=cP(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function sy(e){return!(e.pointerType==="touch"||$b())}function dP(e,t,n={}){const[r,i,s]=Bb(e,n),o=a=>{if(!sy(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const d=c=>{sy(c)&&(u(c),l.removeEventListener("pointerleave",d))};l.addEventListener("pointerleave",d,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const zb=(e,t)=>t?e===t?!0:zb(e,t.parentElement):!1,km=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,fP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function pP(e){return fP.has(e.tagName)||e.tabIndex!==-1}const qo=new WeakSet;function oy(e){return t=>{t.key==="Enter"&&e(t)}}function Ad(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const hP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=oy(()=>{if(qo.has(n))return;Ad(n,"down");const i=oy(()=>{Ad(n,"up")}),s=()=>Ad(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 ay(e){return km(e)&&!$b()}function mP(e,t,n={}){const[r,i,s]=Bb(e,n),o=a=>{const l=a.currentTarget;if(!ay(a)||qo.has(l))return;qo.add(l);const u=t(l,a),d=(h,m)=>{window.removeEventListener("pointerup",c),window.removeEventListener("pointercancel",f),!(!ay(h)||!qo.has(l))&&(qo.delete(l),typeof u=="function"&&u(h,{success:m}))},c=h=>{d(h,l===window||l===document||n.useGlobalTarget||zb(l,h.target))},f=h=>{d(h,!1)};window.addEventListener("pointerup",c,i),window.addEventListener("pointercancel",f,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a instanceof HTMLElement&&(a.addEventListener("focus",u=>hP(u,i)),!pP(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}const ly=30,gP=e=>!isNaN(parseFloat(e));class vP{constructor(t,n={}){this.version="12.7.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=Wn.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=Wn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=gP(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 vm);const r=this.events[t].add(n);return t==="change"?()=>{r(),ke.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=Wn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ly)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ly);return Mb(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 vP(e,t)}const Vb=v.createContext({strict:!1}),uy={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"]},fo={};for(const e in uy)fo[e]={isEnabled:t=>uy[e].some(n=>!!t[n])};function yP(e){for(const t in e)fo[t]={...fo[t],...e[t]}}const xP=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 Uu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||xP.has(e)}let Ub=e=>!Uu(e);function wP(e){e&&(Ub=t=>t.startsWith("on")?!Uu(t):e(t))}try{wP(require("@emotion/is-prop-valid").default)}catch{}function bP(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Ub(i)||n===!0&&Uu(i)||!t&&!Uu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function SP(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 kc=v.createContext({});function Cc(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Da(e){return typeof e=="string"||Array.isArray(e)}const Cm=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Tm=["initial",...Cm];function Tc(e){return Cc(e.animate)||Tm.some(t=>Da(e[t]))}function Hb(e){return!!(Tc(e)||e.variants)}function kP(e,t){if(Tc(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Da(n)?n:void 0,animate:Da(r)?r:void 0}}return e.inherit!==!1?t:{}}function CP(e){const{initial:t,animate:n}=kP(e,v.useContext(kc));return v.useMemo(()=>({initial:t,animate:n}),[cy(t),cy(n)])}function cy(e){return Array.isArray(e)?e.join(" "):e}const TP=Symbol.for("motionComponentSymbol");function Rs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function EP(e,t,n){return v.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Rs(n)&&(n.current=r))},[t])}const Em=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),_P="framerAppearId",Wb="data-"+Em(_P),qb=v.createContext({});function jP(e,t,n,r,i){var p,w;const{visualElement:s}=v.useContext(kc),o=v.useContext(Vb),a=v.useContext(Sc),l=v.useContext(pm).reducedMotion,u=v.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 d=u.current,c=v.useContext(qb);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&PP(u.current,n,i,c);const f=v.useRef(!1);v.useInsertionEffect(()=>{d&&f.current&&d.update(n,a)});const h=n[Wb],m=v.useRef(!!h&&!((p=window.MotionHandoffIsComplete)!=null&&p.call(window,h))&&((w=window.MotionHasOptimisedAnimation)==null?void 0:w.call(window,h)));return Ob(()=>{d&&(f.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),Sm.render(d.render),m.current&&d.animationState&&d.animationState.animateChanges())}),v.useEffect(()=>{d&&(!m.current&&d.animationState&&d.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var g;(g=window.MotionHandoffMarkAsComplete)==null||g.call(window,h)}),m.current=!1))}),d}function PP(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Gb(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&Rs(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:u})}function Gb(e){if(e)return e.options.allowProjection!==!1?e.projection:Gb(e.parent)}function AP({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&yP(e);function s(a,l){let u;const d={...v.useContext(pm),...a,layoutId:RP(a)},{isStatic:c}=d,f=CP(a),h=r(a,c);if(!c&&fm){OP();const m=DP(d);u=m.MeasureLayout,f.visualElement=jP(i,h,d,t,m.ProjectionNode)}return y.jsxs(kc.Provider,{value:f,children:[u&&f.visualElement?y.jsx(u,{visualElement:f.visualElement,...d}):null,n(i,a,EP(h,f.visualElement,l),h,c,f.visualElement)]})}s.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=v.forwardRef(s);return o[TP]=i,o}function RP({layoutId:e}){const t=v.useContext(dm).id;return t&&e!==void 0?t+"-"+e:e}function OP(e,t){v.useContext(Vb).strict}function DP(e){const{drag:t,layout:n}=fo;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 Qb=e=>t=>typeof t=="string"&&t.startsWith(e),_m=Qb("--"),MP=Qb("var(--"),jm=e=>MP(e)?FP.test(e.split("/*")[0].trim()):!1,FP=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ma={};function NP(e){for(const t in e)Ma[t]=e[t],_m(t)&&(Ma[t].isCSSVariable=!0)}const ko=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],is=new Set(ko);function Yb(e,{layout:t,layoutId:n}){return is.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Ma[e]||e==="opacity")}const ht=e=>!!(e&&e.getVelocity),Kb=(e,t)=>t&&typeof e=="number"?t.transform(e):e,mr=(e,t,n)=>n>t?t:n<e?e:n,Co={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Fa={...Co,transform:e=>mr(0,1,e)},Dl={...Co,default:1},tl=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Cr=tl("deg"),qn=tl("%"),Z=tl("px"),LP=tl("vh"),IP=tl("vw"),dy={...qn,parse:e=>qn.parse(e)/100,transform:e=>qn.transform(e*100)},$P={borderWidth:Z,borderTopWidth:Z,borderRightWidth:Z,borderBottomWidth:Z,borderLeftWidth:Z,borderRadius:Z,radius:Z,borderTopLeftRadius:Z,borderTopRightRadius:Z,borderBottomRightRadius:Z,borderBottomLeftRadius:Z,width:Z,maxWidth:Z,height:Z,maxHeight:Z,top:Z,right:Z,bottom:Z,left:Z,padding:Z,paddingTop:Z,paddingRight:Z,paddingBottom:Z,paddingLeft:Z,margin:Z,marginTop:Z,marginRight:Z,marginBottom:Z,marginLeft:Z,backgroundPositionX:Z,backgroundPositionY:Z},BP={rotate:Cr,rotateX:Cr,rotateY:Cr,rotateZ:Cr,scale:Dl,scaleX:Dl,scaleY:Dl,scaleZ:Dl,skew:Cr,skewX:Cr,skewY:Cr,distance:Z,translateX:Z,translateY:Z,translateZ:Z,x:Z,y:Z,z:Z,perspective:Z,transformPerspective:Z,opacity:Fa,originX:dy,originY:dy,originZ:Z},fy={...Co,transform:Math.round},Pm={...$P,...BP,zIndex:fy,size:Z,fillOpacity:Fa,strokeOpacity:Fa,numOctaves:fy},zP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},VP=ko.length;function UP(e,t,n){let r="",i=!0;for(let s=0;s<VP;s++){const o=ko[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=Kb(a,Pm[o]);if(!l){i=!1;const d=zP[o]||o;r+=`${d}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Am(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(is.has(l)){o=!0;continue}else if(_m(l)){i[l]=u;continue}else{const d=Kb(u,Pm[l]);l.startsWith("origin")?(a=!0,s[l]=d):r[l]=d}}if(t.transform||(o||n?r.transform=UP(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:d=0}=s;r.transformOrigin=`${l} ${u} ${d}`}}const Rm=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Xb(e,t,n){for(const r in t)!ht(t[r])&&!Yb(r,n)&&(e[r]=t[r])}function HP({transformTemplate:e},t){return v.useMemo(()=>{const n=Rm();return Am(n,t,e),Object.assign({},n.vars,n.style)},[t])}function WP(e,t){const n=e.style||{},r={};return Xb(r,n,e),Object.assign(r,HP(e,t)),r}function qP(e,t){const n={},r=WP(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 GP=["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 Om(e){return typeof e!="string"||e.includes("-")?!1:!!(GP.indexOf(e)>-1||/[A-Z]/u.test(e))}const QP={offset:"stroke-dashoffset",array:"stroke-dasharray"},YP={offset:"strokeDashoffset",array:"strokeDasharray"};function KP(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?QP:YP;e[s.offset]=Z.transform(-r);const o=Z.transform(t),a=Z.transform(n);e[s.array]=`${o} ${a}`}function py(e,t,n){return typeof e=="string"?e:Z.transform(t+n*e)}function XP(e,t,n){const r=py(t,e.x,e.width),i=py(n,e.y,e.height);return`${r} ${i}`}function Dm(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},d,c){if(Am(e,u,c),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h,dimensions:m}=e;f.transform&&(m&&(h.transform=f.transform),delete f.transform),m&&(i!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=XP(m,i!==void 0?i:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&KP(f,o,a,l,!1)}const Zb=()=>({...Rm(),attrs:{}}),Mm=e=>typeof e=="string"&&e.toLowerCase()==="svg";function ZP(e,t,n,r){const i=v.useMemo(()=>{const s=Zb();return Dm(s,t,Mm(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Xb(s,e.style,e),i.style={...s,...i.style}}return i}function JP(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Om(n)?ZP:qP)(r,s,o,n),u=bP(r,typeof n=="string",e),d=n!==v.Fragment?{...u,...l,ref:i}:{},{children:c}=r,f=v.useMemo(()=>ht(c)?c.get():c,[c]);return v.createElement(n,{...d,children:f})}}function hy(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Fm(e,t,n,r){if(typeof t=="function"){const[i,s]=hy(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]=hy(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const wp=e=>Array.isArray(e),eA=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),tA=e=>wp(e)?e[e.length-1]||0:e;function ru(e){const t=ht(e)?e.get():e;return eA(t)?t.toValue():t}function nA({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,s){const o={latestValues:rA(r,i,s,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const Jb=e=>(t,n)=>{const r=v.useContext(kc),i=v.useContext(Sc),s=()=>nA(e,t,r,i);return n?s():bc(s)};function rA(e,t,n,r){const i={},s=r(e,{});for(const f in s)i[f]=ru(s[f]);let{initial:o,animate:a}=e;const l=Tc(e),u=Hb(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const c=d?a:o;if(c&&typeof c!="boolean"&&!Cc(c)){const f=Array.isArray(c)?c:[c];for(let h=0;h<f.length;h++){const m=Fm(e,f[h]);if(m){const{transitionEnd:p,transition:w,...g}=m;for(const x in g){let b=g[x];if(Array.isArray(b)){const T=d?b.length-1:0;b=b[T]}b!==null&&(i[x]=b)}for(const x in p)i[x]=p[x]}}}return i}function Nm(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(ht(r[o])||t.style&&ht(t.style[o])||Yb(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const iA={useVisualState:Jb({scrapeMotionValuesFromProps:Nm,createRenderState:Rm})};function eS(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 tS(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 nS=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 rS(e,t,n,r){tS(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(nS.has(i)?i:Em(i),t.attrs[i])}function iS(e,t,n){const r=Nm(e,t,n);for(const i in e)if(ht(e[i])||ht(t[i])){const s=ko.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const my=["x","y","width","height","cx","cy","r"],sA={useVisualState:Jb({scrapeMotionValuesFromProps:iS,createRenderState:Zb,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(is.has(a)){s=!0;break}}if(!s)return;let o=!t;if(t)for(let a=0;a<my.length;a++){const l=my[a];e[l]!==t[l]&&(o=!0)}o&&ke.read(()=>{eS(n,r),ke.render(()=>{Dm(r,i,Mm(n.tagName),e.transformTemplate),rS(n,r)})})}})};function oA(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Om(r)?sA:iA,preloadedFeatures:e,useRender:JP(i),createVisualElement:t,Component:r};return AP(o)}}function Na(e,t,n){const r=e.getProps();return Fm(r,t,n!==void 0?n:r.custom,e)}const sS=new Set(["width","height","top","left","right","bottom",...ko]);function aA(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Oa(n))}function lA(e,t){const n=Na(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=tA(s[o]);aA(e,o,a)}}function uA(e){return!!(ht(e)&&e.add)}function bp(e,t){const n=e.getValue("willChange");if(uA(n))return n.add(t);if(!n&&yp.WillChange){const r=new yp.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function oS(e){return e.props[Wb]}const aS=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,cA=1e-7,dA=12;function fA(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=aS(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>cA&&++a<dA);return o}function nl(e,t,n,r){if(e===t&&n===r)return un;const i=s=>fA(s,0,1,e,n);return s=>s===0||s===1?s:aS(i(s),t,r)}const lS=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,uS=e=>t=>1-e(1-t),cS=nl(.33,1.53,.69,.99),Lm=uS(cS),dS=lS(Lm),fS=e=>(e*=2)<1?.5*Lm(e):.5*(2-Math.pow(2,-10*(e-1))),Im=e=>1-Math.sin(Math.acos(e)),pS=uS(Im),hS=lS(Im),mS=e=>/^0[^.\s]+$/u.test(e);function pA(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||mS(e):!0}const ra=e=>Math.round(e*1e5)/1e5,$m=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function hA(e){return e==null}const mA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Bm=(e,t)=>n=>!!(typeof n=="string"&&mA.test(n)&&n.startsWith(e)||t&&!hA(n)&&Object.prototype.hasOwnProperty.call(n,t)),gS=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match($m);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},gA=e=>mr(0,255,e),Rd={...Co,transform:e=>Math.round(gA(e))},ji={test:Bm("rgb","red"),parse:gS("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Rd.transform(e)+", "+Rd.transform(t)+", "+Rd.transform(n)+", "+ra(Fa.transform(r))+")"};function vA(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 Sp={test:Bm("#"),parse:vA,transform:ji.transform},Os={test:Bm("hsl","hue"),parse:gS("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+qn.transform(ra(t))+", "+qn.transform(ra(n))+", "+ra(Fa.transform(r))+")"},ft={test:e=>ji.test(e)||Sp.test(e)||Os.test(e),parse:e=>ji.test(e)?ji.parse(e):Os.test(e)?Os.parse(e):Sp.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ji.transform(e):Os.transform(e)},yA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function xA(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match($m))==null?void 0:t.length)||0)+(((n=e.match(yA))==null?void 0:n.length)||0)>0}const vS="number",yS="color",wA="var",bA="var(",gy="${}",SA=/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 La(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(SA,l=>(ft.test(l)?(r.color.push(s),i.push(yS),n.push(ft.parse(l))):l.startsWith(bA)?(r.var.push(s),i.push(wA),n.push(l)):(r.number.push(s),i.push(vS),n.push(parseFloat(l))),++s,gy)).split(gy);return{values:n,split:a,indexes:r,types:i}}function xS(e){return La(e).values}function wS(e){const{split:t,types:n}=La(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===vS?s+=ra(i[o]):a===yS?s+=ft.transform(i[o]):s+=i[o]}return s}}const kA=e=>typeof e=="number"?0:e;function CA(e){const t=xS(e);return wS(e)(t.map(kA))}const si={test:xA,parse:xS,createTransformer:wS,getAnimatableNone:CA},TA=new Set(["brightness","contrast","saturate","opacity"]);function EA(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match($m)||[];if(!r)return e;const i=n.replace(r,"");let s=TA.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const _A=/\b([a-z-]*)\(.*?\)/gu,kp={...si,getAnimatableNone:e=>{const t=e.match(_A);return t?t.map(EA).join(" "):e}},jA={...Pm,color:ft,backgroundColor:ft,outlineColor:ft,fill:ft,stroke:ft,borderColor:ft,borderTopColor:ft,borderRightColor:ft,borderBottomColor:ft,borderLeftColor:ft,filter:kp,WebkitFilter:kp},bS=e=>jA[e];function SS(e,t){let n=bS(e);return n!==kp&&(n=si),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const PA=new Set(["auto","none","0"]);function AA(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!PA.has(s)&&La(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=SS(n,i)}const Pi=e=>e*180/Math.PI,Cp=e=>{const t=Pi(Math.atan2(e[1],e[0]));return Tp(t)},RA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Cp,rotateZ:Cp,skewX:e=>Pi(Math.atan(e[1])),skewY:e=>Pi(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Tp=e=>(e=e%360,e<0&&(e+=360),e),vy=Cp,yy=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),xy=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),OA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:yy,scaleY:xy,scale:e=>(yy(e)+xy(e))/2,rotateX:e=>Tp(Pi(Math.atan2(e[6],e[5]))),rotateY:e=>Tp(Pi(Math.atan2(-e[2],e[0]))),rotateZ:vy,rotate:vy,skewX:e=>Pi(Math.atan(e[4])),skewY:e=>Pi(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function wy(e){return e.includes("scale")?1:0}function Ep(e,t){if(!e||e==="none")return wy(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=OA,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=RA,i=a}if(!i)return wy(t);const s=r[t],o=i[1].split(",").map(MA);return typeof s=="function"?s(o):o[s]}const DA=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Ep(n,t)};function MA(e){return parseFloat(e.trim())}const by=e=>e===Co||e===Z,FA=new Set(["x","y","z"]),NA=ko.filter(e=>!FA.has(e));function LA(e){const t=[];return NA.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const po={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})=>Ep(t,"x"),y:(e,{transform:t})=>Ep(t,"y")};po.translateX=po.x;po.translateY=po.y;const zi=new Set;let _p=!1,jp=!1;function kS(){if(jp){const e=Array.from(zi).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=LA(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)})}jp=!1,_p=!1,zi.forEach(e=>e.complete()),zi.clear()}function CS(){zi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(jp=!0)})}function IA(){CS(),kS()}class zm{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?(zi.add(this),_p||(_p=!0,ke.read(CS),ke.resolveKeyframes(kS))):(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),zi.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,zi.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const TS=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),$A=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function BA(e){const t=$A.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function ES(e,t,n=1){const[r,i]=BA(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return TS(o)?parseFloat(o):o}return jm(i)?ES(i,t,n+1):i}const _S=e=>t=>t.test(e),zA={test:e=>e==="auto",parse:e=>e},jS=[Co,Z,qn,Cr,IP,LP,zA],Sy=e=>jS.find(_S(e));class PS extends zm{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(),jm(u))){const d=ES(u,n.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!sS.has(r)||t.length!==2)return;const[i,s]=t,o=Sy(i),a=Sy(s);if(o!==a)if(by(o)&&by(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++)pA(t[i])&&r.push(i);r.length&&AA(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=po[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]=po[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 ky=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(si.test(e)||e==="0")&&!e.startsWith("url("));function VA(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 UA(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=ky(i,t),a=ky(s,t);return!o||!a?!1:VA(e)||(n==="spring"||xm(n))&&r}const HA=e=>e!==null;function Ec(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(HA),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const WA=40;class AS{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=Wn.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>WA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&IA(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Wn.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!UA(t,r,i,s))if(o)this.options.duration=0;else{l&&l(Ec(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},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 Ae=(e,t,n)=>e+(t-e)*n;function Od(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 qA({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=Od(l,a,e+1/3),s=Od(l,a,e),o=Od(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function Hu(e,t){return n=>n>0?t:e}const Dd=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},GA=[Sp,ji,Os],QA=e=>GA.find(t=>t.test(e));function Cy(e){const t=QA(e);if(!t)return!1;let n=t.parse(e);return t===Os&&(n=qA(n)),n}const Ty=(e,t)=>{const n=Cy(e),r=Cy(t);if(!n||!r)return Hu(e,t);const i={...n};return s=>(i.red=Dd(n.red,r.red,s),i.green=Dd(n.green,r.green,s),i.blue=Dd(n.blue,r.blue,s),i.alpha=Ae(n.alpha,r.alpha,s),ji.transform(i))},YA=(e,t)=>n=>t(e(n)),rl=(...e)=>e.reduce(YA),Pp=new Set(["none","hidden"]);function KA(e,t){return Pp.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function XA(e,t){return n=>Ae(e,t,n)}function Vm(e){return typeof e=="number"?XA:typeof e=="string"?jm(e)?Hu:ft.test(e)?Ty:eR:Array.isArray(e)?RS:typeof e=="object"?ft.test(e)?Ty:ZA:Hu}function RS(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>Vm(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function ZA(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Vm(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function JA(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 eR=(e,t)=>{const n=si.createTransformer(t),r=La(e),i=La(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?Pp.has(e)&&!i.values.length||Pp.has(t)&&!r.values.length?KA(e,t):rl(RS(JA(r,i),i.values),n):Hu(e,t)};function OS(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ae(e,t,n):Vm(e)(e,t)}const tR=5;function DS(e,t,n){const r=Math.max(t-tR,0);return Mb(n-e(r),t-r)}const Fe={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},Md=.001;function nR({duration:e=Fe.duration,bounce:t=Fe.bounce,velocity:n=Fe.velocity,mass:r=Fe.mass}){let i,s,o=1-t;o=mr(Fe.minDamping,Fe.maxDamping,o),e=mr(Fe.minDuration,Fe.maxDuration,Hn(e)),o<1?(i=u=>{const d=u*o,c=d*e,f=d-n,h=Ap(u,o),m=Math.exp(-c);return Md-f/h*m},s=u=>{const c=u*o*e,f=c*n+n,h=Math.pow(o,2)*Math.pow(u,2)*e,m=Math.exp(-c),p=Ap(Math.pow(u,2),o);return(-i(u)+Md>0?-1:1)*((f-h)*m)/p}):(i=u=>{const d=Math.exp(-u*e),c=(u-n)*e+1;return-Md+d*c},s=u=>{const d=Math.exp(-u*e),c=(n-u)*(e*e);return d*c});const a=5/e,l=iR(i,s,a);if(e=Un(e),isNaN(l))return{stiffness:Fe.stiffness,damping:Fe.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const rR=12;function iR(e,t,n){let r=n;for(let i=1;i<rR;i++)r=r-e(r)/t(r);return r}function Ap(e,t){return e*Math.sqrt(1-t*t)}const sR=["duration","bounce"],oR=["stiffness","damping","mass"];function Ey(e,t){return t.some(n=>e[n]!==void 0)}function aR(e){let t={velocity:Fe.velocity,stiffness:Fe.stiffness,damping:Fe.damping,mass:Fe.mass,isResolvedFromDuration:!1,...e};if(!Ey(e,oR)&&Ey(e,sR))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*mr(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Fe.mass,stiffness:i,damping:s}}else{const n=nR(e);t={...t,...n,mass:Fe.mass},t.isResolvedFromDuration=!0}return t}function Wu(e=Fe.visualDuration,t=Fe.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:d,duration:c,velocity:f,isResolvedFromDuration:h}=aR({...n,velocity:-Hn(n.velocity||0)}),m=f||0,p=u/(2*Math.sqrt(l*d)),w=o-s,g=Hn(Math.sqrt(l/d)),x=Math.abs(w)<5;r||(r=x?Fe.restSpeed.granular:Fe.restSpeed.default),i||(i=x?Fe.restDelta.granular:Fe.restDelta.default);let b;if(p<1){const E=Ap(g,p);b=C=>{const _=Math.exp(-p*g*C);return o-_*((m+p*g*w)/E*Math.sin(E*C)+w*Math.cos(E*C))}}else if(p===1)b=E=>o-Math.exp(-g*E)*(w+(m+g*w)*E);else{const E=g*Math.sqrt(p*p-1);b=C=>{const _=Math.exp(-p*g*C),A=Math.min(E*C,300);return o-_*((m+p*g*w)*Math.sinh(A)+E*w*Math.cosh(A))/E}}const T={calculatedDuration:h&&c||null,next:E=>{const C=b(E);if(h)a.done=E>=c;else{let _=0;p<1&&(_=E===0?Un(m):DS(b,E,C));const A=Math.abs(_)<=r,F=Math.abs(o-C)<=i;a.done=A&&F}return a.value=a.done?o:C,a},toString:()=>{const E=Math.min(bm(T),Vu),C=Fb(_=>T.next(E*_).value,E,30);return E+"ms "+C},toTransition:()=>{}};return T}Wu.applyToOptions=e=>{const t=sP(e,100,Wu);return e.ease=Ra()?t.ease:"easeOut",e.duration=Un(t.duration),e.type="keyframes",e};function _y({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:d}){const c=e[0],f={done:!1,value:c},h=A=>a!==void 0&&A<a||l!==void 0&&A>l,m=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let p=n*t;const w=c+p,g=o===void 0?w:o(w);g!==w&&(p=g-c);const x=A=>-p*Math.exp(-A/r),b=A=>g+x(A),T=A=>{const F=x(A),M=b(A);f.done=Math.abs(F)<=u,f.value=f.done?g:M};let E,C;const _=A=>{h(f.value)&&(E=A,C=Wu({keyframes:[f.value,m(f.value)],velocity:DS(b,A,f.value),damping:i,stiffness:s,restDelta:u,restSpeed:d}))};return _(0),{calculatedDuration:null,next:A=>{let F=!1;return!C&&E===void 0&&(F=!0,T(A),_(A)),E!==void 0&&A>=E?C.next(A-E):(!F&&T(A),f)}}}const lR=nl(.42,0,1,1),uR=nl(0,0,.58,1),MS=nl(.42,0,.58,1),cR=e=>Array.isArray(e)&&typeof e[0]!="number",jy={linear:un,easeIn:lR,easeInOut:MS,easeOut:uR,circIn:Im,circInOut:hS,circOut:pS,backIn:Lm,backInOut:dS,backOut:cS,anticipate:fS},Py=e=>{if(ym(e)){vp(e.length===4);const[t,n,r,i]=e;return nl(t,n,r,i)}else if(typeof e=="string")return vp(jy[e]!==void 0),jy[e];return e};function dR(e,t,n){const r=[],i=n||OS,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]||un:t;a=rl(l,a)}r.push(a)}return r}function fR(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(vp(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=dR(t,r,i),l=a.length,u=d=>{if(o&&d<e[0])return t[0];let c=0;if(l>1)for(;c<e.length-2&&!(d<e[c+1]);c++);const f=Aa(e[c],e[c+1],d);return a[c](f)};return n?d=>u(mr(e[0],e[s-1],d)):u}function pR(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Aa(0,t,r);e.push(Ae(n,1,i))}}function hR(e){const t=[0];return pR(t,e.length-1),t}function mR(e,t){return e.map(n=>n*t)}function gR(e,t){return e.map(()=>t||MS).splice(0,e.length-1)}function qu({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=cR(r)?r.map(Py):Py(r),s={done:!1,value:t[0]},o=mR(n&&n.length===t.length?n:hR(t),e),a=fR(o,t,{ease:Array.isArray(i)?i:gR(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const vR=e=>{const t=({timestamp:n})=>e(n);return{start:()=>ke.update(t,!0),stop:()=>ii(t),now:()=>st.isProcessing?st.timestamp:Wn.now()}},yR={decay:_y,inertia:_y,tween:qu,keyframes:qu,spring:Wu},xR=e=>e/100;class Um extends AS{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)||zm,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=xm(n)?n:yR[n]||qu;let l,u;a!==qu&&typeof t[0]!="number"&&(l=rl(xR,OS(t[0],t[1])),t=[0,100]);const d=a({...this.options,keyframes:t});s==="mirror"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),d.calculatedDuration===null&&(d.calculatedDuration=bm(d));const{calculatedDuration:c}=d,f=c+i,h=f*(r+1)-i;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:c,resolvedDuration:f,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:A}=this.options;return{done:!0,value:A[A.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:d,resolvedDuration:c}=r;if(this.startTime===null)return s.next(0);const{delay:f,repeat:h,repeatType:m,repeatDelay:p,onUpdate:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/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 g=this.currentTime-f*(this.speed>=0?1:-1),x=this.speed>=0?g<0:g>d;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let b=this.currentTime,T=s;if(h){const A=Math.min(this.currentTime,d)/c;let F=Math.floor(A),M=A%1;!M&&A>=1&&(M=1),M===1&&F--,F=Math.min(F,h+1),!!(F%2)&&(m==="reverse"?(M=1-M,p&&(M-=p/c)):m==="mirror"&&(T=o)),b=mr(0,1,M)*c}const E=x?{done:!1,value:l[0]}:T.next(b);a&&(E.value=a(E.value));let{done:C}=E;!x&&u!==null&&(C=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const _=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return _&&i!==void 0&&(E.value=Ec(l,this.options,i)),w&&w(E.value),_&&this.finish(),E}get duration(){const{resolved:t}=this;return t?Hn(t.calculatedDuration):0}get time(){return Hn(this.currentTime)}set time(t){t=Un(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=Hn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=vR,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 wR=new Set(["opacity","clipPath","filter","transform"]),bR=gm(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Gu=10,SR=2e4;function kR(e){return xm(e.type)||e.type==="spring"||!Lb(e.ease)}function CR(e,t){const n=new Um({...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<SR;)r=n.sample(s),i.push(r.value),s+=Gu;return{times:void 0,keyframes:i,duration:s-Gu,ease:"linear"}}const FS={anticipate:fS,backInOut:dS,circInOut:hS};function TR(e){return e in FS}class Ay extends AS{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new PS(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"&&Ra()&&TR(s)&&(s=FS[s]),kR(this.options)){const{onComplete:c,onUpdate:f,motionValue:h,element:m,...p}=this.options,w=CR(t,p);t=w.keyframes,t.length===1&&(t[1]=t[0]),r=w.duration,i=w.times,s=w.ease,o="keyframes"}const d=iP(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:s});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(iy(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:c}=this.options;a.set(Ec(t,this.options,n)),c&&c(),this.cancel(),this.resolveFinishedPromise()},{animation:d,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 Hn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Hn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Un(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 un;const{animation:r}=n;iy(r,t)}return un}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:d,onComplete:c,element:f,...h}=this.options,m=new Um({...h,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),p=Un(this.time);u.setWithVelocity(m.sample(p-Gu).value,m.sample(p).value,Gu)}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 bR()&&r&&wR.has(r)&&(r!=="transform"||!u)&&!l&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const ER={type:"spring",stiffness:500,damping:25,restSpeed:10},_R=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),jR={type:"keyframes",duration:.8},PR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},AR=(e,{keyframes:t})=>t.length>2?jR:is.has(e)?e.startsWith("scale")?_R(t[1]):ER:PR;function RR({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:u,...d}){return!!Object.keys(d).length}const Hm=(e,t,n,r={},i,s)=>o=>{const a=wm(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Un(l);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};RR(a)||(d={...d,...AR(e,d)}),d.duration&&(d.duration=Un(d.duration)),d.repeatDelay&&(d.repeatDelay=Un(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let c=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(c=!0)),d.allowFlatten=!a.type&&!a.ease,c&&!s&&t.get()!==void 0){const f=Ec(d.keyframes,a);if(f!==void 0)return ke.update(()=>{d.onUpdate(f),d.onComplete()}),new tP([])}return!s&&Ay.supports(d)?new Ay(d):new Um(d)};function OR({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function NS(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 d in a){const c=e.getValue(d,e.latestValues[d]??null),f=a[d];if(f===void 0||u&&OR(u,d))continue;const h={delay:n,...wm(s||{},d)};let m=!1;if(window.MotionHandoffAnimation){const w=oS(e);if(w){const g=window.MotionHandoffAnimation(w,d,ke);g!==null&&(h.startTime=g,m=!0)}}bp(e,d),c.start(Hm(d,c,f,e.shouldReduceMotion&&sS.has(d)?{type:!1}:h,e,m));const p=c.animation;p&&l.push(p)}return o&&Promise.all(l).then(()=>{ke.update(()=>{o&&lA(e,o)})}),l}function Rp(e,t,n={}){var l;const r=Na(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(NS(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:c,staggerDirection:f}=i;return DR(e,t,d+u,c,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,d]=a==="beforeChildren"?[s,o]:[o,s];return u().then(()=>d())}else return Promise.all([s(),o(n.delay)])}function DR(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(MR).forEach((u,d)=>{u.notify("AnimationStart",t),o.push(Rp(u,t,{...s,delay:n+l(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function MR(e,t){return e.sortNodePosition(t)}function FR(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Rp(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Rp(e,t,n);else{const i=typeof t=="function"?Na(e,t,n.custom):t;r=Promise.all(NS(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function LS(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 NR=Tm.length;function IS(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?IS(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<NR;n++){const r=Tm[n],i=e.props[r];(Da(i)||i===!1)&&(t[r]=i)}return t}const LR=[...Cm].reverse(),IR=Cm.length;function $R(e){return t=>Promise.all(t.map(({animation:n,options:r})=>FR(e,n,r)))}function BR(e){let t=$R(e),n=Ry(),r=!0;const i=l=>(u,d)=>{var f;const c=Na(e,d,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(c){const{transition:h,transitionEnd:m,...p}=c;u={...u,...p,...m}}return u};function s(l){t=l(e)}function o(l){const{props:u}=e,d=IS(e.parent)||{},c=[],f=new Set;let h={},m=1/0;for(let w=0;w<IR;w++){const g=LR[w],x=n[g],b=u[g]!==void 0?u[g]:d[g],T=Da(b),E=g===l?x.isActive:null;E===!1&&(m=w);let C=b===d[g]&&b!==u[g]&&T;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),x.protectedKeys={...h},!x.isActive&&E===null||!b&&!x.prevProp||Cc(b)||typeof b=="boolean")continue;const _=zR(x.prevProp,b);let A=_||g===l&&x.isActive&&!C&&T||w>m&&T,F=!1;const M=Array.isArray(b)?b:[b];let R=M.reduce(i(g),{});E===!1&&(R={});const{prevResolvedValues:$={}}=x,U={...$,...R},Y=ne=>{A=!0,f.has(ne)&&(F=!0,f.delete(ne)),x.needsAnimating[ne]=!0;const j=e.getValue(ne);j&&(j.liveStyle=!1)};for(const ne in U){const j=R[ne],D=$[ne];if(h.hasOwnProperty(ne))continue;let B=!1;wp(j)&&wp(D)?B=!LS(j,D):B=j!==D,B?j!=null?Y(ne):f.add(ne):j!==void 0&&f.has(ne)?Y(ne):x.protectedKeys[ne]=!0}x.prevProp=b,x.prevResolvedValues=R,x.isActive&&(h={...h,...R}),r&&e.blockInitialAnimation&&(A=!1),A&&(!(C&&_)||F)&&c.push(...M.map(ne=>({animation:ne,options:{type:g}})))}if(f.size){const w={};if(typeof u.initial!="boolean"){const g=Na(e,Array.isArray(u.initial)?u.initial[0]:u.initial);g&&g.transition&&(w.transition=g.transition)}f.forEach(g=>{const x=e.getBaseTarget(g),b=e.getValue(g);b&&(b.liveStyle=!0),w[g]=x??null}),c.push({animation:w})}let p=!!c.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,p?t(c):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=e.variantChildren)==null||c.forEach(f=>{var h;return(h=f.animationState)==null?void 0:h.setActive(l,u)}),n[l].isActive=u;const d=o(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Ry(),r=!0}}}function zR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!LS(t,e):!1}function vi(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ry(){return{animate:vi(!0),whileInView:vi(),whileHover:vi(),whileTap:vi(),whileDrag:vi(),whileFocus:vi(),exit:vi()}}class ci{constructor(t){this.isMounted=!1,this.node=t}update(){}}class VR extends ci{constructor(t){super(t),t.animationState||(t.animationState=BR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Cc(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 UR=0;class HR extends ci{constructor(){super(...arguments),this.id=UR++}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 WR={animation:{Feature:VR},exit:{Feature:HR}};function Ia(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function il(e){return{point:{x:e.pageX,y:e.pageY}}}const qR=e=>t=>km(t)&&e(t,il(t));function ia(e,t,n,r){return Ia(e,t,qR(n),r)}function $S({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function GR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function QR(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 BS=1e-4,YR=1-BS,KR=1+BS,zS=.01,XR=0-zS,ZR=0+zS;function xt(e){return e.max-e.min}function JR(e,t,n){return Math.abs(e-t)<=n}function Oy(e,t,n,r=.5){e.origin=r,e.originPoint=Ae(t.min,t.max,e.origin),e.scale=xt(n)/xt(t),e.translate=Ae(n.min,n.max,e.origin)-e.originPoint,(e.scale>=YR&&e.scale<=KR||isNaN(e.scale))&&(e.scale=1),(e.translate>=XR&&e.translate<=ZR||isNaN(e.translate))&&(e.translate=0)}function sa(e,t,n,r){Oy(e.x,t.x,n.x,r?r.originX:void 0),Oy(e.y,t.y,n.y,r?r.originY:void 0)}function Dy(e,t,n){e.min=n.min+t.min,e.max=e.min+xt(t)}function eO(e,t,n){Dy(e.x,t.x,n.x),Dy(e.y,t.y,n.y)}function My(e,t,n){e.min=t.min-n.min,e.max=e.min+xt(t)}function oa(e,t,n){My(e.x,t.x,n.x),My(e.y,t.y,n.y)}const Fy=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ds=()=>({x:Fy(),y:Fy()}),Ny=()=>({min:0,max:0}),$e=()=>({x:Ny(),y:Ny()});function en(e){return[e("x"),e("y")]}function Fd(e){return e===void 0||e===1}function Op({scale:e,scaleX:t,scaleY:n}){return!Fd(e)||!Fd(t)||!Fd(n)}function bi(e){return Op(e)||VS(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function VS(e){return Ly(e.x)||Ly(e.y)}function Ly(e){return e&&e!=="0%"}function Qu(e,t,n){const r=e-n,i=t*r;return n+i}function Iy(e,t,n,r,i){return i!==void 0&&(e=Qu(e,i,r)),Qu(e,n,r)+t}function Dp(e,t=0,n=1,r,i){e.min=Iy(e.min,t,n,r,i),e.max=Iy(e.max,t,n,r,i)}function US(e,{x:t,y:n}){Dp(e.x,t.translate,t.scale,t.originPoint),Dp(e.y,n.translate,n.scale,n.originPoint)}const $y=.999999999999,By=1.0000000000001;function tO(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let a=0;a<i;a++){s=n[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Fs(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,US(e,o)),r&&bi(s.latestValues)&&Fs(e,s.latestValues))}t.x<By&&t.x>$y&&(t.x=1),t.y<By&&t.y>$y&&(t.y=1)}function Ms(e,t){e.min=e.min+t,e.max=e.max+t}function zy(e,t,n,r,i=.5){const s=Ae(e.min,e.max,i);Dp(e,t,n,s,r)}function Fs(e,t){zy(e.x,t.x,t.scaleX,t.scale,t.originX),zy(e.y,t.y,t.scaleY,t.scale,t.originY)}function HS(e,t){return $S(QR(e.getBoundingClientRect(),t))}function nO(e,t,n){const r=HS(e,n),{scroll:i}=t;return i&&(Ms(r.x,i.offset.x),Ms(r.y,i.offset.y)),r}const WS=({current:e})=>e?e.ownerDocument.defaultView:null,Vy=(e,t)=>Math.abs(e-t);function rO(e,t){const n=Vy(e.x,t.x),r=Vy(e.y,t.y);return Math.sqrt(n**2+r**2)}class qS{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=Ld(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,h=rO(c.offset,{x:0,y:0})>=3;if(!f&&!h)return;const{point:m}=c,{timestamp:p}=st;this.history.push({...m,timestamp:p});const{onStart:w,onMove:g}=this.handlers;f||(w&&w(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,c)},this.handlePointerMove=(c,f)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=Nd(f,this.transformPagePoint),ke.update(this.updatePoint,!0)},this.handlePointerUp=(c,f)=>{this.end();const{onEnd:h,onSessionEnd:m,resumeAnimation:p}=this.handlers;if(this.dragSnapToOrigin&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=Ld(c.type==="pointercancel"?this.lastMoveEventInfo:Nd(f,this.transformPagePoint),this.history);this.startEvent&&h&&h(c,w),m&&m(c,w)},!km(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=il(t),a=Nd(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=st;this.history=[{...l,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,Ld(a,this.history)),this.removeListeners=rl(ia(this.contextWindow,"pointermove",this.handlePointerMove),ia(this.contextWindow,"pointerup",this.handlePointerUp),ia(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ii(this.updatePoint)}}function Nd(e,t){return t?{point:t(e.point)}:e}function Uy(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ld({point:e},t){return{point:e,delta:Uy(e,GS(t)),offset:Uy(e,iO(t)),velocity:sO(t,.1)}}function iO(e){return e[0]}function GS(e){return e[e.length-1]}function sO(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=GS(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Un(t)));)n--;if(!r)return{x:0,y:0};const s=Hn(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 oO(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ae(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ae(n,e,r.max):Math.min(e,n)),e}function Hy(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 aO(e,{top:t,left:n,bottom:r,right:i}){return{x:Hy(e.x,n,i),y:Hy(e.y,t,r)}}function Wy(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 lO(e,t){return{x:Wy(e.x,t.x),y:Wy(e.y,t.y)}}function uO(e,t){let n=.5;const r=xt(e),i=xt(t);return i>r?n=Aa(t.min,t.max-r,e.min):r>i&&(n=Aa(e.min,e.max-i,t.min)),mr(0,1,n)}function cO(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 Mp=.35;function dO(e=Mp){return e===!1?e=0:e===!0&&(e=Mp),{x:qy(e,"left","right"),y:qy(e,"top","bottom")}}function qy(e,t,n){return{min:Gy(e,t),max:Gy(e,n)}}function Gy(e,t){return typeof e=="number"?e:e[t]||0}const fO=new WeakMap;class pO{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=$e(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=d=>{const{dragSnapToOrigin:c}=this.getProps();c?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(il(d).point)},s=(d,c)=>{const{drag:f,dragPropagation:h,onDragStart:m}=this.getProps();if(f&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=uP(f),!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),en(w=>{let g=this.getAxisMotionValue(w).get()||0;if(qn.test(g)){const{projection:x}=this.visualElement;if(x&&x.layout){const b=x.layout.layoutBox[w];b&&(g=xt(b)*(parseFloat(g)/100))}}this.originPoint[w]=g}),m&&ke.postRender(()=>m(d,c)),bp(this.visualElement,"transform");const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},o=(d,c)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:m,onDrag:p}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:w}=c;if(h&&this.currentDirection===null){this.currentDirection=hO(w),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",c.point,w),this.updateAxis("y",c.point,w),this.visualElement.render(),p&&p(d,c)},a=(d,c)=>this.stop(d,c),l=()=>en(d=>{var c;return this.getAnimationState(d)==="paused"&&((c=this.getAxisMotionValue(d).animation)==null?void 0:c.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new qS(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:WS(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&&ke.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||!Ml(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=oO(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&&Rs(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=aO(r.layoutBox,t):this.constraints=!1,this.elastic=dO(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&en(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=cO(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Rs(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=nO(r,i.root,this.visualElement.getTransformPagePoint());let o=lO(i.layout.layoutBox,s);if(n){const a=n(GR(o));this.hasMutatedConstraints=!!a,a&&(o=$S(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=en(d=>{if(!Ml(d,n,this.currentDirection))return;let c=l&&l[d]||{};o&&(c={min:0,max:0});const f=i?200:1e6,h=i?40:1e7,m={type:"inertia",velocity:r?t[d]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...c};return this.startAxisValueAnimation(d,m)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return bp(this.visualElement,t),r.start(Hm(t,r,0,n,this.visualElement,!1))}stopAnimation(){en(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){en(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){en(n=>{const{drag:r}=this.getProps();if(!Ml(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]-Ae(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Rs(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};en(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=uO({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(),en(o=>{if(!Ml(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(Ae(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;fO.set(this.visualElement,this);const t=this.visualElement.current,n=ia(t,"pointerdown",l=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Rs(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()),ke.read(r);const o=Ia(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(en(d=>{const c=this.getAxisMotionValue(d);c&&(this.originPoint[d]+=l[d].translate,c.set(c.get()+l[d].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=Mp,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Ml(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function hO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class mO extends ci{constructor(t){super(t),this.removeGroupControls=un,this.removeListeners=un,this.controls=new pO(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||un}unmount(){this.removeGroupControls(),this.removeListeners()}}const Qy=e=>(t,n)=>{e&&ke.postRender(()=>e(t,n))};class gO extends ci{constructor(){super(...arguments),this.removePointerDownListener=un}onPointerDown(t){this.session=new qS(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:WS(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Qy(t),onStart:Qy(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&ke.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=ia(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 iu={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Yy(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Lo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Z.test(e))e=parseFloat(e);else return e;const n=Yy(e,t.target.x),r=Yy(e,t.target.y);return`${n}% ${r}%`}},vO={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=si.parse(e);if(i.length>5)return r;const s=si.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=Ae(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 yO extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;NP(xO),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()})),iu.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()||ke.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Sm.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 QS(e){const[t,n]=Db(),r=v.useContext(dm);return y.jsx(yO,{...e,layoutGroup:r,switchLayoutGroup:v.useContext(qb),isPresent:t,safeToRemove:n})}const xO={borderRadius:{...Lo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Lo,borderTopRightRadius:Lo,borderBottomLeftRadius:Lo,borderBottomRightRadius:Lo,boxShadow:vO};function wO(e,t,n){const r=ht(e)?e:Oa(e);return r.start(Hm("",r,t,n)),r.animation}function bO(e){return e instanceof SVGElement&&e.tagName!=="svg"}const SO=(e,t)=>e.depth-t.depth;class kO{constructor(){this.children=[],this.isDirty=!1}add(t){hm(this.children,t),this.isDirty=!0}remove(t){mm(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(SO),this.isDirty=!1,this.children.forEach(t)}}function CO(e,t){const n=Wn.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(ii(r),e(s-t))};return ke.read(r,!0),()=>ii(r)}const YS=["TopLeft","TopRight","BottomLeft","BottomRight"],TO=YS.length,Ky=e=>typeof e=="string"?parseFloat(e):e,Xy=e=>typeof e=="number"||Z.test(e);function EO(e,t,n,r,i,s){i?(e.opacity=Ae(0,n.opacity??1,_O(r)),e.opacityExit=Ae(t.opacity??1,0,jO(r))):s&&(e.opacity=Ae(t.opacity??1,n.opacity??1,r));for(let o=0;o<TO;o++){const a=`border${YS[o]}Radius`;let l=Zy(t,a),u=Zy(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Xy(l)===Xy(u)?(e[a]=Math.max(Ae(Ky(l),Ky(u),r),0),(qn.test(u)||qn.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=Ae(t.rotate||0,n.rotate||0,r))}function Zy(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const _O=KS(0,.5,pS),jO=KS(.5,.95,un);function KS(e,t,n){return r=>r<e?0:r>t?1:n(Aa(e,t,r))}function Jy(e,t){e.min=t.min,e.max=t.max}function Zt(e,t){Jy(e.x,t.x),Jy(e.y,t.y)}function e0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function t0(e,t,n,r,i){return e-=t,e=Qu(e,1/n,r),i!==void 0&&(e=Qu(e,1/i,r)),e}function PO(e,t=0,n=1,r=.5,i,s=e,o=e){if(qn.test(t)&&(t=parseFloat(t),t=Ae(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=Ae(s.min,s.max,r);e===s&&(a-=t),e.min=t0(e.min,t,n,a,i),e.max=t0(e.max,t,n,a,i)}function n0(e,t,[n,r,i],s,o){PO(e,t[n],t[r],t[i],t.scale,s,o)}const AO=["x","scaleX","originX"],RO=["y","scaleY","originY"];function r0(e,t,n,r){n0(e.x,t,AO,n?n.x:void 0,r?r.x:void 0),n0(e.y,t,RO,n?n.y:void 0,r?r.y:void 0)}function i0(e){return e.translate===0&&e.scale===1}function XS(e){return i0(e.x)&&i0(e.y)}function s0(e,t){return e.min===t.min&&e.max===t.max}function OO(e,t){return s0(e.x,t.x)&&s0(e.y,t.y)}function o0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ZS(e,t){return o0(e.x,t.x)&&o0(e.y,t.y)}function a0(e){return xt(e.x)/xt(e.y)}function l0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class DO{constructor(){this.members=[]}add(t){hm(this.members,t),t.scheduleRender()}remove(t){if(mm(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 MO(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:d,rotateX:c,rotateY:f,skewX:h,skewY:m}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),c&&(r+=`rotateX(${c}deg) `),f&&(r+=`rotateY(${f}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 Id=["","X","Y","Z"],FO={visibility:"hidden"},u0=1e3;let NO=0;function $d(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function JS(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=oS(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ke,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&JS(r)}function ek({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=NO++,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($O),this.nodes.forEach(HO),this.nodes.forEach(WO),this.nodes.forEach(BO)},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 kO)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new vm),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=bO(o),this.instance=o;const{layoutId:l,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),e){let c;const f=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,c&&c(),c=CO(f,250),iu.hasAnimatedSinceResize&&(iu.hasAnimatedSinceResize=!1,this.nodes.forEach(d0))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||d.getDefaultTransition()||KO,{onLayoutAnimationStart:w,onLayoutAnimationComplete:g}=d.getProps(),x=!this.targetLayout||!ZS(this.targetLayout,m),b=!f&&h;if(this.options.layoutRoot||this.resumeFrom||b||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(c,b);const T={...wm(p,"layout"),onPlay:w,onComplete:g};(d.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else f||d0(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,ii(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(qO),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&&JS(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const c=this.path[d];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(c0);return}this.isUpdating||this.nodes.forEach(VO),this.isUpdating=!1,this.nodes.forEach(UO),this.nodes.forEach(LO),this.nodes.forEach(IO),this.clearAllSnapshots();const a=Wn.now();st.delta=mr(0,1e3/60,a-st.timestamp),st.timestamp=a,st.isProcessing=!0,Pd.update.process(st),Pd.preRender.process(st),Pd.render.process(st),st.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Sm.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(zO),this.sharedNodes.forEach(GO)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ke.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ke.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!xt(this.snapshot.measuredBox.x)&&!xt(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=$e(),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&&!XS(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;o&&(a||bi(this.latestValues)||d)&&(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)),XO(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return $e();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(ZO))){const{scroll:d}=this.root;d&&(Ms(a.x,d.offset.x),Ms(a.y,d.offset.y))}return a}removeElementScroll(o){var l;const a=$e();if(Zt(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:c,options:f}=d;d!==this.root&&c&&f.layoutScroll&&(c.wasRoot&&Zt(a,o),Ms(a.x,c.offset.x),Ms(a.y,c.offset.y))}return a}applyTransform(o,a=!1){const l=$e();Zt(l,o);for(let u=0;u<this.path.length;u++){const d=this.path[u];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Fs(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),bi(d.latestValues)&&Fs(l,d.latestValues)}return bi(this.latestValues)&&Fs(l,this.latestValues),l}removeTransform(o){const a=$e();Zt(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!bi(u.latestValues))continue;Op(u.latestValues)&&u.updateSnapshot();const d=$e(),c=u.measurePageBox();Zt(d,c),r0(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return bi(this.latestValues)&&r0(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!==st.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var f;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||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:c}=this.options;if(!(!this.layout||!(d||c))){if(this.resolvedRelativeTargetAt=st.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$e(),this.relativeTargetOrigin=$e(),oa(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=$e(),this.targetWithTransforms=$e()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),eO(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Zt(this.target,this.layout.layoutBox),US(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=$e(),this.relativeTargetOrigin=$e(),oa(this.relativeTargetOrigin,this.target,h.target),Zt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Op(this.parent.latestValues)||VS(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===st.timestamp&&(l=!1),l)return;const{layout:u,layoutId:d}=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||d))return;Zt(this.layoutCorrected,this.layout.layoutBox);const c=this.treeScale.x,f=this.treeScale.y;tO(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=$e());const{target:h}=o;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(e0(this.prevProjectionDelta.x,this.projectionDelta.x),e0(this.prevProjectionDelta.y,this.projectionDelta.y)),sa(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==c||this.treeScale.y!==f||!l0(this.projectionDelta.x,this.prevProjectionDelta.x)||!l0(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=Ds(),this.projectionDelta=Ds(),this.projectionDeltaWithTransform=Ds()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},d={...this.latestValues},c=Ds();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=$e(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,p=h!==m,w=this.getStack(),g=!w||w.members.length<=1,x=!!(p&&!g&&this.options.crossfade===!0&&!this.path.some(YO));this.animationProgress=0;let b;this.mixTargetDelta=T=>{const E=T/1e3;f0(c.x,o.x,E),f0(c.y,o.y,E),this.setTargetDelta(c),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(oa(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),QO(this.relativeTarget,this.relativeTargetOrigin,f,E),b&&OO(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=$e()),Zt(b,this.relativeTarget)),p&&(this.animationValues=d,EO(d,u,this.latestValues,E,x,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},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&&(ii(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ke.update(()=>{iu.hasAnimatedSinceResize=!0,this.currentAnimation=wO(0,u0,{...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(u0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:d}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&tk(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||$e();const c=xt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+c;const f=xt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}Zt(a,l),Fs(a,d),sa(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new DO),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&&$d("z",o,u,this.animationValues);for(let d=0;d<Id.length;d++)$d(`rotate${Id[d]}`,o,u,this.animationValues),$d(`skew${Id[d]}`,o,u,this.animationValues);o.render();for(const d in u)o.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);o.scheduleRender()}getProjectionStyles(o){if(!this.instance||this.isSVG)return;if(!this.isVisible)return FO;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=ru(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=ru(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!bi(this.latestValues)&&(h.transform=l?l({},""):"none",this.hasProjected=!1),h}const d=u.animationValues||u.latestValues;this.applyTransformsToTarget(),a.transform=MO(this.projectionDeltaWithTransform,this.treeScale,d),l&&(a.transform=l(d,a.transform));const{x:c,y:f}=this.projectionDelta;a.transformOrigin=`${c.origin*100}% ${f.origin*100}% 0`,u.animationValues?a.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:a.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const h in Ma){if(d[h]===void 0)continue;const{correct:m,applyTo:p,isCSSVariable:w}=Ma[h],g=a.transform==="none"?d[h]:m(d[h],u);if(p){const x=p.length;for(let b=0;b<x;b++)a[p[b]]=g}else w?this.options.visualElement.renderState.vars[h]=g:a[h]=g}return this.options.layoutId&&(a.pointerEvents=u===this?ru(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(c0),this.root.sharedNodes.clear()}}}function LO(e){e.updateLayout()}function IO(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"?en(c=>{const f=o?t.measuredBox[c]:t.layoutBox[c],h=xt(f);f.min=r[c].min,f.max=f.min+h}):tk(s,t.layoutBox,r)&&en(c=>{const f=o?t.measuredBox[c]:t.layoutBox[c],h=xt(r[c]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+h)});const a=Ds();sa(a,r,t.layoutBox);const l=Ds();o?sa(l,e.applyTransform(i,!0),t.measuredBox):sa(l,r,t.layoutBox);const u=!XS(a);let d=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:f,layout:h}=c;if(f&&h){const m=$e();oa(m,t.layoutBox,f.layoutBox);const p=$e();oa(p,r,h.layoutBox),ZS(m,p)||(d=!0),c.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=m,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function $O(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 BO(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function zO(e){e.clearSnapshot()}function c0(e){e.clearMeasurements()}function VO(e){e.isLayoutDirty=!1}function UO(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function d0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function HO(e){e.resolveTargetDelta()}function WO(e){e.calcProjection()}function qO(e){e.resetSkewAndRotation()}function GO(e){e.removeLeadSnapshot()}function f0(e,t,n){e.translate=Ae(t.translate,0,n),e.scale=Ae(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function p0(e,t,n,r){e.min=Ae(t.min,n.min,r),e.max=Ae(t.max,n.max,r)}function QO(e,t,n,r){p0(e.x,t.x,n.x,r),p0(e.y,t.y,n.y,r)}function YO(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const KO={duration:.45,ease:[.4,0,.1,1]},h0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),m0=h0("applewebkit/")&&!h0("chrome/")?Math.round:un;function g0(e){e.min=m0(e.min),e.max=m0(e.max)}function XO(e){g0(e.x),g0(e.y)}function tk(e,t,n){return e==="position"||e==="preserve-aspect"&&!JR(a0(t),a0(n),.2)}function ZO(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const JO=ek({attachResizeListener:(e,t)=>Ia(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Bd={current:void 0},nk=ek({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Bd.current){const e=new JO({});e.mount(window),e.setOptions({layoutScroll:!0}),Bd.current=e}return Bd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),e3={pan:{Feature:gO},drag:{Feature:mO,ProjectionNode:nk,MeasureLayout:QS}};function v0(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&&ke.postRender(()=>s(t,il(t)))}class t3 extends ci{mount(){const{current:t}=this.node;t&&(this.unmount=dP(t,(n,r)=>(v0(this.node,r,"Start"),i=>v0(this.node,i,"End"))))}unmount(){}}class n3 extends ci{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=rl(Ia(this.node.current,"focus",()=>this.onFocus()),Ia(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function y0(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&&ke.postRender(()=>s(t,il(t)))}class r3 extends ci{mount(){const{current:t}=this.node;t&&(this.unmount=mP(t,(n,r)=>(y0(this.node,r,"Start"),(i,{success:s})=>y0(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Fp=new WeakMap,zd=new WeakMap,i3=e=>{const t=Fp.get(e.target);t&&t(e)},s3=e=>{e.forEach(i3)};function o3({root:e,...t}){const n=e||document;zd.has(n)||zd.set(n,{});const r=zd.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(s3,{root:e,...t})),r[i]}function a3(e,t,n){const r=o3(t);return Fp.set(e,n),r.observe(e),()=>{Fp.delete(e),r.unobserve(e)}}const l3={some:0,all:1};class u3 extends ci{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:l3[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:d,onViewportLeave:c}=this.node.getProps(),f=u?d:c;f&&f(l)};return a3(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(c3(t,n))&&this.startObserver()}unmount(){}}function c3({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const d3={inView:{Feature:u3},tap:{Feature:r3},focus:{Feature:n3},hover:{Feature:t3}},f3={layout:{ProjectionNode:nk,MeasureLayout:QS}},Np={current:null},rk={current:!1};function p3(){if(rk.current=!0,!!fm)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Np.current=e.matches;e.addListener(t),t()}else Np.current=!1}const h3=[...jS,ft,si],m3=e=>h3.find(_S(e)),g3=new WeakMap;function v3(e,t,n){for(const r in t){const i=t[r],s=n[r];if(ht(i))e.addValue(r,i);else if(ht(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 x0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class y3{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=zm,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=Wn.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,ke.render(this.render,!1,!0))};const{latestValues:l,renderState:u,onUpdate:d}=o;this.onUpdate=d,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=Tc(n),this.isVariantNode=Hb(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const m=f[h];l[h]!==void 0&&ht(m)&&m.set(l[h],!1)}}mount(t){this.current=t,g3.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)),rk.current||p3(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Np.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ii(this.notifyUpdate),ii(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=is.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&ke.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 fo){const n=fo[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):$e()}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<x0.length;r++){const i=x0[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=v3(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"&&(TS(r)||mS(r))?r=parseFloat(r):!m3(r)&&si.test(n)&&(r=SS(t,n)),this.setBaseTarget(t,ht(r)?r.get():r)),ht(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=Fm(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&&!ht(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 vm),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class ik extends y3{constructor(){super(...arguments),this.KeyframeResolver=PS}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;ht(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function x3(e){return window.getComputedStyle(e)}class w3 extends ik{constructor(){super(...arguments),this.type="html",this.renderInstance=tS}readValueFromInstance(t,n){if(is.has(n))return DA(t,n);{const r=x3(t),i=(_m(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return HS(t,n)}build(t,n,r){Am(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Nm(t,n,r)}}class b3 extends ik{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=$e,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&eS(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(is.has(n)){const r=bS(n);return r&&r.default||0}return n=nS.has(n)?n:Em(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return iS(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&ke.postRender(this.updateDimensions)}build(t,n,r){Dm(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){rS(t,n,r,i)}mount(t){this.isSVGTag=Mm(t.tagName),super.mount(t)}}const S3=(e,t)=>Om(e)?new b3(t):new w3(t,{allowProjection:e!==v.Fragment}),k3=oA({...WR,...d3,...e3,...f3},S3),he=SP(k3);class C3{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}}const T3=()=>new C3;function E3(){return bc(T3)}var _r=(e=>(e.None="none",e.Sm="sm",e.Md="md",e.Lg="lg",e.Xl="xl",e.Full="full",e))(_r||{});const sk=v.createContext({}),_3={[Q.TooltipDefault]:"Bizimle sohbet edin!",[Q.TooltipActive]:"Yeni mesajlar var!",[Q.CloseButtonAria]:"Kapat",[Q.MessagePlaceholder]:"Mesajınızı yazın",[Q.FileUploadDisabled]:"Dosya gönderim izniniz olmadığı için yükleyemezsiniz",[Q.NewMessagesNotification]:"Yeni mesajlar var!",[Q.ChatCloseConfirm]:"Sohbeti kapatmak istediğinizden emin misiniz?",[Q.ChatCloseWarning]:"Bu işlem geri alınamaz.",[Q.ChatSettings]:"Sohbet Ayarları",[Q.ChatEndConversation]:"Sohbeti Sonlandır",[Q.CancelAction]:"Vazgeç",[Q.CloseAction]:"Kapat",[Q.QuickActions]:"Hızlı işlemler",[Q.GreetingStartChat]:"Sohbete başla",[Q.RateLimitMessage]:"Çok fazla mesaj gönderdiniz. Lütfen {seconds} saniye bekleyin.",[Q.RatingHeaderEvaluate]:"Görüşmenizi Değerlendirin",[Q.RatingHeaderThanks]:"Teşekkürler!",[Q.RatingDescription]:"Lütfen hizmetimizi değerlendirin. Görüşleriniz bizim için önemli.",[Q.RatingRateConversation]:"Görüşmeyi puanlayın",[Q.RatingComment]:"Yorumunuz (İsteğe bağlı)",[Q.RatingCommentPlaceholder]:"Görüşme hakkında düşüncelerinizi paylaşın...",[Q.RatingSubmit]:"Değerlendirmeyi Gönder",[Q.RatingNewConversation]:"Yeni Görüşme Başlat",[Q.RatingThankYouTitle]:"Değerlendirmeniz için teşekkürler!",[Q.RatingThankYouDescription]:"Geri bildiriminiz bizim için çok değerli.",[Q.RatingCountdown]:"Ekran {seconds} saniye içinde kapanacaktır.",[Q.RatingMinimumError]:"Lütfen en az 1 yıldız seçiniz.",[Q.RatingYourScore]:"Puanınız: {score}",[Q.PoweredBy]:"Powered by"},j3={[k.Background]:"#ffffff",[k.Border]:"#e2e8f0",[k.TooltipText]:"#1e40af",[k.TooltipBackground]:"#dbeafe",[k.TooltipBorder]:"#3b82f6",[k.HeaderBackground]:"#2563eb",[k.HeaderBorder]:"#e2e8f0",[k.HeaderText]:"#ffffff",[k.FooterBackground]:"#f8fafc",[k.FooterBorder]:"#e2e8f0",[k.FooterText]:"#475569",[k.MessageAdminBackground]:"#f1f5f9",[k.MessageAdminText]:"#334155",[k.MessageVisitorBackground]:"#3b82f6",[k.MessageVisitorText]:"#ffffff",[k.GreeterBackground]:"#ffffff",[k.GreeterText]:"#334155",[k.GreeterBorder]:"#e2e8f0",[k.GreeterTopBackground]:"linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%)",[k.GreeterTopText]:"#ffffff",[k.GreeterButtonBackground]:"#4f46e5",[k.GreeterButtonText]:"#ffffff",[k.ButtonBackground]:"#4f46e5",[k.ButtonText]:"#ffffff",[k.InputBackground]:"#ffffff",[k.InputText]:"#1e293b",[k.InputBorder]:"#e2e8f0",[k.CloseButtonBackground]:"#f1f5f9",[k.CloseButtonText]:"#475569",[k.CloseButtonHover]:"#e2e8f0",[k.IconColor]:"#64748b",[k.IconBackground]:"transparent",[k.ErrorBackground]:"#fef2f2",[k.ErrorText]:"#dc2626",[k.ErrorBorder]:"#fca5a5",[k.SuccessBackground]:"#f0fdf4",[k.SuccessText]:"#16a34a",[k.SuccessBorder]:"#86efac",[k.WarningBackground]:"#fffbeb",[k.WarningText]:"#d97706",[k.WarningBorder]:"#fcd34d",[k.LinkColor]:"#2563eb",[k.LinkHoverColor]:"#1d4ed8",[k.DividerColor]:"#e2e8f0",[k.ShadowColor]:"rgba(0, 0, 0, 0.1)",[k.StarActiveColor]:"#3b82f6",[k.StarInactiveColor]:"#e2e8f0",[k.ModalOverlayColor]:"rgba(0, 0, 0, 0.4)",[k.ChatCloseConfirmText]:"#dc2626",[k.RatingHeaderBackground]:"#4F46E5",[k.RatingHeaderText]:"#ffffff",[k.RatingSuccessBackground]:"#ffffff",[k.RatingSuccessText]:"#334155",[k.RatingRateConversationText]:"#1e293b"},P3={[_r.None]:"0px",[_r.Sm]:"var(--radius-xs)",[_r.Md]:"var(--radius-sm)",[_r.Lg]:"var(--radius-md)",[_r.Xl]:"var(--radius-lg)",[_r.Full]:"calc(infinity * 1px)"},A3=e=>{const t={..._3};if(!e||!e.appearance||!e.appearance.design||!e.appearance.design.texts)return t;for(const n in e.appearance.design.texts){const r=n;e.appearance.design.texts[r]&&(t[r]=e.appearance.design.texts[r])}return t},R3=e=>{const t={...j3};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 O3({children:e,widget:t}){const n=R3(t),r=A3(t),i=t&&t.appearance&&t.appearance.design&&t.appearance.design.border_radius?t.appearance.design.border_radius:_r.Md,s=l=>n[l],o=l=>r[l],a=()=>P3[i];return y.jsx(sk.Provider,{value:{colors:n,texts:r,getColor:s,getText:o,getRadius:a},children:e})}const De=()=>v.useContext(sk),sl=()=>De().getText;function Ot({children:e,type:t="button",variant:n="primary",kind:r="solid",size:i="md",disabled:s=!1,rounded:o=!1,className:a,style:l,textKey:u=k.ButtonText,bgKey:d=k.ButtonBackground,animations:c={},withoutTheming:f,...h}){const m=De();return y.jsx(he.button,{type:t,className:ve("flex items-center justify-center focus:!ring-0 font-medium",{"rounded-full":o&&i!=="xs","rounded-lg":!o},a,ty[n]&&ty[n][r],Gj[i][o?"rounded":"default"]),disabled:s,style:{...!f&&{color:m.getColor(u),backgroundColor:m.getColor(d),...o?{}:{borderRadius:m.getRadius()}},...l},...c,...h,children:e})}function oe(){}oe.Home=function(t){return y.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:y.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"})})};oe.Chat=e=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:y.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"})});oe.Menu=e=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})});oe.MessageTyping=({className:e="size-5",...t})=>y.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:y.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"})});oe.Check=function(t){return y.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",height:"1em",width:"1em",...t,children:y.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"})})};oe.Website=function(t){return y.jsxs("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:[y.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"}),y.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"}),y.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"})]})};oe.ArrowDown=e=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"})});oe.XCircle=({className:e="e-5",...t})=>y.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:y.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"})});oe.X=({className:e="e-5",...t})=>y.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:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})});oe.PaperAirplane=({className:e="e-5",...t})=>y.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:y.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"})});oe.Spin=function(t){return y.jsx("svg",{"data-name":"Layer 1",viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:y.jsx("path",{d:"M6.804 15a1 1 0 00-1.366-.366l-1.732 1a1 1 0 001 1.732l1.732-1A1 1 0 006.804 15zM3.706 8.366l1.732 1a1 1 0 101-1.732l-1.732-1a1 1 0 00-1 1.732zM6 12a1 1 0 00-1-1H3a1 1 0 000 2h2a1 1 0 001-1zm11.196-3a1 1 0 001.366.366l1.732-1a1 1 0 10-1-1.732l-1.732 1A1 1 0 0017.196 9zM15 6.804a1 1 0 001.366-.366l1-1.732a1 1 0 10-1.732-1l-1 1.732A1 1 0 0015 6.804zm5.294 8.83l-1.732-1a1 1 0 10-1 1.732l1.732 1a1 1 0 001-1.732zm-3.928 1.928a1 1 0 10-1.732 1l1 1.732a1 1 0 101.732-1zM21 11h-2a1 1 0 000 2h2a1 1 0 000-2zm-9 7a1 1 0 00-1 1v2a1 1 0 002 0v-2a1 1 0 00-1-1zm-3-.804a1 1 0 00-1.366.366l-1 1.732a1 1 0 001.732 1l1-1.732A1 1 0 009 17.196zM12 2a1 1 0 00-1 1v2a1 1 0 002 0V3a1 1 0 00-1-1z"})})};oe.ExternalLink=e=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})});oe.Phone=e=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 002.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 01-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 00-1.091-.852H4.5A2.25 2.25 0 002.25 4.5v2.25z"})});oe.Mail=e=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})});oe.Star=e=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z"})});oe.Plus=e=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})});const Yn=Object.create(null);Yn.open="0";Yn.close="1";Yn.ping="2";Yn.pong="3";Yn.message="4";Yn.upgrade="5";Yn.noop="6";const su=Object.create(null);Object.keys(Yn).forEach(e=>{su[Yn[e]]=e});const Lp={type:"error",data:"parser error"},ok=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ak=typeof ArrayBuffer=="function",lk=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Wm=({type:e,data:t},n,r)=>ok&&t instanceof Blob?n?r(t):w0(t,r):ak&&(t instanceof ArrayBuffer||lk(t))?n?r(t):w0(new Blob([t]),r):r(Yn[e]+(t||"")),w0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function b0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Vd;function D3(e,t){if(ok&&e.data instanceof Blob)return e.data.arrayBuffer().then(b0).then(t);if(ak&&(e.data instanceof ArrayBuffer||lk(e.data)))return t(b0(e.data));Wm(e,!1,n=>{Vd||(Vd=new TextEncoder),t(Vd.encode(n))})}const S0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Go=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<S0.length;e++)Go[S0.charCodeAt(e)]=e;const M3=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),d=new Uint8Array(u);for(r=0;r<n;r+=4)s=Go[e.charCodeAt(r)],o=Go[e.charCodeAt(r+1)],a=Go[e.charCodeAt(r+2)],l=Go[e.charCodeAt(r+3)],d[i++]=s<<2|o>>4,d[i++]=(o&15)<<4|a>>2,d[i++]=(a&3)<<6|l&63;return u},F3=typeof ArrayBuffer=="function",qm=(e,t)=>{if(typeof e!="string")return{type:"message",data:uk(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:N3(e.substring(1),t)}:su[n]?e.length>1?{type:su[n],data:e.substring(1)}:{type:su[n]}:Lp},N3=(e,t)=>{if(F3){const n=M3(e);return uk(n,t)}else return{base64:!0,data:e}},uk=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},ck="",L3=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{Wm(s,!1,a=>{r[o]=a,++i===n&&t(r.join(ck))})})},I3=(e,t)=>{const n=e.split(ck),r=[];for(let i=0;i<n.length;i++){const s=qm(n[i],t);if(r.push(s),s.type==="error")break}return r};function $3(){return new TransformStream({transform(e,t){D3(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 Ud;function Fl(e){return e.reduce((t,n)=>t+n.length,0)}function Nl(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 B3(e,t){Ud||(Ud=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=Nl(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=Nl(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=Nl(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),d=u.getUint32(0);if(d>Math.pow(2,21)-1){a.enqueue(Lp);break}i=d*Math.pow(2,32)+u.getUint32(4),r=3}else{if(Fl(n)<i)break;const l=Nl(n,i);a.enqueue(qm(s?l:Ud.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(Lp);break}}}})}const dk=4;function Ve(e){if(e)return z3(e)}function z3(e){for(var t in Ve.prototype)e[t]=Ve.prototype[t];return e}Ve.prototype.on=Ve.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Ve.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Ve.prototype.off=Ve.prototype.removeListener=Ve.prototype.removeAllListeners=Ve.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};Ve.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};Ve.prototype.emitReserved=Ve.prototype.emit;Ve.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Ve.prototype.hasListeners=function(e){return!!this.listeners(e).length};const _c=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),on=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),V3="arraybuffer";function fk(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const U3=on.setTimeout,H3=on.clearTimeout;function jc(e,t){t.useNativeTimers?(e.setTimeoutFn=U3.bind(on),e.clearTimeoutFn=H3.bind(on)):(e.setTimeoutFn=on.setTimeout.bind(on),e.clearTimeoutFn=on.clearTimeout.bind(on))}const W3=1.33;function q3(e){return typeof e=="string"?G3(e):Math.ceil((e.byteLength||e.size)*W3)}function G3(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 pk(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Q3(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Y3(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 K3 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Gm extends Ve{constructor(t){super(),this.writable=!1,jc(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 K3(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=qm(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=Q3(t);return n.length?"?"+n:""}}class X3 extends Gm{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)};I3(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,L3(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]=pk()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let hk=!1;try{hk=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Z3=hk;function J3(){}class eD extends X3{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 Gn extends Ve{constructor(t,n,r){super(),this.createRequest=t,jc(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=fk(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=Gn.requestsCount++,Gn.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=J3,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Gn.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()}}Gn.requestsCount=0;Gn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",k0);else if(typeof addEventListener=="function"){const e="onpagehide"in on?"pagehide":"unload";addEventListener(e,k0,!1)}}function k0(){for(let e in Gn.requests)Gn.requests.hasOwnProperty(e)&&Gn.requests[e].abort()}const tD=function(){const e=mk({xdomain:!1});return e&&e.responseType!==null}();class nD extends eD{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=tD&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Gn(mk,this.uri(),t)}}function mk(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Z3))return new XMLHttpRequest}catch{}if(!t)try{return new on[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const gk=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class rD extends Gm{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=gk?{}:fk(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;Wm(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}i&&_c(()=>{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]=pk()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Hd=on.WebSocket||on.MozWebSocket;class iD extends rD{createSocket(t,n,r){return gk?new Hd(t,n,r):n?new Hd(t,n):new Hd(t)}doWrite(t,n){this.ws.send(n)}}class sD extends Gm{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=B3(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=$3();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&&_c(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const oD={websocket:iD,webtransport:sD,polling:nD},aD=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,lD=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ip(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=aD.exec(e||""),s={},o=14;for(;o--;)s[lD[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=uD(s,s.path),s.queryKey=cD(s,s.query),s}function uD(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 cD(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const $p=typeof addEventListener=="function"&&typeof removeEventListener=="function",ou=[];$p&&addEventListener("offline",()=>{ou.forEach(e=>e())},!1);class Jr extends Ve{constructor(t,n){if(super(),this.binaryType=V3,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=Ip(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=Ip(n.host).host);jc(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=Y3(this.opts.query)),$p&&(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"})},ou.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=dk,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&&Jr.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",Jr.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+=q3(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,_c(()=>{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(Jr.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(),$p&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=ou.indexOf(this._offlineEventListener);r!==-1&&ou.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Jr.protocol=dk;class dD extends Jr{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;Jr.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;Jr.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=n.name,this.emitReserved("upgradeError",f)}}))};function s(){r||(r=!0,d(),n.close(),n=null)}const o=c=>{const f=new Error("probe error: "+c);f.transport=n.name,s(),this.emitReserved("upgradeError",f)};function a(){o("transport closed")}function l(){o("socket closed")}function u(c){n&&c.name!==n.name&&s()}const d=()=>{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 fD=class extends dD{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=>oD[i]).filter(i=>!!i)),super(t,r)}};function pD(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=Ip(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 hD=typeof ArrayBuffer=="function",mD=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,vk=Object.prototype.toString,gD=typeof Blob=="function"||typeof Blob<"u"&&vk.call(Blob)==="[object BlobConstructor]",vD=typeof File=="function"||typeof File<"u"&&vk.call(File)==="[object FileConstructor]";function Qm(e){return hD&&(e instanceof ArrayBuffer||mD(e))||gD&&e instanceof Blob||vD&&e instanceof File}function au(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(au(e[n]))return!0;return!1}if(Qm(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return au(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&au(e[n]))return!0;return!1}function yD(e){const t=[],n=e.data,r=e;return r.data=Bp(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Bp(e,t){if(!e)return e;if(Qm(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]=Bp(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]=Bp(e[r],t));return n}return e}function xD(e,t){return e.data=zp(e.data,t),delete e.attachments,e}function zp(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]=zp(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=zp(e[n],t));return e}const wD=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],bD=5;var ce;(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"})(ce||(ce={}));class SD{constructor(t){this.replacer=t}encode(t){return(t.type===ce.EVENT||t.type===ce.ACK)&&au(t)?this.encodeAsBinary({type:t.type===ce.EVENT?ce.BINARY_EVENT:ce.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===ce.BINARY_EVENT||t.type===ce.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=yD(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function C0(e){return Object.prototype.toString.call(e)==="[object Object]"}class Ym extends Ve{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===ce.BINARY_EVENT;r||n.type===ce.BINARY_ACK?(n.type=r?ce.EVENT:ce.ACK,this.reconstructor=new kD(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Qm(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(ce[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===ce.BINARY_EVENT||r.type===ce.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(Ym.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 ce.CONNECT:return C0(n);case ce.DISCONNECT:return n===void 0;case ce.CONNECT_ERROR:return typeof n=="string"||C0(n);case ce.EVENT:case ce.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&wD.indexOf(n[0])===-1);case ce.ACK:case ce.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class kD{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=xD(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const CD=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Ym,Encoder:SD,get PacketType(){return ce},protocol:bD},Symbol.toStringTag,{value:"Module"}));function bn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const TD=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class yk extends Ve{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=[bn(t,"open",this.onopen.bind(this)),bn(t,"packet",this.onpacket.bind(this)),bn(t,"error",this.onerror.bind(this)),bn(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(TD.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:ce.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const d=this.ids++,c=n.pop();this._registerAckCallback(d,c),o.id=d}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:ce.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 ce.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 ce.EVENT:case ce.BINARY_EVENT:this.onevent(t);break;case ce.ACK:case ce.BINARY_ACK:this.onack(t);break;case ce.DISCONNECT:this.ondisconnect();break;case ce.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:ce.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:ce.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 To(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}To.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};To.prototype.reset=function(){this.attempts=0};To.prototype.setMin=function(e){this.ms=e};To.prototype.setMax=function(e){this.max=e};To.prototype.setJitter=function(e){this.jitter=e};class Vp extends Ve{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,jc(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 To({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||CD;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 fD(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=bn(n,"open",function(){r.onopen(),t&&t()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=bn(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(bn(t,"ping",this.onping.bind(this)),bn(t,"data",this.ondata.bind(this)),bn(t,"error",this.onerror.bind(this)),bn(t,"close",this.onclose.bind(this)),bn(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){_c(()=>{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 yk(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 Io={};function lu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=pD(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=Io[i]&&s in Io[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new Vp(r,t):(Io[i]||(Io[i]=new Vp(r,t)),l=Io[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(lu,{Manager:Vp,Socket:yk,io:lu,connect:lu});const uu=e=>{const t=document.cookie.split(";").find(n=>n.includes(e));return t?t.split("=")[1]:null};var Qn=(e=>(e.CustomerToken="lc:customer:token",e.CustomerRefreshToken="lc:customer:refresh_token",e.DeviceId="lc:device:id",e))(Qn||{});const Wd=(e,t,n)=>{let r=e;["lc:customer:token","lc:customer:refresh_token"].includes(e)&&(r=`${n}:${e}`),localStorage.setItem(r,t)},cu=(e,t)=>{let n=e;return["lc:customer:token","lc:customer:refresh_token"].includes(e)&&(n=`${t}:${e}`),localStorage.getItem(n)},aa=e=>{localStorage.removeItem(`${e}:lc:customer:token`),localStorage.removeItem(`${e}:lc:customer:refresh_token`)},xk=v.createContext(null),di=()=>{const e=v.useContext(xk);if(!e)throw new Error("useWebsocket must be used within a WebSocketProvider");return e},ED=({children:e})=>{const{widget:t,isHaveChat:n}=kt(),r=v.useRef(null),i=v.useRef(!1),[s,o]=v.useState(!1),a=v.useCallback(()=>{r.current&&(console.log("WS: Cleaning up existing socket."),r.current.removeAllListeners(),r.current.disconnect(),r.current=null),o(!1),i.current=!1},[]),l=v.useCallback(w=>{if(i.current||r.current&&r.current.connected){console.log("WS: Connect called but already connecting or connected.");return}if(!n){console.log("WS: Connect skipped - no active chat");return}const g=cu(Qn.CustomerToken,w)||uu("customer_token"),x=cu(Qn.CustomerRefreshToken,w)||uu("customer_refresh_token");if(!g||!x){console.log("WS: Connect skipped - missing required tokens");return}r.current&&a(),console.log("WS: Attempting to connect..."),i.current=!0;const b=lu(D_,{transports:["websocket"],forceNew:!0,timeout:1e4,auth:{customer_token:g,device_id:cu(Qn.DeviceId,w)||uu("device_id"),customer_refresh_token:x}});b.removeAllListeners(),b.on("error",T=>{console.error("WS: Websocket error",T),i.current=!1}),b.on("connect_error",T=>{console.error("WS: Connect error",T),i.current=!1,o(!1),r.current=null}),b.on("disconnect",T=>{console.log("WS: Disconnected",T),o(!1),i.current=!1,r.current===b&&(r.current=null)}),b.on("connect",()=>{console.log("WS: Connected successfully"),r.current=b,o(!0),i.current=!1})},[a,n]);v.useEffect(()=>{const w=t==null?void 0:t.link_id;return w&&n?(console.log("WS: Auto-connecting due to linkId and isHaveChat"),l(w)):(console.log("WS: Auto-disconnect due to missing linkId or isHaveChat"),a()),()=>{console.log("WS: Cleanup on effect change"),a()}},[t==null?void 0:t.link_id,n]);const u=v.useCallback(()=>{const w=t==null?void 0:t.link_id;w?l(w):console.warn("WS: Manual connect failed, no link_id available.")},[t==null?void 0:t.link_id,l]),d=v.useCallback(()=>{console.log("WS: Reconnecting..."),a();const w=t==null?void 0:t.link_id;w&&l(w)},[t==null?void 0:t.link_id,l,a]),c=v.useCallback(()=>{console.log("WS: Manual disconnect"),a()},[a]),f=v.useCallback((w,g)=>{var x;(x=r.current)==null||x.on(w,g)},[]),h=v.useCallback((w,g)=>{var x;(x=r.current)==null||x.off(w,g)},[]),m=v.useCallback((w,g,x)=>{r.current&&r.current.connected?r.current.emit(w,g,x):console.warn(`WS: Cannot emit event '${w}', socket not connected.`)},[]),p=v.useMemo(()=>({connected:s,connect:u,reconnect:d,disconnect:c,on:f,off:h,emit:m}),[s,u,d,c,f,h,m]);return y.jsx(xk.Provider,{value:p,children:e})};var Dt=(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.MessageRead="message:read",e))(Dt||{}),we=(e=>(e.MessageAgentCreate="message:agent:create",e.MessageUserCreate="message:user:create",e.MessageCustomerCreate="message:customer:create",e.MessageAgentTyping="message:agent:typing",e.Banned="banned",e.ChatUserClose="chat:user:close",e.ChatUserAssignee="chat:user:assignee",e.ChatToggleUpload="chat:user:upload:toggle",e.ChatUserShowButton="chat:user:show-button",e.ChatUserLeave="chat:user:leave",e))(we||{});const Pc=e=>{const t=Sb(),n=(r,i)=>{var o;const s=((o=rB.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}},_D=e=>({accessToken:localStorage.getItem(`${e}:${Qn.CustomerToken}`)||"",refreshToken:localStorage.getItem(`${e}:${Qn.CustomerRefreshToken}`)||""}),ol=()=>{const{widget:e}=kt();return e?_D(e.link_id):null},ho=e=>{if(!e)return{};const{accessToken:t,refreshToken:n}=e,r={};return t&&(r["X-Customer-Token"]=t),n&&(r["X-Customer-Refresh-Token"]=n),{...r}};function jD(e){return e&&typeof e=="object"&&"customer_token"in e&&"customer_refresh_token"in e}const PD=()=>am({mutationFn:e=>bo(`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})})}),AD=(e,t)=>bo(`clients/${e}/chats`,{headers:t}),Up=(e,t)=>bo(`clients/${e}/chats`,{method:"DELETE",headers:t}),RD=(e,t,n)=>bo("review",{method:"POST",body:JSON.stringify({rating:e,comment:t||void 0}),headers:{...n,"X-Device-Id":cu(Qn.DeviceId,"")||""}}),OD=()=>{const e=ol();return am({mutationFn:t=>RD(t.rating,t.comment,ho(e))})},DD=e=>{const t=ol();return am({mutationFn:n=>bo(`clients/${e}/chats/files`,{method:"POST",headers:ho(t),body:L_({files:n},{arrayWithBracketAndIndex:!1,arrayWithBrackets:!1})})})};function MD(e){return e&&typeof e=="object"&&"file_urls"in e}const Km=(e,t,n)=>{const r=typeof window<"u"?window:void 0;v.useEffect(()=>(r.addEventListener(e,t),()=>{r.removeEventListener(e,t,!1)}),[e,t,r])},ss=()=>{let e=!1,t=!1;return typeof window<"u"&&(e=new URLSearchParams(window.location.search).get("fullscreen")==="true",t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent)),e||t},Xm=()=>{let e=!1;return typeof window<"u"&&(e=new URLSearchParams(window.location.search).get("fullscreen")==="true"),e};function Hp({text:e}){var u,d,c,f;const{widget:t,isHaveChat:n,isTooltipVisible:r,setIsTooltipVisible:i,onTooltipClose:s}=kt(),o=De(),a=sl(),l=()=>{i(!1),s&&s()};return r?y.jsxs(he.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:ve("absolute bottom-full mb-3 p-3 shadow-lg whitespace-nowrap","w-auto right-0"),style:{borderRadius:o.getRadius(),backgroundColor:o.getColor(k.TooltipBackground),color:o.getColor(k.TooltipText)},children:[y.jsx("button",{onClick:l,className:"absolute top-2 right-2 p-1 rounded-full hover:bg-black/10 transition-colors","aria-label":a(Q.CloseButtonAria),children:y.jsx(oe.X,{className:"size-3"})}),y.jsx(he.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.1,duration:.3},className:"text-sm font-medium pr-5",style:{color:o.getColor(k.TooltipText)},children:e||(n?(d=(u=t==null?void 0:t.appearance)==null?void 0:u.design)==null?void 0:d.tooltip_message_active:(f=(c=t==null?void 0:t.appearance)==null?void 0:c.design)==null?void 0:f.tooltip_message)||a(n?Q.TooltipActive:Q.TooltipDefault)}),y.jsx("div",{className:ve("absolute bottom-0 right-4 w-3 h-3 transform rotate-45 translate-y-1.5 bg-blue-100")})]},"widget-tooltip"):null}const FD="/notify.mp3",ND=async e=>{await new Audio(e||FD).play()};function T0({fallback:e,fallbackOpen:t}){const[n]=v.useState(window.document.title),r=di(),{isHaveChat:i,open:s,soundPath:o}=kt(),[a,l]=v.useState(!0),[u,d]=v.useState(0),[c,f]=v.useState(null),h=sl(),m=()=>{ND(o)},p=(w,g)=>{if(c&&clearInterval(c),w||!i||g===0||Number.isNaN(g)){window.document.title=n,f(null);return}const x=setInterval(()=>{if(w||!i||g===0||Number.isNaN(g)){window.document.title=n,clearInterval(x),f(null);return}const b=`${g} ${h(Q.NewMessagesNotification)} - ${n}`;window.document.title!==b?window.document.title=b:window.document.title=n},1e3);return f(x),()=>{clearInterval(x),f(null)}};return v.useEffect(()=>p(s&&a,u),[u,s,a]),v.useEffect(()=>{const w=()=>{l(document.visibilityState==="visible")};return document.addEventListener("visibilitychange",w,!1),()=>{document.removeEventListener("visibilitychange",w)}},[]),v.useEffect(()=>{if(i&&s&&a&&d(0),!r||!i||s&&a)return;const w=()=>{!i||s&&a||(d(g=>g+1),m())};return r.on(we.MessageAgentCreate,w),r.on(we.ChatUserAssignee,m),()=>{r.off(we.MessageAgentCreate,w),r.off(we.ChatUserAssignee,m)}},[r,i,s,a]),s?null:!i||u===0?t?e:null:y.jsx(Hp,{text:h(Q.NewMessagesNotification)})}function LD({children:e,border:t}){var U,Y,J,te;const n=di(),{open:r,setOpen:i,setIsHaveChat:s,isHaveChat:o,widget:a,onOpen:l,onClose:u}=kt(),[d]=v.useState(!0),c=Pc(),f=ol(),h=el(),m=De(),p=ss(),w=Xm(),[g,x]=v.useState({x:0,y:0}),b=E3(),T=v.useRef(null),E=v.useRef(null),[C,_]=v.useState(!1);v.useEffect(()=>((()=>{_("ontouchstart"in window||navigator.maxTouchPoints>0)})(),window.addEventListener("touchstart",()=>{_(!0)},{once:!0}),()=>{window.removeEventListener("touchstart",()=>{_(!0)})}),[]),v.useEffect(()=>{o&&h.pathname==="/"&&f&&f.accessToken&&c.push("chat")},[o]);const A=ne=>{if(!T.current||!E.current)return ne;const j=T.current.getBoundingClientRect(),D={width:window.innerWidth,height:window.innerHeight},B={top:20,right:20,bottom:40,left:20};let z=ne.x,H=ne.y;return j.right+z-g.x>D.width-B.right&&(z=D.width-B.right-j.width-(j.left-g.x)),j.left+z-g.x<B.left&&(z=B.left-(j.left-g.x)),j.bottom+H-g.y>D.height-B.bottom&&(H=D.height-B.bottom-j.height-(j.top-g.y)),j.top+H-g.y<B.top&&(H=B.top-(j.top-g.y)),{x:z,y:H}},F=()=>{i(!0),n&&(n.emit(Dt.WidgetOpen,{}),l&&l())},M=()=>{i(!1),n&&(n.emit(Dt.WidgetClose,{}),u&&u())},R=()=>{i(!1),s(!1),Up(a.client_id,ho(f)),c.push("registration")};v.useEffect(()=>{if(p&&(o||w)&&F(),!(!n||!a))return n.on(we.Banned,R),()=>{n.off(we.Banned,R)}},[]);function $(ne){C&&b.start(ne)}return y.jsx("section",{className:"relative w-full h-full",ref:E,children:y.jsxs(Zr,{children:[r&&y.jsx(he.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:p?"100%":((Y=(U=a==null?void 0:a.appearance)==null?void 0:U.design)==null?void 0:Y.width)||"21rem",height:p?"var(--app-height, 100dvh)":((te=(J=a==null?void 0:a.appearance)==null?void 0:J.design)==null?void 0:te.height)||"30rem",left:p?"0":"",right:p?"0px !important":"",maxHeight:p?"var(--app-height, 100dvh)":"",boxShadow:p?"":`0 10px 25px -5px ${m.getColor(k.ShadowColor)}, 0 8px 10px -6px ${m.getColor(k.ShadowColor)}`},className:ve("fixed z-300 overflow-hidden",{"border border-solid dark:border-zink-500 ":t,"bottom-12 right-12 rounded-t-xl":!p,"!bottom-0 !right-0":p}),children:e},"widget-container"),!C&&y.jsxs("div",{className:"fixed bottom-[40px] right-[20px] z-400",children:[y.jsx(T0,{fallback:y.jsx(Hp,{}),fallbackOpen:d}),y.jsxs(Zr,{mode:"wait",children:[!r&&y.jsxs(Ot,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:F,children:[y.jsx(he.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:ve("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:m.getColor(k.ButtonBackground)}}),y.jsx(oe.Chat,{className:"size-7"})]},"desktop-open-button"),r&&!p&&y.jsx(Ot,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:M,children:y.jsx(oe.X,{className:"size-7"})},"desktop-close-button")]})]}),C&&y.jsx(he.div,{ref:T,className:"fixed z-400 bottom-24 right-5",initial:{bottom:"96px",right:"20px"},animate:{x:g.x,y:g.y},drag:C,dragControls:b,dragMomentum:!1,dragElastic:0,onDragEnd:(ne,j)=>{const D={x:g.x+j.offset.x,y:g.y+j.offset.y},B=A(D);x(B)},children:y.jsxs(Zr,{children:[y.jsx(T0,{fallback:y.jsx(Hp,{}),fallbackOpen:d}),!r&&y.jsx("div",{className:"cursor-move",onPointerDown:$,children:y.jsxs(Ot,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:F,children:[y.jsx(he.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:ve("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:m.getColor(k.ButtonBackground)}}),y.jsx(oe.Chat,{className:"size-7"})]})},"chat-button"),r&&!p&&y.jsx(Ot,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:M,children:y.jsx(oe.X,{className:"size-7"})},"desktop-close-button")]})})]})})}function wk(e){const{widget:t}=kt();return y.jsx(O3,{widget:t,children:y.jsx(LD,{...e})})}function os(e){this._maxSize=e,this.clear()}os.prototype.clear=function(){this._size=0,this._values=Object.create(null)};os.prototype.get=function(e){return this._values[e]};os.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var ID=/[^.^\]^[]+|(?=\[\]|\.\.)/g,bk=/^\d+$/,$D=/^\d/,BD=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,zD=/^\s*(['"]?)(.*?)(\1)\s*$/,Zm=512,E0=new os(Zm),_0=new os(Zm),j0=new os(Zm),Vi={Cache:os,split:Wp,normalizePath:qd,setter:function(e){var t=qd(e);return _0.get(e)||_0.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=qd(e);return j0.get(e)||j0.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+(Jm(n)||bk.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){VD(Array.isArray(e)?e:Wp(e),t,n)}};function qd(e){return E0.get(e)||E0.set(e,Wp(e).map(function(t){return t.replace(zD,"$2")}))}function Wp(e){return e.match(ID)||[""]}function VD(e,t,n){var r=e.length,i,s,o,a;for(s=0;s<r;s++)i=e[s],i&&(WD(i)&&(i='"'+i+'"'),a=Jm(i),o=!a&&/^\d+$/.test(i),t.call(n,i,a,o,s,e))}function Jm(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function UD(e){return e.match($D)&&!e.match(bk)}function HD(e){return BD.test(e)}function WD(e){return!Jm(e)&&(UD(e)||HD(e))}const qD=/[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,Ac=e=>e.match(qD)||[],Rc=e=>e[0].toUpperCase()+e.slice(1),eg=(e,t)=>Ac(e).join(t).toLowerCase(),Sk=e=>Ac(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),GD=e=>Rc(Sk(e)),QD=e=>eg(e,"_"),YD=e=>eg(e,"-"),KD=e=>Rc(eg(e," ")),XD=e=>Ac(e).map(Rc).join(" ");var Gd={words:Ac,upperFirst:Rc,camelCase:Sk,pascalCase:GD,snakeCase:QD,kebabCase:YD,sentenceCase:KD,titleCase:XD},tg={exports:{}};tg.exports=function(e){return kk(ZD(e),e)};tg.exports.array=kk;function kk(e,t){var n=e.length,r=new Array(n),i={},s=n,o=JD(t),a=eM(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,d,c){if(c.has(u)){var f;try{f=", node was:"+JSON.stringify(u)}catch{f=""}throw new Error("Cyclic dependency"+f)}if(!a.has(u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(u));if(!i[d]){i[d]=!0;var h=o.get(u)||new Set;if(h=Array.from(h),d=h.length){c.add(u);do{var m=h[--d];l(m,a.get(m),c)}while(d);c.delete(u)}r[--n]=u}}}function ZD(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 JD(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 eM(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var tM=tg.exports;const nM=Zi(tM),rM=Object.prototype.toString,iM=Error.prototype.toString,sM=RegExp.prototype.toString,oM=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",aM=/^Symbol\((.*)\)(.*)$/;function lM(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function P0(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return lM(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return oM.call(e).replace(aM,"Symbol($1)");const r=rM.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+iM.call(e)+"]":r==="RegExp"?sM.call(e):null}function ei(e,t){let n=P0(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let s=P0(this[r],t);return s!==null?s:i},2)}function Ck(e){return e==null?[]:[].concat(e)}let Tk,Ek,_k,uM=/\$\{\s*(\w+)\s*\}/g;Tk=Symbol.toStringTag;class A0{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[Tk]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],Ck(t).forEach(s=>{if(At.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]}}Ek=Symbol.hasInstance;_k=Symbol.toStringTag;class At 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(uM,(i,s)=>ei(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 A0(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[_k]="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,At)}static[Ek](t){return A0[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Mn={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 \`${ei(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${ei(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${ei(n,!0)}\``+i}},Tt={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"},cM={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"},qp={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},dM={isValue:"${path} field must be ${value}"},du={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},fM={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"},pM={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: \`${ei(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: \`${ei(n,!0)}\``}return At.formatError(Mn.notType,e)}};Object.assign(Object.create(null),{mixed:Mn,string:Tt,number:cM,date:qp,object:du,array:fM,boolean:dM,tuple:pM});const ng=e=>e&&e.__isYupSchema__;class Yu{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 Yu(t,(a,l)=>{var u;let d=o(...a)?i:s;return(u=d==null?void 0:d(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(!ng(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const Ll={context:"$",value:"."};class as{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]===Ll.context,this.isValue=this.key[0]===Ll.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?Ll.context:this.isValue?Ll.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&Vi.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}}as.prototype.__isYupRef=!0;const Ai=e=>e==null;function vs(e){function t({value:n,path:r="",options:i,originalValue:s,schema:o},a,l){const{name:u,test:d,params:c,message:f,skipAbsent:h}=e;let{parent:m,context:p,abortEarly:w=o.spec.abortEarly,disableStackTrace:g=o.spec.disableStackTrace}=i;function x(R){return as.isRef(R)?R.getValue(n,m,p):R}function b(R={}){const $=Object.assign({value:n,originalValue:s,label:o.spec.label,path:R.path||r,spec:o.spec,disableStackTrace:R.disableStackTrace||g},c,R.params);for(const Y of Object.keys($))$[Y]=x($[Y]);const U=new At(At.formatError(R.message||f,$),n,$.path,R.type||u,$.disableStackTrace);return U.params=$,U}const T=w?a:l;let E={path:r,parent:m,type:u,from:i.from,createError:b,resolve:x,options:i,originalValue:s,schema:o};const C=R=>{At.isError(R)?T(R):R?l(null):T(b())},_=R=>{At.isError(R)?T(R):a(R)};if(h&&Ai(n))return C(!0);let F;try{var M;if(F=d.call(E,n,E),typeof((M=F)==null?void 0:M.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${E.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(F).then(C,_)}}catch(R){_(R);return}C(F)}return t.OPTIONS=e,t}function hM(e,t,n,r=n){let i,s,o;return t?(Vi.forEach(t,(a,l,u)=>{let d=l?a.slice(1,a.length-1):a;e=e.resolve({context:r,parent:i,value:n});let c=e.type==="tuple",f=u?parseInt(d,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&&f>=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[f],e=c?e.spec.types[f]:e.innerType}if(!u){if(!e.fields||!e.fields[d])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[d],e=e.fields[d]}s=d,o=l?"["+a+"]":"."+a}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}class Ku extends Set{describe(){const t=[];for(const n of this.values())t.push(as.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 Ku(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function Ns(e,t=new Map){if(ng(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]=Ns(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,Ns(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(Ns(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=Ns(i,t)}else throw Error(`Unable to clone ${e}`);return n}class Kn{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 Ku,this._blacklist=new Ku,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Mn.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=Ns(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&&Ai(s))return s;let o=ei(t),a=ei(s);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
96
96
 
97
97
  attempted value: ${o}
98
- `+(a!==o?`result of cast: ${a}`:""))}return s}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((i,s)=>s.call(this,i,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,i){let{path:s,originalValue:o=t,strict:a=this.spec.strict}=n,l=t;a||(l=this._cast(l,Object.assign({assert:!1},n)));let c=[];for(let d of Object.values(this.internalTests))d&&c.push(d);this.runTests({path:s,value:l,originalValue:o,options:n,tests:c},r,d=>{if(d.length)return i(d,l);this.runTests({path:s,value:l,originalValue:o,options:n,tests:this.tests},r,i)})}runTests(t,n,r){let i=!1,{tests:s,value:o,originalValue:a,path:l,options:c}=t,d=m=>{i||(i=!0,n(m,o))},u=m=>{i||(i=!0,r(m,o))},f=s.length,p=[];if(!f)return u([]);let h={value:o,originalValue:a,path:l,options:c,schema:this};for(let m=0;m<s.length;m++){const x=s[m];x(h,d,function(w){w&&(Array.isArray(w)?p.push(...w):p.push(w)),--f<=0&&u(p)})}}asNestedTest({key:t,index:n,parent:r,parentPath:i,originalParent:s,options:o}){const a=t??n;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof a=="number";let c=r[a];const d=Object.assign({},o,{strict:!0,parent:r,value:c,originalValue:s[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${i||""}[${l?a:`"${a}"`}]`:(i?`${i}.`:"")+t});return(u,f,p)=>this.resolve(d)._validate(c,d,f,p)}validate(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return new Promise((o,a)=>i._validate(t,n,(l,c)=>{Rt.isError(l)&&(l.value=c),a(l)},(l,c)=>{l.length?a(new Rt(l,c,void 0,void 0,s)):o(c)}))}validateSync(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s,o=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return i._validate(t,Object.assign({},n,{sync:!0}),(a,l)=>{throw Rt.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new Rt(a,t,void 0,void 0,o);s=l}),s}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(Rt.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(Rt.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Ns(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=vs({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=vs({message:n,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=Fn.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Fn.notNull){return this.nullability(!1,t)}required(t=Fn.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=Fn.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=vs(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=Ck(t).map(s=>new as(s));return i.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new Yu(i,n):Yu.fromOptions(i,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=vs({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=Fn.oneOf){let r=this.clone();return t.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r.internalTests.whiteList=vs({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=Fn.notOneOf){let r=this.clone();return t.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r.internalTests.blacklist=vs({message:n,name:"notOneOf",test(i){let s=this.schema._blacklist,o=s.resolveAll(this.resolve);return o.includes(i)?this.createError({params:{values:Array.from(s).join(", "),resolved:o}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:i,optional:s,nullable:o}=n.spec;return{meta:i,label:r,optional:s,nullable:o,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,c,d)=>d.findIndex(u=>u.name===l.name)===c)}}}Kn.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Kn.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:o}=hF(this,t,n,r.context);return o[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])Kn.prototype[e]=Kn.prototype.oneOf;for(const e of["not","nope"])Kn.prototype[e]=Kn.prototype.notOneOf;const mF=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function gF(e){const t=Gp(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 Gp(e){var t,n;const r=mF.exec(e);return r?{year:Jn(r[1]),month:Jn(r[2],1)-1,day:Jn(r[3],1),hour:Jn(r[4]),minute:Jn(r[5]),second:Jn(r[6]),millisecond:r[7]?Jn(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:Jn(r[10]),minuteOffset:Jn(r[11])}:null}function Jn(e,t=0){return Number(e)||t}let vF=/^[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])?)*$/,yF=/^((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,xF=/^(?:[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,wF="^\\d{4}-\\d{2}-\\d{2}",bF="\\d{2}:\\d{2}:\\d{2}",SF="(([+-]\\d{2}(:?\\d{2})?)|Z)",kF=new RegExp(`${wF}T${bF}(\\.\\d+)?${SF}$`),CF=e=>Ri(e)||e===e.trim(),TF={}.toString();function Xu(){return new Pk}class Pk extends Kn{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===TF?t:i})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||Fn.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=Tt.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=Tt.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=Tt.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||Tt.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&r||o.search(t)!==-1})}email(t=Tt.email){return this.matches(vF,{name:"email",message:t,excludeEmptyString:!0})}url(t=Tt.url){return this.matches(yF,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Tt.uuid){return this.matches(xF,{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(kF,{name:"datetime",message:n||Tt.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||Tt.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:s=>{if(!s||r)return!0;const o=Gp(s);return o?!!o.z:!1}}).test({name:"datetime_precision",message:n||Tt.datetime_precision,params:{precision:i},skipAbsent:!0,test:s=>{if(!s||i==null)return!0;const o=Gp(s);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Tt.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:CF})}lowercase(t=Tt.lowercase){return this.transform(n=>Ri(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Ri(n)||n===n.toLowerCase()})}uppercase(t=Tt.uppercase){return this.transform(n=>Ri(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Ri(n)||n===n.toUpperCase()})}}Xu.prototype=Pk.prototype;let EF=new Date(""),_F=e=>Object.prototype.toString.call(e)==="[object Date]";class Oc extends Kn{constructor(){super({type:"date",check(t){return _F(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=gF(t),isNaN(t)?Oc.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(as.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=qp.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=qp.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)}})}}Oc.INVALID_DATE=EF;Oc.prototype;function PF(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([o,a])=>`${o}-${a}`));function s(o,a){let l=Vi.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),as.isRef(a)&&a.isSibling?s(a.path,o):ng(a)&&"deps"in a&&a.deps.forEach(l=>s(l,o))}return nF.array(Array.from(r),n).reverse()}function A0(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 jk(e){return(t,n)=>A0(e,t)-A0(e,n)}const jF=(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 fu(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=fu(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=fu(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(fu)}):"optional"in e?e.optional():e}const RF=(e,t)=>{const n=[...Vi.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),i=Vi.getter(Vi.join(n),!0)(e);return!!(i&&r in i)};let O0=e=>Object.prototype.toString.call(e)==="[object Object]";function D0(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const AF=jk([]);function rg(e){return new Rk(e)}class Rk extends Kn{constructor(t){super({type:"object",check(n){return O0(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=AF,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let i=super._cast(t,n);if(i===void 0)return this.getDefault(n);if(!this._typeCheck(i))return i;let s=this.fields,o=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(i).filter(u=>!this._nodes.includes(u))),l={},c=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),d=!1;for(const u of a){let f=s[u],p=u in i;if(f){let h,m=i[u];c.path=(n.path?`${n.path}.`:"")+u,f=f.resolve({value:m,context:n.context,parent:l});let x=f instanceof Kn?f.spec:void 0,g=x==null?void 0:x.strict;if(x!=null&&x.strip){d=d||u in i;continue}h=!n.__validating||!g?f.cast(i[u],c):i[u],h!==void 0&&(l[u]=h)}else p&&!o&&(l[u]=i[u]);(p!==u in l||l[u]!==i[u])&&(d=!0)}return d?l:i}_validate(t,n={},r,i){let{from:s=[],originalValue:o=t,recursive:a=this.spec.recursive}=n;n.from=[{schema:this,value:o},...s],n.__validating=!0,n.originalValue=o,super._validate(t,n,r,(l,c)=>{if(!a||!O0(c)){i(l,c);return}o=o||c;let d=[];for(let u of this._nodes){let f=this.fields[u];!f||as.isRef(f)||d.push(f.asNestedTest({options:n,key:u,parent:c,parentPath:n.path,originalParent:o}))}this.runTests({tests:d,value:c,originalValue:o,options:n},r,u=>{i(u.sort(this._sortErrors).concat(l),c)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[i,s]of Object.entries(this.fields)){const o=r[i];r[i]=o===void 0?s:o}return n.withMutation(i=>i.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var i;const s=this.fields[r];let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[r]})),n[r]=s&&"getDefault"in s?s.getDefault(o):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=PF(t,n),r._sortErrors=jk(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 fu(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=Vi.getter(t,!0);return this.transform(s=>{if(!s)return s;let o=s;return RF(s,t)&&(o=Object.assign({},s),r||delete o[t],o[n]=i(s)),o})}json(){return this.transform(jF)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||du.exact,test(n){if(n==null)return!0;const r=D0(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=du.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=D0(this.schema,i);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=du.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(Gd.camelCase)}snakeCase(){return this.transformKeys(Gd.snakeCase)}constantCase(){return this.transformKeys(t=>Gd.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}}rg.prototype=Rk.prototype;var OF=function(t){return DF(t)&&!FF(t)};function DF(e){return!!e&&typeof e=="object"}function FF(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||LF(e)}var MF=typeof Symbol=="function"&&Symbol.for,NF=MF?Symbol.for("react.element"):60103;function LF(e){return e.$$typeof===NF}function IF(e){return Array.isArray(e)?[]:{}}function Zu(e,t){return t.clone!==!1&&t.isMergeableObject(e)?$a(IF(e),e,t):e}function $F(e,t,n){return e.concat(t).map(function(r){return Zu(r,n)})}function BF(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(i){r[i]=Zu(e[i],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=Zu(t[i],n):r[i]=$a(e[i],t[i],n)}),r}function $a(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||$F,n.isMergeableObject=n.isMergeableObject||OF;var r=Array.isArray(t),i=Array.isArray(e),s=r===i;return s?r?n.arrayMerge(e,t,n):BF(e,t,n):Zu(t,n)}$a.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return $a(r,i,n)},{})};var Qp=$a,Ak=typeof global=="object"&&global&&global.Object===Object&&global,zF=typeof self=="object"&&self&&self.Object===Object&&self,Xn=Ak||zF||Function("return this")(),si=Xn.Symbol,Ok=Object.prototype,VF=Ok.hasOwnProperty,UF=Ok.toString,$o=si?si.toStringTag:void 0;function HF(e){var t=VF.call(e,$o),n=e[$o];try{e[$o]=void 0;var r=!0}catch{}var i=UF.call(e);return r&&(t?e[$o]=n:delete e[$o]),i}var WF=Object.prototype,qF=WF.toString;function GF(e){return qF.call(e)}var QF="[object Null]",YF="[object Undefined]",F0=si?si.toStringTag:void 0;function ls(e){return e==null?e===void 0?YF:QF:F0&&F0 in Object(e)?HF(e):GF(e)}function Dk(e,t){return function(n){return e(t(n))}}var ig=Dk(Object.getPrototypeOf,Object);function us(e){return e!=null&&typeof e=="object"}var KF="[object Object]",XF=Function.prototype,ZF=Object.prototype,Fk=XF.toString,JF=ZF.hasOwnProperty,eM=Fk.call(Object);function M0(e){if(!us(e)||ls(e)!=KF)return!1;var t=ig(e);if(t===null)return!0;var n=JF.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Fk.call(n)==eM}function tM(){this.__data__=[],this.size=0}function Mk(e,t){return e===t||e!==e&&t!==t}function Dc(e,t){for(var n=e.length;n--;)if(Mk(e[n][0],t))return n;return-1}var nM=Array.prototype,rM=nM.splice;function iM(e){var t=this.__data__,n=Dc(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():rM.call(t,n,1),--this.size,!0}function sM(e){var t=this.__data__,n=Dc(t,e);return n<0?void 0:t[n][1]}function oM(e){return Dc(this.__data__,e)>-1}function aM(e,t){var n=this.__data__,r=Dc(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function gr(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])}}gr.prototype.clear=tM;gr.prototype.delete=iM;gr.prototype.get=sM;gr.prototype.has=oM;gr.prototype.set=aM;function lM(){this.__data__=new gr,this.size=0}function uM(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function cM(e){return this.__data__.get(e)}function dM(e){return this.__data__.has(e)}function al(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var fM="[object AsyncFunction]",pM="[object Function]",hM="[object GeneratorFunction]",mM="[object Proxy]";function Nk(e){if(!al(e))return!1;var t=ls(e);return t==pM||t==hM||t==fM||t==mM}var Qd=Xn["__core-js_shared__"],N0=function(){var e=/[^.]+$/.exec(Qd&&Qd.keys&&Qd.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function gM(e){return!!N0&&N0 in e}var vM=Function.prototype,yM=vM.toString;function cs(e){if(e!=null){try{return yM.call(e)}catch{}try{return e+""}catch{}}return""}var xM=/[\\^$.*+?()[\]{}|]/g,wM=/^\[object .+?Constructor\]$/,bM=Function.prototype,SM=Object.prototype,kM=bM.toString,CM=SM.hasOwnProperty,TM=RegExp("^"+kM.call(CM).replace(xM,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function EM(e){if(!al(e)||gM(e))return!1;var t=Nk(e)?TM:wM;return t.test(cs(e))}function _M(e,t){return e==null?void 0:e[t]}function ds(e,t){var n=_M(e,t);return EM(n)?n:void 0}var Ba=ds(Xn,"Map"),za=ds(Object,"create");function PM(){this.__data__=za?za(null):{},this.size=0}function jM(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var RM="__lodash_hash_undefined__",AM=Object.prototype,OM=AM.hasOwnProperty;function DM(e){var t=this.__data__;if(za){var n=t[e];return n===RM?void 0:n}return OM.call(t,e)?t[e]:void 0}var FM=Object.prototype,MM=FM.hasOwnProperty;function NM(e){var t=this.__data__;return za?t[e]!==void 0:MM.call(t,e)}var LM="__lodash_hash_undefined__";function IM(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=za&&t===void 0?LM:t,this}function Xi(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])}}Xi.prototype.clear=PM;Xi.prototype.delete=jM;Xi.prototype.get=DM;Xi.prototype.has=NM;Xi.prototype.set=IM;function $M(){this.size=0,this.__data__={hash:new Xi,map:new(Ba||gr),string:new Xi}}function BM(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Fc(e,t){var n=e.__data__;return BM(t)?n[typeof t=="string"?"string":"hash"]:n.map}function zM(e){var t=Fc(this,e).delete(e);return this.size-=t?1:0,t}function VM(e){return Fc(this,e).get(e)}function UM(e){return Fc(this,e).has(e)}function HM(e,t){var n=Fc(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function di(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])}}di.prototype.clear=$M;di.prototype.delete=zM;di.prototype.get=VM;di.prototype.has=UM;di.prototype.set=HM;var WM=200;function qM(e,t){var n=this.__data__;if(n instanceof gr){var r=n.__data__;if(!Ba||r.length<WM-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new di(r)}return n.set(e,t),this.size=n.size,this}function Eo(e){var t=this.__data__=new gr(e);this.size=t.size}Eo.prototype.clear=lM;Eo.prototype.delete=uM;Eo.prototype.get=cM;Eo.prototype.has=dM;Eo.prototype.set=qM;function GM(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var L0=function(){try{var e=ds(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Lk(e,t,n){t=="__proto__"&&L0?L0(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var QM=Object.prototype,YM=QM.hasOwnProperty;function Ik(e,t,n){var r=e[t];(!(YM.call(e,t)&&Mk(r,n))||n===void 0&&!(t in e))&&Lk(e,t,n)}function Mc(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?Lk(n,a,l):Ik(n,a,l)}return n}function KM(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var XM="[object Arguments]";function I0(e){return us(e)&&ls(e)==XM}var $k=Object.prototype,ZM=$k.hasOwnProperty,JM=$k.propertyIsEnumerable,eN=I0(function(){return arguments}())?I0:function(e){return us(e)&&ZM.call(e,"callee")&&!JM.call(e,"callee")},ll=Array.isArray;function tN(){return!1}var Bk=typeof zt=="object"&&zt&&!zt.nodeType&&zt,$0=Bk&&typeof Vt=="object"&&Vt&&!Vt.nodeType&&Vt,nN=$0&&$0.exports===Bk,B0=nN?Xn.Buffer:void 0,rN=B0?B0.isBuffer:void 0,zk=rN||tN,iN=9007199254740991,sN=/^(?:0|[1-9]\d*)$/;function oN(e,t){var n=typeof e;return t=t??iN,!!t&&(n=="number"||n!="symbol"&&sN.test(e))&&e>-1&&e%1==0&&e<t}var aN=9007199254740991;function Vk(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=aN}var lN="[object Arguments]",uN="[object Array]",cN="[object Boolean]",dN="[object Date]",fN="[object Error]",pN="[object Function]",hN="[object Map]",mN="[object Number]",gN="[object Object]",vN="[object RegExp]",yN="[object Set]",xN="[object String]",wN="[object WeakMap]",bN="[object ArrayBuffer]",SN="[object DataView]",kN="[object Float32Array]",CN="[object Float64Array]",TN="[object Int8Array]",EN="[object Int16Array]",_N="[object Int32Array]",PN="[object Uint8Array]",jN="[object Uint8ClampedArray]",RN="[object Uint16Array]",AN="[object Uint32Array]",Ce={};Ce[kN]=Ce[CN]=Ce[TN]=Ce[EN]=Ce[_N]=Ce[PN]=Ce[jN]=Ce[RN]=Ce[AN]=!0;Ce[lN]=Ce[uN]=Ce[bN]=Ce[cN]=Ce[SN]=Ce[dN]=Ce[fN]=Ce[pN]=Ce[hN]=Ce[mN]=Ce[gN]=Ce[vN]=Ce[yN]=Ce[xN]=Ce[wN]=!1;function ON(e){return us(e)&&Vk(e.length)&&!!Ce[ls(e)]}function sg(e){return function(t){return e(t)}}var Uk=typeof zt=="object"&&zt&&!zt.nodeType&&zt,la=Uk&&typeof Vt=="object"&&Vt&&!Vt.nodeType&&Vt,DN=la&&la.exports===Uk,Yd=DN&&Ak.process,mo=function(){try{var e=la&&la.require&&la.require("util").types;return e||Yd&&Yd.binding&&Yd.binding("util")}catch{}}(),z0=mo&&mo.isTypedArray,FN=z0?sg(z0):ON,MN=Object.prototype,NN=MN.hasOwnProperty;function Hk(e,t){var n=ll(e),r=!n&&eN(e),i=!n&&!r&&zk(e),s=!n&&!r&&!i&&FN(e),o=n||r||i||s,a=o?KM(e.length,String):[],l=a.length;for(var c in e)(t||NN.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||oN(c,l)))&&a.push(c);return a}var LN=Object.prototype;function og(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||LN;return e===n}var IN=Dk(Object.keys,Object),$N=Object.prototype,BN=$N.hasOwnProperty;function zN(e){if(!og(e))return IN(e);var t=[];for(var n in Object(e))BN.call(e,n)&&n!="constructor"&&t.push(n);return t}function Wk(e){return e!=null&&Vk(e.length)&&!Nk(e)}function ag(e){return Wk(e)?Hk(e):zN(e)}function VN(e,t){return e&&Mc(t,ag(t),e)}function UN(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var HN=Object.prototype,WN=HN.hasOwnProperty;function qN(e){if(!al(e))return UN(e);var t=og(e),n=[];for(var r in e)r=="constructor"&&(t||!WN.call(e,r))||n.push(r);return n}function lg(e){return Wk(e)?Hk(e,!0):qN(e)}function GN(e,t){return e&&Mc(t,lg(t),e)}var qk=typeof zt=="object"&&zt&&!zt.nodeType&&zt,V0=qk&&typeof Vt=="object"&&Vt&&!Vt.nodeType&&Vt,QN=V0&&V0.exports===qk,U0=QN?Xn.Buffer:void 0,H0=U0?U0.allocUnsafe:void 0;function YN(e,t){if(t)return e.slice();var n=e.length,r=H0?H0(n):new e.constructor(n);return e.copy(r),r}function Gk(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function KN(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 Qk(){return[]}var XN=Object.prototype,ZN=XN.propertyIsEnumerable,W0=Object.getOwnPropertySymbols,ug=W0?function(e){return e==null?[]:(e=Object(e),KN(W0(e),function(t){return ZN.call(e,t)}))}:Qk;function JN(e,t){return Mc(e,ug(e),t)}function Yk(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var e5=Object.getOwnPropertySymbols,Kk=e5?function(e){for(var t=[];e;)Yk(t,ug(e)),e=ig(e);return t}:Qk;function t5(e,t){return Mc(e,Kk(e),t)}function Xk(e,t,n){var r=t(e);return ll(e)?r:Yk(r,n(e))}function n5(e){return Xk(e,ag,ug)}function r5(e){return Xk(e,lg,Kk)}var Yp=ds(Xn,"DataView"),Kp=ds(Xn,"Promise"),Xp=ds(Xn,"Set"),Zp=ds(Xn,"WeakMap"),q0="[object Map]",i5="[object Object]",G0="[object Promise]",Q0="[object Set]",Y0="[object WeakMap]",K0="[object DataView]",s5=cs(Yp),o5=cs(Ba),a5=cs(Kp),l5=cs(Xp),u5=cs(Zp),rr=ls;(Yp&&rr(new Yp(new ArrayBuffer(1)))!=K0||Ba&&rr(new Ba)!=q0||Kp&&rr(Kp.resolve())!=G0||Xp&&rr(new Xp)!=Q0||Zp&&rr(new Zp)!=Y0)&&(rr=function(e){var t=ls(e),n=t==i5?e.constructor:void 0,r=n?cs(n):"";if(r)switch(r){case s5:return K0;case o5:return q0;case a5:return G0;case l5:return Q0;case u5:return Y0}return t});var c5=Object.prototype,d5=c5.hasOwnProperty;function f5(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&d5.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var X0=Xn.Uint8Array;function cg(e){var t=new e.constructor(e.byteLength);return new X0(t).set(new X0(e)),t}function p5(e,t){var n=t?cg(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var h5=/\w*$/;function m5(e){var t=new e.constructor(e.source,h5.exec(e));return t.lastIndex=e.lastIndex,t}var Z0=si?si.prototype:void 0,J0=Z0?Z0.valueOf:void 0;function g5(e){return J0?Object(J0.call(e)):{}}function v5(e,t){var n=t?cg(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var y5="[object Boolean]",x5="[object Date]",w5="[object Map]",b5="[object Number]",S5="[object RegExp]",k5="[object Set]",C5="[object String]",T5="[object Symbol]",E5="[object ArrayBuffer]",_5="[object DataView]",P5="[object Float32Array]",j5="[object Float64Array]",R5="[object Int8Array]",A5="[object Int16Array]",O5="[object Int32Array]",D5="[object Uint8Array]",F5="[object Uint8ClampedArray]",M5="[object Uint16Array]",N5="[object Uint32Array]";function L5(e,t,n){var r=e.constructor;switch(t){case E5:return cg(e);case y5:case x5:return new r(+e);case _5:return p5(e,n);case P5:case j5:case R5:case A5:case O5:case D5:case F5:case M5:case N5:return v5(e,n);case w5:return new r;case b5:case C5:return new r(e);case S5:return m5(e);case k5:return new r;case T5:return g5(e)}}var ex=Object.create,I5=function(){function e(){}return function(t){if(!al(t))return{};if(ex)return ex(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function $5(e){return typeof e.constructor=="function"&&!og(e)?I5(ig(e)):{}}var B5="[object Map]";function z5(e){return us(e)&&rr(e)==B5}var tx=mo&&mo.isMap,V5=tx?sg(tx):z5,U5="[object Set]";function H5(e){return us(e)&&rr(e)==U5}var nx=mo&&mo.isSet,W5=nx?sg(nx):H5,q5=1,G5=2,Q5=4,Zk="[object Arguments]",Y5="[object Array]",K5="[object Boolean]",X5="[object Date]",Z5="[object Error]",Jk="[object Function]",J5="[object GeneratorFunction]",e4="[object Map]",t4="[object Number]",eC="[object Object]",n4="[object RegExp]",r4="[object Set]",i4="[object String]",s4="[object Symbol]",o4="[object WeakMap]",a4="[object ArrayBuffer]",l4="[object DataView]",u4="[object Float32Array]",c4="[object Float64Array]",d4="[object Int8Array]",f4="[object Int16Array]",p4="[object Int32Array]",h4="[object Uint8Array]",m4="[object Uint8ClampedArray]",g4="[object Uint16Array]",v4="[object Uint32Array]",we={};we[Zk]=we[Y5]=we[a4]=we[l4]=we[K5]=we[X5]=we[u4]=we[c4]=we[d4]=we[f4]=we[p4]=we[e4]=we[t4]=we[eC]=we[n4]=we[r4]=we[i4]=we[s4]=we[h4]=we[m4]=we[g4]=we[v4]=!0;we[Z5]=we[Jk]=we[o4]=!1;function ua(e,t,n,r,i,s){var o,a=t&q5,l=t&G5,c=t&Q5;if(o!==void 0)return o;if(!al(e))return e;var d=ll(e);if(d){if(o=f5(e),!a)return Gk(e,o)}else{var u=rr(e),f=u==Jk||u==J5;if(zk(e))return YN(e,a);if(u==eC||u==Zk||f&&!i){if(o=l||f?{}:$5(e),!a)return l?t5(e,GN(o,e)):JN(e,VN(o,e))}else{if(!we[u])return i?e:{};o=L5(e,u,a)}}s||(s=new Eo);var p=s.get(e);if(p)return p;s.set(e,o),W5(e)?e.forEach(function(x){o.add(ua(x,t,n,x,e,s))}):V5(e)&&e.forEach(function(x,g){o.set(g,ua(x,t,n,g,e,s))});var h=c?l?r5:n5:l?lg:ag,m=d?void 0:h(e);return GM(m||e,function(x,g){m&&(g=x,x=e[g]),Ik(o,g,ua(x,t,n,g,e,s))}),o}var y4=1,x4=4;function Il(e){return ua(e,y4|x4)}var rx=Array.isArray,ix=Object.keys,w4=Object.prototype.hasOwnProperty,b4=typeof Element<"u";function Jp(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=rx(e),r=rx(t),i,s,o;if(n&&r){if(s=e.length,s!=t.length)return!1;for(i=s;i--!==0;)if(!Jp(e[i],t[i]))return!1;return!0}if(n!=r)return!1;var a=e instanceof Date,l=t instanceof Date;if(a!=l)return!1;if(a&&l)return e.getTime()==t.getTime();var c=e instanceof RegExp,d=t instanceof RegExp;if(c!=d)return!1;if(c&&d)return e.toString()==t.toString();var u=ix(e);if(s=u.length,s!==ix(t).length)return!1;for(i=s;i--!==0;)if(!w4.call(t,u[i]))return!1;if(b4&&e instanceof Element&&t instanceof Element)return e===t;for(i=s;i--!==0;)if(o=u[i],!(o==="_owner"&&e.$$typeof)&&!Jp(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var S4=function(t,n){try{return Jp(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 bi=Zi(S4);var k4=4;function sx(e){return ua(e,k4)}function tC(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 C4="[object Symbol]";function dg(e){return typeof e=="symbol"||us(e)&&ls(e)==C4}var T4="Expected a function";function fg(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(T4);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(fg.Cache||di),n}fg.Cache=di;var E4=500;function _4(e){var t=fg(e,function(r){return n.size===E4&&n.clear(),r}),n=t.cache;return t}var P4=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,j4=/\\(\\)?/g,R4=_4(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(P4,function(n,r,i,s){t.push(i?s.replace(j4,"$1"):r||n)}),t}),A4=1/0;function O4(e){if(typeof e=="string"||dg(e))return e;var t=e+"";return t=="0"&&1/e==-A4?"-0":t}var D4=1/0,ox=si?si.prototype:void 0,ax=ox?ox.toString:void 0;function nC(e){if(typeof e=="string")return e;if(ll(e))return tC(e,nC)+"";if(dg(e))return ax?ax.call(e):"";var t=e+"";return t=="0"&&1/e==-D4?"-0":t}function F4(e){return e==null?"":nC(e)}function rC(e){return ll(e)?tC(e,O4):dg(e)?[e]:Gk(R4(F4(e)))}var iC={exports:{}},me={};/** @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 d of Object.values(this.internalTests))d&&u.push(d);this.runTests({path:s,value:l,originalValue:o,options:n,tests:u},r,d=>{if(d.length)return i(d,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,d=p=>{i||(i=!0,n(p,o))},c=p=>{i||(i=!0,r(p,o))},f=s.length,h=[];if(!f)return c([]);let m={value:o,originalValue:a,path:l,options:u,schema:this};for(let p=0;p<s.length;p++){const w=s[p];w(m,d,function(x){x&&(Array.isArray(x)?h.push(...x):h.push(x)),--f<=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 d=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,f,h)=>this.resolve(d)._validate(u,d,f,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)=>{At.isError(l)&&(l.value=u),a(l)},(l,u)=>{l.length?a(new At(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 At.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new At(a,t,void 0,void 0,o);s=l}),s}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(At.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(At.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Ns(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=vs({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=vs({message:n,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=Mn.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Mn.notNull){return this.nullability(!1,t)}required(t=Mn.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=Mn.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=vs(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=Ck(t).map(s=>new as(s));return i.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new Yu(i,n):Yu.fromOptions(i,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=vs({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=Mn.oneOf){let r=this.clone();return t.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r.internalTests.whiteList=vs({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=Mn.notOneOf){let r=this.clone();return t.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r.internalTests.blacklist=vs({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,d)=>d.findIndex(c=>c.name===l.name)===u)}}}Kn.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Kn.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:o}=hM(this,t,n,r.context);return o[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])Kn.prototype[e]=Kn.prototype.oneOf;for(const e of["not","nope"])Kn.prototype[e]=Kn.prototype.notOneOf;const mM=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function gM(e){const t=Gp(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 Gp(e){var t,n;const r=mM.exec(e);return r?{year:Jn(r[1]),month:Jn(r[2],1)-1,day:Jn(r[3],1),hour:Jn(r[4]),minute:Jn(r[5]),second:Jn(r[6]),millisecond:r[7]?Jn(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:Jn(r[10]),minuteOffset:Jn(r[11])}:null}function Jn(e,t=0){return Number(e)||t}let vM=/^[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])?)*$/,yM=/^((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,xM=/^(?:[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,wM="^\\d{4}-\\d{2}-\\d{2}",bM="\\d{2}:\\d{2}:\\d{2}",SM="(([+-]\\d{2}(:?\\d{2})?)|Z)",kM=new RegExp(`${wM}T${bM}(\\.\\d+)?${SM}$`),CM=e=>Ai(e)||e===e.trim(),TM={}.toString();function Xu(){return new jk}class jk extends Kn{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===TM?t:i})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||Mn.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=Tt.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=Tt.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=Tt.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||Tt.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&r||o.search(t)!==-1})}email(t=Tt.email){return this.matches(vM,{name:"email",message:t,excludeEmptyString:!0})}url(t=Tt.url){return this.matches(yM,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Tt.uuid){return this.matches(xM,{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(kM,{name:"datetime",message:n||Tt.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||Tt.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:s=>{if(!s||r)return!0;const o=Gp(s);return o?!!o.z:!1}}).test({name:"datetime_precision",message:n||Tt.datetime_precision,params:{precision:i},skipAbsent:!0,test:s=>{if(!s||i==null)return!0;const o=Gp(s);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Tt.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:CM})}lowercase(t=Tt.lowercase){return this.transform(n=>Ai(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Ai(n)||n===n.toLowerCase()})}uppercase(t=Tt.uppercase){return this.transform(n=>Ai(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Ai(n)||n===n.toUpperCase()})}}Xu.prototype=jk.prototype;let EM=new Date(""),_M=e=>Object.prototype.toString.call(e)==="[object Date]";class Oc extends Kn{constructor(){super({type:"date",check(t){return _M(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=gM(t),isNaN(t)?Oc.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(as.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=qp.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=qp.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)}})}}Oc.INVALID_DATE=EM;Oc.prototype;function jM(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([o,a])=>`${o}-${a}`));function s(o,a){let l=Vi.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),as.isRef(a)&&a.isSibling?s(a.path,o):ng(a)&&"deps"in a&&a.deps.forEach(l=>s(l,o))}return nM.array(Array.from(r),n).reverse()}function R0(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 Pk(e){return(t,n)=>R0(e,t)-R0(e,n)}const PM=(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 fu(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=fu(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=fu(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(fu)}):"optional"in e?e.optional():e}const AM=(e,t)=>{const n=[...Vi.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),i=Vi.getter(Vi.join(n),!0)(e);return!!(i&&r in i)};let O0=e=>Object.prototype.toString.call(e)==="[object Object]";function D0(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const RM=Pk([]);function rg(e){return new Ak(e)}class Ak extends Kn{constructor(t){super({type:"object",check(n){return O0(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=RM,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}),d=!1;for(const c of a){let f=s[c],h=c in i;if(f){let m,p=i[c];u.path=(n.path?`${n.path}.`:"")+c,f=f.resolve({value:p,context:n.context,parent:l});let w=f instanceof Kn?f.spec:void 0,g=w==null?void 0:w.strict;if(w!=null&&w.strip){d=d||c in i;continue}m=!n.__validating||!g?f.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])&&(d=!0)}return d?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||!O0(u)){i(l,u);return}o=o||u;let d=[];for(let c of this._nodes){let f=this.fields[c];!f||as.isRef(f)||d.push(f.asNestedTest({options:n,key:c,parent:u,parentPath:n.path,originalParent:o}))}this.runTests({tests:d,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=jM(t,n),r._sortErrors=Pk(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 fu(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=Vi.getter(t,!0);return this.transform(s=>{if(!s)return s;let o=s;return AM(s,t)&&(o=Object.assign({},s),r||delete o[t],o[n]=i(s)),o})}json(){return this.transform(PM)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||du.exact,test(n){if(n==null)return!0;const r=D0(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=du.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=D0(this.schema,i);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=du.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(Gd.camelCase)}snakeCase(){return this.transformKeys(Gd.snakeCase)}constantCase(){return this.transformKeys(t=>Gd.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}}rg.prototype=Ak.prototype;var OM=function(t){return DM(t)&&!MM(t)};function DM(e){return!!e&&typeof e=="object"}function MM(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||LM(e)}var FM=typeof Symbol=="function"&&Symbol.for,NM=FM?Symbol.for("react.element"):60103;function LM(e){return e.$$typeof===NM}function IM(e){return Array.isArray(e)?[]:{}}function Zu(e,t){return t.clone!==!1&&t.isMergeableObject(e)?$a(IM(e),e,t):e}function $M(e,t,n){return e.concat(t).map(function(r){return Zu(r,n)})}function BM(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(i){r[i]=Zu(e[i],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=Zu(t[i],n):r[i]=$a(e[i],t[i],n)}),r}function $a(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||$M,n.isMergeableObject=n.isMergeableObject||OM;var r=Array.isArray(t),i=Array.isArray(e),s=r===i;return s?r?n.arrayMerge(e,t,n):BM(e,t,n):Zu(t,n)}$a.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return $a(r,i,n)},{})};var Qp=$a,Rk=typeof global=="object"&&global&&global.Object===Object&&global,zM=typeof self=="object"&&self&&self.Object===Object&&self,Xn=Rk||zM||Function("return this")(),oi=Xn.Symbol,Ok=Object.prototype,VM=Ok.hasOwnProperty,UM=Ok.toString,$o=oi?oi.toStringTag:void 0;function HM(e){var t=VM.call(e,$o),n=e[$o];try{e[$o]=void 0;var r=!0}catch{}var i=UM.call(e);return r&&(t?e[$o]=n:delete e[$o]),i}var WM=Object.prototype,qM=WM.toString;function GM(e){return qM.call(e)}var QM="[object Null]",YM="[object Undefined]",M0=oi?oi.toStringTag:void 0;function ls(e){return e==null?e===void 0?YM:QM:M0&&M0 in Object(e)?HM(e):GM(e)}function Dk(e,t){return function(n){return e(t(n))}}var ig=Dk(Object.getPrototypeOf,Object);function us(e){return e!=null&&typeof e=="object"}var KM="[object Object]",XM=Function.prototype,ZM=Object.prototype,Mk=XM.toString,JM=ZM.hasOwnProperty,e5=Mk.call(Object);function F0(e){if(!us(e)||ls(e)!=KM)return!1;var t=ig(e);if(t===null)return!0;var n=JM.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Mk.call(n)==e5}function t5(){this.__data__=[],this.size=0}function Fk(e,t){return e===t||e!==e&&t!==t}function Dc(e,t){for(var n=e.length;n--;)if(Fk(e[n][0],t))return n;return-1}var n5=Array.prototype,r5=n5.splice;function i5(e){var t=this.__data__,n=Dc(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():r5.call(t,n,1),--this.size,!0}function s5(e){var t=this.__data__,n=Dc(t,e);return n<0?void 0:t[n][1]}function o5(e){return Dc(this.__data__,e)>-1}function a5(e,t){var n=this.__data__,r=Dc(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function vr(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])}}vr.prototype.clear=t5;vr.prototype.delete=i5;vr.prototype.get=s5;vr.prototype.has=o5;vr.prototype.set=a5;function l5(){this.__data__=new vr,this.size=0}function u5(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function c5(e){return this.__data__.get(e)}function d5(e){return this.__data__.has(e)}function al(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var f5="[object AsyncFunction]",p5="[object Function]",h5="[object GeneratorFunction]",m5="[object Proxy]";function Nk(e){if(!al(e))return!1;var t=ls(e);return t==p5||t==h5||t==f5||t==m5}var Qd=Xn["__core-js_shared__"],N0=function(){var e=/[^.]+$/.exec(Qd&&Qd.keys&&Qd.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function g5(e){return!!N0&&N0 in e}var v5=Function.prototype,y5=v5.toString;function cs(e){if(e!=null){try{return y5.call(e)}catch{}try{return e+""}catch{}}return""}var x5=/[\\^$.*+?()[\]{}|]/g,w5=/^\[object .+?Constructor\]$/,b5=Function.prototype,S5=Object.prototype,k5=b5.toString,C5=S5.hasOwnProperty,T5=RegExp("^"+k5.call(C5).replace(x5,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function E5(e){if(!al(e)||g5(e))return!1;var t=Nk(e)?T5:w5;return t.test(cs(e))}function _5(e,t){return e==null?void 0:e[t]}function ds(e,t){var n=_5(e,t);return E5(n)?n:void 0}var Ba=ds(Xn,"Map"),za=ds(Object,"create");function j5(){this.__data__=za?za(null):{},this.size=0}function P5(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var A5="__lodash_hash_undefined__",R5=Object.prototype,O5=R5.hasOwnProperty;function D5(e){var t=this.__data__;if(za){var n=t[e];return n===A5?void 0:n}return O5.call(t,e)?t[e]:void 0}var M5=Object.prototype,F5=M5.hasOwnProperty;function N5(e){var t=this.__data__;return za?t[e]!==void 0:F5.call(t,e)}var L5="__lodash_hash_undefined__";function I5(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=za&&t===void 0?L5:t,this}function Xi(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])}}Xi.prototype.clear=j5;Xi.prototype.delete=P5;Xi.prototype.get=D5;Xi.prototype.has=N5;Xi.prototype.set=I5;function $5(){this.size=0,this.__data__={hash:new Xi,map:new(Ba||vr),string:new Xi}}function B5(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Mc(e,t){var n=e.__data__;return B5(t)?n[typeof t=="string"?"string":"hash"]:n.map}function z5(e){var t=Mc(this,e).delete(e);return this.size-=t?1:0,t}function V5(e){return Mc(this,e).get(e)}function U5(e){return Mc(this,e).has(e)}function H5(e,t){var n=Mc(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function fi(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])}}fi.prototype.clear=$5;fi.prototype.delete=z5;fi.prototype.get=V5;fi.prototype.has=U5;fi.prototype.set=H5;var W5=200;function q5(e,t){var n=this.__data__;if(n instanceof vr){var r=n.__data__;if(!Ba||r.length<W5-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new fi(r)}return n.set(e,t),this.size=n.size,this}function Eo(e){var t=this.__data__=new vr(e);this.size=t.size}Eo.prototype.clear=l5;Eo.prototype.delete=u5;Eo.prototype.get=c5;Eo.prototype.has=d5;Eo.prototype.set=q5;function G5(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var L0=function(){try{var e=ds(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Lk(e,t,n){t=="__proto__"&&L0?L0(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Q5=Object.prototype,Y5=Q5.hasOwnProperty;function Ik(e,t,n){var r=e[t];(!(Y5.call(e,t)&&Fk(r,n))||n===void 0&&!(t in e))&&Lk(e,t,n)}function Fc(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?Lk(n,a,l):Ik(n,a,l)}return n}function K5(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var X5="[object Arguments]";function I0(e){return us(e)&&ls(e)==X5}var $k=Object.prototype,Z5=$k.hasOwnProperty,J5=$k.propertyIsEnumerable,eF=I0(function(){return arguments}())?I0:function(e){return us(e)&&Z5.call(e,"callee")&&!J5.call(e,"callee")},ll=Array.isArray;function tF(){return!1}var Bk=typeof Ut=="object"&&Ut&&!Ut.nodeType&&Ut,$0=Bk&&typeof Ht=="object"&&Ht&&!Ht.nodeType&&Ht,nF=$0&&$0.exports===Bk,B0=nF?Xn.Buffer:void 0,rF=B0?B0.isBuffer:void 0,zk=rF||tF,iF=9007199254740991,sF=/^(?:0|[1-9]\d*)$/;function oF(e,t){var n=typeof e;return t=t??iF,!!t&&(n=="number"||n!="symbol"&&sF.test(e))&&e>-1&&e%1==0&&e<t}var aF=9007199254740991;function Vk(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=aF}var lF="[object Arguments]",uF="[object Array]",cF="[object Boolean]",dF="[object Date]",fF="[object Error]",pF="[object Function]",hF="[object Map]",mF="[object Number]",gF="[object Object]",vF="[object RegExp]",yF="[object Set]",xF="[object String]",wF="[object WeakMap]",bF="[object ArrayBuffer]",SF="[object DataView]",kF="[object Float32Array]",CF="[object Float64Array]",TF="[object Int8Array]",EF="[object Int16Array]",_F="[object Int32Array]",jF="[object Uint8Array]",PF="[object Uint8ClampedArray]",AF="[object Uint16Array]",RF="[object Uint32Array]",Te={};Te[kF]=Te[CF]=Te[TF]=Te[EF]=Te[_F]=Te[jF]=Te[PF]=Te[AF]=Te[RF]=!0;Te[lF]=Te[uF]=Te[bF]=Te[cF]=Te[SF]=Te[dF]=Te[fF]=Te[pF]=Te[hF]=Te[mF]=Te[gF]=Te[vF]=Te[yF]=Te[xF]=Te[wF]=!1;function OF(e){return us(e)&&Vk(e.length)&&!!Te[ls(e)]}function sg(e){return function(t){return e(t)}}var Uk=typeof Ut=="object"&&Ut&&!Ut.nodeType&&Ut,la=Uk&&typeof Ht=="object"&&Ht&&!Ht.nodeType&&Ht,DF=la&&la.exports===Uk,Yd=DF&&Rk.process,mo=function(){try{var e=la&&la.require&&la.require("util").types;return e||Yd&&Yd.binding&&Yd.binding("util")}catch{}}(),z0=mo&&mo.isTypedArray,MF=z0?sg(z0):OF,FF=Object.prototype,NF=FF.hasOwnProperty;function Hk(e,t){var n=ll(e),r=!n&&eF(e),i=!n&&!r&&zk(e),s=!n&&!r&&!i&&MF(e),o=n||r||i||s,a=o?K5(e.length,String):[],l=a.length;for(var u in e)(t||NF.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||oF(u,l)))&&a.push(u);return a}var LF=Object.prototype;function og(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||LF;return e===n}var IF=Dk(Object.keys,Object),$F=Object.prototype,BF=$F.hasOwnProperty;function zF(e){if(!og(e))return IF(e);var t=[];for(var n in Object(e))BF.call(e,n)&&n!="constructor"&&t.push(n);return t}function Wk(e){return e!=null&&Vk(e.length)&&!Nk(e)}function ag(e){return Wk(e)?Hk(e):zF(e)}function VF(e,t){return e&&Fc(t,ag(t),e)}function UF(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var HF=Object.prototype,WF=HF.hasOwnProperty;function qF(e){if(!al(e))return UF(e);var t=og(e),n=[];for(var r in e)r=="constructor"&&(t||!WF.call(e,r))||n.push(r);return n}function lg(e){return Wk(e)?Hk(e,!0):qF(e)}function GF(e,t){return e&&Fc(t,lg(t),e)}var qk=typeof Ut=="object"&&Ut&&!Ut.nodeType&&Ut,V0=qk&&typeof Ht=="object"&&Ht&&!Ht.nodeType&&Ht,QF=V0&&V0.exports===qk,U0=QF?Xn.Buffer:void 0,H0=U0?U0.allocUnsafe:void 0;function YF(e,t){if(t)return e.slice();var n=e.length,r=H0?H0(n):new e.constructor(n);return e.copy(r),r}function Gk(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function KF(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 Qk(){return[]}var XF=Object.prototype,ZF=XF.propertyIsEnumerable,W0=Object.getOwnPropertySymbols,ug=W0?function(e){return e==null?[]:(e=Object(e),KF(W0(e),function(t){return ZF.call(e,t)}))}:Qk;function JF(e,t){return Fc(e,ug(e),t)}function Yk(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var eN=Object.getOwnPropertySymbols,Kk=eN?function(e){for(var t=[];e;)Yk(t,ug(e)),e=ig(e);return t}:Qk;function tN(e,t){return Fc(e,Kk(e),t)}function Xk(e,t,n){var r=t(e);return ll(e)?r:Yk(r,n(e))}function nN(e){return Xk(e,ag,ug)}function rN(e){return Xk(e,lg,Kk)}var Yp=ds(Xn,"DataView"),Kp=ds(Xn,"Promise"),Xp=ds(Xn,"Set"),Zp=ds(Xn,"WeakMap"),q0="[object Map]",iN="[object Object]",G0="[object Promise]",Q0="[object Set]",Y0="[object WeakMap]",K0="[object DataView]",sN=cs(Yp),oN=cs(Ba),aN=cs(Kp),lN=cs(Xp),uN=cs(Zp),ir=ls;(Yp&&ir(new Yp(new ArrayBuffer(1)))!=K0||Ba&&ir(new Ba)!=q0||Kp&&ir(Kp.resolve())!=G0||Xp&&ir(new Xp)!=Q0||Zp&&ir(new Zp)!=Y0)&&(ir=function(e){var t=ls(e),n=t==iN?e.constructor:void 0,r=n?cs(n):"";if(r)switch(r){case sN:return K0;case oN:return q0;case aN:return G0;case lN:return Q0;case uN:return Y0}return t});var cN=Object.prototype,dN=cN.hasOwnProperty;function fN(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&dN.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var X0=Xn.Uint8Array;function cg(e){var t=new e.constructor(e.byteLength);return new X0(t).set(new X0(e)),t}function pN(e,t){var n=t?cg(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var hN=/\w*$/;function mN(e){var t=new e.constructor(e.source,hN.exec(e));return t.lastIndex=e.lastIndex,t}var Z0=oi?oi.prototype:void 0,J0=Z0?Z0.valueOf:void 0;function gN(e){return J0?Object(J0.call(e)):{}}function vN(e,t){var n=t?cg(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var yN="[object Boolean]",xN="[object Date]",wN="[object Map]",bN="[object Number]",SN="[object RegExp]",kN="[object Set]",CN="[object String]",TN="[object Symbol]",EN="[object ArrayBuffer]",_N="[object DataView]",jN="[object Float32Array]",PN="[object Float64Array]",AN="[object Int8Array]",RN="[object Int16Array]",ON="[object Int32Array]",DN="[object Uint8Array]",MN="[object Uint8ClampedArray]",FN="[object Uint16Array]",NN="[object Uint32Array]";function LN(e,t,n){var r=e.constructor;switch(t){case EN:return cg(e);case yN:case xN:return new r(+e);case _N:return pN(e,n);case jN:case PN:case AN:case RN:case ON:case DN:case MN:case FN:case NN:return vN(e,n);case wN:return new r;case bN:case CN:return new r(e);case SN:return mN(e);case kN:return new r;case TN:return gN(e)}}var ex=Object.create,IN=function(){function e(){}return function(t){if(!al(t))return{};if(ex)return ex(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function $N(e){return typeof e.constructor=="function"&&!og(e)?IN(ig(e)):{}}var BN="[object Map]";function zN(e){return us(e)&&ir(e)==BN}var tx=mo&&mo.isMap,VN=tx?sg(tx):zN,UN="[object Set]";function HN(e){return us(e)&&ir(e)==UN}var nx=mo&&mo.isSet,WN=nx?sg(nx):HN,qN=1,GN=2,QN=4,Zk="[object Arguments]",YN="[object Array]",KN="[object Boolean]",XN="[object Date]",ZN="[object Error]",Jk="[object Function]",JN="[object GeneratorFunction]",e4="[object Map]",t4="[object Number]",eC="[object Object]",n4="[object RegExp]",r4="[object Set]",i4="[object String]",s4="[object Symbol]",o4="[object WeakMap]",a4="[object ArrayBuffer]",l4="[object DataView]",u4="[object Float32Array]",c4="[object Float64Array]",d4="[object Int8Array]",f4="[object Int16Array]",p4="[object Int32Array]",h4="[object Uint8Array]",m4="[object Uint8ClampedArray]",g4="[object Uint16Array]",v4="[object Uint32Array]",be={};be[Zk]=be[YN]=be[a4]=be[l4]=be[KN]=be[XN]=be[u4]=be[c4]=be[d4]=be[f4]=be[p4]=be[e4]=be[t4]=be[eC]=be[n4]=be[r4]=be[i4]=be[s4]=be[h4]=be[m4]=be[g4]=be[v4]=!0;be[ZN]=be[Jk]=be[o4]=!1;function ua(e,t,n,r,i,s){var o,a=t&qN,l=t&GN,u=t&QN;if(o!==void 0)return o;if(!al(e))return e;var d=ll(e);if(d){if(o=fN(e),!a)return Gk(e,o)}else{var c=ir(e),f=c==Jk||c==JN;if(zk(e))return YF(e,a);if(c==eC||c==Zk||f&&!i){if(o=l||f?{}:$N(e),!a)return l?tN(e,GF(o,e)):JF(e,VF(o,e))}else{if(!be[c])return i?e:{};o=LN(e,c,a)}}s||(s=new Eo);var h=s.get(e);if(h)return h;s.set(e,o),WN(e)?e.forEach(function(w){o.add(ua(w,t,n,w,e,s))}):VN(e)&&e.forEach(function(w,g){o.set(g,ua(w,t,n,g,e,s))});var m=u?l?rN:nN:l?lg:ag,p=d?void 0:m(e);return G5(p||e,function(w,g){p&&(g=w,w=e[g]),Ik(o,g,ua(w,t,n,g,e,s))}),o}var y4=1,x4=4;function Il(e){return ua(e,y4|x4)}var rx=Array.isArray,ix=Object.keys,w4=Object.prototype.hasOwnProperty,b4=typeof Element<"u";function Jp(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=rx(e),r=rx(t),i,s,o;if(n&&r){if(s=e.length,s!=t.length)return!1;for(i=s;i--!==0;)if(!Jp(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,d=t instanceof RegExp;if(u!=d)return!1;if(u&&d)return e.toString()==t.toString();var c=ix(e);if(s=c.length,s!==ix(t).length)return!1;for(i=s;i--!==0;)if(!w4.call(t,c[i]))return!1;if(b4&&e instanceof Element&&t instanceof Element)return e===t;for(i=s;i--!==0;)if(o=c[i],!(o==="_owner"&&e.$$typeof)&&!Jp(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var S4=function(t,n){try{return Jp(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 Si=Zi(S4);var k4=4;function sx(e){return ua(e,k4)}function tC(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 C4="[object Symbol]";function dg(e){return typeof e=="symbol"||us(e)&&ls(e)==C4}var T4="Expected a function";function fg(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(T4);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(fg.Cache||fi),n}fg.Cache=fi;var E4=500;function _4(e){var t=fg(e,function(r){return n.size===E4&&n.clear(),r}),n=t.cache;return t}var j4=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,P4=/\\(\\)?/g,A4=_4(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(j4,function(n,r,i,s){t.push(i?s.replace(P4,"$1"):r||n)}),t}),R4=1/0;function O4(e){if(typeof e=="string"||dg(e))return e;var t=e+"";return t=="0"&&1/e==-R4?"-0":t}var D4=1/0,ox=oi?oi.prototype:void 0,ax=ox?ox.toString:void 0;function nC(e){if(typeof e=="string")return e;if(ll(e))return tC(e,nC)+"";if(dg(e))return ax?ax.call(e):"";var t=e+"";return t=="0"&&1/e==-D4?"-0":t}function M4(e){return e==null?"":nC(e)}function rC(e){return ll(e)?tC(e,O4):dg(e)?[e]:Gk(A4(M4(e)))}var iC={exports:{}},ge={};/** @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 Ze=typeof Symbol=="function"&&Symbol.for,pg=Ze?Symbol.for("react.element"):60103,hg=Ze?Symbol.for("react.portal"):60106,Nc=Ze?Symbol.for("react.fragment"):60107,Lc=Ze?Symbol.for("react.strict_mode"):60108,Ic=Ze?Symbol.for("react.profiler"):60114,$c=Ze?Symbol.for("react.provider"):60109,Bc=Ze?Symbol.for("react.context"):60110,mg=Ze?Symbol.for("react.async_mode"):60111,zc=Ze?Symbol.for("react.concurrent_mode"):60111,Vc=Ze?Symbol.for("react.forward_ref"):60112,Uc=Ze?Symbol.for("react.suspense"):60113,M4=Ze?Symbol.for("react.suspense_list"):60120,Hc=Ze?Symbol.for("react.memo"):60115,Wc=Ze?Symbol.for("react.lazy"):60116,N4=Ze?Symbol.for("react.block"):60121,L4=Ze?Symbol.for("react.fundamental"):60117,I4=Ze?Symbol.for("react.responder"):60118,$4=Ze?Symbol.for("react.scope"):60119;function Gt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case pg:switch(e=e.type,e){case mg:case zc:case Nc:case Ic:case Lc:case Uc:return e;default:switch(e=e&&e.$$typeof,e){case Bc:case Vc:case Wc:case Hc:case $c:return e;default:return t}}case hg:return t}}}function sC(e){return Gt(e)===zc}me.AsyncMode=mg;me.ConcurrentMode=zc;me.ContextConsumer=Bc;me.ContextProvider=$c;me.Element=pg;me.ForwardRef=Vc;me.Fragment=Nc;me.Lazy=Wc;me.Memo=Hc;me.Portal=hg;me.Profiler=Ic;me.StrictMode=Lc;me.Suspense=Uc;me.isAsyncMode=function(e){return sC(e)||Gt(e)===mg};me.isConcurrentMode=sC;me.isContextConsumer=function(e){return Gt(e)===Bc};me.isContextProvider=function(e){return Gt(e)===$c};me.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===pg};me.isForwardRef=function(e){return Gt(e)===Vc};me.isFragment=function(e){return Gt(e)===Nc};me.isLazy=function(e){return Gt(e)===Wc};me.isMemo=function(e){return Gt(e)===Hc};me.isPortal=function(e){return Gt(e)===hg};me.isProfiler=function(e){return Gt(e)===Ic};me.isStrictMode=function(e){return Gt(e)===Lc};me.isSuspense=function(e){return Gt(e)===Uc};me.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Nc||e===zc||e===Ic||e===Lc||e===Uc||e===M4||typeof e=="object"&&e!==null&&(e.$$typeof===Wc||e.$$typeof===Hc||e.$$typeof===$c||e.$$typeof===Bc||e.$$typeof===Vc||e.$$typeof===L4||e.$$typeof===I4||e.$$typeof===$4||e.$$typeof===N4)};me.typeOf=Gt;iC.exports=me;var B4=iC.exports,oC=B4,z4={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},V4={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},aC={};aC[oC.ForwardRef]=z4;aC[oC.Memo]=V4;function Ye(){return Ye=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},Ye.apply(this,arguments)}function lC(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 qc=v.createContext(void 0);qc.displayName="FormikContext";qc.Provider;qc.Consumer;function U4(){var e=v.useContext(qc);return e}var mn=function(t){return typeof t=="function"},Gc=function(t){return t!==null&&typeof t=="object"},H4=function(t){return String(Math.floor(Number(t)))===t},Kd=function(t){return Object.prototype.toString.call(t)==="[object String]"},Xd=function(t){return Gc(t)&&mn(t.then)};function Lt(e,t,n,r){r===void 0&&(r=0);for(var i=rC(t);e&&r<i.length;)e=e[i[r++]];return r!==i.length&&!e||e===void 0?n:e}function Ui(e,t,n){for(var r=sx(e),i=r,s=0,o=rC(t);s<o.length-1;s++){var a=o[s],l=Lt(e,o.slice(0,s+1));if(l&&(Gc(l)||Array.isArray(l)))i=i[a]=sx(l);else{var c=o[s+1];i=i[a]=H4(c)&&Number(c)>=0?[]:{}}}return(s===0?e:i)[o[s]]===n?e:(n===void 0?delete i[o[s]]:i[o[s]]=n,s===0&&n===void 0&&delete r[o[s]],r)}function uC(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)?[]:{},uC(a,t,n,r[o])):r[o]=t}return r}function W4(e,t){switch(t.type){case"SET_VALUES":return Ye({},e,{values:t.payload});case"SET_TOUCHED":return Ye({},e,{touched:t.payload});case"SET_ERRORS":return bi(e.errors,t.payload)?e:Ye({},e,{errors:t.payload});case"SET_STATUS":return Ye({},e,{status:t.payload});case"SET_ISSUBMITTING":return Ye({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return Ye({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return Ye({},e,{values:Ui(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return Ye({},e,{touched:Ui(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return Ye({},e,{errors:Ui(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return Ye({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return Ye({},e,{touched:uC(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return Ye({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return Ye({},e,{isSubmitting:!1});default:return e}}var vi={},$l={};function q4(e){var t=e.validateOnChange,n=t===void 0?!0:t,r=e.validateOnBlur,i=r===void 0?!0:r,s=e.validateOnMount,o=s===void 0?!1:s,a=e.isInitialValid,l=e.enableReinitialize,c=l===void 0?!1:l,d=e.onSubmit,u=lC(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),f=Ye({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:d},u),p=v.useRef(f.initialValues),h=v.useRef(f.initialErrors||vi),m=v.useRef(f.initialTouched||$l),x=v.useRef(f.initialStatus),g=v.useRef(!1),w=v.useRef({});v.useEffect(function(){return g.current=!0,function(){g.current=!1}},[]);var b=v.useState(0),k=b[1],T=v.useRef({values:Il(f.initialValues),errors:Il(f.initialErrors)||vi,touched:Il(f.initialTouched)||$l,status:Il(f.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),E=T.current,_=v.useCallback(function(j){var z=T.current;T.current=W4(z,j),z!==T.current&&k(function(A){return A+1})},[]),P=v.useCallback(function(j,z){return new Promise(function(A,D){var G=f.validate(j,z);G==null?A(vi):Xd(G)?G.then(function(Z){A(Z||vi)},function(Z){D(Z)}):A(G)})},[f.validate]),M=v.useCallback(function(j,z){var A=f.validationSchema,D=mn(A)?A(z):A,G=z&&D.validateAt?D.validateAt(z,j):Q4(j,D);return new Promise(function(Z,ae){G.then(function(){Z(vi)},function(Ve){Ve.name==="ValidationError"?Z(G4(Ve)):ae(Ve)})})},[f.validationSchema]),N=v.useCallback(function(j,z){return new Promise(function(A){return A(w.current[j].validate(z))})},[]),R=v.useCallback(function(j){var z=Object.keys(w.current).filter(function(D){return mn(w.current[D].validate)}),A=z.length>0?z.map(function(D){return N(D,Lt(j,D))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(A).then(function(D){return D.reduce(function(G,Z,ae){return Z==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||Z&&(G=Ui(G,z[ae],Z)),G},{})})},[N]),F=v.useCallback(function(j){return Promise.all([R(j),f.validationSchema?M(j):{},f.validate?P(j):{}]).then(function(z){var A=z[0],D=z[1],G=z[2],Z=Qp.all([A,D,G],{arrayMerge:Y4});return Z})},[f.validate,f.validationSchema,R,P,M]),B=Xt(function(j){return j===void 0&&(j=E.values),_({type:"SET_ISVALIDATING",payload:!0}),F(j).then(function(z){return g.current&&(_({type:"SET_ISVALIDATING",payload:!1}),_({type:"SET_ERRORS",payload:z})),z})});v.useEffect(function(){o&&g.current===!0&&bi(p.current,f.initialValues)&&B(p.current)},[o,B]);var V=v.useCallback(function(j){var z=j&&j.values?j.values:p.current,A=j&&j.errors?j.errors:h.current?h.current:f.initialErrors||{},D=j&&j.touched?j.touched:m.current?m.current:f.initialTouched||{},G=j&&j.status?j.status:x.current?x.current:f.initialStatus;p.current=z,h.current=A,m.current=D,x.current=G;var Z=function(){_({type:"RESET_FORM",payload:{isSubmitting:!!j&&!!j.isSubmitting,errors:A,touched:D,status:G,values:z,isValidating:!!j&&!!j.isValidating,submitCount:j&&j.submitCount&&typeof j.submitCount=="number"?j.submitCount:0}})};if(f.onReset){var ae=f.onReset(E.values,fi);Xd(ae)?ae.then(Z):Z()}else Z()},[f.initialErrors,f.initialStatus,f.initialTouched,f.onReset]);v.useEffect(function(){g.current===!0&&!bi(p.current,f.initialValues)&&c&&(p.current=f.initialValues,V(),o&&B(p.current))},[c,f.initialValues,V,o,B]),v.useEffect(function(){c&&g.current===!0&&!bi(h.current,f.initialErrors)&&(h.current=f.initialErrors||vi,_({type:"SET_ERRORS",payload:f.initialErrors||vi}))},[c,f.initialErrors]),v.useEffect(function(){c&&g.current===!0&&!bi(m.current,f.initialTouched)&&(m.current=f.initialTouched||$l,_({type:"SET_TOUCHED",payload:f.initialTouched||$l}))},[c,f.initialTouched]),v.useEffect(function(){c&&g.current===!0&&!bi(x.current,f.initialStatus)&&(x.current=f.initialStatus,_({type:"SET_STATUS",payload:f.initialStatus}))},[c,f.initialStatus,f.initialTouched]);var K=Xt(function(j){if(w.current[j]&&mn(w.current[j].validate)){var z=Lt(E.values,j),A=w.current[j].validate(z);return Xd(A)?(_({type:"SET_ISVALIDATING",payload:!0}),A.then(function(D){return D}).then(function(D){_({type:"SET_FIELD_ERROR",payload:{field:j,value:D}}),_({type:"SET_ISVALIDATING",payload:!1})})):(_({type:"SET_FIELD_ERROR",payload:{field:j,value:A}}),Promise.resolve(A))}else if(f.validationSchema)return _({type:"SET_ISVALIDATING",payload:!0}),M(E.values,j).then(function(D){return D}).then(function(D){_({type:"SET_FIELD_ERROR",payload:{field:j,value:Lt(D,j)}}),_({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),ee=v.useCallback(function(j,z){var A=z.validate;w.current[j]={validate:A}},[]),ne=v.useCallback(function(j){delete w.current[j]},[]),O=Xt(function(j,z){_({type:"SET_TOUCHED",payload:j});var A=z===void 0?i:z;return A?B(E.values):Promise.resolve()}),$=v.useCallback(function(j){_({type:"SET_ERRORS",payload:j})},[]),H=Xt(function(j,z){var A=mn(j)?j(E.values):j;_({type:"SET_VALUES",payload:A});var D=z===void 0?n:z;return D?B(A):Promise.resolve()}),q=v.useCallback(function(j,z){_({type:"SET_FIELD_ERROR",payload:{field:j,value:z}})},[]),Q=Xt(function(j,z,A){_({type:"SET_FIELD_VALUE",payload:{field:j,value:z}});var D=A===void 0?n:A;return D?B(Ui(E.values,j,z)):Promise.resolve()}),te=v.useCallback(function(j,z){var A=z,D=j,G;if(!Kd(j)){j.persist&&j.persist();var Z=j.target?j.target:j.currentTarget,ae=Z.type,Ve=Z.name,tt=Z.id,Pn=Z.value,Qt=Z.checked,hs=Z.outerHTML,Zn=Z.options,wr=Z.multiple;A=z||Ve||tt,D=/number|range/.test(ae)?(G=parseFloat(Pn),isNaN(G)?"":G):/checkbox/.test(ae)?X4(Lt(E.values,A),Qt,Pn):Zn&&wr?K4(Zn):Pn}A&&Q(A,D)},[Q,E.values]),ce=Xt(function(j){if(Kd(j))return function(z){return te(z,j)};te(j)}),ye=Xt(function(j,z,A){z===void 0&&(z=!0),_({type:"SET_FIELD_TOUCHED",payload:{field:j,value:z}});var D=A===void 0?i:A;return D?B(E.values):Promise.resolve()}),re=v.useCallback(function(j,z){j.persist&&j.persist();var A=j.target,D=A.name,G=A.id,Z=A.outerHTML,ae=z||D||G;ye(ae,!0)},[ye]),Ne=Xt(function(j){if(Kd(j))return function(z){return re(z,j)};re(j)}),Je=v.useCallback(function(j){mn(j)?_({type:"SET_FORMIK_STATE",payload:j}):_({type:"SET_FORMIK_STATE",payload:function(){return j}})},[]),et=v.useCallback(function(j){_({type:"SET_STATUS",payload:j})},[]),Mt=v.useCallback(function(j){_({type:"SET_ISSUBMITTING",payload:j})},[]),_n=Xt(function(){return _({type:"SUBMIT_ATTEMPT"}),B().then(function(j){var z=j instanceof Error,A=!z&&Object.keys(j).length===0;if(A){var D;try{if(D=vr(),D===void 0)return}catch(G){throw G}return Promise.resolve(D).then(function(G){return g.current&&_({type:"SUBMIT_SUCCESS"}),G}).catch(function(G){if(g.current)throw _({type:"SUBMIT_FAILURE"}),G})}else if(g.current&&(_({type:"SUBMIT_FAILURE"}),z))throw j})}),dn=Xt(function(j){j&&j.preventDefault&&mn(j.preventDefault)&&j.preventDefault(),j&&j.stopPropagation&&mn(j.stopPropagation)&&j.stopPropagation(),_n().catch(function(z){console.warn("Warning: An unhandled error was caught from submitForm()",z)})}),fi={resetForm:V,validateForm:B,validateField:K,setErrors:$,setFieldError:q,setFieldTouched:ye,setFieldValue:Q,setStatus:et,setSubmitting:Mt,setTouched:O,setValues:H,setFormikState:Je,submitForm:_n},vr=Xt(function(){return d(E.values,fi)}),ps=Xt(function(j){j&&j.preventDefault&&mn(j.preventDefault)&&j.preventDefault(),j&&j.stopPropagation&&mn(j.stopPropagation)&&j.stopPropagation(),V()}),pi=v.useCallback(function(j){return{value:Lt(E.values,j),error:Lt(E.errors,j),touched:!!Lt(E.touched,j),initialValue:Lt(p.current,j),initialTouched:!!Lt(m.current,j),initialError:Lt(h.current,j)}},[E.errors,E.touched,E.values]),Ct=v.useCallback(function(j){return{setValue:function(A,D){return Q(j,A,D)},setTouched:function(A,D){return ye(j,A,D)},setError:function(A){return q(j,A)}}},[Q,ye,q]),yr=v.useCallback(function(j){var z=Gc(j),A=z?j.name:j,D=Lt(E.values,A),G={name:A,value:D,onChange:ce,onBlur:Ne};if(z){var Z=j.type,ae=j.value,Ve=j.as,tt=j.multiple;Z==="checkbox"?ae===void 0?G.checked=!!D:(G.checked=!!(Array.isArray(D)&&~D.indexOf(ae)),G.value=ae):Z==="radio"?(G.checked=D===ae,G.value=ae):Ve==="select"&&tt&&(G.value=G.value||[],G.multiple=!0)}return G},[Ne,ce,E.values]),Ge=v.useMemo(function(){return!bi(p.current,E.values)},[p.current,E.values]),xr=v.useMemo(function(){return typeof a<"u"?Ge?E.errors&&Object.keys(E.errors).length===0:a!==!1&&mn(a)?a(f):a:E.errors&&Object.keys(E.errors).length===0},[a,Ge,E.errors,f]),_o=Ye({},E,{initialValues:p.current,initialErrors:h.current,initialTouched:m.current,initialStatus:x.current,handleBlur:Ne,handleChange:ce,handleReset:ps,handleSubmit:dn,resetForm:V,setErrors:$,setFormikState:Je,setFieldTouched:ye,setFieldValue:Q,setFieldError:q,setStatus:et,setSubmitting:Mt,setTouched:O,setValues:H,submitForm:_n,validateForm:B,validateField:K,isValid:xr,dirty:Ge,unregisterField:ne,registerField:ee,getFieldProps:yr,getFieldMeta:pi,getFieldHelpers:Ct,validateOnBlur:i,validateOnChange:n,validateOnMount:o});return _o}function G4(e){var t={};if(e.inner){if(e.inner.length===0)return Ui(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;Lt(t,o.path)||(t=Ui(t,o.path,o.message))}}return t}function Q4(e,t,n,r){n===void 0&&(n=!1);var i=eh(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:i})}function eh(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||M0(i)?eh(i):i!==""?i:void 0}):M0(e[r])?t[r]=eh(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function Y4(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?Qp(Array.isArray(s)?[]:{},s,n):s}else n.isMergeableObject(s)?r[o]=Qp(e[o],s,n):e.indexOf(s)===-1&&r.push(s)}),r}function K4(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function X4(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 Z4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?v.useLayoutEffect:v.useEffect;function Xt(e){var t=v.useRef(e);return Z4(function(){t.current=e}),v.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 J4=v.forwardRef(function(e,t){var n=e.action,r=lC(e,["action"]),i=n??"#",s=U4(),o=s.handleReset,a=s.handleSubmit;return v.createElement("form",Ye({onSubmit:a,ref:t,onReset:o,action:i},r))});J4.displayName="Form";const cC=({init:e,schema:t,action:n})=>q4({initialValues:e,validationSchema:t,validateOnBlur:!1,enableReinitialize:!0,validateOnChange:!1,validateOnMount:!1,onSubmit:r=>{n(r)}});function eL(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 tL=e=>{switch(e){case"success":return iL;case"info":return oL;case"warning":return sL;case"error":return aL;default:return null}},nL=Array(12).fill(0),rL=({visible:e,className:t})=>L.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},L.createElement("div",{className:"sonner-spinner"},nL.map((n,r)=>L.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),iL=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.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"})),sL=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},L.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"})),oL=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.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"})),aL=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.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"})),lL=L.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"},L.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),L.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),uL=()=>{const[e,t]=L.useState(document.hidden);return L.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let th=1;class cL{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,s=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:th++,o=this.toasts.find(l=>l.id===s),a=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),o?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...t,id:s,title:r}),{...l,...t,id:s,dismissible:a,title:r}):l):this.addToast({title:r,...i,dismissible:a,id:s}),s},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0}))),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,o;const a=i.then(async c=>{if(o=["resolve",c],L.isValidElement(c))s=!1,this.create({id:r,type:"default",message:c});else if(fL(c)&&!c.ok){s=!1;const u=typeof n.error=="function"?await n.error(`HTTP error! status: ${c.status}`):n.error,f=typeof n.description=="function"?await n.description(`HTTP error! status: ${c.status}`):n.description,p=typeof u=="object"?u:{message:u};this.create({id:r,type:"error",description:f,...p})}else if(c instanceof Error){s=!1;const u=typeof n.error=="function"?await n.error(c):n.error,f=typeof n.description=="function"?await n.description(c):n.description,p=typeof u=="object"?u:{message:u};this.create({id:r,type:"error",description:f,...p})}else if(n.success!==void 0){s=!1;const u=typeof n.success=="function"?await n.success(c):n.success,f=typeof n.description=="function"?await n.description(c):n.description,p=typeof u=="object"?u:{message:u};this.create({id:r,type:"success",description:f,...p})}}).catch(async c=>{if(o=["reject",c],n.error!==void 0){s=!1;const d=typeof n.error=="function"?await n.error(c):n.error,u=typeof n.description=="function"?await n.description(c):n.description,f=typeof d=="object"?d:{message:d};this.create({id:r,type:"error",description:u,...f})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((c,d)=>a.then(()=>o[0]==="reject"?d(o[1]):c(o[1])).catch(d));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||th++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Pt=new cL,dL=(e,t)=>{const n=(t==null?void 0:t.id)||th++;return Pt.addToast({title:e,...t,id:n}),n},fL=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",pL=dL,hL=()=>Pt.toasts,mL=()=>Pt.getActiveToasts(),dC=Object.assign(pL,{success:Pt.success,info:Pt.info,warning:Pt.warning,error:Pt.error,custom:Pt.custom,message:Pt.message,promise:Pt.promise,dismiss:Pt.dismiss,loading:Pt.loading},{getHistory:hL,getToasts:mL});eL("[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 Bl(e){return e.label!==void 0}const gL=3,vL="24px",yL="16px",lx=4e3,xL=356,wL=14,bL=45,SL=200;function An(...e){return e.filter(Boolean).join(" ")}function kL(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,c;const{invert:d,toast:u,unstyled:f,interacting:p,setHeights:h,visibleToasts:m,heights:x,index:g,toasts:w,expanded:b,removeToast:k,defaultRichColors:T,closeButton:E,style:_,cancelButtonStyle:P,actionButtonStyle:M,className:N="",descriptionClassName:R="",duration:F,position:B,gap:V,expandByDefault:K,classNames:ee,icons:ne,closeButtonAriaLabel:O="Close toast"}=e,[$,H]=L.useState(null),[q,Q]=L.useState(null),[te,ce]=L.useState(!1),[ye,re]=L.useState(!1),[Ne,Je]=L.useState(!1),[et,Mt]=L.useState(!1),[_n,dn]=L.useState(!1),[fi,vr]=L.useState(0),[ps,pi]=L.useState(0),Ct=L.useRef(u.duration||F||lx),yr=L.useRef(null),Ge=L.useRef(null),xr=g===0,_o=g+1<=m,j=u.type,z=u.dismissible!==!1,A=u.className||"",D=u.descriptionClassName||"",G=L.useMemo(()=>x.findIndex(ie=>ie.toastId===u.id)||0,[x,u.id]),Z=L.useMemo(()=>{var ie;return(ie=u.closeButton)!=null?ie:E},[u.closeButton,E]),ae=L.useMemo(()=>u.duration||F||lx,[u.duration,F]),Ve=L.useRef(0),tt=L.useRef(0),Pn=L.useRef(0),Qt=L.useRef(null),[hs,Zn]=B.split("-"),wr=L.useMemo(()=>x.reduce((ie,Qe,lt)=>lt>=G?ie:ie+Qe.height,0),[x,G]),ms=uL(),Po=u.invert||d,hi=j==="loading";tt.current=L.useMemo(()=>G*V+wr,[G,wr]),L.useEffect(()=>{Ct.current=ae},[ae]),L.useEffect(()=>{ce(!0)},[]),L.useEffect(()=>{const ie=Ge.current;if(ie){const Qe=ie.getBoundingClientRect().height;return pi(Qe),h(lt=>[{toastId:u.id,height:Qe,position:u.position},...lt]),()=>h(lt=>lt.filter(Nt=>Nt.toastId!==u.id))}},[h,u.id]),L.useLayoutEffect(()=>{if(!te)return;const ie=Ge.current,Qe=ie.style.height;ie.style.height="auto";const lt=ie.getBoundingClientRect().height;ie.style.height=Qe,pi(lt),h(Nt=>Nt.find(nt=>nt.toastId===u.id)?Nt.map(nt=>nt.toastId===u.id?{...nt,height:lt}:nt):[{toastId:u.id,height:lt,position:u.position},...Nt])},[te,u.title,u.description,h,u.id]);const jn=L.useCallback(()=>{re(!0),vr(tt.current),h(ie=>ie.filter(Qe=>Qe.toastId!==u.id)),setTimeout(()=>{k(u)},SL)},[u,k,h,tt]);L.useEffect(()=>{if(u.promise&&j==="loading"||u.duration===1/0||u.type==="loading")return;let ie;return b||p||ms?(()=>{if(Pn.current<Ve.current){const Nt=new Date().getTime()-Ve.current;Ct.current=Ct.current-Nt}Pn.current=new Date().getTime()})():(()=>{Ct.current!==1/0&&(Ve.current=new Date().getTime(),ie=setTimeout(()=>{u.onAutoClose==null||u.onAutoClose.call(u,u),jn()},Ct.current))})(),()=>clearTimeout(ie)},[b,p,u,j,ms,jn]),L.useEffect(()=>{u.delete&&jn()},[jn,u.delete]);function GC(){var ie;if(ne!=null&&ne.loading){var Qe;return L.createElement("div",{className:An(ee==null?void 0:ee.loader,u==null||(Qe=u.classNames)==null?void 0:Qe.loader,"sonner-loader"),"data-visible":j==="loading"},ne.loading)}return L.createElement(rL,{className:An(ee==null?void 0:ee.loader,u==null||(ie=u.classNames)==null?void 0:ie.loader),visible:j==="loading"})}var Sg,kg;return L.createElement("li",{tabIndex:0,ref:Ge,className:An(N,A,ee==null?void 0:ee.toast,u==null||(t=u.classNames)==null?void 0:t.toast,ee==null?void 0:ee.default,ee==null?void 0:ee[j],u==null||(n=u.classNames)==null?void 0:n[j]),"data-sonner-toast":"","data-rich-colors":(Sg=u.richColors)!=null?Sg:T,"data-styled":!(u.jsx||u.unstyled||f),"data-mounted":te,"data-promise":!!u.promise,"data-swiped":_n,"data-removed":ye,"data-visible":_o,"data-y-position":hs,"data-x-position":Zn,"data-index":g,"data-front":xr,"data-swiping":Ne,"data-dismissible":z,"data-type":j,"data-invert":Po,"data-swipe-out":et,"data-swipe-direction":q,"data-expanded":!!(b||K&&te),style:{"--index":g,"--toasts-before":g,"--z-index":w.length-g,"--offset":`${ye?fi:tt.current}px`,"--initial-height":K?"auto":`${ps}px`,..._,...u.style},onDragEnd:()=>{Je(!1),H(null),Qt.current=null},onPointerDown:ie=>{hi||!z||(yr.current=new Date,vr(tt.current),ie.target.setPointerCapture(ie.pointerId),ie.target.tagName!=="BUTTON"&&(Je(!0),Qt.current={x:ie.clientX,y:ie.clientY}))},onPointerUp:()=>{var ie,Qe,lt;if(et||!z)return;Qt.current=null;const Nt=Number(((ie=Ge.current)==null?void 0:ie.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),cl=Number(((Qe=Ge.current)==null?void 0:Qe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),nt=new Date().getTime()-((lt=yr.current)==null?void 0:lt.getTime()),Yt=$==="x"?Nt:cl,dl=Math.abs(Yt)/nt;if(Math.abs(Yt)>=bL||dl>.11){vr(tt.current),u.onDismiss==null||u.onDismiss.call(u,u),Q($==="x"?Nt>0?"right":"left":cl>0?"down":"up"),jn(),Mt(!0);return}else{var fn,pn;(fn=Ge.current)==null||fn.style.setProperty("--swipe-amount-x","0px"),(pn=Ge.current)==null||pn.style.setProperty("--swipe-amount-y","0px")}dn(!1),Je(!1),H(null)},onPointerMove:ie=>{var Qe,lt,Nt;if(!Qt.current||!z||((Qe=window.getSelection())==null?void 0:Qe.toString().length)>0)return;const nt=ie.clientY-Qt.current.y,Yt=ie.clientX-Qt.current.x;var dl;const fn=(dl=e.swipeDirections)!=null?dl:kL(B);!$&&(Math.abs(Yt)>1||Math.abs(nt)>1)&&H(Math.abs(Yt)>Math.abs(nt)?"x":"y");let pn={x:0,y:0};const Cg=mi=>1/(1.5+Math.abs(mi)/20);if($==="y"){if(fn.includes("top")||fn.includes("bottom"))if(fn.includes("top")&&nt<0||fn.includes("bottom")&&nt>0)pn.y=nt;else{const mi=nt*Cg(nt);pn.y=Math.abs(mi)<Math.abs(nt)?mi:nt}}else if($==="x"&&(fn.includes("left")||fn.includes("right")))if(fn.includes("left")&&Yt<0||fn.includes("right")&&Yt>0)pn.x=Yt;else{const mi=Yt*Cg(Yt);pn.x=Math.abs(mi)<Math.abs(Yt)?mi:Yt}(Math.abs(pn.x)>0||Math.abs(pn.y)>0)&&dn(!0),(lt=Ge.current)==null||lt.style.setProperty("--swipe-amount-x",`${pn.x}px`),(Nt=Ge.current)==null||Nt.style.setProperty("--swipe-amount-y",`${pn.y}px`)}},Z&&!u.jsx&&j!=="loading"?L.createElement("button",{"aria-label":O,"data-disabled":hi,"data-close-button":!0,onClick:hi||!z?()=>{}:()=>{jn(),u.onDismiss==null||u.onDismiss.call(u,u)},className:An(ee==null?void 0:ee.closeButton,u==null||(r=u.classNames)==null?void 0:r.closeButton)},(kg=ne==null?void 0:ne.close)!=null?kg:lL):null,j||u.icon||u.promise?L.createElement("div",{"data-icon":"",className:An(ee==null?void 0:ee.icon,u==null||(i=u.classNames)==null?void 0:i.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||GC():null,u.type!=="loading"?u.icon||(ne==null?void 0:ne[j])||tL(j):null):null,L.createElement("div",{"data-content":"",className:An(ee==null?void 0:ee.content,u==null||(s=u.classNames)==null?void 0:s.content)},L.createElement("div",{"data-title":"",className:An(ee==null?void 0:ee.title,u==null||(o=u.classNames)==null?void 0:o.title)},u.jsx?u.jsx:typeof u.title=="function"?u.title():u.title),u.description?L.createElement("div",{"data-description":"",className:An(R,D,ee==null?void 0:ee.description,u==null||(a=u.classNames)==null?void 0:a.description)},typeof u.description=="function"?u.description():u.description):null),L.isValidElement(u.cancel)?u.cancel:u.cancel&&Bl(u.cancel)?L.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||P,onClick:ie=>{Bl(u.cancel)&&z&&(u.cancel.onClick==null||u.cancel.onClick.call(u.cancel,ie),jn())},className:An(ee==null?void 0:ee.cancelButton,u==null||(l=u.classNames)==null?void 0:l.cancelButton)},u.cancel.label):null,L.isValidElement(u.action)?u.action:u.action&&Bl(u.action)?L.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||M,onClick:ie=>{Bl(u.action)&&(u.action.onClick==null||u.action.onClick.call(u.action,ie),!ie.defaultPrevented&&jn())},className:An(ee==null?void 0:ee.actionButton,u==null||(c=u.classNames)==null?void 0:c.actionButton)},u.action.label):null)};function ux(){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 TL(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,o=s?"--mobile-offset":"--offset",a=s?yL:vL;function l(c){["top","right","bottom","left"].forEach(d=>{n[`${o}-${d}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${o}-${c}`]=a:n[`${o}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}const EL=L.forwardRef(function(t,n){const{invert:r,position:i="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:a,className:l,offset:c,mobileOffset:d,theme:u="light",richColors:f,duration:p,style:h,visibleToasts:m=gL,toastOptions:x,dir:g=ux(),gap:w=wL,icons:b,containerAriaLabel:k="Notifications"}=t,[T,E]=L.useState([]),_=L.useMemo(()=>Array.from(new Set([i].concat(T.filter(q=>q.position).map(q=>q.position)))),[T,i]),[P,M]=L.useState([]),[N,R]=L.useState(!1),[F,B]=L.useState(!1),[V,K]=L.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ee=L.useRef(null),ne=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=L.useRef(null),$=L.useRef(!1),H=L.useCallback(q=>{E(Q=>{var te;return(te=Q.find(ce=>ce.id===q.id))!=null&&te.delete||Pt.dismiss(q.id),Q.filter(({id:ce})=>ce!==q.id)})},[]);return L.useEffect(()=>Pt.subscribe(q=>{if(q.dismiss){const Q=T.map(te=>te.id===q.id?{...te,delete:!0}:te);requestAnimationFrame(()=>{E(Q)});return}setTimeout(()=>{b_.flushSync(()=>{E(Q=>{const te=Q.findIndex(ce=>ce.id===q.id);return te!==-1?[...Q.slice(0,te),{...Q[te],...q},...Q.slice(te+1)]:[q,...Q]})})})}),[T]),L.useEffect(()=>{if(u!=="system"){K(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?K("dark"):K("light")),typeof window>"u")return;const q=window.matchMedia("(prefers-color-scheme: dark)");try{q.addEventListener("change",({matches:Q})=>{K(Q?"dark":"light")})}catch{q.addListener(({matches:te})=>{try{K(te?"dark":"light")}catch(ce){console.error(ce)}})}},[u]),L.useEffect(()=>{T.length<=1&&R(!1)},[T]),L.useEffect(()=>{const q=Q=>{var te;if(s.every(re=>Q[re]||Q.code===re)){var ye;R(!0),(ye=ee.current)==null||ye.focus()}Q.code==="Escape"&&(document.activeElement===ee.current||(te=ee.current)!=null&&te.contains(document.activeElement))&&R(!1)};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[s]),L.useEffect(()=>{if(ee.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,$.current=!1)}},[ee.current]),L.createElement("section",{ref:n,"aria-label":`${k} ${ne}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},_.map((q,Q)=>{var te;const[ce,ye]=q.split("-");return T.length?L.createElement("ol",{key:q,dir:g==="auto"?ux():g,tabIndex:-1,ref:ee,className:l,"data-sonner-toaster":!0,"data-sonner-theme":V,"data-y-position":ce,"data-lifted":N&&T.length>1&&!o,"data-x-position":ye,style:{"--front-toast-height":`${((te=P[0])==null?void 0:te.height)||0}px`,"--width":`${xL}px`,"--gap":`${w}px`,...h,...TL(c,d)},onBlur:re=>{$.current&&!re.currentTarget.contains(re.relatedTarget)&&($.current=!1,O.current&&(O.current.focus({preventScroll:!0}),O.current=null))},onFocus:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||$.current||($.current=!0,O.current=re.relatedTarget)},onMouseEnter:()=>R(!0),onMouseMove:()=>R(!0),onMouseLeave:()=>{F||R(!1)},onDragEnd:()=>R(!1),onPointerDown:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||B(!0)},onPointerUp:()=>B(!1)},T.filter(re=>!re.position&&Q===0||re.position===q).map((re,Ne)=>{var Je,et;return L.createElement(CL,{key:re.id,icons:b,index:Ne,toast:re,defaultRichColors:f,duration:(Je=x==null?void 0:x.duration)!=null?Je:p,className:x==null?void 0:x.className,descriptionClassName:x==null?void 0:x.descriptionClassName,invert:r,visibleToasts:m,closeButton:(et=x==null?void 0:x.closeButton)!=null?et:a,interacting:F,position:q,style:x==null?void 0:x.style,unstyled:x==null?void 0:x.unstyled,classNames:x==null?void 0:x.classNames,cancelButtonStyle:x==null?void 0:x.cancelButtonStyle,actionButtonStyle:x==null?void 0:x.actionButtonStyle,closeButtonAriaLabel:x==null?void 0:x.closeButtonAriaLabel,removeToast:H,toasts:T.filter(Mt=>Mt.position==re.position),heights:P.filter(Mt=>Mt.position==re.position),setHeights:M,expandByDefault:o,gap:w,expanded:N,swipeDirections:t.swipeDirections})})):null}))});function Bn(e){return dC.custom(t=>y.jsx(_L,{id:t,title:e.title,description:e.description,variant:e.variant}))}const Zd={success:{bg:"bg-green-100 border-green-200",text:"text-green-800"},error:{bg:"bg-red-100 border-red-200",text:"text-red-800"},warning:{bg:"bg-orange-100 border-orange-200",text:"text-orange-800"},info:{bg:"bg-blue-100 border-blue-200",text:"text-blue-800"}};function _L(e){const{title:t,description:n,button:r,id:i,variant:s}=e;return y.jsxs("div",{className:ge("flex rounded-lg shadow-lg ring-1 ring-black/5 w-full md:max-w-[364px] items-center p-3 backdrop-blur-sm border mb-2",Zd[s||"info"].bg),children:[y.jsx("div",{className:"flex flex-1 items-center",children:y.jsxs("div",{className:"w-full",children:[t&&y.jsx("p",{className:ge("text-sm font-medium",Zd[s||"info"].text),children:t}),y.jsx("p",{className:ge("text-sm",Zd[s||"info"].text,{"mt-1":!!t}),children:n})]})}),r&&y.jsx("div",{className:"ml-5 shrink-0 rounded-md text-sm font-medium text-indigo-600 hover:text-indigo-500 focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 focus:outline-hidden",children:y.jsx("button",{className:"rounded bg-indigo-50 px-3 py-1 text-sm font-semibold text-indigo-600 hover:bg-indigo-100",onClick:()=>{r.onClick(),dC.dismiss(i)},children:r.label})})]})}function PL(e){return Array.isArray(e)&&e[0].field!==void 0}const fC=(e,t)=>{var n;if(PL(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||Bn({description:e.message,variant:"error"});return}if(e&&e.error){t!=null&&t.noToast||Bn({description:e.error,variant:"error"});return}},jL=[{code:429,text:"Çok fazla istek gönderdiniz. Lütfen biraz bekleyin"},{code:401,text:"Bu işlemi yapabilmek için giriş yapmalısınız"},{code:403,text:"Bu işlemi yapabilmek için yetkiniz yok"},{code:500,text:"Sunucu hatası oluştu"},{code:422,text:"Form doğrulaması başarısız oldu"},{code:413,text:"Yüklenen dosya boyutu izin verilen sınırı aştı"}],RL=[{code:"FST_REQ_FILE_TOO_LARGE",text:"Yüklenen dosya boyutu izin verilen sınırı aştı"}],AL=(e,t)=>{if(Za(t))return!1;if(e===null)return Bn({description:"Bir hata oluştu",variant:"error"}),!0;if(typeof e=="object"&&e){const r=e.code;if(r){const i=RL.find(s=>s.code===r);if(i)return Bn({description:i.text,variant:"error"}),!0}if(e.message)return Bn({description:e.message,variant:"error"}),!0}const n=jL.find(r=>r.code===t);return Bn({description:n?n.text:"Bir hata oluştu",variant:"error"}),!0};function OL(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 gg({id:e,text:t,className:n,required:r}){const i=Oe();return t?y.jsxs("label",{htmlFor:e,className:ge("mb-1 block text-sm font-medium",n),style:{color:i.getColor(C.InputText)},children:[t,r&&y.jsx("span",{className:"ml-1",style:{color:i.getColor(C.ErrorText)},children:"*"})]}):null}const Jd={sm:"px-3 py-1 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-15"};function DL({id:e,label:t,suffix:n,prefix:r,size:i="md",type:s="text",noMargin:o=!1,required:a=!1,error:l,ariaDescribedBy:c,className:d,ariaInvalid:u,ariaLabel:f,autoFocus:p,...h}){const m=Oe();return y.jsxs("div",{className:ge({"mb-2":!o},d),children:[y.jsx(gg,{id:e,text:t,required:a}),y.jsxs("div",{className:"flex items-center",children:[r&&y.jsx("span",{className:ge("inline-block border border-solid border-r-0 rounded-l-md",Jd[i]),style:{borderColor:l?m.getColor(C.ErrorBorder):m.getColor(C.InputBorder),backgroundColor:m.getColor(C.InputBackground),borderRadius:m.getRadius()},children:r}),y.jsx("input",{id:e,className:ge("border border-solid block text-base py-2 px-3 w-full focus:outline-hidden",Jd[i],{"rounded-l-none":!!r,"rounded-r-none":!!n}),type:s,required:a,"aria-describedby":c,"aria-invalid":u,"aria-label":f,style:{fontSize:"16px",color:l?m.getColor(C.ErrorText):m.getColor(C.InputText),backgroundColor:m.getColor(C.InputBackground),borderColor:l?m.getColor(C.ErrorBorder):m.getColor(C.InputBorder),borderRadius:m.getRadius()},...h}),n&&y.jsx("span",{className:ge("inline-block border border-solid border-l-0 rounded-r-md",Jd[i]),style:{borderColor:l?m.getColor(C.ErrorBorder):m.getColor(C.InputBorder),backgroundColor:m.getColor(C.InputBackground),borderRadius:m.getRadius()},children:n})]}),!!l&&y.jsx("p",{className:"mt-1 text-xs",style:{color:m.getColor(C.ErrorText)},children:l})]})}const FL=(e,t)=>{document.cookie=`${e}=${t}`},pC=v.createContext({}),ML=()=>`${window.location.pathname}_$$_${document.title}`,NL=()=>{const e=localStorage.getItem("page");return!e||e===""?"/":e},LL=()=>{const e=localStorage.getItem("p-history");if(!e||e==="")return[];try{return JSON.parse(e)}catch{return[]}};function IL({children:e}){const[t,n]=v.useState("/"),[r,i]=v.useState(LL());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 y.jsx(pC.Provider,{value:{page:t,setPage:o,history:r,clearHistory:s},children:e})}function vg(){return v.useContext(pC)}function $L({label:e,id:t,value:n="",className:r,placeholder:i,children:s,required:o,error:a,...l}){return y.jsxs("div",{className:r||"",children:[e&&y.jsx(gg,{id:t,required:o,text:e}),y.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&&y.jsx("p",{className:"1 texm text-r500",children:a})]})}const cx={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:""}},BL={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"},zL={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"},VL={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 UL({children:e,name:t,required:n,value:r,checked:i,onChange:s,onBlur:o,red:a,id:l=t,size:c="md",effect:d="ring",reversed:u=!1,variant:f="blue",error:p,...h}){return y.jsxs("div",{children:[y.jsxs("div",{className:`flex items-center justify-between ${u?"flex-row-reverse":""} ${cx[d].label}`,children:[y.jsxs("label",{className:"disable-highlight relative mr-3 flex cursor-pointer items-center rounded-full",htmlFor:l,children:[y.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 ${BL[f]} ${zL[c]} ${cx[d].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}),y.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:y.jsx(fe.Check,{className:VL[c]})})]}),y.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&&y.jsx("small",{className:"text-xs text-red-500",children:a}),p&&y.jsx("small",{className:"text-xs text-red-500",children:p})]})}function HL({id:e,value:t,name:n,onChange:r,children:i,disabled:s,className:o}){return y.jsxs("label",{htmlFor:e,className:ge("relative flex cursor-pointer items-center rounded-md focus:outline-none",{"opacity-60 cursor-not-allowed":s},o),children:[y.jsx("input",{type:"radio",id:e,name:n,value:e,checked:t,defaultChecked: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}),y.jsx("span",{className:"ml-2 text-sm font-medium text-slate-700",children:i})]})}function WL({id:e,label:t,children:n,required:r,className:i,error:s}){return y.jsxs("fieldset",{id:e,className:i,children:[t&&y.jsxs("legend",{className:"mb-1 block text-sm font-medium text-slate-700",children:[t," ",r&&y.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),y.jsx("div",{className:"flex flex-col gap-1.5 mt-0.5",children:n}),s&&y.jsx("p",{className:"text-red-500 text-sm",children:s})]})}const dx=Object.assign(HL,{Group:WL});function yg({id:e,label:t,suffix:n,prefix:r,className:i,noMargin:s,rows:o=3,type:a="text",required:l=!1,error:c,ariaInvalid:d,inputRef:u,autoFocus:f=!0,style:p,...h}){const m=Oe();return y.jsxs("div",{className:ge({"mb-2":!s},i),children:[t&&y.jsx(gg,{id:e,text:t,required:l}),y.jsx("textarea",{className:ge("resize-none max-h-36 w-full py-2 px-3 border border-solid block focus:outline-hidden"),id:e,rows:o,"aria-invalid":d,...h,ref:u,autoFocus:f,style:{...p,fontSize:"16px",color:c?m.getColor(C.ErrorText):m.getColor(C.InputText),backgroundColor:m.getColor(C.InputBackground),borderColor:c?m.getColor(C.ErrorBorder):m.getColor(C.InputBorder),borderRadius:m.getRadius()}}),!!c&&y.jsx("p",{className:"mt-1 text-xs",style:{color:m.getColor(C.ErrorText)},children:c})]})}function qL({onOk:e,clientId:t,widgetId:n,appearance:r}){var b,k,T,E,_,P,M,N;const i=Oe(),{defaultValues:s,widget:o,setIsHaveChat:a}=kt(),[l,c]=v.useState(!1),d=vg(),u=jD(),f=!!s&&"username"in s,p=(k=(b=r==null?void 0:r.body)==null?void 0:b.inputs)==null?void 0:k.reduce((R,F)=>{let B=F.remember?uu(F.name):s==null?void 0:s[F.name];return F.options&&B&&!F.options.includes(B)&&(B=void 0),F.name==="username"&&f&&(B=s.username),R[F.name]=B||"",R},{}),h=(E=(T=r==null?void 0:r.body)==null?void 0:T.inputs)==null?void 0:E.reduce((R,F)=>(R[F.name]="",R),{}),m=rg((P=(_=r==null?void 0:r.body)==null?void 0:_.inputs)==null?void 0:P.reduce((R,F)=>(R[F.name]=F.required?Xu().required(`${F.label} alanı zorunludur`):Xu(),R),{})),x=cC({init:{...p},schema:m,action:async R=>{var F;if(!l){c(!0);try{f&&(R.username=s.username),s!=null&&s.secret_data&&(R.secret_data=s.secret_data);for(const K in R)typeof R[K]=="string"&&(R[K]=R[K].trim());const[B,V]=await u.mutateAsync({inputs:R,history:d.history,client_id:t,widget_id:n});if(Za(V)){PD(B)&&(Wd(Qn.CustomerToken,B.customer_token,(o==null?void 0:o.link_id)||""),Wd(Qn.CustomerRefreshToken,B.customer_refresh_token,(o==null?void 0:o.link_id)||""),Wd(Qn.DeviceId,B.device_id,(o==null?void 0:o.link_id)||"")),d.clearHistory();for(const K of((F=r==null?void 0:r.body)==null?void 0:F.inputs)||[])K.remember&&FL(K.name,R[K.name]);a(!0),e==null||e();return}fC(B,{form:x})}catch(B){console.error("Chat creation error:",B)}finally{c(!1)}}}});v.useEffect(()=>{if(l){const R=i.getColor(C.GreeterBackground);document.documentElement.style.setProperty("--chat-transition-bg",R)}},[l,i]);const g=!OL(h||{},(x==null?void 0:x.values)||{}),w=i.getColor(C.GreeterBackground);return y.jsx(ve.section,{className:"h-full overflow-y-auto px-4 py-3",style:{backgroundColor:w},initial:{opacity:1},animate:{opacity:l?.7:1,transition:{duration:.5,ease:"easeInOut"}},exit:{opacity:0,transition:{duration:.3}},children:y.jsxs("form",{autoComplete:"off",className:"grid grid-cols-1 gap-2",onSubmit:R=>{R.preventDefault(),x.handleSubmit()},children:[(N=(M=r==null?void 0:r.body)==null?void 0:M.inputs)==null?void 0:N.map(R=>{var F,B;if(["text","email","phone"].includes(R.type))return y.jsx(DL,{id:R.name,name:R.name,type:R.type,label:R.label,value:x.values[R.name],onChange:x.handleChange,onBlur:x.handleBlur,disabled:R.name==="username"&&f,readOnly:R.name==="username"&&f,autoComplete:"off",placeholder:R.placeholder,error:x.errors[R.name],ariaInvalid:x.errors.name?!0:void 0,required:R.required,noMargin:!0},R.name);if(R.type==="select")return y.jsx($L,{id:R.name,name:R.name,value:x.values[R.name],onChange:x.handleChange,label:R.label,error:x.errors[R.name],required:R.required,children:(F=R.options)==null?void 0:F.map(V=>y.jsx("option",{value:V,children:V},V))},R.name);if(R.type==="checkbox")return y.jsx(UL,{id:R.name,name:R.name,value:x.values[R.name],checked:x.values[R.name]==="true",onChange:x.handleChange,required:R.required,error:x.errors[R.name],children:R.label},R.name);if(R.type==="radio")return y.jsx(dx.Group,{id:R.name,label:R.label,required:R.required,error:x.errors[R.name],children:(B=R.options)==null?void 0:B.map(V=>y.jsx(dx,{onChange:K=>{K?x.setFieldValue(R.name,V):x.setFieldValue(R.name,"")},id:V,name:R.name,value:V===x.values[R.name],children:V},V))},R.name);if(R.type==="textarea")return y.jsx(yg,{id:R.name,name:R.name,value:x.values[R.name],onChange:x.handleChange,placeholder:R.placeholder,error:x.errors[R.name],required:R.required,label:R.label},R.name)}),y.jsx(on,{textKey:C.GreeterButtonText,bgKey:C.GreeterButtonBackground,type:"submit",disabled:!g||l,className:"mt-2 transition-all duration-300 hover:opacity-90 transform hover:translate-y-[-1px] shadow-sm",children:l?y.jsxs("div",{className:"flex items-center justify-center",children:[y.jsx("span",{className:"mr-2",children:"Yükleniyor"}),y.jsx(ve.span,{initial:{opacity:.5},animate:{opacity:[.5,1,.5]},transition:{duration:1.5,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"},children:"..."})]}):"Sohbet Oluştur"})]})})}function GL({onClose:e}){const t=Oe();return y.jsx(on,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"md",rounded:!0,onClick:e,className:"absolute top-2 right-2 hover:opacity-80 transition-opacity",style:{backgroundColor:t.getColor(C.CloseButtonBackground),color:t.getColor(C.CloseButtonText)},withoutTheming:!0,children:y.jsx(fe.X,{className:"size-5",style:{color:t.getColor(C.CloseButtonText)}})})}function QL({image_url:e,name:t,size:n="size-9"}){const r=Oe();return e?y.jsx("img",{src:e,alt:t,className:ge("rounded-md",n)}):y.jsx("div",{className:"flex items-center justify-center gap-1",children:y.jsx(fe.Website,{className:ge(n),style:{color:r.getColor(C.IconColor)}})})}function YL(){const e=vg(),t=v.useCallback(()=>{const n=window.location.pathname;n!==e.page&&e.setPage(n)},[e.page]);return Km("popstate",t),null}function KL(){const e=ci(),t=vg(),n=v.useCallback(()=>{const r=window.location.pathname;if(r!==t.page){if(e){e.emit(En.PageChange,{page:r});return}t.setPage(r)}},[e,t.page]);return Km("popstate",n),v.useEffect(()=>{if(!e)return;const r=NL(),i=ML();r!==i&&(e.emit(En.PageChange,{page:i}),t.setPage(i))},[e]),null}function XL({children:e}){const t=Oe(),{widget:n}=kt();if(!n)return null;const r=ss();return y.jsx(Xr,{children:y.jsxs(ve.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:[y.jsx(ve.div,{initial:{opacity:.8},animate:{opacity:1},transition:{duration:.2},style:{background:t.getColor(C.GreeterTopBackground)},className:`h-44 absolute top-0 left-0 w-full ${r?"":"rounded-t-xl"} flex flex-col items-center justify-center shadow-sm`}),e]})})}function ZL(){return YL(),null}const ef=(e,t)=>{var n;return(n=e.find(r=>r.type===t))==null?void 0:n.content};function JL(){var m,x,g,w,b,k;const e=Oe(),{widget:t,setOpen:n}=kt(),[r,i]=v.useState(!0),[s,o]=v.useState(!1),a=jc(),l=ss(),c=Xm(),d=ol();if(!t)return null;const u=()=>{n(!1)};if(v.useEffect(()=>{if(s){i(!1);return}if(!d||!d.accessToken){i(!1);return}RD(t.client_id,ho(d)).then(([T,E])=>{Za(E)?a.push("chat"):(aa(t.link_id||""),o(!0))}).catch(()=>{aa(t.link_id||""),o(!0)}).finally(()=>{i(!1)})},[s]),r)return null;const f=ef(((x=(m=t.appearance)==null?void 0:m.head)==null?void 0:x.elements)||[],"text"),p=ef(((w=(g=t.appearance)==null?void 0:g.head)==null?void 0:w.elements)||[],"title"),h=ef(((k=(b=t.appearance)==null?void 0:b.head)==null?void 0:k.elements)||[],"logo");return y.jsxs(XL,{children:[y.jsxs("div",{className:"relative flex flex-col gap-3 items-center justify-center h-44",style:{backgroundColor:e.getColor(C.GreeterTopBackground)},children:[!c&&l&&y.jsx(GL,{onClose:u}),h&&y.jsx(ve.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},transition:{delay:.1,duration:.2},children:y.jsx(QL,{name:t.name,image_url:h,size:"size-20"})}),p&&y.jsx(ve.div,{initial:{y:5,opacity:0},animate:{y:0,opacity:1},transition:{delay:.15,duration:.2},style:{color:e.getColor(C.GreeterTopText)},className:"text-xl font-bold",children:p}),f&&y.jsx(ve.div,{initial:{y:5,opacity:0},animate:{y:0,opacity:1},transition:{delay:.2,duration:.2},style:{color:e.getColor(C.GreeterTopText)},className:"text-sm opacity-90",children:f})]}),y.jsx(ve.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.25,duration:.2},className:"overflow-y-auto",style:{height:l?"calc(var(--app-height,100dvh) - 11rem)":"calc(100% - 11rem)"},children:y.jsx(qL,{clientId:t.client_id,widgetId:t.link_id,appearance:t.appearance,onOk:()=>{a.push("chat")}})})]})}function eI(){return y.jsxs(y.Fragment,{children:[y.jsx(wk,{border:!0,children:y.jsx(JL,{})}),y.jsx(ZL,{})]})}const tI=[{path:"/",component:eI,name:"registration"}];var ys=(e=>(e.Open="open",e.Closed="closed",e.Pending="pending",e.Deleted="deleted",e.Created="created",e))(ys||{}),ki=(e=>(e.AdminJoin="admin_join",e.ChatCreated="chat_created",e))(ki||{}),Le=(e=>(e.Customer="customer",e.User="user",e.System="system",e.Activity="activity",e))(Le||{});function nI({name:e,avatar:t,className:n="text-neutral-500",textColor:r}){return y.jsxs(ve.div,{initial:{opacity:.8},animate:{opacity:1},className:"flex gap-2 items-center",children:[y.jsx("div",{className:"min-w-max",children:y.jsxs("span",{children:[t&&y.jsx("img",{className:"size-10 rounded-full border border-white/20 shadow-sm",src:t,"aria-label":e}),!t&&y.jsx("div",{className:"size-10 rounded-full flex items-center justify-center font-medium",style:{backgroundColor:"rgba(255, 255, 255, 0.2)",color:r||"white"},children:e.charAt(0).toUpperCase()})]})}),y.jsx("div",{className:"flex flex-col",children:y.jsx("span",{className:ge("line-clamp-1 font-medium",n),style:r?{color:r}:void 0,children:e})})]})}var rI=Object.defineProperty,iI=(e,t,n)=>t in e?rI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tf=(e,t,n)=>(iI(e,typeof t!="symbol"?t+"":t,n),n);let sI=class{constructor(){tf(this,"current",this.detect()),tf(this,"handoffState","pending"),tf(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"}},pu=new sI;function oI(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Qc(){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 oI(()=>{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=Qc();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 hC(){let[e]=v.useState(Qc);return v.useEffect(()=>()=>e.dispose(),[e]),e}let ei=(e,t)=>{pu.isServer?v.useEffect(e,t):v.useLayoutEffect(e,t)};function mC(e){let t=v.useRef(e);return ei(()=>{t.current=e},[e]),t}let ar=function(e){let t=mC(e);return L.useCallback((...n)=>t.current(...n),[t])};function nh(...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 gC=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(gC||{}),zr=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(zr||{});function vC(){let e=lI();return v.useCallback(t=>aI({mergeRefs:e,...t}),[e])}function aI({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:s=!0,name:o,mergeRefs:a}){a=a??uI;let l=yC(t,e);if(s)return zl(l,n,r,o,a);let c=i??0;if(c&2){let{static:d=!1,...u}=l;if(d)return zl(u,n,r,o,a)}if(c&1){let{unmount:d=!0,...u}=l;return Yc(d?0:1,{0(){return null},1(){return zl({...u,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return zl(l,n,r,o,a)}function zl(e,t={},n,r,i){let{as:s=n,children:o,refName:a="ref",...l}=nf(e,["unmount","static"]),c=e.ref!==void 0?{[a]:e.ref}:{},d=typeof o=="function"?o(t):o;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let u={};if(t){let f=!1,p=[];for(let[h,m]of Object.entries(t))typeof m=="boolean"&&(f=!0),m===!0&&p.push(h.replace(/([A-Z])/g,x=>`-${x.toLowerCase()}`));if(f){u["data-headlessui-state"]=p.join(" ");for(let h of p)u[`data-${h}`]=""}}if(s===v.Fragment&&(Object.keys(Si(l)).length>0||Object.keys(Si(u)).length>0))if(!v.isValidElement(d)||Array.isArray(d)&&d.length>1){if(Object.keys(Si(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Si(l)).concat(Object.keys(Si(u))).map(f=>` - ${f}`).join(`
105
+ */var Je=typeof Symbol=="function"&&Symbol.for,pg=Je?Symbol.for("react.element"):60103,hg=Je?Symbol.for("react.portal"):60106,Nc=Je?Symbol.for("react.fragment"):60107,Lc=Je?Symbol.for("react.strict_mode"):60108,Ic=Je?Symbol.for("react.profiler"):60114,$c=Je?Symbol.for("react.provider"):60109,Bc=Je?Symbol.for("react.context"):60110,mg=Je?Symbol.for("react.async_mode"):60111,zc=Je?Symbol.for("react.concurrent_mode"):60111,Vc=Je?Symbol.for("react.forward_ref"):60112,Uc=Je?Symbol.for("react.suspense"):60113,F4=Je?Symbol.for("react.suspense_list"):60120,Hc=Je?Symbol.for("react.memo"):60115,Wc=Je?Symbol.for("react.lazy"):60116,N4=Je?Symbol.for("react.block"):60121,L4=Je?Symbol.for("react.fundamental"):60117,I4=Je?Symbol.for("react.responder"):60118,$4=Je?Symbol.for("react.scope"):60119;function Yt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case pg:switch(e=e.type,e){case mg:case zc:case Nc:case Ic:case Lc:case Uc:return e;default:switch(e=e&&e.$$typeof,e){case Bc:case Vc:case Wc:case Hc:case $c:return e;default:return t}}case hg:return t}}}function sC(e){return Yt(e)===zc}ge.AsyncMode=mg;ge.ConcurrentMode=zc;ge.ContextConsumer=Bc;ge.ContextProvider=$c;ge.Element=pg;ge.ForwardRef=Vc;ge.Fragment=Nc;ge.Lazy=Wc;ge.Memo=Hc;ge.Portal=hg;ge.Profiler=Ic;ge.StrictMode=Lc;ge.Suspense=Uc;ge.isAsyncMode=function(e){return sC(e)||Yt(e)===mg};ge.isConcurrentMode=sC;ge.isContextConsumer=function(e){return Yt(e)===Bc};ge.isContextProvider=function(e){return Yt(e)===$c};ge.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===pg};ge.isForwardRef=function(e){return Yt(e)===Vc};ge.isFragment=function(e){return Yt(e)===Nc};ge.isLazy=function(e){return Yt(e)===Wc};ge.isMemo=function(e){return Yt(e)===Hc};ge.isPortal=function(e){return Yt(e)===hg};ge.isProfiler=function(e){return Yt(e)===Ic};ge.isStrictMode=function(e){return Yt(e)===Lc};ge.isSuspense=function(e){return Yt(e)===Uc};ge.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Nc||e===zc||e===Ic||e===Lc||e===Uc||e===F4||typeof e=="object"&&e!==null&&(e.$$typeof===Wc||e.$$typeof===Hc||e.$$typeof===$c||e.$$typeof===Bc||e.$$typeof===Vc||e.$$typeof===L4||e.$$typeof===I4||e.$$typeof===$4||e.$$typeof===N4)};ge.typeOf=Yt;iC.exports=ge;var B4=iC.exports,oC=B4,z4={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},V4={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},aC={};aC[oC.ForwardRef]=z4;aC[oC.Memo]=V4;function Ke(){return Ke=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},Ke.apply(this,arguments)}function lC(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 qc=v.createContext(void 0);qc.displayName="FormikContext";qc.Provider;qc.Consumer;function U4(){var e=v.useContext(qc);return e}var gn=function(t){return typeof t=="function"},Gc=function(t){return t!==null&&typeof t=="object"},H4=function(t){return String(Math.floor(Number(t)))===t},Kd=function(t){return Object.prototype.toString.call(t)==="[object String]"},Xd=function(t){return Gc(t)&&gn(t.then)};function $t(e,t,n,r){r===void 0&&(r=0);for(var i=rC(t);e&&r<i.length;)e=e[i[r++]];return r!==i.length&&!e||e===void 0?n:e}function Ui(e,t,n){for(var r=sx(e),i=r,s=0,o=rC(t);s<o.length-1;s++){var a=o[s],l=$t(e,o.slice(0,s+1));if(l&&(Gc(l)||Array.isArray(l)))i=i[a]=sx(l);else{var u=o[s+1];i=i[a]=H4(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 uC(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)?[]:{},uC(a,t,n,r[o])):r[o]=t}return r}function W4(e,t){switch(t.type){case"SET_VALUES":return Ke({},e,{values:t.payload});case"SET_TOUCHED":return Ke({},e,{touched:t.payload});case"SET_ERRORS":return Si(e.errors,t.payload)?e:Ke({},e,{errors:t.payload});case"SET_STATUS":return Ke({},e,{status:t.payload});case"SET_ISSUBMITTING":return Ke({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return Ke({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return Ke({},e,{values:Ui(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return Ke({},e,{touched:Ui(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return Ke({},e,{errors:Ui(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return Ke({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return Ke({},e,{touched:uC(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return Ke({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return Ke({},e,{isSubmitting:!1});default:return e}}var yi={},$l={};function q4(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,d=e.onSubmit,c=lC(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),f=Ke({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:d},c),h=v.useRef(f.initialValues),m=v.useRef(f.initialErrors||yi),p=v.useRef(f.initialTouched||$l),w=v.useRef(f.initialStatus),g=v.useRef(!1),x=v.useRef({});v.useEffect(function(){return g.current=!0,function(){g.current=!1}},[]);var b=v.useState(0),T=b[1],E=v.useRef({values:Il(f.initialValues),errors:Il(f.initialErrors)||yi,touched:Il(f.initialTouched)||$l,status:Il(f.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),C=E.current,_=v.useCallback(function(P){var V=E.current;E.current=W4(V,P),V!==E.current&&T(function(O){return O+1})},[]),A=v.useCallback(function(P,V){return new Promise(function(O,N){var G=f.validate(P,V);G==null?O(yi):Xd(G)?G.then(function(X){O(X||yi)},function(X){N(X)}):O(G)})},[f.validate]),F=v.useCallback(function(P,V){var O=f.validationSchema,N=gn(O)?O(V):O,G=V&&N.validateAt?N.validateAt(V,P):Q4(P,N);return new Promise(function(X,le){G.then(function(){X(yi)},function(Ue){Ue.name==="ValidationError"?X(G4(Ue)):le(Ue)})})},[f.validationSchema]),M=v.useCallback(function(P,V){return new Promise(function(O){return O(x.current[P].validate(V))})},[]),R=v.useCallback(function(P){var V=Object.keys(x.current).filter(function(N){return gn(x.current[N].validate)}),O=V.length>0?V.map(function(N){return M(N,$t(P,N))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(O).then(function(N){return N.reduce(function(G,X,le){return X==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||X&&(G=Ui(G,V[le],X)),G},{})})},[M]),$=v.useCallback(function(P){return Promise.all([R(P),f.validationSchema?F(P):{},f.validate?A(P):{}]).then(function(V){var O=V[0],N=V[1],G=V[2],X=Qp.all([O,N,G],{arrayMerge:Y4});return X})},[f.validate,f.validationSchema,R,A,F]),U=Jt(function(P){return P===void 0&&(P=C.values),_({type:"SET_ISVALIDATING",payload:!0}),$(P).then(function(V){return g.current&&(_({type:"SET_ISVALIDATING",payload:!1}),_({type:"SET_ERRORS",payload:V})),V})});v.useEffect(function(){o&&g.current===!0&&Si(h.current,f.initialValues)&&U(h.current)},[o,U]);var Y=v.useCallback(function(P){var V=P&&P.values?P.values:h.current,O=P&&P.errors?P.errors:m.current?m.current:f.initialErrors||{},N=P&&P.touched?P.touched:p.current?p.current:f.initialTouched||{},G=P&&P.status?P.status:w.current?w.current:f.initialStatus;h.current=V,m.current=O,p.current=N,w.current=G;var X=function(){_({type:"RESET_FORM",payload:{isSubmitting:!!P&&!!P.isSubmitting,errors:O,touched:N,status:G,values:V,isValidating:!!P&&!!P.isValidating,submitCount:P&&P.submitCount&&typeof P.submitCount=="number"?P.submitCount:0}})};if(f.onReset){var le=f.onReset(C.values,pi);Xd(le)?le.then(X):X()}else X()},[f.initialErrors,f.initialStatus,f.initialTouched,f.onReset]);v.useEffect(function(){g.current===!0&&!Si(h.current,f.initialValues)&&u&&(h.current=f.initialValues,Y(),o&&U(h.current))},[u,f.initialValues,Y,o,U]),v.useEffect(function(){u&&g.current===!0&&!Si(m.current,f.initialErrors)&&(m.current=f.initialErrors||yi,_({type:"SET_ERRORS",payload:f.initialErrors||yi}))},[u,f.initialErrors]),v.useEffect(function(){u&&g.current===!0&&!Si(p.current,f.initialTouched)&&(p.current=f.initialTouched||$l,_({type:"SET_TOUCHED",payload:f.initialTouched||$l}))},[u,f.initialTouched]),v.useEffect(function(){u&&g.current===!0&&!Si(w.current,f.initialStatus)&&(w.current=f.initialStatus,_({type:"SET_STATUS",payload:f.initialStatus}))},[u,f.initialStatus,f.initialTouched]);var J=Jt(function(P){if(x.current[P]&&gn(x.current[P].validate)){var V=$t(C.values,P),O=x.current[P].validate(V);return Xd(O)?(_({type:"SET_ISVALIDATING",payload:!0}),O.then(function(N){return N}).then(function(N){_({type:"SET_FIELD_ERROR",payload:{field:P,value:N}}),_({type:"SET_ISVALIDATING",payload:!1})})):(_({type:"SET_FIELD_ERROR",payload:{field:P,value:O}}),Promise.resolve(O))}else if(f.validationSchema)return _({type:"SET_ISVALIDATING",payload:!0}),F(C.values,P).then(function(N){return N}).then(function(N){_({type:"SET_FIELD_ERROR",payload:{field:P,value:$t(N,P)}}),_({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),te=v.useCallback(function(P,V){var O=V.validate;x.current[P]={validate:O}},[]),ne=v.useCallback(function(P){delete x.current[P]},[]),j=Jt(function(P,V){_({type:"SET_TOUCHED",payload:P});var O=V===void 0?i:V;return O?U(C.values):Promise.resolve()}),D=v.useCallback(function(P){_({type:"SET_ERRORS",payload:P})},[]),B=Jt(function(P,V){var O=gn(P)?P(C.values):P;_({type:"SET_VALUES",payload:O});var N=V===void 0?n:V;return N?U(O):Promise.resolve()}),z=v.useCallback(function(P,V){_({type:"SET_FIELD_ERROR",payload:{field:P,value:V}})},[]),H=Jt(function(P,V,O){_({type:"SET_FIELD_VALUE",payload:{field:P,value:V}});var N=O===void 0?n:O;return N?U(Ui(C.values,P,V)):Promise.resolve()}),ee=v.useCallback(function(P,V){var O=V,N=P,G;if(!Kd(P)){P.persist&&P.persist();var X=P.target?P.target:P.currentTarget,le=X.type,Ue=X.name,nt=X.id,jn=X.value,Kt=X.checked,hs=X.outerHTML,Zn=X.options,br=X.multiple;O=V||Ue||nt,N=/number|range/.test(le)?(G=parseFloat(jn),isNaN(G)?"":G):/checkbox/.test(le)?X4($t(C.values,O),Kt,jn):Zn&&br?K4(Zn):jn}O&&H(O,N)},[H,C.values]),de=Jt(function(P){if(Kd(P))return function(V){return ee(V,P)};ee(P)}),ye=Jt(function(P,V,O){V===void 0&&(V=!0),_({type:"SET_FIELD_TOUCHED",payload:{field:P,value:V}});var N=O===void 0?i:O;return N?U(C.values):Promise.resolve()}),re=v.useCallback(function(P,V){P.persist&&P.persist();var O=P.target,N=O.name,G=O.id,X=O.outerHTML,le=V||N||G;ye(le,!0)},[ye]),Le=Jt(function(P){if(Kd(P))return function(V){return re(V,P)};re(P)}),et=v.useCallback(function(P){gn(P)?_({type:"SET_FORMIK_STATE",payload:P}):_({type:"SET_FORMIK_STATE",payload:function(){return P}})},[]),tt=v.useCallback(function(P){_({type:"SET_STATUS",payload:P})},[]),Lt=v.useCallback(function(P){_({type:"SET_ISSUBMITTING",payload:P})},[]),_n=Jt(function(){return _({type:"SUBMIT_ATTEMPT"}),U().then(function(P){var V=P instanceof Error,O=!V&&Object.keys(P).length===0;if(O){var N;try{if(N=yr(),N===void 0)return}catch(G){throw G}return Promise.resolve(N).then(function(G){return g.current&&_({type:"SUBMIT_SUCCESS"}),G}).catch(function(G){if(g.current)throw _({type:"SUBMIT_FAILURE"}),G})}else if(g.current&&(_({type:"SUBMIT_FAILURE"}),V))throw P})}),fn=Jt(function(P){P&&P.preventDefault&&gn(P.preventDefault)&&P.preventDefault(),P&&P.stopPropagation&&gn(P.stopPropagation)&&P.stopPropagation(),_n().catch(function(V){console.warn("Warning: An unhandled error was caught from submitForm()",V)})}),pi={resetForm:Y,validateForm:U,validateField:J,setErrors:D,setFieldError:z,setFieldTouched:ye,setFieldValue:H,setStatus:tt,setSubmitting:Lt,setTouched:j,setValues:B,setFormikState:et,submitForm:_n},yr=Jt(function(){return d(C.values,pi)}),ps=Jt(function(P){P&&P.preventDefault&&gn(P.preventDefault)&&P.preventDefault(),P&&P.stopPropagation&&gn(P.stopPropagation)&&P.stopPropagation(),Y()}),hi=v.useCallback(function(P){return{value:$t(C.values,P),error:$t(C.errors,P),touched:!!$t(C.touched,P),initialValue:$t(h.current,P),initialTouched:!!$t(p.current,P),initialError:$t(m.current,P)}},[C.errors,C.touched,C.values]),Ct=v.useCallback(function(P){return{setValue:function(O,N){return H(P,O,N)},setTouched:function(O,N){return ye(P,O,N)},setError:function(O){return z(P,O)}}},[H,ye,z]),xr=v.useCallback(function(P){var V=Gc(P),O=V?P.name:P,N=$t(C.values,O),G={name:O,value:N,onChange:de,onBlur:Le};if(V){var X=P.type,le=P.value,Ue=P.as,nt=P.multiple;X==="checkbox"?le===void 0?G.checked=!!N:(G.checked=!!(Array.isArray(N)&&~N.indexOf(le)),G.value=le):X==="radio"?(G.checked=N===le,G.value=le):Ue==="select"&&nt&&(G.value=G.value||[],G.multiple=!0)}return G},[Le,de,C.values]),Qe=v.useMemo(function(){return!Si(h.current,C.values)},[h.current,C.values]),wr=v.useMemo(function(){return typeof a<"u"?Qe?C.errors&&Object.keys(C.errors).length===0:a!==!1&&gn(a)?a(f):a:C.errors&&Object.keys(C.errors).length===0},[a,Qe,C.errors,f]),_o=Ke({},C,{initialValues:h.current,initialErrors:m.current,initialTouched:p.current,initialStatus:w.current,handleBlur:Le,handleChange:de,handleReset:ps,handleSubmit:fn,resetForm:Y,setErrors:D,setFormikState:et,setFieldTouched:ye,setFieldValue:H,setFieldError:z,setStatus:tt,setSubmitting:Lt,setTouched:j,setValues:B,submitForm:_n,validateForm:U,validateField:J,isValid:wr,dirty:Qe,unregisterField:ne,registerField:te,getFieldProps:xr,getFieldMeta:hi,getFieldHelpers:Ct,validateOnBlur:i,validateOnChange:n,validateOnMount:o});return _o}function G4(e){var t={};if(e.inner){if(e.inner.length===0)return Ui(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;$t(t,o.path)||(t=Ui(t,o.path,o.message))}}return t}function Q4(e,t,n,r){n===void 0&&(n=!1);var i=eh(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:i})}function eh(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||F0(i)?eh(i):i!==""?i:void 0}):F0(e[r])?t[r]=eh(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function Y4(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?Qp(Array.isArray(s)?[]:{},s,n):s}else n.isMergeableObject(s)?r[o]=Qp(e[o],s,n):e.indexOf(s)===-1&&r.push(s)}),r}function K4(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function X4(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 Z4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?v.useLayoutEffect:v.useEffect;function Jt(e){var t=v.useRef(e);return Z4(function(){t.current=e}),v.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 J4=v.forwardRef(function(e,t){var n=e.action,r=lC(e,["action"]),i=n??"#",s=U4(),o=s.handleReset,a=s.handleSubmit;return v.createElement("form",Ke({onSubmit:a,ref:t,onReset:o,action:i},r))});J4.displayName="Form";const cC=({init:e,schema:t,action:n})=>q4({initialValues:e,validationSchema:t,validateOnBlur:!1,enableReinitialize:!0,validateOnChange:!1,validateOnMount:!1,onSubmit:r=>{n(r)}});function eL(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 tL=e=>{switch(e){case"success":return iL;case"info":return oL;case"warning":return sL;case"error":return aL;default:return null}},nL=Array(12).fill(0),rL=({visible:e,className:t})=>L.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},L.createElement("div",{className:"sonner-spinner"},nL.map((n,r)=>L.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),iL=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.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"})),sL=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},L.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"})),oL=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.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"})),aL=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.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"})),lL=L.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"},L.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),L.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),uL=()=>{const[e,t]=L.useState(document.hidden);return L.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let th=1;class cL{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,s=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:th++,o=this.toasts.find(l=>l.id===s),a=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),o?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...t,id:s,title:r}),{...l,...t,id:s,dismissible:a,title:r}):l):this.addToast({title:r,...i,dismissible:a,id:s}),s},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0}))),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,o;const a=i.then(async u=>{if(o=["resolve",u],L.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(fL(u)&&!u.ok){s=!1;const c=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,f=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:f,...h})}else if(u instanceof Error){s=!1;const c=typeof n.error=="function"?await n.error(u):n.error,f=typeof n.description=="function"?await n.description(u):n.description,h=typeof c=="object"?c:{message:c};this.create({id:r,type:"error",description:f,...h})}else if(n.success!==void 0){s=!1;const c=typeof n.success=="function"?await n.success(u):n.success,f=typeof n.description=="function"?await n.description(u):n.description,h=typeof c=="object"?c:{message:c};this.create({id:r,type:"success",description:f,...h})}}).catch(async u=>{if(o=["reject",u],n.error!==void 0){s=!1;const d=typeof n.error=="function"?await n.error(u):n.error,c=typeof n.description=="function"?await n.description(u):n.description,f=typeof d=="object"?d:{message:d};this.create({id:r,type:"error",description:c,...f})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,d)=>a.then(()=>o[0]==="reject"?d(o[1]):u(o[1])).catch(d));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||th++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const jt=new cL,dL=(e,t)=>{const n=(t==null?void 0:t.id)||th++;return jt.addToast({title:e,...t,id:n}),n},fL=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",pL=dL,hL=()=>jt.toasts,mL=()=>jt.getActiveToasts(),dC=Object.assign(pL,{success:jt.success,info:jt.info,warning:jt.warning,error:jt.error,custom:jt.custom,message:jt.message,promise:jt.promise,dismiss:jt.dismiss,loading:jt.loading},{getHistory:hL,getToasts:mL});eL("[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 Bl(e){return e.label!==void 0}const gL=3,vL="24px",yL="16px",lx=4e3,xL=356,wL=14,bL=45,SL=200;function Rn(...e){return e.filter(Boolean).join(" ")}function kL(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:d,toast:c,unstyled:f,interacting:h,setHeights:m,visibleToasts:p,heights:w,index:g,toasts:x,expanded:b,removeToast:T,defaultRichColors:E,closeButton:C,style:_,cancelButtonStyle:A,actionButtonStyle:F,className:M="",descriptionClassName:R="",duration:$,position:U,gap:Y,expandByDefault:J,classNames:te,icons:ne,closeButtonAriaLabel:j="Close toast"}=e,[D,B]=L.useState(null),[z,H]=L.useState(null),[ee,de]=L.useState(!1),[ye,re]=L.useState(!1),[Le,et]=L.useState(!1),[tt,Lt]=L.useState(!1),[_n,fn]=L.useState(!1),[pi,yr]=L.useState(0),[ps,hi]=L.useState(0),Ct=L.useRef(c.duration||$||lx),xr=L.useRef(null),Qe=L.useRef(null),wr=g===0,_o=g+1<=p,P=c.type,V=c.dismissible!==!1,O=c.className||"",N=c.descriptionClassName||"",G=L.useMemo(()=>w.findIndex(ie=>ie.toastId===c.id)||0,[w,c.id]),X=L.useMemo(()=>{var ie;return(ie=c.closeButton)!=null?ie:C},[c.closeButton,C]),le=L.useMemo(()=>c.duration||$||lx,[c.duration,$]),Ue=L.useRef(0),nt=L.useRef(0),jn=L.useRef(0),Kt=L.useRef(null),[hs,Zn]=U.split("-"),br=L.useMemo(()=>w.reduce((ie,Ye,lt)=>lt>=G?ie:ie+Ye.height,0),[w,G]),ms=uL(),jo=c.invert||d,mi=P==="loading";nt.current=L.useMemo(()=>G*Y+br,[G,br]),L.useEffect(()=>{Ct.current=le},[le]),L.useEffect(()=>{de(!0)},[]),L.useEffect(()=>{const ie=Qe.current;if(ie){const Ye=ie.getBoundingClientRect().height;return hi(Ye),m(lt=>[{toastId:c.id,height:Ye,position:c.position},...lt]),()=>m(lt=>lt.filter(It=>It.toastId!==c.id))}},[m,c.id]),L.useLayoutEffect(()=>{if(!ee)return;const ie=Qe.current,Ye=ie.style.height;ie.style.height="auto";const lt=ie.getBoundingClientRect().height;ie.style.height=Ye,hi(lt),m(It=>It.find(rt=>rt.toastId===c.id)?It.map(rt=>rt.toastId===c.id?{...rt,height:lt}:rt):[{toastId:c.id,height:lt,position:c.position},...It])},[ee,c.title,c.description,m,c.id]);const Pn=L.useCallback(()=>{re(!0),yr(nt.current),m(ie=>ie.filter(Ye=>Ye.toastId!==c.id)),setTimeout(()=>{T(c)},SL)},[c,T,m,nt]);L.useEffect(()=>{if(c.promise&&P==="loading"||c.duration===1/0||c.type==="loading")return;let ie;return b||h||ms?(()=>{if(jn.current<Ue.current){const It=new Date().getTime()-Ue.current;Ct.current=Ct.current-It}jn.current=new Date().getTime()})():(()=>{Ct.current!==1/0&&(Ue.current=new Date().getTime(),ie=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),Pn()},Ct.current))})(),()=>clearTimeout(ie)},[b,h,c,P,ms,Pn]),L.useEffect(()=>{c.delete&&Pn()},[Pn,c.delete]);function GC(){var ie;if(ne!=null&&ne.loading){var Ye;return L.createElement("div",{className:Rn(te==null?void 0:te.loader,c==null||(Ye=c.classNames)==null?void 0:Ye.loader,"sonner-loader"),"data-visible":P==="loading"},ne.loading)}return L.createElement(rL,{className:Rn(te==null?void 0:te.loader,c==null||(ie=c.classNames)==null?void 0:ie.loader),visible:P==="loading"})}var Sg,kg;return L.createElement("li",{tabIndex:0,ref:Qe,className:Rn(M,O,te==null?void 0:te.toast,c==null||(t=c.classNames)==null?void 0:t.toast,te==null?void 0:te.default,te==null?void 0:te[P],c==null||(n=c.classNames)==null?void 0:n[P]),"data-sonner-toast":"","data-rich-colors":(Sg=c.richColors)!=null?Sg:E,"data-styled":!(c.jsx||c.unstyled||f),"data-mounted":ee,"data-promise":!!c.promise,"data-swiped":_n,"data-removed":ye,"data-visible":_o,"data-y-position":hs,"data-x-position":Zn,"data-index":g,"data-front":wr,"data-swiping":Le,"data-dismissible":V,"data-type":P,"data-invert":jo,"data-swipe-out":tt,"data-swipe-direction":z,"data-expanded":!!(b||J&&ee),style:{"--index":g,"--toasts-before":g,"--z-index":x.length-g,"--offset":`${ye?pi:nt.current}px`,"--initial-height":J?"auto":`${ps}px`,..._,...c.style},onDragEnd:()=>{et(!1),B(null),Kt.current=null},onPointerDown:ie=>{mi||!V||(xr.current=new Date,yr(nt.current),ie.target.setPointerCapture(ie.pointerId),ie.target.tagName!=="BUTTON"&&(et(!0),Kt.current={x:ie.clientX,y:ie.clientY}))},onPointerUp:()=>{var ie,Ye,lt;if(tt||!V)return;Kt.current=null;const It=Number(((ie=Qe.current)==null?void 0:ie.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),cl=Number(((Ye=Qe.current)==null?void 0:Ye.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),rt=new Date().getTime()-((lt=xr.current)==null?void 0:lt.getTime()),Xt=D==="x"?It:cl,dl=Math.abs(Xt)/rt;if(Math.abs(Xt)>=bL||dl>.11){yr(nt.current),c.onDismiss==null||c.onDismiss.call(c,c),H(D==="x"?It>0?"right":"left":cl>0?"down":"up"),Pn(),Lt(!0);return}else{var pn,hn;(pn=Qe.current)==null||pn.style.setProperty("--swipe-amount-x","0px"),(hn=Qe.current)==null||hn.style.setProperty("--swipe-amount-y","0px")}fn(!1),et(!1),B(null)},onPointerMove:ie=>{var Ye,lt,It;if(!Kt.current||!V||((Ye=window.getSelection())==null?void 0:Ye.toString().length)>0)return;const rt=ie.clientY-Kt.current.y,Xt=ie.clientX-Kt.current.x;var dl;const pn=(dl=e.swipeDirections)!=null?dl:kL(U);!D&&(Math.abs(Xt)>1||Math.abs(rt)>1)&&B(Math.abs(Xt)>Math.abs(rt)?"x":"y");let hn={x:0,y:0};const Cg=gi=>1/(1.5+Math.abs(gi)/20);if(D==="y"){if(pn.includes("top")||pn.includes("bottom"))if(pn.includes("top")&&rt<0||pn.includes("bottom")&&rt>0)hn.y=rt;else{const gi=rt*Cg(rt);hn.y=Math.abs(gi)<Math.abs(rt)?gi:rt}}else if(D==="x"&&(pn.includes("left")||pn.includes("right")))if(pn.includes("left")&&Xt<0||pn.includes("right")&&Xt>0)hn.x=Xt;else{const gi=Xt*Cg(Xt);hn.x=Math.abs(gi)<Math.abs(Xt)?gi:Xt}(Math.abs(hn.x)>0||Math.abs(hn.y)>0)&&fn(!0),(lt=Qe.current)==null||lt.style.setProperty("--swipe-amount-x",`${hn.x}px`),(It=Qe.current)==null||It.style.setProperty("--swipe-amount-y",`${hn.y}px`)}},X&&!c.jsx&&P!=="loading"?L.createElement("button",{"aria-label":j,"data-disabled":mi,"data-close-button":!0,onClick:mi||!V?()=>{}:()=>{Pn(),c.onDismiss==null||c.onDismiss.call(c,c)},className:Rn(te==null?void 0:te.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(kg=ne==null?void 0:ne.close)!=null?kg:lL):null,P||c.icon||c.promise?L.createElement("div",{"data-icon":"",className:Rn(te==null?void 0:te.icon,c==null||(i=c.classNames)==null?void 0:i.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||GC():null,c.type!=="loading"?c.icon||(ne==null?void 0:ne[P])||tL(P):null):null,L.createElement("div",{"data-content":"",className:Rn(te==null?void 0:te.content,c==null||(s=c.classNames)==null?void 0:s.content)},L.createElement("div",{"data-title":"",className:Rn(te==null?void 0:te.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?L.createElement("div",{"data-description":"",className:Rn(R,N,te==null?void 0:te.description,c==null||(a=c.classNames)==null?void 0:a.description)},typeof c.description=="function"?c.description():c.description):null),L.isValidElement(c.cancel)?c.cancel:c.cancel&&Bl(c.cancel)?L.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||A,onClick:ie=>{Bl(c.cancel)&&V&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,ie),Pn())},className:Rn(te==null?void 0:te.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,L.isValidElement(c.action)?c.action:c.action&&Bl(c.action)?L.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||F,onClick:ie=>{Bl(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,ie),!ie.defaultPrevented&&Pn())},className:Rn(te==null?void 0:te.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function ux(){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 TL(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,o=s?"--mobile-offset":"--offset",a=s?yL:vL;function l(u){["top","right","bottom","left"].forEach(d=>{n[`${o}-${d}`]=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 EL=L.forwardRef(function(t,n){const{invert:r,position:i="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:a,className:l,offset:u,mobileOffset:d,theme:c="light",richColors:f,duration:h,style:m,visibleToasts:p=gL,toastOptions:w,dir:g=ux(),gap:x=wL,icons:b,containerAriaLabel:T="Notifications"}=t,[E,C]=L.useState([]),_=L.useMemo(()=>Array.from(new Set([i].concat(E.filter(z=>z.position).map(z=>z.position)))),[E,i]),[A,F]=L.useState([]),[M,R]=L.useState(!1),[$,U]=L.useState(!1),[Y,J]=L.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),te=L.useRef(null),ne=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),j=L.useRef(null),D=L.useRef(!1),B=L.useCallback(z=>{C(H=>{var ee;return(ee=H.find(de=>de.id===z.id))!=null&&ee.delete||jt.dismiss(z.id),H.filter(({id:de})=>de!==z.id)})},[]);return L.useEffect(()=>jt.subscribe(z=>{if(z.dismiss){const H=E.map(ee=>ee.id===z.id?{...ee,delete:!0}:ee);requestAnimationFrame(()=>{C(H)});return}setTimeout(()=>{b_.flushSync(()=>{C(H=>{const ee=H.findIndex(de=>de.id===z.id);return ee!==-1?[...H.slice(0,ee),{...H[ee],...z},...H.slice(ee+1)]:[z,...H]})})})}),[E]),L.useEffect(()=>{if(c!=="system"){J(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?J("dark"):J("light")),typeof window>"u")return;const z=window.matchMedia("(prefers-color-scheme: dark)");try{z.addEventListener("change",({matches:H})=>{J(H?"dark":"light")})}catch{z.addListener(({matches:ee})=>{try{J(ee?"dark":"light")}catch(de){console.error(de)}})}},[c]),L.useEffect(()=>{E.length<=1&&R(!1)},[E]),L.useEffect(()=>{const z=H=>{var ee;if(s.every(re=>H[re]||H.code===re)){var ye;R(!0),(ye=te.current)==null||ye.focus()}H.code==="Escape"&&(document.activeElement===te.current||(ee=te.current)!=null&&ee.contains(document.activeElement))&&R(!1)};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[s]),L.useEffect(()=>{if(te.current)return()=>{j.current&&(j.current.focus({preventScroll:!0}),j.current=null,D.current=!1)}},[te.current]),L.createElement("section",{ref:n,"aria-label":`${T} ${ne}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},_.map((z,H)=>{var ee;const[de,ye]=z.split("-");return E.length?L.createElement("ol",{key:z,dir:g==="auto"?ux():g,tabIndex:-1,ref:te,className:l,"data-sonner-toaster":!0,"data-sonner-theme":Y,"data-y-position":de,"data-lifted":M&&E.length>1&&!o,"data-x-position":ye,style:{"--front-toast-height":`${((ee=A[0])==null?void 0:ee.height)||0}px`,"--width":`${xL}px`,"--gap":`${x}px`,...m,...TL(u,d)},onBlur:re=>{D.current&&!re.currentTarget.contains(re.relatedTarget)&&(D.current=!1,j.current&&(j.current.focus({preventScroll:!0}),j.current=null))},onFocus:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||D.current||(D.current=!0,j.current=re.relatedTarget)},onMouseEnter:()=>R(!0),onMouseMove:()=>R(!0),onMouseLeave:()=>{$||R(!1)},onDragEnd:()=>R(!1),onPointerDown:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||U(!0)},onPointerUp:()=>U(!1)},E.filter(re=>!re.position&&H===0||re.position===z).map((re,Le)=>{var et,tt;return L.createElement(CL,{key:re.id,icons:b,index:Le,toast:re,defaultRichColors:f,duration:(et=w==null?void 0:w.duration)!=null?et:h,className:w==null?void 0:w.className,descriptionClassName:w==null?void 0:w.descriptionClassName,invert:r,visibleToasts:p,closeButton:(tt=w==null?void 0:w.closeButton)!=null?tt:a,interacting:$,position:z,style:w==null?void 0:w.style,unstyled:w==null?void 0:w.unstyled,classNames:w==null?void 0:w.classNames,cancelButtonStyle:w==null?void 0:w.cancelButtonStyle,actionButtonStyle:w==null?void 0:w.actionButtonStyle,closeButtonAriaLabel:w==null?void 0:w.closeButtonAriaLabel,removeToast:B,toasts:E.filter(Lt=>Lt.position==re.position),heights:A.filter(Lt=>Lt.position==re.position),setHeights:F,expandByDefault:o,gap:x,expanded:M,swipeDirections:t.swipeDirections})})):null}))});function Bn(e){return dC.custom(t=>y.jsx(_L,{id:t,title:e.title,description:e.description,variant:e.variant}))}const Zd={success:{bg:"bg-green-100 border-green-200",text:"text-green-800"},error:{bg:"bg-red-100 border-red-200",text:"text-red-800"},warning:{bg:"bg-orange-100 border-orange-200",text:"text-orange-800"},info:{bg:"bg-blue-100 border-blue-200",text:"text-blue-800"}};function _L(e){const{title:t,description:n,button:r,id:i,variant:s}=e;return y.jsxs("div",{className:ve("flex rounded-lg shadow-lg ring-1 ring-black/5 w-full md:max-w-[364px] items-center p-3 backdrop-blur-sm border mb-2",Zd[s||"info"].bg),children:[y.jsx("div",{className:"flex flex-1 items-center",children:y.jsxs("div",{className:"w-full",children:[t&&y.jsx("p",{className:ve("text-sm font-medium",Zd[s||"info"].text),children:t}),y.jsx("p",{className:ve("text-sm",Zd[s||"info"].text,{"mt-1":!!t}),children:n})]})}),r&&y.jsx("div",{className:"ml-5 shrink-0 rounded-md text-sm font-medium text-indigo-600 hover:text-indigo-500 focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 focus:outline-hidden",children:y.jsx("button",{className:"rounded bg-indigo-50 px-3 py-1 text-sm font-semibold text-indigo-600 hover:bg-indigo-100",onClick:()=>{r.onClick(),dC.dismiss(i)},children:r.label})})]})}function jL(e){return Array.isArray(e)&&e[0].field!==void 0}const fC=(e,t)=>{var n;if(jL(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||Bn({description:e.message,variant:"error"});return}if(e&&e.error){t!=null&&t.noToast||Bn({description:e.error,variant:"error"});return}},PL=[{code:429,text:"Çok fazla istek gönderdiniz. Lütfen biraz bekleyin"},{code:401,text:"Bu işlemi yapabilmek için giriş yapmalısınız"},{code:403,text:"Bu işlemi yapabilmek için yetkiniz yok"},{code:500,text:"Sunucu hatası oluştu"},{code:422,text:"Form doğrulaması başarısız oldu"},{code:413,text:"Yüklenen dosya boyutu izin verilen sınırı aştı"}],AL=[{code:"FST_REQ_FILE_TOO_LARGE",text:"Yüklenen dosya boyutu izin verilen sınırı aştı"}],RL=(e,t)=>{if(Za(t))return!1;if(e===null)return Bn({description:"Bir hata oluştu",variant:"error"}),!0;if(typeof e=="object"&&e){const r=e.code;if(r){const i=AL.find(s=>s.code===r);if(i)return Bn({description:i.text,variant:"error"}),!0}if(e.message)return Bn({description:e.message,variant:"error"}),!0}const n=PL.find(r=>r.code===t);return Bn({description:n?n.text:"Bir hata oluştu",variant:"error"}),!0};function OL(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 gg({id:e,text:t,className:n,required:r}){const i=De();return t?y.jsxs("label",{htmlFor:e,className:ve("mb-1 block text-sm font-medium",n),style:{color:i.getColor(k.InputText)},children:[t,r&&y.jsx("span",{className:"ml-1",style:{color:i.getColor(k.ErrorText)},children:"*"})]}):null}const Jd={sm:"px-3 py-1 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-15"};function DL({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:d,ariaInvalid:c,ariaLabel:f,autoFocus:h,...m}){const p=De();return y.jsxs("div",{className:ve({"mb-2":!o},d),children:[y.jsx(gg,{id:e,text:t,required:a}),y.jsxs("div",{className:"flex items-center",children:[r&&y.jsx("span",{className:ve("inline-block border border-solid border-r-0 rounded-l-md",Jd[i]),style:{borderColor:l?p.getColor(k.ErrorBorder):p.getColor(k.InputBorder),backgroundColor:p.getColor(k.InputBackground),borderRadius:p.getRadius()},children:r}),y.jsx("input",{id:e,className:ve("border border-solid block text-base py-2 px-3 w-full focus:outline-hidden",Jd[i],{"rounded-l-none":!!r,"rounded-r-none":!!n}),type:s,required:a,"aria-describedby":u,"aria-invalid":c,"aria-label":f,style:{fontSize:"16px",color:l?p.getColor(k.ErrorText):p.getColor(k.InputText),backgroundColor:p.getColor(k.InputBackground),borderColor:l?p.getColor(k.ErrorBorder):p.getColor(k.InputBorder),borderRadius:p.getRadius()},...m}),n&&y.jsx("span",{className:ve("inline-block border border-solid border-l-0 rounded-r-md",Jd[i]),style:{borderColor:l?p.getColor(k.ErrorBorder):p.getColor(k.InputBorder),backgroundColor:p.getColor(k.InputBackground),borderRadius:p.getRadius()},children:n})]}),!!l&&y.jsx("p",{className:"mt-1 text-xs",style:{color:p.getColor(k.ErrorText)},children:l})]})}const ML=(e,t)=>{document.cookie=`${e}=${t}`},pC=v.createContext({}),FL=()=>`${window.location.pathname}_$$_${document.title}`,NL=()=>{const e=localStorage.getItem("page");return!e||e===""?"/":e},LL=()=>{const e=localStorage.getItem("p-history");if(!e||e==="")return[];try{return JSON.parse(e)}catch{return[]}};function IL({children:e}){const[t,n]=v.useState("/"),[r,i]=v.useState(LL());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 y.jsx(pC.Provider,{value:{page:t,setPage:o,history:r,clearHistory:s},children:e})}function vg(){return v.useContext(pC)}function $L({label:e,id:t,value:n="",className:r,placeholder:i,children:s,required:o,error:a,...l}){return y.jsxs("div",{className:r||"",children:[e&&y.jsx(gg,{id:t,required:o,text:e}),y.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&&y.jsx("p",{className:"1 texm text-r500",children:a})]})}const cx={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:""}},BL={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"},zL={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"},VL={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 UL({children:e,name:t,required:n,value:r,checked:i,onChange:s,onBlur:o,red:a,id:l=t,size:u="md",effect:d="ring",reversed:c=!1,variant:f="blue",error:h,...m}){return y.jsxs("div",{children:[y.jsxs("div",{className:`flex items-center justify-between ${c?"flex-row-reverse":""} ${cx[d].label}`,children:[y.jsxs("label",{className:"disable-highlight relative mr-3 flex cursor-pointer items-center rounded-full",htmlFor:l,children:[y.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 ${BL[f]} ${zL[u]} ${cx[d].input}`,required:n,checked:i,value:r,onChange:p=>s==null?void 0:s(p.target.checked),onBlur:p=>o==null?void 0:o(p.target.checked),...m}),y.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:y.jsx(oe.Check,{className:VL[u]})})]}),y.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&&y.jsx("small",{className:"text-xs text-red-500",children:a}),h&&y.jsx("small",{className:"text-xs text-red-500",children:h})]})}function HL({id:e,value:t,name:n,onChange:r,children:i,disabled:s,className:o}){return y.jsxs("label",{htmlFor:e,className:ve("relative flex cursor-pointer items-center rounded-md focus:outline-none",{"opacity-60 cursor-not-allowed":s},o),children:[y.jsx("input",{type:"radio",id:e,name:n,value:e,checked:t,defaultChecked: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}),y.jsx("span",{className:"ml-2 text-sm font-medium text-slate-700",children:i})]})}function WL({id:e,label:t,children:n,required:r,className:i,error:s}){return y.jsxs("fieldset",{id:e,className:i,children:[t&&y.jsxs("legend",{className:"mb-1 block text-sm font-medium text-slate-700",children:[t," ",r&&y.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),y.jsx("div",{className:"flex flex-col gap-1.5 mt-0.5",children:n}),s&&y.jsx("p",{className:"text-red-500 text-sm",children:s})]})}const dx=Object.assign(HL,{Group:WL});function yg({id:e,label:t,suffix:n,prefix:r,className:i,noMargin:s,rows:o=3,type:a="text",required:l=!1,error:u,ariaInvalid:d,inputRef:c,autoFocus:f=!0,style:h,...m}){const p=De();return y.jsxs("div",{className:ve({"mb-2":!s},i),children:[t&&y.jsx(gg,{id:e,text:t,required:l}),y.jsx("textarea",{className:ve("resize-none max-h-36 w-full py-2 px-3 border border-solid block focus:outline-hidden"),id:e,rows:o,"aria-invalid":d,...m,ref:c,autoFocus:f,style:{...h,fontSize:"16px",color:u?p.getColor(k.ErrorText):p.getColor(k.InputText),backgroundColor:p.getColor(k.InputBackground),borderColor:u?p.getColor(k.ErrorBorder):p.getColor(k.InputBorder),borderRadius:p.getRadius()}}),!!u&&y.jsx("p",{className:"mt-1 text-xs",style:{color:p.getColor(k.ErrorText)},children:u})]})}function qL({onOk:e,clientId:t,widgetId:n,appearance:r}){var b,T,E,C,_,A,F,M;const i=De(),{defaultValues:s,widget:o,setIsHaveChat:a}=kt(),[l,u]=v.useState(!1),d=vg(),c=PD(),f=!!s&&"username"in s,h=(T=(b=r==null?void 0:r.body)==null?void 0:b.inputs)==null?void 0:T.reduce((R,$)=>{let U=$.remember?uu($.name):s==null?void 0:s[$.name];return $.options&&U&&!$.options.includes(U)&&(U=void 0),$.name==="username"&&f&&(U=s.username),R[$.name]=U||"",R},{}),m=(C=(E=r==null?void 0:r.body)==null?void 0:E.inputs)==null?void 0:C.reduce((R,$)=>(R[$.name]="",R),{}),p=rg((A=(_=r==null?void 0:r.body)==null?void 0:_.inputs)==null?void 0:A.reduce((R,$)=>(R[$.name]=$.required?Xu().required(`${$.label} alanı zorunludur`):Xu(),R),{})),w=cC({init:{...h},schema:p,action:async R=>{var $;if(!l){u(!0);try{f&&(R.username=s.username),s!=null&&s.secret_data&&(R.secret_data=s.secret_data);for(const J in R)typeof R[J]=="string"&&(R[J]=R[J].trim());const[U,Y]=await c.mutateAsync({inputs:R,history:d.history,client_id:t,widget_id:n});if(Za(Y)){jD(U)&&(Wd(Qn.CustomerToken,U.customer_token,(o==null?void 0:o.link_id)||""),Wd(Qn.CustomerRefreshToken,U.customer_refresh_token,(o==null?void 0:o.link_id)||""),Wd(Qn.DeviceId,U.device_id,(o==null?void 0:o.link_id)||"")),d.clearHistory();for(const J of(($=r==null?void 0:r.body)==null?void 0:$.inputs)||[])J.remember&&ML(J.name,R[J.name]);a(!0),e==null||e();return}fC(U,{form:w})}catch(U){console.error("Chat creation error:",U)}finally{u(!1)}}}});v.useEffect(()=>{if(l){const R=i.getColor(k.GreeterBackground);document.documentElement.style.setProperty("--chat-transition-bg",R)}},[l,i]);const g=!OL(m||{},(w==null?void 0:w.values)||{}),x=i.getColor(k.GreeterBackground);return y.jsx(he.section,{className:"h-full overflow-y-auto px-4 py-3",style:{backgroundColor:x},initial:{opacity:1},animate:{opacity:l?.7:1,transition:{duration:.5,ease:"easeInOut"}},exit:{opacity:0,transition:{duration:.3}},children:y.jsxs("form",{autoComplete:"off",className:"grid grid-cols-1 gap-2",onSubmit:R=>{R.preventDefault(),w.handleSubmit()},children:[(M=(F=r==null?void 0:r.body)==null?void 0:F.inputs)==null?void 0:M.map(R=>{var $,U;if(["text","email","phone"].includes(R.type))return y.jsx(DL,{id:R.name,name:R.name,type:R.type,label:R.label,value:w.values[R.name],onChange:w.handleChange,onBlur:w.handleBlur,disabled:R.name==="username"&&f,readOnly:R.name==="username"&&f,autoComplete:"off",placeholder:R.placeholder,error:w.errors[R.name],ariaInvalid:w.errors.name?!0:void 0,required:R.required,noMargin:!0},R.name);if(R.type==="select")return y.jsx($L,{id:R.name,name:R.name,value:w.values[R.name],onChange:w.handleChange,label:R.label,error:w.errors[R.name],required:R.required,children:($=R.options)==null?void 0:$.map(Y=>y.jsx("option",{value:Y,children:Y},Y))},R.name);if(R.type==="checkbox")return y.jsx(UL,{id:R.name,name:R.name,value:w.values[R.name],checked:w.values[R.name]==="true",onChange:w.handleChange,required:R.required,error:w.errors[R.name],children:R.label},R.name);if(R.type==="radio")return y.jsx(dx.Group,{id:R.name,label:R.label,required:R.required,error:w.errors[R.name],children:(U=R.options)==null?void 0:U.map(Y=>y.jsx(dx,{onChange:J=>{J?w.setFieldValue(R.name,Y):w.setFieldValue(R.name,"")},id:Y,name:R.name,value:Y===w.values[R.name],children:Y},Y))},R.name);if(R.type==="textarea")return y.jsx(yg,{id:R.name,name:R.name,value:w.values[R.name],onChange:w.handleChange,placeholder:R.placeholder,error:w.errors[R.name],required:R.required,label:R.label},R.name)}),y.jsx(Ot,{textKey:k.GreeterButtonText,bgKey:k.GreeterButtonBackground,type:"submit",disabled:!g||l,className:"mt-2 transition-all duration-300 hover:opacity-90 transform hover:translate-y-[-1px] shadow-sm",children:l?y.jsxs("div",{className:"flex items-center justify-center",children:[y.jsx("span",{className:"mr-2",children:"Yükleniyor"}),y.jsx(he.span,{initial:{opacity:.5},animate:{opacity:[.5,1,.5]},transition:{duration:1.5,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"},children:"..."})]}):"Sohbet Oluştur"})]})})}function GL({onClose:e}){const t=De();return y.jsx(Ot,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"md",rounded:!0,onClick:e,className:"absolute top-2 right-2 hover:opacity-80 transition-opacity",style:{backgroundColor:t.getColor(k.CloseButtonBackground),color:t.getColor(k.CloseButtonText)},withoutTheming:!0,children:y.jsx(oe.X,{className:"size-5",style:{color:t.getColor(k.CloseButtonText)}})})}function QL({image_url:e,name:t,size:n="size-9"}){const r=De();return e?y.jsx("img",{src:e,alt:t,className:ve("rounded-md",n)}):y.jsx("div",{className:"flex items-center justify-center gap-1",children:y.jsx(oe.Website,{className:ve(n),style:{color:r.getColor(k.IconColor)}})})}function YL(){const e=vg(),t=v.useCallback(()=>{const n=window.location.pathname;n!==e.page&&e.setPage(n)},[e.page]);return Km("popstate",t),null}function KL(){const e=di(),t=vg(),n=v.useCallback(()=>{const r=window.location.pathname;if(r!==t.page){if(e){e.emit(Dt.PageChange,{page:r});return}t.setPage(r)}},[e,t.page]);return Km("popstate",n),v.useEffect(()=>{if(!e)return;const r=NL(),i=FL();r!==i&&(e.emit(Dt.PageChange,{page:i}),t.setPage(i))},[e]),null}function XL({children:e}){const t=De(),{widget:n}=kt();if(!n)return null;const r=ss();return y.jsx(Zr,{children:y.jsxs(he.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:[y.jsx(he.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 ${r?"":"rounded-t-xl"} flex flex-col items-center justify-center shadow-sm`}),e]})})}function ZL(){return YL(),null}const ef=(e,t)=>{var n;return(n=e.find(r=>r.type===t))==null?void 0:n.content};function JL(){var p,w,g,x,b,T;const e=De(),{widget:t,setOpen:n}=kt(),[r,i]=v.useState(!0),[s,o]=v.useState(!1),a=Pc(),l=ss(),u=Xm(),d=ol();if(!t)return null;const c=()=>{n(!1)};if(v.useEffect(()=>{if(s){i(!1);return}if(!d||!d.accessToken){i(!1);return}AD(t.client_id,ho(d)).then(([E,C])=>{Za(C)?a.push("chat"):(aa(t.link_id||""),o(!0))}).catch(()=>{aa(t.link_id||""),o(!0)}).finally(()=>{i(!1)})},[s]),r)return null;const f=ef(((w=(p=t.appearance)==null?void 0:p.head)==null?void 0:w.elements)||[],"text"),h=ef(((x=(g=t.appearance)==null?void 0:g.head)==null?void 0:x.elements)||[],"title"),m=ef(((T=(b=t.appearance)==null?void 0:b.head)==null?void 0:T.elements)||[],"logo");return y.jsxs(XL,{children:[y.jsxs("div",{className:"relative flex flex-col gap-3 items-center justify-center h-44",style:{backgroundColor:e.getColor(k.GreeterTopBackground)},children:[!u&&l&&y.jsx(GL,{onClose:c}),m&&y.jsx(he.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},transition:{delay:.1,duration:.2},children:y.jsx(QL,{name:t.name,image_url:m,size:"size-20"})}),h&&y.jsx(he.div,{initial:{y:5,opacity:0},animate:{y:0,opacity:1},transition:{delay:.15,duration:.2},style:{color:e.getColor(k.GreeterTopText)},className:"text-xl font-bold",children:h}),f&&y.jsx(he.div,{initial:{y:5,opacity:0},animate:{y:0,opacity:1},transition:{delay:.2,duration:.2},style:{color:e.getColor(k.GreeterTopText)},className:"text-sm opacity-90",children:f})]}),y.jsx(he.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.25,duration:.2},className:"overflow-y-auto",style:{height:l?"calc(var(--app-height,100dvh) - 11rem)":"calc(100% - 11rem)"},children:y.jsx(qL,{clientId:t.client_id,widgetId:t.link_id,appearance:t.appearance,onOk:()=>{a.push("chat")}})})]})}function eI(){return y.jsxs(y.Fragment,{children:[y.jsx(wk,{border:!0,children:y.jsx(JL,{})}),y.jsx(ZL,{})]})}const tI=[{path:"/",component:eI,name:"registration"}];var ys=(e=>(e.Open="open",e.Closed="closed",e.Pending="pending",e.Deleted="deleted",e.Created="created",e))(ys||{}),nr=(e=>(e.AdminJoin="admin_join",e.AdminLeave="admin_leave",e.ChatCreated="chat_created",e))(nr||{}),Ie=(e=>(e.Customer="customer",e.User="user",e.System="system",e.Activity="activity",e))(Ie||{});function nI({name:e,avatar:t,className:n="text-neutral-500",textColor:r}){return y.jsxs(he.div,{initial:{opacity:.8},animate:{opacity:1},className:"flex gap-2 items-center",children:[y.jsx("div",{className:"min-w-max",children:y.jsxs("span",{children:[t&&y.jsx("img",{className:"size-10 rounded-full border border-white/20 shadow-sm",src:t,"aria-label":e}),!t&&y.jsx("div",{className:"size-10 rounded-full flex items-center justify-center font-medium",style:{backgroundColor:"rgba(255, 255, 255, 0.2)",color:r||"white"},children:e.charAt(0).toUpperCase()})]})}),y.jsx("div",{className:"flex flex-col",children:y.jsx("span",{className:ve("line-clamp-1 font-medium",n),style:r?{color:r}:void 0,children:e})})]})}var rI=Object.defineProperty,iI=(e,t,n)=>t in e?rI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tf=(e,t,n)=>(iI(e,typeof t!="symbol"?t+"":t,n),n);let sI=class{constructor(){tf(this,"current",this.detect()),tf(this,"handoffState","pending"),tf(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"}},pu=new sI;function oI(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Qc(){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 oI(()=>{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=Qc();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 hC(){let[e]=v.useState(Qc);return v.useEffect(()=>()=>e.dispose(),[e]),e}let ti=(e,t)=>{pu.isServer?v.useEffect(e,t):v.useLayoutEffect(e,t)};function mC(e){let t=v.useRef(e);return ti(()=>{t.current=e},[e]),t}let lr=function(e){let t=mC(e);return L.useCallback((...n)=>t.current(...n),[t])};function nh(...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 gC=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(gC||{}),Vr=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Vr||{});function vC(){let e=lI();return v.useCallback(t=>aI({mergeRefs:e,...t}),[e])}function aI({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:s=!0,name:o,mergeRefs:a}){a=a??uI;let l=yC(t,e);if(s)return zl(l,n,r,o,a);let u=i??0;if(u&2){let{static:d=!1,...c}=l;if(d)return zl(c,n,r,o,a)}if(u&1){let{unmount:d=!0,...c}=l;return Yc(d?0:1,{0(){return null},1(){return zl({...c,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return zl(l,n,r,o,a)}function zl(e,t={},n,r,i){let{as:s=n,children:o,refName:a="ref",...l}=nf(e,["unmount","static"]),u=e.ref!==void 0?{[a]:e.ref}:{},d=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 f=!1,h=[];for(let[m,p]of Object.entries(t))typeof p=="boolean"&&(f=!0),p===!0&&h.push(m.replace(/([A-Z])/g,w=>`-${w.toLowerCase()}`));if(f){c["data-headlessui-state"]=h.join(" ");for(let m of h)c[`data-${m}`]=""}}if(s===v.Fragment&&(Object.keys(ki(l)).length>0||Object.keys(ki(c)).length>0))if(!v.isValidElement(d)||Array.isArray(d)&&d.length>1){if(Object.keys(ki(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(ki(l)).concat(Object.keys(ki(c))).map(f=>` - ${f}`).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(f=>` - ${f}`).join(`
107
107
  `)].join(`
108
- `))}else{let f=d.props,p=f==null?void 0:f.className,h=typeof p=="function"?(...g)=>nh(p(...g),l.className):nh(p,l.className),m=h?{className:h}:{},x=yC(d.props,Si(nf(l,["ref"])));for(let g in u)g in x&&delete u[g];return v.cloneElement(d,Object.assign({},x,u,c,{ref:i(cI(d),c.ref)},m))}return v.createElement(s,Object.assign({},nf(l,["ref"]),s!==v.Fragment&&c,s!==v.Fragment&&u),d)}function lI(){let e=v.useRef([]),t=v.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 uI(...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 yC(...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 xg(e){var t;return Object.assign(v.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 nf(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function cI(e){return L.version.split(".")[0]>="19"?e.props.ref:e.ref}let dI=Symbol();function xC(...e){let t=v.useRef(e);v.useEffect(()=>{t.current=e},[e]);let n=ar(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[dI]))?void 0:n}function fI(e=0){let[t,n]=v.useState(e),r=v.useCallback(l=>n(l),[t]),i=v.useCallback(l=>n(c=>c|l),[t]),s=v.useCallback(l=>(t&l)===l,[t]),o=v.useCallback(l=>n(c=>c&~l),[n]),a=v.useCallback(l=>n(c=>c^l),[n]);return{flags:t,setFlag:r,addFlag:i,hasFlag:s,removeFlag:o,toggleFlag:a}}var pI={},fx,px;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((fx=process==null?void 0:pI)==null?void 0:fx.NODE_ENV)==="test"&&typeof((px=Element==null?void 0:Element.prototype)==null?void 0:px.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 hI=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(hI||{});function mI(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function gI(e,t,n,r){let[i,s]=v.useState(n),{hasFlag:o,addFlag:a,removeFlag:l}=fI(e&&i?3:0),c=v.useRef(!1),d=v.useRef(!1),u=hC();return ei(()=>{var f;if(e){if(n&&s(!0),!t){n&&a(3);return}return(f=r==null?void 0:r.start)==null||f.call(r,n),vI(t,{inFlight:c,prepare(){d.current?d.current=!1:d.current=c.current,c.current=!0,!d.current&&(n?(a(3),l(4)):(a(4),l(2)))},run(){d.current?n?(l(3),a(4)):(l(4),a(3)):n?l(1):a(1)},done(){var p;d.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(c.current=!1,l(7),n||s(!1),(p=r==null?void 0:r.end)==null||p.call(r,n))}})}},[e,n,t,u]),e?[i,{closed:o(1),enter:o(2),leave:o(4),transition:o(2)||o(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function vI(e,{prepare:t,run:n,done:r,inFlight:i}){let s=Qc();return xI(e,{prepare:t,inFlight:i}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(yI(e,r))})}),s.dispose}function yI(e,t){var n,r;let i=Qc();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 xI(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 wg=v.createContext(null);wg.displayName="OpenClosedContext";var Ai=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ai||{});function wC(){return v.useContext(wg)}function wI({value:e,children:t}){return L.createElement(wg.Provider,{value:e},t)}function bI(){let e=typeof document>"u";return"useSyncExternalStore"in of?(t=>t.useSyncExternalStore)(of)(()=>()=>{},()=>!1,()=>!e):!1}function bC(){let e=bI(),[t,n]=v.useState(pu.isHandoffComplete);return t&&pu.isHandoffComplete===!1&&n(!1),v.useEffect(()=>{t!==!0&&n(!0)},[t]),v.useEffect(()=>pu.handoff(),[]),e?!1:t}function SI(){let e=v.useRef(!1);return ei(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function SC(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:CC)!==v.Fragment||L.Children.count(e.children)===1}let Kc=v.createContext(null);Kc.displayName="TransitionContext";var kI=(e=>(e.Visible="visible",e.Hidden="hidden",e))(kI||{});function CI(){let e=v.useContext(Kc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function TI(){let e=v.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=v.createContext(null);Xc.displayName="NestingContext";function Zc(e){return"children"in e?Zc(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function kC(e,t){let n=mC(e),r=v.useRef([]),i=SI(),s=hC(),o=ar((p,h=zr.Hidden)=>{let m=r.current.findIndex(({el:x})=>x===p);m!==-1&&(Yc(h,{[zr.Unmount](){r.current.splice(m,1)},[zr.Hidden](){r.current[m].state="hidden"}}),s.microTask(()=>{var x;!Zc(r)&&i.current&&((x=n.current)==null||x.call(n))}))}),a=ar(p=>{let h=r.current.find(({el:m})=>m===p);return h?h.state!=="visible"&&(h.state="visible"):r.current.push({el:p,state:"visible"}),()=>o(p,zr.Unmount)}),l=v.useRef([]),c=v.useRef(Promise.resolve()),d=v.useRef({enter:[],leave:[]}),u=ar((p,h,m)=>{l.current.splice(0),t&&(t.chains.current[h]=t.chains.current[h].filter(([x])=>x!==p)),t==null||t.chains.current[h].push([p,new Promise(x=>{l.current.push(x)})]),t==null||t.chains.current[h].push([p,new Promise(x=>{Promise.all(d.current[h].map(([g,w])=>w)).then(()=>x())})]),h==="enter"?c.current=c.current.then(()=>t==null?void 0:t.wait.current).then(()=>m(h)):m(h)}),f=ar((p,h,m)=>{Promise.all(d.current[h].splice(0).map(([x,g])=>g)).then(()=>{var x;(x=l.current.shift())==null||x()}).then(()=>m(h))});return v.useMemo(()=>({children:r,register:a,unregister:o,onStart:u,onStop:f,wait:c,chains:d}),[a,o,r,u,f,d,c])}let CC=v.Fragment,TC=gC.RenderStrategy;function EI(e,t){var n,r;let{transition:i=!0,beforeEnter:s,afterEnter:o,beforeLeave:a,afterLeave:l,enter:c,enterFrom:d,enterTo:u,entered:f,leave:p,leaveFrom:h,leaveTo:m,...x}=e,[g,w]=v.useState(null),b=v.useRef(null),k=SC(e),T=xC(...k?[b,t,w]:t===null?[]:[t]),E=(n=x.unmount)==null||n?zr.Unmount:zr.Hidden,{show:_,appear:P,initial:M}=CI(),[N,R]=v.useState(_?"visible":"hidden"),F=TI(),{register:B,unregister:V}=F;ei(()=>B(b),[B,b]),ei(()=>{if(E===zr.Hidden&&b.current){if(_&&N!=="visible"){R("visible");return}return Yc(N,{hidden:()=>V(b),visible:()=>B(b)})}},[N,b,B,V,_,E]);let K=bC();ei(()=>{if(k&&K&&N==="visible"&&b.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[b,N,K,k]);let ee=M&&!P,ne=P&&_&&M,O=v.useRef(!1),$=kC(()=>{O.current||(R("hidden"),V(b))},F),H=ar(Ne=>{O.current=!0;let Je=Ne?"enter":"leave";$.onStart(b,Je,et=>{et==="enter"?s==null||s():et==="leave"&&(a==null||a())})}),q=ar(Ne=>{let Je=Ne?"enter":"leave";O.current=!1,$.onStop(b,Je,et=>{et==="enter"?o==null||o():et==="leave"&&(l==null||l())}),Je==="leave"&&!Zc($)&&(R("hidden"),V(b))});v.useEffect(()=>{k&&i||(H(_),q(_))},[_,k,i]);let Q=!(!i||!k||!K||ee),[,te]=gI(Q,g,_,{start:H,end:q}),ce=Si({ref:T,className:((r=nh(x.className,ne&&c,ne&&d,te.enter&&c,te.enter&&te.closed&&d,te.enter&&!te.closed&&u,te.leave&&p,te.leave&&!te.closed&&h,te.leave&&te.closed&&m,!te.transition&&_&&f))==null?void 0:r.trim())||void 0,...mI(te)}),ye=0;N==="visible"&&(ye|=Ai.Open),N==="hidden"&&(ye|=Ai.Closed),_&&N==="hidden"&&(ye|=Ai.Opening),!_&&N==="visible"&&(ye|=Ai.Closing);let re=vC();return L.createElement(Xc.Provider,{value:$},L.createElement(wI,{value:ye},re({ourProps:ce,theirProps:x,defaultTag:CC,features:TC,visible:N==="visible",name:"Transition.Child"})))}function _I(e,t){let{show:n,appear:r=!1,unmount:i=!0,...s}=e,o=v.useRef(null),a=SC(e),l=xC(...a?[o,t]:t===null?[]:[t]);bC();let c=wC();if(n===void 0&&c!==null&&(n=(c&Ai.Open)===Ai.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[d,u]=v.useState(n?"visible":"hidden"),f=kC(()=>{n||u("hidden")}),[p,h]=v.useState(!0),m=v.useRef([n]);ei(()=>{p!==!1&&m.current[m.current.length-1]!==n&&(m.current.push(n),h(!1))},[m,n]);let x=v.useMemo(()=>({show:n,appear:r,initial:p}),[n,r,p]);ei(()=>{n?u("visible"):!Zc(f)&&o.current!==null&&u("hidden")},[n,f]);let g={unmount:i},w=ar(()=>{var T;p&&h(!1),(T=e.beforeEnter)==null||T.call(e)}),b=ar(()=>{var T;p&&h(!1),(T=e.beforeLeave)==null||T.call(e)}),k=vC();return L.createElement(Xc.Provider,{value:f},L.createElement(Kc.Provider,{value:x},k({ourProps:{...g,as:v.Fragment,children:L.createElement(EC,{ref:l,...g,...s,beforeEnter:w,beforeLeave:b})},theirProps:{},defaultTag:v.Fragment,features:TC,visible:d==="visible",name:"Transition"})))}function PI(e,t){let n=v.useContext(Kc)!==null,r=wC()!==null;return L.createElement(L.Fragment,null,!n&&r?L.createElement(rh,{ref:t,...e}):L.createElement(EC,{ref:t,...e}))}let rh=xg(_I),EC=xg(EI),jI=xg(PI),RI=Object.assign(rh,{Child:jI,Root:rh});const bg=v.createContext(void 0),ca=({as:e="div",children:t,className:n})=>{const[r,i]=v.useState(!1),s=v.useCallback(()=>{i(a=>!a)},[]),o=v.useRef(null);return v.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]),y.jsx(bg.Provider,{value:{open:r,setOpen:i,toggleOpen:s},children:y.jsx(e,{ref:o,className:`dropdown ${n}`,children:t})})},AI=({type:e,children:t,className:n,style:r,id:i,title:s})=>{const{open:o,toggleOpen:a,setOpen:l}=v.useContext(bg),c=Oe(),d=n||"font-bold py-2 px-4 rounded-sm",u=n||"transition-all duration-200 ease-linear border-dashed dropdown-toggle btn";return y.jsx("div",{children:e==="a"?y.jsx(yP,{id:i,to:"/#",onClick:f=>{f.preventDefault(),a()},className:u+(o?" show":""),children:t}):y.jsx("button",{id:i,onClick:f=>{f.stopPropagation(),f.preventDefault(),l(!o)},type:"button",className:d,style:{backgroundColor:c.getColor(C.ButtonBackground),color:c.getColor(C.ButtonText),borderRadius:c.getRadius(),...r},title:s,children:t})})},OI=({as:e="div",className:t,style:n,children:r,placement:i})=>{const{open:s,setOpen:o}=v.useContext(bg),a=Oe(),l=t||"absolute z-50 py-2 mt-1 text-left list-none rounded-md shadow-md dropdown-menu min-w-max",[c,d]=v.useState("right-end");v.useEffect(()=>{i&&d(i)},[i]);const u=v.useRef(null),f=document.getElementsByTagName("html")[0].getAttribute("dir"),p=()=>{if(s&&c==="right-end"&&u.current){const h=u.current;h.style.position="absolute",f==="rtl"?h.style.inset="0px auto auto 0px":h.style.inset="0px 0px auto auto",h.style.margin="0px",h.style.transform="translate(0px, 54px)"}if(s&&c==="start-end"&&u.current){const h=u.current;h.style.position="absolute",h.style.inset="0px auto auto 0px",h.style.margin="0px",h.style.transform="translate(0px, 20px)"}if(s&&c==="top-end"&&u.current){const h=u.current;h.style.position="absolute",h.style.inset="auto 0px 0px auto",h.style.margin="0px",h.style.transform="translate(-58px, -30px)"}if(s&&c==="bottom-start"&&u.current){const h=u.current;h.style.position="absolute",h.style.inset="0px 0px auto auto",h.style.margin="0px",h.style.transform="translate(0px, 54px)"}if(s&&c==="bottom-end"&&u.current){const h=u.current;h.style.position="absolute",h.style.inset="0px 0px auto auto",h.style.margin="0px",h.style.transform="translate(0px, 39px)"}if(s&&c==="top-start"&&u.current){const h=u.current;h.style.position="absolute",h.style.inset="auto auto 0px 0px",h.style.margin="0px",h.style.transform="translate(0px, -95px)"}if(s&&c==="left-end"&&u.current){const h=u.current;h.style.position="absolute",h.style.inset="0px auto auto 0px",h.style.margin="0px",h.style.right="0px",h.style.transform="translate(0px, -20px)"}return{}};return y.jsx(RI,{as:L.Fragment,show:s,children:h=>y.jsx(e,{ref:u,onClick:()=>o(!1),className:`${l} ${h==="entered"?"transition-all":""}`,style:{...p(),backgroundColor:a.getColor(C.Background),borderRadius:a.getRadius(),boxShadow:`0 10px 25px -5px ${a.getColor(C.ShadowColor)}, 0 8px 10px -6px ${a.getColor(C.ShadowColor)}`,...n},children:r})})};ca.Trigger=AI;ca.Content=OI;function DI({onChatClose:e}){const[t,n]=v.useState(!1),r=Oe(),i=sl(),s=ci(),o=()=>{s==null||s.emit(En.ChatClose,{}),e()};return y.jsxs(y.Fragment,{children:[y.jsx(Xr,{children:t&&y.jsx(ve.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"absolute inset-0 z-50 flex items-center justify-center p-4",style:{backgroundColor:r.getColor(C.ModalOverlayColor)},children:y.jsxs(ve.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},transition:{duration:.2},className:"p-5 rounded-xl shadow-lg max-w-xs w-full",style:{backgroundColor:r.getColor(C.Background),borderRadius:r.getRadius()},children:[y.jsx("div",{className:"text-lg font-semibold mb-2",style:{color:r.getColor(C.ChatCloseConfirmText)},children:i(Y.ChatCloseConfirm)}),y.jsx("div",{className:"text-sm mb-4",style:{color:r.getColor(C.FooterText)},children:i(Y.ChatCloseWarning)}),y.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[y.jsx("button",{type:"button",className:"px-4 py-2 rounded-lg font-medium transition-all",style:{backgroundColor:r.getColor(C.GreeterBackground),color:r.getColor(C.GreeterText),borderRadius:r.getRadius()},onClick:()=>n(!1),children:i(Y.CancelAction)}),y.jsx("button",{type:"button",className:"px-4 py-2 rounded-lg font-medium transition-all",style:{backgroundColor:r.getColor(C.ErrorBackground),color:r.getColor(C.ErrorText),borderRadius:r.getRadius()},onClick:o,children:i(Y.CloseAction)})]})]})})}),y.jsxs(ca,{className:"relative flex items-center h-full",children:[y.jsx(ca.Trigger,{type:"button",className:"h-full flex items-center rounded-full p-1 transition-colors",style:{borderRadius:r.getRadius()},id:"dropdownMenuButton","data-bs-toggle":"dropdown",title:i(Y.ChatSettings),children:y.jsx(fe.Menu,{className:"size-5",style:{color:r.getColor(C.HeaderText)}})}),y.jsx(Xr,{children:!t&&y.jsx(ve.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:y.jsxs(ca.Content,{placement:"left-end",className:"text-left rounded-lg shadow-xl dropdown-menu w-full",style:{backgroundColor:r.getColor(C.Background),borderRadius:r.getRadius()},"aria-labelledby":"dropdownMenuButton",children:[y.jsx("h5",{className:"text-sm font-semibold px-3 py-2 border-b",style:{color:r.getColor(C.FooterText),borderBottomColor:r.getColor(C.DividerColor)},children:i(Y.ChatSettings)}),y.jsx("ul",{className:"py-2 px-2",children:y.jsx("li",{children:y.jsxs("button",{className:"p-2 rounded-lg w-full flex items-center gap-2 text-sm transition-all duration-200 ease-linear dropdown-item",style:{color:r.getColor(C.ErrorText),borderRadius:r.getRadius()},onClick:a=>{a.stopPropagation(),a.preventDefault(),n(!0)},children:[y.jsx(fe.X,{className:"w-4 h-4"}),y.jsx("span",{children:i(Y.ChatEndConversation)})]})})})]})})})]})]})}function FI({text:e}){const n=Oe().getColor(C.LinkColor),i=(s=>{const o=/(https?:\/\/(?:[-\w.])+(?:\:[0-9]+)?(?:\/(?:[\w\/_.\-~!$&'()*+,;=:@])*(?:\?(?:[\w&=%.\-~!$'()*+,;=:@/])*)?(?:\#(?:[\w.\-~!$&'()*+,;=:@/])*)?)?|(?:www\.)?(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,}(?:\/(?:[\w\/_.\-~!$&'()*+,;=:@])*(?:\?(?:[\w&=%.\-~!$'()*+,;=:@/])*)?(?:\#(?:[\w.\-~!$&'()*+,;=:@/])*)?)?)/gi,a=s.split(/(<[^>]*>)/g);let l="",c=!1;for(let d=0;d<a.length;d++){const u=a[d];if(u.startsWith("<")&&u.endsWith(">"))if(u.match(/^<a\s/i)){if(u.includes("style="))l+=u;else{const f=u.replace(/^(<a\s[^>]*)(>)$/i,`$1 style="color: ${n}; text-decoration: underline;"$2`);l+=f}c=!0}else u.match(/^<\/a>/i)?(l+=u,c=!1):l+=u;else if(!c&&u.trim()){const f=u.replace(o,p=>{const h=p.replace(/[">]+$/,"");return`<a href="${/^https?:\/\//i.test(h)?h:`https://${h}`}" target="_blank" rel="noopener noreferrer" style="color: ${n}; text-decoration: underline;">${h}</a>`});l+=f}else l+=u}return l})(e);return y.jsx("span",{className:"linkified",dangerouslySetInnerHTML:{__html:i}})}const hx="opacity-0 group-hover/item:opacity-100 transition-opacity duration-200";function _C({files:e,className:t,onDelete:n,hideName:r}){const i=ss(),[s,o]=v.useState(new Map);v.useEffect(()=>{const h=new Map;for(let m=0;m<e.length;m++){const x=e[m];if(x instanceof File){const g=URL.createObjectURL(x);h.set(m,g)}}return o(h),()=>{for(const m of h.values())URL.revokeObjectURL(m)}},[e]);const a=h=>{var x;return((x=(h instanceof File?h.name:h).split(".").pop())==null?void 0:x.toLowerCase())||""},l=h=>h instanceof File?h.name:h.split("/").pop()||h,c=h=>{const[m,x]=h.split(".");return m.length>10?`${m.slice(0,10)}...${x}`:h},d=h=>{const m=["jpg","jpeg","png","gif","bmp","webp","svg"],x=a(h);return m.includes(x)},u=(h,m)=>{if(h instanceof File){const x=s.get(m);x&&window.open(x,"_blank")}else window.open(h,"_blank")},f=(h,m)=>{h.stopPropagation(),n==null||n(m)},p=(h,m)=>h instanceof File?s.get(m)||"":h;return y.jsx("div",{className:ge("flex gap-2 w-full overflow-x-auto",t),children:e.map((h,m)=>{const x=l(h),g=a(h),w=d(h),b=p(h,m);return y.jsxs("div",{onClick:()=>u(h,m),className:"min-w-28 max-w-28 cursor-pointer group/item border border-gray-200 rounded-lg p-2 hover:shadow-md transition-all duration-200 hover:border-gray-300 bg-white relative",children:[n&&y.jsx("button",{onClick:k=>f(k,m),className:ge("absolute top-1 right-1 w-5 h-5 bg-red-500 hover:bg-red-600 text-white rounded-full flex items-center justify-center transition-opacity duration-200 z-10",{"opacity-0 group-hover/item:opacity-100":!i}),children:y.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:y.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})}),w?y.jsx("div",{className:"aspect-square w-fit mb-1 overflow-hidden rounded",children:y.jsx("img",{src:b,alt:x,className:"w-24 h-24 min-h-24 min-w-24 object-cover group-hover/item:scale-105 transition-transform duration-200"})}):y.jsx("div",{className:"min-w-24 aspect-square w-full mb-1 flex items-center justify-center bg-gray-50 rounded group-hover/item:bg-gray-100 transition-colors duration-200",children:y.jsxs("div",{className:"text-center",children:[y.jsx("div",{className:"w-8 h-8 mx-auto mb-1 bg-blue-100 rounded flex items-center justify-center",children:y.jsx("svg",{className:"w-4 h-4 text-blue-600",fill:"currentColor",viewBox:"0 0 20 20",children:y.jsx("path",{fillRule:"evenodd",d:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z",clipRule:"evenodd"})})}),y.jsx("div",{className:ge("text-[10px] font-medium text-gray-600 uppercase",{[hx]:r}),children:g||"file"})]})}),y.jsx("div",{className:ge("max-w-24 text-xs text-gray-700 font-medium truncate text-ellipsis overflow-hidden",{[hx]:r}),title:x,children:c(x)})]},m)})})}const MI={hidden:{opacity:0,y:8},visible:{opacity:1,y:0}},NI={hidden:{opacity:0,y:8,scale:.95},visible:{opacity:1,y:0,scale:1}};function LI({buttons:e,className:t=""}){const n=Oe();if(!e||e.length===0)return null;const r=s=>{s.startsWith("http://")||s.startsWith("https://")?window.open(s,"_blank","noopener,noreferrer"):s.startsWith("tel:")||s.startsWith("mailto:")?window.location.href=s:console.log("Custom action:",s)},i=s=>s.startsWith("http://")||s.startsWith("https://")?y.jsx(fe.ExternalLink,{className:"size-4"}):s.startsWith("tel:")?y.jsx(fe.Phone,{className:"size-4"}):s.startsWith("mailto:")?y.jsx(fe.Mail,{className:"size-4"}):null;return y.jsx(ve.div,{className:ge(t,"mt-2"),initial:"hidden",animate:"visible",variants:MI,transition:{duration:.3,ease:"easeOut",staggerChildren:.08},children:y.jsx("div",{className:"rounded-lg ",style:{backgroundColor:`${n.getColor(C.Background)}f0`},children:y.jsx("div",{className:"flex flex-wrap gap-2",children:e.map((s,o)=>y.jsxs(ve.button,{variants:NI,transition:{duration:.25,ease:"easeOut"},whileHover:{scale:1.02,y:-1,transition:{duration:.15}},whileTap:{scale:.98,transition:{duration:.1}},onClick:()=>r(s.url),className:"group inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 relative overflow-hidden cursor-pointer",style:{backgroundColor:n.getColor(C.GreeterBackground),color:n.getColor(C.GreeterText),borderRadius:n.getRadius(),border:`1px solid ${n.getColor(C.DividerColor)}`,boxShadow:`0 1px 3px ${n.getColor(C.ShadowColor)}30`},onMouseEnter:a=>{a.currentTarget.style.backgroundColor=n.getColor(C.ButtonBackground),a.currentTarget.style.color=n.getColor(C.ButtonText),a.currentTarget.style.borderColor=n.getColor(C.ButtonBackground),a.currentTarget.style.boxShadow=`0 4px 12px ${n.getColor(C.ShadowColor)}40`},onMouseLeave:a=>{a.currentTarget.style.backgroundColor=n.getColor(C.GreeterBackground),a.currentTarget.style.color=n.getColor(C.GreeterText),a.currentTarget.style.borderColor=n.getColor(C.DividerColor),a.currentTarget.style.boxShadow=`0 1px 3px ${n.getColor(C.ShadowColor)}30`},children:[y.jsxs("span",{className:"flex items-center gap-2",children:[i(s.url),y.jsx("span",{className:"font-medium",children:s.label})]}),y.jsx("div",{className:"absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-300",style:{background:`linear-gradient(45deg, transparent 30%, ${n.getColor(C.ButtonText)}10 50%, transparent 70%)`,borderRadius:n.getRadius()}})]},`${s.label}-${o}`))})})})}const II={hidden:{opacity:0,y:8},visible:()=>({opacity:1,y:0})},mx=e=>e?(typeof e=="string"&&(e=new Date(e)),e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})):"";function $I({messages:e,isTyping:t}){var u,f,p,h;const n=v.useRef(null),r=v.useRef(null),[i,s]=v.useState(!0),{widget:o}=kt(),a=Oe(),l=ss(),c=()=>{var m;(m=n.current)==null||m.scrollIntoView({behavior:"smooth"})},d=()=>{if(r.current){const{scrollTop:m,scrollHeight:x,clientHeight:g}=r.current,w=x-m<=g+10;s(w)}};return v.useEffect(()=>{(i||t)&&c()},[e,i,t]),y.jsxs("section",{onScroll:d,ref:r,className:"flex flex-col gap-3 w-full grow pt-4 px-4 overflow-y-auto",children:[((f=(u=o==null?void 0:o.appearance)==null?void 0:u.design)==null?void 0:f.greeting_message)&&y.jsx("div",{className:"flex w-full items-center justify-start",children:y.jsx("div",{className:"max-w-[85%] whitespace-pre-wrap border-0 px-3 py-2 shadow-sm",style:{backgroundColor:a.getColor(C.MessageAdminBackground),color:a.getColor(C.MessageAdminText),borderRadius:a.getRadius()},children:(h=(p=o==null?void 0:o.appearance)==null?void 0:p.design)==null?void 0:h.greeting_message})}),y.jsx(Xr,{children:e.filter(m=>{var x;return(!!m.content||((x=m.files)==null?void 0:x.length)>0)&&m.content!==`
110
- `}).map((m,x)=>y.jsxs(ve.div,{custom:x,initial:"hidden",animate:"visible",variants:II,transition:{delay:x*.03,duration:.15,ease:"easeOut"},className:ge("flex flex-col w-full justify-center break-words",{"items-end":m.sender_type===Le.Customer||m.activity_type===ki.ChatCreated,"items-start":m.sender_type===Le.User,"items-center":m.sender_type===Le.System||m.sender_type===Le.Activity}),children:[m.sender_type===Le.System&&y.jsx("div",{className:"whitespace-pre-wrap px-3 py-1.5 text-sm shadow-sm",style:{backgroundColor:a.getColor(C.MessageAdminBackground),color:a.getColor(C.MessageAdminText),borderRadius:a.getRadius()},children:m.content}),([Le.Customer,Le.User].includes(m.sender_type)||m.activity_type===ki.ChatCreated)&&y.jsxs(ve.div,{initial:{scale:.95},animate:{scale:1},transition:{duration:.2},className:"max-w-[85%] whitespace-pre-wrap border-0 px-3 py-2 shadow-sm",style:{backgroundColor:m.sender_type===Le.User?a.getColor(C.MessageAdminBackground):a.getColor(C.MessageVisitorBackground),color:m.sender_type===Le.User?a.getColor(C.MessageAdminText):a.getColor(C.MessageVisitorText),borderRadius:a.getRadius()},children:[m.files&&m.files.length>0&&y.jsx(_C,{files:m.files,className:"mb-1",hideName:!0}),m.sender_type===Le.User?y.jsx(FI,{text:m.content}):m.content,m.created_at&&y.jsx("div",{className:"text-[0.5rem] text-right opacity-70",style:{color:m.sender_type===Le.User?a.getColor(C.MessageAdminText):a.getColor(C.MessageVisitorText)},children:mx(m.created_at)})]}),([Le.Customer,Le.User].includes(m.sender_type)||m.activity_type===ki.ChatCreated)&&m.buttons&&m.buttons.length>0&&y.jsx("div",{className:ge("w-full",{"flex justify-end":m.sender_type===Le.Customer||m.activity_type===ki.ChatCreated,"flex justify-start":m.sender_type===Le.User}),children:y.jsx("div",{className:"max-w-[85%]",children:y.jsx(LI,{buttons:m.buttons})})}),m.sender_type===Le.Activity&&m.activity_type!==ki.ChatCreated&&(m.content.split("_").length===3?y.jsxs("div",{className:"whitespace-pre-wrap border-0 rounded-full px-3 py-1 text-xs shadow-none",style:{backgroundColor:a.getColor(C.MessageAdminBackground),color:a.getColor(C.MessageAdminText)},children:[m.content.split("_")[2]," odaya katıldı"]}):y.jsx("div",{className:"whitespace-pre-wrap border-0 rounded-full px-3 py-1 text-xs shadow-none",style:{backgroundColor:a.getColor(C.MessageAdminBackground),color:a.getColor(C.MessageAdminText)},children:m.content})),Le.System===m.sender_type&&y.jsx("div",{className:"text-xs",style:{color:a.getColor(C.MessageAdminText)},children:m.created_at&&mx(m.created_at)})]},m.id||x))}),t&&y.jsx("div",{className:"flex w-full items-center justify-start mt-1",children:y.jsx("div",{className:"flex items-center rounded-full px-3 py-1.5 shadow-none",style:{backgroundColor:a.getColor(C.MessageAdminBackground)},children:y.jsxs("div",{className:"flex space-x-1",children:[y.jsx("div",{className:"size-2 rounded-full animate-bounce",style:{backgroundColor:a.getColor(C.MessageAdminText),animationDelay:"0ms"}}),y.jsx("div",{className:"size-2 rounded-full animate-bounce",style:{backgroundColor:a.getColor(C.MessageAdminText),animationDelay:"150ms"}}),y.jsx("div",{className:"size-2 rounded-full animate-bounce",style:{backgroundColor:a.getColor(C.MessageAdminText),animationDelay:"300ms"}})]})})}),!i&&y.jsx("div",{className:ge("fixed",{"bottom-40 right-14":!l,"bottom-28 right-4":l}),children:y.jsx(on,{type:"button",variant:"primary",kind:"solid",rounded:!0,className:"size-10 flex items-center justify-center p-0! shadow-md",onClick:()=>{var m,x;(x=r.current)==null||x.scrollTo({top:(m=r.current)==null?void 0:m.scrollHeight,behavior:"smooth"})},children:y.jsx(fe.ArrowDown,{className:"size-4"})})}),y.jsx("div",{ref:n})]})}/**
108
+ `))}else{let f=d.props,h=f==null?void 0:f.className,m=typeof h=="function"?(...g)=>nh(h(...g),l.className):nh(h,l.className),p=m?{className:m}:{},w=yC(d.props,ki(nf(l,["ref"])));for(let g in c)g in w&&delete c[g];return v.cloneElement(d,Object.assign({},w,c,u,{ref:i(cI(d),u.ref)},p))}return v.createElement(s,Object.assign({},nf(l,["ref"]),s!==v.Fragment&&u,s!==v.Fragment&&c),d)}function lI(){let e=v.useRef([]),t=v.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 uI(...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 yC(...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 xg(e){var t;return Object.assign(v.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function ki(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function nf(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function cI(e){return L.version.split(".")[0]>="19"?e.props.ref:e.ref}let dI=Symbol();function xC(...e){let t=v.useRef(e);v.useEffect(()=>{t.current=e},[e]);let n=lr(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[dI]))?void 0:n}function fI(e=0){let[t,n]=v.useState(e),r=v.useCallback(l=>n(l),[t]),i=v.useCallback(l=>n(u=>u|l),[t]),s=v.useCallback(l=>(t&l)===l,[t]),o=v.useCallback(l=>n(u=>u&~l),[n]),a=v.useCallback(l=>n(u=>u^l),[n]);return{flags:t,setFlag:r,addFlag:i,hasFlag:s,removeFlag:o,toggleFlag:a}}var pI={},fx,px;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((fx=process==null?void 0:pI)==null?void 0:fx.NODE_ENV)==="test"&&typeof((px=Element==null?void 0:Element.prototype)==null?void 0:px.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 hI=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(hI||{});function mI(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function gI(e,t,n,r){let[i,s]=v.useState(n),{hasFlag:o,addFlag:a,removeFlag:l}=fI(e&&i?3:0),u=v.useRef(!1),d=v.useRef(!1),c=hC();return ti(()=>{var f;if(e){if(n&&s(!0),!t){n&&a(3);return}return(f=r==null?void 0:r.start)==null||f.call(r,n),vI(t,{inFlight:u,prepare(){d.current?d.current=!1:d.current=u.current,u.current=!0,!d.current&&(n?(a(3),l(4)):(a(4),l(2)))},run(){d.current?n?(l(3),a(4)):(l(4),a(3)):n?l(1):a(1)},done(){var h;d.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 vI(e,{prepare:t,run:n,done:r,inFlight:i}){let s=Qc();return xI(e,{prepare:t,inFlight:i}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(yI(e,r))})}),s.dispose}function yI(e,t){var n,r;let i=Qc();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 xI(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 wg=v.createContext(null);wg.displayName="OpenClosedContext";var Ri=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ri||{});function wC(){return v.useContext(wg)}function wI({value:e,children:t}){return L.createElement(wg.Provider,{value:e},t)}function bI(){let e=typeof document>"u";return"useSyncExternalStore"in of?(t=>t.useSyncExternalStore)(of)(()=>()=>{},()=>!1,()=>!e):!1}function bC(){let e=bI(),[t,n]=v.useState(pu.isHandoffComplete);return t&&pu.isHandoffComplete===!1&&n(!1),v.useEffect(()=>{t!==!0&&n(!0)},[t]),v.useEffect(()=>pu.handoff(),[]),e?!1:t}function SI(){let e=v.useRef(!1);return ti(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function SC(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:CC)!==v.Fragment||L.Children.count(e.children)===1}let Kc=v.createContext(null);Kc.displayName="TransitionContext";var kI=(e=>(e.Visible="visible",e.Hidden="hidden",e))(kI||{});function CI(){let e=v.useContext(Kc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function TI(){let e=v.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=v.createContext(null);Xc.displayName="NestingContext";function Zc(e){return"children"in e?Zc(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function kC(e,t){let n=mC(e),r=v.useRef([]),i=SI(),s=hC(),o=lr((h,m=Vr.Hidden)=>{let p=r.current.findIndex(({el:w})=>w===h);p!==-1&&(Yc(m,{[Vr.Unmount](){r.current.splice(p,1)},[Vr.Hidden](){r.current[p].state="hidden"}}),s.microTask(()=>{var w;!Zc(r)&&i.current&&((w=n.current)==null||w.call(n))}))}),a=lr(h=>{let m=r.current.find(({el:p})=>p===h);return m?m.state!=="visible"&&(m.state="visible"):r.current.push({el:h,state:"visible"}),()=>o(h,Vr.Unmount)}),l=v.useRef([]),u=v.useRef(Promise.resolve()),d=v.useRef({enter:[],leave:[]}),c=lr((h,m,p)=>{l.current.splice(0),t&&(t.chains.current[m]=t.chains.current[m].filter(([w])=>w!==h)),t==null||t.chains.current[m].push([h,new Promise(w=>{l.current.push(w)})]),t==null||t.chains.current[m].push([h,new Promise(w=>{Promise.all(d.current[m].map(([g,x])=>x)).then(()=>w())})]),m==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>p(m)):p(m)}),f=lr((h,m,p)=>{Promise.all(d.current[m].splice(0).map(([w,g])=>g)).then(()=>{var w;(w=l.current.shift())==null||w()}).then(()=>p(m))});return v.useMemo(()=>({children:r,register:a,unregister:o,onStart:c,onStop:f,wait:u,chains:d}),[a,o,r,c,f,d,u])}let CC=v.Fragment,TC=gC.RenderStrategy;function EI(e,t){var n,r;let{transition:i=!0,beforeEnter:s,afterEnter:o,beforeLeave:a,afterLeave:l,enter:u,enterFrom:d,enterTo:c,entered:f,leave:h,leaveFrom:m,leaveTo:p,...w}=e,[g,x]=v.useState(null),b=v.useRef(null),T=SC(e),E=xC(...T?[b,t,x]:t===null?[]:[t]),C=(n=w.unmount)==null||n?Vr.Unmount:Vr.Hidden,{show:_,appear:A,initial:F}=CI(),[M,R]=v.useState(_?"visible":"hidden"),$=TI(),{register:U,unregister:Y}=$;ti(()=>U(b),[U,b]),ti(()=>{if(C===Vr.Hidden&&b.current){if(_&&M!=="visible"){R("visible");return}return Yc(M,{hidden:()=>Y(b),visible:()=>U(b)})}},[M,b,U,Y,_,C]);let J=bC();ti(()=>{if(T&&J&&M==="visible"&&b.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[b,M,J,T]);let te=F&&!A,ne=A&&_&&F,j=v.useRef(!1),D=kC(()=>{j.current||(R("hidden"),Y(b))},$),B=lr(Le=>{j.current=!0;let et=Le?"enter":"leave";D.onStart(b,et,tt=>{tt==="enter"?s==null||s():tt==="leave"&&(a==null||a())})}),z=lr(Le=>{let et=Le?"enter":"leave";j.current=!1,D.onStop(b,et,tt=>{tt==="enter"?o==null||o():tt==="leave"&&(l==null||l())}),et==="leave"&&!Zc(D)&&(R("hidden"),Y(b))});v.useEffect(()=>{T&&i||(B(_),z(_))},[_,T,i]);let H=!(!i||!T||!J||te),[,ee]=gI(H,g,_,{start:B,end:z}),de=ki({ref:E,className:((r=nh(w.className,ne&&u,ne&&d,ee.enter&&u,ee.enter&&ee.closed&&d,ee.enter&&!ee.closed&&c,ee.leave&&h,ee.leave&&!ee.closed&&m,ee.leave&&ee.closed&&p,!ee.transition&&_&&f))==null?void 0:r.trim())||void 0,...mI(ee)}),ye=0;M==="visible"&&(ye|=Ri.Open),M==="hidden"&&(ye|=Ri.Closed),_&&M==="hidden"&&(ye|=Ri.Opening),!_&&M==="visible"&&(ye|=Ri.Closing);let re=vC();return L.createElement(Xc.Provider,{value:D},L.createElement(wI,{value:ye},re({ourProps:de,theirProps:w,defaultTag:CC,features:TC,visible:M==="visible",name:"Transition.Child"})))}function _I(e,t){let{show:n,appear:r=!1,unmount:i=!0,...s}=e,o=v.useRef(null),a=SC(e),l=xC(...a?[o,t]:t===null?[]:[t]);bC();let u=wC();if(n===void 0&&u!==null&&(n=(u&Ri.Open)===Ri.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[d,c]=v.useState(n?"visible":"hidden"),f=kC(()=>{n||c("hidden")}),[h,m]=v.useState(!0),p=v.useRef([n]);ti(()=>{h!==!1&&p.current[p.current.length-1]!==n&&(p.current.push(n),m(!1))},[p,n]);let w=v.useMemo(()=>({show:n,appear:r,initial:h}),[n,r,h]);ti(()=>{n?c("visible"):!Zc(f)&&o.current!==null&&c("hidden")},[n,f]);let g={unmount:i},x=lr(()=>{var E;h&&m(!1),(E=e.beforeEnter)==null||E.call(e)}),b=lr(()=>{var E;h&&m(!1),(E=e.beforeLeave)==null||E.call(e)}),T=vC();return L.createElement(Xc.Provider,{value:f},L.createElement(Kc.Provider,{value:w},T({ourProps:{...g,as:v.Fragment,children:L.createElement(EC,{ref:l,...g,...s,beforeEnter:x,beforeLeave:b})},theirProps:{},defaultTag:v.Fragment,features:TC,visible:d==="visible",name:"Transition"})))}function jI(e,t){let n=v.useContext(Kc)!==null,r=wC()!==null;return L.createElement(L.Fragment,null,!n&&r?L.createElement(rh,{ref:t,...e}):L.createElement(EC,{ref:t,...e}))}let rh=xg(_I),EC=xg(EI),PI=xg(jI),AI=Object.assign(rh,{Child:PI,Root:rh});const bg=v.createContext(void 0),ca=({as:e="div",children:t,className:n})=>{const[r,i]=v.useState(!1),s=v.useCallback(()=>{i(a=>!a)},[]),o=v.useRef(null);return v.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]),y.jsx(bg.Provider,{value:{open:r,setOpen:i,toggleOpen:s},children:y.jsx(e,{ref:o,className:`dropdown ${n}`,children:t})})},RI=({type:e,children:t,className:n,style:r,id:i,title:s})=>{const{open:o,toggleOpen:a,setOpen:l}=v.useContext(bg),u=De(),d=n||"font-bold py-2 px-4 rounded-sm",c=n||"transition-all duration-200 ease-linear border-dashed dropdown-toggle btn";return y.jsx("div",{children:e==="a"?y.jsx(yj,{id:i,to:"/#",onClick:f=>{f.preventDefault(),a()},className:c+(o?" show":""),children:t}):y.jsx("button",{id:i,onClick:f=>{f.stopPropagation(),f.preventDefault(),l(!o)},type:"button",className:d,style:{backgroundColor:u.getColor(k.ButtonBackground),color:u.getColor(k.ButtonText),borderRadius:u.getRadius(),...r},title:s,children:t})})},OI=({as:e="div",className:t,style:n,children:r,placement:i})=>{const{open:s,setOpen:o}=v.useContext(bg),a=De(),l=t||"absolute z-50 py-2 mt-1 text-left list-none rounded-md shadow-md dropdown-menu min-w-max",[u,d]=v.useState("right-end");v.useEffect(()=>{i&&d(i)},[i]);const c=v.useRef(null),f=document.getElementsByTagName("html")[0].getAttribute("dir"),h=()=>{if(s&&u==="right-end"&&c.current){const m=c.current;m.style.position="absolute",f==="rtl"?m.style.inset="0px auto auto 0px":m.style.inset="0px 0px auto auto",m.style.margin="0px",m.style.transform="translate(0px, 54px)"}if(s&&u==="start-end"&&c.current){const m=c.current;m.style.position="absolute",m.style.inset="0px auto auto 0px",m.style.margin="0px",m.style.transform="translate(0px, 20px)"}if(s&&u==="top-end"&&c.current){const m=c.current;m.style.position="absolute",m.style.inset="auto 0px 0px auto",m.style.margin="0px",m.style.transform="translate(-58px, -30px)"}if(s&&u==="bottom-start"&&c.current){const m=c.current;m.style.position="absolute",m.style.inset="0px 0px auto auto",m.style.margin="0px",m.style.transform="translate(0px, 54px)"}if(s&&u==="bottom-end"&&c.current){const m=c.current;m.style.position="absolute",m.style.inset="0px 0px auto auto",m.style.margin="0px",m.style.transform="translate(0px, 39px)"}if(s&&u==="top-start"&&c.current){const m=c.current;m.style.position="absolute",m.style.inset="auto auto 0px 0px",m.style.margin="0px",m.style.transform="translate(0px, -95px)"}if(s&&u==="left-end"&&c.current){const m=c.current;m.style.position="absolute",m.style.inset="0px auto auto 0px",m.style.margin="0px",m.style.right="0px",m.style.transform="translate(0px, -20px)"}return{}};return y.jsx(AI,{as:L.Fragment,show:s,children:m=>y.jsx(e,{ref:c,onClick:()=>o(!1),className:`${l} ${m==="entered"?"transition-all":""}`,style:{...h(),backgroundColor:a.getColor(k.Background),borderRadius:a.getRadius(),boxShadow:`0 10px 25px -5px ${a.getColor(k.ShadowColor)}, 0 8px 10px -6px ${a.getColor(k.ShadowColor)}`,...n},children:r})})};ca.Trigger=RI;ca.Content=OI;function DI({onChatClose:e}){const[t,n]=v.useState(!1),r=De(),i=sl(),s=di(),o=()=>{s==null||s.emit(Dt.ChatClose,{}),e()};return y.jsxs(y.Fragment,{children:[y.jsx(Zr,{children:t&&y.jsx(he.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"absolute inset-0 z-50 flex items-center justify-center p-4",style:{backgroundColor:r.getColor(k.ModalOverlayColor)},children:y.jsxs(he.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},transition:{duration:.2},className:"p-5 rounded-xl shadow-lg max-w-xs w-full",style:{backgroundColor:r.getColor(k.Background),borderRadius:r.getRadius()},children:[y.jsx("div",{className:"text-lg font-semibold mb-2",style:{color:r.getColor(k.ChatCloseConfirmText)},children:i(Q.ChatCloseConfirm)}),y.jsx("div",{className:"text-sm mb-4",style:{color:r.getColor(k.FooterText)},children:i(Q.ChatCloseWarning)}),y.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[y.jsx("button",{type:"button",className:"px-4 py-2 rounded-lg font-medium transition-all",style:{backgroundColor:r.getColor(k.GreeterBackground),color:r.getColor(k.GreeterText),borderRadius:r.getRadius()},onClick:()=>n(!1),children:i(Q.CancelAction)}),y.jsx("button",{type:"button",className:"px-4 py-2 rounded-lg font-medium transition-all",style:{backgroundColor:r.getColor(k.ErrorBackground),color:r.getColor(k.ErrorText),borderRadius:r.getRadius()},onClick:o,children:i(Q.CloseAction)})]})]})})}),y.jsxs(ca,{className:"relative flex items-center h-full",children:[y.jsx(ca.Trigger,{type:"button",className:"h-full flex items-center rounded-full p-1 transition-colors",style:{borderRadius:r.getRadius()},id:"dropdownMenuButton","data-bs-toggle":"dropdown",title:i(Q.ChatSettings),children:y.jsx(oe.Menu,{className:"size-5",style:{color:r.getColor(k.HeaderText)}})}),y.jsx(Zr,{children:!t&&y.jsx(he.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:y.jsxs(ca.Content,{placement:"left-end",className:"text-left rounded-lg shadow-xl dropdown-menu w-full",style:{backgroundColor:r.getColor(k.Background),borderRadius:r.getRadius()},"aria-labelledby":"dropdownMenuButton",children:[y.jsx("h5",{className:"text-sm font-semibold px-3 py-2 border-b",style:{color:r.getColor(k.FooterText),borderBottomColor:r.getColor(k.DividerColor)},children:i(Q.ChatSettings)}),y.jsx("ul",{className:"py-2 px-2",children:y.jsx("li",{children:y.jsxs("button",{className:"p-2 rounded-lg w-full flex items-center gap-2 text-sm transition-all duration-200 ease-linear dropdown-item",style:{color:r.getColor(k.ErrorText),borderRadius:r.getRadius()},onClick:a=>{a.stopPropagation(),a.preventDefault(),n(!0)},children:[y.jsx(oe.X,{className:"w-4 h-4"}),y.jsx("span",{children:i(Q.ChatEndConversation)})]})})})]})})})]})]})}function MI({text:e}){const n=De().getColor(k.LinkColor),i=(s=>{const o=/(https?:\/\/(?:[-\w.])+(?:\:[0-9]+)?(?:\/(?:[\w\/_.\-~!$&'()*+,;=:@])*(?:\?(?:[\w&=%.\-~!$'()*+,;=:@/])*)?(?:\#(?:[\w.\-~!$&'()*+,;=:@/])*)?)?|(?:www\.)?(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,}(?:\/(?:[\w\/_.\-~!$&'()*+,;=:@])*(?:\?(?:[\w&=%.\-~!$'()*+,;=:@/])*)?(?:\#(?:[\w.\-~!$&'()*+,;=:@/])*)?)?)/gi,a=s.split(/(<[^>]*>)/g);let l="",u=!1;for(let d=0;d<a.length;d++){const c=a[d];if(c.startsWith("<")&&c.endsWith(">"))if(c.match(/^<a\s/i)){if(c.includes("style="))l+=c;else{const f=c.replace(/^(<a\s[^>]*)(>)$/i,`$1 style="color: ${n}; text-decoration: underline;"$2`);l+=f}u=!0}else c.match(/^<\/a>/i)?(l+=c,u=!1):l+=c;else if(!u&&c.trim()){const f=c.replace(o,h=>{const m=h.replace(/[">]+$/,"");return`<a href="${/^https?:\/\//i.test(m)?m:`https://${m}`}" target="_blank" rel="noopener noreferrer" style="color: ${n}; text-decoration: underline;">${m}</a>`});l+=f}else l+=c}return l})(e);return y.jsx("span",{className:"linkified",dangerouslySetInnerHTML:{__html:i}})}const hx="opacity-0 group-hover/item:opacity-100 transition-opacity duration-200";function _C({files:e,className:t,onDelete:n,hideName:r}){const i=ss(),[s,o]=v.useState(new Map);v.useEffect(()=>{const m=new Map;for(let p=0;p<e.length;p++){const w=e[p];if(w instanceof File){const g=URL.createObjectURL(w);m.set(p,g)}}return o(m),()=>{for(const p of m.values())URL.revokeObjectURL(p)}},[e]);const a=m=>{var w;return((w=(m instanceof File?m.name:m).split(".").pop())==null?void 0:w.toLowerCase())||""},l=m=>m instanceof File?m.name:m.split("/").pop()||m,u=m=>{const[p,w]=m.split(".");return p.length>10?`${p.slice(0,10)}...${w}`:m},d=m=>{const p=["jpg","jpeg","png","gif","bmp","webp","svg"],w=a(m);return p.includes(w)},c=(m,p)=>{if(m instanceof File){const w=s.get(p);w&&window.open(w,"_blank")}else window.open(m,"_blank")},f=(m,p)=>{m.stopPropagation(),n==null||n(p)},h=(m,p)=>m instanceof File?s.get(p)||"":m;return y.jsx("div",{className:ve("flex gap-2 w-full overflow-x-auto",t),children:e.map((m,p)=>{const w=l(m),g=a(m),x=d(m),b=h(m,p);return y.jsxs("div",{onClick:()=>c(m,p),className:"min-w-28 max-w-28 cursor-pointer group/item border border-gray-200 rounded-lg p-2 hover:shadow-md transition-all duration-200 hover:border-gray-300 bg-white relative",children:[n&&y.jsx("button",{onClick:T=>f(T,p),className:ve("absolute top-1 right-1 w-5 h-5 bg-red-500 hover:bg-red-600 text-white rounded-full flex items-center justify-center transition-opacity duration-200 z-10",{"opacity-0 group-hover/item:opacity-100":!i}),children:y.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:y.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})}),x?y.jsx("div",{className:"aspect-square w-fit mb-1 overflow-hidden rounded",children:y.jsx("img",{src:b,alt:w,className:"w-24 h-24 min-h-24 min-w-24 object-cover group-hover/item:scale-105 transition-transform duration-200"})}):y.jsx("div",{className:"min-w-24 aspect-square w-full mb-1 flex items-center justify-center bg-gray-50 rounded group-hover/item:bg-gray-100 transition-colors duration-200",children:y.jsxs("div",{className:"text-center",children:[y.jsx("div",{className:"w-8 h-8 mx-auto mb-1 bg-blue-100 rounded flex items-center justify-center",children:y.jsx("svg",{className:"w-4 h-4 text-blue-600",fill:"currentColor",viewBox:"0 0 20 20",children:y.jsx("path",{fillRule:"evenodd",d:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z",clipRule:"evenodd"})})}),y.jsx("div",{className:ve("text-[10px] font-medium text-gray-600 uppercase",{[hx]:r}),children:g||"file"})]})}),y.jsx("div",{className:ve("max-w-24 text-xs text-gray-700 font-medium truncate text-ellipsis overflow-hidden",{[hx]:r}),title:w,children:u(w)})]},p)})})}const FI={hidden:{opacity:0,y:8},visible:{opacity:1,y:0}},NI={hidden:{opacity:0,y:8,scale:.95},visible:{opacity:1,y:0,scale:1}};function LI({buttons:e,className:t=""}){const n=De();if(!e||e.length===0)return null;const r=s=>{s.startsWith("http://")||s.startsWith("https://")?window.open(s,"_blank","noopener,noreferrer"):s.startsWith("tel:")||s.startsWith("mailto:")?window.location.href=s:console.log("Custom action:",s)},i=s=>s.startsWith("http://")||s.startsWith("https://")?y.jsx(oe.ExternalLink,{className:"size-4"}):s.startsWith("tel:")?y.jsx(oe.Phone,{className:"size-4"}):s.startsWith("mailto:")?y.jsx(oe.Mail,{className:"size-4"}):null;return y.jsx(he.div,{className:ve(t,"mt-2"),initial:"hidden",animate:"visible",variants:FI,transition:{duration:.3,ease:"easeOut",staggerChildren:.08},children:y.jsx("div",{className:"rounded-lg ",style:{backgroundColor:`${n.getColor(k.Background)}f0`},children:y.jsx("div",{className:"flex flex-wrap gap-2",children:e.map((s,o)=>y.jsxs(he.button,{variants:NI,transition:{duration:.25,ease:"easeOut"},whileHover:{scale:1.02,y:-1,transition:{duration:.15}},whileTap:{scale:.98,transition:{duration:.1}},onClick:()=>r(s.url),className:"group inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 relative overflow-hidden cursor-pointer",style:{backgroundColor:n.getColor(k.GreeterBackground),color:n.getColor(k.GreeterText),borderRadius:n.getRadius(),border:`1px solid ${n.getColor(k.DividerColor)}`,boxShadow:`0 1px 3px ${n.getColor(k.ShadowColor)}30`},onMouseEnter:a=>{a.currentTarget.style.backgroundColor=n.getColor(k.ButtonBackground),a.currentTarget.style.color=n.getColor(k.ButtonText),a.currentTarget.style.borderColor=n.getColor(k.ButtonBackground),a.currentTarget.style.boxShadow=`0 4px 12px ${n.getColor(k.ShadowColor)}40`},onMouseLeave:a=>{a.currentTarget.style.backgroundColor=n.getColor(k.GreeterBackground),a.currentTarget.style.color=n.getColor(k.GreeterText),a.currentTarget.style.borderColor=n.getColor(k.DividerColor),a.currentTarget.style.boxShadow=`0 1px 3px ${n.getColor(k.ShadowColor)}30`},children:[y.jsxs("span",{className:"flex items-center gap-2",children:[i(s.url),y.jsx("span",{className:"font-medium",children:s.label})]}),y.jsx("div",{className:"absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-300",style:{background:`linear-gradient(45deg, transparent 30%, ${n.getColor(k.ButtonText)}10 50%, transparent 70%)`,borderRadius:n.getRadius()}})]},`${s.label}-${o}`))})})})}const II={hidden:{opacity:0,y:8},visible:()=>({opacity:1,y:0})},mx=e=>e?(typeof e=="string"&&(e=new Date(e)),e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})):"";function $I({messages:e,isTyping:t}){var c,f,h,m;const n=v.useRef(null),r=v.useRef(null),[i,s]=v.useState(!0),{widget:o}=kt(),a=De(),l=ss(),u=()=>{var p;(p=n.current)==null||p.scrollIntoView({behavior:"smooth"})},d=()=>{if(r.current){const{scrollTop:p,scrollHeight:w,clientHeight:g}=r.current,x=w-p<=g+10;s(x)}};return v.useEffect(()=>{(i||t)&&u()},[e,i,t]),y.jsxs("section",{onScroll:d,ref:r,className:"flex flex-col gap-3 w-full grow pt-4 px-4 overflow-y-auto",children:[((f=(c=o==null?void 0:o.appearance)==null?void 0:c.design)==null?void 0:f.greeting_message)&&y.jsx("div",{className:"flex w-full items-center justify-start",children:y.jsx("div",{className:"max-w-[85%] whitespace-pre-wrap border-0 px-3 py-2 shadow-sm",style:{backgroundColor:a.getColor(k.MessageAdminBackground),color:a.getColor(k.MessageAdminText),borderRadius:a.getRadius()},children:(m=(h=o==null?void 0:o.appearance)==null?void 0:h.design)==null?void 0:m.greeting_message})}),y.jsx(Zr,{children:e.filter(p=>{var w;return(!!p.content||((w=p.files)==null?void 0:w.length)>0)&&p.content!==`
110
+ `}).map((p,w)=>y.jsxs(he.div,{custom:w,initial:"hidden",animate:"visible",variants:II,transition:{delay:w*.03,duration:.15,ease:"easeOut"},className:ve("flex flex-col w-full justify-center break-words",{"items-end":p.sender_type===Ie.Customer||p.activity_type===nr.ChatCreated,"items-start":p.sender_type===Ie.User,"items-center":p.sender_type===Ie.System||p.sender_type===Ie.Activity}),children:[p.sender_type===Ie.System&&y.jsx("div",{className:"whitespace-pre-wrap px-3 py-1.5 text-sm shadow-sm",style:{backgroundColor:a.getColor(k.MessageAdminBackground),color:a.getColor(k.MessageAdminText),borderRadius:a.getRadius()},children:p.content}),([Ie.Customer,Ie.User].includes(p.sender_type)||p.activity_type===nr.ChatCreated)&&y.jsxs(he.div,{initial:{scale:.95},animate:{scale:1},transition:{duration:.2},className:"max-w-[85%] whitespace-pre-wrap border-0 px-3 py-2 shadow-sm",style:{backgroundColor:p.sender_type===Ie.User?a.getColor(k.MessageAdminBackground):a.getColor(k.MessageVisitorBackground),color:p.sender_type===Ie.User?a.getColor(k.MessageAdminText):a.getColor(k.MessageVisitorText),borderRadius:a.getRadius()},children:[p.files&&p.files.length>0&&y.jsx(_C,{files:p.files,className:"mb-1",hideName:!0}),p.sender_type===Ie.User?y.jsx(MI,{text:p.content}):p.content,p.created_at&&y.jsx("div",{className:"text-[0.5rem] text-right opacity-70",style:{color:p.sender_type===Ie.User?a.getColor(k.MessageAdminText):a.getColor(k.MessageVisitorText)},children:mx(p.created_at)})]}),([Ie.Customer,Ie.User].includes(p.sender_type)||p.activity_type===nr.ChatCreated)&&p.buttons&&p.buttons.length>0&&y.jsx("div",{className:ve("w-full",{"flex justify-end":p.sender_type===Ie.Customer||p.activity_type===nr.ChatCreated,"flex justify-start":p.sender_type===Ie.User}),children:y.jsx("div",{className:"max-w-[85%]",children:y.jsx(LI,{buttons:p.buttons})})}),p.sender_type===Ie.Activity&&p.activity_type!==nr.ChatCreated&&y.jsx("div",{className:"whitespace-pre-wrap border-0 rounded-full px-3 py-1 text-xs shadow-none",style:{backgroundColor:a.getColor(k.MessageAdminBackground),color:a.getColor(k.MessageAdminText)},children:p.activity_type===nr.AdminLeave?`${p.content.split("_")[2]} odadan ayrıldı`:p.activity_type===nr.AdminJoin?`${p.content.split("_")[2]} odaya katıldı`:p.content}),Ie.System===p.sender_type&&y.jsx("div",{className:"text-xs",style:{color:a.getColor(k.MessageAdminText)},children:p.created_at&&mx(p.created_at)})]},p.id||w))}),t&&y.jsx("div",{className:"flex w-full items-center justify-start mt-1",children:y.jsx("div",{className:"flex items-center rounded-full px-3 py-1.5 shadow-none",style:{backgroundColor:a.getColor(k.MessageAdminBackground)},children:y.jsxs("div",{className:"flex space-x-1",children:[y.jsx("div",{className:"size-2 rounded-full animate-bounce",style:{backgroundColor:a.getColor(k.MessageAdminText),animationDelay:"0ms"}}),y.jsx("div",{className:"size-2 rounded-full animate-bounce",style:{backgroundColor:a.getColor(k.MessageAdminText),animationDelay:"150ms"}}),y.jsx("div",{className:"size-2 rounded-full animate-bounce",style:{backgroundColor:a.getColor(k.MessageAdminText),animationDelay:"300ms"}})]})})}),!i&&y.jsx("div",{className:ve("fixed",{"bottom-40 right-14":!l,"bottom-28 right-4":l}),children:y.jsx(Ot,{type:"button",variant:"primary",kind:"solid",rounded:!0,className:"size-10 flex items-center justify-center p-0! shadow-md",onClick:()=>{var p,w;(w=r.current)==null||w.scrollTo({top:(p=r.current)==null?void 0:p.scrollHeight,behavior:"smooth"})},children:y.jsx(oe.ArrowDown,{className:"size-4"})})}),y.jsx("div",{ref:n})]})}/**
111
111
  * @license lucide-react v0.511.0 - ISC
112
112
  *
113
113
  * This source code is licensed under the ISC license.
114
114
  * See the LICENSE file in the root directory of this source tree.
115
- */const BI=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),zI=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),gx=e=>{const t=zI(e);return t.charAt(0).toUpperCase()+t.slice(1)},PC=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),VI=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
115
+ */const BI=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),zI=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),gx=e=>{const t=zI(e);return t.charAt(0).toUpperCase()+t.slice(1)},jC=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),VI=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
116
116
  * @license lucide-react v0.511.0 - ISC
117
117
  *
118
118
  * This source code is licensed under the ISC license.
@@ -122,18 +122,18 @@ attempted value: ${o}
122
122
  *
123
123
  * This source code is licensed under the ISC license.
124
124
  * See the LICENSE file in the root directory of this source tree.
125
- */const HI=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},l)=>v.createElement("svg",{ref:l,...UI,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:PC("lucide",i),...!s&&!VI(a)&&{"aria-hidden":"true"},...a},[...o.map(([c,d])=>v.createElement(c,d)),...Array.isArray(s)?s:[s]]));/**
125
+ */const HI=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},l)=>v.createElement("svg",{ref:l,...UI,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:jC("lucide",i),...!s&&!VI(a)&&{"aria-hidden":"true"},...a},[...o.map(([u,d])=>v.createElement(u,d)),...Array.isArray(s)?s:[s]]));/**
126
126
  * @license lucide-react v0.511.0 - ISC
127
127
  *
128
128
  * This source code is licensed under the ISC license.
129
129
  * See the LICENSE file in the root directory of this source tree.
130
- */const WI=(e,t)=>{const n=v.forwardRef(({className:r,...i},s)=>v.createElement(HI,{ref:s,iconNode:t,className:PC(`lucide-${BI(gx(e))}`,`lucide-${e}`,r),...i}));return n.displayName=gx(e),n};/**
130
+ */const WI=(e,t)=>{const n=v.forwardRef(({className:r,...i},s)=>v.createElement(HI,{ref:s,iconNode:t,className:jC(`lucide-${BI(gx(e))}`,`lucide-${e}`,r),...i}));return n.displayName=gx(e),n};/**
131
131
  * @license lucide-react v0.511.0 - ISC
132
132
  *
133
133
  * This source code is licensed under the ISC license.
134
134
  * See the LICENSE file in the root directory of this source tree.
135
- */const qI=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],jC=WI("cloud-upload",qI);var RC={exports:{}},GI="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",QI=GI,YI=QI;function AC(){}function OC(){}OC.resetWarningCache=AC;var KI=function(){function e(r,i,s,o,a,l){if(l!==YI){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:OC,resetWarningCache:AC};return n.PropTypes=n,n};RC.exports=KI();var XI=RC.exports;const xe=Zi(XI);function fs(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(d){try{c(r.next(d))}catch(u){o(u)}}function l(d){try{c(r.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):i(d.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}const ZI=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function go(e,t,n){const r=JI(e),{webkitRelativePath:i}=e,s=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof r.path!="string"&&vx(r,"path",s),vx(r,"relativePath",s),r}function JI(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),i=ZI.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function vx(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const e$=[".DS_Store","Thumbs.db"];function t$(e){return fs(this,void 0,void 0,function*(){return Ju(e)&&n$(e.dataTransfer)?o$(e.dataTransfer,e.type):r$(e)?i$(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?s$(e):[]})}function n$(e){return Ju(e)}function r$(e){return Ju(e)&&Ju(e.target)}function Ju(e){return typeof e=="object"&&e!==null}function i$(e){return ih(e.target.files).map(t=>go(t))}function s$(e){return fs(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>go(n))})}function o$(e,t){return fs(this,void 0,void 0,function*(){if(e.items){const n=ih(e.items).filter(i=>i.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(a$));return yx(DC(r))}return yx(ih(e.files).map(n=>go(n)))})}function yx(e){return e.filter(t=>e$.indexOf(t.name)===-1)}function ih(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function a$(e){if(typeof e.webkitGetAsEntry!="function")return xx(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?FC(t):xx(e,t)}function DC(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?DC(n):[n]],[])}function xx(e,t){return fs(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const s=yield e.getAsFileSystemHandle();if(s===null)throw new Error(`${e} is not a File`);if(s!==void 0){const o=yield s.getFile();return o.handle=s,go(o)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return go(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function l$(e){return fs(this,void 0,void 0,function*(){return e.isDirectory?FC(e):u$(e)})}function FC(e){const t=e.createReader();return new Promise((n,r)=>{const i=[];function s(){t.readEntries(o=>fs(this,void 0,void 0,function*(){if(o.length){const a=Promise.all(o.map(l$));i.push(a),s()}else try{const a=yield Promise.all(i);n(a)}catch(a){r(a)}}),o=>{r(o)})}s()})}function u$(e){return fs(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const i=go(r,e.fullPath);t(i)},r=>{n(r)})})})}var rf=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",i=(e.type||"").toLowerCase(),s=i.replace(/\/.*$/,"");return n.some(function(o){var a=o.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?s===a.replace(/\/.*$/,""):i===a})}return!0};function wx(e){return f$(e)||d$(e)||NC(e)||c$()}function c$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
136
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function f$(e){if(Array.isArray(e))return sh(e)}function bx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Sx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bx(Object(n),!0).forEach(function(r){MC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function MC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Va(e,t){return m$(e)||h$(e,t)||NC(e,t)||p$()}function p$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
137
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NC(e,t){if(e){if(typeof e=="string")return sh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sh(e,t)}}function sh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h$(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function m$(e){if(Array.isArray(e))return e}var g$=typeof rf=="function"?rf:rf.default,v$="file-invalid-type",y$="file-too-large",x$="file-too-small",w$="too-many-files",b$=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:v$,message:"File type must be ".concat(r)}},kx=function(t){return{code:y$,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Cx=function(t){return{code:x$,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},S$={code:w$,message:"Too many files"};function LC(e,t){var n=e.type==="application/x-moz-file"||g$(e,t);return[n,n?null:b$(t)]}function IC(e,t,n){if(Ci(e.size))if(Ci(t)&&Ci(n)){if(e.size>n)return[!1,kx(n)];if(e.size<t)return[!1,Cx(t)]}else{if(Ci(t)&&e.size<t)return[!1,Cx(t)];if(Ci(n)&&e.size>n)return[!1,kx(n)]}return[!0,null]}function Ci(e){return e!=null}function k$(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,s=e.multiple,o=e.maxFiles,a=e.validator;return!s&&t.length>1||s&&o>=1&&t.length>o?!1:t.every(function(l){var c=LC(l,n),d=Va(c,1),u=d[0],f=IC(l,r,i),p=Va(f,1),h=p[0],m=a?a(l):null;return u&&h&&!m})}function ec(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Vl(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Tx(e){e.preventDefault()}function C$(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function T$(e){return e.indexOf("Edge/")!==-1}function E$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return C$(e)||T$(e)}function On(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];return t.some(function(a){return!ec(r)&&a&&a.apply(void 0,[r].concat(s)),ec(r)})}}function _$(){return"showOpenFilePicker"in window}function P$(e){if(Ci(e)){var t=Object.entries(e).filter(function(n){var r=Va(n,2),i=r[0],s=r[1],o=!0;return $C(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),(!Array.isArray(s)||!s.every(BC))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(n,r){var i=Va(r,2),s=i[0],o=i[1];return Sx(Sx({},n),{},MC({},s,o))},{});return[{description:"Files",accept:t}]}return e}function j$(e){if(Ci(e))return Object.entries(e).reduce(function(t,n){var r=Va(n,2),i=r[0],s=r[1];return[].concat(wx(t),[i],wx(s))},[]).filter(function(t){return $C(t)||BC(t)}).join(",")}function R$(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function A$(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function $C(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function BC(e){return/^.*\.[\w]+$/.test(e)}var O$=["children"],D$=["open"],F$=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],M$=["refKey","onChange","onClick"];function N$(e){return $$(e)||I$(e)||zC(e)||L$()}function L$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
135
+ */const qI=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],PC=WI("cloud-upload",qI);var AC={exports:{}},GI="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",QI=GI,YI=QI;function RC(){}function OC(){}OC.resetWarningCache=RC;var KI=function(){function e(r,i,s,o,a,l){if(l!==YI){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:OC,resetWarningCache:RC};return n.PropTypes=n,n};AC.exports=KI();var XI=AC.exports;const xe=Zi(XI);function fs(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(d){try{u(r.next(d))}catch(c){o(c)}}function l(d){try{u(r.throw(d))}catch(c){o(c)}}function u(d){d.done?s(d.value):i(d.value).then(a,l)}u((r=r.apply(e,t||[])).next())})}const ZI=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function go(e,t,n){const r=JI(e),{webkitRelativePath:i}=e,s=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof r.path!="string"&&vx(r,"path",s),vx(r,"relativePath",s),r}function JI(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),i=ZI.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function vx(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const e$=[".DS_Store","Thumbs.db"];function t$(e){return fs(this,void 0,void 0,function*(){return Ju(e)&&n$(e.dataTransfer)?o$(e.dataTransfer,e.type):r$(e)?i$(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?s$(e):[]})}function n$(e){return Ju(e)}function r$(e){return Ju(e)&&Ju(e.target)}function Ju(e){return typeof e=="object"&&e!==null}function i$(e){return ih(e.target.files).map(t=>go(t))}function s$(e){return fs(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>go(n))})}function o$(e,t){return fs(this,void 0,void 0,function*(){if(e.items){const n=ih(e.items).filter(i=>i.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(a$));return yx(DC(r))}return yx(ih(e.files).map(n=>go(n)))})}function yx(e){return e.filter(t=>e$.indexOf(t.name)===-1)}function ih(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function a$(e){if(typeof e.webkitGetAsEntry!="function")return xx(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?MC(t):xx(e,t)}function DC(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?DC(n):[n]],[])}function xx(e,t){return fs(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const s=yield e.getAsFileSystemHandle();if(s===null)throw new Error(`${e} is not a File`);if(s!==void 0){const o=yield s.getFile();return o.handle=s,go(o)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return go(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function l$(e){return fs(this,void 0,void 0,function*(){return e.isDirectory?MC(e):u$(e)})}function MC(e){const t=e.createReader();return new Promise((n,r)=>{const i=[];function s(){t.readEntries(o=>fs(this,void 0,void 0,function*(){if(o.length){const a=Promise.all(o.map(l$));i.push(a),s()}else try{const a=yield Promise.all(i);n(a)}catch(a){r(a)}}),o=>{r(o)})}s()})}function u$(e){return fs(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const i=go(r,e.fullPath);t(i)},r=>{n(r)})})})}var rf=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",i=(e.type||"").toLowerCase(),s=i.replace(/\/.*$/,"");return n.some(function(o){var a=o.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?s===a.replace(/\/.*$/,""):i===a})}return!0};function wx(e){return f$(e)||d$(e)||NC(e)||c$()}function c$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
136
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function f$(e){if(Array.isArray(e))return sh(e)}function bx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Sx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bx(Object(n),!0).forEach(function(r){FC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function FC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Va(e,t){return m$(e)||h$(e,t)||NC(e,t)||p$()}function p$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
137
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NC(e,t){if(e){if(typeof e=="string")return sh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sh(e,t)}}function sh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h$(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function m$(e){if(Array.isArray(e))return e}var g$=typeof rf=="function"?rf:rf.default,v$="file-invalid-type",y$="file-too-large",x$="file-too-small",w$="too-many-files",b$=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:v$,message:"File type must be ".concat(r)}},kx=function(t){return{code:y$,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Cx=function(t){return{code:x$,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},S$={code:w$,message:"Too many files"};function LC(e,t){var n=e.type==="application/x-moz-file"||g$(e,t);return[n,n?null:b$(t)]}function IC(e,t,n){if(Ci(e.size))if(Ci(t)&&Ci(n)){if(e.size>n)return[!1,kx(n)];if(e.size<t)return[!1,Cx(t)]}else{if(Ci(t)&&e.size<t)return[!1,Cx(t)];if(Ci(n)&&e.size>n)return[!1,kx(n)]}return[!0,null]}function Ci(e){return e!=null}function k$(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,s=e.multiple,o=e.maxFiles,a=e.validator;return!s&&t.length>1||s&&o>=1&&t.length>o?!1:t.every(function(l){var u=LC(l,n),d=Va(u,1),c=d[0],f=IC(l,r,i),h=Va(f,1),m=h[0],p=a?a(l):null;return c&&m&&!p})}function ec(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Vl(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Tx(e){e.preventDefault()}function C$(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function T$(e){return e.indexOf("Edge/")!==-1}function E$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return C$(e)||T$(e)}function On(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];return t.some(function(a){return!ec(r)&&a&&a.apply(void 0,[r].concat(s)),ec(r)})}}function _$(){return"showOpenFilePicker"in window}function j$(e){if(Ci(e)){var t=Object.entries(e).filter(function(n){var r=Va(n,2),i=r[0],s=r[1],o=!0;return $C(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),(!Array.isArray(s)||!s.every(BC))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(n,r){var i=Va(r,2),s=i[0],o=i[1];return Sx(Sx({},n),{},FC({},s,o))},{});return[{description:"Files",accept:t}]}return e}function P$(e){if(Ci(e))return Object.entries(e).reduce(function(t,n){var r=Va(n,2),i=r[0],s=r[1];return[].concat(wx(t),[i],wx(s))},[]).filter(function(t){return $C(t)||BC(t)}).join(",")}function A$(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function R$(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function $C(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function BC(e){return/^.*\.[\w]+$/.test(e)}var O$=["children"],D$=["open"],M$=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],F$=["refKey","onChange","onClick"];function N$(e){return $$(e)||I$(e)||zC(e)||L$()}function L$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
138
138
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function I$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $$(e){if(Array.isArray(e))return oh(e)}function sf(e,t){return V$(e)||z$(e,t)||zC(e,t)||B$()}function B$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
139
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zC(e,t){if(e){if(typeof e=="string")return oh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oh(e,t)}}function oh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function z$(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function V$(e){if(Array.isArray(e))return e}function Ex(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ex(Object(n),!0).forEach(function(r){ah(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ex(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ah(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tc(e,t){if(e==null)return{};var n=U$(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function U$(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 ul=v.forwardRef(function(e,t){var n=e.children,r=tc(e,O$),i=H$(r),s=i.open,o=tc(i,D$);return v.useImperativeHandle(t,function(){return{open:s}},[s]),L.createElement(v.Fragment,null,n(_e(_e({},o),{},{open:s})))});ul.displayName="Dropzone";var VC={disabled:!1,getFilesFromEvent:t$,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};ul.defaultProps=VC;ul.propTypes={children:xe.func,accept:xe.objectOf(xe.arrayOf(xe.string)),multiple:xe.bool,preventDropOnDocument:xe.bool,noClick:xe.bool,noKeyboard:xe.bool,noDrag:xe.bool,noDragEventsBubbling:xe.bool,minSize:xe.number,maxSize:xe.number,maxFiles:xe.number,disabled:xe.bool,getFilesFromEvent:xe.func,onFileDialogCancel:xe.func,onFileDialogOpen:xe.func,useFsAccessApi:xe.bool,autoFocus:xe.bool,onDragEnter:xe.func,onDragLeave:xe.func,onDragOver:xe.func,onDrop:xe.func,onDropAccepted:xe.func,onDropRejected:xe.func,onError:xe.func,validator:xe.func};var lh={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function H$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=_e(_e({},VC),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,s=t.maxSize,o=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,d=t.onDragLeave,u=t.onDragOver,f=t.onDrop,p=t.onDropAccepted,h=t.onDropRejected,m=t.onFileDialogCancel,x=t.onFileDialogOpen,g=t.useFsAccessApi,w=t.autoFocus,b=t.preventDropOnDocument,k=t.noClick,T=t.noKeyboard,E=t.noDrag,_=t.noDragEventsBubbling,P=t.onError,M=t.validator,N=v.useMemo(function(){return j$(n)},[n]),R=v.useMemo(function(){return P$(n)},[n]),F=v.useMemo(function(){return typeof x=="function"?x:_x},[x]),B=v.useMemo(function(){return typeof m=="function"?m:_x},[m]),V=v.useRef(null),K=v.useRef(null),ee=v.useReducer(W$,lh),ne=sf(ee,2),O=ne[0],$=ne[1],H=O.isFocused,q=O.isFileDialogActive,Q=v.useRef(typeof window<"u"&&window.isSecureContext&&g&&_$()),te=function(){!Q.current&&q&&setTimeout(function(){if(K.current){var D=K.current.files;D.length||($({type:"closeDialog"}),B())}},300)};v.useEffect(function(){return window.addEventListener("focus",te,!1),function(){window.removeEventListener("focus",te,!1)}},[K,q,B,Q]);var ce=v.useRef([]),ye=function(D){V.current&&V.current.contains(D.target)||(D.preventDefault(),ce.current=[])};v.useEffect(function(){return b&&(document.addEventListener("dragover",Tx,!1),document.addEventListener("drop",ye,!1)),function(){b&&(document.removeEventListener("dragover",Tx),document.removeEventListener("drop",ye))}},[V,b]),v.useEffect(function(){return!r&&w&&V.current&&V.current.focus(),function(){}},[V,w,r]);var re=v.useCallback(function(A){P?P(A):console.error(A)},[P]),Ne=v.useCallback(function(A){A.preventDefault(),A.persist(),xr(A),ce.current=[].concat(N$(ce.current),[A.target]),Vl(A)&&Promise.resolve(i(A)).then(function(D){if(!(ec(A)&&!_)){var G=D.length,Z=G>0&&k$({files:D,accept:N,minSize:o,maxSize:s,multiple:a,maxFiles:l,validator:M}),ae=G>0&&!Z;$({isDragAccept:Z,isDragReject:ae,isDragActive:!0,type:"setDraggedFiles"}),c&&c(A)}}).catch(function(D){return re(D)})},[i,c,re,_,N,o,s,a,l,M]),Je=v.useCallback(function(A){A.preventDefault(),A.persist(),xr(A);var D=Vl(A);if(D&&A.dataTransfer)try{A.dataTransfer.dropEffect="copy"}catch{}return D&&u&&u(A),!1},[u,_]),et=v.useCallback(function(A){A.preventDefault(),A.persist(),xr(A);var D=ce.current.filter(function(Z){return V.current&&V.current.contains(Z)}),G=D.indexOf(A.target);G!==-1&&D.splice(G,1),ce.current=D,!(D.length>0)&&($({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Vl(A)&&d&&d(A))},[V,d,_]),Mt=v.useCallback(function(A,D){var G=[],Z=[];A.forEach(function(ae){var Ve=LC(ae,N),tt=sf(Ve,2),Pn=tt[0],Qt=tt[1],hs=IC(ae,o,s),Zn=sf(hs,2),wr=Zn[0],ms=Zn[1],Po=M?M(ae):null;if(Pn&&wr&&!Po)G.push(ae);else{var hi=[Qt,ms];Po&&(hi=hi.concat(Po)),Z.push({file:ae,errors:hi.filter(function(jn){return jn})})}}),(!a&&G.length>1||a&&l>=1&&G.length>l)&&(G.forEach(function(ae){Z.push({file:ae,errors:[S$]})}),G.splice(0)),$({acceptedFiles:G,fileRejections:Z,isDragReject:Z.length>0,type:"setFiles"}),f&&f(G,Z,D),Z.length>0&&h&&h(Z,D),G.length>0&&p&&p(G,D)},[$,a,N,o,s,l,f,p,h,M]),_n=v.useCallback(function(A){A.preventDefault(),A.persist(),xr(A),ce.current=[],Vl(A)&&Promise.resolve(i(A)).then(function(D){ec(A)&&!_||Mt(D,A)}).catch(function(D){return re(D)}),$({type:"reset"})},[i,Mt,re,_]),dn=v.useCallback(function(){if(Q.current){$({type:"openDialog"}),F();var A={multiple:a,types:R};window.showOpenFilePicker(A).then(function(D){return i(D)}).then(function(D){Mt(D,null),$({type:"closeDialog"})}).catch(function(D){R$(D)?(B(D),$({type:"closeDialog"})):A$(D)?(Q.current=!1,K.current?(K.current.value=null,K.current.click()):re(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):re(D)});return}K.current&&($({type:"openDialog"}),F(),K.current.value=null,K.current.click())},[$,F,B,g,Mt,re,R,a]),fi=v.useCallback(function(A){!V.current||!V.current.isEqualNode(A.target)||(A.key===" "||A.key==="Enter"||A.keyCode===32||A.keyCode===13)&&(A.preventDefault(),dn())},[V,dn]),vr=v.useCallback(function(){$({type:"focus"})},[]),ps=v.useCallback(function(){$({type:"blur"})},[]),pi=v.useCallback(function(){k||(E$()?setTimeout(dn,0):dn())},[k,dn]),Ct=function(D){return r?null:D},yr=function(D){return T?null:Ct(D)},Ge=function(D){return E?null:Ct(D)},xr=function(D){_&&D.stopPropagation()},_o=v.useMemo(function(){return function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=A.refKey,G=D===void 0?"ref":D,Z=A.role,ae=A.onKeyDown,Ve=A.onFocus,tt=A.onBlur,Pn=A.onClick,Qt=A.onDragEnter,hs=A.onDragOver,Zn=A.onDragLeave,wr=A.onDrop,ms=tc(A,F$);return _e(_e(ah({onKeyDown:yr(On(ae,fi)),onFocus:yr(On(Ve,vr)),onBlur:yr(On(tt,ps)),onClick:Ct(On(Pn,pi)),onDragEnter:Ge(On(Qt,Ne)),onDragOver:Ge(On(hs,Je)),onDragLeave:Ge(On(Zn,et)),onDrop:Ge(On(wr,_n)),role:typeof Z=="string"&&Z!==""?Z:"presentation"},G,V),!r&&!T?{tabIndex:0}:{}),ms)}},[V,fi,vr,ps,pi,Ne,Je,et,_n,T,E,r]),j=v.useCallback(function(A){A.stopPropagation()},[]),z=v.useMemo(function(){return function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=A.refKey,G=D===void 0?"ref":D,Z=A.onChange,ae=A.onClick,Ve=tc(A,M$),tt=ah({accept:N,multiple:a,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Ct(On(Z,_n)),onClick:Ct(On(ae,j)),tabIndex:-1},G,K);return _e(_e({},tt),Ve)}},[K,n,a,_n,r]);return _e(_e({},O),{},{isFocused:H&&!r,getRootProps:_o,getInputProps:z,rootRef:V,inputRef:K,open:Ct(dn)})}function W$(e,t){switch(t.type){case"focus":return _e(_e({},e),{},{isFocused:!0});case"blur":return _e(_e({},e),{},{isFocused:!1});case"openDialog":return _e(_e({},lh),{},{isFileDialogActive:!0});case"closeDialog":return _e(_e({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return _e(_e({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return _e(_e({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return _e({},lh);default:return e}}function _x(){}const UC=5*1024*1024,vo={"text/plain":[".txt"],"application/pdf":[".pdf"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/msword":[".doc"],"image/png":[".png"],"image/jpeg":[".jpg",".jpeg"],"image/gif":[".gif"],"image/webp":[".webp"],"image/svg+xml":[".svg"]},Px=Object.values(vo).flat();function q$(e){var r;if(e.size>UC)return{isValid:!1,error:`Dosya boyutu 5MB'dan büyük olamaz. Seçilen dosya: ${(e.size/1024/1024).toFixed(2)}MB`};const t=`.${(r=e.name.split(".").pop())==null?void 0:r.toLowerCase()}`;return Object.keys(vo).includes(e.type)||Px.includes(t)?{isValid:!0,error:""}:{isValid:!1,error:`Desteklenmeyen dosya tipi. Kabul edilen tipler: ${Px.join(", ")}`}}function nc(e){for(const t of e){const n=q$(t);if(!n.isValid)return n}return{isValid:!0,error:""}}function HC({onDrop:e}){const t=n=>{const r=nc(n);if(!r.isValid){alert(r.error);return}e(n)};return y.jsx("div",{className:"flex items-center justify-center border rounded-md cursor-pointer bg-slate-100 dropzone border-slate-200 dz-clickable",children:y.jsx(ul,{onDrop:t,accept:Object.keys(vo).reduce((n,r)=>(n[r]=vo[r],n),{}),maxSize:UC,children:({getRootProps:n,getInputProps:r})=>y.jsxs("div",{className:"w-full py-5 text-lg text-center dz-message needsclick",...n(),children:[y.jsx("input",{...r()}),y.jsx("div",{className:"mb-3",children:y.jsx(jC,{className:"block size-12 mx-auto text-slate-500 fill-slate-200"})}),y.jsxs("h5",{className:"mb-0 font-normal text-slate-500 text-15",children:["Yüklemek istediğiniz görseli buraya sürükleyin veya"," ",y.jsx("span",{className:"text-custom-500",children:"seçmek için tıklayın"})]})]})})})}HC.Button=({onDrop:e})=>{const t=n=>{const r=nc(n);if(!r.isValid){Bn({description:r.error,variant:"error"});return}e(n)};return y.jsx(ul,{onDrop:t,accept:Object.keys(vo).reduce((n,r)=>(n[r]=vo[r],n),{}),children:({getRootProps:n,getInputProps:r})=>y.jsxs("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center hover:bg-slate-100 text-center dz-message needsclick cursor-pointer",...n(),children:[y.jsx("input",{...r()}),y.jsx(jC,{className:"size-6 text-slate-500 fill-slate-200"})]})})};function G$({onNewMessage:e,client_id:t,is_uploadable:n,messages:r}){const i=v.useRef(null),s=ci(),o=DD(t),a=Oe(),l=sl(),{setIsInputFocused:c}=kt(),[d,u]=v.useState(""),[f,p]=v.useState("3rem"),[h,m]=v.useState(!1),[x,g]=v.useState([]),[w,b]=v.useState(0),[k,T]=v.useState(!1),[E,_]=v.useState(0),[P,M]=v.useState(null);v.useEffect(()=>{if(r.length>0){const F=r[r.length-1];F.id!==P&&(M(F.id),F.sender_type===Le.User&&(b(0),T(!1)))}},[r,P]),v.useEffect(()=>{let F;return k&&E>0&&(F=window.setTimeout(()=>{_(B=>B<=1?(T(!1),b(0),0):B-1)},1e3)),()=>clearTimeout(F)},[k,E]),v.useEffect(()=>{const F=i.current;if(F){const B=()=>c(!0),V=()=>c(!1);return F.addEventListener("focus",B),F.addEventListener("blur",V),()=>{F.removeEventListener("focus",B),F.removeEventListener("blur",V)}}},[c]),Km("paste",F=>{const B=F.clipboardData.items,V=[];for(const K of B){const ee=K.getAsFile();ee&&V.push(ee)}if(V.length>0&&!n){Bn({description:l(Y.FileUploadDisabled),variant:"error"});return}if(V.length>0){const K=nc(V);if(!K.isValid){Bn({description:K.error,variant:"error"});return}g([...x,...V])}});const N=async()=>{if(!d.trim()&&(!n||x.length===0))return;if(w>5&&!k){T(!0),_(3);return}if(k)return;m(!0);let F;if(n&&x.length>0){const[B,V]=await o.mutateAsync(x);if(!Za(V)){AL(B,V),m(!1);return}FD(B)&&(F=B.file_urls)}s==null||s.emit(En.MessageCreate,{content:d,files:F},B=>{u(""),e(B),m(!1),g([]),b(V=>V+1),i.current&&(i.current.style.height="3rem",p("3rem"))})},R=F=>{s==null||s.emit(En.MessageTyping,{content:F})};return y.jsxs(y.Fragment,{children:[k&&y.jsxs(ve.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mb-2 mx-3 rounded-lg z-[100] p-2 flex items-center justify-center",style:{backgroundColor:a.getColor(C.ErrorBackground),borderColor:a.getColor(C.ErrorBorder),borderWidth:"1px",borderStyle:"solid",borderRadius:a.getRadius()},children:[y.jsx(fe.XCircle,{className:"size-4 mr-2",style:{color:a.getColor(C.ErrorText)}}),y.jsx("span",{className:"text-sm font-medium",style:{color:a.getColor(C.ErrorText)},children:l(Y.RateLimitMessage).replace("{seconds}",E.toString())})]}),y.jsxs("form",{className:"p-3 flex items-start gap-3 rounded-b-xl relative",style:{backgroundColor:a.getColor(C.FooterBackground),borderRadius:a.getRadius()},onSubmit:F=>{F.preventDefault(),N(),F.currentTarget.reset()},children:[n&&x&&x.length>0&&y.jsx("div",{className:"absolute bottom-18 w-full overflow-x-auto",children:y.jsx(_C,{files:x,onDelete:F=>{g(x.filter((B,V)=>V!==F))}})}),y.jsxs("div",{className:"grow relative",children:[y.jsx(yg,{id:"message",inputRef:i,className:"grow shadow-none",noMargin:!0,autoComplete:"off",style:{height:f,maxHeight:"6rem"},placeholder:l(Y.MessagePlaceholder),value:d,maxLength:2e3,onChange:F=>{const B=F.target.value;if(B.length<=2e3&&(u(B),R(B)),B.length>0&&F.currentTarget.scrollHeight>F.currentTarget.clientHeight){const V=`${F.currentTarget.scrollHeight}px`;F.currentTarget.style.height=V,p(V)}else F.currentTarget.style.height="3rem",p("3rem")},onKeyDown:F=>{F.key==="Enter"&&!F.shiftKey&&(F.preventDefault(),F.stopPropagation(),N())}}),d.length>=500&&y.jsx("div",{className:"absolute bottom-1 right-2 text-xs",style:{color:d.length>=2e3?a.getColor(C.ErrorText):a.getColor(C.FooterText),fontWeight:d.length>=2e3?"600":"normal"},children:2e3-d.length})]}),y.jsxs(ve.div,{whileTap:{scale:.95},className:"flex items-center gap-2 justify-center",children:[n&&y.jsx(HC.Button,{onDrop:F=>{if(F.length){const B=nc(F);if(!B.isValid){console.log("val",B),Bn({description:B.error,variant:"error"});return}g([...x,...F])}}}),y.jsx(on,{className:"rounded-full shadow-sm w-12 h-12 flex items-center justify-center",type:"submit",disabled:h||!d.trim()&&x.length===0||k,children:h?y.jsx(fe.Spin,{className:"size-6 animate-spin"}):k?y.jsx("span",{className:"text-xs font-bold",children:E}):y.jsx(fe.PaperAirplane,{className:"size-6 -rotate-12"})})]})]})]})}function Q$({chat:e,isTyping:t,shortcutMessages:n,messages:r,onNewMessage:i,onChatClose:s}){var w,b;const{widget:o,setOpen:a,open:l,isHaveChat:c,isInputFocused:d}=kt(),u=Oe(),f=ss(),p=Xm(),h=ci(),m=v.useRef(new Set),x=v.useRef(!1),g=v.useCallback(()=>{if(!h||!l||!c)return;const k=r.filter(T=>T.sender_type===Le.User&&!m.current.has(T.id)).map(T=>T.id);k.length!==0&&h.emit(En.MessageRead,{message_ids:k},T=>{if(T&&T.success===!0)for(const E of k)m.current.add(E)})},[h,r,l,c]);return v.useEffect(()=>{l&&(x.current=!0),l&&c&&(d||x.current)&&(g(),x.current=!1)},[l,c,d,g]),y.jsxs(y.Fragment,{children:[y.jsxs("header",{style:{backgroundColor:u.getColor(C.HeaderBackground),color:u.getColor(C.HeaderText),borderBottom:`1px solid ${u.getColor(C.HeaderBorder)}`,borderTopLeftRadius:f?"":u.getRadius(),borderTopRightRadius:f?"":u.getRadius()},className:"p-4 flex justify-between items-center z-10",children:[e!=null&&e.agent_name?y.jsx(nI,{name:e.agent_name,avatar:e.agent_avatar,textColor:u.getColor(C.HeaderText)}):y.jsx("div",{style:{color:u.getColor(C.HeaderText)},className:"font-medium",children:((b=(w=o==null?void 0:o.appearance)==null?void 0:w.design)==null?void 0:b.greeting_header)||"Bizimle Sohbet Edin"}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(DI,{onChatClose:s}),!p&&!f&&y.jsx("button",{type:"button",style:{color:u.getColor(C.HeaderText)},onClick:()=>a(!1),children:y.jsx(fe.X,{className:"w-5 h-5 cursor-pointer"})})]})]}),y.jsx($I,{messages:r,isTyping:t||n.length>0}),y.jsx(G$,{client_id:(o==null?void 0:o.client_id)||"",is_uploadable:e.is_customer_uploadable,messages:r,onNewMessage:k=>{i(k)}}),y.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center flex items-center justify-center gap-1 transition-colors",style:{color:u.getColor(C.FooterText),borderTop:`1px solid ${u.getColor(C.FooterBorder)}`,backgroundColor:u.getColor(C.FooterBackground)},children:[y.jsx("span",{children:"Powered by"}),y.jsx("span",{className:"font-medium",children:"Alfatek"}),y.jsx("img",{src:"https://alfatekyazilim.com.tr/images/favicon.png",alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function Y$({rating:e,onChange:t}){const n=Oe();return y.jsx("div",{className:"flex items-center justify-center gap-1 my-3",children:[1,2,3,4,5].map(r=>{const i=r<=e,s=!i&&r-.5<=e;return y.jsxs("div",{className:"relative w-10 h-10",children:[y.jsx("svg",{className:"w-10 h-10",style:{color:n.getColor(C.StarInactiveColor),fill:n.getColor(C.StarInactiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:y.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"})}),s&&y.jsx("div",{className:"absolute top-0 left-0 w-5 h-10 overflow-hidden",children:y.jsx("svg",{className:"w-10 h-10",style:{color:n.getColor(C.StarActiveColor),fill:n.getColor(C.StarActiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:y.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&&y.jsx("svg",{className:"w-10 h-10 absolute top-0 left-0",style:{color:n.getColor(C.StarActiveColor),fill:n.getColor(C.StarActiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:y.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"})}),y.jsxs("div",{className:"absolute inset-0 flex",children:[y.jsx("button",{type:"button",onClick:()=>t(r-.5),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${r-.5} stars`}),y.jsx("button",{type:"button",onClick:()=>t(r),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${r} stars`})]})]},r)})})}function K$({onOk:e}){const t=Oe(),n=sl(),[r,i]=v.useState(0),[s,o]=v.useState(!1),[a,l]=v.useState(10),c=OD(),[d,u]=v.useState(!1);v.useEffect(()=>{if(s){const m=setInterval(()=>{l(x=>x<=1?(clearInterval(m),e(!0),0):x-1)},1e3);return()=>clearInterval(m)}},[s]);const f=rg({comment:Xu()}),p=cC({init:{comment:""},schema:f,action:async m=>{const[x,g]=await c.mutateAsync({rating:r,comment:m.comment});if(Za(g)){o(!0);return}fC(x,{form:p})}}),h=()=>{e(!0)};return y.jsxs("div",{className:"flex flex-col h-full",children:[y.jsxs("header",{style:{backgroundColor:s?t.getColor(C.RatingSuccessBackground):t.getColor(C.RatingHeaderBackground),color:s?t.getColor(C.RatingSuccessText):t.getColor(C.RatingHeaderText),borderBottom:`1px solid ${t.getColor(C.HeaderBorder)}`},className:"p-4 flex justify-between items-center z-10",children:[y.jsx("div",{className:"font-medium",children:n(s?Y.RatingHeaderThanks:Y.RatingHeaderEvaluate)}),y.jsx(on,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"sm",rounded:!0,onClick:()=>e(!1),className:"text-inherit cursor-pointer",children:y.jsx(fe.X,{className:"size-4"})})]}),y.jsx("div",{className:"flex-1 p-6 overflow-y-auto flex flex-col",children:s?y.jsxs(ve.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"flex flex-col items-center justify-center h-full text-center",children:[y.jsx("div",{className:"mb-4",style:{color:t.getColor(C.SuccessText)},children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-16 w-16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),y.jsx("h2",{className:"text-xl font-semibold mb-2",style:{color:t.getColor(C.HeaderText)},children:n(Y.RatingThankYouTitle)}),y.jsx("p",{className:"mb-8",style:{color:t.getColor(C.FooterText)},children:n(Y.RatingThankYouDescription)}),y.jsx("p",{className:"mb-4",style:{color:t.getColor(C.FooterText)},children:n(Y.RatingCountdown).replace("{seconds}",a.toString())}),y.jsx(on,{onClick:h,className:"w-full max-w-xs rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(C.ButtonBackground),color:t.getColor(C.ButtonText),borderRadius:t.getRadius()},children:n(Y.RatingNewConversation)})]}):y.jsxs(ve.div,{initial:{opacity:0},animate:{opacity:1},className:"flex flex-col",children:[y.jsx("div",{className:"text-center mb-6",children:y.jsx("p",{className:"text-base",style:{color:t.getColor(C.FooterText)},children:n(Y.RatingDescription)})}),y.jsxs("div",{className:"mb-6",children:[y.jsx("h3",{className:"text-center font-medium mb-2 text-lg",style:{color:t.getColor(C.RatingRateConversationText)},children:n(Y.RatingRateConversation)}),y.jsx(Y$,{rating:r,onChange:m=>{i(m),m>=1&&u(!1)}}),r>0&&y.jsx("p",{className:"text-center text-sm mt-1",style:{color:t.getColor(C.FooterText)},children:n(Y.RatingYourScore).replace("{score}",Number.isInteger(r)?r.toString():r.toFixed(1))}),r>0&&r<1||d?y.jsx("p",{className:"text-center text-sm mt-1",style:{color:t.getColor(C.ErrorText)},children:n(Y.RatingMinimumError)}):null]}),y.jsxs("form",{onSubmit:p.handleSubmit,className:"space-y-5",children:[y.jsxs("div",{children:[y.jsx("label",{htmlFor:"comment",className:"block text-sm font-medium mb-1",style:{color:t.getColor(C.InputText)},children:n(Y.RatingComment)}),y.jsx(yg,{id:"comment",onChange:p.handleChange,onBlur:p.handleBlur,value:p.values.comment,placeholder:n(Y.RatingCommentPlaceholder),className:"rounded-lg shadow-sm",style:{borderColor:t.getColor(C.InputBorder),backgroundColor:t.getColor(C.InputBackground),color:t.getColor(C.InputText),borderRadius:t.getRadius()},error:p.errors.comment})]}),y.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[y.jsx(on,{type:"submit",onClick:m=>{r<1&&(m.preventDefault(),m.stopPropagation(),u(!0))},className:"w-full rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(C.ButtonBackground),color:t.getColor(C.ButtonText),borderRadius:t.getRadius()},children:n(Y.RatingSubmit)}),y.jsx(on,{onClick:h,className:"w-full rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(C.GreeterBackground),color:t.getColor(C.GreeterText),borderRadius:t.getRadius()},children:n(Y.RatingNewConversation)})]})]})]})}),y.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center flex items-center justify-center gap-1 transition-colors",style:{color:t.getColor(C.FooterText),borderTop:`1px solid ${t.getColor(C.FooterBorder)}`,backgroundColor:t.getColor(C.FooterBackground)},children:[y.jsx("span",{children:n(Y.PoweredBy)}),y.jsx("span",{className:"font-medium",children:"Alfatek"}),y.jsx("img",{src:"https://alfatekyazilim.com.tr/images/favicon.png",alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function X$({children:e}){const{widget:t}=kt();return t?y.jsx("section",{className:"h-full w-full relative",children:e}):null}function Z$({children:e}){const t=ci(),n=jc();return v.useEffect(()=>{t&&t.connect()},[]),t?t.connected?e:(n.push("registration"),null):null}function J$(){const{widget:e,setOpen:t,setIsHaveChat:n}=kt(),r=Oe(),i=ci(),s=ol(),o=jc(),a=ss(),[l,c]=v.useState(null),[d,u]=v.useState([]),[f,p]=v.useState(!1),[h,m]=v.useState([]),x=()=>{if(l){c({...l,status:ys.Closed});return}g()},g=b=>{b||t(!1),aa((e==null?void 0:e.link_id)||""),n(!1),c(null),u([]),m([]),Up(e.client_id,ho(s)).then(()=>{i==null||i.disconnect(),o.push("registration")})};v.useEffect(()=>{i==null||i.emit(En.ChatView,{},b=>{if(b===null){t(!1),n(!1),Up(e.client_id,ho(s)),u([]),m([]),aa((e==null?void 0:e.link_id)||""),o.push("registration");return}c(b),n(!0)})},[]);const w=v.useCallback(b=>{l&&![ys.Closed,ys.Deleted].includes(l.status)&&u([...d,b])},[d,l]);return v.useEffect(()=>{if(!i)return;const b=P=>{const M={content:P.content,created_at:P.created_at,files:P.files,id:P._id,sender_type:P.sender_type,answers:P.answers,reply_id:P.reply_id,buttons:P.buttons};if(h.length>0){m(N=>[...N,M]);return}P.is_shortcut?m([M]):w(M),p(!1)},k=P=>{c({...l,agent_name:P.name,agent_avatar:P.avatar,is_customer_uploadable:(l==null?void 0:l.is_customer_uploadable)??!1,status:(l==null?void 0:l.status)??ys.Open}),w({content:` _ _${P.name}`,created_at:new Date,files:[],id:Math.random().toString(),sender_type:Le.Activity,activity_type:ki.AdminJoin,sender_name:P.name})},T=()=>{p(!0)},E=()=>{x()},_=({is_customer_uploadable:P})=>{c(l?{...l,is_customer_uploadable:P}:null)};return i.on(st.MessageAgentCreate,b),i.on(st.ChatUserAssignee,k),i.on(st.MessageAgentTyping,T),i.on(st.ChatUserClose,E),i.on(st.ChatToggleUpload,_),()=>{i.off(st.MessageAgentCreate,b),i.off(st.ChatUserAssignee,k),i.off(st.MessageAgentTyping,T),i.off(st.ChatUserClose,E),i.off(st.ChatToggleUpload,_)}},[w]),v.useEffect(()=>{!i||!l||i.emit(En.MessageList,{},b=>{u(b)})},[i,l]),v.useEffect(()=>{const b=setTimeout(()=>{p(!1)},2e3);return()=>clearTimeout(b)},[f]),v.useEffect(()=>{if(!e||h.length===0)return;let b=0;e.writing_timeout&&(b=[...h[0].content].length/e.writing_timeout,b<0&&(b=0));const k=setTimeout(()=>{w(h[0]),m(h.slice(1))},b*1e3);return()=>clearTimeout(k)},[h,e]),l?y.jsxs(y.Fragment,{children:[y.jsx("div",{id:"chat-alert-portal"}),y.jsx(Xr,{children:y.jsx(ve.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:`h-full w-full ${a?"":"rounded-xl"} shadow-sm flex flex-col overflow-hidden`,style:{height:a?"100%":"",minHeight:a?"var(--app-height, 100dvh)":"",maxHeight:a?"var(--app-height, 100dvh)":"",backgroundColor:r.getColor(C.Background)},children:l.status===ys.Closed?y.jsx(K$,{onOk:g}):y.jsx(Q$,{chat:l,isTyping:f,messages:d,shortcutMessages:h,onNewMessage:w,onChatClose:x})})})]}):null}function eB(){return KL(),null}function tB(){return y.jsxs(Z$,{children:[y.jsx(wk,{defaultOpen:!0,children:y.jsx(X$,{children:y.jsx(J$,{})})}),y.jsx(eB,{})]})}const nB=[{path:"/chat",component:tB,name:"chat"}],WC=[...nB],qC=[...tI],rB=[...WC,...qC];function iB(){return y.jsx(lP,{future:{v7_startTransition:!0},children:y.jsxs(cP,{children:[WC.map((e,t)=>y.jsx(hp,{path:e.path,element:y.jsx(e.component,{})},t)),qC.map((e,t)=>y.jsx(hp,{path:e.path,element:y.jsx(e.component,{})},t))]})})}const sB=v.forwardRef((e,t)=>{const n=localStorage.getItem("lc:device:id"),{data:r,isLoading:i,error:s}=g2(e.link_id,n||void 0),{widget:o,setWidget:a,setSoundPath:l,setDefaultValues:c,setOpen:d,setOnTooltipClose:u,setIsTooltipVisible:f,setOnOpen:p,setOnClose:h,onOpen:m,onClose:x}=kt();return v.useImperativeHandle(t,()=>({open:()=>{d(!0),m&&m()},close:()=>{d(!1),x&&x()}})),v.useEffect(()=>{r&&y2(r)&&a(r),e.soundPath&&l(e.soundPath),e.defaultValues&&c(e.defaultValues),e.onTooltipClose&&u(e.onTooltipClose),e.showTooltip===!1&&f(!1),e.onOpen&&p(e.onOpen),e.onClose&&h(e.onClose)},[r,e.soundPath,e.defaultValues,e.onTooltipClose,e.showTooltip,e.onOpen,e.onClose]),i?y.jsx("div",{children:"Loading..."}):s||!r||!o?null:y.jsx(IL,{children:y.jsx(ED,{children:y.jsx(iB,{})})})}),oB=new Z_;let jx=null;function aB(e){if(!e.container)return;const t=L.createRef();return jx=Jw(e.container),jx.render(y.jsxs(r2,{client:oB,children:[y.jsx(sB,{...e,ref:t}),y.jsx(EL,{richColors:!0,style:{zIndex:999999,position:"fixed",bottom:"20px",right:"20px"},position:"bottom-right"})]})),{open:()=>{var n;return(n=t.current)==null?void 0:n.open()},close:()=>{var n;return(n=t.current)==null?void 0:n.close()}}}window.widget=aB});export default lB();
139
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zC(e,t){if(e){if(typeof e=="string")return oh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oh(e,t)}}function oh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function z$(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function V$(e){if(Array.isArray(e))return e}function Ex(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function je(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ex(Object(n),!0).forEach(function(r){ah(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ex(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ah(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tc(e,t){if(e==null)return{};var n=U$(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function U$(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 ul=v.forwardRef(function(e,t){var n=e.children,r=tc(e,O$),i=H$(r),s=i.open,o=tc(i,D$);return v.useImperativeHandle(t,function(){return{open:s}},[s]),L.createElement(v.Fragment,null,n(je(je({},o),{},{open:s})))});ul.displayName="Dropzone";var VC={disabled:!1,getFilesFromEvent:t$,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};ul.defaultProps=VC;ul.propTypes={children:xe.func,accept:xe.objectOf(xe.arrayOf(xe.string)),multiple:xe.bool,preventDropOnDocument:xe.bool,noClick:xe.bool,noKeyboard:xe.bool,noDrag:xe.bool,noDragEventsBubbling:xe.bool,minSize:xe.number,maxSize:xe.number,maxFiles:xe.number,disabled:xe.bool,getFilesFromEvent:xe.func,onFileDialogCancel:xe.func,onFileDialogOpen:xe.func,useFsAccessApi:xe.bool,autoFocus:xe.bool,onDragEnter:xe.func,onDragLeave:xe.func,onDragOver:xe.func,onDrop:xe.func,onDropAccepted:xe.func,onDropRejected:xe.func,onError:xe.func,validator:xe.func};var lh={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function H$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=je(je({},VC),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,s=t.maxSize,o=t.minSize,a=t.multiple,l=t.maxFiles,u=t.onDragEnter,d=t.onDragLeave,c=t.onDragOver,f=t.onDrop,h=t.onDropAccepted,m=t.onDropRejected,p=t.onFileDialogCancel,w=t.onFileDialogOpen,g=t.useFsAccessApi,x=t.autoFocus,b=t.preventDropOnDocument,T=t.noClick,E=t.noKeyboard,C=t.noDrag,_=t.noDragEventsBubbling,A=t.onError,F=t.validator,M=v.useMemo(function(){return P$(n)},[n]),R=v.useMemo(function(){return j$(n)},[n]),$=v.useMemo(function(){return typeof w=="function"?w:_x},[w]),U=v.useMemo(function(){return typeof p=="function"?p:_x},[p]),Y=v.useRef(null),J=v.useRef(null),te=v.useReducer(W$,lh),ne=sf(te,2),j=ne[0],D=ne[1],B=j.isFocused,z=j.isFileDialogActive,H=v.useRef(typeof window<"u"&&window.isSecureContext&&g&&_$()),ee=function(){!H.current&&z&&setTimeout(function(){if(J.current){var N=J.current.files;N.length||(D({type:"closeDialog"}),U())}},300)};v.useEffect(function(){return window.addEventListener("focus",ee,!1),function(){window.removeEventListener("focus",ee,!1)}},[J,z,U,H]);var de=v.useRef([]),ye=function(N){Y.current&&Y.current.contains(N.target)||(N.preventDefault(),de.current=[])};v.useEffect(function(){return b&&(document.addEventListener("dragover",Tx,!1),document.addEventListener("drop",ye,!1)),function(){b&&(document.removeEventListener("dragover",Tx),document.removeEventListener("drop",ye))}},[Y,b]),v.useEffect(function(){return!r&&x&&Y.current&&Y.current.focus(),function(){}},[Y,x,r]);var re=v.useCallback(function(O){A?A(O):console.error(O)},[A]),Le=v.useCallback(function(O){O.preventDefault(),O.persist(),wr(O),de.current=[].concat(N$(de.current),[O.target]),Vl(O)&&Promise.resolve(i(O)).then(function(N){if(!(ec(O)&&!_)){var G=N.length,X=G>0&&k$({files:N,accept:M,minSize:o,maxSize:s,multiple:a,maxFiles:l,validator:F}),le=G>0&&!X;D({isDragAccept:X,isDragReject:le,isDragActive:!0,type:"setDraggedFiles"}),u&&u(O)}}).catch(function(N){return re(N)})},[i,u,re,_,M,o,s,a,l,F]),et=v.useCallback(function(O){O.preventDefault(),O.persist(),wr(O);var N=Vl(O);if(N&&O.dataTransfer)try{O.dataTransfer.dropEffect="copy"}catch{}return N&&c&&c(O),!1},[c,_]),tt=v.useCallback(function(O){O.preventDefault(),O.persist(),wr(O);var N=de.current.filter(function(X){return Y.current&&Y.current.contains(X)}),G=N.indexOf(O.target);G!==-1&&N.splice(G,1),de.current=N,!(N.length>0)&&(D({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Vl(O)&&d&&d(O))},[Y,d,_]),Lt=v.useCallback(function(O,N){var G=[],X=[];O.forEach(function(le){var Ue=LC(le,M),nt=sf(Ue,2),jn=nt[0],Kt=nt[1],hs=IC(le,o,s),Zn=sf(hs,2),br=Zn[0],ms=Zn[1],jo=F?F(le):null;if(jn&&br&&!jo)G.push(le);else{var mi=[Kt,ms];jo&&(mi=mi.concat(jo)),X.push({file:le,errors:mi.filter(function(Pn){return Pn})})}}),(!a&&G.length>1||a&&l>=1&&G.length>l)&&(G.forEach(function(le){X.push({file:le,errors:[S$]})}),G.splice(0)),D({acceptedFiles:G,fileRejections:X,isDragReject:X.length>0,type:"setFiles"}),f&&f(G,X,N),X.length>0&&m&&m(X,N),G.length>0&&h&&h(G,N)},[D,a,M,o,s,l,f,h,m,F]),_n=v.useCallback(function(O){O.preventDefault(),O.persist(),wr(O),de.current=[],Vl(O)&&Promise.resolve(i(O)).then(function(N){ec(O)&&!_||Lt(N,O)}).catch(function(N){return re(N)}),D({type:"reset"})},[i,Lt,re,_]),fn=v.useCallback(function(){if(H.current){D({type:"openDialog"}),$();var O={multiple:a,types:R};window.showOpenFilePicker(O).then(function(N){return i(N)}).then(function(N){Lt(N,null),D({type:"closeDialog"})}).catch(function(N){A$(N)?(U(N),D({type:"closeDialog"})):R$(N)?(H.current=!1,J.current?(J.current.value=null,J.current.click()):re(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):re(N)});return}J.current&&(D({type:"openDialog"}),$(),J.current.value=null,J.current.click())},[D,$,U,g,Lt,re,R,a]),pi=v.useCallback(function(O){!Y.current||!Y.current.isEqualNode(O.target)||(O.key===" "||O.key==="Enter"||O.keyCode===32||O.keyCode===13)&&(O.preventDefault(),fn())},[Y,fn]),yr=v.useCallback(function(){D({type:"focus"})},[]),ps=v.useCallback(function(){D({type:"blur"})},[]),hi=v.useCallback(function(){T||(E$()?setTimeout(fn,0):fn())},[T,fn]),Ct=function(N){return r?null:N},xr=function(N){return E?null:Ct(N)},Qe=function(N){return C?null:Ct(N)},wr=function(N){_&&N.stopPropagation()},_o=v.useMemo(function(){return function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},N=O.refKey,G=N===void 0?"ref":N,X=O.role,le=O.onKeyDown,Ue=O.onFocus,nt=O.onBlur,jn=O.onClick,Kt=O.onDragEnter,hs=O.onDragOver,Zn=O.onDragLeave,br=O.onDrop,ms=tc(O,M$);return je(je(ah({onKeyDown:xr(On(le,pi)),onFocus:xr(On(Ue,yr)),onBlur:xr(On(nt,ps)),onClick:Ct(On(jn,hi)),onDragEnter:Qe(On(Kt,Le)),onDragOver:Qe(On(hs,et)),onDragLeave:Qe(On(Zn,tt)),onDrop:Qe(On(br,_n)),role:typeof X=="string"&&X!==""?X:"presentation"},G,Y),!r&&!E?{tabIndex:0}:{}),ms)}},[Y,pi,yr,ps,hi,Le,et,tt,_n,E,C,r]),P=v.useCallback(function(O){O.stopPropagation()},[]),V=v.useMemo(function(){return function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},N=O.refKey,G=N===void 0?"ref":N,X=O.onChange,le=O.onClick,Ue=tc(O,F$),nt=ah({accept:M,multiple:a,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Ct(On(X,_n)),onClick:Ct(On(le,P)),tabIndex:-1},G,J);return je(je({},nt),Ue)}},[J,n,a,_n,r]);return je(je({},j),{},{isFocused:B&&!r,getRootProps:_o,getInputProps:V,rootRef:Y,inputRef:J,open:Ct(fn)})}function W$(e,t){switch(t.type){case"focus":return je(je({},e),{},{isFocused:!0});case"blur":return je(je({},e),{},{isFocused:!1});case"openDialog":return je(je({},lh),{},{isFileDialogActive:!0});case"closeDialog":return je(je({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return je(je({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return je(je({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return je({},lh);default:return e}}function _x(){}const UC=5*1024*1024,vo={"text/plain":[".txt"],"application/pdf":[".pdf"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/msword":[".doc"],"image/png":[".png"],"image/jpeg":[".jpg",".jpeg"],"image/gif":[".gif"],"image/webp":[".webp"],"image/svg+xml":[".svg"]},jx=Object.values(vo).flat();function q$(e){var r;if(e.size>UC)return{isValid:!1,error:`Dosya boyutu 5MB'dan büyük olamaz. Seçilen dosya: ${(e.size/1024/1024).toFixed(2)}MB`};const t=`.${(r=e.name.split(".").pop())==null?void 0:r.toLowerCase()}`;return Object.keys(vo).includes(e.type)||jx.includes(t)?{isValid:!0,error:""}:{isValid:!1,error:`Desteklenmeyen dosya tipi. Kabul edilen tipler: ${jx.join(", ")}`}}function nc(e){for(const t of e){const n=q$(t);if(!n.isValid)return n}return{isValid:!0,error:""}}function HC({onDrop:e}){const t=n=>{const r=nc(n);if(!r.isValid){alert(r.error);return}e(n)};return y.jsx("div",{className:"flex items-center justify-center border rounded-md cursor-pointer bg-slate-100 dropzone border-slate-200 dz-clickable",children:y.jsx(ul,{onDrop:t,accept:Object.keys(vo).reduce((n,r)=>(n[r]=vo[r],n),{}),maxSize:UC,children:({getRootProps:n,getInputProps:r})=>y.jsxs("div",{className:"w-full py-5 text-lg text-center dz-message needsclick",...n(),children:[y.jsx("input",{...r()}),y.jsx("div",{className:"mb-3",children:y.jsx(PC,{className:"block size-12 mx-auto text-slate-500 fill-slate-200"})}),y.jsxs("h5",{className:"mb-0 font-normal text-slate-500 text-15",children:["Yüklemek istediğiniz görseli buraya sürükleyin veya"," ",y.jsx("span",{className:"text-custom-500",children:"seçmek için tıklayın"})]})]})})})}HC.Button=({onDrop:e})=>{const t=n=>{const r=nc(n);if(!r.isValid){Bn({description:r.error,variant:"error"});return}e(n)};return y.jsx(ul,{onDrop:t,accept:Object.keys(vo).reduce((n,r)=>(n[r]=vo[r],n),{}),children:({getRootProps:n,getInputProps:r})=>y.jsxs("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center hover:bg-slate-100 text-center dz-message needsclick cursor-pointer",...n(),children:[y.jsx("input",{...r()}),y.jsx(PC,{className:"size-6 text-slate-500 fill-slate-200"})]})})};function G$({onNewMessage:e,client_id:t,is_uploadable:n,messages:r,onEvaluateChat:i,onNewChat:s}){const o=v.useRef(null),a=di(),l=DD(t),u=De(),d=sl(),{setIsInputFocused:c}=kt(),[f,h]=v.useState(""),[m,p]=v.useState("3rem"),[w,g]=v.useState(!1),[x,b]=v.useState([]),[T,E]=v.useState(0),[C,_]=v.useState(!1),[A,F]=v.useState(0),[M,R]=v.useState(null),[$,U]=v.useState(()=>localStorage.getItem("showActionButtons")==="true");v.useEffect(()=>{if(r.length>0){const j=r[r.length-1];j.id!==M&&(R(j.id),j.sender_type===Ie.User&&(E(0),_(!1)))}},[r,M]),v.useEffect(()=>{let j;return C&&A>0&&(j=window.setTimeout(()=>{F(D=>D<=1?(_(!1),E(0),0):D-1)},1e3)),()=>clearTimeout(j)},[C,A]),v.useEffect(()=>{const j=o.current;if(j){const D=()=>c(!0),B=()=>c(!1);return j.addEventListener("focus",D),j.addEventListener("blur",B),()=>{j.removeEventListener("focus",D),j.removeEventListener("blur",B)}}},[c]),v.useEffect(()=>{const j=()=>{U(!0),localStorage.setItem("showActionButtons","true")},D=()=>{U(!1),localStorage.setItem("showActionButtons","false")};return a==null||a.on(we.ChatUserShowButton,j),a==null||a.on(we.MessageUserCreate,D),()=>{a==null||a.off(we.ChatUserShowButton,j),a==null||a.off(we.MessageUserCreate,D)}},[a]),v.useEffect(()=>{r.length>0&&r[r.length-1].activity_type==="admin_join"&&(U(!1),localStorage.setItem("showActionButtons","false"))},[r]),Km("paste",j=>{const D=j.clipboardData.items,B=[];for(const z of D){const H=z.getAsFile();H&&B.push(H)}if(B.length>0&&!n){Bn({description:d(Q.FileUploadDisabled),variant:"error"});return}if(B.length>0){const z=nc(B);if(!z.isValid){Bn({description:z.error,variant:"error"});return}b([...x,...B])}});const Y=async()=>{if(!f.trim()&&(!n||x.length===0))return;if(T>5&&!C){_(!0),F(3);return}if(C||w)return;const j=f,D=[...x];h(""),b([]),o.current&&(o.current.style.height="3rem",p("3rem")),g(!0);let B;if(n&&D.length>0){const[z,H]=await l.mutateAsync(D);if(!Za(H)){RL(z,H),g(!1),h(j),b(D);return}MD(z)&&(B=z.file_urls)}a==null||a.emit(Dt.MessageCreate,{content:j,files:B},z=>{e(z),g(!1),E(H=>H+1),U(!1),localStorage.setItem("showActionButtons","false")})},J=j=>{a==null||a.emit(Dt.MessageTyping,{content:j})},te=()=>{a==null||a.emit(Dt.ChatClose,{}),U(!1),localStorage.setItem("showActionButtons","false"),i==null||i()},ne=()=>{a==null||a.emit(Dt.ChatClose,{}),U(!1),localStorage.setItem("showActionButtons","false"),s==null||s()};return y.jsxs(y.Fragment,{children:[C&&y.jsxs(he.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mb-2 mx-3 rounded-lg z-[100] p-2 flex items-center justify-center",style:{backgroundColor:u.getColor(k.ErrorBackground),borderColor:u.getColor(k.ErrorBorder),borderWidth:"1px",borderStyle:"solid",borderRadius:u.getRadius()},children:[y.jsx(oe.XCircle,{className:"size-4 mr-2",style:{color:u.getColor(k.ErrorText)}}),y.jsx("span",{className:"text-sm font-medium",style:{color:u.getColor(k.ErrorText)},children:d(Q.RateLimitMessage).replace("{seconds}",A.toString())})]}),$&&y.jsxs(he.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mb-2 mx-3 flex flex-col gap-2",children:[y.jsxs(Ot,{className:"w-full py-3 rounded-lg shadow-sm flex items-center justify-center gap-2",onClick:te,style:{backgroundColor:u.getColor(k.ButtonBackground),color:u.getColor(k.ButtonText)},children:[y.jsx(oe.Star,{className:"size-5"}),y.jsx("span",{className:"font-medium",children:"Sohbeti Değerlendir"})]}),y.jsxs(Ot,{className:"w-full py-3 rounded-lg shadow-sm flex items-center justify-center gap-2",onClick:ne,style:{backgroundColor:u.getColor(k.ButtonBackground),color:u.getColor(k.ButtonText)},children:[y.jsx(oe.Plus,{className:"size-5"}),y.jsx("span",{className:"font-medium",children:"Yeni Sohbet Oluştur"})]})]}),y.jsxs("form",{className:"p-3 flex items-start gap-3 rounded-b-xl relative",style:{backgroundColor:u.getColor(k.FooterBackground),borderRadius:u.getRadius()},onSubmit:j=>{j.preventDefault(),Y()},children:[n&&x&&x.length>0&&y.jsx("div",{className:"absolute bottom-18 w-full overflow-x-auto",children:y.jsx(_C,{files:x,onDelete:j=>{b(x.filter((D,B)=>B!==j))}})}),y.jsxs("div",{className:"grow relative",children:[y.jsx(yg,{id:"message",inputRef:o,className:"grow shadow-none",noMargin:!0,autoComplete:"off",style:{height:m,maxHeight:"6rem"},placeholder:d(Q.MessagePlaceholder),value:f,maxLength:2e3,onChange:j=>{const D=j.target.value;if(D.length<=2e3&&(h(D),J(D)),D.length>0&&j.currentTarget.scrollHeight>j.currentTarget.clientHeight){const B=`${j.currentTarget.scrollHeight}px`;j.currentTarget.style.height=B,p(B)}else j.currentTarget.style.height="3rem",p("3rem")},onKeyDown:j=>{j.key==="Enter"&&!j.shiftKey&&(j.preventDefault(),Y())}}),f.length>=500&&y.jsx("div",{className:"absolute bottom-1 right-2 text-xs",style:{color:f.length>=2e3?u.getColor(k.ErrorText):u.getColor(k.FooterText),fontWeight:f.length>=2e3?"600":"normal"},children:2e3-f.length})]}),y.jsxs(he.div,{whileTap:{scale:.95},className:"flex items-center gap-2 justify-center",children:[n&&y.jsx(HC.Button,{onDrop:j=>{if(j.length){const D=nc(j);if(!D.isValid){console.log("val",D),Bn({description:D.error,variant:"error"});return}b([...x,...j])}}}),y.jsx(Ot,{className:"rounded-full shadow-sm w-12 h-12 flex items-center justify-center",type:"submit",disabled:w||!f.trim()&&x.length===0||C,children:w?y.jsx(oe.Spin,{className:"size-6 animate-spin"}):C?y.jsx("span",{className:"text-xs font-bold",children:A}):y.jsx(oe.PaperAirplane,{className:"size-6 -rotate-12"})})]})]})]})}function Q$({chat:e,isTyping:t,shortcutMessages:n,messages:r,onNewMessage:i,onChatClose:s,onEvaluateChat:o,onNewChat:a}){var _,A;const{widget:l,setOpen:u,open:d,isHaveChat:c,isInputFocused:f,anyAdmin:h,setAnyAdmin:m}=kt(),p=De(),w=ss(),g=Xm(),x=di(),b=v.useRef(new Set),T=v.useRef(!1),E=()=>{console.log("anyAdmin",h),console.log("send close"),h||(x.emit(Dt.ChatClose,{}),s())},C=v.useCallback(()=>{if(!x||!d||!c)return;const F=r.filter(M=>M.sender_type===Ie.User&&!b.current.has(M.id)).map(M=>M.id);F.length!==0&&x.emit(Dt.MessageRead,{message_ids:F},M=>{if(M&&M.success===!0)for(const R of F)b.current.add(R)})},[x,r,d,c]);return v.useEffect(()=>{d&&(T.current=!0),d&&c&&(f||T.current)&&(C(),T.current=!1)},[d,c,f,C]),v.useEffect(()=>{if(!x)return;const F=M=>{(M==null?void 0:M.hasOtherAdmins)===!1&&m(!1)};return x.on(we.ChatUserLeave,F),()=>{x.off(we.ChatUserLeave,F)}},[x,m,u,s]),y.jsxs(y.Fragment,{children:[y.jsxs("header",{style:{backgroundColor:p.getColor(k.HeaderBackground),color:p.getColor(k.HeaderText),borderBottom:`1px solid ${p.getColor(k.HeaderBorder)}`,borderTopLeftRadius:w?"":p.getRadius(),borderTopRightRadius:w?"":p.getRadius()},className:"p-4 flex justify-between items-center z-10",children:[e!=null&&e.agent_name?y.jsx(nI,{name:e.agent_name,avatar:e.agent_avatar,textColor:p.getColor(k.HeaderText)}):y.jsx("div",{style:{color:p.getColor(k.HeaderText)},className:"font-medium",children:((A=(_=l==null?void 0:l.appearance)==null?void 0:_.design)==null?void 0:A.greeting_header)||"Bizimle Sohbet Edin"}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(DI,{onChatClose:s}),!g&&!w&&y.jsx("button",{type:"button",style:{color:p.getColor(k.HeaderText)},onClick:E,children:y.jsx(oe.X,{className:"w-5 h-5 cursor-pointer"})})]})]}),y.jsx($I,{messages:r,isTyping:t||n.length>0}),y.jsx(G$,{client_id:(l==null?void 0:l.client_id)||"",is_uploadable:e.is_customer_uploadable,messages:r,onNewMessage:F=>{i(F)},onEvaluateChat:o,onNewChat:a}),y.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center flex items-center justify-center gap-1 transition-colors",style:{color:p.getColor(k.FooterText),borderTop:`1px solid ${p.getColor(k.FooterBorder)}`,backgroundColor:p.getColor(k.FooterBackground)},children:[y.jsx("span",{children:"Powered by"}),y.jsx("span",{className:"font-medium",children:"Alfatek"}),y.jsx("img",{src:"https://alfatekyazilim.com.tr/images/favicon.png",alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function Y$({rating:e,onChange:t}){const n=De();return y.jsx("div",{className:"flex items-center justify-center gap-1 my-3",children:[1,2,3,4,5].map(r=>{const i=r<=e,s=!i&&r-.5<=e;return y.jsxs("div",{className:"relative w-10 h-10",children:[y.jsx("svg",{className:"w-10 h-10",style:{color:n.getColor(k.StarInactiveColor),fill:n.getColor(k.StarInactiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:y.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"})}),s&&y.jsx("div",{className:"absolute top-0 left-0 w-5 h-10 overflow-hidden",children:y.jsx("svg",{className:"w-10 h-10",style:{color:n.getColor(k.StarActiveColor),fill:n.getColor(k.StarActiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:y.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&&y.jsx("svg",{className:"w-10 h-10 absolute top-0 left-0",style:{color:n.getColor(k.StarActiveColor),fill:n.getColor(k.StarActiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:y.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"})}),y.jsxs("div",{className:"absolute inset-0 flex",children:[y.jsx("button",{type:"button",onClick:()=>t(r-.5),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${r-.5} stars`}),y.jsx("button",{type:"button",onClick:()=>t(r),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${r} stars`})]})]},r)})})}function K$({onOk:e}){const t=De(),n=sl(),[r,i]=v.useState(0),[s,o]=v.useState(!1),[a,l]=v.useState(10),u=OD(),[d,c]=v.useState(!1);v.useEffect(()=>{if(s){const p=setInterval(()=>{l(w=>w<=1?(clearInterval(p),e(!0),0):w-1)},1e3);return()=>clearInterval(p)}},[s]);const f=rg({comment:Xu()}),h=cC({init:{comment:""},schema:f,action:async p=>{const[w,g]=await u.mutateAsync({rating:r,comment:p.comment});if(Za(g)){o(!0);return}fC(w,{form:h})}}),m=()=>{e(!0)};return y.jsxs("div",{className:"flex flex-col h-full",children:[y.jsxs("header",{style:{backgroundColor:s?t.getColor(k.RatingSuccessBackground):t.getColor(k.RatingHeaderBackground),color:s?t.getColor(k.RatingSuccessText):t.getColor(k.RatingHeaderText),borderBottom:`1px solid ${t.getColor(k.HeaderBorder)}`},className:"p-4 flex justify-between items-center z-10",children:[y.jsx("div",{className:"font-medium",children:n(s?Q.RatingHeaderThanks:Q.RatingHeaderEvaluate)}),y.jsx(Ot,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"sm",rounded:!0,onClick:()=>e(!1),className:"text-inherit cursor-pointer",children:y.jsx(oe.X,{className:"size-4"})})]}),y.jsx("div",{className:"flex-1 p-6 overflow-y-auto flex flex-col",children:s?y.jsxs(he.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"flex flex-col items-center justify-center h-full text-center",children:[y.jsx("div",{className:"mb-4",style:{color:t.getColor(k.SuccessText)},children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-16 w-16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),y.jsx("h2",{className:"text-xl font-semibold mb-2",style:{color:t.getColor(k.HeaderText)},children:n(Q.RatingThankYouTitle)}),y.jsx("p",{className:"mb-8",style:{color:t.getColor(k.FooterText)},children:n(Q.RatingThankYouDescription)}),y.jsx("p",{className:"mb-4",style:{color:t.getColor(k.FooterText)},children:n(Q.RatingCountdown).replace("{seconds}",a.toString())}),y.jsx(Ot,{onClick:m,className:"w-full max-w-xs rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(k.ButtonBackground),color:t.getColor(k.ButtonText),borderRadius:t.getRadius()},children:n(Q.RatingNewConversation)})]}):y.jsxs(he.div,{initial:{opacity:0},animate:{opacity:1},className:"flex flex-col",children:[y.jsx("div",{className:"text-center mb-6",children:y.jsx("p",{className:"text-base",style:{color:t.getColor(k.FooterText)},children:n(Q.RatingDescription)})}),y.jsxs("div",{className:"mb-6",children:[y.jsx("h3",{className:"text-center font-medium mb-2 text-lg",style:{color:t.getColor(k.RatingRateConversationText)},children:n(Q.RatingRateConversation)}),y.jsx(Y$,{rating:r,onChange:p=>{i(p),p>=1&&c(!1)}}),r>0&&y.jsx("p",{className:"text-center text-sm mt-1",style:{color:t.getColor(k.FooterText)},children:n(Q.RatingYourScore).replace("{score}",Number.isInteger(r)?r.toString():r.toFixed(1))}),r>0&&r<1||d?y.jsx("p",{className:"text-center text-sm mt-1",style:{color:t.getColor(k.ErrorText)},children:n(Q.RatingMinimumError)}):null]}),y.jsxs("form",{onSubmit:h.handleSubmit,className:"space-y-5",children:[y.jsxs("div",{children:[y.jsx("label",{htmlFor:"comment",className:"block text-sm font-medium mb-1",style:{color:t.getColor(k.InputText)},children:n(Q.RatingComment)}),y.jsx(yg,{id:"comment",onChange:h.handleChange,onBlur:h.handleBlur,value:h.values.comment,placeholder:n(Q.RatingCommentPlaceholder),className:"rounded-lg shadow-sm",style:{borderColor:t.getColor(k.InputBorder),backgroundColor:t.getColor(k.InputBackground),color:t.getColor(k.InputText),borderRadius:t.getRadius()},error:h.errors.comment})]}),y.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[y.jsx(Ot,{type:"submit",onClick:p=>{r<1&&(p.preventDefault(),p.stopPropagation(),c(!0))},className:"w-full rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(k.ButtonBackground),color:t.getColor(k.ButtonText),borderRadius:t.getRadius()},children:n(Q.RatingSubmit)}),y.jsx(Ot,{onClick:m,className:"w-full rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(k.GreeterBackground),color:t.getColor(k.GreeterText),borderRadius:t.getRadius()},children:n(Q.RatingNewConversation)})]})]})]})}),y.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center flex items-center justify-center gap-1 transition-colors",style:{color:t.getColor(k.FooterText),borderTop:`1px solid ${t.getColor(k.FooterBorder)}`,backgroundColor:t.getColor(k.FooterBackground)},children:[y.jsx("span",{children:n(Q.PoweredBy)}),y.jsx("span",{className:"font-medium",children:"Alfatek"}),y.jsx("img",{src:"https://alfatekyazilim.com.tr/images/favicon.png",alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function X$({children:e}){const{widget:t}=kt();return t?y.jsx("section",{className:"h-full w-full relative",children:e}):null}function Z$({children:e}){const t=di(),n=Pc();return v.useEffect(()=>{t&&t.connect()},[]),t?t.connected?e:(n.push("registration"),null):null}function J$(){const{widget:e,setOpen:t,setIsHaveChat:n,anyAdmin:r}=kt(),i=De(),s=di(),o=ol(),a=Pc(),l=ss(),[u,d]=v.useState(null),[c,f]=v.useState([]),[h,m]=v.useState(!1),[p,w]=v.useState([]),g=()=>{if(u){d({...u,status:ys.Closed}),r||x(!1);return}x()},x=C=>{C||t(!1),aa((e==null?void 0:e.link_id)||""),n(!1),d(null),f([]),w([]),Up(e.client_id,ho(o)).then(()=>{s==null||s.disconnect(),a.push("registration")})},b=()=>{g()},T=()=>{x(!0)};v.useEffect(()=>{s==null||s.emit(Dt.ChatView,{},C=>{if(C===null){t(!1),n(!1),Up(e.client_id,ho(o)),f([]),w([]),aa((e==null?void 0:e.link_id)||""),a.push("registration");return}d(C),n(!0)})},[]);const E=v.useCallback(C=>{u&&![ys.Closed,ys.Deleted].includes(u.status)&&f([...c,C])},[c,u]);return v.useEffect(()=>{if(!s)return;const C=$=>{const U={content:$.content,created_at:$.created_at,files:$.files,id:$._id,sender_type:$.sender_type,answers:$.answers,reply_id:$.reply_id,buttons:$.buttons};if(p.length>0){w(Y=>[...Y,U]);return}$.is_shortcut?w([U]):E(U),m(!1)},_=$=>{const U={content:$.content,created_at:$.created_at,files:$.files,id:$._id,sender_type:$.sender_type,activity_type:$.activity_type,answers:$.answers,reply_id:$.reply_id,buttons:$.buttons};E(U)},A=$=>{d({...u,agent_name:$.name,agent_avatar:$.avatar,is_customer_uploadable:(u==null?void 0:u.is_customer_uploadable)??!1,status:(u==null?void 0:u.status)??ys.Open}),E({content:` _ _${$.name}`,created_at:new Date,files:[],id:Math.random().toString(),sender_type:Ie.Activity,activity_type:nr.AdminJoin,sender_name:$.name})},F=()=>{m(!0)},M=()=>{g()},R=({is_customer_uploadable:$})=>{d(u?{...u,is_customer_uploadable:$}:null)};return s.on(we.MessageAgentCreate,C),s.on(we.MessageUserCreate,_),s.on(we.MessageCustomerCreate,_),s.on(we.ChatUserAssignee,A),s.on(we.MessageAgentTyping,F),s.on(we.ChatUserClose,M),s.on(we.ChatToggleUpload,R),()=>{s.off(we.MessageAgentCreate,C),s.off(we.MessageUserCreate,_),s.off(we.MessageCustomerCreate,_),s.off(we.ChatUserAssignee,A),s.off(we.MessageAgentTyping,F),s.off(we.ChatUserClose,M),s.off(we.ChatToggleUpload,R)}},[E]),v.useEffect(()=>{!s||!u||s.emit(Dt.MessageList,{},C=>{f(C)})},[s,u]),v.useEffect(()=>{const C=setTimeout(()=>{m(!1)},2e3);return()=>clearTimeout(C)},[h]),v.useEffect(()=>{if(!e||p.length===0)return;let C=0;e.writing_timeout&&(C=[...p[0].content].length/e.writing_timeout,C<0&&(C=0));const _=setTimeout(()=>{E(p[0]),w(p.slice(1))},C*1e3);return()=>clearTimeout(_)},[p,e]),u?y.jsxs(y.Fragment,{children:[y.jsx("div",{id:"chat-alert-portal"}),y.jsx(Zr,{children:y.jsx(he.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:`h-full w-full ${l?"":"rounded-xl"} shadow-sm flex flex-col overflow-hidden`,style:{height:l?"100%":"",minHeight:l?"var(--app-height, 100dvh)":"",maxHeight:l?"var(--app-height, 100dvh)":"",backgroundColor:i.getColor(k.Background)},children:u.status===ys.Closed?y.jsx(K$,{onOk:x}):y.jsx(Q$,{chat:u,isTyping:h,messages:c,shortcutMessages:p,onNewMessage:E,onChatClose:g,onEvaluateChat:b,onNewChat:T})})})]}):null}function eB(){return KL(),null}function tB(){return y.jsxs(Z$,{children:[y.jsx(wk,{defaultOpen:!0,children:y.jsx(X$,{children:y.jsx(J$,{})})}),y.jsx(eB,{})]})}const nB=[{path:"/chat",component:tB,name:"chat"}],WC=[...nB],qC=[...tI],rB=[...WC,...qC];function iB(){return y.jsx(lj,{future:{v7_startTransition:!0},children:y.jsxs(cj,{children:[WC.map((e,t)=>y.jsx(hp,{path:e.path,element:y.jsx(e.component,{})},t)),qC.map((e,t)=>y.jsx(hp,{path:e.path,element:y.jsx(e.component,{})},t))]})})}const sB=v.forwardRef((e,t)=>{const n=localStorage.getItem("lc:device:id"),{data:r,isLoading:i,error:s}=g2(e.link_id,n||void 0),{widget:o,setWidget:a,setSoundPath:l,setDefaultValues:u,setOpen:d,setOnTooltipClose:c,setIsTooltipVisible:f,setOnOpen:h,setOnClose:m,onOpen:p,onClose:w}=kt();return v.useImperativeHandle(t,()=>({open:()=>{d(!0),p&&p()},close:()=>{d(!1),w&&w()}})),v.useEffect(()=>{r&&y2(r)&&a(r),e.soundPath&&l(e.soundPath),e.defaultValues&&u(e.defaultValues),e.onTooltipClose&&c(e.onTooltipClose),e.showTooltip===!1&&f(!1),e.onOpen&&h(e.onOpen),e.onClose&&m(e.onClose)},[r,e.soundPath,e.defaultValues,e.onTooltipClose,e.showTooltip,e.onOpen,e.onClose]),i?y.jsx("div",{children:"Loading..."}):s||!r||!o?null:y.jsx(IL,{children:y.jsx(ED,{children:y.jsx(iB,{})})})}),oB=new Z_;let Px=null;function aB(e){if(!e.container)return;const t=L.createRef();return Px=Jw(e.container),Px.render(y.jsxs(r2,{client:oB,children:[y.jsx(sB,{...e,ref:t}),y.jsx(EL,{richColors:!0,style:{zIndex:999999,position:"fixed",bottom:"20px",right:"20px"},position:"bottom-right"})]})),{open:()=>{var n;return(n=t.current)==null?void 0:n.open()},close:()=>{var n;return(n=t.current)==null?void 0:n.close()}}}window.widget=aB});export default lB();