@alfatech/livechat 2026.4.0-9.1 → 2026.4.1-3.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.
package/dist/main.js CHANGED
@@ -1,4 +1,4 @@
1
- var kg=e=>{throw TypeError(e)};var UC=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ju=(e,t,n)=>t.has(e)||kg("Cannot "+n);var T=(e,t,n)=>(Ju(e,t,"read from private field"),n?n.call(e):t.get(e)),me=(e,t,n)=>t.has(e)?kg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),oe=(e,t,n,r)=>(Ju(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),be=(e,t,n)=>(Ju(e,t,"access private method"),n);var hl=(e,t,n,r)=>({set _(i){oe(e,t,i,n)},get _(){return T(e,t,r)}});var zB=UC((rn,sn)=>{function HC(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"}))}var ch=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Rr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vx={exports:{}},iu={},Ux={exports:{}},Ce={};/**
1
+ var jg=e=>{throw TypeError(e)};var e2=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var rd=(e,t,n)=>t.has(e)||jg("Cannot "+n);var T=(e,t,n)=>(rd(e,t,"read from private field"),n?n.call(e):t.get(e)),fe=(e,t,n)=>t.has(e)?jg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),le=(e,t,n,r)=>(rd(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),we=(e,t,n)=>(rd(e,t,"access private method"),n);var yl=(e,t,n,r)=>({set _(i){le(e,t,i,n)},get _(){return T(e,t,r)}});var s$=e2((rn,sn)=>{function t2(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"}))}var mh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jx={exports:{}},lu={},e1={exports:{}},Ce={};/**
2
2
  * @license React
3
3
  * react.production.min.js
4
4
  *
@@ -6,7 +6,7 @@ var kg=e=>{throw TypeError(e)};var UC=(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 Ja=Symbol.for("react.element"),WC=Symbol.for("react.portal"),qC=Symbol.for("react.fragment"),GC=Symbol.for("react.strict_mode"),YC=Symbol.for("react.profiler"),QC=Symbol.for("react.provider"),KC=Symbol.for("react.context"),XC=Symbol.for("react.forward_ref"),ZC=Symbol.for("react.suspense"),JC=Symbol.for("react.memo"),e2=Symbol.for("react.lazy"),Sg=Symbol.iterator;function t2(e){return e===null||typeof e!="object"?null:(e=Sg&&e[Sg]||e["@@iterator"],typeof e=="function"?e:null)}var Hx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Wx=Object.assign,qx={};function ko(e,t,n){this.props=e,this.context=t,this.refs=qx,this.updater=n||Hx}ko.prototype.isReactComponent={};ko.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")};ko.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Gx(){}Gx.prototype=ko.prototype;function uh(e,t,n){this.props=e,this.context=t,this.refs=qx,this.updater=n||Hx}var dh=uh.prototype=new Gx;dh.constructor=uh;Wx(dh,ko.prototype);dh.isPureReactComponent=!0;var Cg=Array.isArray,Yx=Object.prototype.hasOwnProperty,fh={current:null},Qx={key:!0,ref:!0,__self:!0,__source:!0};function Kx(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)Yx.call(t,r)&&!Qx.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:Ja,type:e,key:s,ref:o,props:i,_owner:fh.current}}function n2(e,t){return{$$typeof:Ja,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ph(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ja}function r2(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var _g=/\/+/g;function ed(e,t){return typeof e=="object"&&e!==null&&e.key!=null?r2(""+e.key):t.toString(36)}function Wl(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 Ja:case WC:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+ed(o,0):r,Cg(i)?(n="",e!=null&&(n=e.replace(_g,"$&/")+"/"),Wl(i,t,n,"",function(c){return c})):i!=null&&(ph(i)&&(i=n2(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(_g,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",Cg(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+ed(s,a);o+=Wl(s,t,n,l,i)}else if(l=t2(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+ed(s,a++),o+=Wl(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 ml(e,t,n){if(e==null)return e;var r=[],i=0;return Wl(e,r,"","",function(s){return t.call(n,s,i++)}),r}function i2(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 Lt={current:null},ql={transition:null},s2={ReactCurrentDispatcher:Lt,ReactCurrentBatchConfig:ql,ReactCurrentOwner:fh};function Xx(){throw Error("act(...) is not supported in production builds of React.")}Ce.Children={map:ml,forEach:function(e,t,n){ml(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ml(e,function(){t++}),t},toArray:function(e){return ml(e,function(t){return t})||[]},only:function(e){if(!ph(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Ce.Component=ko;Ce.Fragment=qC;Ce.Profiler=YC;Ce.PureComponent=uh;Ce.StrictMode=GC;Ce.Suspense=ZC;Ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=s2;Ce.act=Xx;Ce.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=Wx({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=fh.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Yx.call(t,l)&&!Qx.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:Ja,type:e.type,key:i,ref:s,props:r,_owner:o}};Ce.createContext=function(e){return e={$$typeof:KC,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:QC,_context:e},e.Consumer=e};Ce.createElement=Kx;Ce.createFactory=function(e){var t=Kx.bind(null,e);return t.type=e,t};Ce.createRef=function(){return{current:null}};Ce.forwardRef=function(e){return{$$typeof:XC,render:e}};Ce.isValidElement=ph;Ce.lazy=function(e){return{$$typeof:e2,_payload:{_status:-1,_result:e},_init:i2}};Ce.memo=function(e,t){return{$$typeof:JC,type:e,compare:t===void 0?null:t}};Ce.startTransition=function(e){var t=ql.transition;ql.transition={};try{e()}finally{ql.transition=t}};Ce.unstable_act=Xx;Ce.useCallback=function(e,t){return Lt.current.useCallback(e,t)};Ce.useContext=function(e){return Lt.current.useContext(e)};Ce.useDebugValue=function(){};Ce.useDeferredValue=function(e){return Lt.current.useDeferredValue(e)};Ce.useEffect=function(e,t){return Lt.current.useEffect(e,t)};Ce.useId=function(){return Lt.current.useId()};Ce.useImperativeHandle=function(e,t,n){return Lt.current.useImperativeHandle(e,t,n)};Ce.useInsertionEffect=function(e,t){return Lt.current.useInsertionEffect(e,t)};Ce.useLayoutEffect=function(e,t){return Lt.current.useLayoutEffect(e,t)};Ce.useMemo=function(e,t){return Lt.current.useMemo(e,t)};Ce.useReducer=function(e,t,n){return Lt.current.useReducer(e,t,n)};Ce.useRef=function(e){return Lt.current.useRef(e)};Ce.useState=function(e){return Lt.current.useState(e)};Ce.useSyncExternalStore=function(e,t,n){return Lt.current.useSyncExternalStore(e,t,n)};Ce.useTransition=function(){return Lt.current.useTransition()};Ce.version="18.3.1";Ux.exports=Ce;var v=Ux.exports;const J=Rr(v),o2=HC({__proto__:null,default:J},[v]);/**
9
+ */var rl=Symbol.for("react.element"),n2=Symbol.for("react.portal"),r2=Symbol.for("react.fragment"),i2=Symbol.for("react.strict_mode"),s2=Symbol.for("react.profiler"),o2=Symbol.for("react.provider"),a2=Symbol.for("react.context"),l2=Symbol.for("react.forward_ref"),c2=Symbol.for("react.suspense"),u2=Symbol.for("react.memo"),d2=Symbol.for("react.lazy"),Rg=Symbol.iterator;function f2(e){return e===null||typeof e!="object"?null:(e=Rg&&e[Rg]||e["@@iterator"],typeof e=="function"?e:null)}var t1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},n1=Object.assign,r1={};function To(e,t,n){this.props=e,this.context=t,this.refs=r1,this.updater=n||t1}To.prototype.isReactComponent={};To.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")};To.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function i1(){}i1.prototype=To.prototype;function gh(e,t,n){this.props=e,this.context=t,this.refs=r1,this.updater=n||t1}var vh=gh.prototype=new i1;vh.constructor=gh;n1(vh,To.prototype);vh.isPureReactComponent=!0;var Pg=Array.isArray,s1=Object.prototype.hasOwnProperty,yh={current:null},o1={key:!0,ref:!0,__self:!0,__source:!0};function a1(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)s1.call(t,r)&&!o1.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:rl,type:e,key:s,ref:o,props:i,_owner:yh.current}}function p2(e,t){return{$$typeof:rl,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function xh(e){return typeof e=="object"&&e!==null&&e.$$typeof===rl}function h2(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Mg=/\/+/g;function id(e,t){return typeof e=="object"&&e!==null&&e.key!=null?h2(""+e.key):t.toString(36)}function Ql(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 rl:case n2:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+id(o,0):r,Pg(i)?(n="",e!=null&&(n=e.replace(Mg,"$&/")+"/"),Ql(i,t,n,"",function(c){return c})):i!=null&&(xh(i)&&(i=p2(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Mg,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",Pg(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+id(s,a);o+=Ql(s,t,n,l,i)}else if(l=f2(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+id(s,a++),o+=Ql(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 xl(e,t,n){if(e==null)return e;var r=[],i=0;return Ql(e,r,"","",function(s){return t.call(n,s,i++)}),r}function m2(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 Lt={current:null},Kl={transition:null},g2={ReactCurrentDispatcher:Lt,ReactCurrentBatchConfig:Kl,ReactCurrentOwner:yh};function l1(){throw Error("act(...) is not supported in production builds of React.")}Ce.Children={map:xl,forEach:function(e,t,n){xl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return xl(e,function(){t++}),t},toArray:function(e){return xl(e,function(t){return t})||[]},only:function(e){if(!xh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Ce.Component=To;Ce.Fragment=r2;Ce.Profiler=s2;Ce.PureComponent=gh;Ce.StrictMode=i2;Ce.Suspense=c2;Ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=g2;Ce.act=l1;Ce.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=n1({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=yh.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)s1.call(t,l)&&!o1.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:rl,type:e.type,key:i,ref:s,props:r,_owner:o}};Ce.createContext=function(e){return e={$$typeof:a2,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:o2,_context:e},e.Consumer=e};Ce.createElement=a1;Ce.createFactory=function(e){var t=a1.bind(null,e);return t.type=e,t};Ce.createRef=function(){return{current:null}};Ce.forwardRef=function(e){return{$$typeof:l2,render:e}};Ce.isValidElement=xh;Ce.lazy=function(e){return{$$typeof:d2,_payload:{_status:-1,_result:e},_init:m2}};Ce.memo=function(e,t){return{$$typeof:u2,type:e,compare:t===void 0?null:t}};Ce.startTransition=function(e){var t=Kl.transition;Kl.transition={};try{e()}finally{Kl.transition=t}};Ce.unstable_act=l1;Ce.useCallback=function(e,t){return Lt.current.useCallback(e,t)};Ce.useContext=function(e){return Lt.current.useContext(e)};Ce.useDebugValue=function(){};Ce.useDeferredValue=function(e){return Lt.current.useDeferredValue(e)};Ce.useEffect=function(e,t){return Lt.current.useEffect(e,t)};Ce.useId=function(){return Lt.current.useId()};Ce.useImperativeHandle=function(e,t,n){return Lt.current.useImperativeHandle(e,t,n)};Ce.useInsertionEffect=function(e,t){return Lt.current.useInsertionEffect(e,t)};Ce.useLayoutEffect=function(e,t){return Lt.current.useLayoutEffect(e,t)};Ce.useMemo=function(e,t){return Lt.current.useMemo(e,t)};Ce.useReducer=function(e,t,n){return Lt.current.useReducer(e,t,n)};Ce.useRef=function(e){return Lt.current.useRef(e)};Ce.useState=function(e){return Lt.current.useState(e)};Ce.useSyncExternalStore=function(e,t,n){return Lt.current.useSyncExternalStore(e,t,n)};Ce.useTransition=function(){return Lt.current.useTransition()};Ce.version="18.3.1";e1.exports=Ce;var g=e1.exports;const ee=Pr(g),v2=t2({__proto__:null,default:ee},[g]);/**
10
10
  * @license React
11
11
  * react-jsx-runtime.production.min.js
12
12
  *
@@ -14,7 +14,7 @@ var kg=e=>{throw TypeError(e)};var UC=(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 a2=v,l2=Symbol.for("react.element"),c2=Symbol.for("react.fragment"),u2=Object.prototype.hasOwnProperty,d2=a2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f2={key:!0,ref:!0,__self:!0,__source:!0};function Zx(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)u2.call(t,r)&&!f2.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:l2,type:e,key:s,ref:o,props:i,_owner:d2.current}}iu.Fragment=c2;iu.jsx=Zx;iu.jsxs=Zx;Vx.exports=iu;var f=Vx.exports,Jx={exports:{}},ln={},e1={exports:{}},t1={};/**
17
+ */var y2=g,x2=Symbol.for("react.element"),w2=Symbol.for("react.fragment"),b2=Object.prototype.hasOwnProperty,k2=y2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,S2={key:!0,ref:!0,__self:!0,__source:!0};function c1(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)b2.call(t,r)&&!S2.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:x2,type:e,key:s,ref:o,props:i,_owner:k2.current}}lu.Fragment=w2;lu.jsx=c1;lu.jsxs=c1;Jx.exports=lu;var f=Jx.exports,u1={exports:{}},ln={},d1={exports:{}},f1={};/**
18
18
  * @license React
19
19
  * scheduler.production.min.js
20
20
  *
@@ -22,7 +22,7 @@ var kg=e=>{throw TypeError(e)};var UC=(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(P,B){var U=P.length;P.push(B);e:for(;0<U;){var W=U-1>>>1,q=P[W];if(0<i(q,B))P[W]=B,P[U]=q,U=W;else break e}}function n(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var B=P[0],U=P.pop();if(U!==B){P[0]=U;e:for(var W=0,q=P.length,se=q>>>1;W<se;){var ie=2*(W+1)-1,pe=P[ie],ce=ie+1,_e=P[ce];if(0>i(pe,U))ce<q&&0>i(_e,pe)?(P[W]=_e,P[ce]=U,W=ce):(P[W]=pe,P[ie]=U,W=ie);else if(ce<q&&0>i(_e,U))P[W]=_e,P[ce]=U,W=ce;else break e}}return B}function i(P,B){var U=P.sortIndex-B.sortIndex;return U!==0?U:P.id-B.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,p=3,h=!1,y=!1,x=!1,w=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(P){for(var B=n(c);B!==null;){if(B.callback===null)r(c);else if(B.startTime<=P)r(c),B.sortIndex=B.expirationTime,t(l,B);else break;B=n(c)}}function C(P){if(x=!1,b(P),!y)if(n(l)!==null)y=!0,N(S);else{var B=n(c);B!==null&&M(C,B.startTime-P)}}function S(P,B){y=!1,x&&(x=!1,m(A),A=-1),h=!0;var U=p;try{for(b(B),u=n(l);u!==null&&(!(u.expirationTime>B)||P&&!F());){var W=u.callback;if(typeof W=="function"){u.callback=null,p=u.priorityLevel;var q=W(u.expirationTime<=B);B=e.unstable_now(),typeof q=="function"?u.callback=q:u===n(l)&&r(l),b(B)}else r(l);u=n(l)}if(u!==null)var se=!0;else{var ie=n(c);ie!==null&&M(C,ie.startTime-B),se=!1}return se}finally{u=null,p=U,h=!1}}var _=!1,j=null,A=-1,E=5,L=-1;function F(){return!(e.unstable_now()-L<E)}function D(){if(j!==null){var P=e.unstable_now();L=P;var B=!0;try{B=j(!0,P)}finally{B?G():(_=!1,j=null)}}else _=!1}var G;if(typeof g=="function")G=function(){g(D)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,$=z.port2;z.port1.onmessage=D,G=function(){$.postMessage(null)}}else G=function(){w(D,0)};function N(P){j=P,_||(_=!0,G())}function M(P,B){A=w(function(){P(e.unstable_now())},B)}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(P){P.callback=null},e.unstable_continueExecution=function(){y||h||(y=!0,N(S))},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(P){switch(p){case 1:case 2:case 3:var B=3;break;default:B=p}var U=p;p=B;try{return P()}finally{p=U}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(P,B){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var U=p;p=P;try{return B()}finally{p=U}},e.unstable_scheduleCallback=function(P,B,U){var W=e.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?W+U:W):U=W,P){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=U+q,P={id:d++,callback:B,priorityLevel:P,startTime:U,expirationTime:q,sortIndex:-1},U>W?(P.sortIndex=U,t(c,P),n(l)===null&&P===n(c)&&(x?(m(A),A=-1):x=!0,M(C,U-W))):(P.sortIndex=q,t(l,P),y||h||(y=!0,N(S))),P},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(P){var B=p;return function(){var U=p;p=B;try{return P.apply(this,arguments)}finally{p=U}}}})(t1);e1.exports=t1;var p2=e1.exports;/**
25
+ */(function(e){function t(R,z){var H=R.length;R.push(z);e:for(;0<H;){var W=H-1>>>1,G=R[W];if(0<i(G,z))R[W]=z,R[H]=G,H=W;else break e}}function n(R){return R.length===0?null:R[0]}function r(R){if(R.length===0)return null;var z=R[0],H=R.pop();if(H!==z){R[0]=H;e:for(var W=0,G=R.length,te=G>>>1;W<te;){var se=2*(W+1)-1,pe=R[se],ue=se+1,ke=R[ue];if(0>i(pe,H))ue<G&&0>i(ke,pe)?(R[W]=ke,R[ue]=H,W=ue):(R[W]=pe,R[se]=H,W=se);else if(ue<G&&0>i(ke,H))R[W]=ke,R[ue]=H,W=ue;else break e}}return z}function i(R,z){var H=R.sortIndex-z.sortIndex;return H!==0?H:R.id-z.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,p=3,h=!1,y=!1,w=!1,b=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(R){for(var z=n(c);z!==null;){if(z.callback===null)r(c);else if(z.startTime<=R)r(c),z.sortIndex=z.expirationTime,t(l,z);else break;z=n(c)}}function S(R){if(w=!1,x(R),!y)if(n(l)!==null)y=!0,I(C);else{var z=n(c);z!==null&&N(S,z.startTime-R)}}function C(R,z){y=!1,w&&(w=!1,m(A),A=-1),h=!0;var H=p;try{for(x(z),u=n(l);u!==null&&(!(u.expirationTime>z)||R&&!L());){var W=u.callback;if(typeof W=="function"){u.callback=null,p=u.priorityLevel;var G=W(u.expirationTime<=z);z=e.unstable_now(),typeof G=="function"?u.callback=G:u===n(l)&&r(l),x(z)}else r(l);u=n(l)}if(u!==null)var te=!0;else{var se=n(c);se!==null&&N(S,se.startTime-z),te=!1}return te}finally{u=null,p=H,h=!1}}var _=!1,j=null,A=-1,E=5,D=-1;function L(){return!(e.unstable_now()-D<E)}function O(){if(j!==null){var R=e.unstable_now();D=R;var z=!0;try{z=j(!0,R)}finally{z?q():(_=!1,j=null)}}else _=!1}var q;if(typeof v=="function")q=function(){v(O)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,B=$.port2;$.port1.onmessage=O,q=function(){B.postMessage(null)}}else q=function(){b(O,0)};function I(R){j=R,_||(_=!0,q())}function N(R,z){A=b(function(){R(e.unstable_now())},z)}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(R){R.callback=null},e.unstable_continueExecution=function(){y||h||(y=!0,I(C))},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(R){switch(p){case 1:case 2:case 3:var z=3;break;default:z=p}var H=p;p=z;try{return R()}finally{p=H}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(R,z){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var H=p;p=R;try{return z()}finally{p=H}},e.unstable_scheduleCallback=function(R,z,H){var W=e.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?W+H:W):H=W,R){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=H+G,R={id:d++,callback:z,priorityLevel:R,startTime:H,expirationTime:G,sortIndex:-1},H>W?(R.sortIndex=H,t(c,R),n(l)===null&&R===n(c)&&(w?(m(A),A=-1):w=!0,N(S,H-W))):(R.sortIndex=G,t(l,R),y||h||(y=!0,I(C))),R},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(R){var z=p;return function(){var H=p;p=z;try{return R.apply(this,arguments)}finally{p=H}}}})(f1);d1.exports=f1;var C2=d1.exports;/**
26
26
  * @license React
27
27
  * react-dom.production.min.js
28
28
  *
@@ -30,14 +30,14 @@ var kg=e=>{throw TypeError(e)};var UC=(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 h2=v,an=p2;function Q(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 n1=new Set,va={};function ss(e,t){oo(e,t),oo(e+"Capture",t)}function oo(e,t){for(va[e]=t,e=0;e<t.length;e++)n1.add(t[e])}var Cr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),lf=Object.prototype.hasOwnProperty,m2=/^[: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]*$/,Tg={},Eg={};function g2(e){return lf.call(Eg,e)?!0:lf.call(Tg,e)?!1:m2.test(e)?Eg[e]=!0:(Tg[e]=!0,!1)}function v2(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 y2(e,t,n,r){if(t===null||typeof t>"u"||v2(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ft(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var kt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){kt[e]=new Ft(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];kt[t]=new Ft(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){kt[e]=new Ft(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){kt[e]=new Ft(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){kt[e]=new Ft(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){kt[e]=new Ft(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){kt[e]=new Ft(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){kt[e]=new Ft(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){kt[e]=new Ft(e,5,!1,e.toLowerCase(),null,!1,!1)});var hh=/[\-:]([a-z])/g;function mh(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(hh,mh);kt[t]=new Ft(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(hh,mh);kt[t]=new Ft(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(hh,mh);kt[t]=new Ft(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){kt[e]=new Ft(e,1,!1,e.toLowerCase(),null,!1,!1)});kt.xlinkHref=new Ft("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){kt[e]=new Ft(e,1,!1,e.toLowerCase(),null,!0,!0)});function gh(e,t,n,r){var i=kt.hasOwnProperty(t)?kt[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(y2(t,n,i,r)&&(n=null),r||i===null?g2(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 Pr=h2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,gl=Symbol.for("react.element"),ks=Symbol.for("react.portal"),Ss=Symbol.for("react.fragment"),vh=Symbol.for("react.strict_mode"),cf=Symbol.for("react.profiler"),r1=Symbol.for("react.provider"),i1=Symbol.for("react.context"),yh=Symbol.for("react.forward_ref"),uf=Symbol.for("react.suspense"),df=Symbol.for("react.suspense_list"),xh=Symbol.for("react.memo"),Fr=Symbol.for("react.lazy"),s1=Symbol.for("react.offscreen"),Ag=Symbol.iterator;function Oo(e){return e===null||typeof e!="object"?null:(e=Ag&&e[Ag]||e["@@iterator"],typeof e=="function"?e:null)}var Xe=Object.assign,td;function Wo(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 _2=g,an=C2;function X(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 p1=new Set,ba={};function os(e,t){uo(e,t),uo(e+"Capture",t)}function uo(e,t){for(ba[e]=t,e=0;e<t.length;e++)p1.add(t[e])}var Cr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pf=Object.prototype.hasOwnProperty,T2=/^[: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]*$/,Ng={},Og={};function E2(e){return pf.call(Og,e)?!0:pf.call(Ng,e)?!1:T2.test(e)?Og[e]=!0:(Ng[e]=!0,!1)}function A2(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 j2(e,t,n,r){if(t===null||typeof t>"u"||A2(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ft(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var kt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){kt[e]=new Ft(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];kt[t]=new Ft(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){kt[e]=new Ft(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){kt[e]=new Ft(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){kt[e]=new Ft(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){kt[e]=new Ft(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){kt[e]=new Ft(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){kt[e]=new Ft(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){kt[e]=new Ft(e,5,!1,e.toLowerCase(),null,!1,!1)});var wh=/[\-:]([a-z])/g;function bh(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(wh,bh);kt[t]=new Ft(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(wh,bh);kt[t]=new Ft(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(wh,bh);kt[t]=new Ft(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){kt[e]=new Ft(e,1,!1,e.toLowerCase(),null,!1,!1)});kt.xlinkHref=new Ft("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){kt[e]=new Ft(e,1,!1,e.toLowerCase(),null,!0,!0)});function kh(e,t,n,r){var i=kt.hasOwnProperty(t)?kt[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(j2(t,n,i,r)&&(n=null),r||i===null?E2(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=_2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,wl=Symbol.for("react.element"),Ss=Symbol.for("react.portal"),Cs=Symbol.for("react.fragment"),Sh=Symbol.for("react.strict_mode"),hf=Symbol.for("react.profiler"),h1=Symbol.for("react.provider"),m1=Symbol.for("react.context"),Ch=Symbol.for("react.forward_ref"),mf=Symbol.for("react.suspense"),gf=Symbol.for("react.suspense_list"),_h=Symbol.for("react.memo"),$r=Symbol.for("react.lazy"),g1=Symbol.for("react.offscreen"),Dg=Symbol.iterator;function Lo(e){return e===null||typeof e!="object"?null:(e=Dg&&e[Dg]||e["@@iterator"],typeof e=="function"?e:null)}var Ke=Object.assign,sd;function Qo(e){if(sd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);sd=t&&t[1]||""}return`
34
+ `+sd+e}var od=!1;function ad(e,t){if(!e||od)return"";od=!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(`
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:"")?Wo(e):""}function x2(e){switch(e.tag){case 5:return Wo(e.type);case 16:return Wo("Lazy");case 13:return Wo("Suspense");case 19:return Wo("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 ff(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 Ss:return"Fragment";case ks:return"Portal";case cf:return"Profiler";case vh:return"StrictMode";case uf:return"Suspense";case df:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case i1:return(e.displayName||"Context")+".Consumer";case r1:return(e._context.displayName||"Context")+".Provider";case yh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case xh:return t=e.displayName||null,t!==null?t:ff(e.type)||"Memo";case Fr:t=e._payload,e=e._init;try{return ff(e(t))}catch{}}return null}function w2(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 ff(t);case 8:return t===vh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function di(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function o1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function b2(e){var t=o1(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 vl(e){e._valueTracker||(e._valueTracker=b2(e))}function a1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=o1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function hc(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 pf(e,t){var n=t.checked;return Xe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function jg(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=di(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 l1(e,t){t=t.checked,t!=null&&gh(e,"checked",t,!1)}function hf(e,t){l1(e,t);var n=di(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")?mf(e,t.type,n):t.hasOwnProperty("defaultValue")&&mf(e,t.type,di(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Rg(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 mf(e,t,n){(t!=="number"||hc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var qo=Array.isArray;function $s(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=""+di(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 gf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Q(91));return Xe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Pg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Q(92));if(qo(n)){if(1<n.length)throw Error(Q(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:di(n)}}function c1(e,t){var n=di(t.value),r=di(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 u1(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function vf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?u1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var yl,d1=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(yl=yl||document.createElement("div"),yl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=yl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ya(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ea={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},k2=["Webkit","ms","Moz","O"];Object.keys(ea).forEach(function(e){k2.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ea[t]=ea[e]})});function f1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ea.hasOwnProperty(e)&&ea[e]?(""+t).trim():t+"px"}function p1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=f1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var S2=Xe({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 yf(e,t){if(t){if(S2[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Q(62))}}function xf(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 wf=null;function wh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bf=null,zs=null,Vs=null;function Og(e){if(e=nl(e)){if(typeof bf!="function")throw Error(Q(280));var t=e.stateNode;t&&(t=cu(t),bf(e.stateNode,e.type,t))}}function h1(e){zs?Vs?Vs.push(e):Vs=[e]:zs=e}function m1(){if(zs){var e=zs,t=Vs;if(Vs=zs=null,Og(e),t)for(e=0;e<t.length;e++)Og(t[e])}}function g1(e,t){return e(t)}function v1(){}var id=!1;function y1(e,t,n){if(id)return e(t,n);id=!0;try{return g1(e,t,n)}finally{id=!1,(zs!==null||Vs!==null)&&(v1(),m1())}}function xa(e,t){var n=e.stateNode;if(n===null)return null;var r=cu(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(Q(231,t,typeof n));return n}var kf=!1;if(Cr)try{var No={};Object.defineProperty(No,"passive",{get:function(){kf=!0}}),window.addEventListener("test",No,No),window.removeEventListener("test",No,No)}catch{kf=!1}function C2(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 ta=!1,mc=null,gc=!1,Sf=null,_2={onError:function(e){ta=!0,mc=e}};function T2(e,t,n,r,i,s,o,a,l){ta=!1,mc=null,C2.apply(_2,arguments)}function E2(e,t,n,r,i,s,o,a,l){if(T2.apply(this,arguments),ta){if(ta){var c=mc;ta=!1,mc=null}else throw Error(Q(198));gc||(gc=!0,Sf=c)}}function os(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 x1(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Ng(e){if(os(e)!==e)throw Error(Q(188))}function A2(e){var t=e.alternate;if(!t){if(t=os(e),t===null)throw Error(Q(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return Ng(i),e;if(s===r)return Ng(i),t;s=s.sibling}throw Error(Q(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(Q(189))}}if(n.alternate!==r)throw Error(Q(190))}if(n.tag!==3)throw Error(Q(188));return n.stateNode.current===n?e:t}function w1(e){return e=A2(e),e!==null?b1(e):null}function b1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=b1(e);if(t!==null)return t;e=e.sibling}return null}var k1=an.unstable_scheduleCallback,Dg=an.unstable_cancelCallback,j2=an.unstable_shouldYield,R2=an.unstable_requestPaint,it=an.unstable_now,P2=an.unstable_getCurrentPriorityLevel,bh=an.unstable_ImmediatePriority,S1=an.unstable_UserBlockingPriority,vc=an.unstable_NormalPriority,M2=an.unstable_LowPriority,C1=an.unstable_IdlePriority,su=null,tr=null;function O2(e){if(tr&&typeof tr.onCommitFiberRoot=="function")try{tr.onCommitFiberRoot(su,e,void 0,(e.current.flags&128)===128)}catch{}}var Bn=Math.clz32?Math.clz32:I2,N2=Math.log,D2=Math.LN2;function I2(e){return e>>>=0,e===0?32:31-(N2(e)/D2|0)|0}var xl=64,wl=4194304;function Go(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function yc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=Go(a):(s&=o,s!==0&&(r=Go(s)))}else o=n&~i,o!==0?r=Go(o):s!==0&&(r=Go(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Bn(t),i=1<<n,r|=e[n],t&=~i;return r}function L2(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 F2(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-Bn(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=L2(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function Cf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function _1(){var e=xl;return xl<<=1,!(xl&4194240)&&(xl=64),e}function sd(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function el(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Bn(t),e[t]=n}function B2(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-Bn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function kh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Bn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Pe=0;function T1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var E1,Sh,A1,j1,R1,_f=!1,bl=[],ti=null,ni=null,ri=null,wa=new Map,ba=new Map,zr=[],$2="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ig(e,t){switch(e){case"focusin":case"focusout":ti=null;break;case"dragenter":case"dragleave":ni=null;break;case"mouseover":case"mouseout":ri=null;break;case"pointerover":case"pointerout":wa.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ba.delete(t.pointerId)}}function Do(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=nl(t),t!==null&&Sh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function z2(e,t,n,r,i){switch(t){case"focusin":return ti=Do(ti,e,t,n,r,i),!0;case"dragenter":return ni=Do(ni,e,t,n,r,i),!0;case"mouseover":return ri=Do(ri,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return wa.set(s,Do(wa.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,ba.set(s,Do(ba.get(s)||null,e,t,n,r,i)),!0}return!1}function P1(e){var t=Pi(e.target);if(t!==null){var n=os(t);if(n!==null){if(t=n.tag,t===13){if(t=x1(n),t!==null){e.blockedOn=t,R1(e.priority,function(){A1(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Gl(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);wf=r,n.target.dispatchEvent(r),wf=null}else return t=nl(n),t!==null&&Sh(t),e.blockedOn=n,!1;t.shift()}return!0}function Lg(e,t,n){Gl(e)&&n.delete(t)}function V2(){_f=!1,ti!==null&&Gl(ti)&&(ti=null),ni!==null&&Gl(ni)&&(ni=null),ri!==null&&Gl(ri)&&(ri=null),wa.forEach(Lg),ba.forEach(Lg)}function Io(e,t){e.blockedOn===t&&(e.blockedOn=null,_f||(_f=!0,an.unstable_scheduleCallback(an.unstable_NormalPriority,V2)))}function ka(e){function t(i){return Io(i,e)}if(0<bl.length){Io(bl[0],e);for(var n=1;n<bl.length;n++){var r=bl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(ti!==null&&Io(ti,e),ni!==null&&Io(ni,e),ri!==null&&Io(ri,e),wa.forEach(t),ba.forEach(t),n=0;n<zr.length;n++)r=zr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<zr.length&&(n=zr[0],n.blockedOn===null);)P1(n),n.blockedOn===null&&zr.shift()}var Us=Pr.ReactCurrentBatchConfig,xc=!0;function U2(e,t,n,r){var i=Pe,s=Us.transition;Us.transition=null;try{Pe=1,Ch(e,t,n,r)}finally{Pe=i,Us.transition=s}}function H2(e,t,n,r){var i=Pe,s=Us.transition;Us.transition=null;try{Pe=4,Ch(e,t,n,r)}finally{Pe=i,Us.transition=s}}function Ch(e,t,n,r){if(xc){var i=Tf(e,t,n,r);if(i===null)md(e,t,r,wc,n),Ig(e,r);else if(z2(i,e,t,n,r))r.stopPropagation();else if(Ig(e,r),t&4&&-1<$2.indexOf(e)){for(;i!==null;){var s=nl(i);if(s!==null&&E1(s),s=Tf(e,t,n,r),s===null&&md(e,t,r,wc,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else md(e,t,r,null,n)}}var wc=null;function Tf(e,t,n,r){if(wc=null,e=wh(r),e=Pi(e),e!==null)if(t=os(e),t===null)e=null;else if(n=t.tag,n===13){if(e=x1(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 wc=e,null}function M1(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(P2()){case bh:return 1;case S1:return 4;case vc:case M2:return 16;case C1:return 536870912;default:return 16}default:return 16}}var Zr=null,_h=null,Yl=null;function O1(){if(Yl)return Yl;var e,t=_h,n=t.length,r,i="value"in Zr?Zr.value:Zr.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 Yl=i.slice(e,1<r?1-r:void 0)}function Ql(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 kl(){return!0}function Fg(){return!1}function cn(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)?kl:Fg,this.isPropagationStopped=Fg,this}return Xe(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=kl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=kl)},persist:function(){},isPersistent:kl}),t}var So={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Th=cn(So),tl=Xe({},So,{view:0,detail:0}),W2=cn(tl),od,ad,Lo,ou=Xe({},tl,{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!==Lo&&(Lo&&e.type==="mousemove"?(od=e.screenX-Lo.screenX,ad=e.screenY-Lo.screenY):ad=od=0,Lo=e),od)},movementY:function(e){return"movementY"in e?e.movementY:ad}}),Bg=cn(ou),q2=Xe({},ou,{dataTransfer:0}),G2=cn(q2),Y2=Xe({},tl,{relatedTarget:0}),ld=cn(Y2),Q2=Xe({},So,{animationName:0,elapsedTime:0,pseudoElement:0}),K2=cn(Q2),X2=Xe({},So,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Z2=cn(X2),J2=Xe({},So,{data:0}),$g=cn(J2),e_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},t_={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"},n_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function r_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=n_[e])?!!t[e]:!1}function Eh(){return r_}var i_=Xe({},tl,{key:function(e){if(e.key){var t=e_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ql(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?t_[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"?Ql(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ql(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),s_=cn(i_),o_=Xe({},ou,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zg=cn(o_),a_=Xe({},tl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Eh}),l_=cn(a_),c_=Xe({},So,{propertyName:0,elapsedTime:0,pseudoElement:0}),u_=cn(c_),d_=Xe({},ou,{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}),f_=cn(d_),p_=[9,13,27,32],Ah=Cr&&"CompositionEvent"in window,na=null;Cr&&"documentMode"in document&&(na=document.documentMode);var h_=Cr&&"TextEvent"in window&&!na,N1=Cr&&(!Ah||na&&8<na&&11>=na),Vg=" ",Ug=!1;function D1(e,t){switch(e){case"keyup":return p_.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function I1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Cs=!1;function m_(e,t){switch(e){case"compositionend":return I1(t);case"keypress":return t.which!==32?null:(Ug=!0,Vg);case"textInput":return e=t.data,e===Vg&&Ug?null:e;default:return null}}function g_(e,t){if(Cs)return e==="compositionend"||!Ah&&D1(e,t)?(e=O1(),Yl=_h=Zr=null,Cs=!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 N1&&t.locale!=="ko"?null:t.data;default:return null}}var v_={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!v_[e.type]:t==="textarea"}function L1(e,t,n,r){h1(r),t=bc(t,"onChange"),0<t.length&&(n=new Th("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ra=null,Sa=null;function y_(e){Y1(e,0)}function au(e){var t=Es(e);if(a1(t))return e}function x_(e,t){if(e==="change")return t}var F1=!1;if(Cr){var cd;if(Cr){var ud="oninput"in document;if(!ud){var Wg=document.createElement("div");Wg.setAttribute("oninput","return;"),ud=typeof Wg.oninput=="function"}cd=ud}else cd=!1;F1=cd&&(!document.documentMode||9<document.documentMode)}function qg(){ra&&(ra.detachEvent("onpropertychange",B1),Sa=ra=null)}function B1(e){if(e.propertyName==="value"&&au(Sa)){var t=[];L1(t,Sa,e,wh(e)),y1(y_,t)}}function w_(e,t,n){e==="focusin"?(qg(),ra=t,Sa=n,ra.attachEvent("onpropertychange",B1)):e==="focusout"&&qg()}function b_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return au(Sa)}function k_(e,t){if(e==="click")return au(t)}function S_(e,t){if(e==="input"||e==="change")return au(t)}function C_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Vn=typeof Object.is=="function"?Object.is:C_;function Ca(e,t){if(Vn(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(!lf.call(t,i)||!Vn(e[i],t[i]))return!1}return!0}function Gg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Yg(e,t){var n=Gg(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Gg(n)}}function $1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?$1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function z1(){for(var e=window,t=hc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=hc(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 __(e){var t=z1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&$1(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=Yg(n,s);var o=Yg(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var T_=Cr&&"documentMode"in document&&11>=document.documentMode,_s=null,Ef=null,ia=null,Af=!1;function Qg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Af||_s==null||_s!==hc(r)||(r=_s,"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}),ia&&Ca(ia,r)||(ia=r,r=bc(Ef,"onSelect"),0<r.length&&(t=new Th("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=_s)))}function Sl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ts={animationend:Sl("Animation","AnimationEnd"),animationiteration:Sl("Animation","AnimationIteration"),animationstart:Sl("Animation","AnimationStart"),transitionend:Sl("Transition","TransitionEnd")},dd={},V1={};Cr&&(V1=document.createElement("div").style,"AnimationEvent"in window||(delete Ts.animationend.animation,delete Ts.animationiteration.animation,delete Ts.animationstart.animation),"TransitionEvent"in window||delete Ts.transitionend.transition);function lu(e){if(dd[e])return dd[e];if(!Ts[e])return e;var t=Ts[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in V1)return dd[e]=t[n];return e}var U1=lu("animationend"),H1=lu("animationiteration"),W1=lu("animationstart"),q1=lu("transitionend"),G1=new Map,Kg="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 vi(e,t){G1.set(e,t),ss(t,[e])}for(var fd=0;fd<Kg.length;fd++){var pd=Kg[fd],E_=pd.toLowerCase(),A_=pd[0].toUpperCase()+pd.slice(1);vi(E_,"on"+A_)}vi(U1,"onAnimationEnd");vi(H1,"onAnimationIteration");vi(W1,"onAnimationStart");vi("dblclick","onDoubleClick");vi("focusin","onFocus");vi("focusout","onBlur");vi(q1,"onTransitionEnd");oo("onMouseEnter",["mouseout","mouseover"]);oo("onMouseLeave",["mouseout","mouseover"]);oo("onPointerEnter",["pointerout","pointerover"]);oo("onPointerLeave",["pointerout","pointerover"]);ss("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ss("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ss("onBeforeInput",["compositionend","keypress","textInput","paste"]);ss("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ss("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ss("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Yo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),j_=new Set("cancel close invalid load scroll toggle".split(" ").concat(Yo));function Xg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,E2(r,t,void 0,e),e.currentTarget=null}function Y1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;Xg(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;Xg(i,a,c),s=l}}}if(gc)throw e=Sf,gc=!1,Sf=null,e}function Be(e,t){var n=t[Of];n===void 0&&(n=t[Of]=new Set);var r=e+"__bubble";n.has(r)||(Q1(t,e,2,!1),n.add(r))}function hd(e,t,n){var r=0;t&&(r|=4),Q1(n,e,r,t)}var Cl="_reactListening"+Math.random().toString(36).slice(2);function _a(e){if(!e[Cl]){e[Cl]=!0,n1.forEach(function(n){n!=="selectionchange"&&(j_.has(n)||hd(n,!1,e),hd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Cl]||(t[Cl]=!0,hd("selectionchange",!1,t))}}function Q1(e,t,n,r){switch(M1(t)){case 1:var i=U2;break;case 4:i=H2;break;default:i=Ch}n=i.bind(null,t,n,e),i=void 0,!kf||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=Pi(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}y1(function(){var c=s,d=wh(n),u=[];e:{var p=G1.get(e);if(p!==void 0){var h=Th,y=e;switch(e){case"keypress":if(Ql(n)===0)break e;case"keydown":case"keyup":h=s_;break;case"focusin":y="focus",h=ld;break;case"focusout":y="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=Bg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=G2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=l_;break;case U1:case H1:case W1:h=K2;break;case q1:h=u_;break;case"scroll":h=W2;break;case"wheel":h=f_;break;case"copy":case"cut":case"paste":h=Z2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=zg}var x=(t&4)!==0,w=!x&&e==="scroll",m=x?p!==null?p+"Capture":null:p;x=[];for(var g=c,b;g!==null;){b=g;var C=b.stateNode;if(b.tag===5&&C!==null&&(b=C,m!==null&&(C=xa(g,m),C!=null&&x.push(Ta(g,C,b)))),w)break;g=g.return}0<x.length&&(p=new h(p,y,null,n,d),u.push({event:p,listeners:x}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",p&&n!==wf&&(y=n.relatedTarget||n.fromElement)&&(Pi(y)||y[_r]))break e;if((h||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,h?(y=n.relatedTarget||n.toElement,h=c,y=y?Pi(y):null,y!==null&&(w=os(y),y!==w||y.tag!==5&&y.tag!==6)&&(y=null)):(h=null,y=c),h!==y)){if(x=Bg,C="onMouseLeave",m="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(x=zg,C="onPointerLeave",m="onPointerEnter",g="pointer"),w=h==null?p:Es(h),b=y==null?p:Es(y),p=new x(C,g+"leave",h,n,d),p.target=w,p.relatedTarget=b,C=null,Pi(d)===c&&(x=new x(m,g+"enter",y,n,d),x.target=b,x.relatedTarget=w,C=x),w=C,h&&y)t:{for(x=h,m=y,g=0,b=x;b;b=ws(b))g++;for(b=0,C=m;C;C=ws(C))b++;for(;0<g-b;)x=ws(x),g--;for(;0<b-g;)m=ws(m),b--;for(;g--;){if(x===m||m!==null&&x===m.alternate)break t;x=ws(x),m=ws(m)}x=null}else x=null;h!==null&&Zg(u,p,h,x,!1),y!==null&&w!==null&&Zg(u,w,y,x,!0)}}e:{if(p=c?Es(c):window,h=p.nodeName&&p.nodeName.toLowerCase(),h==="select"||h==="input"&&p.type==="file")var S=x_;else if(Hg(p))if(F1)S=S_;else{S=b_;var _=w_}else(h=p.nodeName)&&h.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(S=k_);if(S&&(S=S(e,c))){L1(u,S,n,d);break e}_&&_(e,p,c),e==="focusout"&&(_=p._wrapperState)&&_.controlled&&p.type==="number"&&mf(p,"number",p.value)}switch(_=c?Es(c):window,e){case"focusin":(Hg(_)||_.contentEditable==="true")&&(_s=_,Ef=c,ia=null);break;case"focusout":ia=Ef=_s=null;break;case"mousedown":Af=!0;break;case"contextmenu":case"mouseup":case"dragend":Af=!1,Qg(u,n,d);break;case"selectionchange":if(T_)break;case"keydown":case"keyup":Qg(u,n,d)}var j;if(Ah)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 Cs?D1(e,n)&&(A="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(A="onCompositionStart");A&&(N1&&n.locale!=="ko"&&(Cs||A!=="onCompositionStart"?A==="onCompositionEnd"&&Cs&&(j=O1()):(Zr=d,_h="value"in Zr?Zr.value:Zr.textContent,Cs=!0)),_=bc(c,A),0<_.length&&(A=new $g(A,e,null,n,d),u.push({event:A,listeners:_}),j?A.data=j:(j=I1(n),j!==null&&(A.data=j)))),(j=h_?m_(e,n):g_(e,n))&&(c=bc(c,"onBeforeInput"),0<c.length&&(d=new $g("onBeforeInput","beforeinput",null,n,d),u.push({event:d,listeners:c}),d.data=j))}Y1(u,t)})}function Ta(e,t,n){return{instance:e,listener:t,currentTarget:n}}function bc(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=xa(e,n),s!=null&&r.unshift(Ta(e,s,i)),s=xa(e,t),s!=null&&r.push(Ta(e,s,i))),e=e.return}return r}function ws(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Zg(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=xa(n,s),l!=null&&o.unshift(Ta(n,l,a))):i||(l=xa(n,s),l!=null&&o.push(Ta(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var R_=/\r\n?/g,P_=/\u0000|\uFFFD/g;function Jg(e){return(typeof e=="string"?e:""+e).replace(R_,`
38
- `).replace(P_,"")}function _l(e,t,n){if(t=Jg(t),Jg(e)!==t&&n)throw Error(Q(425))}function kc(){}var jf=null,Rf=null;function Pf(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 Mf=typeof setTimeout=="function"?setTimeout:void 0,M_=typeof clearTimeout=="function"?clearTimeout:void 0,ev=typeof Promise=="function"?Promise:void 0,O_=typeof queueMicrotask=="function"?queueMicrotask:typeof ev<"u"?function(e){return ev.resolve(null).then(e).catch(N_)}:Mf;function N_(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),ka(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);ka(t)}function ii(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 tv(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 Co=Math.random().toString(36).slice(2),er="__reactFiber$"+Co,Ea="__reactProps$"+Co,_r="__reactContainer$"+Co,Of="__reactEvents$"+Co,D_="__reactListeners$"+Co,I_="__reactHandles$"+Co;function Pi(e){var t=e[er];if(t)return t;for(var n=e.parentNode;n;){if(t=n[_r]||n[er]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=tv(e);e!==null;){if(n=e[er])return n;e=tv(e)}return t}e=n,n=e.parentNode}return null}function nl(e){return e=e[er]||e[_r],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Es(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Q(33))}function cu(e){return e[Ea]||null}var Nf=[],As=-1;function yi(e){return{current:e}}function ze(e){0>As||(e.current=Nf[As],Nf[As]=null,As--)}function Le(e,t){As++,Nf[As]=e.current,e.current=t}var fi={},Pt=yi(fi),Gt=yi(!1),Xi=fi;function ao(e,t){var n=e.type.contextTypes;if(!n)return fi;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 Yt(e){return e=e.childContextTypes,e!=null}function Sc(){ze(Gt),ze(Pt)}function nv(e,t,n){if(Pt.current!==fi)throw Error(Q(168));Le(Pt,t),Le(Gt,n)}function K1(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(Q(108,w2(e)||"Unknown",i));return Xe({},n,r)}function Cc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||fi,Xi=Pt.current,Le(Pt,e),Le(Gt,Gt.current),!0}function rv(e,t,n){var r=e.stateNode;if(!r)throw Error(Q(169));n?(e=K1(e,t,Xi),r.__reactInternalMemoizedMergedChildContext=e,ze(Gt),ze(Pt),Le(Pt,e)):ze(Gt),Le(Gt,n)}var vr=null,uu=!1,vd=!1;function X1(e){vr===null?vr=[e]:vr.push(e)}function L_(e){uu=!0,X1(e)}function xi(){if(!vd&&vr!==null){vd=!0;var e=0,t=Pe;try{var n=vr;for(Pe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}vr=null,uu=!1}catch(i){throw vr!==null&&(vr=vr.slice(e+1)),k1(bh,xi),i}finally{Pe=t,vd=!1}}return null}var js=[],Rs=0,_c=null,Tc=0,xn=[],wn=0,Zi=null,wr=1,br="";function Ti(e,t){js[Rs++]=Tc,js[Rs++]=_c,_c=e,Tc=t}function Z1(e,t,n){xn[wn++]=wr,xn[wn++]=br,xn[wn++]=Zi,Zi=e;var r=wr;e=br;var i=32-Bn(r)-1;r&=~(1<<i),n+=1;var s=32-Bn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,wr=1<<32-Bn(t)+i|n<<i|r,br=s+e}else wr=1<<s|n<<i|r,br=e}function Rh(e){e.return!==null&&(Ti(e,1),Z1(e,1,0))}function Ph(e){for(;e===_c;)_c=js[--Rs],js[Rs]=null,Tc=js[--Rs],js[Rs]=null;for(;e===Zi;)Zi=xn[--wn],xn[wn]=null,br=xn[--wn],xn[wn]=null,wr=xn[--wn],xn[wn]=null}var on=null,nn=null,We=!1,In=null;function J1(e,t){var n=kn(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 iv(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,on=e,nn=ii(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,on=e,nn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Zi!==null?{id:wr,overflow:br}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=kn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,on=e,nn=null,!0):!1;default:return!1}}function Df(e){return(e.mode&1)!==0&&(e.flags&128)===0}function If(e){if(We){var t=nn;if(t){var n=t;if(!iv(e,t)){if(Df(e))throw Error(Q(418));t=ii(n.nextSibling);var r=on;t&&iv(e,t)?J1(r,n):(e.flags=e.flags&-4097|2,We=!1,on=e)}}else{if(Df(e))throw Error(Q(418));e.flags=e.flags&-4097|2,We=!1,on=e}}}function sv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;on=e}function Tl(e){if(e!==on)return!1;if(!We)return sv(e),We=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Pf(e.type,e.memoizedProps)),t&&(t=nn)){if(Df(e))throw ew(),Error(Q(418));for(;t;)J1(e,t),t=ii(t.nextSibling)}if(sv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Q(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){nn=ii(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}nn=null}}else nn=on?ii(e.stateNode.nextSibling):null;return!0}function ew(){for(var e=nn;e;)e=ii(e.nextSibling)}function lo(){nn=on=null,We=!1}function Mh(e){In===null?In=[e]:In.push(e)}var F_=Pr.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(Q(309));var r=n.stateNode}if(!r)throw Error(Q(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(Q(284));if(!n._owner)throw Error(Q(290,e))}return e}function El(e,t){throw e=Object.prototype.toString.call(t),Error(Q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ov(e){var t=e._init;return t(e._payload)}function tw(e){function t(m,g){if(e){var b=m.deletions;b===null?(m.deletions=[g],m.flags|=16):b.push(g)}}function n(m,g){if(!e)return null;for(;g!==null;)t(m,g),g=g.sibling;return null}function r(m,g){for(m=new Map;g!==null;)g.key!==null?m.set(g.key,g):m.set(g.index,g),g=g.sibling;return m}function i(m,g){return m=li(m,g),m.index=0,m.sibling=null,m}function s(m,g,b){return m.index=b,e?(b=m.alternate,b!==null?(b=b.index,b<g?(m.flags|=2,g):b):(m.flags|=2,g)):(m.flags|=1048576,g)}function o(m){return e&&m.alternate===null&&(m.flags|=2),m}function a(m,g,b,C){return g===null||g.tag!==6?(g=Cd(b,m.mode,C),g.return=m,g):(g=i(g,b),g.return=m,g)}function l(m,g,b,C){var S=b.type;return S===Ss?d(m,g,b.props.children,C,b.key):g!==null&&(g.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Fr&&ov(S)===g.type)?(C=i(g,b.props),C.ref=Fo(m,g,b),C.return=m,C):(C=nc(b.type,b.key,b.props,null,m.mode,C),C.ref=Fo(m,g,b),C.return=m,C)}function c(m,g,b,C){return g===null||g.tag!==4||g.stateNode.containerInfo!==b.containerInfo||g.stateNode.implementation!==b.implementation?(g=_d(b,m.mode,C),g.return=m,g):(g=i(g,b.children||[]),g.return=m,g)}function d(m,g,b,C,S){return g===null||g.tag!==7?(g=Wi(b,m.mode,C,S),g.return=m,g):(g=i(g,b),g.return=m,g)}function u(m,g,b){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Cd(""+g,m.mode,b),g.return=m,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case gl:return b=nc(g.type,g.key,g.props,null,m.mode,b),b.ref=Fo(m,null,g),b.return=m,b;case ks:return g=_d(g,m.mode,b),g.return=m,g;case Fr:var C=g._init;return u(m,C(g._payload),b)}if(qo(g)||Oo(g))return g=Wi(g,m.mode,b,null),g.return=m,g;El(m,g)}return null}function p(m,g,b,C){var S=g!==null?g.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return S!==null?null:a(m,g,""+b,C);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case gl:return b.key===S?l(m,g,b,C):null;case ks:return b.key===S?c(m,g,b,C):null;case Fr:return S=b._init,p(m,g,S(b._payload),C)}if(qo(b)||Oo(b))return S!==null?null:d(m,g,b,C,null);El(m,b)}return null}function h(m,g,b,C,S){if(typeof C=="string"&&C!==""||typeof C=="number")return m=m.get(b)||null,a(g,m,""+C,S);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case gl:return m=m.get(C.key===null?b:C.key)||null,l(g,m,C,S);case ks:return m=m.get(C.key===null?b:C.key)||null,c(g,m,C,S);case Fr:var _=C._init;return h(m,g,b,_(C._payload),S)}if(qo(C)||Oo(C))return m=m.get(b)||null,d(g,m,C,S,null);El(g,C)}return null}function y(m,g,b,C){for(var S=null,_=null,j=g,A=g=0,E=null;j!==null&&A<b.length;A++){j.index>A?(E=j,j=null):E=j.sibling;var L=p(m,j,b[A],C);if(L===null){j===null&&(j=E);break}e&&j&&L.alternate===null&&t(m,j),g=s(L,g,A),_===null?S=L:_.sibling=L,_=L,j=E}if(A===b.length)return n(m,j),We&&Ti(m,A),S;if(j===null){for(;A<b.length;A++)j=u(m,b[A],C),j!==null&&(g=s(j,g,A),_===null?S=j:_.sibling=j,_=j);return We&&Ti(m,A),S}for(j=r(m,j);A<b.length;A++)E=h(j,m,A,b[A],C),E!==null&&(e&&E.alternate!==null&&j.delete(E.key===null?A:E.key),g=s(E,g,A),_===null?S=E:_.sibling=E,_=E);return e&&j.forEach(function(F){return t(m,F)}),We&&Ti(m,A),S}function x(m,g,b,C){var S=Oo(b);if(typeof S!="function")throw Error(Q(150));if(b=S.call(b),b==null)throw Error(Q(151));for(var _=S=null,j=g,A=g=0,E=null,L=b.next();j!==null&&!L.done;A++,L=b.next()){j.index>A?(E=j,j=null):E=j.sibling;var F=p(m,j,L.value,C);if(F===null){j===null&&(j=E);break}e&&j&&F.alternate===null&&t(m,j),g=s(F,g,A),_===null?S=F:_.sibling=F,_=F,j=E}if(L.done)return n(m,j),We&&Ti(m,A),S;if(j===null){for(;!L.done;A++,L=b.next())L=u(m,L.value,C),L!==null&&(g=s(L,g,A),_===null?S=L:_.sibling=L,_=L);return We&&Ti(m,A),S}for(j=r(m,j);!L.done;A++,L=b.next())L=h(j,m,A,L.value,C),L!==null&&(e&&L.alternate!==null&&j.delete(L.key===null?A:L.key),g=s(L,g,A),_===null?S=L:_.sibling=L,_=L);return e&&j.forEach(function(D){return t(m,D)}),We&&Ti(m,A),S}function w(m,g,b,C){if(typeof b=="object"&&b!==null&&b.type===Ss&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case gl:e:{for(var S=b.key,_=g;_!==null;){if(_.key===S){if(S=b.type,S===Ss){if(_.tag===7){n(m,_.sibling),g=i(_,b.props.children),g.return=m,m=g;break e}}else if(_.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Fr&&ov(S)===_.type){n(m,_.sibling),g=i(_,b.props),g.ref=Fo(m,_,b),g.return=m,m=g;break e}n(m,_);break}else t(m,_);_=_.sibling}b.type===Ss?(g=Wi(b.props.children,m.mode,C,b.key),g.return=m,m=g):(C=nc(b.type,b.key,b.props,null,m.mode,C),C.ref=Fo(m,g,b),C.return=m,m=C)}return o(m);case ks:e:{for(_=b.key;g!==null;){if(g.key===_)if(g.tag===4&&g.stateNode.containerInfo===b.containerInfo&&g.stateNode.implementation===b.implementation){n(m,g.sibling),g=i(g,b.children||[]),g.return=m,m=g;break e}else{n(m,g);break}else t(m,g);g=g.sibling}g=_d(b,m.mode,C),g.return=m,m=g}return o(m);case Fr:return _=b._init,w(m,g,_(b._payload),C)}if(qo(b))return y(m,g,b,C);if(Oo(b))return x(m,g,b,C);El(m,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,g!==null&&g.tag===6?(n(m,g.sibling),g=i(g,b),g.return=m,m=g):(n(m,g),g=Cd(b,m.mode,C),g.return=m,m=g),o(m)):n(m,g)}return w}var co=tw(!0),nw=tw(!1),Ec=yi(null),Ac=null,Ps=null,Oh=null;function Nh(){Oh=Ps=Ac=null}function Dh(e){var t=Ec.current;ze(Ec),e._currentValue=t}function Lf(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 Hs(e,t){Ac=e,Oh=Ps=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(qt=!0),e.firstContext=null)}function _n(e){var t=e._currentValue;if(Oh!==e)if(e={context:e,memoizedValue:t,next:null},Ps===null){if(Ac===null)throw Error(Q(308));Ps=e,Ac.dependencies={lanes:0,firstContext:e}}else Ps=Ps.next=e;return t}var Mi=null;function Ih(e){Mi===null?Mi=[e]:Mi.push(e)}function rw(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Ih(t)):(n.next=i.next,i.next=n),t.interleaved=n,Tr(e,r)}function Tr(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 Br=!1;function Lh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function iw(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 kr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function si(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ae&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Tr(e,n)}return i=r.interleaved,i===null?(t.next=t,Ih(r)):(t.next=i.next,i.next=t),r.interleaved=t,Tr(e,n)}function Kl(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,kh(e,n)}}function av(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 jc(e,t,n,r){var i=e.updateQueue;Br=!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 p=a.lane,h=a.eventTime;if((r&p)===p){d!==null&&(d=d.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=e,x=a;switch(p=t,h=n,x.tag){case 1:if(y=x.payload,typeof y=="function"){u=y.call(h,u,p);break e}u=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=x.payload,p=typeof y=="function"?y.call(h,u,p):y,p==null)break e;u=Xe({},u,p);break e;case 2:Br=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[a]:p.push(a))}else h={eventTime:h,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=h,l=u):d=d.next=h,o|=p;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;p=a,a=p.next,p.next=null,i.lastBaseUpdate=p,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);es|=o,e.lanes=o,e.memoizedState=u}}function lv(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(Q(191,i));i.call(r)}}}var rl={},nr=yi(rl),Aa=yi(rl),ja=yi(rl);function Oi(e){if(e===rl)throw Error(Q(174));return e}function Fh(e,t){switch(Le(ja,t),Le(Aa,e),Le(nr,rl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:vf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=vf(t,e)}ze(nr),Le(nr,t)}function uo(){ze(nr),ze(Aa),ze(ja)}function sw(e){Oi(ja.current);var t=Oi(nr.current),n=vf(t,e.type);t!==n&&(Le(Aa,e),Le(nr,n))}function Bh(e){Aa.current===e&&(ze(nr),ze(Aa))}var Ye=yi(0);function Rc(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 Xl=Pr.ReactCurrentDispatcher,xd=Pr.ReactCurrentBatchConfig,Ji=0,Ke=null,ct=null,ht=null,Pc=!1,sa=!1,Ra=0,B_=0;function Ct(){throw Error(Q(321))}function zh(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Vn(e[n],t[n]))return!1;return!0}function Vh(e,t,n,r,i,s){if(Ji=s,Ke=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Xl.current=e===null||e.memoizedState===null?U_:H_,e=n(r,i),sa){s=0;do{if(sa=!1,Ra=0,25<=s)throw Error(Q(301));s+=1,ht=ct=null,t.updateQueue=null,Xl.current=W_,e=n(r,i)}while(sa)}if(Xl.current=Mc,t=ct!==null&&ct.next!==null,Ji=0,ht=ct=Ke=null,Pc=!1,t)throw Error(Q(300));return e}function Uh(){var e=Ra!==0;return Ra=0,e}function Yn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ht===null?Ke.memoizedState=ht=e:ht=ht.next=e,ht}function Tn(){if(ct===null){var e=Ke.alternate;e=e!==null?e.memoizedState:null}else e=ct.next;var t=ht===null?Ke.memoizedState:ht.next;if(t!==null)ht=t,ct=e;else{if(e===null)throw Error(Q(310));ct=e,e={memoizedState:ct.memoizedState,baseState:ct.baseState,baseQueue:ct.baseQueue,queue:ct.queue,next:null},ht===null?Ke.memoizedState=ht=e:ht=ht.next=e}return ht}function Pa(e,t){return typeof t=="function"?t(e):t}function wd(e){var t=Tn(),n=t.queue;if(n===null)throw Error(Q(311));n.lastRenderedReducer=e;var r=ct,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((Ji&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,Ke.lanes|=d,es|=d}c=c.next}while(c!==null&&c!==s);l===null?o=r:l.next=a,Vn(r,t.memoizedState)||(qt=!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,Ke.lanes|=s,es|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function bd(e){var t=Tn(),n=t.queue;if(n===null)throw Error(Q(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);Vn(s,t.memoizedState)||(qt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function ow(){}function aw(e,t){var n=Ke,r=Tn(),i=t(),s=!Vn(r.memoizedState,i);if(s&&(r.memoizedState=i,qt=!0),r=r.queue,Hh(uw.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||ht!==null&&ht.memoizedState.tag&1){if(n.flags|=2048,Ma(9,cw.bind(null,n,r,i,t),void 0,null),mt===null)throw Error(Q(349));Ji&30||lw(n,t,i)}return i}function lw(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ke.updateQueue,t===null?(t={lastEffect:null,stores:null},Ke.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function cw(e,t,n,r){t.value=n,t.getSnapshot=r,dw(t)&&fw(e)}function uw(e,t,n){return n(function(){dw(t)&&fw(e)})}function dw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Vn(e,n)}catch{return!0}}function fw(e){var t=Tr(e,1);t!==null&&$n(t,e,1,-1)}function cv(e){var t=Yn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Pa,lastRenderedState:e},t.queue=e,e=e.dispatch=V_.bind(null,Ke,e),[t.memoizedState,e]}function Ma(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ke.updateQueue,t===null?(t={lastEffect:null,stores:null},Ke.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 pw(){return Tn().memoizedState}function Zl(e,t,n,r){var i=Yn();Ke.flags|=e,i.memoizedState=Ma(1|t,n,void 0,r===void 0?null:r)}function du(e,t,n,r){var i=Tn();r=r===void 0?null:r;var s=void 0;if(ct!==null){var o=ct.memoizedState;if(s=o.destroy,r!==null&&zh(r,o.deps)){i.memoizedState=Ma(t,n,s,r);return}}Ke.flags|=e,i.memoizedState=Ma(1|t,n,s,r)}function uv(e,t){return Zl(8390656,8,e,t)}function Hh(e,t){return du(2048,8,e,t)}function hw(e,t){return du(4,2,e,t)}function mw(e,t){return du(4,4,e,t)}function gw(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 vw(e,t,n){return n=n!=null?n.concat([e]):null,du(4,4,gw.bind(null,t,e),n)}function Wh(){}function yw(e,t){var n=Tn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&zh(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function xw(e,t){var n=Tn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&zh(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ww(e,t,n){return Ji&21?(Vn(n,t)||(n=_1(),Ke.lanes|=n,es|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,qt=!0),e.memoizedState=n)}function $_(e,t){var n=Pe;Pe=n!==0&&4>n?n:4,e(!0);var r=xd.transition;xd.transition={};try{e(!1),t()}finally{Pe=n,xd.transition=r}}function bw(){return Tn().memoizedState}function z_(e,t,n){var r=ai(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},kw(e))Sw(t,n);else if(n=rw(e,t,n,r),n!==null){var i=It();$n(n,e,r,i),Cw(n,t,r)}}function V_(e,t,n){var r=ai(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(kw(e))Sw(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,Vn(a,o)){var l=t.interleaved;l===null?(i.next=i,Ih(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=rw(e,t,i,r),n!==null&&(i=It(),$n(n,e,r,i),Cw(n,t,r))}}function kw(e){var t=e.alternate;return e===Ke||t!==null&&t===Ke}function Sw(e,t){sa=Pc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Cw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,kh(e,n)}}var Mc={readContext:_n,useCallback:Ct,useContext:Ct,useEffect:Ct,useImperativeHandle:Ct,useInsertionEffect:Ct,useLayoutEffect:Ct,useMemo:Ct,useReducer:Ct,useRef:Ct,useState:Ct,useDebugValue:Ct,useDeferredValue:Ct,useTransition:Ct,useMutableSource:Ct,useSyncExternalStore:Ct,useId:Ct,unstable_isNewReconciler:!1},U_={readContext:_n,useCallback:function(e,t){return Yn().memoizedState=[e,t===void 0?null:t],e},useContext:_n,useEffect:uv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Zl(4194308,4,gw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Zl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Zl(4,2,e,t)},useMemo:function(e,t){var n=Yn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Yn();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=z_.bind(null,Ke,e),[r.memoizedState,e]},useRef:function(e){var t=Yn();return e={current:e},t.memoizedState=e},useState:cv,useDebugValue:Wh,useDeferredValue:function(e){return Yn().memoizedState=e},useTransition:function(){var e=cv(!1),t=e[0];return e=$_.bind(null,e[1]),Yn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ke,i=Yn();if(We){if(n===void 0)throw Error(Q(407));n=n()}else{if(n=t(),mt===null)throw Error(Q(349));Ji&30||lw(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,uv(uw.bind(null,r,s,e),[e]),r.flags|=2048,Ma(9,cw.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Yn(),t=mt.identifierPrefix;if(We){var n=br,r=wr;n=(r&~(1<<32-Bn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ra++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=B_++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},H_={readContext:_n,useCallback:yw,useContext:_n,useEffect:Hh,useImperativeHandle:vw,useInsertionEffect:hw,useLayoutEffect:mw,useMemo:xw,useReducer:wd,useRef:pw,useState:function(){return wd(Pa)},useDebugValue:Wh,useDeferredValue:function(e){var t=Tn();return ww(t,ct.memoizedState,e)},useTransition:function(){var e=wd(Pa)[0],t=Tn().memoizedState;return[e,t]},useMutableSource:ow,useSyncExternalStore:aw,useId:bw,unstable_isNewReconciler:!1},W_={readContext:_n,useCallback:yw,useContext:_n,useEffect:Hh,useImperativeHandle:vw,useInsertionEffect:hw,useLayoutEffect:mw,useMemo:xw,useReducer:bd,useRef:pw,useState:function(){return bd(Pa)},useDebugValue:Wh,useDeferredValue:function(e){var t=Tn();return ct===null?t.memoizedState=e:ww(t,ct.memoizedState,e)},useTransition:function(){var e=bd(Pa)[0],t=Tn().memoizedState;return[e,t]},useMutableSource:ow,useSyncExternalStore:aw,useId:bw,unstable_isNewReconciler:!1};function Mn(e,t){if(e&&e.defaultProps){t=Xe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ff(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Xe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var fu={isMounted:function(e){return(e=e._reactInternals)?os(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=It(),i=ai(e),s=kr(r,i);s.payload=t,n!=null&&(s.callback=n),t=si(e,s,i),t!==null&&($n(t,e,i,r),Kl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=It(),i=ai(e),s=kr(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=si(e,s,i),t!==null&&($n(t,e,i,r),Kl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=It(),r=ai(e),i=kr(n,r);i.tag=2,t!=null&&(i.callback=t),t=si(e,i,r),t!==null&&($n(t,e,r,n),Kl(t,e,r))}};function dv(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?!Ca(n,r)||!Ca(i,s):!0}function _w(e,t,n){var r=!1,i=fi,s=t.contextType;return typeof s=="object"&&s!==null?s=_n(s):(i=Yt(t)?Xi:Pt.current,r=t.contextTypes,s=(r=r!=null)?ao(e,i):fi),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=fu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function fv(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&fu.enqueueReplaceState(t,t.state,null)}function Bf(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Lh(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=_n(s):(s=Yt(t)?Xi:Pt.current,i.context=ao(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Ff(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&fu.enqueueReplaceState(i,i.state,null),jc(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function fo(e,t){try{var n="",r=t;do n+=x2(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{od=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Qo(e):""}function R2(e){switch(e.tag){case 5:return Qo(e.type);case 16:return Qo("Lazy");case 13:return Qo("Suspense");case 19:return Qo("SuspenseList");case 0:case 2:case 15:return e=ad(e.type,!1),e;case 11:return e=ad(e.type.render,!1),e;case 1:return e=ad(e.type,!0),e;default:return""}}function vf(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 Cs:return"Fragment";case Ss:return"Portal";case hf:return"Profiler";case Sh:return"StrictMode";case mf:return"Suspense";case gf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case m1:return(e.displayName||"Context")+".Consumer";case h1:return(e._context.displayName||"Context")+".Provider";case Ch:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case _h:return t=e.displayName||null,t!==null?t:vf(e.type)||"Memo";case $r:t=e._payload,e=e._init;try{return vf(e(t))}catch{}}return null}function P2(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 vf(t);case 8:return t===Sh?"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 fi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function v1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function M2(e){var t=v1(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 bl(e){e._valueTracker||(e._valueTracker=M2(e))}function y1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=v1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function yc(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 yf(e,t){var n=t.checked;return Ke({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ig(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=fi(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 x1(e,t){t=t.checked,t!=null&&kh(e,"checked",t,!1)}function xf(e,t){x1(e,t);var n=fi(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")?wf(e,t.type,n):t.hasOwnProperty("defaultValue")&&wf(e,t.type,fi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Lg(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 wf(e,t,n){(t!=="number"||yc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ko=Array.isArray;function Vs(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=""+fi(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 bf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(X(91));return Ke({},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(X(92));if(Ko(n)){if(1<n.length)throw Error(X(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:fi(n)}}function w1(e,t){var n=fi(t.value),r=fi(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 $g(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function b1(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 kf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?b1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var kl,k1=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(kl=kl||document.createElement("div"),kl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=kl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ka(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var sa={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},N2=["Webkit","ms","Moz","O"];Object.keys(sa).forEach(function(e){N2.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),sa[t]=sa[e]})});function S1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||sa.hasOwnProperty(e)&&sa[e]?(""+t).trim():t+"px"}function C1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=S1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var O2=Ke({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 Sf(e,t){if(t){if(O2[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(X(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(X(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(X(61))}if(t.style!=null&&typeof t.style!="object")throw Error(X(62))}}function Cf(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 _f=null;function Th(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Tf=null,Us=null,Hs=null;function Bg(e){if(e=ol(e)){if(typeof Tf!="function")throw Error(X(280));var t=e.stateNode;t&&(t=pu(t),Tf(e.stateNode,e.type,t))}}function _1(e){Us?Hs?Hs.push(e):Hs=[e]:Us=e}function T1(){if(Us){var e=Us,t=Hs;if(Hs=Us=null,Bg(e),t)for(e=0;e<t.length;e++)Bg(t[e])}}function E1(e,t){return e(t)}function A1(){}var ld=!1;function j1(e,t,n){if(ld)return e(t,n);ld=!0;try{return E1(e,t,n)}finally{ld=!1,(Us!==null||Hs!==null)&&(A1(),T1())}}function Sa(e,t){var n=e.stateNode;if(n===null)return null;var r=pu(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(X(231,t,typeof n));return n}var Ef=!1;if(Cr)try{var Fo={};Object.defineProperty(Fo,"passive",{get:function(){Ef=!0}}),window.addEventListener("test",Fo,Fo),window.removeEventListener("test",Fo,Fo)}catch{Ef=!1}function D2(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 oa=!1,xc=null,wc=!1,Af=null,I2={onError:function(e){oa=!0,xc=e}};function L2(e,t,n,r,i,s,o,a,l){oa=!1,xc=null,D2.apply(I2,arguments)}function F2(e,t,n,r,i,s,o,a,l){if(L2.apply(this,arguments),oa){if(oa){var c=xc;oa=!1,xc=null}else throw Error(X(198));wc||(wc=!0,Af=c)}}function as(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 R1(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 zg(e){if(as(e)!==e)throw Error(X(188))}function $2(e){var t=e.alternate;if(!t){if(t=as(e),t===null)throw Error(X(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 zg(i),e;if(s===r)return zg(i),t;s=s.sibling}throw Error(X(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(X(189))}}if(n.alternate!==r)throw Error(X(190))}if(n.tag!==3)throw Error(X(188));return n.stateNode.current===n?e:t}function P1(e){return e=$2(e),e!==null?M1(e):null}function M1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=M1(e);if(t!==null)return t;e=e.sibling}return null}var N1=an.unstable_scheduleCallback,Vg=an.unstable_cancelCallback,B2=an.unstable_shouldYield,z2=an.unstable_requestPaint,nt=an.unstable_now,V2=an.unstable_getCurrentPriorityLevel,Eh=an.unstable_ImmediatePriority,O1=an.unstable_UserBlockingPriority,bc=an.unstable_NormalPriority,U2=an.unstable_LowPriority,D1=an.unstable_IdlePriority,cu=null,tr=null;function H2(e){if(tr&&typeof tr.onCommitFiberRoot=="function")try{tr.onCommitFiberRoot(cu,e,void 0,(e.current.flags&128)===128)}catch{}}var $n=Math.clz32?Math.clz32:G2,W2=Math.log,q2=Math.LN2;function G2(e){return e>>>=0,e===0?32:31-(W2(e)/q2|0)|0}var Sl=64,Cl=4194304;function Xo(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 kc(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=Xo(a):(s&=o,s!==0&&(r=Xo(s)))}else o=n&~i,o!==0?r=Xo(o):s!==0&&(r=Xo(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-$n(t),i=1<<n,r|=e[n],t&=~i;return r}function Y2(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 Q2(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-$n(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=Y2(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function jf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function I1(){var e=Sl;return Sl<<=1,!(Sl&4194240)&&(Sl=64),e}function cd(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function il(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-$n(t),e[t]=n}function K2(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-$n(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function Ah(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-$n(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Pe=0;function L1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var F1,jh,$1,B1,z1,Rf=!1,_l=[],ni=null,ri=null,ii=null,Ca=new Map,_a=new Map,Vr=[],X2="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 Ug(e,t){switch(e){case"focusin":case"focusout":ni=null;break;case"dragenter":case"dragleave":ri=null;break;case"mouseover":case"mouseout":ii=null;break;case"pointerover":case"pointerout":Ca.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":_a.delete(t.pointerId)}}function $o(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=ol(t),t!==null&&jh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Z2(e,t,n,r,i){switch(t){case"focusin":return ni=$o(ni,e,t,n,r,i),!0;case"dragenter":return ri=$o(ri,e,t,n,r,i),!0;case"mouseover":return ii=$o(ii,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Ca.set(s,$o(Ca.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,_a.set(s,$o(_a.get(s)||null,e,t,n,r,i)),!0}return!1}function V1(e){var t=Pi(e.target);if(t!==null){var n=as(t);if(n!==null){if(t=n.tag,t===13){if(t=R1(n),t!==null){e.blockedOn=t,z1(e.priority,function(){$1(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Xl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Pf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);_f=r,n.target.dispatchEvent(r),_f=null}else return t=ol(n),t!==null&&jh(t),e.blockedOn=n,!1;t.shift()}return!0}function Hg(e,t,n){Xl(e)&&n.delete(t)}function J2(){Rf=!1,ni!==null&&Xl(ni)&&(ni=null),ri!==null&&Xl(ri)&&(ri=null),ii!==null&&Xl(ii)&&(ii=null),Ca.forEach(Hg),_a.forEach(Hg)}function Bo(e,t){e.blockedOn===t&&(e.blockedOn=null,Rf||(Rf=!0,an.unstable_scheduleCallback(an.unstable_NormalPriority,J2)))}function Ta(e){function t(i){return Bo(i,e)}if(0<_l.length){Bo(_l[0],e);for(var n=1;n<_l.length;n++){var r=_l[n];r.blockedOn===e&&(r.blockedOn=null)}}for(ni!==null&&Bo(ni,e),ri!==null&&Bo(ri,e),ii!==null&&Bo(ii,e),Ca.forEach(t),_a.forEach(t),n=0;n<Vr.length;n++)r=Vr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Vr.length&&(n=Vr[0],n.blockedOn===null);)V1(n),n.blockedOn===null&&Vr.shift()}var Ws=Mr.ReactCurrentBatchConfig,Sc=!0;function e_(e,t,n,r){var i=Pe,s=Ws.transition;Ws.transition=null;try{Pe=1,Rh(e,t,n,r)}finally{Pe=i,Ws.transition=s}}function t_(e,t,n,r){var i=Pe,s=Ws.transition;Ws.transition=null;try{Pe=4,Rh(e,t,n,r)}finally{Pe=i,Ws.transition=s}}function Rh(e,t,n,r){if(Sc){var i=Pf(e,t,n,r);if(i===null)xd(e,t,r,Cc,n),Ug(e,r);else if(Z2(i,e,t,n,r))r.stopPropagation();else if(Ug(e,r),t&4&&-1<X2.indexOf(e)){for(;i!==null;){var s=ol(i);if(s!==null&&F1(s),s=Pf(e,t,n,r),s===null&&xd(e,t,r,Cc,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else xd(e,t,r,null,n)}}var Cc=null;function Pf(e,t,n,r){if(Cc=null,e=Th(r),e=Pi(e),e!==null)if(t=as(e),t===null)e=null;else if(n=t.tag,n===13){if(e=R1(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 Cc=e,null}function U1(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(V2()){case Eh:return 1;case O1:return 4;case bc:case U2:return 16;case D1:return 536870912;default:return 16}default:return 16}}var Jr=null,Ph=null,Zl=null;function H1(){if(Zl)return Zl;var e,t=Ph,n=t.length,r,i="value"in Jr?Jr.value:Jr.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 Zl=i.slice(e,1<r?1-r:void 0)}function Jl(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 Tl(){return!0}function Wg(){return!1}function cn(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)?Tl:Wg,this.isPropagationStopped=Wg,this}return Ke(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=Tl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Tl)},persist:function(){},isPersistent:Tl}),t}var Eo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mh=cn(Eo),sl=Ke({},Eo,{view:0,detail:0}),n_=cn(sl),ud,dd,zo,uu=Ke({},sl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Nh,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!==zo&&(zo&&e.type==="mousemove"?(ud=e.screenX-zo.screenX,dd=e.screenY-zo.screenY):dd=ud=0,zo=e),ud)},movementY:function(e){return"movementY"in e?e.movementY:dd}}),qg=cn(uu),r_=Ke({},uu,{dataTransfer:0}),i_=cn(r_),s_=Ke({},sl,{relatedTarget:0}),fd=cn(s_),o_=Ke({},Eo,{animationName:0,elapsedTime:0,pseudoElement:0}),a_=cn(o_),l_=Ke({},Eo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),c_=cn(l_),u_=Ke({},Eo,{data:0}),Gg=cn(u_),d_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},f_={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"},p_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function h_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=p_[e])?!!t[e]:!1}function Nh(){return h_}var m_=Ke({},sl,{key:function(e){if(e.key){var t=d_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Jl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?f_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Nh,charCode:function(e){return e.type==="keypress"?Jl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Jl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),g_=cn(m_),v_=Ke({},uu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Yg=cn(v_),y_=Ke({},sl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Nh}),x_=cn(y_),w_=Ke({},Eo,{propertyName:0,elapsedTime:0,pseudoElement:0}),b_=cn(w_),k_=Ke({},uu,{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}),S_=cn(k_),C_=[9,13,27,32],Oh=Cr&&"CompositionEvent"in window,aa=null;Cr&&"documentMode"in document&&(aa=document.documentMode);var __=Cr&&"TextEvent"in window&&!aa,W1=Cr&&(!Oh||aa&&8<aa&&11>=aa),Qg=" ",Kg=!1;function q1(e,t){switch(e){case"keyup":return C_.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function G1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _s=!1;function T_(e,t){switch(e){case"compositionend":return G1(t);case"keypress":return t.which!==32?null:(Kg=!0,Qg);case"textInput":return e=t.data,e===Qg&&Kg?null:e;default:return null}}function E_(e,t){if(_s)return e==="compositionend"||!Oh&&q1(e,t)?(e=H1(),Zl=Ph=Jr=null,_s=!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 W1&&t.locale!=="ko"?null:t.data;default:return null}}var A_={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 Xg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!A_[e.type]:t==="textarea"}function Y1(e,t,n,r){_1(r),t=_c(t,"onChange"),0<t.length&&(n=new Mh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var la=null,Ea=null;function j_(e){sw(e,0)}function du(e){var t=As(e);if(y1(t))return e}function R_(e,t){if(e==="change")return t}var Q1=!1;if(Cr){var pd;if(Cr){var hd="oninput"in document;if(!hd){var Zg=document.createElement("div");Zg.setAttribute("oninput","return;"),hd=typeof Zg.oninput=="function"}pd=hd}else pd=!1;Q1=pd&&(!document.documentMode||9<document.documentMode)}function Jg(){la&&(la.detachEvent("onpropertychange",K1),Ea=la=null)}function K1(e){if(e.propertyName==="value"&&du(Ea)){var t=[];Y1(t,Ea,e,Th(e)),j1(j_,t)}}function P_(e,t,n){e==="focusin"?(Jg(),la=t,Ea=n,la.attachEvent("onpropertychange",K1)):e==="focusout"&&Jg()}function M_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return du(Ea)}function N_(e,t){if(e==="click")return du(t)}function O_(e,t){if(e==="input"||e==="change")return du(t)}function D_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Vn=typeof Object.is=="function"?Object.is:D_;function Aa(e,t){if(Vn(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(!pf.call(t,i)||!Vn(e[i],t[i]))return!1}return!0}function ev(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function tv(e,t){var n=ev(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=ev(n)}}function X1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?X1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Z1(){for(var e=window,t=yc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=yc(e.document)}return t}function Dh(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 I_(e){var t=Z1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&X1(n.ownerDocument.documentElement,n)){if(r!==null&&Dh(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=tv(n,s);var o=tv(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 L_=Cr&&"documentMode"in document&&11>=document.documentMode,Ts=null,Mf=null,ca=null,Nf=!1;function nv(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Nf||Ts==null||Ts!==yc(r)||(r=Ts,"selectionStart"in r&&Dh(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}),ca&&Aa(ca,r)||(ca=r,r=_c(Mf,"onSelect"),0<r.length&&(t=new Mh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ts)))}function El(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Es={animationend:El("Animation","AnimationEnd"),animationiteration:El("Animation","AnimationIteration"),animationstart:El("Animation","AnimationStart"),transitionend:El("Transition","TransitionEnd")},md={},J1={};Cr&&(J1=document.createElement("div").style,"AnimationEvent"in window||(delete Es.animationend.animation,delete Es.animationiteration.animation,delete Es.animationstart.animation),"TransitionEvent"in window||delete Es.transitionend.transition);function fu(e){if(md[e])return md[e];if(!Es[e])return e;var t=Es[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in J1)return md[e]=t[n];return e}var ew=fu("animationend"),tw=fu("animationiteration"),nw=fu("animationstart"),rw=fu("transitionend"),iw=new Map,rv="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 vi(e,t){iw.set(e,t),os(t,[e])}for(var gd=0;gd<rv.length;gd++){var vd=rv[gd],F_=vd.toLowerCase(),$_=vd[0].toUpperCase()+vd.slice(1);vi(F_,"on"+$_)}vi(ew,"onAnimationEnd");vi(tw,"onAnimationIteration");vi(nw,"onAnimationStart");vi("dblclick","onDoubleClick");vi("focusin","onFocus");vi("focusout","onBlur");vi(rw,"onTransitionEnd");uo("onMouseEnter",["mouseout","mouseover"]);uo("onMouseLeave",["mouseout","mouseover"]);uo("onPointerEnter",["pointerout","pointerover"]);uo("onPointerLeave",["pointerout","pointerover"]);os("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));os("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));os("onBeforeInput",["compositionend","keypress","textInput","paste"]);os("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));os("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));os("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Zo="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(" "),B_=new Set("cancel close invalid load scroll toggle".split(" ").concat(Zo));function iv(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,F2(r,t,void 0,e),e.currentTarget=null}function sw(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;iv(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;iv(i,a,c),s=l}}}if(wc)throw e=Af,wc=!1,Af=null,e}function ze(e,t){var n=t[Ff];n===void 0&&(n=t[Ff]=new Set);var r=e+"__bubble";n.has(r)||(ow(t,e,2,!1),n.add(r))}function yd(e,t,n){var r=0;t&&(r|=4),ow(n,e,r,t)}var Al="_reactListening"+Math.random().toString(36).slice(2);function ja(e){if(!e[Al]){e[Al]=!0,p1.forEach(function(n){n!=="selectionchange"&&(B_.has(n)||yd(n,!1,e),yd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Al]||(t[Al]=!0,yd("selectionchange",!1,t))}}function ow(e,t,n,r){switch(U1(t)){case 1:var i=e_;break;case 4:i=t_;break;default:i=Rh}n=i.bind(null,t,n,e),i=void 0,!Ef||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 xd(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=Pi(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}j1(function(){var c=s,d=Th(n),u=[];e:{var p=iw.get(e);if(p!==void 0){var h=Mh,y=e;switch(e){case"keypress":if(Jl(n)===0)break e;case"keydown":case"keyup":h=g_;break;case"focusin":y="focus",h=fd;break;case"focusout":y="blur",h=fd;break;case"beforeblur":case"afterblur":h=fd;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=qg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=i_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=x_;break;case ew:case tw:case nw:h=a_;break;case rw:h=b_;break;case"scroll":h=n_;break;case"wheel":h=S_;break;case"copy":case"cut":case"paste":h=c_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Yg}var w=(t&4)!==0,b=!w&&e==="scroll",m=w?p!==null?p+"Capture":null:p;w=[];for(var v=c,x;v!==null;){x=v;var S=x.stateNode;if(x.tag===5&&S!==null&&(x=S,m!==null&&(S=Sa(v,m),S!=null&&w.push(Ra(v,S,x)))),b)break;v=v.return}0<w.length&&(p=new h(p,y,null,n,d),u.push({event:p,listeners:w}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",p&&n!==_f&&(y=n.relatedTarget||n.fromElement)&&(Pi(y)||y[_r]))break e;if((h||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,h?(y=n.relatedTarget||n.toElement,h=c,y=y?Pi(y):null,y!==null&&(b=as(y),y!==b||y.tag!==5&&y.tag!==6)&&(y=null)):(h=null,y=c),h!==y)){if(w=qg,S="onMouseLeave",m="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(w=Yg,S="onPointerLeave",m="onPointerEnter",v="pointer"),b=h==null?p:As(h),x=y==null?p:As(y),p=new w(S,v+"leave",h,n,d),p.target=b,p.relatedTarget=x,S=null,Pi(d)===c&&(w=new w(m,v+"enter",y,n,d),w.target=x,w.relatedTarget=b,S=w),b=S,h&&y)t:{for(w=h,m=y,v=0,x=w;x;x=bs(x))v++;for(x=0,S=m;S;S=bs(S))x++;for(;0<v-x;)w=bs(w),v--;for(;0<x-v;)m=bs(m),x--;for(;v--;){if(w===m||m!==null&&w===m.alternate)break t;w=bs(w),m=bs(m)}w=null}else w=null;h!==null&&sv(u,p,h,w,!1),y!==null&&b!==null&&sv(u,b,y,w,!0)}}e:{if(p=c?As(c):window,h=p.nodeName&&p.nodeName.toLowerCase(),h==="select"||h==="input"&&p.type==="file")var C=R_;else if(Xg(p))if(Q1)C=O_;else{C=M_;var _=P_}else(h=p.nodeName)&&h.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(C=N_);if(C&&(C=C(e,c))){Y1(u,C,n,d);break e}_&&_(e,p,c),e==="focusout"&&(_=p._wrapperState)&&_.controlled&&p.type==="number"&&wf(p,"number",p.value)}switch(_=c?As(c):window,e){case"focusin":(Xg(_)||_.contentEditable==="true")&&(Ts=_,Mf=c,ca=null);break;case"focusout":ca=Mf=Ts=null;break;case"mousedown":Nf=!0;break;case"contextmenu":case"mouseup":case"dragend":Nf=!1,nv(u,n,d);break;case"selectionchange":if(L_)break;case"keydown":case"keyup":nv(u,n,d)}var j;if(Oh)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 _s?q1(e,n)&&(A="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(A="onCompositionStart");A&&(W1&&n.locale!=="ko"&&(_s||A!=="onCompositionStart"?A==="onCompositionEnd"&&_s&&(j=H1()):(Jr=d,Ph="value"in Jr?Jr.value:Jr.textContent,_s=!0)),_=_c(c,A),0<_.length&&(A=new Gg(A,e,null,n,d),u.push({event:A,listeners:_}),j?A.data=j:(j=G1(n),j!==null&&(A.data=j)))),(j=__?T_(e,n):E_(e,n))&&(c=_c(c,"onBeforeInput"),0<c.length&&(d=new Gg("onBeforeInput","beforeinput",null,n,d),u.push({event:d,listeners:c}),d.data=j))}sw(u,t)})}function Ra(e,t,n){return{instance:e,listener:t,currentTarget:n}}function _c(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Sa(e,n),s!=null&&r.unshift(Ra(e,s,i)),s=Sa(e,t),s!=null&&r.push(Ra(e,s,i))),e=e.return}return r}function bs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function sv(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=Sa(n,s),l!=null&&o.unshift(Ra(n,l,a))):i||(l=Sa(n,s),l!=null&&o.push(Ra(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var z_=/\r\n?/g,V_=/\u0000|\uFFFD/g;function ov(e){return(typeof e=="string"?e:""+e).replace(z_,`
38
+ `).replace(V_,"")}function jl(e,t,n){if(t=ov(t),ov(e)!==t&&n)throw Error(X(425))}function Tc(){}var Of=null,Df=null;function If(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 Lf=typeof setTimeout=="function"?setTimeout:void 0,U_=typeof clearTimeout=="function"?clearTimeout:void 0,av=typeof Promise=="function"?Promise:void 0,H_=typeof queueMicrotask=="function"?queueMicrotask:typeof av<"u"?function(e){return av.resolve(null).then(e).catch(W_)}:Lf;function W_(e){setTimeout(function(){throw e})}function wd(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),Ta(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Ta(t)}function si(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function lv(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 Ao=Math.random().toString(36).slice(2),er="__reactFiber$"+Ao,Pa="__reactProps$"+Ao,_r="__reactContainer$"+Ao,Ff="__reactEvents$"+Ao,q_="__reactListeners$"+Ao,G_="__reactHandles$"+Ao;function Pi(e){var t=e[er];if(t)return t;for(var n=e.parentNode;n;){if(t=n[_r]||n[er]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=lv(e);e!==null;){if(n=e[er])return n;e=lv(e)}return t}e=n,n=e.parentNode}return null}function ol(e){return e=e[er]||e[_r],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function As(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(X(33))}function pu(e){return e[Pa]||null}var $f=[],js=-1;function yi(e){return{current:e}}function Ue(e){0>js||(e.current=$f[js],$f[js]=null,js--)}function $e(e,t){js++,$f[js]=e.current,e.current=t}var pi={},Pt=yi(pi),Gt=yi(!1),Zi=pi;function fo(e,t){var n=e.type.contextTypes;if(!n)return pi;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 Yt(e){return e=e.childContextTypes,e!=null}function Ec(){Ue(Gt),Ue(Pt)}function cv(e,t,n){if(Pt.current!==pi)throw Error(X(168));$e(Pt,t),$e(Gt,n)}function aw(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(X(108,P2(e)||"Unknown",i));return Ke({},n,r)}function Ac(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||pi,Zi=Pt.current,$e(Pt,e),$e(Gt,Gt.current),!0}function uv(e,t,n){var r=e.stateNode;if(!r)throw Error(X(169));n?(e=aw(e,t,Zi),r.__reactInternalMemoizedMergedChildContext=e,Ue(Gt),Ue(Pt),$e(Pt,e)):Ue(Gt),$e(Gt,n)}var vr=null,hu=!1,bd=!1;function lw(e){vr===null?vr=[e]:vr.push(e)}function Y_(e){hu=!0,lw(e)}function xi(){if(!bd&&vr!==null){bd=!0;var e=0,t=Pe;try{var n=vr;for(Pe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}vr=null,hu=!1}catch(i){throw vr!==null&&(vr=vr.slice(e+1)),N1(Eh,xi),i}finally{Pe=t,bd=!1}}return null}var Rs=[],Ps=0,jc=null,Rc=0,xn=[],wn=0,Ji=null,wr=1,br="";function Ti(e,t){Rs[Ps++]=Rc,Rs[Ps++]=jc,jc=e,Rc=t}function cw(e,t,n){xn[wn++]=wr,xn[wn++]=br,xn[wn++]=Ji,Ji=e;var r=wr;e=br;var i=32-$n(r)-1;r&=~(1<<i),n+=1;var s=32-$n(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,wr=1<<32-$n(t)+i|n<<i|r,br=s+e}else wr=1<<s|n<<i|r,br=e}function Ih(e){e.return!==null&&(Ti(e,1),cw(e,1,0))}function Lh(e){for(;e===jc;)jc=Rs[--Ps],Rs[Ps]=null,Rc=Rs[--Ps],Rs[Ps]=null;for(;e===Ji;)Ji=xn[--wn],xn[wn]=null,br=xn[--wn],xn[wn]=null,wr=xn[--wn],xn[wn]=null}var on=null,nn=null,We=!1,In=null;function uw(e,t){var n=kn(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 dv(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,on=e,nn=si(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,on=e,nn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ji!==null?{id:wr,overflow:br}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=kn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,on=e,nn=null,!0):!1;default:return!1}}function Bf(e){return(e.mode&1)!==0&&(e.flags&128)===0}function zf(e){if(We){var t=nn;if(t){var n=t;if(!dv(e,t)){if(Bf(e))throw Error(X(418));t=si(n.nextSibling);var r=on;t&&dv(e,t)?uw(r,n):(e.flags=e.flags&-4097|2,We=!1,on=e)}}else{if(Bf(e))throw Error(X(418));e.flags=e.flags&-4097|2,We=!1,on=e}}}function fv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;on=e}function Rl(e){if(e!==on)return!1;if(!We)return fv(e),We=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!If(e.type,e.memoizedProps)),t&&(t=nn)){if(Bf(e))throw dw(),Error(X(418));for(;t;)uw(e,t),t=si(t.nextSibling)}if(fv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(X(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){nn=si(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}nn=null}}else nn=on?si(e.stateNode.nextSibling):null;return!0}function dw(){for(var e=nn;e;)e=si(e.nextSibling)}function po(){nn=on=null,We=!1}function Fh(e){In===null?In=[e]:In.push(e)}var Q_=Mr.ReactCurrentBatchConfig;function Vo(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(X(309));var r=n.stateNode}if(!r)throw Error(X(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(X(284));if(!n._owner)throw Error(X(290,e))}return e}function Pl(e,t){throw e=Object.prototype.toString.call(t),Error(X(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function pv(e){var t=e._init;return t(e._payload)}function fw(e){function t(m,v){if(e){var x=m.deletions;x===null?(m.deletions=[v],m.flags|=16):x.push(v)}}function n(m,v){if(!e)return null;for(;v!==null;)t(m,v),v=v.sibling;return null}function r(m,v){for(m=new Map;v!==null;)v.key!==null?m.set(v.key,v):m.set(v.index,v),v=v.sibling;return m}function i(m,v){return m=ci(m,v),m.index=0,m.sibling=null,m}function s(m,v,x){return m.index=x,e?(x=m.alternate,x!==null?(x=x.index,x<v?(m.flags|=2,v):x):(m.flags|=2,v)):(m.flags|=1048576,v)}function o(m){return e&&m.alternate===null&&(m.flags|=2),m}function a(m,v,x,S){return v===null||v.tag!==6?(v=Ad(x,m.mode,S),v.return=m,v):(v=i(v,x),v.return=m,v)}function l(m,v,x,S){var C=x.type;return C===Cs?d(m,v,x.props.children,S,x.key):v!==null&&(v.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===$r&&pv(C)===v.type)?(S=i(v,x.props),S.ref=Vo(m,v,x),S.return=m,S):(S=oc(x.type,x.key,x.props,null,m.mode,S),S.ref=Vo(m,v,x),S.return=m,S)}function c(m,v,x,S){return v===null||v.tag!==4||v.stateNode.containerInfo!==x.containerInfo||v.stateNode.implementation!==x.implementation?(v=jd(x,m.mode,S),v.return=m,v):(v=i(v,x.children||[]),v.return=m,v)}function d(m,v,x,S,C){return v===null||v.tag!==7?(v=Wi(x,m.mode,S,C),v.return=m,v):(v=i(v,x),v.return=m,v)}function u(m,v,x){if(typeof v=="string"&&v!==""||typeof v=="number")return v=Ad(""+v,m.mode,x),v.return=m,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case wl:return x=oc(v.type,v.key,v.props,null,m.mode,x),x.ref=Vo(m,null,v),x.return=m,x;case Ss:return v=jd(v,m.mode,x),v.return=m,v;case $r:var S=v._init;return u(m,S(v._payload),x)}if(Ko(v)||Lo(v))return v=Wi(v,m.mode,x,null),v.return=m,v;Pl(m,v)}return null}function p(m,v,x,S){var C=v!==null?v.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return C!==null?null:a(m,v,""+x,S);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case wl:return x.key===C?l(m,v,x,S):null;case Ss:return x.key===C?c(m,v,x,S):null;case $r:return C=x._init,p(m,v,C(x._payload),S)}if(Ko(x)||Lo(x))return C!==null?null:d(m,v,x,S,null);Pl(m,x)}return null}function h(m,v,x,S,C){if(typeof S=="string"&&S!==""||typeof S=="number")return m=m.get(x)||null,a(v,m,""+S,C);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case wl:return m=m.get(S.key===null?x:S.key)||null,l(v,m,S,C);case Ss:return m=m.get(S.key===null?x:S.key)||null,c(v,m,S,C);case $r:var _=S._init;return h(m,v,x,_(S._payload),C)}if(Ko(S)||Lo(S))return m=m.get(x)||null,d(v,m,S,C,null);Pl(v,S)}return null}function y(m,v,x,S){for(var C=null,_=null,j=v,A=v=0,E=null;j!==null&&A<x.length;A++){j.index>A?(E=j,j=null):E=j.sibling;var D=p(m,j,x[A],S);if(D===null){j===null&&(j=E);break}e&&j&&D.alternate===null&&t(m,j),v=s(D,v,A),_===null?C=D:_.sibling=D,_=D,j=E}if(A===x.length)return n(m,j),We&&Ti(m,A),C;if(j===null){for(;A<x.length;A++)j=u(m,x[A],S),j!==null&&(v=s(j,v,A),_===null?C=j:_.sibling=j,_=j);return We&&Ti(m,A),C}for(j=r(m,j);A<x.length;A++)E=h(j,m,A,x[A],S),E!==null&&(e&&E.alternate!==null&&j.delete(E.key===null?A:E.key),v=s(E,v,A),_===null?C=E:_.sibling=E,_=E);return e&&j.forEach(function(L){return t(m,L)}),We&&Ti(m,A),C}function w(m,v,x,S){var C=Lo(x);if(typeof C!="function")throw Error(X(150));if(x=C.call(x),x==null)throw Error(X(151));for(var _=C=null,j=v,A=v=0,E=null,D=x.next();j!==null&&!D.done;A++,D=x.next()){j.index>A?(E=j,j=null):E=j.sibling;var L=p(m,j,D.value,S);if(L===null){j===null&&(j=E);break}e&&j&&L.alternate===null&&t(m,j),v=s(L,v,A),_===null?C=L:_.sibling=L,_=L,j=E}if(D.done)return n(m,j),We&&Ti(m,A),C;if(j===null){for(;!D.done;A++,D=x.next())D=u(m,D.value,S),D!==null&&(v=s(D,v,A),_===null?C=D:_.sibling=D,_=D);return We&&Ti(m,A),C}for(j=r(m,j);!D.done;A++,D=x.next())D=h(j,m,A,D.value,S),D!==null&&(e&&D.alternate!==null&&j.delete(D.key===null?A:D.key),v=s(D,v,A),_===null?C=D:_.sibling=D,_=D);return e&&j.forEach(function(O){return t(m,O)}),We&&Ti(m,A),C}function b(m,v,x,S){if(typeof x=="object"&&x!==null&&x.type===Cs&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case wl:e:{for(var C=x.key,_=v;_!==null;){if(_.key===C){if(C=x.type,C===Cs){if(_.tag===7){n(m,_.sibling),v=i(_,x.props.children),v.return=m,m=v;break e}}else if(_.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===$r&&pv(C)===_.type){n(m,_.sibling),v=i(_,x.props),v.ref=Vo(m,_,x),v.return=m,m=v;break e}n(m,_);break}else t(m,_);_=_.sibling}x.type===Cs?(v=Wi(x.props.children,m.mode,S,x.key),v.return=m,m=v):(S=oc(x.type,x.key,x.props,null,m.mode,S),S.ref=Vo(m,v,x),S.return=m,m=S)}return o(m);case Ss:e:{for(_=x.key;v!==null;){if(v.key===_)if(v.tag===4&&v.stateNode.containerInfo===x.containerInfo&&v.stateNode.implementation===x.implementation){n(m,v.sibling),v=i(v,x.children||[]),v.return=m,m=v;break e}else{n(m,v);break}else t(m,v);v=v.sibling}v=jd(x,m.mode,S),v.return=m,m=v}return o(m);case $r:return _=x._init,b(m,v,_(x._payload),S)}if(Ko(x))return y(m,v,x,S);if(Lo(x))return w(m,v,x,S);Pl(m,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,v!==null&&v.tag===6?(n(m,v.sibling),v=i(v,x),v.return=m,m=v):(n(m,v),v=Ad(x,m.mode,S),v.return=m,m=v),o(m)):n(m,v)}return b}var ho=fw(!0),pw=fw(!1),Pc=yi(null),Mc=null,Ms=null,$h=null;function Bh(){$h=Ms=Mc=null}function zh(e){var t=Pc.current;Ue(Pc),e._currentValue=t}function Vf(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 qs(e,t){Mc=e,$h=Ms=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(qt=!0),e.firstContext=null)}function _n(e){var t=e._currentValue;if($h!==e)if(e={context:e,memoizedValue:t,next:null},Ms===null){if(Mc===null)throw Error(X(308));Ms=e,Mc.dependencies={lanes:0,firstContext:e}}else Ms=Ms.next=e;return t}var Mi=null;function Vh(e){Mi===null?Mi=[e]:Mi.push(e)}function hw(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Vh(t)):(n.next=i.next,i.next=n),t.interleaved=n,Tr(e,r)}function Tr(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 Br=!1;function Uh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function mw(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 kr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function oi(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ae&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Tr(e,n)}return i=r.interleaved,i===null?(t.next=t,Vh(r)):(t.next=i.next,i.next=t),r.interleaved=t,Tr(e,n)}function ec(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,Ah(e,n)}}function hv(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 Nc(e,t,n,r){var i=e.updateQueue;Br=!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 p=a.lane,h=a.eventTime;if((r&p)===p){d!==null&&(d=d.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=e,w=a;switch(p=t,h=n,w.tag){case 1:if(y=w.payload,typeof y=="function"){u=y.call(h,u,p);break e}u=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=w.payload,p=typeof y=="function"?y.call(h,u,p):y,p==null)break e;u=Ke({},u,p);break e;case 2:Br=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[a]:p.push(a))}else h={eventTime:h,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=h,l=u):d=d.next=h,o|=p;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;p=a,a=p.next,p.next=null,i.lastBaseUpdate=p,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);ts|=o,e.lanes=o,e.memoizedState=u}}function mv(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(X(191,i));i.call(r)}}}var al={},nr=yi(al),Ma=yi(al),Na=yi(al);function Ni(e){if(e===al)throw Error(X(174));return e}function Hh(e,t){switch($e(Na,t),$e(Ma,e),$e(nr,al),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:kf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=kf(t,e)}Ue(nr),$e(nr,t)}function mo(){Ue(nr),Ue(Ma),Ue(Na)}function gw(e){Ni(Na.current);var t=Ni(nr.current),n=kf(t,e.type);t!==n&&($e(Ma,e),$e(nr,n))}function Wh(e){Ma.current===e&&(Ue(nr),Ue(Ma))}var Ge=yi(0);function Oc(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 kd=[];function qh(){for(var e=0;e<kd.length;e++)kd[e]._workInProgressVersionPrimary=null;kd.length=0}var tc=Mr.ReactCurrentDispatcher,Sd=Mr.ReactCurrentBatchConfig,es=0,Qe=null,lt=null,pt=null,Dc=!1,ua=!1,Oa=0,K_=0;function Ct(){throw Error(X(321))}function Gh(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Vn(e[n],t[n]))return!1;return!0}function Yh(e,t,n,r,i,s){if(es=s,Qe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,tc.current=e===null||e.memoizedState===null?eT:tT,e=n(r,i),ua){s=0;do{if(ua=!1,Oa=0,25<=s)throw Error(X(301));s+=1,pt=lt=null,t.updateQueue=null,tc.current=nT,e=n(r,i)}while(ua)}if(tc.current=Ic,t=lt!==null&&lt.next!==null,es=0,pt=lt=Qe=null,Dc=!1,t)throw Error(X(300));return e}function Qh(){var e=Oa!==0;return Oa=0,e}function Yn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pt===null?Qe.memoizedState=pt=e:pt=pt.next=e,pt}function Tn(){if(lt===null){var e=Qe.alternate;e=e!==null?e.memoizedState:null}else e=lt.next;var t=pt===null?Qe.memoizedState:pt.next;if(t!==null)pt=t,lt=e;else{if(e===null)throw Error(X(310));lt=e,e={memoizedState:lt.memoizedState,baseState:lt.baseState,baseQueue:lt.baseQueue,queue:lt.queue,next:null},pt===null?Qe.memoizedState=pt=e:pt=pt.next=e}return pt}function Da(e,t){return typeof t=="function"?t(e):t}function Cd(e){var t=Tn(),n=t.queue;if(n===null)throw Error(X(311));n.lastRenderedReducer=e;var r=lt,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((es&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,Qe.lanes|=d,ts|=d}c=c.next}while(c!==null&&c!==s);l===null?o=r:l.next=a,Vn(r,t.memoizedState)||(qt=!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,Qe.lanes|=s,ts|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function _d(e){var t=Tn(),n=t.queue;if(n===null)throw Error(X(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);Vn(s,t.memoizedState)||(qt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function vw(){}function yw(e,t){var n=Qe,r=Tn(),i=t(),s=!Vn(r.memoizedState,i);if(s&&(r.memoizedState=i,qt=!0),r=r.queue,Kh(bw.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||pt!==null&&pt.memoizedState.tag&1){if(n.flags|=2048,Ia(9,ww.bind(null,n,r,i,t),void 0,null),ht===null)throw Error(X(349));es&30||xw(n,t,i)}return i}function xw(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Qe.updateQueue,t===null?(t={lastEffect:null,stores:null},Qe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ww(e,t,n,r){t.value=n,t.getSnapshot=r,kw(t)&&Sw(e)}function bw(e,t,n){return n(function(){kw(t)&&Sw(e)})}function kw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Vn(e,n)}catch{return!0}}function Sw(e){var t=Tr(e,1);t!==null&&Bn(t,e,1,-1)}function gv(e){var t=Yn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Da,lastRenderedState:e},t.queue=e,e=e.dispatch=J_.bind(null,Qe,e),[t.memoizedState,e]}function Ia(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Qe.updateQueue,t===null?(t={lastEffect:null,stores:null},Qe.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 Cw(){return Tn().memoizedState}function nc(e,t,n,r){var i=Yn();Qe.flags|=e,i.memoizedState=Ia(1|t,n,void 0,r===void 0?null:r)}function mu(e,t,n,r){var i=Tn();r=r===void 0?null:r;var s=void 0;if(lt!==null){var o=lt.memoizedState;if(s=o.destroy,r!==null&&Gh(r,o.deps)){i.memoizedState=Ia(t,n,s,r);return}}Qe.flags|=e,i.memoizedState=Ia(1|t,n,s,r)}function vv(e,t){return nc(8390656,8,e,t)}function Kh(e,t){return mu(2048,8,e,t)}function _w(e,t){return mu(4,2,e,t)}function Tw(e,t){return mu(4,4,e,t)}function Ew(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 Aw(e,t,n){return n=n!=null?n.concat([e]):null,mu(4,4,Ew.bind(null,t,e),n)}function Xh(){}function jw(e,t){var n=Tn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Gh(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Rw(e,t){var n=Tn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Gh(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Pw(e,t,n){return es&21?(Vn(n,t)||(n=I1(),Qe.lanes|=n,ts|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,qt=!0),e.memoizedState=n)}function X_(e,t){var n=Pe;Pe=n!==0&&4>n?n:4,e(!0);var r=Sd.transition;Sd.transition={};try{e(!1),t()}finally{Pe=n,Sd.transition=r}}function Mw(){return Tn().memoizedState}function Z_(e,t,n){var r=li(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Nw(e))Ow(t,n);else if(n=hw(e,t,n,r),n!==null){var i=It();Bn(n,e,r,i),Dw(n,t,r)}}function J_(e,t,n){var r=li(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Nw(e))Ow(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,Vn(a,o)){var l=t.interleaved;l===null?(i.next=i,Vh(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=hw(e,t,i,r),n!==null&&(i=It(),Bn(n,e,r,i),Dw(n,t,r))}}function Nw(e){var t=e.alternate;return e===Qe||t!==null&&t===Qe}function Ow(e,t){ua=Dc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Dw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ah(e,n)}}var Ic={readContext:_n,useCallback:Ct,useContext:Ct,useEffect:Ct,useImperativeHandle:Ct,useInsertionEffect:Ct,useLayoutEffect:Ct,useMemo:Ct,useReducer:Ct,useRef:Ct,useState:Ct,useDebugValue:Ct,useDeferredValue:Ct,useTransition:Ct,useMutableSource:Ct,useSyncExternalStore:Ct,useId:Ct,unstable_isNewReconciler:!1},eT={readContext:_n,useCallback:function(e,t){return Yn().memoizedState=[e,t===void 0?null:t],e},useContext:_n,useEffect:vv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,nc(4194308,4,Ew.bind(null,t,e),n)},useLayoutEffect:function(e,t){return nc(4194308,4,e,t)},useInsertionEffect:function(e,t){return nc(4,2,e,t)},useMemo:function(e,t){var n=Yn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Yn();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=Z_.bind(null,Qe,e),[r.memoizedState,e]},useRef:function(e){var t=Yn();return e={current:e},t.memoizedState=e},useState:gv,useDebugValue:Xh,useDeferredValue:function(e){return Yn().memoizedState=e},useTransition:function(){var e=gv(!1),t=e[0];return e=X_.bind(null,e[1]),Yn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Qe,i=Yn();if(We){if(n===void 0)throw Error(X(407));n=n()}else{if(n=t(),ht===null)throw Error(X(349));es&30||xw(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,vv(bw.bind(null,r,s,e),[e]),r.flags|=2048,Ia(9,ww.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Yn(),t=ht.identifierPrefix;if(We){var n=br,r=wr;n=(r&~(1<<32-$n(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Oa++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=K_++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},tT={readContext:_n,useCallback:jw,useContext:_n,useEffect:Kh,useImperativeHandle:Aw,useInsertionEffect:_w,useLayoutEffect:Tw,useMemo:Rw,useReducer:Cd,useRef:Cw,useState:function(){return Cd(Da)},useDebugValue:Xh,useDeferredValue:function(e){var t=Tn();return Pw(t,lt.memoizedState,e)},useTransition:function(){var e=Cd(Da)[0],t=Tn().memoizedState;return[e,t]},useMutableSource:vw,useSyncExternalStore:yw,useId:Mw,unstable_isNewReconciler:!1},nT={readContext:_n,useCallback:jw,useContext:_n,useEffect:Kh,useImperativeHandle:Aw,useInsertionEffect:_w,useLayoutEffect:Tw,useMemo:Rw,useReducer:_d,useRef:Cw,useState:function(){return _d(Da)},useDebugValue:Xh,useDeferredValue:function(e){var t=Tn();return lt===null?t.memoizedState=e:Pw(t,lt.memoizedState,e)},useTransition:function(){var e=_d(Da)[0],t=Tn().memoizedState;return[e,t]},useMutableSource:vw,useSyncExternalStore:yw,useId:Mw,unstable_isNewReconciler:!1};function Mn(e,t){if(e&&e.defaultProps){t=Ke({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Uf(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ke({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var gu={isMounted:function(e){return(e=e._reactInternals)?as(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=It(),i=li(e),s=kr(r,i);s.payload=t,n!=null&&(s.callback=n),t=oi(e,s,i),t!==null&&(Bn(t,e,i,r),ec(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=It(),i=li(e),s=kr(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=oi(e,s,i),t!==null&&(Bn(t,e,i,r),ec(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=It(),r=li(e),i=kr(n,r);i.tag=2,t!=null&&(i.callback=t),t=oi(e,i,r),t!==null&&(Bn(t,e,r,n),ec(t,e,r))}};function yv(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?!Aa(n,r)||!Aa(i,s):!0}function Iw(e,t,n){var r=!1,i=pi,s=t.contextType;return typeof s=="object"&&s!==null?s=_n(s):(i=Yt(t)?Zi:Pt.current,r=t.contextTypes,s=(r=r!=null)?fo(e,i):pi),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=gu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function xv(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&&gu.enqueueReplaceState(t,t.state,null)}function Hf(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Uh(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=_n(s):(s=Yt(t)?Zi:Pt.current,i.context=fo(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Uf(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&&gu.enqueueReplaceState(i,i.state,null),Nc(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function go(e,t){try{var n="",r=t;do n+=R2(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 kd(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 q_=typeof WeakMap=="function"?WeakMap:Map;function Tw(e,t,n){n=kr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Nc||(Nc=!0,Kf=r),$f(e,t)},n}function Ew(e,t,n){n=kr(-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"&&(oi===null?oi=new Set([this]):oi.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function pv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new q_;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=oT.bind(null,e,t,n),t.then(e,e))}function hv(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 mv(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=kr(-1,1),t.tag=2,si(n,t,1))),n.lanes|=1),e)}var G_=Pr.ReactCurrentOwner,qt=!1;function Nt(e,t,n,r){t.child=e===null?nw(t,null,n,r):co(t,e.child,n,r)}function gv(e,t,n,r,i){n=n.render;var s=t.ref;return Hs(t,i),r=Vh(e,t,n,r,s,i),n=Uh(),e!==null&&!qt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Er(e,t,i)):(We&&n&&Rh(t),t.flags|=1,Nt(e,t,r,i),t.child)}function vv(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!Jh(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Aw(e,t,s,r,i)):(e=nc(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:Ca,n(o,r)&&e.ref===t.ref)return Er(e,t,i)}return t.flags|=1,e=li(s,r),e.ref=t.ref,e.return=t,t.child=e}function Aw(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Ca(s,r)&&e.ref===t.ref)if(qt=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(qt=!0);else return t.lanes=e.lanes,Er(e,t,i)}return zf(e,t,n,r,i)}function jw(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},Le(Os,Jt),Jt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Le(Os,Jt),Jt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Le(Os,Jt),Jt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,Le(Os,Jt),Jt|=r;return Nt(e,t,i,n),t.child}function Rw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function zf(e,t,n,r,i){var s=Yt(n)?Xi:Pt.current;return s=ao(t,s),Hs(t,i),n=Vh(e,t,n,r,s,i),r=Uh(),e!==null&&!qt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Er(e,t,i)):(We&&r&&Rh(t),t.flags|=1,Nt(e,t,n,i),t.child)}function yv(e,t,n,r,i){if(Yt(n)){var s=!0;Cc(t)}else s=!1;if(Hs(t,i),t.stateNode===null)Jl(e,t),_w(t,n,r),Bf(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=_n(c):(c=Yt(n)?Xi:Pt.current,c=ao(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)&&fv(t,o,r,c),Br=!1;var p=t.memoizedState;o.state=p,jc(t,r,o,i),l=t.memoizedState,a!==r||p!==l||Gt.current||Br?(typeof d=="function"&&(Ff(t,n,d,r),l=t.memoizedState),(a=Br||dv(t,n,a,r,p,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,iw(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Mn(t.type,a),o.props=c,u=t.pendingProps,p=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=_n(l):(l=Yt(n)?Xi:Pt.current,l=ao(t,l));var h=n.getDerivedStateFromProps;(d=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==u||p!==l)&&fv(t,o,r,l),Br=!1,p=t.memoizedState,o.state=p,jc(t,r,o,i);var y=t.memoizedState;a!==u||p!==y||Gt.current||Br?(typeof h=="function"&&(Ff(t,n,h,r),y=t.memoizedState),(c=Br||dv(t,n,c,r,p,y,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,y,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,y,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),o.props=r,o.state=y,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Vf(e,t,n,r,s,i)}function Vf(e,t,n,r,i,s){Rw(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&rv(t,n,!1),Er(e,t,s);r=t.stateNode,G_.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=co(t,e.child,null,s),t.child=co(t,null,a,s)):Nt(e,t,a,s),t.memoizedState=r.state,i&&rv(t,n,!0),t.child}function Pw(e){var t=e.stateNode;t.pendingContext?nv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&nv(e,t.context,!1),Fh(e,t.containerInfo)}function xv(e,t,n,r,i){return lo(),Mh(i),t.flags|=256,Nt(e,t,n,r),t.child}var Uf={dehydrated:null,treeContext:null,retryLane:0};function Hf(e){return{baseLanes:e,cachePool:null,transitions:null}}function Mw(e,t,n){var r=t.pendingProps,i=Ye.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),Le(Ye,i&1),e===null)return If(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=mu(o,r,0,null),e=Wi(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Hf(n),t.memoizedState=Uf,e):qh(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return Y_(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=li(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=li(a,s):(s=Wi(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?Hf(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=Uf,r}return s=e.child,e=s.sibling,r=li(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 qh(e,t){return t=mu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Al(e,t,n,r){return r!==null&&Mh(r),co(t,e.child,null,n),e=qh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Y_(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=kd(Error(Q(422))),Al(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=mu({mode:"visible",children:r.children},i,0,null),s=Wi(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&co(t,e.child,null,o),t.child.memoizedState=Hf(o),t.memoizedState=Uf,s);if(!(t.mode&1))return Al(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(Q(419)),r=kd(s,r,void 0),Al(e,t,o,r)}if(a=(o&e.childLanes)!==0,qt||a){if(r=mt,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,Tr(e,i),$n(r,e,i,-1))}return Zh(),r=kd(Error(Q(421))),Al(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=aT.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,nn=ii(i.nextSibling),on=t,We=!0,In=null,e!==null&&(xn[wn++]=wr,xn[wn++]=br,xn[wn++]=Zi,wr=e.id,br=e.overflow,Zi=t),t=qh(t,r.children),t.flags|=4096,t)}function wv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Lf(e.return,t,n)}function Sd(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 Ow(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(Nt(e,t,r.children,n),r=Ye.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&&wv(e,n,t);else if(e.tag===19)wv(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(Le(Ye,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&&Rc(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Sd(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&&Rc(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Sd(t,!0,n,null,s);break;case"together":Sd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Jl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Er(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),es|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Q(153));if(t.child!==null){for(e=t.child,n=li(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=li(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Q_(e,t,n){switch(t.tag){case 3:Pw(t),lo();break;case 5:sw(t);break;case 1:Yt(t.type)&&Cc(t);break;case 4:Fh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Le(Ec,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Le(Ye,Ye.current&1),t.flags|=128,null):n&t.child.childLanes?Mw(e,t,n):(Le(Ye,Ye.current&1),e=Er(e,t,n),e!==null?e.sibling:null);Le(Ye,Ye.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Ow(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Le(Ye,Ye.current),r)break;return null;case 22:case 23:return t.lanes=0,jw(e,t,n)}return Er(e,t,n)}var Nw,Wf,Dw,Iw;Nw=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}};Wf=function(){};Dw=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Oi(nr.current);var s=null;switch(n){case"input":i=pf(e,i),r=pf(e,r),s=[];break;case"select":i=Xe({},i,{value:void 0}),r=Xe({},r,{value:void 0}),s=[];break;case"textarea":i=gf(e,i),r=gf(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=kc)}yf(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"&&(va.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"&&(va.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Be("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)}};Iw=function(e,t,n,r){n!==r&&(t.flags|=4)};function Bo(e,t){if(!We)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 _t(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 K_(e,t,n){var r=t.pendingProps;switch(Ph(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _t(t),null;case 1:return Yt(t.type)&&Sc(),_t(t),null;case 3:return r=t.stateNode,uo(),ze(Gt),ze(Pt),$h(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Tl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,In!==null&&(Jf(In),In=null))),Wf(e,t),_t(t),null;case 5:Bh(t);var i=Oi(ja.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(Q(166));return _t(t),null}if(e=Oi(nr.current),Tl(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[er]=t,r[Ea]=s,e=(t.mode&1)!==0,n){case"dialog":Be("cancel",r),Be("close",r);break;case"iframe":case"object":case"embed":Be("load",r);break;case"video":case"audio":for(i=0;i<Yo.length;i++)Be(Yo[i],r);break;case"source":Be("error",r);break;case"img":case"image":case"link":Be("error",r),Be("load",r);break;case"details":Be("toggle",r);break;case"input":jg(r,s),Be("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Be("invalid",r);break;case"textarea":Pg(r,s),Be("invalid",r)}yf(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&&_l(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&_l(r.textContent,a,e),i=["children",""+a]):va.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&Be("scroll",r)}switch(n){case"input":vl(r),Rg(r,s,!0);break;case"textarea":vl(r),Mg(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=kc)}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=u1(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[er]=t,e[Ea]=r,Nw(e,t,!1,!1),t.stateNode=e;e:{switch(o=xf(n,r),n){case"dialog":Be("cancel",e),Be("close",e),i=r;break;case"iframe":case"object":case"embed":Be("load",e),i=r;break;case"video":case"audio":for(i=0;i<Yo.length;i++)Be(Yo[i],e);i=r;break;case"source":Be("error",e),i=r;break;case"img":case"image":case"link":Be("error",e),Be("load",e),i=r;break;case"details":Be("toggle",e),i=r;break;case"input":jg(e,r),i=pf(e,r),Be("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Xe({},r,{value:void 0}),Be("invalid",e);break;case"textarea":Pg(e,r),i=gf(e,r),Be("invalid",e);break;default:i=r}yf(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?p1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&d1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&ya(e,l):typeof l=="number"&&ya(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(va.hasOwnProperty(s)?l!=null&&s==="onScroll"&&Be("scroll",e):l!=null&&gh(e,s,l,o))}switch(n){case"input":vl(e),Rg(e,r,!1);break;case"textarea":vl(e),Mg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+di(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?$s(e,!!r.multiple,s,!1):r.defaultValue!=null&&$s(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=kc)}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 _t(t),null;case 6:if(e&&t.stateNode!=null)Iw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Q(166));if(n=Oi(ja.current),Oi(nr.current),Tl(t)){if(r=t.stateNode,n=t.memoizedProps,r[er]=t,(s=r.nodeValue!==n)&&(e=on,e!==null))switch(e.tag){case 3:_l(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&_l(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[er]=t,t.stateNode=r}return _t(t),null;case 13:if(ze(Ye),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(We&&nn!==null&&t.mode&1&&!(t.flags&128))ew(),lo(),t.flags|=98560,s=!1;else if(s=Tl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(Q(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(Q(317));s[er]=t}else lo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;_t(t),s=!1}else In!==null&&(Jf(In),In=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||Ye.current&1?dt===0&&(dt=3):Zh())),t.updateQueue!==null&&(t.flags|=4),_t(t),null);case 4:return uo(),Wf(e,t),e===null&&_a(t.stateNode.containerInfo),_t(t),null;case 10:return Dh(t.type._context),_t(t),null;case 17:return Yt(t.type)&&Sc(),_t(t),null;case 19:if(ze(Ye),s=t.memoizedState,s===null)return _t(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)Bo(s,!1);else{if(dt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Rc(e),o!==null){for(t.flags|=128,Bo(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 Le(Ye,Ye.current&1|2),t.child}e=e.sibling}s.tail!==null&&it()>po&&(t.flags|=128,r=!0,Bo(s,!1),t.lanes=4194304)}else{if(!r)if(e=Rc(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Bo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!We)return _t(t),null}else 2*it()-s.renderingStartTime>po&&n!==1073741824&&(t.flags|=128,r=!0,Bo(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=it(),t.sibling=null,n=Ye.current,Le(Ye,r?n&1|2:n&1),t):(_t(t),null);case 22:case 23:return Xh(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Jt&1073741824&&(_t(t),t.subtreeFlags&6&&(t.flags|=8192)):_t(t),null;case 24:return null;case 25:return null}throw Error(Q(156,t.tag))}function X_(e,t){switch(Ph(t),t.tag){case 1:return Yt(t.type)&&Sc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return uo(),ze(Gt),ze(Pt),$h(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Bh(t),null;case 13:if(ze(Ye),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Q(340));lo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ze(Ye),null;case 4:return uo(),null;case 10:return Dh(t.type._context),null;case 22:case 23:return Xh(),null;case 24:return null;default:return null}}var jl=!1,At=!1,Z_=typeof WeakSet=="function"?WeakSet:Set,le=null;function Ms(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){tt(e,t,r)}else n.current=null}function qf(e,t,n){try{n()}catch(r){tt(e,t,r)}}var bv=!1;function J_(e,t){if(jf=xc,e=z1(),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,c=0,d=0,u=e,p=null;t:for(;;){for(var h;u!==n||i!==0&&u.nodeType!==3||(a=o+i),u!==s||r!==0&&u.nodeType!==3||(l=o+r),u.nodeType===3&&(o+=u.nodeValue.length),(h=u.firstChild)!==null;)p=u,u=h;for(;;){if(u===e)break t;if(p===n&&++c===i&&(a=o),p===s&&++d===r&&(l=o),(h=u.nextSibling)!==null)break;u=p,p=u.parentNode}u=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Rf={focusedElem:e,selectionRange:n},xc=!1,le=t;le!==null;)if(t=le,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,le=e;else for(;le!==null;){t=le;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var x=y.memoizedProps,w=y.memoizedState,m=t.stateNode,g=m.getSnapshotBeforeUpdate(t.elementType===t.type?x:Mn(t.type,x),w);m.__reactInternalSnapshotBeforeUpdate=g}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(Q(163))}}catch(C){tt(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,le=e;break}le=t.return}return y=bv,bv=!1,y}function oa(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&&qf(t,n,s)}i=i.next}while(i!==r)}}function pu(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 Gf(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 Lw(e){var t=e.alternate;t!==null&&(e.alternate=null,Lw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[er],delete t[Ea],delete t[Of],delete t[D_],delete t[I_])),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 Fw(e){return e.tag===5||e.tag===3||e.tag===4}function kv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Fw(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 Yf(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=kc));else if(r!==4&&(e=e.child,e!==null))for(Yf(e,t,n),e=e.sibling;e!==null;)Yf(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 xt=null,Nn=!1;function Dr(e,t,n){for(n=n.child;n!==null;)Bw(e,t,n),n=n.sibling}function Bw(e,t,n){if(tr&&typeof tr.onCommitFiberUnmount=="function")try{tr.onCommitFiberUnmount(su,n)}catch{}switch(n.tag){case 5:At||Ms(n,t);case 6:var r=xt,i=Nn;xt=null,Dr(e,t,n),xt=r,Nn=i,xt!==null&&(Nn?(e=xt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):xt.removeChild(n.stateNode));break;case 18:xt!==null&&(Nn?(e=xt,n=n.stateNode,e.nodeType===8?gd(e.parentNode,n):e.nodeType===1&&gd(e,n),ka(e)):gd(xt,n.stateNode));break;case 4:r=xt,i=Nn,xt=n.stateNode.containerInfo,Nn=!0,Dr(e,t,n),xt=r,Nn=i;break;case 0:case 11:case 14:case 15:if(!At&&(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)&&qf(n,t,o),i=i.next}while(i!==r)}Dr(e,t,n);break;case 1:if(!At&&(Ms(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){tt(n,t,a)}Dr(e,t,n);break;case 21:Dr(e,t,n);break;case 22:n.mode&1?(At=(r=At)||n.memoizedState!==null,Dr(e,t,n),At=r):Dr(e,t,n);break;default:Dr(e,t,n)}}function Sv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Z_),t.forEach(function(r){var i=lT.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function jn(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:xt=a.stateNode,Nn=!1;break e;case 3:xt=a.stateNode.containerInfo,Nn=!0;break e;case 4:xt=a.stateNode.containerInfo,Nn=!0;break e}a=a.return}if(xt===null)throw Error(Q(160));Bw(s,o,i),xt=null,Nn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){tt(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)$w(t,e),t=t.sibling}function $w(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(jn(t,e),Wn(e),r&4){try{oa(3,e,e.return),pu(3,e)}catch(x){tt(e,e.return,x)}try{oa(5,e,e.return)}catch(x){tt(e,e.return,x)}}break;case 1:jn(t,e),Wn(e),r&512&&n!==null&&Ms(n,n.return);break;case 5:if(jn(t,e),Wn(e),r&512&&n!==null&&Ms(n,n.return),e.flags&32){var i=e.stateNode;try{ya(i,"")}catch(x){tt(e,e.return,x)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&l1(i,s),xf(a,o);var c=xf(a,s);for(o=0;o<l.length;o+=2){var d=l[o],u=l[o+1];d==="style"?p1(i,u):d==="dangerouslySetInnerHTML"?d1(i,u):d==="children"?ya(i,u):gh(i,d,u,c)}switch(a){case"input":hf(i,s);break;case"textarea":c1(i,s);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?$s(i,!!s.multiple,h,!1):p!==!!s.multiple&&(s.defaultValue!=null?$s(i,!!s.multiple,s.defaultValue,!0):$s(i,!!s.multiple,s.multiple?[]:"",!1))}i[Ea]=s}catch(x){tt(e,e.return,x)}}break;case 6:if(jn(t,e),Wn(e),r&4){if(e.stateNode===null)throw Error(Q(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(x){tt(e,e.return,x)}}break;case 3:if(jn(t,e),Wn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ka(t.containerInfo)}catch(x){tt(e,e.return,x)}break;case 4:jn(t,e),Wn(e);break;case 13:jn(t,e),Wn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Qh=it())),r&4&&Sv(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(At=(c=At)||d,jn(t,e),At=c):jn(t,e),Wn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(le=e,d=e.child;d!==null;){for(u=le=d;le!==null;){switch(p=le,h=p.child,p.tag){case 0:case 11:case 14:case 15:oa(4,p,p.return);break;case 1:Ms(p,p.return);var y=p.stateNode;if(typeof y.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(x){tt(r,n,x)}}break;case 5:Ms(p,p.return);break;case 22:if(p.memoizedState!==null){_v(u);continue}}h!==null?(h.return=p,le=h):_v(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=f1("display",o))}catch(x){tt(e,e.return,x)}}}else if(u.tag===6){if(d===null)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(x){tt(e,e.return,x)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===e)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;u.sibling===null;){if(u.return===null||u.return===e)break e;d===u&&(d=null),u=u.return}d===u&&(d=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:jn(t,e),Wn(e),r&4&&Sv(e);break;case 21:break;default:jn(t,e),Wn(e)}}function Wn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Fw(n)){var r=n;break e}n=n.return}throw Error(Q(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(ya(i,""),r.flags&=-33);var s=kv(e);Qf(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=kv(e);Yf(e,a,o);break;default:throw Error(Q(161))}}catch(l){tt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function eT(e,t,n){le=e,zw(e)}function zw(e,t,n){for(var r=(e.mode&1)!==0;le!==null;){var i=le,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||jl;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||At;a=jl;var c=At;if(jl=o,(At=l)&&!c)for(le=i;le!==null;)o=le,l=o.child,o.tag===22&&o.memoizedState!==null?Tv(i):l!==null?(l.return=o,le=l):Tv(i);for(;s!==null;)le=s,zw(s),s=s.sibling;le=i,jl=a,At=c}Cv(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,le=s):Cv(e)}}function Cv(e){for(;le!==null;){var t=le;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:At||pu(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!At)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Mn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&lv(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}lv(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&&ka(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Q(163))}At||t.flags&512&&Gf(t)}catch(p){tt(t,t.return,p)}}if(t===e){le=null;break}if(n=t.sibling,n!==null){n.return=t.return,le=n;break}le=t.return}}function _v(e){for(;le!==null;){var t=le;if(t===e){le=null;break}var n=t.sibling;if(n!==null){n.return=t.return,le=n;break}le=t.return}}function Tv(e){for(;le!==null;){var t=le;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{pu(4,t)}catch(l){tt(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){tt(t,i,l)}}var s=t.return;try{Gf(t)}catch(l){tt(t,s,l)}break;case 5:var o=t.return;try{Gf(t)}catch(l){tt(t,o,l)}}}catch(l){tt(t,t.return,l)}if(t===e){le=null;break}var a=t.sibling;if(a!==null){a.return=t.return,le=a;break}le=t.return}}var tT=Math.ceil,Oc=Pr.ReactCurrentDispatcher,Gh=Pr.ReactCurrentOwner,Sn=Pr.ReactCurrentBatchConfig,Ae=0,mt=null,ot=null,bt=0,Jt=0,Os=yi(0),dt=0,Oa=null,es=0,hu=0,Yh=0,aa=null,Ht=null,Qh=0,po=1/0,gr=null,Nc=!1,Kf=null,oi=null,Rl=!1,Jr=null,Dc=0,la=0,Xf=null,ec=-1,tc=0;function It(){return Ae&6?it():ec!==-1?ec:ec=it()}function ai(e){return e.mode&1?Ae&2&&bt!==0?bt&-bt:F_.transition!==null?(tc===0&&(tc=_1()),tc):(e=Pe,e!==0||(e=window.event,e=e===void 0?16:M1(e.type)),e):1}function $n(e,t,n,r){if(50<la)throw la=0,Xf=null,Error(Q(185));el(e,n,r),(!(Ae&2)||e!==mt)&&(e===mt&&(!(Ae&2)&&(hu|=n),dt===4&&Vr(e,bt)),Qt(e,r),n===1&&Ae===0&&!(t.mode&1)&&(po=it()+500,uu&&xi()))}function Qt(e,t){var n=e.callbackNode;F2(e,t);var r=yc(e,e===mt?bt:0);if(r===0)n!==null&&Dg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Dg(n),t===1)e.tag===0?L_(Ev.bind(null,e)):X1(Ev.bind(null,e)),O_(function(){!(Ae&6)&&xi()}),n=null;else{switch(T1(r)){case 1:n=bh;break;case 4:n=S1;break;case 16:n=vc;break;case 536870912:n=C1;break;default:n=vc}n=Qw(n,Vw.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Vw(e,t){if(ec=-1,tc=0,Ae&6)throw Error(Q(327));var n=e.callbackNode;if(Ws()&&e.callbackNode!==n)return null;var r=yc(e,e===mt?bt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Ic(e,r);else{t=r;var i=Ae;Ae|=2;var s=Hw();(mt!==e||bt!==t)&&(gr=null,po=it()+500,Hi(e,t));do try{iT();break}catch(a){Uw(e,a)}while(!0);Nh(),Oc.current=s,Ae=i,ot!==null?t=0:(mt=null,bt=0,t=dt)}if(t!==0){if(t===2&&(i=Cf(e),i!==0&&(r=i,t=Zf(e,i))),t===1)throw n=Oa,Hi(e,0),Vr(e,r),Qt(e,it()),n;if(t===6)Vr(e,r);else{if(i=e.current.alternate,!(r&30)&&!nT(i)&&(t=Ic(e,r),t===2&&(s=Cf(e),s!==0&&(r=s,t=Zf(e,s))),t===1))throw n=Oa,Hi(e,0),Vr(e,r),Qt(e,it()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Q(345));case 2:Ei(e,Ht,gr);break;case 3:if(Vr(e,r),(r&130023424)===r&&(t=Qh+500-it(),10<t)){if(yc(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){It(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Mf(Ei.bind(null,e,Ht,gr),t);break}Ei(e,Ht,gr);break;case 4:if(Vr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-Bn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=it()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*tT(r/1960))-r,10<r){e.timeoutHandle=Mf(Ei.bind(null,e,Ht,gr),r);break}Ei(e,Ht,gr);break;case 5:Ei(e,Ht,gr);break;default:throw Error(Q(329))}}}return Qt(e,it()),e.callbackNode===n?Vw.bind(null,e):null}function Zf(e,t){var n=aa;return e.current.memoizedState.isDehydrated&&(Hi(e,t).flags|=256),e=Ic(e,t),e!==2&&(t=Ht,Ht=n,t!==null&&Jf(t)),e}function Jf(e){Ht===null?Ht=e:Ht.push.apply(Ht,e)}function nT(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(!Vn(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 Vr(e,t){for(t&=~Yh,t&=~hu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Bn(t),r=1<<n;e[n]=-1,t&=~r}}function Ev(e){if(Ae&6)throw Error(Q(327));Ws();var t=yc(e,0);if(!(t&1))return Qt(e,it()),null;var n=Ic(e,t);if(e.tag!==0&&n===2){var r=Cf(e);r!==0&&(t=r,n=Zf(e,r))}if(n===1)throw n=Oa,Hi(e,0),Vr(e,t),Qt(e,it()),n;if(n===6)throw Error(Q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ei(e,Ht,gr),Qt(e,it()),null}function Kh(e,t){var n=Ae;Ae|=1;try{return e(t)}finally{Ae=n,Ae===0&&(po=it()+500,uu&&xi())}}function ts(e){Jr!==null&&Jr.tag===0&&!(Ae&6)&&Ws();var t=Ae;Ae|=1;var n=Sn.transition,r=Pe;try{if(Sn.transition=null,Pe=1,e)return e()}finally{Pe=r,Sn.transition=n,Ae=t,!(Ae&6)&&xi()}}function Xh(){Jt=Os.current,ze(Os)}function Hi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,M_(n)),ot!==null)for(n=ot.return;n!==null;){var r=n;switch(Ph(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Sc();break;case 3:uo(),ze(Gt),ze(Pt),$h();break;case 5:Bh(r);break;case 4:uo();break;case 13:ze(Ye);break;case 19:ze(Ye);break;case 10:Dh(r.type._context);break;case 22:case 23:Xh()}n=n.return}if(mt=e,ot=e=li(e.current,null),bt=Jt=t,dt=0,Oa=null,Yh=hu=es=0,Ht=aa=null,Mi!==null){for(t=0;t<Mi.length;t++)if(n=Mi[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}Mi=null}return e}function Uw(e,t){do{var n=ot;try{if(Nh(),Xl.current=Mc,Pc){for(var r=Ke.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Pc=!1}if(Ji=0,ht=ct=Ke=null,sa=!1,Ra=0,Gh.current=null,n===null||n.return===null){dt=1,Oa=t,ot=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=bt,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 p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var h=hv(o);if(h!==null){h.flags&=-257,mv(h,o,a,s,t),h.mode&1&&pv(s,c,t),t=h,l=c;var y=t.updateQueue;if(y===null){var x=new Set;x.add(l),t.updateQueue=x}else y.add(l);break e}else{if(!(t&1)){pv(s,c,t),Zh();break e}l=Error(Q(426))}}else if(We&&a.mode&1){var w=hv(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),mv(w,o,a,s,t),Mh(fo(l,a));break e}}s=l=fo(l,a),dt!==4&&(dt=2),aa===null?aa=[s]:aa.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var m=Tw(s,l,t);av(s,m);break e;case 1:a=l;var g=s.type,b=s.stateNode;if(!(s.flags&128)&&(typeof g.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(oi===null||!oi.has(b)))){s.flags|=65536,t&=-t,s.lanes|=t;var C=Ew(s,a,t);av(s,C);break e}}s=s.return}while(s!==null)}qw(n)}catch(S){t=S,ot===n&&n!==null&&(ot=n=n.return);continue}break}while(!0)}function Hw(){var e=Oc.current;return Oc.current=Mc,e===null?Mc:e}function Zh(){(dt===0||dt===3||dt===2)&&(dt=4),mt===null||!(es&268435455)&&!(hu&268435455)||Vr(mt,bt)}function Ic(e,t){var n=Ae;Ae|=2;var r=Hw();(mt!==e||bt!==t)&&(gr=null,Hi(e,t));do try{rT();break}catch(i){Uw(e,i)}while(!0);if(Nh(),Ae=n,Oc.current=r,ot!==null)throw Error(Q(261));return mt=null,bt=0,dt}function rT(){for(;ot!==null;)Ww(ot)}function iT(){for(;ot!==null&&!j2();)Ww(ot)}function Ww(e){var t=Yw(e.alternate,e,Jt);e.memoizedProps=e.pendingProps,t===null?qw(e):ot=t,Gh.current=null}function qw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=X_(n,t),n!==null){n.flags&=32767,ot=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{dt=6,ot=null;return}}else if(n=K_(n,t,Jt),n!==null){ot=n;return}if(t=t.sibling,t!==null){ot=t;return}ot=t=e}while(t!==null);dt===0&&(dt=5)}function Ei(e,t,n){var r=Pe,i=Sn.transition;try{Sn.transition=null,Pe=1,sT(e,t,n,r)}finally{Sn.transition=i,Pe=r}return null}function sT(e,t,n,r){do Ws();while(Jr!==null);if(Ae&6)throw Error(Q(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(Q(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(B2(e,s),e===mt&&(ot=mt=null,bt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Rl||(Rl=!0,Qw(vc,function(){return Ws(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Sn.transition,Sn.transition=null;var o=Pe;Pe=1;var a=Ae;Ae|=4,Gh.current=null,J_(e,n),$w(n,e),__(Rf),xc=!!jf,Rf=jf=null,e.current=n,eT(n),R2(),Ae=a,Pe=o,Sn.transition=s}else e.current=n;if(Rl&&(Rl=!1,Jr=e,Dc=i),s=e.pendingLanes,s===0&&(oi=null),O2(n.stateNode),Qt(e,it()),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(Nc)throw Nc=!1,e=Kf,Kf=null,e;return Dc&1&&e.tag!==0&&Ws(),s=e.pendingLanes,s&1?e===Xf?la++:(la=0,Xf=e):la=0,xi(),null}function Ws(){if(Jr!==null){var e=T1(Dc),t=Sn.transition,n=Pe;try{if(Sn.transition=null,Pe=16>e?16:e,Jr===null)var r=!1;else{if(e=Jr,Jr=null,Dc=0,Ae&6)throw Error(Q(331));var i=Ae;for(Ae|=4,le=e.current;le!==null;){var s=le,o=s.child;if(le.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(le=c;le!==null;){var d=le;switch(d.tag){case 0:case 11:case 15:oa(8,d,s)}var u=d.child;if(u!==null)u.return=d,le=u;else for(;le!==null;){d=le;var p=d.sibling,h=d.return;if(Lw(d),d===c){le=null;break}if(p!==null){p.return=h,le=p;break}le=h}}}var y=s.alternate;if(y!==null){var x=y.child;if(x!==null){y.child=null;do{var w=x.sibling;x.sibling=null,x=w}while(x!==null)}}le=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,le=o;else e:for(;le!==null;){if(s=le,s.flags&2048)switch(s.tag){case 0:case 11:case 15:oa(9,s,s.return)}var m=s.sibling;if(m!==null){m.return=s.return,le=m;break e}le=s.return}}var g=e.current;for(le=g;le!==null;){o=le;var b=o.child;if(o.subtreeFlags&2064&&b!==null)b.return=o,le=b;else e:for(o=g;le!==null;){if(a=le,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:pu(9,a)}}catch(S){tt(a,a.return,S)}if(a===o){le=null;break e}var C=a.sibling;if(C!==null){C.return=a.return,le=C;break e}le=a.return}}if(Ae=i,xi(),tr&&typeof tr.onPostCommitFiberRoot=="function")try{tr.onPostCommitFiberRoot(su,e)}catch{}r=!0}return r}finally{Pe=n,Sn.transition=t}}return!1}function Av(e,t,n){t=fo(n,t),t=Tw(e,t,1),e=si(e,t,1),t=It(),e!==null&&(el(e,1,t),Qt(e,t))}function tt(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"&&(oi===null||!oi.has(r))){e=fo(n,e),e=Ew(t,e,1),t=si(t,e,1),e=It(),t!==null&&(el(t,1,e),Qt(t,e));break}}t=t.return}}function oT(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=It(),e.pingedLanes|=e.suspendedLanes&n,mt===e&&(bt&n)===n&&(dt===4||dt===3&&(bt&130023424)===bt&&500>it()-Qh?Hi(e,0):Yh|=n),Qt(e,t)}function Gw(e,t){t===0&&(e.mode&1?(t=wl,wl<<=1,!(wl&130023424)&&(wl=4194304)):t=1);var n=It();e=Tr(e,t),e!==null&&(el(e,t,n),Qt(e,n))}function aT(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Gw(e,n)}function lT(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(Q(314))}r!==null&&r.delete(t),Gw(e,n)}var Yw;Yw=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Gt.current)qt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return qt=!1,Q_(e,t,n);qt=!!(e.flags&131072)}else qt=!1,We&&t.flags&1048576&&Z1(t,Tc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Jl(e,t),e=t.pendingProps;var i=ao(t,Pt.current);Hs(t,n),i=Vh(null,t,r,e,i,n);var s=Uh();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,Yt(r)?(s=!0,Cc(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Lh(t),i.updater=fu,t.stateNode=i,i._reactInternals=t,Bf(t,r,e,n),t=Vf(null,t,r,!0,s,n)):(t.tag=0,We&&s&&Rh(t),Nt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Jl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=uT(r),e=Mn(r,e),i){case 0:t=zf(null,t,r,e,n);break e;case 1:t=yv(null,t,r,e,n);break e;case 11:t=gv(null,t,r,e,n);break e;case 14:t=vv(null,t,r,Mn(r.type,e),n);break e}throw Error(Q(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Mn(r,i),zf(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Mn(r,i),yv(e,t,r,i,n);case 3:e:{if(Pw(t),e===null)throw Error(Q(387));r=t.pendingProps,s=t.memoizedState,i=s.element,iw(e,t),jc(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=fo(Error(Q(423)),t),t=xv(e,t,r,n,i);break e}else if(r!==i){i=fo(Error(Q(424)),t),t=xv(e,t,r,n,i);break e}else for(nn=ii(t.stateNode.containerInfo.firstChild),on=t,We=!0,In=null,n=nw(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(lo(),r===i){t=Er(e,t,n);break e}Nt(e,t,r,n)}t=t.child}return t;case 5:return sw(t),e===null&&If(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Pf(r,i)?o=null:s!==null&&Pf(r,s)&&(t.flags|=32),Rw(e,t),Nt(e,t,o,n),t.child;case 6:return e===null&&If(t),null;case 13:return Mw(e,t,n);case 4:return Fh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=co(t,null,r,n):Nt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Mn(r,i),gv(e,t,r,i,n);case 7:return Nt(e,t,t.pendingProps,n),t.child;case 8:return Nt(e,t,t.pendingProps.children,n),t.child;case 12:return Nt(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,Le(Ec,r._currentValue),r._currentValue=o,s!==null)if(Vn(s.value,o)){if(s.children===i.children&&!Gt.current){t=Er(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=kr(-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),Lf(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(Q(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Lf(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}Nt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Hs(t,n),i=_n(i),r=r(i),t.flags|=1,Nt(e,t,r,n),t.child;case 14:return r=t.type,i=Mn(r,t.pendingProps),i=Mn(r.type,i),vv(e,t,r,i,n);case 15:return Aw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Mn(r,i),Jl(e,t),t.tag=1,Yt(r)?(e=!0,Cc(t)):e=!1,Hs(t,n),_w(t,r,i),Bf(t,r,i,n),Vf(null,t,r,!0,e,n);case 19:return Ow(e,t,n);case 22:return jw(e,t,n)}throw Error(Q(156,t.tag))};function Qw(e,t){return k1(e,t)}function cT(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 kn(e,t,n,r){return new cT(e,t,n,r)}function Jh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function uT(e){if(typeof e=="function")return Jh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===yh)return 11;if(e===xh)return 14}return 2}function li(e,t){var n=e.alternate;return n===null?(n=kn(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 nc(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")Jh(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Ss:return Wi(n.children,i,s,t);case vh:o=8,i|=8;break;case cf:return e=kn(12,n,t,i|2),e.elementType=cf,e.lanes=s,e;case uf:return e=kn(13,n,t,i),e.elementType=uf,e.lanes=s,e;case df:return e=kn(19,n,t,i),e.elementType=df,e.lanes=s,e;case s1:return mu(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case r1:o=10;break e;case i1:o=9;break e;case yh:o=11;break e;case xh:o=14;break e;case Fr:o=16,r=null;break e}throw Error(Q(130,e==null?e:typeof e,""))}return t=kn(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Wi(e,t,n,r){return e=kn(7,e,r,t),e.lanes=n,e}function mu(e,t,n,r){return e=kn(22,e,r,t),e.elementType=s1,e.lanes=n,e.stateNode={isHidden:!1},e}function Cd(e,t,n){return e=kn(6,e,null,t),e.lanes=n,e}function _d(e,t,n){return t=kn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function dT(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 em(e,t,n,r,i,s,o,a,l){return e=new dT(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=kn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Lh(s),e}function fT(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ks,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Kw(e){if(!e)return fi;e=e._reactInternals;e:{if(os(e)!==e||e.tag!==1)throw Error(Q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Yt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Q(171))}if(e.tag===1){var n=e.type;if(Yt(n))return K1(e,n,t)}return t}function Xw(e,t,n,r,i,s,o,a,l){return e=em(n,r,!0,e,i,s,o,a,l),e.context=Kw(null),n=e.current,r=It(),i=ai(n),s=kr(r,i),s.callback=t??null,si(n,s,i),e.current.lanes=i,el(e,i,r),Qt(e,r),e}function gu(e,t,n,r){var i=t.current,s=It(),o=ai(i);return n=Kw(n),t.context===null?t.context=n:t.pendingContext=n,t=kr(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=si(i,t,o),e!==null&&($n(e,i,o,s),Kl(e,i,o)),o}function Lc(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 jv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function tm(e,t){jv(e,t),(e=e.alternate)&&jv(e,t)}function pT(){return null}var Zw=typeof reportError=="function"?reportError:function(e){console.error(e)};function nm(e){this._internalRoot=e}vu.prototype.render=nm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Q(409));gu(e,t,null,null)};vu.prototype.unmount=nm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ts(function(){gu(null,e,null,null)}),t[_r]=null}};function vu(e){this._internalRoot=e}vu.prototype.unstable_scheduleHydration=function(e){if(e){var t=j1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<zr.length&&t!==0&&t<zr[n].priority;n++);zr.splice(n,0,e),n===0&&P1(e)}};function rm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function yu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Rv(){}function hT(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var c=Lc(o);s.call(c)}}var o=Xw(t,r,e,0,null,!1,!1,"",Rv);return e._reactRootContainer=o,e[_r]=o.current,_a(e.nodeType===8?e.parentNode:e),ts(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var c=Lc(l);a.call(c)}}var l=em(e,0,!1,null,null,!1,!1,"",Rv);return e._reactRootContainer=l,e[_r]=l.current,_a(e.nodeType===8?e.parentNode:e),ts(function(){gu(t,l,n,r)}),l}function xu(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=Lc(o);a.call(l)}}gu(t,o,e,i)}else o=hT(n,t,e,i,r);return Lc(o)}E1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Go(t.pendingLanes);n!==0&&(kh(t,n|1),Qt(t,it()),!(Ae&6)&&(po=it()+500,xi()))}break;case 13:ts(function(){var r=Tr(e,1);if(r!==null){var i=It();$n(r,e,1,i)}}),tm(e,1)}};Sh=function(e){if(e.tag===13){var t=Tr(e,134217728);if(t!==null){var n=It();$n(t,e,134217728,n)}tm(e,134217728)}};A1=function(e){if(e.tag===13){var t=ai(e),n=Tr(e,t);if(n!==null){var r=It();$n(n,e,t,r)}tm(e,t)}};j1=function(){return Pe};R1=function(e,t){var n=Pe;try{return Pe=e,t()}finally{Pe=n}};bf=function(e,t,n){switch(t){case"input":if(hf(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=cu(r);if(!i)throw Error(Q(90));a1(r),hf(r,i)}}}break;case"textarea":c1(e,n);break;case"select":t=n.value,t!=null&&$s(e,!!n.multiple,t,!1)}};g1=Kh;v1=ts;var mT={usingClientEntryPoint:!1,Events:[nl,Es,cu,h1,m1,Kh]},$o={findFiberByHostInstance:Pi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},gT={bundleType:$o.bundleType,version:$o.version,rendererPackageName:$o.rendererPackageName,rendererConfig:$o.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Pr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=w1(e),e===null?null:e.stateNode},findFiberByHostInstance:$o.findFiberByHostInstance||pT,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{su=Pl.inject(gT),tr=Pl}catch{}}ln.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=mT;ln.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!rm(t))throw Error(Q(200));return fT(e,t,null,n)};ln.createRoot=function(e,t){if(!rm(e))throw Error(Q(299));var n=!1,r="",i=Zw;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=em(e,1,!1,null,null,n,!1,r,i),e[_r]=t.current,_a(e.nodeType===8?e.parentNode:e),new nm(t)};ln.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(Q(188)):(e=Object.keys(e).join(","),Error(Q(268,e)));return e=w1(t),e=e===null?null:e.stateNode,e};ln.flushSync=function(e){return ts(e)};ln.hydrate=function(e,t,n){if(!yu(t))throw Error(Q(200));return xu(null,e,t,!0,n)};ln.hydrateRoot=function(e,t,n){if(!rm(e))throw Error(Q(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=Zw;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Xw(t,null,e,1,n??null,i,!1,s,o),e[_r]=t.current,_a(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new vu(t)};ln.render=function(e,t,n){if(!yu(t))throw Error(Q(200));return xu(null,e,t,!1,n)};ln.unmountComponentAtNode=function(e){if(!yu(e))throw Error(Q(40));return e._reactRootContainer?(ts(function(){xu(null,null,e,!1,function(){e._reactRootContainer=null,e[_r]=null})}),!0):!1};ln.unstable_batchedUpdates=Kh;ln.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!yu(n))throw Error(Q(200));if(e==null||e._reactInternals===void 0)throw Error(Q(38));return xu(e,t,n,!1,r)};ln.version="18.3.1-next-f1338f8080-20240426";function Jw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Jw)}catch(e){console.error(e)}}Jw(),Jx.exports=ln;var eb=Jx.exports;const vT=Rr(eb);var tb,Pv=eb;tb=Pv.createRoot,Pv.hydrateRoot;const yT="@alfatech/livechat",xT="v2026.04.09.1",wT="module",bT="https://api.chatier.app",kT="wss://api.chatier.app",ST=["dist","README.md","component/chatier.js"],CT="dist/widget.js",_T={name:"Uygar Öztürk Ceylan",email:"uygaroztcyln@gmail.com"},TT={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",preview:"vite preview","build:mobile":"tsc -b && vite build --config vite.config.app.ts && mv dist-app/index-app.html dist-app/index.html","preview:mobile":"vite preview --config vite.config.app.ts --outDir dist-app","dev:mobile":"vite --config vite.config.app.ts"},ET={"@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"},AT={"@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"},nb={name:yT,private:!1,version:xT,type:wT,apiURL:bT,wsURL:kT,files:ST,main:CT,author:_T,scripts:TT,dependencies:ET,devDependencies:AT,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},rb=nb.apiURL,jT=nb.wsURL,RT=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],PT=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],MT={429:RT,404:PT};async function Mr(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=await fetch(`${rb}/${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=MT[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 zn=e=>[200,201,204].includes(e),OT=(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 _o=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(){}},ns=typeof window>"u"||"Deno"in globalThis;function yn(){}function NT(e,t){return typeof e=="function"?e(t):e}function ep(e){return typeof e=="number"&&e>=0&&e!==1/0}function ib(e,t){return Math.max(e+(t||0)-Date.now(),0)}function qs(e,t){return typeof e=="function"?e(t):e}function Ln(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!==im(o,t.options))return!1}else if(!Na(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||s&&!s(t))}function Ov(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(rs(t.options.mutationKey)!==rs(s))return!1}else if(!Na(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function im(e,t){return((t==null?void 0:t.queryKeyHashFn)||rs)(e)}function rs(e){return JSON.stringify(e,(t,n)=>tp(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Na(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Na(e[n],t[n])):!1}function sb(e,t){if(e===t)return e;const n=Nv(e)&&Nv(t);if(n||tp(e)&&tp(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]=sb(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function Fc(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 Nv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function tp(e){if(!Dv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Dv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Dv(e){return Object.prototype.toString.call(e)==="[object Object]"}function DT(e){return new Promise(t=>{setTimeout(t,e)})}function np(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?sb(e,t):t}function IT(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function LT(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var sm=Symbol();function ob(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===sm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Li,Ur,Gs,Mx,FT=(Mx=class extends _o{constructor(){super();me(this,Li);me(this,Ur);me(this,Gs);oe(this,Gs,t=>{if(!ns&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){T(this,Ur)||this.setEventListener(T(this,Gs))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,Ur))==null||t.call(this),oe(this,Ur,void 0))}setEventListener(t){var n;oe(this,Gs,t),(n=T(this,Ur))==null||n.call(this),oe(this,Ur,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){T(this,Li)!==t&&(oe(this,Li,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof T(this,Li)=="boolean"?T(this,Li):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Li=new WeakMap,Ur=new WeakMap,Gs=new WeakMap,Mx),om=new FT,Ys,Hr,Qs,Ox,BT=(Ox=class extends _o{constructor(){super();me(this,Ys,!0);me(this,Hr);me(this,Qs);oe(this,Qs,t=>{if(!ns&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){T(this,Hr)||this.setEventListener(T(this,Qs))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,Hr))==null||t.call(this),oe(this,Hr,void 0))}setEventListener(t){var n;oe(this,Qs,t),(n=T(this,Hr))==null||n.call(this),oe(this,Hr,t(this.setOnline.bind(this)))}setOnline(t){T(this,Ys)!==t&&(oe(this,Ys,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return T(this,Ys)}},Ys=new WeakMap,Hr=new WeakMap,Qs=new WeakMap,Ox),Bc=new BT;function rp(){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 $T(e){return Math.min(1e3*2**e,3e4)}function ab(e){return(e??"online")==="online"?Bc.isOnline():!0}var lb=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Td(e){return e instanceof lb}function cb(e){let t=!1,n=0,r=!1,i;const s=rp(),o=x=>{var w;r||(p(new lb(x)),(w=e.abort)==null||w.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>om.isFocused()&&(e.networkMode==="always"||Bc.isOnline())&&e.canRun(),d=()=>ab(e.networkMode)&&e.canRun(),u=x=>{var w;r||(r=!0,(w=e.onSuccess)==null||w.call(e,x),i==null||i(),s.resolve(x))},p=x=>{var w;r||(r=!0,(w=e.onError)==null||w.call(e,x),i==null||i(),s.reject(x))},h=()=>new Promise(x=>{var w;i=m=>{(r||c())&&x(m)},(w=e.onPause)==null||w.call(e)}).then(()=>{var x;i=void 0,r||(x=e.onContinue)==null||x.call(e)}),y=()=>{if(r)return;let x;const w=n===0?e.initialPromise:void 0;try{x=w??e.fn()}catch(m){x=Promise.reject(m)}Promise.resolve(x).then(u).catch(m=>{var _;if(r)return;const g=e.retry??(ns?0:3),b=e.retryDelay??$T,C=typeof b=="function"?b(n,m):b,S=g===!0||typeof g=="number"&&n<g||typeof g=="function"&&g(n,m);if(t||!S){p(m);return}n++,(_=e.onFail)==null||_.call(e,n,m),DT(C).then(()=>c()?void 0:h()).then(()=>{t?p(m):y()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?y():h().then(y),s)}}function zT(){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 ut=zT(),Fi,Nx,ub=(Nx=class{constructor(){me(this,Fi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ep(this.gcTime)&&oe(this,Fi,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ns?1/0:5*60*1e3))}clearGcTimeout(){T(this,Fi)&&(clearTimeout(T(this,Fi)),oe(this,Fi,void 0))}},Fi=new WeakMap,Nx),Ks,Xs,vn,Tt,Qa,Bi,On,hr,Dx,VT=(Dx=class extends ub{constructor(t){super();me(this,On);me(this,Ks);me(this,Xs);me(this,vn);me(this,Tt);me(this,Qa);me(this,Bi);oe(this,Bi,!1),oe(this,Qa,t.defaultOptions),this.setOptions(t.options),this.observers=[],oe(this,vn,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,oe(this,Ks,UT(this.options)),this.state=t.state??T(this,Ks),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=T(this,Tt))==null?void 0:t.promise}setOptions(t){this.options={...T(this,Qa),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,vn).remove(this)}setData(t,n){const r=np(this.state.data,t,this.options);return be(this,On,hr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){be(this,On,hr).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=T(this,Tt))==null?void 0:r.promise;return(i=T(this,Tt))==null||i.cancel(t),n?n.then(yn).catch(yn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(T(this,Ks))}isActive(){return this.observers.some(t=>Ln(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===sm||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||!ib(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,Tt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,Tt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),T(this,vn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(T(this,Tt)&&(T(this,Bi)?T(this,Tt).cancel({revert:!0}):T(this,Tt).cancelRetry()),this.scheduleGc()),T(this,vn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||be(this,On,hr).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(T(this,Tt))return T(this,Tt).continueRetry(),T(this,Tt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const u=this.observers.find(p=>p.options.queryFn);u&&this.setOptions(u.options)}const r=new AbortController,i=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(oe(this,Bi,!0),r.signal)})},s=()=>{const u=ob(this.options,n),p={queryKey:this.queryKey,meta:this.meta};return i(p),oe(this,Bi,!1),this.options.persister?this.options.persister(u,p,this):u(p)},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),oe(this,Xs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=o.fetchOptions)==null?void 0:c.meta))&&be(this,On,hr).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const a=u=>{var p,h,y,x;Td(u)&&u.silent||be(this,On,hr).call(this,{type:"error",error:u}),Td(u)||((h=(p=T(this,vn).config).onError)==null||h.call(p,u,this),(x=(y=T(this,vn).config).onSettled)==null||x.call(y,this.state.data,u,this)),this.scheduleGc()};return oe(this,Tt,cb({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:u=>{var p,h,y,x;if(u===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(w){a(w);return}(h=(p=T(this,vn).config).onSuccess)==null||h.call(p,u,this),(x=(y=T(this,vn).config).onSettled)==null||x.call(y,u,this.state.error,this),this.scheduleGc()},onError:a,onFail:(u,p)=>{be(this,On,hr).call(this,{type:"failed",failureCount:u,error:p})},onPause:()=>{be(this,On,hr).call(this,{type:"pause"})},onContinue:()=>{be(this,On,hr).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),T(this,Tt).start()}},Ks=new WeakMap,Xs=new WeakMap,vn=new WeakMap,Tt=new WeakMap,Qa=new WeakMap,Bi=new WeakMap,On=new WeakSet,hr=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,...db(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 Td(i)&&i.revert&&T(this,Xs)?{...T(this,Xs),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),ut.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),T(this,vn).notify({query:this,type:"updated",action:t})})},Dx);function db(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ab(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function UT(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 Kn,Ix,HT=(Ix=class extends _o{constructor(t={}){super();me(this,Kn);this.config=t,oe(this,Kn,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??im(i,n);let o=this.get(s);return o||(o=new VT({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){T(this,Kn).has(t.queryHash)||(T(this,Kn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=T(this,Kn).get(t.queryHash);n&&(t.destroy(),n===t&&T(this,Kn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ut.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return T(this,Kn).get(t)}getAll(){return[...T(this,Kn).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){ut.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ut.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ut.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Kn=new WeakMap,Ix),Xn,Mt,$i,Zn,Ir,Lx,WT=(Lx=class extends ub{constructor(t){super();me(this,Zn);me(this,Xn);me(this,Mt);me(this,$i);this.mutationId=t.mutationId,oe(this,Mt,t.mutationCache),oe(this,Xn,[]),this.state=t.state||fb(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){T(this,Xn).includes(t)||(T(this,Xn).push(t),this.clearGcTimeout(),T(this,Mt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){oe(this,Xn,T(this,Xn).filter(n=>n!==t)),this.scheduleGc(),T(this,Mt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){T(this,Xn).length||(this.state.status==="pending"?this.scheduleGc():T(this,Mt).remove(this))}continue(){var t;return((t=T(this,$i))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,c,d,u,p,h,y,x,w,m,g,b,C,S,_,j;oe(this,$i,cb({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(A,E)=>{be(this,Zn,Ir).call(this,{type:"failed",failureCount:A,error:E})},onPause:()=>{be(this,Zn,Ir).call(this,{type:"pause"})},onContinue:()=>{be(this,Zn,Ir).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>T(this,Mt).canRun(this)}));const n=this.state.status==="pending",r=!T(this,$i).canStart();try{if(!n){be(this,Zn,Ir).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(i=T(this,Mt).config).onMutate)==null?void 0:s.call(i,t,this));const E=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));E!==this.state.context&&be(this,Zn,Ir).call(this,{type:"pending",context:E,variables:t,isPaused:r})}const A=await T(this,$i).start();return await((c=(l=T(this,Mt).config).onSuccess)==null?void 0:c.call(l,A,t,this.state.context,this)),await((u=(d=this.options).onSuccess)==null?void 0:u.call(d,A,t,this.state.context)),await((h=(p=T(this,Mt).config).onSettled)==null?void 0:h.call(p,A,null,this.state.variables,this.state.context,this)),await((x=(y=this.options).onSettled)==null?void 0:x.call(y,A,null,t,this.state.context)),be(this,Zn,Ir).call(this,{type:"success",data:A}),A}catch(A){try{throw await((m=(w=T(this,Mt).config).onError)==null?void 0:m.call(w,A,t,this.state.context,this)),await((b=(g=this.options).onError)==null?void 0:b.call(g,A,t,this.state.context)),await((S=(C=T(this,Mt).config).onSettled)==null?void 0:S.call(C,void 0,A,this.state.variables,this.state.context,this)),await((j=(_=this.options).onSettled)==null?void 0:j.call(_,void 0,A,t,this.state.context)),A}finally{be(this,Zn,Ir).call(this,{type:"error",error:A})}}finally{T(this,Mt).runNext(this)}}},Xn=new WeakMap,Mt=new WeakMap,$i=new WeakMap,Zn=new WeakSet,Ir=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),ut.batch(()=>{T(this,Xn).forEach(r=>{r.onMutationUpdate(t)}),T(this,Mt).notify({mutation:this,type:"updated",action:t})})},Lx);function fb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Zt,Ka,Fx,qT=(Fx=class extends _o{constructor(t={}){super();me(this,Zt);me(this,Ka);this.config=t,oe(this,Zt,new Map),oe(this,Ka,Date.now())}build(t,n,r){const i=new WT({mutationCache:this,mutationId:++hl(this,Ka)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=Ml(t),r=T(this,Zt).get(n)??[];r.push(t),T(this,Zt).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=Ml(t);if(T(this,Zt).has(n)){const i=(r=T(this,Zt).get(n))==null?void 0:r.filter(s=>s!==t);i&&(i.length===0?T(this,Zt).delete(n):T(this,Zt).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=T(this,Zt).get(Ml(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=T(this,Zt).get(Ml(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){ut.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...T(this,Zt).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Ov(n,r))}findAll(t={}){return this.getAll().filter(n=>Ov(t,n))}notify(t){ut.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ut.batch(()=>Promise.all(t.map(n=>n.continue().catch(yn))))}},Zt=new WeakMap,Ka=new WeakMap,Fx);function Ml(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function Iv(e){return{onFetch:(t,n)=>{var d,u,p,h,y;const r=t.options,i=(p=(u=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:u.fetchMore)==null?void 0:p.direction,s=((h=t.state.data)==null?void 0:h.pages)||[],o=((y=t.state.data)==null?void 0:y.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let x=!1;const w=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?x=!0:t.signal.addEventListener("abort",()=>{x=!0}),t.signal)})},m=ob(t.options,t.fetchOptions),g=async(b,C,S)=>{if(x)return Promise.reject();if(C==null&&b.pages.length)return Promise.resolve(b);const _={queryKey:t.queryKey,pageParam:C,direction:S?"backward":"forward",meta:t.options.meta};w(_);const j=await m(_),{maxPages:A}=t.options,E=S?LT:IT;return{pages:E(b.pages,j,A),pageParams:E(b.pageParams,C,A)}};if(i&&s.length){const b=i==="backward",C=b?GT:Lv,S={pages:s,pageParams:o},_=C(r,S);a=await g(S,_,b)}else{const b=e??s.length;do{const C=l===0?o[0]??r.initialPageParam:Lv(r,a);if(l>0&&C==null)break;a=await g(a,C),l++}while(l<b)}return a};t.options.persister?t.fetchFn=()=>{var x,w;return(w=(x=t.options).persister)==null?void 0:w.call(x,c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function Lv(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 GT(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 Je,Wr,qr,Zs,Js,Gr,eo,to,Bx,YT=(Bx=class{constructor(e={}){me(this,Je);me(this,Wr);me(this,qr);me(this,Zs);me(this,Js);me(this,Gr);me(this,eo);me(this,to);oe(this,Je,e.queryCache||new HT),oe(this,Wr,e.mutationCache||new qT),oe(this,qr,e.defaultOptions||{}),oe(this,Zs,new Map),oe(this,Js,new Map),oe(this,Gr,0)}mount(){hl(this,Gr)._++,T(this,Gr)===1&&(oe(this,eo,om.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Je).onFocus())})),oe(this,to,Bc.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Je).onOnline())})))}unmount(){var e,t;hl(this,Gr)._--,T(this,Gr)===0&&((e=T(this,eo))==null||e.call(this),oe(this,eo,void 0),(t=T(this,to))==null||t.call(this),oe(this,to,void 0))}isFetching(e){return T(this,Je).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return T(this,Wr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,Je).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=T(this,Je).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(qs(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return T(this,Je).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=T(this,Je).get(r.queryHash),s=i==null?void 0:i.state.data,o=NT(t,s);if(o!==void 0)return T(this,Je).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return ut.batch(()=>T(this,Je).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,Je).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=T(this,Je);ut.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=T(this,Je),r={type:"active",...e};return ut.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ut.batch(()=>T(this,Je).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(yn).catch(yn)}invalidateQueries(e,t={}){return ut.batch(()=>{if(T(this,Je).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=ut.batch(()=>T(this,Je).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(yn)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(yn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=T(this,Je).build(this,t);return n.isStaleByTime(qs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(yn).catch(yn)}fetchInfiniteQuery(e){return e.behavior=Iv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(yn).catch(yn)}ensureInfiniteQueryData(e){return e.behavior=Iv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Bc.isOnline()?T(this,Wr).resumePausedMutations():Promise.resolve()}getQueryCache(){return T(this,Je)}getMutationCache(){return T(this,Wr)}getDefaultOptions(){return T(this,qr)}setDefaultOptions(e){oe(this,qr,e)}setQueryDefaults(e,t){T(this,Zs).set(rs(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...T(this,Zs).values()],n={};return t.forEach(r=>{Na(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){T(this,Js).set(rs(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...T(this,Js).values()];let n={};return t.forEach(r=>{Na(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...T(this,qr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=im(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===sm&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...T(this,qr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){T(this,Je).clear(),T(this,Wr).clear()}},Je=new WeakMap,Wr=new WeakMap,qr=new WeakMap,Zs=new WeakMap,Js=new WeakMap,Gr=new WeakMap,eo=new WeakMap,to=new WeakMap,Bx),zt,Te,Xa,Ot,zi,no,Yr,Jn,Za,ro,io,Vi,Ui,Qr,so,je,Qo,ip,sp,op,ap,lp,cp,up,pb,$x,QT=($x=class extends _o{constructor(t,n){super();me(this,je);me(this,zt);me(this,Te);me(this,Xa);me(this,Ot);me(this,zi);me(this,no);me(this,Yr);me(this,Jn);me(this,Za);me(this,ro);me(this,io);me(this,Vi);me(this,Ui);me(this,Qr);me(this,so,new Set);this.options=n,oe(this,zt,t),oe(this,Jn,null),oe(this,Yr,rp()),this.options.experimental_prefetchInRender||T(this,Yr).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(T(this,Te).addObserver(this),Fv(T(this,Te),this.options)?be(this,je,Qo).call(this):this.updateResult(),be(this,je,ap).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return dp(T(this,Te),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return dp(T(this,Te),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,be(this,je,lp).call(this),be(this,je,cp).call(this),T(this,Te).removeObserver(this)}setOptions(t,n){const r=this.options,i=T(this,Te);if(this.options=T(this,zt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ln(this.options.enabled,T(this,Te))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");be(this,je,up).call(this),T(this,Te).setOptions(this.options),r._defaulted&&!Fc(this.options,r)&&T(this,zt).getQueryCache().notify({type:"observerOptionsUpdated",query:T(this,Te),observer:this});const s=this.hasListeners();s&&Bv(T(this,Te),i,this.options,r)&&be(this,je,Qo).call(this),this.updateResult(n),s&&(T(this,Te)!==i||Ln(this.options.enabled,T(this,Te))!==Ln(r.enabled,T(this,Te))||qs(this.options.staleTime,T(this,Te))!==qs(r.staleTime,T(this,Te)))&&be(this,je,ip).call(this);const o=be(this,je,sp).call(this);s&&(T(this,Te)!==i||Ln(this.options.enabled,T(this,Te))!==Ln(r.enabled,T(this,Te))||o!==T(this,Qr))&&be(this,je,op).call(this,o)}getOptimisticResult(t){const n=T(this,zt).getQueryCache().build(T(this,zt),t),r=this.createResult(n,t);return XT(this,r)&&(oe(this,Ot,r),oe(this,no,this.options),oe(this,zi,T(this,Te).state)),r}getCurrentResult(){return T(this,Ot)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){T(this,so).add(t)}getCurrentQuery(){return T(this,Te)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=T(this,zt).defaultQueryOptions(t),r=T(this,zt).getQueryCache().build(T(this,zt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return be(this,je,Qo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),T(this,Ot)))}createResult(t,n){var A;const r=T(this,Te),i=this.options,s=T(this,Ot),o=T(this,zi),a=T(this,no),c=t!==r?t.state:T(this,Xa),{state:d}=t;let u={...d},p=!1,h;if(n._optimisticResults){const E=this.hasListeners(),L=!E&&Fv(t,n),F=E&&Bv(t,r,n,i);(L||F)&&(u={...u,...db(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:y,errorUpdatedAt:x,status:w}=u;if(n.select&&u.data!==void 0)if(s&&u.data===(o==null?void 0:o.data)&&n.select===T(this,Za))h=T(this,ro);else try{oe(this,Za,n.select),h=n.select(u.data),h=np(s==null?void 0:s.data,h,n),oe(this,ro,h),oe(this,Jn,null)}catch(E){oe(this,Jn,E)}else h=u.data;if(n.placeholderData!==void 0&&h===void 0&&w==="pending"){let E;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))E=s.data;else if(E=typeof n.placeholderData=="function"?n.placeholderData((A=T(this,io))==null?void 0:A.state.data,T(this,io)):n.placeholderData,n.select&&E!==void 0)try{E=n.select(E),oe(this,Jn,null)}catch(L){oe(this,Jn,L)}E!==void 0&&(w="success",h=np(s==null?void 0:s.data,E,n),p=!0)}T(this,Jn)&&(y=T(this,Jn),h=T(this,ro),x=Date.now(),w="error");const m=u.fetchStatus==="fetching",g=w==="pending",b=w==="error",C=g&&m,S=h!==void 0,j={status:w,fetchStatus:u.fetchStatus,isPending:g,isSuccess:w==="success",isError:b,isInitialLoading:C,isLoading:C,data:h,dataUpdatedAt:u.dataUpdatedAt,error:y,errorUpdatedAt:x,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:m,isRefetching:m&&!g,isLoadingError:b&&!S,isPaused:u.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:b&&S,isStale:am(t,n),refetch:this.refetch,promise:T(this,Yr)};if(this.options.experimental_prefetchInRender){const E=D=>{j.status==="error"?D.reject(j.error):j.data!==void 0&&D.resolve(j.data)},L=()=>{const D=oe(this,Yr,j.promise=rp());E(D)},F=T(this,Yr);switch(F.status){case"pending":t.queryHash===r.queryHash&&E(F);break;case"fulfilled":(j.status==="error"||j.data!==F.value)&&L();break;case"rejected":(j.status!=="error"||j.error!==F.reason)&&L();break}}return j}updateResult(t){const n=T(this,Ot),r=this.createResult(T(this,Te),this.options);if(oe(this,zi,T(this,Te).state),oe(this,no,this.options),T(this,zi).data!==void 0&&oe(this,io,T(this,Te)),Fc(r,n))return;oe(this,Ot,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!T(this,so).size)return!0;const l=new Set(a??T(this,so));return this.options.throwOnError&&l.add("error"),Object.keys(T(this,Ot)).some(c=>{const d=c;return T(this,Ot)[d]!==n[d]&&l.has(d)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),be(this,je,pb).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&be(this,je,ap).call(this)}},zt=new WeakMap,Te=new WeakMap,Xa=new WeakMap,Ot=new WeakMap,zi=new WeakMap,no=new WeakMap,Yr=new WeakMap,Jn=new WeakMap,Za=new WeakMap,ro=new WeakMap,io=new WeakMap,Vi=new WeakMap,Ui=new WeakMap,Qr=new WeakMap,so=new WeakMap,je=new WeakSet,Qo=function(t){be(this,je,up).call(this);let n=T(this,Te).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(yn)),n},ip=function(){be(this,je,lp).call(this);const t=qs(this.options.staleTime,T(this,Te));if(ns||T(this,Ot).isStale||!ep(t))return;const r=ib(T(this,Ot).dataUpdatedAt,t)+1;oe(this,Vi,setTimeout(()=>{T(this,Ot).isStale||this.updateResult()},r))},sp=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(T(this,Te)):this.options.refetchInterval)??!1},op=function(t){be(this,je,cp).call(this),oe(this,Qr,t),!(ns||Ln(this.options.enabled,T(this,Te))===!1||!ep(T(this,Qr))||T(this,Qr)===0)&&oe(this,Ui,setInterval(()=>{(this.options.refetchIntervalInBackground||om.isFocused())&&be(this,je,Qo).call(this)},T(this,Qr)))},ap=function(){be(this,je,ip).call(this),be(this,je,op).call(this,be(this,je,sp).call(this))},lp=function(){T(this,Vi)&&(clearTimeout(T(this,Vi)),oe(this,Vi,void 0))},cp=function(){T(this,Ui)&&(clearInterval(T(this,Ui)),oe(this,Ui,void 0))},up=function(){const t=T(this,zt).getQueryCache().build(T(this,zt),this.options);if(t===T(this,Te))return;const n=T(this,Te);oe(this,Te,t),oe(this,Xa,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},pb=function(t){ut.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(T(this,Ot))}),T(this,zt).getQueryCache().notify({query:T(this,Te),type:"observerResultsUpdated"})})},$x);function KT(e,t){return Ln(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Fv(e,t){return KT(e,t)||e.state.data!==void 0&&dp(e,t,t.refetchOnMount)}function dp(e,t,n){if(Ln(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&am(e,t)}return!1}function Bv(e,t,n,r){return(e!==t||Ln(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&am(e,n)}function am(e,t){return Ln(t.enabled,e)!==!1&&e.isStaleByTime(qs(t.staleTime,e))}function XT(e,t){return!Fc(e.getCurrentResult(),t)}var Kr,Xr,Vt,xr,Sr,rc,fp,zx,ZT=(zx=class extends _o{constructor(t,n){super();me(this,Sr);me(this,Kr);me(this,Xr);me(this,Vt);me(this,xr);oe(this,Kr,t),this.setOptions(n),this.bindMethods(),be(this,Sr,rc).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const n=this.options;this.options=T(this,Kr).defaultMutationOptions(t),Fc(this.options,n)||T(this,Kr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:T(this,Vt),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&rs(n.mutationKey)!==rs(this.options.mutationKey)?this.reset():((r=T(this,Vt))==null?void 0:r.state.status)==="pending"&&T(this,Vt).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=T(this,Vt))==null||t.removeObserver(this)}onMutationUpdate(t){be(this,Sr,rc).call(this),be(this,Sr,fp).call(this,t)}getCurrentResult(){return T(this,Xr)}reset(){var t;(t=T(this,Vt))==null||t.removeObserver(this),oe(this,Vt,void 0),be(this,Sr,rc).call(this),be(this,Sr,fp).call(this)}mutate(t,n){var r;return oe(this,xr,n),(r=T(this,Vt))==null||r.removeObserver(this),oe(this,Vt,T(this,Kr).getMutationCache().build(T(this,Kr),this.options)),T(this,Vt).addObserver(this),T(this,Vt).execute(t)}},Kr=new WeakMap,Xr=new WeakMap,Vt=new WeakMap,xr=new WeakMap,Sr=new WeakSet,rc=function(){var n;const t=((n=T(this,Vt))==null?void 0:n.state)??fb();oe(this,Xr,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},fp=function(t){ut.batch(()=>{var n,r,i,s,o,a,l,c;if(T(this,xr)&&this.hasListeners()){const d=T(this,Xr).variables,u=T(this,Xr).context;(t==null?void 0:t.type)==="success"?((r=(n=T(this,xr)).onSuccess)==null||r.call(n,t.data,d,u),(s=(i=T(this,xr)).onSettled)==null||s.call(i,t.data,null,d,u)):(t==null?void 0:t.type)==="error"&&((a=(o=T(this,xr)).onError)==null||a.call(o,t.error,d,u),(c=(l=T(this,xr)).onSettled)==null||c.call(l,void 0,t.error,d,u))}this.listeners.forEach(d=>{d(T(this,Xr))})})},zx),hb=v.createContext(void 0),mb=e=>{const t=v.useContext(hb);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},JT=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(hb.Provider,{value:e,children:t})),gb=v.createContext(!1),eE=()=>v.useContext(gb);gb.Provider;function tE(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var nE=v.createContext(tE()),rE=()=>v.useContext(nE);function vb(e,t){return typeof e=="function"?e(...t):!!e}function pp(){}var iE=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},sE=e=>{v.useEffect(()=>{e.clearReset()},[e])},oE=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&vb(n,[e.error,r]),aE=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},lE=(e,t)=>e.isLoading&&e.isFetching&&!t,cE=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,$v=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function uE(e,t,n){var d,u,p,h,y;const r=mb(),i=eE(),s=rE(),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",aE(o),iE(o,s),sE(s);const a=!r.getQueryCache().get(o.queryHash),[l]=v.useState(()=>new t(r,o)),c=l.getOptimisticResult(o);if(v.useSyncExternalStore(v.useCallback(x=>{const w=i?pp:l.subscribe(ut.batchCalls(x));return l.updateResult(),w},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),v.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),cE(o,c))throw $v(o,l,s);if(oE({result:c,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw c.error;if((h=(p=r.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||h.call(p,o,c),o.experimental_prefetchInRender&&!ns&&lE(c,i)){const x=a?$v(o,l,s):(y=r.getQueryCache().get(o.queryHash))==null?void 0:y.promise;x==null||x.catch(pp).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function yb(e,t){return uE(e,QT)}function lm(e,t){const n=mb(),[r]=v.useState(()=>new ZT(n,e));v.useEffect(()=>{r.setOptions(e)},[r,e]);const i=v.useSyncExternalStore(v.useCallback(o=>r.subscribe(ut.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=v.useCallback((o,a)=>{r.mutate(o,a).catch(pp)},[r]);if(i.error&&vb(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const dE=(e,t)=>yb({queryKey:["widgets",e,t],queryFn:()=>fE(e,t),retry:!1,throwOnError:!1}),fE=async(e,t)=>{const n=`widgets/with-link/${e}${t?`?device_id=${t}`:""}`,[r,i]=await Mr(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.MessageAgentBackground="widget_message_agent_background",e.MessageAgentText="widget_message_agent_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||{}),ne=(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.NotificationSoundOn="notification_sound_on",e.NotificationSoundOff="notification_sound_off",e))(ne||{}),De=(e=>(e.Light="light",e.Dark="dark",e.System="system",e))(De||{});function pE(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 Td(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Wf(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var rT=typeof WeakMap=="function"?WeakMap:Map;function Lw(e,t,n){n=kr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Fc||(Fc=!0,tp=r),Wf(e,t)},n}function Fw(e,t,n){n=kr(-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(){Wf(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Wf(e,t),typeof r!="function"&&(ai===null?ai=new Set([this]):ai.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function wv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new rT;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=vT.bind(null,e,t,n),t.then(e,e))}function bv(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 kv(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=kr(-1,1),t.tag=2,oi(n,t,1))),n.lanes|=1),e)}var iT=Mr.ReactCurrentOwner,qt=!1;function Ot(e,t,n,r){t.child=e===null?pw(t,null,n,r):ho(t,e.child,n,r)}function Sv(e,t,n,r,i){n=n.render;var s=t.ref;return qs(t,i),r=Yh(e,t,n,r,s,i),n=Qh(),e!==null&&!qt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Er(e,t,i)):(We&&n&&Ih(t),t.flags|=1,Ot(e,t,r,i),t.child)}function Cv(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!sm(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,$w(e,t,s,r,i)):(e=oc(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:Aa,n(o,r)&&e.ref===t.ref)return Er(e,t,i)}return t.flags|=1,e=ci(s,r),e.ref=t.ref,e.return=t,t.child=e}function $w(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Aa(s,r)&&e.ref===t.ref)if(qt=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(qt=!0);else return t.lanes=e.lanes,Er(e,t,i)}return qf(e,t,n,r,i)}function Bw(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},$e(Os,Jt),Jt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,$e(Os,Jt),Jt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,$e(Os,Jt),Jt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,$e(Os,Jt),Jt|=r;return Ot(e,t,i,n),t.child}function zw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function qf(e,t,n,r,i){var s=Yt(n)?Zi:Pt.current;return s=fo(t,s),qs(t,i),n=Yh(e,t,n,r,s,i),r=Qh(),e!==null&&!qt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Er(e,t,i)):(We&&r&&Ih(t),t.flags|=1,Ot(e,t,n,i),t.child)}function _v(e,t,n,r,i){if(Yt(n)){var s=!0;Ac(t)}else s=!1;if(qs(t,i),t.stateNode===null)rc(e,t),Iw(t,n,r),Hf(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=_n(c):(c=Yt(n)?Zi:Pt.current,c=fo(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)&&xv(t,o,r,c),Br=!1;var p=t.memoizedState;o.state=p,Nc(t,r,o,i),l=t.memoizedState,a!==r||p!==l||Gt.current||Br?(typeof d=="function"&&(Uf(t,n,d,r),l=t.memoizedState),(a=Br||yv(t,n,a,r,p,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,mw(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Mn(t.type,a),o.props=c,u=t.pendingProps,p=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=_n(l):(l=Yt(n)?Zi:Pt.current,l=fo(t,l));var h=n.getDerivedStateFromProps;(d=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==u||p!==l)&&xv(t,o,r,l),Br=!1,p=t.memoizedState,o.state=p,Nc(t,r,o,i);var y=t.memoizedState;a!==u||p!==y||Gt.current||Br?(typeof h=="function"&&(Uf(t,n,h,r),y=t.memoizedState),(c=Br||yv(t,n,c,r,p,y,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,y,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,y,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),o.props=r,o.state=y,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Gf(e,t,n,r,s,i)}function Gf(e,t,n,r,i,s){zw(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&uv(t,n,!1),Er(e,t,s);r=t.stateNode,iT.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=ho(t,e.child,null,s),t.child=ho(t,null,a,s)):Ot(e,t,a,s),t.memoizedState=r.state,i&&uv(t,n,!0),t.child}function Vw(e){var t=e.stateNode;t.pendingContext?cv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&cv(e,t.context,!1),Hh(e,t.containerInfo)}function Tv(e,t,n,r,i){return po(),Fh(i),t.flags|=256,Ot(e,t,n,r),t.child}var Yf={dehydrated:null,treeContext:null,retryLane:0};function Qf(e){return{baseLanes:e,cachePool:null,transitions:null}}function Uw(e,t,n){var r=t.pendingProps,i=Ge.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),$e(Ge,i&1),e===null)return zf(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=xu(o,r,0,null),e=Wi(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Qf(n),t.memoizedState=Yf,e):Zh(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return sT(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=ci(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=ci(a,s):(s=Wi(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?Qf(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=Yf,r}return s=e.child,e=s.sibling,r=ci(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 Zh(e,t){return t=xu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ml(e,t,n,r){return r!==null&&Fh(r),ho(t,e.child,null,n),e=Zh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function sT(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=Td(Error(X(422))),Ml(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=xu({mode:"visible",children:r.children},i,0,null),s=Wi(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&ho(t,e.child,null,o),t.child.memoizedState=Qf(o),t.memoizedState=Yf,s);if(!(t.mode&1))return Ml(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(X(419)),r=Td(s,r,void 0),Ml(e,t,o,r)}if(a=(o&e.childLanes)!==0,qt||a){if(r=ht,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,Tr(e,i),Bn(r,e,i,-1))}return im(),r=Td(Error(X(421))),Ml(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=yT.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,nn=si(i.nextSibling),on=t,We=!0,In=null,e!==null&&(xn[wn++]=wr,xn[wn++]=br,xn[wn++]=Ji,wr=e.id,br=e.overflow,Ji=t),t=Zh(t,r.children),t.flags|=4096,t)}function Ev(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Vf(e.return,t,n)}function Ed(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 Hw(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(Ot(e,t,r.children,n),r=Ge.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&&Ev(e,n,t);else if(e.tag===19)Ev(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($e(Ge,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&&Oc(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ed(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&&Oc(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ed(t,!0,n,null,s);break;case"together":Ed(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function rc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Er(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ts|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(X(153));if(t.child!==null){for(e=t.child,n=ci(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ci(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function oT(e,t,n){switch(t.tag){case 3:Vw(t),po();break;case 5:gw(t);break;case 1:Yt(t.type)&&Ac(t);break;case 4:Hh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;$e(Pc,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?($e(Ge,Ge.current&1),t.flags|=128,null):n&t.child.childLanes?Uw(e,t,n):($e(Ge,Ge.current&1),e=Er(e,t,n),e!==null?e.sibling:null);$e(Ge,Ge.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Hw(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),$e(Ge,Ge.current),r)break;return null;case 22:case 23:return t.lanes=0,Bw(e,t,n)}return Er(e,t,n)}var Ww,Kf,qw,Gw;Ww=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}};Kf=function(){};qw=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ni(nr.current);var s=null;switch(n){case"input":i=yf(e,i),r=yf(e,r),s=[];break;case"select":i=Ke({},i,{value:void 0}),r=Ke({},r,{value:void 0}),s=[];break;case"textarea":i=bf(e,i),r=bf(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Tc)}Sf(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"&&(ba.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"&&(ba.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&ze("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)}};Gw=function(e,t,n,r){n!==r&&(t.flags|=4)};function Uo(e,t){if(!We)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 _t(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 aT(e,t,n){var r=t.pendingProps;switch(Lh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _t(t),null;case 1:return Yt(t.type)&&Ec(),_t(t),null;case 3:return r=t.stateNode,mo(),Ue(Gt),Ue(Pt),qh(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Rl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,In!==null&&(ip(In),In=null))),Kf(e,t),_t(t),null;case 5:Wh(t);var i=Ni(Na.current);if(n=t.type,e!==null&&t.stateNode!=null)qw(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(X(166));return _t(t),null}if(e=Ni(nr.current),Rl(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[er]=t,r[Pa]=s,e=(t.mode&1)!==0,n){case"dialog":ze("cancel",r),ze("close",r);break;case"iframe":case"object":case"embed":ze("load",r);break;case"video":case"audio":for(i=0;i<Zo.length;i++)ze(Zo[i],r);break;case"source":ze("error",r);break;case"img":case"image":case"link":ze("error",r),ze("load",r);break;case"details":ze("toggle",r);break;case"input":Ig(r,s),ze("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},ze("invalid",r);break;case"textarea":Fg(r,s),ze("invalid",r)}Sf(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&&jl(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&jl(r.textContent,a,e),i=["children",""+a]):ba.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&ze("scroll",r)}switch(n){case"input":bl(r),Lg(r,s,!0);break;case"textarea":bl(r),$g(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Tc)}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=b1(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[er]=t,e[Pa]=r,Ww(e,t,!1,!1),t.stateNode=e;e:{switch(o=Cf(n,r),n){case"dialog":ze("cancel",e),ze("close",e),i=r;break;case"iframe":case"object":case"embed":ze("load",e),i=r;break;case"video":case"audio":for(i=0;i<Zo.length;i++)ze(Zo[i],e);i=r;break;case"source":ze("error",e),i=r;break;case"img":case"image":case"link":ze("error",e),ze("load",e),i=r;break;case"details":ze("toggle",e),i=r;break;case"input":Ig(e,r),i=yf(e,r),ze("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Ke({},r,{value:void 0}),ze("invalid",e);break;case"textarea":Fg(e,r),i=bf(e,r),ze("invalid",e);break;default:i=r}Sf(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?C1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&k1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&ka(e,l):typeof l=="number"&&ka(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(ba.hasOwnProperty(s)?l!=null&&s==="onScroll"&&ze("scroll",e):l!=null&&kh(e,s,l,o))}switch(n){case"input":bl(e),Lg(e,r,!1);break;case"textarea":bl(e),$g(e);break;case"option":r.value!=null&&e.setAttribute("value",""+fi(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Vs(e,!!r.multiple,s,!1):r.defaultValue!=null&&Vs(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Tc)}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 _t(t),null;case 6:if(e&&t.stateNode!=null)Gw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(X(166));if(n=Ni(Na.current),Ni(nr.current),Rl(t)){if(r=t.stateNode,n=t.memoizedProps,r[er]=t,(s=r.nodeValue!==n)&&(e=on,e!==null))switch(e.tag){case 3:jl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&jl(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[er]=t,t.stateNode=r}return _t(t),null;case 13:if(Ue(Ge),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(We&&nn!==null&&t.mode&1&&!(t.flags&128))dw(),po(),t.flags|=98560,s=!1;else if(s=Rl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(X(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(X(317));s[er]=t}else po(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;_t(t),s=!1}else In!==null&&(ip(In),In=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||Ge.current&1?ut===0&&(ut=3):im())),t.updateQueue!==null&&(t.flags|=4),_t(t),null);case 4:return mo(),Kf(e,t),e===null&&ja(t.stateNode.containerInfo),_t(t),null;case 10:return zh(t.type._context),_t(t),null;case 17:return Yt(t.type)&&Ec(),_t(t),null;case 19:if(Ue(Ge),s=t.memoizedState,s===null)return _t(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)Uo(s,!1);else{if(ut!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Oc(e),o!==null){for(t.flags|=128,Uo(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return $e(Ge,Ge.current&1|2),t.child}e=e.sibling}s.tail!==null&&nt()>vo&&(t.flags|=128,r=!0,Uo(s,!1),t.lanes=4194304)}else{if(!r)if(e=Oc(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Uo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!We)return _t(t),null}else 2*nt()-s.renderingStartTime>vo&&n!==1073741824&&(t.flags|=128,r=!0,Uo(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=nt(),t.sibling=null,n=Ge.current,$e(Ge,r?n&1|2:n&1),t):(_t(t),null);case 22:case 23:return rm(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Jt&1073741824&&(_t(t),t.subtreeFlags&6&&(t.flags|=8192)):_t(t),null;case 24:return null;case 25:return null}throw Error(X(156,t.tag))}function lT(e,t){switch(Lh(t),t.tag){case 1:return Yt(t.type)&&Ec(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return mo(),Ue(Gt),Ue(Pt),qh(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Wh(t),null;case 13:if(Ue(Ge),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(X(340));po()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ue(Ge),null;case 4:return mo(),null;case 10:return zh(t.type._context),null;case 22:case 23:return rm(),null;case 24:return null;default:return null}}var Nl=!1,At=!1,cT=typeof WeakSet=="function"?WeakSet:Set,ce=null;function Ns(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Je(e,t,r)}else n.current=null}function Xf(e,t,n){try{n()}catch(r){Je(e,t,r)}}var Av=!1;function uT(e,t){if(Of=Sc,e=Z1(),Dh(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,p=null;t:for(;;){for(var h;u!==n||i!==0&&u.nodeType!==3||(a=o+i),u!==s||r!==0&&u.nodeType!==3||(l=o+r),u.nodeType===3&&(o+=u.nodeValue.length),(h=u.firstChild)!==null;)p=u,u=h;for(;;){if(u===e)break t;if(p===n&&++c===i&&(a=o),p===s&&++d===r&&(l=o),(h=u.nextSibling)!==null)break;u=p,p=u.parentNode}u=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Df={focusedElem:e,selectionRange:n},Sc=!1,ce=t;ce!==null;)if(t=ce,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ce=e;else for(;ce!==null;){t=ce;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var w=y.memoizedProps,b=y.memoizedState,m=t.stateNode,v=m.getSnapshotBeforeUpdate(t.elementType===t.type?w:Mn(t.type,w),b);m.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(X(163))}}catch(S){Je(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,ce=e;break}ce=t.return}return y=Av,Av=!1,y}function da(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&&Xf(t,n,s)}i=i.next}while(i!==r)}}function vu(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 Zf(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 Yw(e){var t=e.alternate;t!==null&&(e.alternate=null,Yw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[er],delete t[Pa],delete t[Ff],delete t[q_],delete t[G_])),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 Qw(e){return e.tag===5||e.tag===3||e.tag===4}function jv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Qw(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 Jf(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=Tc));else if(r!==4&&(e=e.child,e!==null))for(Jf(e,t,n),e=e.sibling;e!==null;)Jf(e,t,n),e=e.sibling}function ep(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(ep(e,t,n),e=e.sibling;e!==null;)ep(e,t,n),e=e.sibling}var xt=null,On=!1;function Ir(e,t,n){for(n=n.child;n!==null;)Kw(e,t,n),n=n.sibling}function Kw(e,t,n){if(tr&&typeof tr.onCommitFiberUnmount=="function")try{tr.onCommitFiberUnmount(cu,n)}catch{}switch(n.tag){case 5:At||Ns(n,t);case 6:var r=xt,i=On;xt=null,Ir(e,t,n),xt=r,On=i,xt!==null&&(On?(e=xt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):xt.removeChild(n.stateNode));break;case 18:xt!==null&&(On?(e=xt,n=n.stateNode,e.nodeType===8?wd(e.parentNode,n):e.nodeType===1&&wd(e,n),Ta(e)):wd(xt,n.stateNode));break;case 4:r=xt,i=On,xt=n.stateNode.containerInfo,On=!0,Ir(e,t,n),xt=r,On=i;break;case 0:case 11:case 14:case 15:if(!At&&(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)&&Xf(n,t,o),i=i.next}while(i!==r)}Ir(e,t,n);break;case 1:if(!At&&(Ns(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Je(n,t,a)}Ir(e,t,n);break;case 21:Ir(e,t,n);break;case 22:n.mode&1?(At=(r=At)||n.memoizedState!==null,Ir(e,t,n),At=r):Ir(e,t,n);break;default:Ir(e,t,n)}}function Rv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new cT),t.forEach(function(r){var i=xT.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function jn(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:xt=a.stateNode,On=!1;break e;case 3:xt=a.stateNode.containerInfo,On=!0;break e;case 4:xt=a.stateNode.containerInfo,On=!0;break e}a=a.return}if(xt===null)throw Error(X(160));Kw(s,o,i),xt=null,On=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){Je(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Xw(t,e),t=t.sibling}function Xw(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(jn(t,e),Wn(e),r&4){try{da(3,e,e.return),vu(3,e)}catch(w){Je(e,e.return,w)}try{da(5,e,e.return)}catch(w){Je(e,e.return,w)}}break;case 1:jn(t,e),Wn(e),r&512&&n!==null&&Ns(n,n.return);break;case 5:if(jn(t,e),Wn(e),r&512&&n!==null&&Ns(n,n.return),e.flags&32){var i=e.stateNode;try{ka(i,"")}catch(w){Je(e,e.return,w)}}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&&x1(i,s),Cf(a,o);var c=Cf(a,s);for(o=0;o<l.length;o+=2){var d=l[o],u=l[o+1];d==="style"?C1(i,u):d==="dangerouslySetInnerHTML"?k1(i,u):d==="children"?ka(i,u):kh(i,d,u,c)}switch(a){case"input":xf(i,s);break;case"textarea":w1(i,s);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?Vs(i,!!s.multiple,h,!1):p!==!!s.multiple&&(s.defaultValue!=null?Vs(i,!!s.multiple,s.defaultValue,!0):Vs(i,!!s.multiple,s.multiple?[]:"",!1))}i[Pa]=s}catch(w){Je(e,e.return,w)}}break;case 6:if(jn(t,e),Wn(e),r&4){if(e.stateNode===null)throw Error(X(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(w){Je(e,e.return,w)}}break;case 3:if(jn(t,e),Wn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ta(t.containerInfo)}catch(w){Je(e,e.return,w)}break;case 4:jn(t,e),Wn(e);break;case 13:jn(t,e),Wn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(tm=nt())),r&4&&Rv(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(At=(c=At)||d,jn(t,e),At=c):jn(t,e),Wn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(ce=e,d=e.child;d!==null;){for(u=ce=d;ce!==null;){switch(p=ce,h=p.child,p.tag){case 0:case 11:case 14:case 15:da(4,p,p.return);break;case 1:Ns(p,p.return);var y=p.stateNode;if(typeof y.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(w){Je(r,n,w)}}break;case 5:Ns(p,p.return);break;case 22:if(p.memoizedState!==null){Mv(u);continue}}h!==null?(h.return=p,ce=h):Mv(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=S1("display",o))}catch(w){Je(e,e.return,w)}}}else if(u.tag===6){if(d===null)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(w){Je(e,e.return,w)}}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:jn(t,e),Wn(e),r&4&&Rv(e);break;case 21:break;default:jn(t,e),Wn(e)}}function Wn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Qw(n)){var r=n;break e}n=n.return}throw Error(X(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(ka(i,""),r.flags&=-33);var s=jv(e);ep(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=jv(e);Jf(e,a,o);break;default:throw Error(X(161))}}catch(l){Je(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function dT(e,t,n){ce=e,Zw(e)}function Zw(e,t,n){for(var r=(e.mode&1)!==0;ce!==null;){var i=ce,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Nl;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||At;a=Nl;var c=At;if(Nl=o,(At=l)&&!c)for(ce=i;ce!==null;)o=ce,l=o.child,o.tag===22&&o.memoizedState!==null?Nv(i):l!==null?(l.return=o,ce=l):Nv(i);for(;s!==null;)ce=s,Zw(s),s=s.sibling;ce=i,Nl=a,At=c}Pv(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,ce=s):Pv(e)}}function Pv(e){for(;ce!==null;){var t=ce;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:At||vu(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!At)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Mn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&mv(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}mv(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&&Ta(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(X(163))}At||t.flags&512&&Zf(t)}catch(p){Je(t,t.return,p)}}if(t===e){ce=null;break}if(n=t.sibling,n!==null){n.return=t.return,ce=n;break}ce=t.return}}function Mv(e){for(;ce!==null;){var t=ce;if(t===e){ce=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ce=n;break}ce=t.return}}function Nv(e){for(;ce!==null;){var t=ce;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{vu(4,t)}catch(l){Je(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Je(t,i,l)}}var s=t.return;try{Zf(t)}catch(l){Je(t,s,l)}break;case 5:var o=t.return;try{Zf(t)}catch(l){Je(t,o,l)}}}catch(l){Je(t,t.return,l)}if(t===e){ce=null;break}var a=t.sibling;if(a!==null){a.return=t.return,ce=a;break}ce=t.return}}var fT=Math.ceil,Lc=Mr.ReactCurrentDispatcher,Jh=Mr.ReactCurrentOwner,Sn=Mr.ReactCurrentBatchConfig,Ae=0,ht=null,it=null,bt=0,Jt=0,Os=yi(0),ut=0,La=null,ts=0,yu=0,em=0,fa=null,Ht=null,tm=0,vo=1/0,gr=null,Fc=!1,tp=null,ai=null,Ol=!1,ei=null,$c=0,pa=0,np=null,ic=-1,sc=0;function It(){return Ae&6?nt():ic!==-1?ic:ic=nt()}function li(e){return e.mode&1?Ae&2&&bt!==0?bt&-bt:Q_.transition!==null?(sc===0&&(sc=I1()),sc):(e=Pe,e!==0||(e=window.event,e=e===void 0?16:U1(e.type)),e):1}function Bn(e,t,n,r){if(50<pa)throw pa=0,np=null,Error(X(185));il(e,n,r),(!(Ae&2)||e!==ht)&&(e===ht&&(!(Ae&2)&&(yu|=n),ut===4&&Ur(e,bt)),Qt(e,r),n===1&&Ae===0&&!(t.mode&1)&&(vo=nt()+500,hu&&xi()))}function Qt(e,t){var n=e.callbackNode;Q2(e,t);var r=kc(e,e===ht?bt:0);if(r===0)n!==null&&Vg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Vg(n),t===1)e.tag===0?Y_(Ov.bind(null,e)):lw(Ov.bind(null,e)),H_(function(){!(Ae&6)&&xi()}),n=null;else{switch(L1(r)){case 1:n=Eh;break;case 4:n=O1;break;case 16:n=bc;break;case 536870912:n=D1;break;default:n=bc}n=ob(n,Jw.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Jw(e,t){if(ic=-1,sc=0,Ae&6)throw Error(X(327));var n=e.callbackNode;if(Gs()&&e.callbackNode!==n)return null;var r=kc(e,e===ht?bt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Bc(e,r);else{t=r;var i=Ae;Ae|=2;var s=tb();(ht!==e||bt!==t)&&(gr=null,vo=nt()+500,Hi(e,t));do try{mT();break}catch(a){eb(e,a)}while(!0);Bh(),Lc.current=s,Ae=i,it!==null?t=0:(ht=null,bt=0,t=ut)}if(t!==0){if(t===2&&(i=jf(e),i!==0&&(r=i,t=rp(e,i))),t===1)throw n=La,Hi(e,0),Ur(e,r),Qt(e,nt()),n;if(t===6)Ur(e,r);else{if(i=e.current.alternate,!(r&30)&&!pT(i)&&(t=Bc(e,r),t===2&&(s=jf(e),s!==0&&(r=s,t=rp(e,s))),t===1))throw n=La,Hi(e,0),Ur(e,r),Qt(e,nt()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(X(345));case 2:Ei(e,Ht,gr);break;case 3:if(Ur(e,r),(r&130023424)===r&&(t=tm+500-nt(),10<t)){if(kc(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){It(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Lf(Ei.bind(null,e,Ht,gr),t);break}Ei(e,Ht,gr);break;case 4:if(Ur(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-$n(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=nt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*fT(r/1960))-r,10<r){e.timeoutHandle=Lf(Ei.bind(null,e,Ht,gr),r);break}Ei(e,Ht,gr);break;case 5:Ei(e,Ht,gr);break;default:throw Error(X(329))}}}return Qt(e,nt()),e.callbackNode===n?Jw.bind(null,e):null}function rp(e,t){var n=fa;return e.current.memoizedState.isDehydrated&&(Hi(e,t).flags|=256),e=Bc(e,t),e!==2&&(t=Ht,Ht=n,t!==null&&ip(t)),e}function ip(e){Ht===null?Ht=e:Ht.push.apply(Ht,e)}function pT(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(!Vn(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 Ur(e,t){for(t&=~em,t&=~yu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-$n(t),r=1<<n;e[n]=-1,t&=~r}}function Ov(e){if(Ae&6)throw Error(X(327));Gs();var t=kc(e,0);if(!(t&1))return Qt(e,nt()),null;var n=Bc(e,t);if(e.tag!==0&&n===2){var r=jf(e);r!==0&&(t=r,n=rp(e,r))}if(n===1)throw n=La,Hi(e,0),Ur(e,t),Qt(e,nt()),n;if(n===6)throw Error(X(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ei(e,Ht,gr),Qt(e,nt()),null}function nm(e,t){var n=Ae;Ae|=1;try{return e(t)}finally{Ae=n,Ae===0&&(vo=nt()+500,hu&&xi())}}function ns(e){ei!==null&&ei.tag===0&&!(Ae&6)&&Gs();var t=Ae;Ae|=1;var n=Sn.transition,r=Pe;try{if(Sn.transition=null,Pe=1,e)return e()}finally{Pe=r,Sn.transition=n,Ae=t,!(Ae&6)&&xi()}}function rm(){Jt=Os.current,Ue(Os)}function Hi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,U_(n)),it!==null)for(n=it.return;n!==null;){var r=n;switch(Lh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ec();break;case 3:mo(),Ue(Gt),Ue(Pt),qh();break;case 5:Wh(r);break;case 4:mo();break;case 13:Ue(Ge);break;case 19:Ue(Ge);break;case 10:zh(r.type._context);break;case 22:case 23:rm()}n=n.return}if(ht=e,it=e=ci(e.current,null),bt=Jt=t,ut=0,La=null,em=yu=ts=0,Ht=fa=null,Mi!==null){for(t=0;t<Mi.length;t++)if(n=Mi[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}Mi=null}return e}function eb(e,t){do{var n=it;try{if(Bh(),tc.current=Ic,Dc){for(var r=Qe.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Dc=!1}if(es=0,pt=lt=Qe=null,ua=!1,Oa=0,Jh.current=null,n===null||n.return===null){ut=1,La=t,it=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=bt,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 p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var h=bv(o);if(h!==null){h.flags&=-257,kv(h,o,a,s,t),h.mode&1&&wv(s,c,t),t=h,l=c;var y=t.updateQueue;if(y===null){var w=new Set;w.add(l),t.updateQueue=w}else y.add(l);break e}else{if(!(t&1)){wv(s,c,t),im();break e}l=Error(X(426))}}else if(We&&a.mode&1){var b=bv(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),kv(b,o,a,s,t),Fh(go(l,a));break e}}s=l=go(l,a),ut!==4&&(ut=2),fa===null?fa=[s]:fa.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var m=Lw(s,l,t);hv(s,m);break e;case 1:a=l;var v=s.type,x=s.stateNode;if(!(s.flags&128)&&(typeof v.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(ai===null||!ai.has(x)))){s.flags|=65536,t&=-t,s.lanes|=t;var S=Fw(s,a,t);hv(s,S);break e}}s=s.return}while(s!==null)}rb(n)}catch(C){t=C,it===n&&n!==null&&(it=n=n.return);continue}break}while(!0)}function tb(){var e=Lc.current;return Lc.current=Ic,e===null?Ic:e}function im(){(ut===0||ut===3||ut===2)&&(ut=4),ht===null||!(ts&268435455)&&!(yu&268435455)||Ur(ht,bt)}function Bc(e,t){var n=Ae;Ae|=2;var r=tb();(ht!==e||bt!==t)&&(gr=null,Hi(e,t));do try{hT();break}catch(i){eb(e,i)}while(!0);if(Bh(),Ae=n,Lc.current=r,it!==null)throw Error(X(261));return ht=null,bt=0,ut}function hT(){for(;it!==null;)nb(it)}function mT(){for(;it!==null&&!B2();)nb(it)}function nb(e){var t=sb(e.alternate,e,Jt);e.memoizedProps=e.pendingProps,t===null?rb(e):it=t,Jh.current=null}function rb(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=lT(n,t),n!==null){n.flags&=32767,it=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ut=6,it=null;return}}else if(n=aT(n,t,Jt),n!==null){it=n;return}if(t=t.sibling,t!==null){it=t;return}it=t=e}while(t!==null);ut===0&&(ut=5)}function Ei(e,t,n){var r=Pe,i=Sn.transition;try{Sn.transition=null,Pe=1,gT(e,t,n,r)}finally{Sn.transition=i,Pe=r}return null}function gT(e,t,n,r){do Gs();while(ei!==null);if(Ae&6)throw Error(X(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(X(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(K2(e,s),e===ht&&(it=ht=null,bt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ol||(Ol=!0,ob(bc,function(){return Gs(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Sn.transition,Sn.transition=null;var o=Pe;Pe=1;var a=Ae;Ae|=4,Jh.current=null,uT(e,n),Xw(n,e),I_(Df),Sc=!!Of,Df=Of=null,e.current=n,dT(n),z2(),Ae=a,Pe=o,Sn.transition=s}else e.current=n;if(Ol&&(Ol=!1,ei=e,$c=i),s=e.pendingLanes,s===0&&(ai=null),H2(n.stateNode),Qt(e,nt()),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(Fc)throw Fc=!1,e=tp,tp=null,e;return $c&1&&e.tag!==0&&Gs(),s=e.pendingLanes,s&1?e===np?pa++:(pa=0,np=e):pa=0,xi(),null}function Gs(){if(ei!==null){var e=L1($c),t=Sn.transition,n=Pe;try{if(Sn.transition=null,Pe=16>e?16:e,ei===null)var r=!1;else{if(e=ei,ei=null,$c=0,Ae&6)throw Error(X(331));var i=Ae;for(Ae|=4,ce=e.current;ce!==null;){var s=ce,o=s.child;if(ce.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(ce=c;ce!==null;){var d=ce;switch(d.tag){case 0:case 11:case 15:da(8,d,s)}var u=d.child;if(u!==null)u.return=d,ce=u;else for(;ce!==null;){d=ce;var p=d.sibling,h=d.return;if(Yw(d),d===c){ce=null;break}if(p!==null){p.return=h,ce=p;break}ce=h}}}var y=s.alternate;if(y!==null){var w=y.child;if(w!==null){y.child=null;do{var b=w.sibling;w.sibling=null,w=b}while(w!==null)}}ce=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,ce=o;else e:for(;ce!==null;){if(s=ce,s.flags&2048)switch(s.tag){case 0:case 11:case 15:da(9,s,s.return)}var m=s.sibling;if(m!==null){m.return=s.return,ce=m;break e}ce=s.return}}var v=e.current;for(ce=v;ce!==null;){o=ce;var x=o.child;if(o.subtreeFlags&2064&&x!==null)x.return=o,ce=x;else e:for(o=v;ce!==null;){if(a=ce,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:vu(9,a)}}catch(C){Je(a,a.return,C)}if(a===o){ce=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,ce=S;break e}ce=a.return}}if(Ae=i,xi(),tr&&typeof tr.onPostCommitFiberRoot=="function")try{tr.onPostCommitFiberRoot(cu,e)}catch{}r=!0}return r}finally{Pe=n,Sn.transition=t}}return!1}function Dv(e,t,n){t=go(n,t),t=Lw(e,t,1),e=oi(e,t,1),t=It(),e!==null&&(il(e,1,t),Qt(e,t))}function Je(e,t,n){if(e.tag===3)Dv(e,e,n);else for(;t!==null;){if(t.tag===3){Dv(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ai===null||!ai.has(r))){e=go(n,e),e=Fw(t,e,1),t=oi(t,e,1),e=It(),t!==null&&(il(t,1,e),Qt(t,e));break}}t=t.return}}function vT(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=It(),e.pingedLanes|=e.suspendedLanes&n,ht===e&&(bt&n)===n&&(ut===4||ut===3&&(bt&130023424)===bt&&500>nt()-tm?Hi(e,0):em|=n),Qt(e,t)}function ib(e,t){t===0&&(e.mode&1?(t=Cl,Cl<<=1,!(Cl&130023424)&&(Cl=4194304)):t=1);var n=It();e=Tr(e,t),e!==null&&(il(e,t,n),Qt(e,n))}function yT(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ib(e,n)}function xT(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(X(314))}r!==null&&r.delete(t),ib(e,n)}var sb;sb=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Gt.current)qt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return qt=!1,oT(e,t,n);qt=!!(e.flags&131072)}else qt=!1,We&&t.flags&1048576&&cw(t,Rc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;rc(e,t),e=t.pendingProps;var i=fo(t,Pt.current);qs(t,n),i=Yh(null,t,r,e,i,n);var s=Qh();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,Yt(r)?(s=!0,Ac(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Uh(t),i.updater=gu,t.stateNode=i,i._reactInternals=t,Hf(t,r,e,n),t=Gf(null,t,r,!0,s,n)):(t.tag=0,We&&s&&Ih(t),Ot(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(rc(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=bT(r),e=Mn(r,e),i){case 0:t=qf(null,t,r,e,n);break e;case 1:t=_v(null,t,r,e,n);break e;case 11:t=Sv(null,t,r,e,n);break e;case 14:t=Cv(null,t,r,Mn(r.type,e),n);break e}throw Error(X(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Mn(r,i),qf(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Mn(r,i),_v(e,t,r,i,n);case 3:e:{if(Vw(t),e===null)throw Error(X(387));r=t.pendingProps,s=t.memoizedState,i=s.element,mw(e,t),Nc(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=go(Error(X(423)),t),t=Tv(e,t,r,n,i);break e}else if(r!==i){i=go(Error(X(424)),t),t=Tv(e,t,r,n,i);break e}else for(nn=si(t.stateNode.containerInfo.firstChild),on=t,We=!0,In=null,n=pw(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(po(),r===i){t=Er(e,t,n);break e}Ot(e,t,r,n)}t=t.child}return t;case 5:return gw(t),e===null&&zf(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,If(r,i)?o=null:s!==null&&If(r,s)&&(t.flags|=32),zw(e,t),Ot(e,t,o,n),t.child;case 6:return e===null&&zf(t),null;case 13:return Uw(e,t,n);case 4:return Hh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ho(t,null,r,n):Ot(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Mn(r,i),Sv(e,t,r,i,n);case 7:return Ot(e,t,t.pendingProps,n),t.child;case 8:return Ot(e,t,t.pendingProps.children,n),t.child;case 12:return Ot(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,$e(Pc,r._currentValue),r._currentValue=o,s!==null)if(Vn(s.value,o)){if(s.children===i.children&&!Gt.current){t=Er(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=kr(-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),Vf(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(X(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Vf(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Ot(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,qs(t,n),i=_n(i),r=r(i),t.flags|=1,Ot(e,t,r,n),t.child;case 14:return r=t.type,i=Mn(r,t.pendingProps),i=Mn(r.type,i),Cv(e,t,r,i,n);case 15:return $w(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Mn(r,i),rc(e,t),t.tag=1,Yt(r)?(e=!0,Ac(t)):e=!1,qs(t,n),Iw(t,r,i),Hf(t,r,i,n),Gf(null,t,r,!0,e,n);case 19:return Hw(e,t,n);case 22:return Bw(e,t,n)}throw Error(X(156,t.tag))};function ob(e,t){return N1(e,t)}function wT(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 kn(e,t,n,r){return new wT(e,t,n,r)}function sm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function bT(e){if(typeof e=="function")return sm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ch)return 11;if(e===_h)return 14}return 2}function ci(e,t){var n=e.alternate;return n===null?(n=kn(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 oc(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")sm(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Cs:return Wi(n.children,i,s,t);case Sh:o=8,i|=8;break;case hf:return e=kn(12,n,t,i|2),e.elementType=hf,e.lanes=s,e;case mf:return e=kn(13,n,t,i),e.elementType=mf,e.lanes=s,e;case gf:return e=kn(19,n,t,i),e.elementType=gf,e.lanes=s,e;case g1:return xu(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case h1:o=10;break e;case m1:o=9;break e;case Ch:o=11;break e;case _h:o=14;break e;case $r:o=16,r=null;break e}throw Error(X(130,e==null?e:typeof e,""))}return t=kn(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Wi(e,t,n,r){return e=kn(7,e,r,t),e.lanes=n,e}function xu(e,t,n,r){return e=kn(22,e,r,t),e.elementType=g1,e.lanes=n,e.stateNode={isHidden:!1},e}function Ad(e,t,n){return e=kn(6,e,null,t),e.lanes=n,e}function jd(e,t,n){return t=kn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function kT(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=cd(0),this.expirationTimes=cd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=cd(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function om(e,t,n,r,i,s,o,a,l){return e=new kT(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=kn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Uh(s),e}function ST(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ss,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function ab(e){if(!e)return pi;e=e._reactInternals;e:{if(as(e)!==e||e.tag!==1)throw Error(X(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Yt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(X(171))}if(e.tag===1){var n=e.type;if(Yt(n))return aw(e,n,t)}return t}function lb(e,t,n,r,i,s,o,a,l){return e=om(n,r,!0,e,i,s,o,a,l),e.context=ab(null),n=e.current,r=It(),i=li(n),s=kr(r,i),s.callback=t??null,oi(n,s,i),e.current.lanes=i,il(e,i,r),Qt(e,r),e}function wu(e,t,n,r){var i=t.current,s=It(),o=li(i);return n=ab(n),t.context===null?t.context=n:t.pendingContext=n,t=kr(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=oi(i,t,o),e!==null&&(Bn(e,i,o,s),ec(e,i,o)),o}function zc(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 Iv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function am(e,t){Iv(e,t),(e=e.alternate)&&Iv(e,t)}function CT(){return null}var cb=typeof reportError=="function"?reportError:function(e){console.error(e)};function lm(e){this._internalRoot=e}bu.prototype.render=lm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(X(409));wu(e,t,null,null)};bu.prototype.unmount=lm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ns(function(){wu(null,e,null,null)}),t[_r]=null}};function bu(e){this._internalRoot=e}bu.prototype.unstable_scheduleHydration=function(e){if(e){var t=B1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Vr.length&&t!==0&&t<Vr[n].priority;n++);Vr.splice(n,0,e),n===0&&V1(e)}};function cm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ku(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Lv(){}function _T(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var c=zc(o);s.call(c)}}var o=lb(t,r,e,0,null,!1,!1,"",Lv);return e._reactRootContainer=o,e[_r]=o.current,ja(e.nodeType===8?e.parentNode:e),ns(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var c=zc(l);a.call(c)}}var l=om(e,0,!1,null,null,!1,!1,"",Lv);return e._reactRootContainer=l,e[_r]=l.current,ja(e.nodeType===8?e.parentNode:e),ns(function(){wu(t,l,n,r)}),l}function Su(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=zc(o);a.call(l)}}wu(t,o,e,i)}else o=_T(n,t,e,i,r);return zc(o)}F1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Xo(t.pendingLanes);n!==0&&(Ah(t,n|1),Qt(t,nt()),!(Ae&6)&&(vo=nt()+500,xi()))}break;case 13:ns(function(){var r=Tr(e,1);if(r!==null){var i=It();Bn(r,e,1,i)}}),am(e,1)}};jh=function(e){if(e.tag===13){var t=Tr(e,134217728);if(t!==null){var n=It();Bn(t,e,134217728,n)}am(e,134217728)}};$1=function(e){if(e.tag===13){var t=li(e),n=Tr(e,t);if(n!==null){var r=It();Bn(n,e,t,r)}am(e,t)}};B1=function(){return Pe};z1=function(e,t){var n=Pe;try{return Pe=e,t()}finally{Pe=n}};Tf=function(e,t,n){switch(t){case"input":if(xf(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=pu(r);if(!i)throw Error(X(90));y1(r),xf(r,i)}}}break;case"textarea":w1(e,n);break;case"select":t=n.value,t!=null&&Vs(e,!!n.multiple,t,!1)}};E1=nm;A1=ns;var TT={usingClientEntryPoint:!1,Events:[ol,As,pu,_1,T1,nm]},Ho={findFiberByHostInstance:Pi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ET={bundleType:Ho.bundleType,version:Ho.version,rendererPackageName:Ho.rendererPackageName,rendererConfig:Ho.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=P1(e),e===null?null:e.stateNode},findFiberByHostInstance:Ho.findFiberByHostInstance||CT,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 Dl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Dl.isDisabled&&Dl.supportsFiber)try{cu=Dl.inject(ET),tr=Dl}catch{}}ln.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=TT;ln.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!cm(t))throw Error(X(200));return ST(e,t,null,n)};ln.createRoot=function(e,t){if(!cm(e))throw Error(X(299));var n=!1,r="",i=cb;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=om(e,1,!1,null,null,n,!1,r,i),e[_r]=t.current,ja(e.nodeType===8?e.parentNode:e),new lm(t)};ln.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(X(188)):(e=Object.keys(e).join(","),Error(X(268,e)));return e=P1(t),e=e===null?null:e.stateNode,e};ln.flushSync=function(e){return ns(e)};ln.hydrate=function(e,t,n){if(!ku(t))throw Error(X(200));return Su(null,e,t,!0,n)};ln.hydrateRoot=function(e,t,n){if(!cm(e))throw Error(X(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=cb;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=lb(t,null,e,1,n??null,i,!1,s,o),e[_r]=t.current,ja(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new bu(t)};ln.render=function(e,t,n){if(!ku(t))throw Error(X(200));return Su(null,e,t,!1,n)};ln.unmountComponentAtNode=function(e){if(!ku(e))throw Error(X(40));return e._reactRootContainer?(ns(function(){Su(null,null,e,!1,function(){e._reactRootContainer=null,e[_r]=null})}),!0):!1};ln.unstable_batchedUpdates=nm;ln.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ku(n))throw Error(X(200));if(e==null||e._reactInternals===void 0)throw Error(X(38));return Su(e,t,n,!1,r)};ln.version="18.3.1-next-f1338f8080-20240426";function ub(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ub)}catch(e){console.error(e)}}ub(),u1.exports=ln;var db=u1.exports;const AT=Pr(db);var fb,Fv=db;fb=Fv.createRoot,Fv.hydrateRoot;const jT="@alfatech/livechat",RT="v2026.04.13.1",PT="module",MT="https://api.chatier.app",NT="wss://api.chatier.app",OT=["dist","README.md","component/chatier.js"],DT="dist/widget.js",IT={name:"Uygar Öztürk Ceylan",email:"uygaroztcyln@gmail.com"},LT={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",preview:"vite preview","build:mobile":"tsc -b && vite build --config vite.config.app.ts && mv dist-app/index-app.html dist-app/index.html","preview:mobile":"vite preview --config vite.config.app.ts --outDir dist-app","dev:mobile":"vite --config vite.config.app.ts"},FT={"@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"},$T={"@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"},pb={name:jT,private:!1,version:RT,type:PT,apiURL:MT,wsURL:NT,files:OT,main:DT,author:IT,scripts:LT,dependencies:FT,devDependencies:$T,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},hb=pb.apiURL,BT=pb.wsURL,zT=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],VT=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],UT={429:zT,404:VT};async function Nr(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=await fetch(`${hb}/${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=UT[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 zn=e=>[200,201,204].includes(e),HT=(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 jo=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(){}},rs=typeof window>"u"||"Deno"in globalThis;function yn(){}function WT(e,t){return typeof e=="function"?e(t):e}function sp(e){return typeof e=="number"&&e>=0&&e!==1/0}function mb(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ys(e,t){return typeof e=="function"?e(t):e}function Ln(e,t){return typeof e=="function"?e(t):e}function $v(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==um(o,t.options))return!1}else if(!Fa(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 Bv(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(is(t.options.mutationKey)!==is(s))return!1}else if(!Fa(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function um(e,t){return((t==null?void 0:t.queryKeyHashFn)||is)(e)}function is(e){return JSON.stringify(e,(t,n)=>op(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Fa(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Fa(e[n],t[n])):!1}function gb(e,t){if(e===t)return e;const n=zv(e)&&zv(t);if(n||op(e)&&op(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]=gb(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function Vc(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 zv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function op(e){if(!Vv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Vv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Vv(e){return Object.prototype.toString.call(e)==="[object Object]"}function qT(e){return new Promise(t=>{setTimeout(t,e)})}function ap(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?gb(e,t):t}function GT(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function YT(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var dm=Symbol();function vb(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===dm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Li,Hr,Xs,Ux,QT=(Ux=class extends jo{constructor(){super();fe(this,Li);fe(this,Hr);fe(this,Xs);le(this,Xs,t=>{if(!rs&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){T(this,Hr)||this.setEventListener(T(this,Xs))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,Hr))==null||t.call(this),le(this,Hr,void 0))}setEventListener(t){var n;le(this,Xs,t),(n=T(this,Hr))==null||n.call(this),le(this,Hr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){T(this,Li)!==t&&(le(this,Li,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof T(this,Li)=="boolean"?T(this,Li):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Li=new WeakMap,Hr=new WeakMap,Xs=new WeakMap,Ux),fm=new QT,Zs,Wr,Js,Hx,KT=(Hx=class extends jo{constructor(){super();fe(this,Zs,!0);fe(this,Wr);fe(this,Js);le(this,Js,t=>{if(!rs&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){T(this,Wr)||this.setEventListener(T(this,Js))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,Wr))==null||t.call(this),le(this,Wr,void 0))}setEventListener(t){var n;le(this,Js,t),(n=T(this,Wr))==null||n.call(this),le(this,Wr,t(this.setOnline.bind(this)))}setOnline(t){T(this,Zs)!==t&&(le(this,Zs,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return T(this,Zs)}},Zs=new WeakMap,Wr=new WeakMap,Js=new WeakMap,Hx),Uc=new KT;function lp(){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 XT(e){return Math.min(1e3*2**e,3e4)}function yb(e){return(e??"online")==="online"?Uc.isOnline():!0}var xb=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Rd(e){return e instanceof xb}function wb(e){let t=!1,n=0,r=!1,i;const s=lp(),o=w=>{var b;r||(p(new xb(w)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>fm.isFocused()&&(e.networkMode==="always"||Uc.isOnline())&&e.canRun(),d=()=>yb(e.networkMode)&&e.canRun(),u=w=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,w),i==null||i(),s.resolve(w))},p=w=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,w),i==null||i(),s.reject(w))},h=()=>new Promise(w=>{var b;i=m=>{(r||c())&&w(m)},(b=e.onPause)==null||b.call(e)}).then(()=>{var w;i=void 0,r||(w=e.onContinue)==null||w.call(e)}),y=()=>{if(r)return;let w;const b=n===0?e.initialPromise:void 0;try{w=b??e.fn()}catch(m){w=Promise.reject(m)}Promise.resolve(w).then(u).catch(m=>{var _;if(r)return;const v=e.retry??(rs?0:3),x=e.retryDelay??XT,S=typeof x=="function"?x(n,m):x,C=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,m);if(t||!C){p(m);return}n++,(_=e.onFail)==null||_.call(e,n,m),qT(S).then(()=>c()?void 0:h()).then(()=>{t?p(m):y()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?y():h().then(y),s)}}function ZT(){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 ct=ZT(),Fi,Wx,bb=(Wx=class{constructor(){fe(this,Fi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),sp(this.gcTime)&&le(this,Fi,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(rs?1/0:5*60*1e3))}clearGcTimeout(){T(this,Fi)&&(clearTimeout(T(this,Fi)),le(this,Fi,void 0))}},Fi=new WeakMap,Wx),eo,to,vn,Tt,Ja,$i,Nn,hr,qx,JT=(qx=class extends bb{constructor(t){super();fe(this,Nn);fe(this,eo);fe(this,to);fe(this,vn);fe(this,Tt);fe(this,Ja);fe(this,$i);le(this,$i,!1),le(this,Ja,t.defaultOptions),this.setOptions(t.options),this.observers=[],le(this,vn,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,le(this,eo,eE(this.options)),this.state=t.state??T(this,eo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=T(this,Tt))==null?void 0:t.promise}setOptions(t){this.options={...T(this,Ja),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,vn).remove(this)}setData(t,n){const r=ap(this.state.data,t,this.options);return we(this,Nn,hr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){we(this,Nn,hr).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=T(this,Tt))==null?void 0:r.promise;return(i=T(this,Tt))==null||i.cancel(t),n?n.then(yn).catch(yn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(T(this,eo))}isActive(){return this.observers.some(t=>Ln(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===dm||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||!mb(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,Tt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,Tt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),T(this,vn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(T(this,Tt)&&(T(this,$i)?T(this,Tt).cancel({revert:!0}):T(this,Tt).cancelRetry()),this.scheduleGc()),T(this,vn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||we(this,Nn,hr).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(T(this,Tt))return T(this,Tt).continueRetry(),T(this,Tt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const u=this.observers.find(p=>p.options.queryFn);u&&this.setOptions(u.options)}const r=new AbortController,i=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(le(this,$i,!0),r.signal)})},s=()=>{const u=vb(this.options,n),p={queryKey:this.queryKey,meta:this.meta};return i(p),le(this,$i,!1),this.options.persister?this.options.persister(u,p,this):u(p)},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),le(this,to,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=o.fetchOptions)==null?void 0:c.meta))&&we(this,Nn,hr).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const a=u=>{var p,h,y,w;Rd(u)&&u.silent||we(this,Nn,hr).call(this,{type:"error",error:u}),Rd(u)||((h=(p=T(this,vn).config).onError)==null||h.call(p,u,this),(w=(y=T(this,vn).config).onSettled)==null||w.call(y,this.state.data,u,this)),this.scheduleGc()};return le(this,Tt,wb({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:u=>{var p,h,y,w;if(u===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(b){a(b);return}(h=(p=T(this,vn).config).onSuccess)==null||h.call(p,u,this),(w=(y=T(this,vn).config).onSettled)==null||w.call(y,u,this.state.error,this),this.scheduleGc()},onError:a,onFail:(u,p)=>{we(this,Nn,hr).call(this,{type:"failed",failureCount:u,error:p})},onPause:()=>{we(this,Nn,hr).call(this,{type:"pause"})},onContinue:()=>{we(this,Nn,hr).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),T(this,Tt).start()}},eo=new WeakMap,to=new WeakMap,vn=new WeakMap,Tt=new WeakMap,Ja=new WeakMap,$i=new WeakMap,Nn=new WeakSet,hr=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,...kb(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 Rd(i)&&i.revert&&T(this,to)?{...T(this,to),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),ct.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),T(this,vn).notify({query:this,type:"updated",action:t})})},qx);function kb(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:yb(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function eE(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 Kn,Gx,tE=(Gx=class extends jo{constructor(t={}){super();fe(this,Kn);this.config=t,le(this,Kn,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??um(i,n);let o=this.get(s);return o||(o=new JT({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){T(this,Kn).has(t.queryHash)||(T(this,Kn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=T(this,Kn).get(t.queryHash);n&&(t.destroy(),n===t&&T(this,Kn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ct.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return T(this,Kn).get(t)}getAll(){return[...T(this,Kn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>$v(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>$v(t,r)):n}notify(t){ct.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ct.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ct.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Kn=new WeakMap,Gx),Xn,Mt,Bi,Zn,Lr,Yx,nE=(Yx=class extends bb{constructor(t){super();fe(this,Zn);fe(this,Xn);fe(this,Mt);fe(this,Bi);this.mutationId=t.mutationId,le(this,Mt,t.mutationCache),le(this,Xn,[]),this.state=t.state||Sb(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){T(this,Xn).includes(t)||(T(this,Xn).push(t),this.clearGcTimeout(),T(this,Mt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){le(this,Xn,T(this,Xn).filter(n=>n!==t)),this.scheduleGc(),T(this,Mt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){T(this,Xn).length||(this.state.status==="pending"?this.scheduleGc():T(this,Mt).remove(this))}continue(){var t;return((t=T(this,Bi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,c,d,u,p,h,y,w,b,m,v,x,S,C,_,j;le(this,Bi,wb({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(A,E)=>{we(this,Zn,Lr).call(this,{type:"failed",failureCount:A,error:E})},onPause:()=>{we(this,Zn,Lr).call(this,{type:"pause"})},onContinue:()=>{we(this,Zn,Lr).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>T(this,Mt).canRun(this)}));const n=this.state.status==="pending",r=!T(this,Bi).canStart();try{if(!n){we(this,Zn,Lr).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(i=T(this,Mt).config).onMutate)==null?void 0:s.call(i,t,this));const E=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));E!==this.state.context&&we(this,Zn,Lr).call(this,{type:"pending",context:E,variables:t,isPaused:r})}const A=await T(this,Bi).start();return await((c=(l=T(this,Mt).config).onSuccess)==null?void 0:c.call(l,A,t,this.state.context,this)),await((u=(d=this.options).onSuccess)==null?void 0:u.call(d,A,t,this.state.context)),await((h=(p=T(this,Mt).config).onSettled)==null?void 0:h.call(p,A,null,this.state.variables,this.state.context,this)),await((w=(y=this.options).onSettled)==null?void 0:w.call(y,A,null,t,this.state.context)),we(this,Zn,Lr).call(this,{type:"success",data:A}),A}catch(A){try{throw await((m=(b=T(this,Mt).config).onError)==null?void 0:m.call(b,A,t,this.state.context,this)),await((x=(v=this.options).onError)==null?void 0:x.call(v,A,t,this.state.context)),await((C=(S=T(this,Mt).config).onSettled)==null?void 0:C.call(S,void 0,A,this.state.variables,this.state.context,this)),await((j=(_=this.options).onSettled)==null?void 0:j.call(_,void 0,A,t,this.state.context)),A}finally{we(this,Zn,Lr).call(this,{type:"error",error:A})}}finally{T(this,Mt).runNext(this)}}},Xn=new WeakMap,Mt=new WeakMap,Bi=new WeakMap,Zn=new WeakSet,Lr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ct.batch(()=>{T(this,Xn).forEach(r=>{r.onMutationUpdate(t)}),T(this,Mt).notify({mutation:this,type:"updated",action:t})})},Yx);function Sb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Zt,el,Qx,rE=(Qx=class extends jo{constructor(t={}){super();fe(this,Zt);fe(this,el);this.config=t,le(this,Zt,new Map),le(this,el,Date.now())}build(t,n,r){const i=new nE({mutationCache:this,mutationId:++yl(this,el)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=Il(t),r=T(this,Zt).get(n)??[];r.push(t),T(this,Zt).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=Il(t);if(T(this,Zt).has(n)){const i=(r=T(this,Zt).get(n))==null?void 0:r.filter(s=>s!==t);i&&(i.length===0?T(this,Zt).delete(n):T(this,Zt).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=T(this,Zt).get(Il(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=T(this,Zt).get(Il(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){ct.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...T(this,Zt).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Bv(n,r))}findAll(t={}){return this.getAll().filter(n=>Bv(t,n))}notify(t){ct.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ct.batch(()=>Promise.all(t.map(n=>n.continue().catch(yn))))}},Zt=new WeakMap,el=new WeakMap,Qx);function Il(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function Uv(e){return{onFetch:(t,n)=>{var d,u,p,h,y;const r=t.options,i=(p=(u=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:u.fetchMore)==null?void 0:p.direction,s=((h=t.state.data)==null?void 0:h.pages)||[],o=((y=t.state.data)==null?void 0:y.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let w=!1;const b=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?w=!0:t.signal.addEventListener("abort",()=>{w=!0}),t.signal)})},m=vb(t.options,t.fetchOptions),v=async(x,S,C)=>{if(w)return Promise.reject();if(S==null&&x.pages.length)return Promise.resolve(x);const _={queryKey:t.queryKey,pageParam:S,direction:C?"backward":"forward",meta:t.options.meta};b(_);const j=await m(_),{maxPages:A}=t.options,E=C?YT:GT;return{pages:E(x.pages,j,A),pageParams:E(x.pageParams,S,A)}};if(i&&s.length){const x=i==="backward",S=x?iE:Hv,C={pages:s,pageParams:o},_=S(r,C);a=await v(C,_,x)}else{const x=e??s.length;do{const S=l===0?o[0]??r.initialPageParam:Hv(r,a);if(l>0&&S==null)break;a=await v(a,S),l++}while(l<x)}return a};t.options.persister?t.fetchFn=()=>{var w,b;return(b=(w=t.options).persister)==null?void 0:b.call(w,c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function Hv(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 iE(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 Xe,qr,Gr,no,ro,Yr,io,so,Kx,sE=(Kx=class{constructor(e={}){fe(this,Xe);fe(this,qr);fe(this,Gr);fe(this,no);fe(this,ro);fe(this,Yr);fe(this,io);fe(this,so);le(this,Xe,e.queryCache||new tE),le(this,qr,e.mutationCache||new rE),le(this,Gr,e.defaultOptions||{}),le(this,no,new Map),le(this,ro,new Map),le(this,Yr,0)}mount(){yl(this,Yr)._++,T(this,Yr)===1&&(le(this,io,fm.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Xe).onFocus())})),le(this,so,Uc.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Xe).onOnline())})))}unmount(){var e,t;yl(this,Yr)._--,T(this,Yr)===0&&((e=T(this,io))==null||e.call(this),le(this,io,void 0),(t=T(this,so))==null||t.call(this),le(this,so,void 0))}isFetching(e){return T(this,Xe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return T(this,qr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,Xe).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=T(this,Xe).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Ys(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return T(this,Xe).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=T(this,Xe).get(r.queryHash),s=i==null?void 0:i.state.data,o=WT(t,s);if(o!==void 0)return T(this,Xe).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return ct.batch(()=>T(this,Xe).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,Xe).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=T(this,Xe);ct.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=T(this,Xe),r={type:"active",...e};return ct.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ct.batch(()=>T(this,Xe).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(yn).catch(yn)}invalidateQueries(e,t={}){return ct.batch(()=>{if(T(this,Xe).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=ct.batch(()=>T(this,Xe).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(yn)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(yn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=T(this,Xe).build(this,t);return n.isStaleByTime(Ys(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(yn).catch(yn)}fetchInfiniteQuery(e){return e.behavior=Uv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(yn).catch(yn)}ensureInfiniteQueryData(e){return e.behavior=Uv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Uc.isOnline()?T(this,qr).resumePausedMutations():Promise.resolve()}getQueryCache(){return T(this,Xe)}getMutationCache(){return T(this,qr)}getDefaultOptions(){return T(this,Gr)}setDefaultOptions(e){le(this,Gr,e)}setQueryDefaults(e,t){T(this,no).set(is(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...T(this,no).values()],n={};return t.forEach(r=>{Fa(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){T(this,ro).set(is(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...T(this,ro).values()];let n={};return t.forEach(r=>{Fa(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...T(this,Gr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=um(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===dm&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...T(this,Gr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){T(this,Xe).clear(),T(this,qr).clear()}},Xe=new WeakMap,qr=new WeakMap,Gr=new WeakMap,no=new WeakMap,ro=new WeakMap,Yr=new WeakMap,io=new WeakMap,so=new WeakMap,Kx),zt,_e,tl,Nt,zi,oo,Qr,Jn,nl,ao,lo,Vi,Ui,Kr,co,je,Jo,cp,up,dp,fp,pp,hp,mp,Cb,Xx,oE=(Xx=class extends jo{constructor(t,n){super();fe(this,je);fe(this,zt);fe(this,_e);fe(this,tl);fe(this,Nt);fe(this,zi);fe(this,oo);fe(this,Qr);fe(this,Jn);fe(this,nl);fe(this,ao);fe(this,lo);fe(this,Vi);fe(this,Ui);fe(this,Kr);fe(this,co,new Set);this.options=n,le(this,zt,t),le(this,Jn,null),le(this,Qr,lp()),this.options.experimental_prefetchInRender||T(this,Qr).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(T(this,_e).addObserver(this),Wv(T(this,_e),this.options)?we(this,je,Jo).call(this):this.updateResult(),we(this,je,fp).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return gp(T(this,_e),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return gp(T(this,_e),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,we(this,je,pp).call(this),we(this,je,hp).call(this),T(this,_e).removeObserver(this)}setOptions(t,n){const r=this.options,i=T(this,_e);if(this.options=T(this,zt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ln(this.options.enabled,T(this,_e))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");we(this,je,mp).call(this),T(this,_e).setOptions(this.options),r._defaulted&&!Vc(this.options,r)&&T(this,zt).getQueryCache().notify({type:"observerOptionsUpdated",query:T(this,_e),observer:this});const s=this.hasListeners();s&&qv(T(this,_e),i,this.options,r)&&we(this,je,Jo).call(this),this.updateResult(n),s&&(T(this,_e)!==i||Ln(this.options.enabled,T(this,_e))!==Ln(r.enabled,T(this,_e))||Ys(this.options.staleTime,T(this,_e))!==Ys(r.staleTime,T(this,_e)))&&we(this,je,cp).call(this);const o=we(this,je,up).call(this);s&&(T(this,_e)!==i||Ln(this.options.enabled,T(this,_e))!==Ln(r.enabled,T(this,_e))||o!==T(this,Kr))&&we(this,je,dp).call(this,o)}getOptimisticResult(t){const n=T(this,zt).getQueryCache().build(T(this,zt),t),r=this.createResult(n,t);return lE(this,r)&&(le(this,Nt,r),le(this,oo,this.options),le(this,zi,T(this,_e).state)),r}getCurrentResult(){return T(this,Nt)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){T(this,co).add(t)}getCurrentQuery(){return T(this,_e)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=T(this,zt).defaultQueryOptions(t),r=T(this,zt).getQueryCache().build(T(this,zt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return we(this,je,Jo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),T(this,Nt)))}createResult(t,n){var A;const r=T(this,_e),i=this.options,s=T(this,Nt),o=T(this,zi),a=T(this,oo),c=t!==r?t.state:T(this,tl),{state:d}=t;let u={...d},p=!1,h;if(n._optimisticResults){const E=this.hasListeners(),D=!E&&Wv(t,n),L=E&&qv(t,r,n,i);(D||L)&&(u={...u,...kb(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:y,errorUpdatedAt:w,status:b}=u;if(n.select&&u.data!==void 0)if(s&&u.data===(o==null?void 0:o.data)&&n.select===T(this,nl))h=T(this,ao);else try{le(this,nl,n.select),h=n.select(u.data),h=ap(s==null?void 0:s.data,h,n),le(this,ao,h),le(this,Jn,null)}catch(E){le(this,Jn,E)}else h=u.data;if(n.placeholderData!==void 0&&h===void 0&&b==="pending"){let E;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))E=s.data;else if(E=typeof n.placeholderData=="function"?n.placeholderData((A=T(this,lo))==null?void 0:A.state.data,T(this,lo)):n.placeholderData,n.select&&E!==void 0)try{E=n.select(E),le(this,Jn,null)}catch(D){le(this,Jn,D)}E!==void 0&&(b="success",h=ap(s==null?void 0:s.data,E,n),p=!0)}T(this,Jn)&&(y=T(this,Jn),h=T(this,ao),w=Date.now(),b="error");const m=u.fetchStatus==="fetching",v=b==="pending",x=b==="error",S=v&&m,C=h!==void 0,j={status:b,fetchStatus:u.fetchStatus,isPending:v,isSuccess:b==="success",isError:x,isInitialLoading:S,isLoading:S,data:h,dataUpdatedAt:u.dataUpdatedAt,error:y,errorUpdatedAt:w,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:m,isRefetching:m&&!v,isLoadingError:x&&!C,isPaused:u.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:x&&C,isStale:pm(t,n),refetch:this.refetch,promise:T(this,Qr)};if(this.options.experimental_prefetchInRender){const E=O=>{j.status==="error"?O.reject(j.error):j.data!==void 0&&O.resolve(j.data)},D=()=>{const O=le(this,Qr,j.promise=lp());E(O)},L=T(this,Qr);switch(L.status){case"pending":t.queryHash===r.queryHash&&E(L);break;case"fulfilled":(j.status==="error"||j.data!==L.value)&&D();break;case"rejected":(j.status!=="error"||j.error!==L.reason)&&D();break}}return j}updateResult(t){const n=T(this,Nt),r=this.createResult(T(this,_e),this.options);if(le(this,zi,T(this,_e).state),le(this,oo,this.options),T(this,zi).data!==void 0&&le(this,lo,T(this,_e)),Vc(r,n))return;le(this,Nt,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!T(this,co).size)return!0;const l=new Set(a??T(this,co));return this.options.throwOnError&&l.add("error"),Object.keys(T(this,Nt)).some(c=>{const d=c;return T(this,Nt)[d]!==n[d]&&l.has(d)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),we(this,je,Cb).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&we(this,je,fp).call(this)}},zt=new WeakMap,_e=new WeakMap,tl=new WeakMap,Nt=new WeakMap,zi=new WeakMap,oo=new WeakMap,Qr=new WeakMap,Jn=new WeakMap,nl=new WeakMap,ao=new WeakMap,lo=new WeakMap,Vi=new WeakMap,Ui=new WeakMap,Kr=new WeakMap,co=new WeakMap,je=new WeakSet,Jo=function(t){we(this,je,mp).call(this);let n=T(this,_e).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(yn)),n},cp=function(){we(this,je,pp).call(this);const t=Ys(this.options.staleTime,T(this,_e));if(rs||T(this,Nt).isStale||!sp(t))return;const r=mb(T(this,Nt).dataUpdatedAt,t)+1;le(this,Vi,setTimeout(()=>{T(this,Nt).isStale||this.updateResult()},r))},up=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(T(this,_e)):this.options.refetchInterval)??!1},dp=function(t){we(this,je,hp).call(this),le(this,Kr,t),!(rs||Ln(this.options.enabled,T(this,_e))===!1||!sp(T(this,Kr))||T(this,Kr)===0)&&le(this,Ui,setInterval(()=>{(this.options.refetchIntervalInBackground||fm.isFocused())&&we(this,je,Jo).call(this)},T(this,Kr)))},fp=function(){we(this,je,cp).call(this),we(this,je,dp).call(this,we(this,je,up).call(this))},pp=function(){T(this,Vi)&&(clearTimeout(T(this,Vi)),le(this,Vi,void 0))},hp=function(){T(this,Ui)&&(clearInterval(T(this,Ui)),le(this,Ui,void 0))},mp=function(){const t=T(this,zt).getQueryCache().build(T(this,zt),this.options);if(t===T(this,_e))return;const n=T(this,_e);le(this,_e,t),le(this,tl,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Cb=function(t){ct.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(T(this,Nt))}),T(this,zt).getQueryCache().notify({query:T(this,_e),type:"observerResultsUpdated"})})},Xx);function aE(e,t){return Ln(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Wv(e,t){return aE(e,t)||e.state.data!==void 0&&gp(e,t,t.refetchOnMount)}function gp(e,t,n){if(Ln(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&pm(e,t)}return!1}function qv(e,t,n,r){return(e!==t||Ln(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&pm(e,n)}function pm(e,t){return Ln(t.enabled,e)!==!1&&e.isStaleByTime(Ys(t.staleTime,e))}function lE(e,t){return!Vc(e.getCurrentResult(),t)}var Xr,Zr,Vt,xr,Sr,ac,vp,Zx,cE=(Zx=class extends jo{constructor(t,n){super();fe(this,Sr);fe(this,Xr);fe(this,Zr);fe(this,Vt);fe(this,xr);le(this,Xr,t),this.setOptions(n),this.bindMethods(),we(this,Sr,ac).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const n=this.options;this.options=T(this,Xr).defaultMutationOptions(t),Vc(this.options,n)||T(this,Xr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:T(this,Vt),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&is(n.mutationKey)!==is(this.options.mutationKey)?this.reset():((r=T(this,Vt))==null?void 0:r.state.status)==="pending"&&T(this,Vt).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=T(this,Vt))==null||t.removeObserver(this)}onMutationUpdate(t){we(this,Sr,ac).call(this),we(this,Sr,vp).call(this,t)}getCurrentResult(){return T(this,Zr)}reset(){var t;(t=T(this,Vt))==null||t.removeObserver(this),le(this,Vt,void 0),we(this,Sr,ac).call(this),we(this,Sr,vp).call(this)}mutate(t,n){var r;return le(this,xr,n),(r=T(this,Vt))==null||r.removeObserver(this),le(this,Vt,T(this,Xr).getMutationCache().build(T(this,Xr),this.options)),T(this,Vt).addObserver(this),T(this,Vt).execute(t)}},Xr=new WeakMap,Zr=new WeakMap,Vt=new WeakMap,xr=new WeakMap,Sr=new WeakSet,ac=function(){var n;const t=((n=T(this,Vt))==null?void 0:n.state)??Sb();le(this,Zr,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},vp=function(t){ct.batch(()=>{var n,r,i,s,o,a,l,c;if(T(this,xr)&&this.hasListeners()){const d=T(this,Zr).variables,u=T(this,Zr).context;(t==null?void 0:t.type)==="success"?((r=(n=T(this,xr)).onSuccess)==null||r.call(n,t.data,d,u),(s=(i=T(this,xr)).onSettled)==null||s.call(i,t.data,null,d,u)):(t==null?void 0:t.type)==="error"&&((a=(o=T(this,xr)).onError)==null||a.call(o,t.error,d,u),(c=(l=T(this,xr)).onSettled)==null||c.call(l,void 0,t.error,d,u))}this.listeners.forEach(d=>{d(T(this,Zr))})})},Zx),_b=g.createContext(void 0),Tb=e=>{const t=g.useContext(_b);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},uE=({client:e,children:t})=>(g.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(_b.Provider,{value:e,children:t})),Eb=g.createContext(!1),dE=()=>g.useContext(Eb);Eb.Provider;function fE(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var pE=g.createContext(fE()),hE=()=>g.useContext(pE);function Ab(e,t){return typeof e=="function"?e(...t):!!e}function yp(){}var mE=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},gE=e=>{g.useEffect(()=>{e.clearReset()},[e])},vE=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&Ab(n,[e.error,r]),yE=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},xE=(e,t)=>e.isLoading&&e.isFetching&&!t,wE=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Gv=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function bE(e,t,n){var d,u,p,h,y;const r=Tb(),i=dE(),s=hE(),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",yE(o),mE(o,s),gE(s);const a=!r.getQueryCache().get(o.queryHash),[l]=g.useState(()=>new t(r,o)),c=l.getOptimisticResult(o);if(g.useSyncExternalStore(g.useCallback(w=>{const b=i?yp:l.subscribe(ct.batchCalls(w));return l.updateResult(),b},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),g.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),wE(o,c))throw Gv(o,l,s);if(vE({result:c,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw c.error;if((h=(p=r.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||h.call(p,o,c),o.experimental_prefetchInRender&&!rs&&xE(c,i)){const w=a?Gv(o,l,s):(y=r.getQueryCache().get(o.queryHash))==null?void 0:y.promise;w==null||w.catch(yp).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function jb(e,t){return bE(e,oE)}function hm(e,t){const n=Tb(),[r]=g.useState(()=>new cE(n,e));g.useEffect(()=>{r.setOptions(e)},[r,e]);const i=g.useSyncExternalStore(g.useCallback(o=>r.subscribe(ct.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=g.useCallback((o,a)=>{r.mutate(o,a).catch(yp)},[r]);if(i.error&&Ab(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const kE=(e,t)=>jb({queryKey:["widgets",e,t],queryFn:()=>SE(e,t),retry:!1,throwOnError:!1}),SE=async(e,t)=>{const n=`widgets/with-link/${e}${t?`?device_id=${t}`:""}`,[r,i]=await Nr(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.MessageAgentBackground="widget_message_agent_background",e.MessageAgentText="widget_message_agent_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||{}),ie=(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.NotificationSoundOn="notification_sound_on",e.NotificationSoundOff="notification_sound_off",e))(ie||{}),Le=(e=>(e.Light="light",e.Dark="dark",e.System="system",e))(Le||{});function CE(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 $c(){return $c=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},$c.apply(this,arguments)}var ei;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ei||(ei={}));function hE(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((h,y)=>d(h,typeof h=="string"?null:h.state,y===0?"default":void 0));let s=l(n??i.length-1),o=ei.Pop,a=null;function l(h){return Math.min(Math.max(h,0),i.length-1)}function c(){return i[s]}function d(h,y,x){y===void 0&&(y=null);let w=gE(i?c().pathname:"/",h,y,x);return cm(w.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(h)),w}function u(h){return typeof h=="string"?h:vE(h)}return{get index(){return s},get action(){return o},get location(){return c()},createHref:u,createURL(h){return new URL(u(h),"http://localhost")},encodeLocation(h){let y=typeof h=="string"?as(h):h;return{pathname:y.pathname||"",search:y.search||"",hash:y.hash||""}},push(h,y){o=ei.Push;let x=d(h,y);s+=1,i.splice(s,i.length,x),r&&a&&a({action:o,location:x,delta:1})},replace(h,y){o=ei.Replace;let x=d(h,y);i[s]=x,r&&a&&a({action:o,location:x,delta:0})},go(h){o=ei.Pop;let y=l(s+h),x=i[y];s=y,a&&a({action:o,location:x,delta:h})},listen(h){return a=h,()=>{a=null}}}}function gt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function cm(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function mE(){return Math.random().toString(36).substr(2,8)}function gE(e,t,n,r){return n===void 0&&(n=null),$c({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?as(t):t,{state:n,key:t&&t.key||r||mE()})}function vE(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 as(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 zv;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(zv||(zv={}));function yE(e,t,n){return n===void 0&&(n="/"),xE(e,t,n,!1)}function xE(e,t,n,r){let i=typeof t=="string"?as(t):t,s=bb(i.pathname||"/",n);if(s==null)return null;let o=xb(e);wE(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=PE(s);a=jE(o[l],c,r)}return a}function xb(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("/")&&(gt(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=qi([r,l.relativePath]),d=n.concat(l);s.children&&s.children.length>0&&(gt(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),xb(s.children,t,d,c)),!(s.path==null&&!s.index)&&t.push({path:c,score:EE(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 wb(s.path))i(s,o,l)}),t}function wb(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=wb(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 wE(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:AE(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const bE=/^:[\w-]+$/,kE=3,SE=2,CE=1,_E=10,TE=-2,Vv=e=>e==="*";function EE(e,t){let n=e.split("/"),r=n.length;return n.some(Vv)&&(r+=TE),t&&(r+=SE),n.filter(i=>!Vv(i)).reduce((i,s)=>i+(bE.test(s)?kE:s===""?CE:_E),r)}function AE(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 jE(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=Uv({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d),p=l.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=Uv({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:qi([s,u.pathname]),pathnameBase:LE(qi([s,u.pathnameBase])),route:p}),u.pathnameBase!=="/"&&(s=qi([s,u.pathnameBase]))}return o}function Uv(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=RE(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:p,isOptional:h}=d;if(p==="*"){let x=a[u]||"";o=s.slice(0,s.length-x.length).replace(/(.)\/+$/,"$1")}const y=a[u];return h&&!y?c[p]=void 0:c[p]=(y||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:o,pattern:e}}function RE(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),cm(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 PE(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return cm(!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 bb(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 ME(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?as(e):e;return{pathname:n?n.startsWith("/")?n:OE(n,t):t,search:FE(r),hash:BE(i)}}function OE(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 Ed(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 NE(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function DE(e,t){let n=NE(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function IE(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=as(e):(i=$c({},e),gt(!i.pathname||!i.pathname.includes("?"),Ed("?","pathname","search",i)),gt(!i.pathname||!i.pathname.includes("#"),Ed("#","pathname","hash",i)),gt(!i.search||!i.search.includes("#"),Ed("#","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 p=o.split("/");for(;p[0]==="..";)p.shift(),u-=1;i.pathname=p.join("/")}a=u>=0?t[u]:"/"}let l=ME(i,a),c=o&&o!=="/"&&o.endsWith("/"),d=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const qi=e=>e.join("/").replace(/\/\/+/g,"/"),LE=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),FE=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,BE=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function $E(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const kb=["post","put","patch","delete"];new Set(kb);const zE=["get",...kb];new Set(zE);/**
49
+ */function Hc(){return Hc=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},Hc.apply(this,arguments)}var ti;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ti||(ti={}));function _E(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((h,y)=>d(h,typeof h=="string"?null:h.state,y===0?"default":void 0));let s=l(n??i.length-1),o=ti.Pop,a=null;function l(h){return Math.min(Math.max(h,0),i.length-1)}function c(){return i[s]}function d(h,y,w){y===void 0&&(y=null);let b=EE(i?c().pathname:"/",h,y,w);return mm(b.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(h)),b}function u(h){return typeof h=="string"?h:AE(h)}return{get index(){return s},get action(){return o},get location(){return c()},createHref:u,createURL(h){return new URL(u(h),"http://localhost")},encodeLocation(h){let y=typeof h=="string"?ls(h):h;return{pathname:y.pathname||"",search:y.search||"",hash:y.hash||""}},push(h,y){o=ti.Push;let w=d(h,y);s+=1,i.splice(s,i.length,w),r&&a&&a({action:o,location:w,delta:1})},replace(h,y){o=ti.Replace;let w=d(h,y);i[s]=w,r&&a&&a({action:o,location:w,delta:0})},go(h){o=ti.Pop;let y=l(s+h),w=i[y];s=y,a&&a({action:o,location:w,delta:h})},listen(h){return a=h,()=>{a=null}}}}function mt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function mm(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function TE(){return Math.random().toString(36).substr(2,8)}function EE(e,t,n,r){return n===void 0&&(n=null),Hc({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ls(t):t,{state:n,key:t&&t.key||r||TE()})}function AE(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 ls(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 Yv;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Yv||(Yv={}));function jE(e,t,n){return n===void 0&&(n="/"),RE(e,t,n,!1)}function RE(e,t,n,r){let i=typeof t=="string"?ls(t):t,s=Mb(i.pathname||"/",n);if(s==null)return null;let o=Rb(e);PE(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=VE(s);a=BE(o[l],c,r)}return a}function Rb(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("/")&&(mt(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=qi([r,l.relativePath]),d=n.concat(l);s.children&&s.children.length>0&&(mt(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Rb(s.children,t,d,c)),!(s.path==null&&!s.index)&&t.push({path:c,score:FE(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 Pb(s.path))i(s,o,l)}),t}function Pb(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=Pb(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 PE(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:$E(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const ME=/^:[\w-]+$/,NE=3,OE=2,DE=1,IE=10,LE=-2,Qv=e=>e==="*";function FE(e,t){let n=e.split("/"),r=n.length;return n.some(Qv)&&(r+=LE),t&&(r+=OE),n.filter(i=>!Qv(i)).reduce((i,s)=>i+(ME.test(s)?NE:s===""?DE:IE),r)}function $E(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function BE(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=Kv({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d),p=l.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=Kv({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:qi([s,u.pathname]),pathnameBase:YE(qi([s,u.pathnameBase])),route:p}),u.pathnameBase!=="/"&&(s=qi([s,u.pathnameBase]))}return o}function Kv(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=zE(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:p,isOptional:h}=d;if(p==="*"){let w=a[u]||"";o=s.slice(0,s.length-w.length).replace(/(.)\/+$/,"$1")}const y=a[u];return h&&!y?c[p]=void 0:c[p]=(y||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:o,pattern:e}}function zE(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),mm(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 VE(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return mm(!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 Mb(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 UE(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?ls(e):e;return{pathname:n?n.startsWith("/")?n:HE(n,t):t,search:QE(r),hash:KE(i)}}function HE(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 Pd(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 WE(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function qE(e,t){let n=WE(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function GE(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=ls(e):(i=Hc({},e),mt(!i.pathname||!i.pathname.includes("?"),Pd("?","pathname","search",i)),mt(!i.pathname||!i.pathname.includes("#"),Pd("#","pathname","hash",i)),mt(!i.search||!i.search.includes("#"),Pd("#","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 p=o.split("/");for(;p[0]==="..";)p.shift(),u-=1;i.pathname=p.join("/")}a=u>=0?t[u]:"/"}let l=UE(i,a),c=o&&o!=="/"&&o.endsWith("/"),d=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const qi=e=>e.join("/").replace(/\/\/+/g,"/"),YE=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),QE=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,KE=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function XE(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Nb=["post","put","patch","delete"];new Set(Nb);const ZE=["get",...Nb];new Set(ZE);/**
50
50
  * React Router v6.28.0
51
51
  *
52
52
  * Copyright (c) Remix Software Inc.
@@ -55,11 +55,11 @@ 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 Da(){return Da=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},Da.apply(this,arguments)}const um=v.createContext(null),VE=v.createContext(null),wu=v.createContext(null),bu=v.createContext(null),To=v.createContext({outlet:null,matches:[],isDataRoute:!1}),Sb=v.createContext(null);function ku(){return v.useContext(bu)!=null}function dm(){return ku()||gt(!1),v.useContext(bu).location}function Cb(e){v.useContext(wu).static||v.useLayoutEffect(e)}function UE(){let{isDataRoute:e}=v.useContext(To);return e?nA():HE()}function HE(){ku()||gt(!1);let e=v.useContext(um),{basename:t,future:n,navigator:r}=v.useContext(wu),{matches:i}=v.useContext(To),{pathname:s}=dm(),o=JSON.stringify(DE(i,n.v7_relativeSplatPath)),a=v.useRef(!1);return Cb(()=>{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=IE(c,JSON.parse(o),s,d.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:qi([t,u.pathname])),(d.replace?r.replace:r.push)(u,d.state,d)},[t,r,o,s,e])}function WE(e,t){return qE(e,t)}function qE(e,t,n,r){ku()||gt(!1);let{navigator:i}=v.useContext(wu),{matches:s}=v.useContext(To),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=dm(),d;if(t){var u;let w=typeof t=="string"?as(t):t;l==="/"||(u=w.pathname)!=null&&u.startsWith(l)||gt(!1),d=w}else d=c;let p=d.pathname||"/",h=p;if(l!=="/"){let w=l.replace(/^\//,"").split("/");h="/"+p.replace(/^\//,"").split("/").slice(w.length).join("/")}let y=yE(e,{pathname:h}),x=XE(y&&y.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:qi([l,i.encodeLocation?i.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:qi([l,i.encodeLocation?i.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),s,n,r);return t&&x?v.createElement(bu.Provider,{value:{location:Da({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:ei.Pop}},x):x}function GE(){let e=tA(),t=$E(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 YE=v.createElement(GE,null);class QE 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(To.Provider,{value:this.props.routeContext},v.createElement(Sb.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function KE(e){let{routeContext:t,match:n,children:r}=e,i=v.useContext(um);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(To.Provider,{value:t},r)}function XE(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||gt(!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:p,errors:h}=n,y=u.route.loader&&p[u.route.id]===void 0&&(!h||h[u.route.id]===void 0);if(u.route.lazy||y){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((d,u,p)=>{let h,y=!1,x=null,w=null;n&&(h=a&&u.route.id?a[u.route.id]:void 0,x=u.route.errorElement||YE,l&&(c<0&&p===0?(y=!0,w=null):c===p&&(y=!0,w=u.route.hydrateFallbackElement||null)));let m=t.concat(o.slice(0,p+1)),g=()=>{let b;return h?b=x:y?b=w:u.route.Component?b=v.createElement(u.route.Component,null):u.route.element?b=u.route.element:b=d,v.createElement(KE,{match:u,routeContext:{outlet:d,matches:m,isDataRoute:n!=null},children:b})};return n&&(u.route.ErrorBoundary||u.route.errorElement||p===0)?v.createElement(QE,{location:n.location,revalidation:n.revalidation,component:x,error:h,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):g()},null)}var _b=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(_b||{}),zc=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}(zc||{});function ZE(e){let t=v.useContext(um);return t||gt(!1),t}function JE(e){let t=v.useContext(VE);return t||gt(!1),t}function eA(e){let t=v.useContext(To);return t||gt(!1),t}function Tb(e){let t=eA(),n=t.matches[t.matches.length-1];return n.route.id||gt(!1),n.route.id}function tA(){var e;let t=v.useContext(Sb),n=JE(zc.UseRouteError),r=Tb(zc.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function nA(){let{router:e}=ZE(_b.UseNavigateStable),t=Tb(zc.UseNavigateStable),n=v.useRef(!1);return Cb(()=>{n.current=!0}),v.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Da({fromRouteId:t},s)))},[e,t])}const Hv={};function rA(e,t){Hv[t]||(Hv[t]=!0,console.warn(t))}const Wv=(e,t,n)=>rA(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function iA(e,t){e!=null&&e.v7_startTransition||Wv("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&&Wv("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}const sA="startTransition",qv=o2[sA];function oA(e){let{basename:t,children:n,initialEntries:r,initialIndex:i,future:s}=e,o=v.useRef();o.current==null&&(o.current=hE({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(p=>{d&&qv?qv(()=>c(p)):c(p)},[c,d]);return v.useLayoutEffect(()=>a.listen(u),[a,u]),v.useEffect(()=>iA(s),[s]),v.createElement(aA,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:s})}function hp(e){gt(!1)}function aA(e){let{basename:t="/",children:n=null,location:r,navigationType:i=ei.Pop,navigator:s,static:o=!1,future:a}=e;ku()&&gt(!1);let l=t.replace(/^\/*/,"/"),c=v.useMemo(()=>({basename:l,navigator:s,static:o,future:Da({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r=="string"&&(r=as(r));let{pathname:d="/",search:u="",hash:p="",state:h=null,key:y="default"}=r,x=v.useMemo(()=>{let w=bb(d,l);return w==null?null:{location:{pathname:w,search:u,hash:p,state:h,key:y},navigationType:i}},[l,d,u,p,h,y,i]);return x==null?null:v.createElement(wu.Provider,{value:c},v.createElement(bu.Provider,{children:n,value:x}))}function lA(e){let{children:t,location:n}=e;return WE(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&&gt(!1),!r.props.index||!r.props.children||gt(!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}var Eb={exports:{}};/*!
58
+ */function $a(){return $a=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},$a.apply(this,arguments)}const gm=g.createContext(null),JE=g.createContext(null),Cu=g.createContext(null),_u=g.createContext(null),Ro=g.createContext({outlet:null,matches:[],isDataRoute:!1}),Ob=g.createContext(null);function Tu(){return g.useContext(_u)!=null}function vm(){return Tu()||mt(!1),g.useContext(_u).location}function Db(e){g.useContext(Cu).static||g.useLayoutEffect(e)}function eA(){let{isDataRoute:e}=g.useContext(Ro);return e?pA():tA()}function tA(){Tu()||mt(!1);let e=g.useContext(gm),{basename:t,future:n,navigator:r}=g.useContext(Cu),{matches:i}=g.useContext(Ro),{pathname:s}=vm(),o=JSON.stringify(qE(i,n.v7_relativeSplatPath)),a=g.useRef(!1);return Db(()=>{a.current=!0}),g.useCallback(function(c,d){if(d===void 0&&(d={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let u=GE(c,JSON.parse(o),s,d.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:qi([t,u.pathname])),(d.replace?r.replace:r.push)(u,d.state,d)},[t,r,o,s,e])}function nA(e,t){return rA(e,t)}function rA(e,t,n,r){Tu()||mt(!1);let{navigator:i}=g.useContext(Cu),{matches:s}=g.useContext(Ro),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=vm(),d;if(t){var u;let b=typeof t=="string"?ls(t):t;l==="/"||(u=b.pathname)!=null&&u.startsWith(l)||mt(!1),d=b}else d=c;let p=d.pathname||"/",h=p;if(l!=="/"){let b=l.replace(/^\//,"").split("/");h="/"+p.replace(/^\//,"").split("/").slice(b.length).join("/")}let y=jE(e,{pathname:h}),w=lA(y&&y.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:qi([l,i.encodeLocation?i.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:qi([l,i.encodeLocation?i.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,n,r);return t&&w?g.createElement(_u.Provider,{value:{location:$a({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:ti.Pop}},w):w}function iA(){let e=fA(),t=XE(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 g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),n?g.createElement("pre",{style:i},n):null,null)}const sA=g.createElement(iA,null);class oA extends g.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?g.createElement(Ro.Provider,{value:this.props.routeContext},g.createElement(Ob.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function aA(e){let{routeContext:t,match:n,children:r}=e,i=g.useContext(gm);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),g.createElement(Ro.Provider,{value:t},r)}function lA(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||mt(!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:p,errors:h}=n,y=u.route.loader&&p[u.route.id]===void 0&&(!h||h[u.route.id]===void 0);if(u.route.lazy||y){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((d,u,p)=>{let h,y=!1,w=null,b=null;n&&(h=a&&u.route.id?a[u.route.id]:void 0,w=u.route.errorElement||sA,l&&(c<0&&p===0?(y=!0,b=null):c===p&&(y=!0,b=u.route.hydrateFallbackElement||null)));let m=t.concat(o.slice(0,p+1)),v=()=>{let x;return h?x=w:y?x=b:u.route.Component?x=g.createElement(u.route.Component,null):u.route.element?x=u.route.element:x=d,g.createElement(aA,{match:u,routeContext:{outlet:d,matches:m,isDataRoute:n!=null},children:x})};return n&&(u.route.ErrorBoundary||u.route.errorElement||p===0)?g.createElement(oA,{location:n.location,revalidation:n.revalidation,component:w,error:h,children:v(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):v()},null)}var Ib=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Ib||{}),Wc=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}(Wc||{});function cA(e){let t=g.useContext(gm);return t||mt(!1),t}function uA(e){let t=g.useContext(JE);return t||mt(!1),t}function dA(e){let t=g.useContext(Ro);return t||mt(!1),t}function Lb(e){let t=dA(),n=t.matches[t.matches.length-1];return n.route.id||mt(!1),n.route.id}function fA(){var e;let t=g.useContext(Ob),n=uA(Wc.UseRouteError),r=Lb(Wc.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function pA(){let{router:e}=cA(Ib.UseNavigateStable),t=Lb(Wc.UseNavigateStable),n=g.useRef(!1);return Db(()=>{n.current=!0}),g.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,$a({fromRouteId:t},s)))},[e,t])}const Xv={};function hA(e,t){Xv[t]||(Xv[t]=!0,console.warn(t))}const Zv=(e,t,n)=>hA(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function mA(e,t){e!=null&&e.v7_startTransition||Zv("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&&Zv("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}const gA="startTransition",Jv=v2[gA];function vA(e){let{basename:t,children:n,initialEntries:r,initialIndex:i,future:s}=e,o=g.useRef();o.current==null&&(o.current=_E({initialEntries:r,initialIndex:i,v5Compat:!0}));let a=o.current,[l,c]=g.useState({action:a.action,location:a.location}),{v7_startTransition:d}=s||{},u=g.useCallback(p=>{d&&Jv?Jv(()=>c(p)):c(p)},[c,d]);return g.useLayoutEffect(()=>a.listen(u),[a,u]),g.useEffect(()=>mA(s),[s]),g.createElement(yA,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:s})}function xp(e){mt(!1)}function yA(e){let{basename:t="/",children:n=null,location:r,navigationType:i=ti.Pop,navigator:s,static:o=!1,future:a}=e;Tu()&&mt(!1);let l=t.replace(/^\/*/,"/"),c=g.useMemo(()=>({basename:l,navigator:s,static:o,future:$a({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r=="string"&&(r=ls(r));let{pathname:d="/",search:u="",hash:p="",state:h=null,key:y="default"}=r,w=g.useMemo(()=>{let b=Mb(d,l);return b==null?null:{location:{pathname:b,search:u,hash:p,state:h,key:y},navigationType:i}},[l,d,u,p,h,y,i]);return w==null?null:g.createElement(Cu.Provider,{value:c},g.createElement(_u.Provider,{children:n,value:w}))}function xA(e){let{children:t,location:n}=e;return nA(wp(t),n)}new Promise(()=>{});function wp(e,t){t===void 0&&(t=[]);let n=[];return g.Children.forEach(e,(r,i)=>{if(!g.isValidElement(r))return;let s=[...t,i];if(r.type===g.Fragment){n.push.apply(n,wp(r.props.children,s));return}r.type!==xp&&mt(!1),!r.props.index||!r.props.children||mt(!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=wp(r.props.children,s)),n.push(o)}),n}var Fb={exports:{}};/*!
59
59
  Copyright (c) 2018 Jed Watson.
60
60
  Licensed under the MIT License (MIT), see
61
61
  http://jedwatson.github.io/classnames
62
- */(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})()})(Eb);var cA=Eb.exports;const Ve=Rr(cA);function uA(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 dA=e=>{switch(e){case"success":return hA;case"info":return gA;case"warning":return mA;case"error":return vA;default:return null}},fA=Array(12).fill(0),pA=({visible:e,className:t})=>J.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},J.createElement("div",{className:"sonner-spinner"},fA.map((n,r)=>J.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),hA=J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},J.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"})),mA=J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},J.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"})),gA=J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},J.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"})),vA=J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},J.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"})),yA=J.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"},J.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),J.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),xA=()=>{const[e,t]=J.useState(document.hidden);return J.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let gp=1;class wA{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:gp++,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],J.isValidElement(c))s=!1,this.create({id:r,type:"default",message:c});else if(kA(c)&&!c.ok){s=!1;const u=typeof n.error=="function"?await n.error(`HTTP error! status: ${c.status}`):n.error,p=typeof n.description=="function"?await n.description(`HTTP error! status: ${c.status}`):n.description,h=typeof u=="object"?u:{message:u};this.create({id:r,type:"error",description:p,...h})}else if(c instanceof Error){s=!1;const u=typeof n.error=="function"?await n.error(c):n.error,p=typeof n.description=="function"?await n.description(c):n.description,h=typeof u=="object"?u:{message:u};this.create({id:r,type:"error",description:p,...h})}else if(n.success!==void 0){s=!1;const u=typeof n.success=="function"?await n.success(c):n.success,p=typeof n.description=="function"?await n.description(c):n.description,h=typeof u=="object"?u:{message:u};this.create({id:r,type:"success",description:p,...h})}}).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,p=typeof d=="object"?d:{message:d};this.create({id:r,type:"error",description:u,...p})}}).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)||gp++;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 Ut=new wA,bA=(e,t)=>{const n=(t==null?void 0:t.id)||gp++;return Ut.addToast({title:e,...t,id:n}),n},kA=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",SA=bA,CA=()=>Ut.toasts,_A=()=>Ut.getActiveToasts(),Ab=Object.assign(SA,{success:Ut.success,info:Ut.info,warning:Ut.warning,error:Ut.error,custom:Ut.custom,message:Ut.message,promise:Ut.promise,dismiss:Ut.dismiss,loading:Ut.loading},{getHistory:CA,getToasts:_A});uA("[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 Ol(e){return e.label!==void 0}const TA=3,EA="24px",AA="16px",Gv=4e3,jA=356,RA=14,PA=45,MA=200;function qn(...e){return e.filter(Boolean).join(" ")}function OA(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const NA=e=>{var t,n,r,i,s,o,a,l,c;const{invert:d,toast:u,unstyled:p,interacting:h,setHeights:y,visibleToasts:x,heights:w,index:m,toasts:g,expanded:b,removeToast:C,defaultRichColors:S,closeButton:_,style:j,cancelButtonStyle:A,actionButtonStyle:E,className:L="",descriptionClassName:F="",duration:D,position:G,gap:z,expandByDefault:$,classNames:N,icons:M,closeButtonAriaLabel:P="Close toast"}=e,[B,U]=J.useState(null),[W,q]=J.useState(null),[se,ie]=J.useState(!1),[pe,ce]=J.useState(!1),[_e,Re]=J.useState(!1),[Y,V]=J.useState(!1),[Z,ue]=J.useState(!1),[O,ae]=J.useState(0),[ee,ke]=J.useState(0),he=J.useRef(u.duration||D||Gv),Ze=J.useRef(null),qe=J.useRef(null),Bt=m===0,fe=m+1<=x,R=u.type,K=u.dismissible!==!1,I=u.className||"",H=u.descriptionClassName||"",te=J.useMemo(()=>w.findIndex(we=>we.toastId===u.id)||0,[w,u.id]),de=J.useMemo(()=>{var we;return(we=u.closeButton)!=null?we:_},[u.closeButton,_]),xe=J.useMemo(()=>u.duration||D||Gv,[u.duration,D]),Ue=J.useRef(0),lt=J.useRef(0),Un=J.useRef(0),dn=J.useRef(null),[ys,fr]=G.split("-"),Nr=J.useMemo(()=>w.reduce((we,ft,St)=>St>=te?we:we+ft.height,0),[w,te]),xs=xA(),Mo=u.invert||d,ki=R==="loading";lt.current=J.useMemo(()=>te*z+Nr,[te,Nr]),J.useEffect(()=>{he.current=xe},[xe]),J.useEffect(()=>{ie(!0)},[]),J.useEffect(()=>{const we=qe.current;if(we){const ft=we.getBoundingClientRect().height;return ke(ft),y(St=>[{toastId:u.id,height:ft,position:u.position},...St]),()=>y(St=>St.filter(Kt=>Kt.toastId!==u.id))}},[y,u.id]),J.useLayoutEffect(()=>{if(!se)return;const we=qe.current,ft=we.style.height;we.style.height="auto";const St=we.getBoundingClientRect().height;we.style.height=ft,ke(St),y(Kt=>Kt.find(yt=>yt.toastId===u.id)?Kt.map(yt=>yt.toastId===u.id?{...yt,height:St}:yt):[{toastId:u.id,height:St,position:u.position},...Kt])},[se,u.title,u.description,y,u.id]);const Hn=J.useCallback(()=>{ce(!0),ae(lt.current),y(we=>we.filter(ft=>ft.toastId!==u.id)),setTimeout(()=>{C(u)},MA)},[u,C,y,lt]);J.useEffect(()=>{if(u.promise&&R==="loading"||u.duration===1/0||u.type==="loading")return;let we;return b||h||xs?(()=>{if(Un.current<Ue.current){const Kt=new Date().getTime()-Ue.current;he.current=he.current-Kt}Un.current=new Date().getTime()})():(()=>{he.current!==1/0&&(Ue.current=new Date().getTime(),we=setTimeout(()=>{u.onAutoClose==null||u.onAutoClose.call(u,u),Hn()},he.current))})(),()=>clearTimeout(we)},[b,h,u,R,xs,Hn]),J.useEffect(()=>{u.delete&&Hn()},[Hn,u.delete]);function VC(){var we;if(M!=null&&M.loading){var ft;return J.createElement("div",{className:qn(N==null?void 0:N.loader,u==null||(ft=u.classNames)==null?void 0:ft.loader,"sonner-loader"),"data-visible":R==="loading"},M.loading)}return J.createElement(pA,{className:qn(N==null?void 0:N.loader,u==null||(we=u.classNames)==null?void 0:we.loader),visible:R==="loading"})}var xg,wg;return J.createElement("li",{tabIndex:0,ref:qe,className:qn(L,I,N==null?void 0:N.toast,u==null||(t=u.classNames)==null?void 0:t.toast,N==null?void 0:N.default,N==null?void 0:N[R],u==null||(n=u.classNames)==null?void 0:n[R]),"data-sonner-toast":"","data-rich-colors":(xg=u.richColors)!=null?xg:S,"data-styled":!(u.jsx||u.unstyled||p),"data-mounted":se,"data-promise":!!u.promise,"data-swiped":Z,"data-removed":pe,"data-visible":fe,"data-y-position":ys,"data-x-position":fr,"data-index":m,"data-front":Bt,"data-swiping":_e,"data-dismissible":K,"data-type":R,"data-invert":Mo,"data-swipe-out":Y,"data-swipe-direction":W,"data-expanded":!!(b||$&&se),style:{"--index":m,"--toasts-before":m,"--z-index":g.length-m,"--offset":`${pe?O:lt.current}px`,"--initial-height":$?"auto":`${ee}px`,...j,...u.style},onDragEnd:()=>{Re(!1),U(null),dn.current=null},onPointerDown:we=>{ki||!K||(Ze.current=new Date,ae(lt.current),we.target.setPointerCapture(we.pointerId),we.target.tagName!=="BUTTON"&&(Re(!0),dn.current={x:we.clientX,y:we.clientY}))},onPointerUp:()=>{var we,ft,St;if(Y||!K)return;dn.current=null;const Kt=Number(((we=qe.current)==null?void 0:we.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),fl=Number(((ft=qe.current)==null?void 0:ft.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),yt=new Date().getTime()-((St=Ze.current)==null?void 0:St.getTime()),fn=B==="x"?Kt:fl,pl=Math.abs(fn)/yt;if(Math.abs(fn)>=PA||pl>.11){ae(lt.current),u.onDismiss==null||u.onDismiss.call(u,u),q(B==="x"?Kt>0?"right":"left":fl>0?"down":"up"),Hn(),V(!0);return}else{var En,An;(En=qe.current)==null||En.style.setProperty("--swipe-amount-x","0px"),(An=qe.current)==null||An.style.setProperty("--swipe-amount-y","0px")}ue(!1),Re(!1),U(null)},onPointerMove:we=>{var ft,St,Kt;if(!dn.current||!K||((ft=window.getSelection())==null?void 0:ft.toString().length)>0)return;const yt=we.clientY-dn.current.y,fn=we.clientX-dn.current.x;var pl;const En=(pl=e.swipeDirections)!=null?pl:OA(G);!B&&(Math.abs(fn)>1||Math.abs(yt)>1)&&U(Math.abs(fn)>Math.abs(yt)?"x":"y");let An={x:0,y:0};const bg=Si=>1/(1.5+Math.abs(Si)/20);if(B==="y"){if(En.includes("top")||En.includes("bottom"))if(En.includes("top")&&yt<0||En.includes("bottom")&&yt>0)An.y=yt;else{const Si=yt*bg(yt);An.y=Math.abs(Si)<Math.abs(yt)?Si:yt}}else if(B==="x"&&(En.includes("left")||En.includes("right")))if(En.includes("left")&&fn<0||En.includes("right")&&fn>0)An.x=fn;else{const Si=fn*bg(fn);An.x=Math.abs(Si)<Math.abs(fn)?Si:fn}(Math.abs(An.x)>0||Math.abs(An.y)>0)&&ue(!0),(St=qe.current)==null||St.style.setProperty("--swipe-amount-x",`${An.x}px`),(Kt=qe.current)==null||Kt.style.setProperty("--swipe-amount-y",`${An.y}px`)}},de&&!u.jsx&&R!=="loading"?J.createElement("button",{"aria-label":P,"data-disabled":ki,"data-close-button":!0,onClick:ki||!K?()=>{}:()=>{Hn(),u.onDismiss==null||u.onDismiss.call(u,u)},className:qn(N==null?void 0:N.closeButton,u==null||(r=u.classNames)==null?void 0:r.closeButton)},(wg=M==null?void 0:M.close)!=null?wg:yA):null,R||u.icon||u.promise?J.createElement("div",{"data-icon":"",className:qn(N==null?void 0:N.icon,u==null||(i=u.classNames)==null?void 0:i.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||VC():null,u.type!=="loading"?u.icon||(M==null?void 0:M[R])||dA(R):null):null,J.createElement("div",{"data-content":"",className:qn(N==null?void 0:N.content,u==null||(s=u.classNames)==null?void 0:s.content)},J.createElement("div",{"data-title":"",className:qn(N==null?void 0:N.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?J.createElement("div",{"data-description":"",className:qn(F,H,N==null?void 0:N.description,u==null||(a=u.classNames)==null?void 0:a.description)},typeof u.description=="function"?u.description():u.description):null),J.isValidElement(u.cancel)?u.cancel:u.cancel&&Ol(u.cancel)?J.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||A,onClick:we=>{Ol(u.cancel)&&K&&(u.cancel.onClick==null||u.cancel.onClick.call(u.cancel,we),Hn())},className:qn(N==null?void 0:N.cancelButton,u==null||(l=u.classNames)==null?void 0:l.cancelButton)},u.cancel.label):null,J.isValidElement(u.action)?u.action:u.action&&Ol(u.action)?J.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||E,onClick:we=>{Ol(u.action)&&(u.action.onClick==null||u.action.onClick.call(u.action,we),!we.defaultPrevented&&Hn())},className:qn(N==null?void 0:N.actionButton,u==null||(c=u.classNames)==null?void 0:c.actionButton)},u.action.label):null)};function Yv(){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 DA(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,o=s?"--mobile-offset":"--offset",a=s?AA:EA;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 IA=J.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:p,duration:h,style:y,visibleToasts:x=TA,toastOptions:w,dir:m=Yv(),gap:g=RA,icons:b,containerAriaLabel:C="Notifications"}=t,[S,_]=J.useState([]),j=J.useMemo(()=>Array.from(new Set([i].concat(S.filter(W=>W.position).map(W=>W.position)))),[S,i]),[A,E]=J.useState([]),[L,F]=J.useState(!1),[D,G]=J.useState(!1),[z,$]=J.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),N=J.useRef(null),M=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),P=J.useRef(null),B=J.useRef(!1),U=J.useCallback(W=>{_(q=>{var se;return(se=q.find(ie=>ie.id===W.id))!=null&&se.delete||Ut.dismiss(W.id),q.filter(({id:ie})=>ie!==W.id)})},[]);return J.useEffect(()=>Ut.subscribe(W=>{if(W.dismiss){const q=S.map(se=>se.id===W.id?{...se,delete:!0}:se);requestAnimationFrame(()=>{_(q)});return}setTimeout(()=>{vT.flushSync(()=>{_(q=>{const se=q.findIndex(ie=>ie.id===W.id);return se!==-1?[...q.slice(0,se),{...q[se],...W},...q.slice(se+1)]:[W,...q]})})})}),[S]),J.useEffect(()=>{if(u!=="system"){$(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?$("dark"):$("light")),typeof window>"u")return;const W=window.matchMedia("(prefers-color-scheme: dark)");try{W.addEventListener("change",({matches:q})=>{$(q?"dark":"light")})}catch{W.addListener(({matches:se})=>{try{$(se?"dark":"light")}catch(ie){console.error(ie)}})}},[u]),J.useEffect(()=>{S.length<=1&&F(!1)},[S]),J.useEffect(()=>{const W=q=>{var se;if(s.every(ce=>q[ce]||q.code===ce)){var pe;F(!0),(pe=N.current)==null||pe.focus()}q.code==="Escape"&&(document.activeElement===N.current||(se=N.current)!=null&&se.contains(document.activeElement))&&F(!1)};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[s]),J.useEffect(()=>{if(N.current)return()=>{P.current&&(P.current.focus({preventScroll:!0}),P.current=null,B.current=!1)}},[N.current]),J.createElement("section",{ref:n,"aria-label":`${C} ${M}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},j.map((W,q)=>{var se;const[ie,pe]=W.split("-");return S.length?J.createElement("ol",{key:W,dir:m==="auto"?Yv():m,tabIndex:-1,ref:N,className:l,"data-sonner-toaster":!0,"data-sonner-theme":z,"data-y-position":ie,"data-lifted":L&&S.length>1&&!o,"data-x-position":pe,style:{"--front-toast-height":`${((se=A[0])==null?void 0:se.height)||0}px`,"--width":`${jA}px`,"--gap":`${g}px`,...y,...DA(c,d)},onBlur:ce=>{B.current&&!ce.currentTarget.contains(ce.relatedTarget)&&(B.current=!1,P.current&&(P.current.focus({preventScroll:!0}),P.current=null))},onFocus:ce=>{ce.target instanceof HTMLElement&&ce.target.dataset.dismissible==="false"||B.current||(B.current=!0,P.current=ce.relatedTarget)},onMouseEnter:()=>F(!0),onMouseMove:()=>F(!0),onMouseLeave:()=>{D||F(!1)},onDragEnd:()=>F(!1),onPointerDown:ce=>{ce.target instanceof HTMLElement&&ce.target.dataset.dismissible==="false"||G(!0)},onPointerUp:()=>G(!1)},S.filter(ce=>!ce.position&&q===0||ce.position===W).map((ce,_e)=>{var Re,Y;return J.createElement(NA,{key:ce.id,icons:b,index:_e,toast:ce,defaultRichColors:p,duration:(Re=w==null?void 0:w.duration)!=null?Re:h,className:w==null?void 0:w.className,descriptionClassName:w==null?void 0:w.descriptionClassName,invert:r,visibleToasts:x,closeButton:(Y=w==null?void 0:w.closeButton)!=null?Y:a,interacting:D,position:W,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:U,toasts:S.filter(V=>V.position==ce.position),heights:A.filter(V=>V.position==ce.position),setHeights:E,expandByDefault:o,gap:g,expanded:L,swipeDirections:t.swipeDirections})})):null}))});function en(e){return Ab.custom(t=>f.jsx(LA,{id:t,title:e.title,description:e.description,variant:e.variant}))}const Ad={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 LA(e){const{title:t,description:n,button:r,id:i,variant:s}=e;return f.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",Ad[s||"info"].bg),children:[f.jsx("div",{className:"flex flex-1 items-center",children:f.jsxs("div",{className:"w-full",children:[t&&f.jsx("p",{className:Ve("text-sm font-medium",Ad[s||"info"].text),children:t}),f.jsx("p",{className:Ve("text-sm",Ad[s||"info"].text,{"mt-1":!!t}),children:n})]})}),r&&f.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:f.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(),Ab.dismiss(i)},children:r.label})})]})}function FA(e){return Array.isArray(e)&&e[0].field!==void 0}const ho=(e,t)=>{var n;if(FA(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||en({description:e.message,variant:"error"});return}if(e&&e.error){t!=null&&t.noToast||en({description:e.error,variant:"error"});return}},BA=[{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ı"}],$A=[{code:"FST_REQ_FILE_TOO_LARGE",text:"Yüklenen dosya boyutu izin verilen sınırı aştı"},{code:"AUTH_TOKEN_NOT_PRESENT",text:"Oturum bilgisi bulunamadı. Lütfen sohbeti yeniden başlatın"},{code:"AUTH_TOKEN_NOT_VALID",text:"Oturum süreniz dolmuş olabilir. Lütfen sohbeti yeniden başlatın"},{code:"AUTH_VERIFY_REQUIRED",text:"Hesap doğrulaması gerekiyor. Lütfen doğrulama adımını tamamlayın"},{code:"AUTH_INVALID_OWNER_TYPE",text:"Bu işlem için geçerli ziyaretçi oturumu bulunamadı"}],zo=(e,t)=>t?`${e} (Kod: ${t})`:e,zA=(e,t)=>{if(zn(t))return!1;if(e===null)return en({description:"Bir hata oluştu",variant:"error"}),!0;if(typeof e=="object"&&e){const r=e.code;if(r){const i=$A.find(s=>s.code===r);if(i)return en({description:zo(i.text,r),variant:"error"}),!0}if(t===401){if(e.tokenNotPresent)return en({description:zo("Oturum bilgisi bulunamadı. Lütfen sohbeti yeniden başlatın","AUTH_TOKEN_NOT_PRESENT"),variant:"error"}),!0;if(e.tokenNotValid)return en({description:zo("Oturum süreniz dolmuş olabilir. Lütfen sohbeti yeniden başlatın","AUTH_TOKEN_NOT_VALID"),variant:"error"}),!0;if(e.verifyRequired)return en({description:zo("Hesap doğrulaması gerekiyor. Lütfen doğrulama adımını tamamlayın","AUTH_VERIFY_REQUIRED"),variant:"error"}),!0}if(e.message)return en({description:zo(e.message,r),variant:"error"}),!0}const n=BA.find(r=>r.code===t);return en({description:n?n.text:"Bir hata oluştu",variant:"error"}),!0},VA={xs:{default:"!p-1",rounded:"!p-1"},sm:{default:"text-xs px-2 py-1.5",rounded:"p-1.5"},md:{default:"text-xs px-3 py-1.5",rounded:"p-2"},lg:{default:"text-sm px-4 py-2",rounded:"p-2.5"},xl:{default:"text-base px-5 py-3",rounded:"p-3"}},Qv={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"}},fm=v.createContext({});function Su(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}const pm=typeof window<"u",jb=pm?v.useLayoutEffect:v.useEffect,Cu=v.createContext(null),hm=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class UA 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 HA({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(hm);return v.useInsertionEffect(()=>{const{width:a,height:l,top:c,left:d,right:u}=s.current;if(t||!i.current||!a||!l)return;const p=n==="left"?`left: ${d}`:`right: ${u}`;i.current.dataset.motionPopId=r;const h=document.createElement("style");return o&&(h.nonce=o),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`
62
+ */(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})()})(Fb);var wA=Fb.exports;const Ie=Pr(wA);function bA(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 kA=e=>{switch(e){case"success":return _A;case"info":return EA;case"warning":return TA;case"error":return AA;default:return null}},SA=Array(12).fill(0),CA=({visible:e,className:t})=>ee.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ee.createElement("div",{className:"sonner-spinner"},SA.map((n,r)=>ee.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),_A=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.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"})),TA=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ee.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"})),EA=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.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"})),AA=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.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"})),jA=ee.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"},ee.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ee.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),RA=()=>{const[e,t]=ee.useState(document.hidden);return ee.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let bp=1;class PA{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:bp++,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],ee.isValidElement(c))s=!1,this.create({id:r,type:"default",message:c});else if(NA(c)&&!c.ok){s=!1;const u=typeof n.error=="function"?await n.error(`HTTP error! status: ${c.status}`):n.error,p=typeof n.description=="function"?await n.description(`HTTP error! status: ${c.status}`):n.description,h=typeof u=="object"?u:{message:u};this.create({id:r,type:"error",description:p,...h})}else if(c instanceof Error){s=!1;const u=typeof n.error=="function"?await n.error(c):n.error,p=typeof n.description=="function"?await n.description(c):n.description,h=typeof u=="object"?u:{message:u};this.create({id:r,type:"error",description:p,...h})}else if(n.success!==void 0){s=!1;const u=typeof n.success=="function"?await n.success(c):n.success,p=typeof n.description=="function"?await n.description(c):n.description,h=typeof u=="object"?u:{message:u};this.create({id:r,type:"success",description:p,...h})}}).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,p=typeof d=="object"?d:{message:d};this.create({id:r,type:"error",description:u,...p})}}).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)||bp++;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 Ut=new PA,MA=(e,t)=>{const n=(t==null?void 0:t.id)||bp++;return Ut.addToast({title:e,...t,id:n}),n},NA=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",OA=MA,DA=()=>Ut.toasts,IA=()=>Ut.getActiveToasts(),$b=Object.assign(OA,{success:Ut.success,info:Ut.info,warning:Ut.warning,error:Ut.error,custom:Ut.custom,message:Ut.message,promise:Ut.promise,dismiss:Ut.dismiss,loading:Ut.loading},{getHistory:DA,getToasts:IA});bA("[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 Ll(e){return e.label!==void 0}const LA=3,FA="24px",$A="16px",ey=4e3,BA=356,zA=14,VA=45,UA=200;function qn(...e){return e.filter(Boolean).join(" ")}function HA(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const WA=e=>{var t,n,r,i,s,o,a,l,c;const{invert:d,toast:u,unstyled:p,interacting:h,setHeights:y,visibleToasts:w,heights:b,index:m,toasts:v,expanded:x,removeToast:S,defaultRichColors:C,closeButton:_,style:j,cancelButtonStyle:A,actionButtonStyle:E,className:D="",descriptionClassName:L="",duration:O,position:q,gap:$,expandByDefault:B,classNames:I,icons:N,closeButtonAriaLabel:R="Close toast"}=e,[z,H]=ee.useState(null),[W,G]=ee.useState(null),[te,se]=ee.useState(!1),[pe,ue]=ee.useState(!1),[ke,Ne]=ee.useState(!1),[Q,V]=ee.useState(!1),[P,K]=ee.useState(!1),[Y,me]=ee.useState(0),[re,Ee]=ee.useState(0),ot=ee.useRef(u.duration||O||ey),$t=ee.useRef(null),oe=ee.useRef(null),ye=m===0,Oe=m+1<=w,M=u.type,J=u.dismissible!==!1,F=u.className||"",U=u.descriptionClassName||"",ae=ee.useMemo(()=>b.findIndex(xe=>xe.toastId===u.id)||0,[b,u.id]),de=ee.useMemo(()=>{var xe;return(xe=u.closeButton)!=null?xe:_},[u.closeButton,_]),Se=ee.useMemo(()=>u.duration||O||ey,[u.duration,O]),at=ee.useRef(0),vt=ee.useRef(0),Un=ee.useRef(0),dn=ee.useRef(null),[xs,fr]=q.split("-"),Dr=ee.useMemo(()=>b.reduce((xe,dt,St)=>St>=ae?xe:xe+dt.height,0),[b,ae]),ws=RA(),Io=u.invert||d,ki=M==="loading";vt.current=ee.useMemo(()=>ae*$+Dr,[ae,Dr]),ee.useEffect(()=>{ot.current=Se},[Se]),ee.useEffect(()=>{se(!0)},[]),ee.useEffect(()=>{const xe=oe.current;if(xe){const dt=xe.getBoundingClientRect().height;return Ee(dt),y(St=>[{toastId:u.id,height:dt,position:u.position},...St]),()=>y(St=>St.filter(Kt=>Kt.toastId!==u.id))}},[y,u.id]),ee.useLayoutEffect(()=>{if(!te)return;const xe=oe.current,dt=xe.style.height;xe.style.height="auto";const St=xe.getBoundingClientRect().height;xe.style.height=dt,Ee(St),y(Kt=>Kt.find(yt=>yt.toastId===u.id)?Kt.map(yt=>yt.toastId===u.id?{...yt,height:St}:yt):[{toastId:u.id,height:St,position:u.position},...Kt])},[te,u.title,u.description,y,u.id]);const Hn=ee.useCallback(()=>{ue(!0),me(vt.current),y(xe=>xe.filter(dt=>dt.toastId!==u.id)),setTimeout(()=>{S(u)},UA)},[u,S,y,vt]);ee.useEffect(()=>{if(u.promise&&M==="loading"||u.duration===1/0||u.type==="loading")return;let xe;return x||h||ws?(()=>{if(Un.current<at.current){const Kt=new Date().getTime()-at.current;ot.current=ot.current-Kt}Un.current=new Date().getTime()})():(()=>{ot.current!==1/0&&(at.current=new Date().getTime(),xe=setTimeout(()=>{u.onAutoClose==null||u.onAutoClose.call(u,u),Hn()},ot.current))})(),()=>clearTimeout(xe)},[x,h,u,M,ws,Hn]),ee.useEffect(()=>{u.delete&&Hn()},[Hn,u.delete]);function JC(){var xe;if(N!=null&&N.loading){var dt;return ee.createElement("div",{className:qn(I==null?void 0:I.loader,u==null||(dt=u.classNames)==null?void 0:dt.loader,"sonner-loader"),"data-visible":M==="loading"},N.loading)}return ee.createElement(CA,{className:qn(I==null?void 0:I.loader,u==null||(xe=u.classNames)==null?void 0:xe.loader),visible:M==="loading"})}var Tg,Eg;return ee.createElement("li",{tabIndex:0,ref:oe,className:qn(D,F,I==null?void 0:I.toast,u==null||(t=u.classNames)==null?void 0:t.toast,I==null?void 0:I.default,I==null?void 0:I[M],u==null||(n=u.classNames)==null?void 0:n[M]),"data-sonner-toast":"","data-rich-colors":(Tg=u.richColors)!=null?Tg:C,"data-styled":!(u.jsx||u.unstyled||p),"data-mounted":te,"data-promise":!!u.promise,"data-swiped":P,"data-removed":pe,"data-visible":Oe,"data-y-position":xs,"data-x-position":fr,"data-index":m,"data-front":ye,"data-swiping":ke,"data-dismissible":J,"data-type":M,"data-invert":Io,"data-swipe-out":Q,"data-swipe-direction":W,"data-expanded":!!(x||B&&te),style:{"--index":m,"--toasts-before":m,"--z-index":v.length-m,"--offset":`${pe?Y:vt.current}px`,"--initial-height":B?"auto":`${re}px`,...j,...u.style},onDragEnd:()=>{Ne(!1),H(null),dn.current=null},onPointerDown:xe=>{ki||!J||($t.current=new Date,me(vt.current),xe.target.setPointerCapture(xe.pointerId),xe.target.tagName!=="BUTTON"&&(Ne(!0),dn.current={x:xe.clientX,y:xe.clientY}))},onPointerUp:()=>{var xe,dt,St;if(Q||!J)return;dn.current=null;const Kt=Number(((xe=oe.current)==null?void 0:xe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),gl=Number(((dt=oe.current)==null?void 0:dt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),yt=new Date().getTime()-((St=$t.current)==null?void 0:St.getTime()),fn=z==="x"?Kt:gl,vl=Math.abs(fn)/yt;if(Math.abs(fn)>=VA||vl>.11){me(vt.current),u.onDismiss==null||u.onDismiss.call(u,u),G(z==="x"?Kt>0?"right":"left":gl>0?"down":"up"),Hn(),V(!0);return}else{var En,An;(En=oe.current)==null||En.style.setProperty("--swipe-amount-x","0px"),(An=oe.current)==null||An.style.setProperty("--swipe-amount-y","0px")}K(!1),Ne(!1),H(null)},onPointerMove:xe=>{var dt,St,Kt;if(!dn.current||!J||((dt=window.getSelection())==null?void 0:dt.toString().length)>0)return;const yt=xe.clientY-dn.current.y,fn=xe.clientX-dn.current.x;var vl;const En=(vl=e.swipeDirections)!=null?vl:HA(q);!z&&(Math.abs(fn)>1||Math.abs(yt)>1)&&H(Math.abs(fn)>Math.abs(yt)?"x":"y");let An={x:0,y:0};const Ag=Si=>1/(1.5+Math.abs(Si)/20);if(z==="y"){if(En.includes("top")||En.includes("bottom"))if(En.includes("top")&&yt<0||En.includes("bottom")&&yt>0)An.y=yt;else{const Si=yt*Ag(yt);An.y=Math.abs(Si)<Math.abs(yt)?Si:yt}}else if(z==="x"&&(En.includes("left")||En.includes("right")))if(En.includes("left")&&fn<0||En.includes("right")&&fn>0)An.x=fn;else{const Si=fn*Ag(fn);An.x=Math.abs(Si)<Math.abs(fn)?Si:fn}(Math.abs(An.x)>0||Math.abs(An.y)>0)&&K(!0),(St=oe.current)==null||St.style.setProperty("--swipe-amount-x",`${An.x}px`),(Kt=oe.current)==null||Kt.style.setProperty("--swipe-amount-y",`${An.y}px`)}},de&&!u.jsx&&M!=="loading"?ee.createElement("button",{"aria-label":R,"data-disabled":ki,"data-close-button":!0,onClick:ki||!J?()=>{}:()=>{Hn(),u.onDismiss==null||u.onDismiss.call(u,u)},className:qn(I==null?void 0:I.closeButton,u==null||(r=u.classNames)==null?void 0:r.closeButton)},(Eg=N==null?void 0:N.close)!=null?Eg:jA):null,M||u.icon||u.promise?ee.createElement("div",{"data-icon":"",className:qn(I==null?void 0:I.icon,u==null||(i=u.classNames)==null?void 0:i.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||JC():null,u.type!=="loading"?u.icon||(N==null?void 0:N[M])||kA(M):null):null,ee.createElement("div",{"data-content":"",className:qn(I==null?void 0:I.content,u==null||(s=u.classNames)==null?void 0:s.content)},ee.createElement("div",{"data-title":"",className:qn(I==null?void 0:I.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?ee.createElement("div",{"data-description":"",className:qn(L,U,I==null?void 0:I.description,u==null||(a=u.classNames)==null?void 0:a.description)},typeof u.description=="function"?u.description():u.description):null),ee.isValidElement(u.cancel)?u.cancel:u.cancel&&Ll(u.cancel)?ee.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||A,onClick:xe=>{Ll(u.cancel)&&J&&(u.cancel.onClick==null||u.cancel.onClick.call(u.cancel,xe),Hn())},className:qn(I==null?void 0:I.cancelButton,u==null||(l=u.classNames)==null?void 0:l.cancelButton)},u.cancel.label):null,ee.isValidElement(u.action)?u.action:u.action&&Ll(u.action)?ee.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||E,onClick:xe=>{Ll(u.action)&&(u.action.onClick==null||u.action.onClick.call(u.action,xe),!xe.defaultPrevented&&Hn())},className:qn(I==null?void 0:I.actionButton,u==null||(c=u.classNames)==null?void 0:c.actionButton)},u.action.label):null)};function ty(){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 qA(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,o=s?"--mobile-offset":"--offset",a=s?$A:FA;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 GA=ee.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:p,duration:h,style:y,visibleToasts:w=LA,toastOptions:b,dir:m=ty(),gap:v=zA,icons:x,containerAriaLabel:S="Notifications"}=t,[C,_]=ee.useState([]),j=ee.useMemo(()=>Array.from(new Set([i].concat(C.filter(W=>W.position).map(W=>W.position)))),[C,i]),[A,E]=ee.useState([]),[D,L]=ee.useState(!1),[O,q]=ee.useState(!1),[$,B]=ee.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),I=ee.useRef(null),N=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=ee.useRef(null),z=ee.useRef(!1),H=ee.useCallback(W=>{_(G=>{var te;return(te=G.find(se=>se.id===W.id))!=null&&te.delete||Ut.dismiss(W.id),G.filter(({id:se})=>se!==W.id)})},[]);return ee.useEffect(()=>Ut.subscribe(W=>{if(W.dismiss){const G=C.map(te=>te.id===W.id?{...te,delete:!0}:te);requestAnimationFrame(()=>{_(G)});return}setTimeout(()=>{AT.flushSync(()=>{_(G=>{const te=G.findIndex(se=>se.id===W.id);return te!==-1?[...G.slice(0,te),{...G[te],...W},...G.slice(te+1)]:[W,...G]})})})}),[C]),ee.useEffect(()=>{if(u!=="system"){B(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?B("dark"):B("light")),typeof window>"u")return;const W=window.matchMedia("(prefers-color-scheme: dark)");try{W.addEventListener("change",({matches:G})=>{B(G?"dark":"light")})}catch{W.addListener(({matches:te})=>{try{B(te?"dark":"light")}catch(se){console.error(se)}})}},[u]),ee.useEffect(()=>{C.length<=1&&L(!1)},[C]),ee.useEffect(()=>{const W=G=>{var te;if(s.every(ue=>G[ue]||G.code===ue)){var pe;L(!0),(pe=I.current)==null||pe.focus()}G.code==="Escape"&&(document.activeElement===I.current||(te=I.current)!=null&&te.contains(document.activeElement))&&L(!1)};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[s]),ee.useEffect(()=>{if(I.current)return()=>{R.current&&(R.current.focus({preventScroll:!0}),R.current=null,z.current=!1)}},[I.current]),ee.createElement("section",{ref:n,"aria-label":`${S} ${N}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},j.map((W,G)=>{var te;const[se,pe]=W.split("-");return C.length?ee.createElement("ol",{key:W,dir:m==="auto"?ty():m,tabIndex:-1,ref:I,className:l,"data-sonner-toaster":!0,"data-sonner-theme":$,"data-y-position":se,"data-lifted":D&&C.length>1&&!o,"data-x-position":pe,style:{"--front-toast-height":`${((te=A[0])==null?void 0:te.height)||0}px`,"--width":`${BA}px`,"--gap":`${v}px`,...y,...qA(c,d)},onBlur:ue=>{z.current&&!ue.currentTarget.contains(ue.relatedTarget)&&(z.current=!1,R.current&&(R.current.focus({preventScroll:!0}),R.current=null))},onFocus:ue=>{ue.target instanceof HTMLElement&&ue.target.dataset.dismissible==="false"||z.current||(z.current=!0,R.current=ue.relatedTarget)},onMouseEnter:()=>L(!0),onMouseMove:()=>L(!0),onMouseLeave:()=>{O||L(!1)},onDragEnd:()=>L(!1),onPointerDown:ue=>{ue.target instanceof HTMLElement&&ue.target.dataset.dismissible==="false"||q(!0)},onPointerUp:()=>q(!1)},C.filter(ue=>!ue.position&&G===0||ue.position===W).map((ue,ke)=>{var Ne,Q;return ee.createElement(WA,{key:ue.id,icons:x,index:ke,toast:ue,defaultRichColors:p,duration:(Ne=b==null?void 0:b.duration)!=null?Ne:h,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:r,visibleToasts:w,closeButton:(Q=b==null?void 0:b.closeButton)!=null?Q:a,interacting:O,position:W,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:H,toasts:C.filter(V=>V.position==ue.position),heights:A.filter(V=>V.position==ue.position),setHeights:E,expandByDefault:o,gap:v,expanded:D,swipeDirections:t.swipeDirections})})):null}))});function en(e){return $b.custom(t=>f.jsx(YA,{id:t,title:e.title,description:e.description,variant:e.variant}))}const Md={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 YA(e){const{title:t,description:n,button:r,id:i,variant:s}=e;return f.jsxs("div",{className:Ie("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",Md[s||"info"].bg),children:[f.jsx("div",{className:"flex flex-1 items-center",children:f.jsxs("div",{className:"w-full",children:[t&&f.jsx("p",{className:Ie("text-sm font-medium",Md[s||"info"].text),children:t}),f.jsx("p",{className:Ie("text-sm",Md[s||"info"].text,{"mt-1":!!t}),children:n})]})}),r&&f.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:f.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(),$b.dismiss(i)},children:r.label})})]})}function QA(e){return Array.isArray(e)&&e[0].field!==void 0}const yo=(e,t)=>{var n;if(QA(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||en({description:e.message,variant:"error"});return}if(e&&e.error){t!=null&&t.noToast||en({description:e.error,variant:"error"});return}},KA=[{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ı"}],XA=[{code:"FST_REQ_FILE_TOO_LARGE",text:"Yüklenen dosya boyutu izin verilen sınırı aştı"},{code:"AUTH_TOKEN_NOT_PRESENT",text:"Oturum bilgisi bulunamadı. Lütfen sohbeti yeniden başlatın"},{code:"AUTH_TOKEN_NOT_VALID",text:"Oturum süreniz dolmuş olabilir. Lütfen sohbeti yeniden başlatın"},{code:"AUTH_VERIFY_REQUIRED",text:"Hesap doğrulaması gerekiyor. Lütfen doğrulama adımını tamamlayın"},{code:"AUTH_INVALID_OWNER_TYPE",text:"Bu işlem için geçerli ziyaretçi oturumu bulunamadı"}],Wo=(e,t)=>t?`${e} (Kod: ${t})`:e,ZA=(e,t)=>{if(zn(t))return!1;if(e===null)return en({description:"Bir hata oluştu",variant:"error"}),!0;if(typeof e=="object"&&e){const r=e.code;if(r){const i=XA.find(s=>s.code===r);if(i)return en({description:Wo(i.text,r),variant:"error"}),!0}if(t===401){if(e.tokenNotPresent)return en({description:Wo("Oturum bilgisi bulunamadı. Lütfen sohbeti yeniden başlatın","AUTH_TOKEN_NOT_PRESENT"),variant:"error"}),!0;if(e.tokenNotValid)return en({description:Wo("Oturum süreniz dolmuş olabilir. Lütfen sohbeti yeniden başlatın","AUTH_TOKEN_NOT_VALID"),variant:"error"}),!0;if(e.verifyRequired)return en({description:Wo("Hesap doğrulaması gerekiyor. Lütfen doğrulama adımını tamamlayın","AUTH_VERIFY_REQUIRED"),variant:"error"}),!0}if(e.message)return en({description:Wo(e.message,r),variant:"error"}),!0}const n=KA.find(r=>r.code===t);return en({description:n?n.text:"Bir hata oluştu",variant:"error"}),!0},JA={xs:{default:"!p-1",rounded:"!p-1"},sm:{default:"text-xs px-2 py-1.5",rounded:"p-1.5"},md:{default:"text-xs px-3 py-1.5",rounded:"p-2"},lg:{default:"text-sm px-4 py-2",rounded:"p-2.5"},xl:{default:"text-base px-5 py-3",rounded:"p-3"}},ny={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"}},ym=g.createContext({});function Eu(e){const t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}const xm=typeof window<"u",Bb=xm?g.useLayoutEffect:g.useEffect,Au=g.createContext(null),wm=g.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class ej extends g.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 tj({children:e,isPresent:t,anchorX:n}){const r=g.useId(),i=g.useRef(null),s=g.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:o}=g.useContext(wm);return g.useInsertionEffect(()=>{const{width:a,height:l,top:c,left:d,right:u}=s.current;if(t||!i.current||!a||!l)return;const p=n==="left"?`left: ${d}`:`right: ${u}`;i.current.dataset.motionPopId=r;const h=document.createElement("style");return o&&(h.nonce=o),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`
63
63
  [data-motion-pop-id="${r}"] {
64
64
  position: absolute !important;
65
65
  width: ${a}px !important;
@@ -67,7 +67,7 @@ Error generating stack: `+s.message+`
67
67
  ${p}px !important;
68
68
  top: ${c}px !important;
69
69
  }
70
- `),()=>{document.head.removeChild(h)}},[t]),f.jsx(UA,{isPresent:t,childRef:i,sizeRef:s,children:v.cloneElement(e,{ref:i})})}const WA=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a})=>{const l=Su(qA),c=v.useId();let d=!0,u=v.useMemo(()=>(d=!1,{id:c,initial:t,isPresent:n,custom:i,onExitComplete:p=>{l.set(p,!0);for(const h of l.values())if(!h)return;r&&r()},register:p=>(l.set(p,!1),()=>l.delete(p))}),[n,l,r]);return s&&d&&(u={...u}),v.useMemo(()=>{l.forEach((p,h)=>l.set(h,!1))},[n]),v.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(e=f.jsx(HA,{isPresent:n,anchorX:a,children:e})),f.jsx(Cu.Provider,{value:u,children:e})};function qA(){return new Map}function Rb(e=!0){const t=v.useContext(Cu);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 Nl=e=>e.key||"";function Kv(e){const t=[];return v.Children.forEach(e,n=>{v.isValidElement(n)&&t.push(n)}),t}const Ar=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left"})=>{const[l,c]=Rb(o),d=v.useMemo(()=>Kv(e),[e]),u=o&&!l?[]:d.map(Nl),p=v.useRef(!0),h=v.useRef(d),y=Su(()=>new Map),[x,w]=v.useState(d),[m,g]=v.useState(d);jb(()=>{p.current=!1,h.current=d;for(let S=0;S<m.length;S++){const _=Nl(m[S]);u.includes(_)?y.delete(_):y.get(_)!==!0&&y.set(_,!1)}},[m,u.length,u.join("-")]);const b=[];if(d!==x){let S=[...d];for(let _=0;_<m.length;_++){const j=m[_],A=Nl(j);u.includes(A)||(S.splice(_,0,j),b.push(j))}return s==="wait"&&b.length&&(S=b),g(Kv(S)),w(d),null}const{forceRender:C}=v.useContext(fm);return f.jsx(f.Fragment,{children:m.map(S=>{const _=Nl(S),j=o&&!l?!1:d===m||u.includes(_),A=()=>{if(y.has(_))y.set(_,!0);else return;let E=!0;y.forEach(L=>{L||(E=!1)}),E&&(C==null||C(),g(h.current),o&&(c==null||c()),r&&r())};return f.jsx(WA,{isPresent:j,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,onExitComplete:j?void 0:A,anchorX:a,children:S},_)})})};function mm(e,t){e.indexOf(t)===-1&&e.push(t)}function gm(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let vp=()=>{};const yp={skipAnimations:!1,useManualTiming:!1};function vm(e){let t;return()=>(t===void 0&&(t=e()),t)}const Cn=e=>e,Ia=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class ym{constructor(){this.subscriptions=[]}add(t){return mm(this.subscriptions,t),()=>gm(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 rr=e=>e*1e3,ir=e=>e/1e3;function Pb(e,t){return t?e*(1e3/t):0}const GA=vm(()=>window.ScrollTimeline!==void 0);class YA{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(GA()&&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 QA extends YA{then(t,n){return this.finished.finally(t).then(()=>{})}}const Xv={value:null,addProjectionMetrics:null},xm=e=>Array.isArray(e)&&typeof e[0]=="number",KA={};function XA(e,t){const n=vm(e);return()=>KA[t]??n()}const La=XA(()=>{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)})`},Ko=([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:Ko([0,.65,.55,1]),circOut:Ko([.55,0,1,.45]),backIn:Ko([.31,.01,.66,-.59]),backOut:Ko([.33,1.53,.69,.99])};function Ob(e,t){if(e)return typeof e=="function"&&La()?Mb(e,t):xm(e)?Ko(e):Array.isArray(e)?e.map(n=>Ob(n,t)||xp.easeOut):xp[e]}function ZA(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=Ob(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 wm(e){return typeof e=="function"&&"applyToOptions"in e}function bm(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Vc=2e4;function km(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Vc;)t+=n,r=e.next(t);return t>=Vc?1/0:t}function JA(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(km(r),Vc);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:ir(i)}}function Nb(e){return!!(typeof e=="function"&&La()||!e||typeof e=="string"&&(e in xp||La())||xm(e)||Array.isArray(e)&&e.every(Nb))}function Zv(e,t){e.timeline=t,e.onfinish=null}const Dl=["read","resolveKeyframes","update","preRender","render","postRender"];function ej(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,p=!1,h=!1)=>{const x=h&&i?n:r;return p&&o.add(u),x.has(u)||x.add(u),u},cancel:u=>{r.delete(u),o.delete(u)},process:u=>{if(a=u,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(c),t&&Xv.value&&Xv.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,d.process(u))}};return d}const tj=40;function Db(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Dl.reduce((m,g)=>(m[g]=ej(s,t?g:void 0),m),{}),{read:a,resolveKeyframes:l,update:c,preRender:d,render:u,postRender:p}=o,h=()=>{const m=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(m-i.timestamp,tj),1),i.timestamp=m,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),d.process(i),u.process(i),p.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},y=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:Dl.reduce((m,g)=>{const b=o[g];return m[g]=(C,S=!1,_=!1)=>(n||y(),b.schedule(C,S,_)),m},{}),cancel:m=>{for(let g=0;g<Dl.length;g++)o[Dl[g]].cancel(m)},state:i,steps:o}}const{schedule:Sm,cancel:HB}=Db(queueMicrotask,!1),{schedule:Fe,cancel:pi,state:wt,steps:jd}=Db(typeof requestAnimationFrame<"u"?requestAnimationFrame:Cn,!0);let ic;function nj(){ic=void 0}const sr={now:()=>(ic===void 0&&sr.set(wt.isProcessing||yp.useManualTiming?wt.timestamp:performance.now()),ic),set:e=>{ic=e,queueMicrotask(nj)}},Pn={x:!1,y:!1};function Ib(){return Pn.x||Pn.y}function rj(e){return e==="x"||e==="y"?Pn[e]?null:(Pn[e]=!0,()=>{Pn[e]=!1}):Pn.x||Pn.y?null:(Pn.x=Pn.y=!0,()=>{Pn.x=Pn.y=!1})}function ij(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 Lb(e,t){const n=ij(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function Jv(e){return!(e.pointerType==="touch"||Ib())}function sj(e,t,n={}){const[r,i,s]=Lb(e,n),o=a=>{if(!Jv(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const d=u=>{Jv(u)&&(c(u),l.removeEventListener("pointerleave",d))};l.addEventListener("pointerleave",d,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const Fb=(e,t)=>t?e===t?!0:Fb(e,t.parentElement):!1,Cm=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,oj=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function aj(e){return oj.has(e.tagName)||e.tabIndex!==-1}const Xo=new WeakSet;function ey(e){return t=>{t.key==="Enter"&&e(t)}}function Rd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const lj=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=ey(()=>{if(Xo.has(n))return;Rd(n,"down");const i=ey(()=>{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 ty(e){return Cm(e)&&!Ib()}function cj(e,t,n={}){const[r,i,s]=Lb(e,n),o=a=>{const l=a.currentTarget;if(!ty(a)||Xo.has(l))return;Xo.add(l);const c=t(l,a),d=(h,y)=>{window.removeEventListener("pointerup",u),window.removeEventListener("pointercancel",p),!(!ty(h)||!Xo.has(l))&&(Xo.delete(l),typeof c=="function"&&c(h,{success:y}))},u=h=>{d(h,l===window||l===document||n.useGlobalTarget||Fb(l,h.target))},p=h=>{d(h,!1)};window.addEventListener("pointerup",u,i),window.addEventListener("pointercancel",p,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a instanceof HTMLElement&&(a.addEventListener("focus",c=>lj(c,i)),!aj(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}const ny=30,uj=e=>!isNaN(parseFloat(e));class dj{constructor(t,n={}){this.version="12.7.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=sr.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=sr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=uj(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 ym);const r=this.events[t].add(n);return t==="change"?()=>{r(),Fe.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=sr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ny)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ny);return Pb(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 Fa(e,t){return new dj(e,t)}const Bb=v.createContext({strict:!1}),ry={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"]},mo={};for(const e in ry)mo[e]={isEnabled:t=>ry[e].some(n=>!!t[n])};function fj(e){for(const t in e)mo[t]={...mo[t],...e[t]}}const pj=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 Uc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||pj.has(e)}let $b=e=>!Uc(e);function hj(e){e&&($b=t=>t.startsWith("on")?!Uc(t):e(t))}try{hj(require("@emotion/is-prop-valid").default)}catch{}function mj(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||($b(i)||n===!0&&Uc(i)||!t&&!Uc(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function gj(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 _u=v.createContext({});function Tu(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ba(e){return typeof e=="string"||Array.isArray(e)}const _m=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Tm=["initial",..._m];function Eu(e){return Tu(e.animate)||Tm.some(t=>Ba(e[t]))}function zb(e){return!!(Eu(e)||e.variants)}function vj(e,t){if(Eu(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ba(n)?n:void 0,animate:Ba(r)?r:void 0}}return e.inherit!==!1?t:{}}function yj(e){const{initial:t,animate:n}=vj(e,v.useContext(_u));return v.useMemo(()=>({initial:t,animate:n}),[iy(t),iy(n)])}function iy(e){return Array.isArray(e)?e.join(" "):e}const xj=Symbol.for("motionComponentSymbol");function Ns(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function wj(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):Ns(n)&&(n.current=r))},[t])}const Em=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),bj="framerAppearId",Vb="data-"+Em(bj),Ub=v.createContext({});function kj(e,t,n,r,i){var x,w;const{visualElement:s}=v.useContext(_u),o=v.useContext(Bb),a=v.useContext(Cu),l=v.useContext(hm).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(Ub);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&Sj(c.current,n,i,u);const p=v.useRef(!1);v.useInsertionEffect(()=>{d&&p.current&&d.update(n,a)});const h=n[Vb],y=v.useRef(!!h&&!((x=window.MotionHandoffIsComplete)!=null&&x.call(window,h))&&((w=window.MotionHasOptimisedAnimation)==null?void 0:w.call(window,h)));return jb(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),Sm.render(d.render),y.current&&d.animationState&&d.animationState.animateChanges())}),v.useEffect(()=>{d&&(!y.current&&d.animationState&&d.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var m;(m=window.MotionHandoffMarkAsComplete)==null||m.call(window,h)}),y.current=!1))}),d}function Sj(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:Hb(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&Ns(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:c})}function Hb(e){if(e)return e.options.allowProjection!==!1?e.projection:Hb(e.parent)}function Cj({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&fj(e);function s(a,l){let c;const d={...v.useContext(hm),...a,layoutId:_j(a)},{isStatic:u}=d,p=yj(a),h=r(a,u);if(!u&&pm){Tj();const y=Ej(d);c=y.MeasureLayout,p.visualElement=kj(i,h,d,t,y.ProjectionNode)}return f.jsxs(_u.Provider,{value:p,children:[c&&p.visualElement?f.jsx(c,{visualElement:p.visualElement,...d}):null,n(i,a,wj(h,p.visualElement,l),h,u,p.visualElement)]})}s.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=v.forwardRef(s);return o[xj]=i,o}function _j({layoutId:e}){const t=v.useContext(fm).id;return t&&e!==void 0?t+"-"+e:e}function Tj(e,t){v.useContext(Bb).strict}function Ej(e){const{drag:t,layout:n}=mo;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 Wb=e=>t=>typeof t=="string"&&t.startsWith(e),Am=Wb("--"),Aj=Wb("var(--"),jm=e=>Aj(e)?jj.test(e.split("/*")[0].trim()):!1,jj=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,$a={};function Rj(e){for(const t in e)$a[t]=e[t],Am(t)&&($a[t].isCSSVariable=!0)}const Eo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ls=new Set(Eo);function qb(e,{layout:t,layoutId:n}){return ls.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!$a[e]||e==="opacity")}const jt=e=>!!(e&&e.getVelocity),Gb=(e,t)=>t&&typeof e=="number"?t.transform(e):e,jr=(e,t,n)=>n>t?t:n<e?e:n,Ao={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},za={...Ao,transform:e=>jr(0,1,e)},Il={...Ao,default:1},il=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Lr=il("deg"),or=il("%"),ge=il("px"),Pj=il("vh"),Mj=il("vw"),sy={...or,parse:e=>or.parse(e)/100,transform:e=>or.transform(e*100)},Oj={borderWidth:ge,borderTopWidth:ge,borderRightWidth:ge,borderBottomWidth:ge,borderLeftWidth:ge,borderRadius:ge,radius:ge,borderTopLeftRadius:ge,borderTopRightRadius:ge,borderBottomRightRadius:ge,borderBottomLeftRadius:ge,width:ge,maxWidth:ge,height:ge,maxHeight:ge,top:ge,right:ge,bottom:ge,left:ge,padding:ge,paddingTop:ge,paddingRight:ge,paddingBottom:ge,paddingLeft:ge,margin:ge,marginTop:ge,marginRight:ge,marginBottom:ge,marginLeft:ge,backgroundPositionX:ge,backgroundPositionY:ge},Nj={rotate:Lr,rotateX:Lr,rotateY:Lr,rotateZ:Lr,scale:Il,scaleX:Il,scaleY:Il,scaleZ:Il,skew:Lr,skewX:Lr,skewY:Lr,distance:ge,translateX:ge,translateY:ge,translateZ:ge,x:ge,y:ge,z:ge,perspective:ge,transformPerspective:ge,opacity:za,originX:sy,originY:sy,originZ:ge},oy={...Ao,transform:Math.round},Rm={...Oj,...Nj,zIndex:oy,size:ge,fillOpacity:za,strokeOpacity:za,numOctaves:oy},Dj={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ij=Eo.length;function Lj(e,t,n){let r="",i=!0;for(let s=0;s<Ij;s++){const o=Eo[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=Gb(a,Rm[o]);if(!l){i=!1;const d=Dj[o]||o;r+=`${d}(${c}) `}n&&(t[o]=c)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Pm(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(ls.has(l)){o=!0;continue}else if(Am(l)){i[l]=c;continue}else{const d=Gb(c,Rm[l]);l.startsWith("origin")?(a=!0,s[l]=d):r[l]=d}}if(t.transform||(o||n?r.transform=Lj(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 Mm=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Yb(e,t,n){for(const r in t)!jt(t[r])&&!qb(r,n)&&(e[r]=t[r])}function Fj({transformTemplate:e},t){return v.useMemo(()=>{const n=Mm();return Pm(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Bj(e,t){const n=e.style||{},r={};return Yb(r,n,e),Object.assign(r,Fj(e,t)),r}function $j(e,t){const n={},r=Bj(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 zj=["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:!!(zj.indexOf(e)>-1||/[A-Z]/u.test(e))}const Vj={offset:"stroke-dashoffset",array:"stroke-dasharray"},Uj={offset:"strokeDashoffset",array:"strokeDasharray"};function Hj(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?Vj:Uj;e[s.offset]=ge.transform(-r);const o=ge.transform(t),a=ge.transform(n);e[s.array]=`${o} ${a}`}function ay(e,t,n){return typeof e=="string"?e:ge.transform(t+n*e)}function Wj(e,t,n){const r=ay(t,e.x,e.width),i=ay(n,e.y,e.height);return`${r} ${i}`}function Nm(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},d,u){if(Pm(e,c,u),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:h,dimensions:y}=e;p.transform&&(y&&(h.transform=p.transform),delete p.transform),y&&(i!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=Wj(y,i!==void 0?i:.5,s!==void 0?s:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),o!==void 0&&Hj(p,o,a,l,!1)}const Qb=()=>({...Mm(),attrs:{}}),Dm=e=>typeof e=="string"&&e.toLowerCase()==="svg";function qj(e,t,n,r){const i=v.useMemo(()=>{const s=Qb();return Nm(s,t,Dm(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Yb(s,e.style,e),i.style={...s,...i.style}}return i}function Gj(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Om(n)?qj:$j)(r,s,o,n),c=mj(r,typeof n=="string",e),d=n!==v.Fragment?{...c,...l,ref:i}:{},{children:u}=r,p=v.useMemo(()=>jt(u)?u.get():u,[u]);return v.createElement(n,{...d,children:p})}}function ly(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Im(e,t,n,r){if(typeof t=="function"){const[i,s]=ly(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]=ly(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const wp=e=>Array.isArray(e),Yj=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Qj=e=>wp(e)?e[e.length-1]||0:e;function sc(e){const t=jt(e)?e.get():e;return Yj(t)?t.toValue():t}function Kj({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,s){const o={latestValues:Xj(r,i,s,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const Kb=e=>(t,n)=>{const r=v.useContext(_u),i=v.useContext(Cu),s=()=>Kj(e,t,r,i);return n?s():Su(s)};function Xj(e,t,n,r){const i={},s=r(e,{});for(const p in s)i[p]=sc(s[p]);let{initial:o,animate:a}=e;const l=Eu(e),c=zb(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"&&!Tu(u)){const p=Array.isArray(u)?u:[u];for(let h=0;h<p.length;h++){const y=Im(e,p[h]);if(y){const{transitionEnd:x,transition:w,...m}=y;for(const g in m){let b=m[g];if(Array.isArray(b)){const C=d?b.length-1:0;b=b[C]}b!==null&&(i[g]=b)}for(const g in x)i[g]=x[g]}}}return i}function Lm(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(jt(r[o])||t.style&&jt(t.style[o])||qb(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const Zj={useVisualState:Kb({scrapeMotionValuesFromProps:Lm,createRenderState:Mm})};function Xb(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 Zb(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 Jb=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 ek(e,t,n,r){Zb(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Jb.has(i)?i:Em(i),t.attrs[i])}function tk(e,t,n){const r=Lm(e,t,n);for(const i in e)if(jt(e[i])||jt(t[i])){const s=Eo.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const cy=["x","y","width","height","cx","cy","r"],Jj={useVisualState:Kb({scrapeMotionValuesFromProps:tk,createRenderState:Qb,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(ls.has(a)){s=!0;break}}if(!s)return;let o=!t;if(t)for(let a=0;a<cy.length;a++){const l=cy[a];e[l]!==t[l]&&(o=!0)}o&&Fe.read(()=>{Xb(n,r),Fe.render(()=>{Nm(r,i,Dm(n.tagName),e.transformTemplate),ek(n,r)})})}})};function e5(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Om(r)?Jj:Zj,preloadedFeatures:e,useRender:Gj(i),createVisualElement:t,Component:r};return Cj(o)}}function Va(e,t,n){const r=e.getProps();return Im(r,t,n!==void 0?n:r.custom,e)}const nk=new Set(["width","height","top","left","right","bottom",...Eo]);function t5(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Fa(n))}function n5(e,t){const n=Va(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=Qj(s[o]);t5(e,o,a)}}function r5(e){return!!(jt(e)&&e.add)}function bp(e,t){const n=e.getValue("willChange");if(r5(n))return n.add(t);if(!n&&yp.WillChange){const r=new yp.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function rk(e){return e.props[Vb]}const ik=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,i5=1e-7,s5=12;function o5(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=ik(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>i5&&++a<s5);return o}function sl(e,t,n,r){if(e===t&&n===r)return Cn;const i=s=>o5(s,0,1,e,n);return s=>s===0||s===1?s:ik(i(s),t,r)}const sk=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ok=e=>t=>1-e(1-t),ak=sl(.33,1.53,.69,.99),Fm=ok(ak),lk=sk(Fm),ck=e=>(e*=2)<1?.5*Fm(e):.5*(2-Math.pow(2,-10*(e-1))),Bm=e=>1-Math.sin(Math.acos(e)),uk=ok(Bm),dk=sk(Bm),fk=e=>/^0[^.\s]+$/u.test(e);function a5(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||fk(e):!0}const ca=e=>Math.round(e*1e5)/1e5,$m=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function l5(e){return e==null}const c5=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,zm=(e,t)=>n=>!!(typeof n=="string"&&c5.test(n)&&n.startsWith(e)||t&&!l5(n)&&Object.prototype.hasOwnProperty.call(n,t)),pk=(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}},u5=e=>jr(0,255,e),Pd={...Ao,transform:e=>Math.round(u5(e))},Ni={test:zm("rgb","red"),parse:pk("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Pd.transform(e)+", "+Pd.transform(t)+", "+Pd.transform(n)+", "+ca(za.transform(r))+")"};function d5(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 kp={test:zm("#"),parse:d5,transform:Ni.transform},Ds={test:zm("hsl","hue"),parse:pk("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+or.transform(ca(t))+", "+or.transform(ca(n))+", "+ca(za.transform(r))+")"},Et={test:e=>Ni.test(e)||kp.test(e)||Ds.test(e),parse:e=>Ni.test(e)?Ni.parse(e):Ds.test(e)?Ds.parse(e):kp.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ni.transform(e):Ds.transform(e)},f5=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function p5(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match($m))==null?void 0:t.length)||0)+(((n=e.match(f5))==null?void 0:n.length)||0)>0}const hk="number",mk="color",h5="var",m5="var(",uy="${}",g5=/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 Ua(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(g5,l=>(Et.test(l)?(r.color.push(s),i.push(mk),n.push(Et.parse(l))):l.startsWith(m5)?(r.var.push(s),i.push(h5),n.push(l)):(r.number.push(s),i.push(hk),n.push(parseFloat(l))),++s,uy)).split(uy);return{values:n,split:a,indexes:r,types:i}}function gk(e){return Ua(e).values}function vk(e){const{split:t,types:n}=Ua(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===hk?s+=ca(i[o]):a===mk?s+=Et.transform(i[o]):s+=i[o]}return s}}const v5=e=>typeof e=="number"?0:e;function y5(e){const t=gk(e);return vk(e)(t.map(v5))}const hi={test:p5,parse:gk,createTransformer:vk,getAnimatableNone:y5},x5=new Set(["brightness","contrast","saturate","opacity"]);function w5(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=x5.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const b5=/\b([a-z-]*)\(.*?\)/gu,Sp={...hi,getAnimatableNone:e=>{const t=e.match(b5);return t?t.map(w5).join(" "):e}},k5={...Rm,color:Et,backgroundColor:Et,outlineColor:Et,fill:Et,stroke:Et,borderColor:Et,borderTopColor:Et,borderRightColor:Et,borderBottomColor:Et,borderLeftColor:Et,filter:Sp,WebkitFilter:Sp},yk=e=>k5[e];function xk(e,t){let n=yk(e);return n!==Sp&&(n=hi),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const S5=new Set(["auto","none","0"]);function C5(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!S5.has(s)&&Ua(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=xk(n,i)}const Di=e=>e*180/Math.PI,Cp=e=>{const t=Di(Math.atan2(e[1],e[0]));return _p(t)},_5={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=>Di(Math.atan(e[1])),skewY:e=>Di(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},_p=e=>(e=e%360,e<0&&(e+=360),e),dy=Cp,fy=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),py=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),T5={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:fy,scaleY:py,scale:e=>(fy(e)+py(e))/2,rotateX:e=>_p(Di(Math.atan2(e[6],e[5]))),rotateY:e=>_p(Di(Math.atan2(-e[2],e[0]))),rotateZ:dy,rotate:dy,skewX:e=>Di(Math.atan(e[4])),skewY:e=>Di(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function hy(e){return e.includes("scale")?1:0}function Tp(e,t){if(!e||e==="none")return hy(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=T5,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=_5,i=a}if(!i)return hy(t);const s=r[t],o=i[1].split(",").map(A5);return typeof s=="function"?s(o):o[s]}const E5=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Tp(n,t)};function A5(e){return parseFloat(e.trim())}const my=e=>e===Ao||e===ge,j5=new Set(["x","y","z"]),R5=Eo.filter(e=>!j5.has(e));function P5(e){const t=[];return R5.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const go={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})=>Tp(t,"x"),y:(e,{transform:t})=>Tp(t,"y")};go.translateX=go.x;go.translateY=go.y;const Gi=new Set;let Ep=!1,Ap=!1;function wk(){if(Ap){const e=Array.from(Gi).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=P5(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)})}Ap=!1,Ep=!1,Gi.forEach(e=>e.complete()),Gi.clear()}function bk(){Gi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ap=!0)})}function M5(){bk(),wk()}class Vm{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?(Gi.add(this),Ep||(Ep=!0,Fe.read(bk),Fe.resolveKeyframes(wk))):(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),Gi.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Gi.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const kk=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),O5=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function N5(e){const t=O5.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function Sk(e,t,n=1){const[r,i]=N5(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return kk(o)?parseFloat(o):o}return jm(i)?Sk(i,t,n+1):i}const Ck=e=>t=>t.test(e),D5={test:e=>e==="auto",parse:e=>e},_k=[Ao,ge,or,Lr,Mj,Pj,D5],gy=e=>_k.find(Ck(e));class Tk extends Vm{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(),jm(c))){const d=Sk(c,n.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!nk.has(r)||t.length!==2)return;const[i,s]=t,o=gy(i),a=gy(s);if(o!==a)if(my(o)&&my(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++)a5(t[i])&&r.push(i);r.length&&C5(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=go[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]=go[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 vy=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(hi.test(e)||e==="0")&&!e.startsWith("url("));function I5(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 L5(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=vy(i,t),a=vy(s,t);return!o||!a?!1:I5(e)||(n==="spring"||wm(n))&&r}const F5=e=>e!==null;function Au(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(F5),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const B5=40;class Ek{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=sr.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>B5?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&M5(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=sr.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!L5(t,r,i,s))if(o)this.options.duration=0;else{l&&l(Au(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 Qe=(e,t,n)=>e+(t-e)*n;function Md(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 $5({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=Md(l,a,e+1/3),s=Md(l,a,e),o=Md(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function Hc(e,t){return n=>n>0?t:e}const Od=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},z5=[kp,Ni,Ds],V5=e=>z5.find(t=>t.test(e));function yy(e){const t=V5(e);if(!t)return!1;let n=t.parse(e);return t===Ds&&(n=$5(n)),n}const xy=(e,t)=>{const n=yy(e),r=yy(t);if(!n||!r)return Hc(e,t);const i={...n};return s=>(i.red=Od(n.red,r.red,s),i.green=Od(n.green,r.green,s),i.blue=Od(n.blue,r.blue,s),i.alpha=Qe(n.alpha,r.alpha,s),Ni.transform(i))},U5=(e,t)=>n=>t(e(n)),ol=(...e)=>e.reduce(U5),jp=new Set(["none","hidden"]);function H5(e,t){return jp.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function W5(e,t){return n=>Qe(e,t,n)}function Um(e){return typeof e=="number"?W5:typeof e=="string"?jm(e)?Hc:Et.test(e)?xy:Y5:Array.isArray(e)?Ak:typeof e=="object"?Et.test(e)?xy:q5:Hc}function Ak(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>Um(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function q5(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Um(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function G5(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 Y5=(e,t)=>{const n=hi.createTransformer(t),r=Ua(e),i=Ua(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?H5(e,t):ol(Ak(G5(r,i),i.values),n):Hc(e,t)};function jk(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Qe(e,t,n):Um(e)(e,t)}const Q5=5;function Rk(e,t,n){const r=Math.max(t-Q5,0);return Pb(n-e(r),t-r)}const et={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},Nd=.001;function K5({duration:e=et.duration,bounce:t=et.bounce,velocity:n=et.velocity,mass:r=et.mass}){let i,s,o=1-t;o=jr(et.minDamping,et.maxDamping,o),e=jr(et.minDuration,et.maxDuration,ir(e)),o<1?(i=c=>{const d=c*o,u=d*e,p=d-n,h=Rp(c,o),y=Math.exp(-u);return Nd-p/h*y},s=c=>{const u=c*o*e,p=u*n+n,h=Math.pow(o,2)*Math.pow(c,2)*e,y=Math.exp(-u),x=Rp(Math.pow(c,2),o);return(-i(c)+Nd>0?-1:1)*((p-h)*y)/x}):(i=c=>{const d=Math.exp(-c*e),u=(c-n)*e+1;return-Nd+d*u},s=c=>{const d=Math.exp(-c*e),u=(n-c)*(e*e);return d*u});const a=5/e,l=Z5(i,s,a);if(e=rr(e),isNaN(l))return{stiffness:et.stiffness,damping:et.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const X5=12;function Z5(e,t,n){let r=n;for(let i=1;i<X5;i++)r=r-e(r)/t(r);return r}function Rp(e,t){return e*Math.sqrt(1-t*t)}const J5=["duration","bounce"],e3=["stiffness","damping","mass"];function wy(e,t){return t.some(n=>e[n]!==void 0)}function t3(e){let t={velocity:et.velocity,stiffness:et.stiffness,damping:et.damping,mass:et.mass,isResolvedFromDuration:!1,...e};if(!wy(e,e3)&&wy(e,J5))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*jr(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:et.mass,stiffness:i,damping:s}}else{const n=K5(e);t={...t,...n,mass:et.mass},t.isResolvedFromDuration=!0}return t}function Wc(e=et.visualDuration,t=et.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:p,isResolvedFromDuration:h}=t3({...n,velocity:-ir(n.velocity||0)}),y=p||0,x=c/(2*Math.sqrt(l*d)),w=o-s,m=ir(Math.sqrt(l/d)),g=Math.abs(w)<5;r||(r=g?et.restSpeed.granular:et.restSpeed.default),i||(i=g?et.restDelta.granular:et.restDelta.default);let b;if(x<1){const S=Rp(m,x);b=_=>{const j=Math.exp(-x*m*_);return o-j*((y+x*m*w)/S*Math.sin(S*_)+w*Math.cos(S*_))}}else if(x===1)b=S=>o-Math.exp(-m*S)*(w+(y+m*w)*S);else{const S=m*Math.sqrt(x*x-1);b=_=>{const j=Math.exp(-x*m*_),A=Math.min(S*_,300);return o-j*((y+x*m*w)*Math.sinh(A)+S*w*Math.cosh(A))/S}}const C={calculatedDuration:h&&u||null,next:S=>{const _=b(S);if(h)a.done=S>=u;else{let j=0;x<1&&(j=S===0?rr(y):Rk(b,S,_));const A=Math.abs(j)<=r,E=Math.abs(o-_)<=i;a.done=A&&E}return a.value=a.done?o:_,a},toString:()=>{const S=Math.min(km(C),Vc),_=Mb(j=>C.next(S*j).value,S,30);return S+"ms "+_},toTransition:()=>{}};return C}Wc.applyToOptions=e=>{const t=JA(e,100,Wc);return e.ease=La()?t.ease:"easeOut",e.duration=rr(t.duration),e.type="keyframes",e};function by({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],p={done:!1,value:u},h=A=>a!==void 0&&A<a||l!==void 0&&A>l,y=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let x=n*t;const w=u+x,m=o===void 0?w:o(w);m!==w&&(x=m-u);const g=A=>-x*Math.exp(-A/r),b=A=>m+g(A),C=A=>{const E=g(A),L=b(A);p.done=Math.abs(E)<=c,p.value=p.done?m:L};let S,_;const j=A=>{h(p.value)&&(S=A,_=Wc({keyframes:[p.value,y(p.value)],velocity:Rk(b,A,p.value),damping:i,stiffness:s,restDelta:c,restSpeed:d}))};return j(0),{calculatedDuration:null,next:A=>{let E=!1;return!_&&S===void 0&&(E=!0,C(A),j(A)),S!==void 0&&A>=S?_.next(A-S):(!E&&C(A),p)}}}const n3=sl(.42,0,1,1),r3=sl(0,0,.58,1),Pk=sl(.42,0,.58,1),i3=e=>Array.isArray(e)&&typeof e[0]!="number",ky={linear:Cn,easeIn:n3,easeInOut:Pk,easeOut:r3,circIn:Bm,circInOut:dk,circOut:uk,backIn:Fm,backInOut:lk,backOut:ak,anticipate:ck},Sy=e=>{if(xm(e)){vp(e.length===4);const[t,n,r,i]=e;return sl(t,n,r,i)}else if(typeof e=="string")return vp(ky[e]!==void 0),ky[e];return e};function s3(e,t,n){const r=[],i=n||jk,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]||Cn:t;a=ol(l,a)}r.push(a)}return r}function o3(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=s3(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 p=Ia(e[u],e[u+1],d);return a[u](p)};return n?d=>c(jr(e[0],e[s-1],d)):c}function a3(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Ia(0,t,r);e.push(Qe(n,1,i))}}function l3(e){const t=[0];return a3(t,e.length-1),t}function c3(e,t){return e.map(n=>n*t)}function u3(e,t){return e.map(()=>t||Pk).splice(0,e.length-1)}function qc({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=i3(r)?r.map(Sy):Sy(r),s={done:!1,value:t[0]},o=c3(n&&n.length===t.length?n:l3(t),e),a=o3(o,t,{ease:Array.isArray(i)?i:u3(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const d3=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Fe.update(t,!0),stop:()=>pi(t),now:()=>wt.isProcessing?wt.timestamp:sr.now()}},f3={decay:by,inertia:by,tween:qc,keyframes:qc,spring:Wc},p3=e=>e/100;class Hm extends Ek{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)||Vm,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=wm(n)?n:f3[n]||qc;let l,c;a!==qc&&typeof t[0]!="number"&&(l=ol(p3,jk(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=km(d));const{calculatedDuration:u}=d,p=u+i,h=p*(r+1)-i;return{generator:d,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:u,resolvedDuration:p,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:c,totalDuration:d,resolvedDuration:u}=r;if(this.startTime===null)return s.next(0);const{delay:p,repeat:h,repeatType:y,repeatDelay:x,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 m=this.currentTime-p*(this.speed>=0?1:-1),g=this.speed>=0?m<0:m>d;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let b=this.currentTime,C=s;if(h){const A=Math.min(this.currentTime,d)/u;let E=Math.floor(A),L=A%1;!L&&A>=1&&(L=1),L===1&&E--,E=Math.min(E,h+1),!!(E%2)&&(y==="reverse"?(L=1-L,x&&(L-=x/u)):y==="mirror"&&(C=o)),b=jr(0,1,L)*u}const S=g?{done:!1,value:l[0]}:C.next(b);a&&(S.value=a(S.value));let{done:_}=S;!g&&c!==null&&(_=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const j=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return j&&i!==void 0&&(S.value=Au(l,this.options,i)),w&&w(S.value),j&&this.finish(),S}get duration(){const{resolved:t}=this;return t?ir(t.calculatedDuration):0}get time(){return ir(this.currentTime)}set time(t){t=rr(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=ir(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=d3,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 h3=new Set(["opacity","clipPath","filter","transform"]),m3=vm(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Gc=10,g3=2e4;function v3(e){return wm(e.type)||e.type==="spring"||!Nb(e.ease)}function y3(e,t){const n=new Hm({...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<g3;)r=n.sample(s),i.push(r.value),s+=Gc;return{times:void 0,keyframes:i,duration:s-Gc,ease:"linear"}}const Mk={anticipate:ck,backInOut:lk,circInOut:dk};function x3(e){return e in Mk}class Cy extends Ek{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new Tk(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"&&La()&&x3(s)&&(s=Mk[s]),v3(this.options)){const{onComplete:u,onUpdate:p,motionValue:h,element:y,...x}=this.options,w=y3(t,x);t=w.keyframes,t.length===1&&(t[1]=t[0]),r=w.duration,i=w.times,s=w.ease,o="keyframes"}const d=ZA(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:s});return d.startTime=c??this.calcStartTime(),this.pendingTimeline?(Zv(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:u}=this.options;a.set(Au(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 ir(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return ir(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=rr(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 Cn;const{animation:r}=n;Zv(r,t)}return Cn}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:p,...h}=this.options,y=new Hm({...h,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),x=rr(this.time);c.setWithVelocity(y.sample(x-Gc).value,y.sample(x).value,Gc)}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 m3()&&r&&h3.has(r)&&(r!=="transform"||!c)&&!l&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const w3={type:"spring",stiffness:500,damping:25,restSpeed:10},b3=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),k3={type:"keyframes",duration:.8},S3={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},C3=(e,{keyframes:t})=>t.length>2?k3:ls.has(e)?e.startsWith("scale")?b3(t[1]):w3:S3;function _3({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 Wm=(e,t,n,r={},i,s)=>o=>{const a=bm(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-rr(l);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:p=>{t.set(p),a.onUpdate&&a.onUpdate(p)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};_3(a)||(d={...d,...C3(e,d)}),d.duration&&(d.duration=rr(d.duration)),d.repeatDelay&&(d.repeatDelay=rr(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 p=Au(d.keyframes,a);if(p!==void 0)return Fe.update(()=>{d.onUpdate(p),d.onComplete()}),new QA([])}return!s&&Cy.supports(d)?new Cy(d):new Hm(d)};function T3({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Ok(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),p=a[d];if(p===void 0||c&&T3(c,d))continue;const h={delay:n,...bm(s||{},d)};let y=!1;if(window.MotionHandoffAnimation){const w=rk(e);if(w){const m=window.MotionHandoffAnimation(w,d,Fe);m!==null&&(h.startTime=m,y=!0)}}bp(e,d),u.start(Wm(d,u,p,e.shouldReduceMotion&&nk.has(d)?{type:!1}:h,e,y));const x=u.animation;x&&l.push(x)}return o&&Promise.all(l).then(()=>{Fe.update(()=>{o&&n5(e,o)})}),l}function Pp(e,t,n={}){var l;const r=Va(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(Ok(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:u,staggerDirection:p}=i;return E3(e,t,d+c,u,p,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 E3(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(A3).forEach((c,d)=>{c.notify("AnimationStart",t),o.push(Pp(c,t,{...s,delay:n+l(d)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(o)}function A3(e,t){return e.sortNodePosition(t)}function j3(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Pp(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Pp(e,t,n);else{const i=typeof t=="function"?Va(e,t,n.custom):t;r=Promise.all(Ok(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Nk(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 R3=Tm.length;function Dk(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Dk(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<R3;n++){const r=Tm[n],i=e.props[r];(Ba(i)||i===!1)&&(t[r]=i)}return t}const P3=[..._m].reverse(),M3=_m.length;function O3(e){return t=>Promise.all(t.map(({animation:n,options:r})=>j3(e,n,r)))}function N3(e){let t=O3(e),n=_y(),r=!0;const i=l=>(c,d)=>{var p;const u=Va(e,d,l==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(u){const{transition:h,transitionEnd:y,...x}=u;c={...c,...x,...y}}return c};function s(l){t=l(e)}function o(l){const{props:c}=e,d=Dk(e.parent)||{},u=[],p=new Set;let h={},y=1/0;for(let w=0;w<M3;w++){const m=P3[w],g=n[m],b=c[m]!==void 0?c[m]:d[m],C=Ba(b),S=m===l?g.isActive:null;S===!1&&(y=w);let _=b===d[m]&&b!==c[m]&&C;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),g.protectedKeys={...h},!g.isActive&&S===null||!b&&!g.prevProp||Tu(b)||typeof b=="boolean")continue;const j=D3(g.prevProp,b);let A=j||m===l&&g.isActive&&!_&&C||w>y&&C,E=!1;const L=Array.isArray(b)?b:[b];let F=L.reduce(i(m),{});S===!1&&(F={});const{prevResolvedValues:D={}}=g,G={...D,...F},z=M=>{A=!0,p.has(M)&&(E=!0,p.delete(M)),g.needsAnimating[M]=!0;const P=e.getValue(M);P&&(P.liveStyle=!1)};for(const M in G){const P=F[M],B=D[M];if(h.hasOwnProperty(M))continue;let U=!1;wp(P)&&wp(B)?U=!Nk(P,B):U=P!==B,U?P!=null?z(M):p.add(M):P!==void 0&&p.has(M)?z(M):g.protectedKeys[M]=!0}g.prevProp=b,g.prevResolvedValues=F,g.isActive&&(h={...h,...F}),r&&e.blockInitialAnimation&&(A=!1),A&&(!(_&&j)||E)&&u.push(...L.map(M=>({animation:M,options:{type:m}})))}if(p.size){const w={};if(typeof c.initial!="boolean"){const m=Va(e,Array.isArray(c.initial)?c.initial[0]:c.initial);m&&m.transition&&(w.transition=m.transition)}p.forEach(m=>{const g=e.getBaseTarget(m),b=e.getValue(m);b&&(b.liveStyle=!0),w[m]=g??null}),u.push({animation:w})}let x=!!u.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,x?t(u):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)==null||u.forEach(p=>{var h;return(h=p.animationState)==null?void 0:h.setActive(l,c)}),n[l].isActive=c;const d=o(l);for(const p in n)n[p].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=_y(),r=!0}}}function D3(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Nk(t,e):!1}function Ci(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function _y(){return{animate:Ci(!0),whileInView:Ci(),whileHover:Ci(),whileTap:Ci(),whileDrag:Ci(),whileFocus:Ci(),exit:Ci()}}class wi{constructor(t){this.isMounted=!1,this.node=t}update(){}}class I3 extends wi{constructor(t){super(t),t.animationState||(t.animationState=N3(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Tu(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 L3=0;class F3 extends wi{constructor(){super(...arguments),this.id=L3++}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 B3={animation:{Feature:I3},exit:{Feature:F3}};function Ha(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function al(e){return{point:{x:e.pageX,y:e.pageY}}}const $3=e=>t=>Cm(t)&&e(t,al(t));function ua(e,t,n,r){return Ha(e,t,$3(n),r)}function Ik({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function z3({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function V3(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 Lk=1e-4,U3=1-Lk,H3=1+Lk,Fk=.01,W3=0-Fk,q3=0+Fk;function Dt(e){return e.max-e.min}function G3(e,t,n){return Math.abs(e-t)<=n}function Ty(e,t,n,r=.5){e.origin=r,e.originPoint=Qe(t.min,t.max,e.origin),e.scale=Dt(n)/Dt(t),e.translate=Qe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=U3&&e.scale<=H3||isNaN(e.scale))&&(e.scale=1),(e.translate>=W3&&e.translate<=q3||isNaN(e.translate))&&(e.translate=0)}function da(e,t,n,r){Ty(e.x,t.x,n.x,r?r.originX:void 0),Ty(e.y,t.y,n.y,r?r.originY:void 0)}function Ey(e,t,n){e.min=n.min+t.min,e.max=e.min+Dt(t)}function Y3(e,t,n){Ey(e.x,t.x,n.x),Ey(e.y,t.y,n.y)}function Ay(e,t,n){e.min=t.min-n.min,e.max=e.min+Dt(t)}function fa(e,t,n){Ay(e.x,t.x,n.x),Ay(e.y,t.y,n.y)}const jy=()=>({translate:0,scale:1,origin:0,originPoint:0}),Is=()=>({x:jy(),y:jy()}),Ry=()=>({min:0,max:0}),nt=()=>({x:Ry(),y:Ry()});function mn(e){return[e("x"),e("y")]}function Dd(e){return e===void 0||e===1}function Mp({scale:e,scaleX:t,scaleY:n}){return!Dd(e)||!Dd(t)||!Dd(n)}function Ai(e){return Mp(e)||Bk(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Bk(e){return Py(e.x)||Py(e.y)}function Py(e){return e&&e!=="0%"}function Yc(e,t,n){const r=e-n,i=t*r;return n+i}function My(e,t,n,r,i){return i!==void 0&&(e=Yc(e,i,r)),Yc(e,n,r)+t}function Op(e,t=0,n=1,r,i){e.min=My(e.min,t,n,r,i),e.max=My(e.max,t,n,r,i)}function $k(e,{x:t,y:n}){Op(e.x,t.translate,t.scale,t.originPoint),Op(e.y,n.translate,n.scale,n.originPoint)}const Oy=.999999999999,Ny=1.0000000000001;function Q3(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,$k(e,o)),r&&Ai(s.latestValues)&&Fs(e,s.latestValues))}t.x<Ny&&t.x>Oy&&(t.x=1),t.y<Ny&&t.y>Oy&&(t.y=1)}function Ls(e,t){e.min=e.min+t,e.max=e.max+t}function Dy(e,t,n,r,i=.5){const s=Qe(e.min,e.max,i);Op(e,t,n,s,r)}function Fs(e,t){Dy(e.x,t.x,t.scaleX,t.scale,t.originX),Dy(e.y,t.y,t.scaleY,t.scale,t.originY)}function zk(e,t){return Ik(V3(e.getBoundingClientRect(),t))}function K3(e,t,n){const r=zk(e,n),{scroll:i}=t;return i&&(Ls(r.x,i.offset.x),Ls(r.y,i.offset.y)),r}const Vk=({current:e})=>e?e.ownerDocument.defaultView:null,Iy=(e,t)=>Math.abs(e-t);function X3(e,t){const n=Iy(e.x,t.x),r=Iy(e.y,t.y);return Math.sqrt(n**2+r**2)}class Uk{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),p=this.startEvent!==null,h=X3(u.offset,{x:0,y:0})>=3;if(!p&&!h)return;const{point:y}=u,{timestamp:x}=wt;this.history.push({...y,timestamp:x});const{onStart:w,onMove:m}=this.handlers;p||(w&&w(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,u)},this.handlePointerMove=(u,p)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=Id(p,this.transformPagePoint),Fe.update(this.updatePoint,!0)},this.handlePointerUp=(u,p)=>{this.end();const{onEnd:h,onSessionEnd:y,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=Ld(u.type==="pointercancel"?this.lastMoveEventInfo:Id(p,this.transformPagePoint),this.history);this.startEvent&&h&&h(u,w),y&&y(u,w)},!Cm(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=al(t),a=Id(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=wt;this.history=[{...l,timestamp:c}];const{onSessionStart:d}=n;d&&d(t,Ld(a,this.history)),this.removeListeners=ol(ua(this.contextWindow,"pointermove",this.handlePointerMove),ua(this.contextWindow,"pointerup",this.handlePointerUp),ua(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),pi(this.updatePoint)}}function Id(e,t){return t?{point:t(e.point)}:e}function Ly(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ld({point:e},t){return{point:e,delta:Ly(e,Hk(t)),offset:Ly(e,Z3(t)),velocity:J3(t,.1)}}function Z3(e){return e[0]}function Hk(e){return e[e.length-1]}function J3(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Hk(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>rr(t)));)n--;if(!r)return{x:0,y:0};const s=ir(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 eR(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Qe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Qe(n,e,r.max):Math.min(e,n)),e}function Fy(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function tR(e,{top:t,left:n,bottom:r,right:i}){return{x:Fy(e.x,n,i),y:Fy(e.y,t,r)}}function By(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 nR(e,t){return{x:By(e.x,t.x),y:By(e.y,t.y)}}function rR(e,t){let n=.5;const r=Dt(e),i=Dt(t);return i>r?n=Ia(t.min,t.max-r,e.min):r>i&&(n=Ia(e.min,e.max-i,t.min)),jr(0,1,n)}function iR(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 Np=.35;function sR(e=Np){return e===!1?e=0:e===!0&&(e=Np),{x:$y(e,"left","right"),y:$y(e,"top","bottom")}}function $y(e,t,n){return{min:zy(e,t),max:zy(e,n)}}function zy(e,t){return typeof e=="number"?e:e[t]||0}const oR=new WeakMap;class aR{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=nt(),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(al(d).point)},s=(d,u)=>{const{drag:p,dragPropagation:h,onDragStart:y}=this.getProps();if(p&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=rj(p),!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),mn(w=>{let m=this.getAxisMotionValue(w).get()||0;if(or.test(m)){const{projection:g}=this.visualElement;if(g&&g.layout){const b=g.layout.layoutBox[w];b&&(m=Dt(b)*(parseFloat(m)/100))}}this.originPoint[w]=m}),y&&Fe.postRender(()=>y(d,u)),bp(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},o=(d,u)=>{const{dragPropagation:p,dragDirectionLock:h,onDirectionLock:y,onDrag:x}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:w}=u;if(h&&this.currentDirection===null){this.currentDirection=lR(w),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",u.point,w),this.updateAxis("y",u.point,w),this.visualElement.render(),x&&x(d,u)},a=(d,u)=>this.stop(d,u),l=()=>mn(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 Uk(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Vk(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&&Fe.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||!Ll(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=eR(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&&Ns(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=tR(r.layoutBox,t):this.constraints=!1,this.elastic=sR(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&mn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=iR(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ns(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=K3(r,i.root,this.visualElement.getTransformPagePoint());let o=nR(i.layout.layoutBox,s);if(n){const a=n(z3(o));this.hasMutatedConstraints=!!a,a&&(o=Ik(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=mn(d=>{if(!Ll(d,n,this.currentDirection))return;let u=l&&l[d]||{};o&&(u={min:0,max:0});const p=i?200:1e6,h=i?40:1e7,y={type:"inertia",velocity:r?t[d]:0,bounceStiffness:p,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...u};return this.startAxisValueAnimation(d,y)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return bp(this.visualElement,t),r.start(Wm(t,r,0,n,this.visualElement,!1))}stopAnimation(){mn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){mn(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){mn(n=>{const{drag:r}=this.getProps();if(!Ll(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]-Qe(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Ns(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};mn(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=rR({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(),mn(o=>{if(!Ll(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(Qe(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;oR.set(this.visualElement,this);const t=this.visualElement.current,n=ua(t,"pointerdown",l=>{const{drag:c,dragListener:d=!0}=this.getProps();c&&d&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Ns(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()),Fe.read(r);const o=Ha(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(mn(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=Np,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Ll(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function lR(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class cR extends wi{constructor(t){super(t),this.removeGroupControls=Cn,this.removeListeners=Cn,this.controls=new aR(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Cn}unmount(){this.removeGroupControls(),this.removeListeners()}}const Vy=e=>(t,n)=>{e&&Fe.postRender(()=>e(t,n))};class uR extends wi{constructor(){super(...arguments),this.removePointerDownListener=Cn}onPointerDown(t){this.session=new Uk(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Vk(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Vy(t),onStart:Vy(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&Fe.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=ua(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 oc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Uy(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Vo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ge.test(e))e=parseFloat(e);else return e;const n=Uy(e,t.target.x),r=Uy(e,t.target.y);return`${n}% ${r}%`}},dR={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=hi.parse(e);if(i.length>5)return r;const s=hi.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=Qe(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 fR extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;Rj(pR),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()})),oc.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()||Fe.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 Wk(e){const[t,n]=Rb(),r=v.useContext(fm);return f.jsx(fR,{...e,layoutGroup:r,switchLayoutGroup:v.useContext(Ub),isPresent:t,safeToRemove:n})}const pR={borderRadius:{...Vo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Vo,borderTopRightRadius:Vo,borderBottomLeftRadius:Vo,borderBottomRightRadius:Vo,boxShadow:dR};function hR(e,t,n){const r=jt(e)?e:Fa(e);return r.start(Wm("",r,t,n)),r.animation}function mR(e){return e instanceof SVGElement&&e.tagName!=="svg"}const gR=(e,t)=>e.depth-t.depth;class vR{constructor(){this.children=[],this.isDirty=!1}add(t){mm(this.children,t),this.isDirty=!0}remove(t){gm(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(gR),this.isDirty=!1,this.children.forEach(t)}}function yR(e,t){const n=sr.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(pi(r),e(s-t))};return Fe.read(r,!0),()=>pi(r)}const qk=["TopLeft","TopRight","BottomLeft","BottomRight"],xR=qk.length,Hy=e=>typeof e=="string"?parseFloat(e):e,Wy=e=>typeof e=="number"||ge.test(e);function wR(e,t,n,r,i,s){i?(e.opacity=Qe(0,n.opacity??1,bR(r)),e.opacityExit=Qe(t.opacity??1,0,kR(r))):s&&(e.opacity=Qe(t.opacity??1,n.opacity??1,r));for(let o=0;o<xR;o++){const a=`border${qk[o]}Radius`;let l=qy(t,a),c=qy(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Wy(l)===Wy(c)?(e[a]=Math.max(Qe(Hy(l),Hy(c),r),0),(or.test(c)||or.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Qe(t.rotate||0,n.rotate||0,r))}function qy(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const bR=Gk(0,.5,uk),kR=Gk(.5,.95,Cn);function Gk(e,t,n){return r=>r<e?0:r>t?1:n(Ia(e,t,r))}function Gy(e,t){e.min=t.min,e.max=t.max}function pn(e,t){Gy(e.x,t.x),Gy(e.y,t.y)}function Yy(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Qy(e,t,n,r,i){return e-=t,e=Yc(e,1/n,r),i!==void 0&&(e=Yc(e,1/i,r)),e}function SR(e,t=0,n=1,r=.5,i,s=e,o=e){if(or.test(t)&&(t=parseFloat(t),t=Qe(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=Qe(s.min,s.max,r);e===s&&(a-=t),e.min=Qy(e.min,t,n,a,i),e.max=Qy(e.max,t,n,a,i)}function Ky(e,t,[n,r,i],s,o){SR(e,t[n],t[r],t[i],t.scale,s,o)}const CR=["x","scaleX","originX"],_R=["y","scaleY","originY"];function Xy(e,t,n,r){Ky(e.x,t,CR,n?n.x:void 0,r?r.x:void 0),Ky(e.y,t,_R,n?n.y:void 0,r?r.y:void 0)}function Zy(e){return e.translate===0&&e.scale===1}function Yk(e){return Zy(e.x)&&Zy(e.y)}function Jy(e,t){return e.min===t.min&&e.max===t.max}function TR(e,t){return Jy(e.x,t.x)&&Jy(e.y,t.y)}function e0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Qk(e,t){return e0(e.x,t.x)&&e0(e.y,t.y)}function t0(e){return Dt(e.x)/Dt(e.y)}function n0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class ER{constructor(){this.members=[]}add(t){mm(this.members,t),t.scheduleRender()}remove(t){if(gm(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 AR(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:p,skewX:h,skewY:y}=n;c&&(r=`perspective(${c}px) ${r}`),d&&(r+=`rotate(${d}deg) `),u&&(r+=`rotateX(${u}deg) `),p&&(r+=`rotateY(${p}deg) `),h&&(r+=`skewX(${h}deg) `),y&&(r+=`skewY(${y}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 Fd=["","X","Y","Z"],jR={visibility:"hidden"},r0=1e3;let RR=0;function Bd(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Kk(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=rk(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Fe,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Kk(r)}function Xk({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=RR++,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(OR),this.nodes.forEach(FR),this.nodes.forEach(BR),this.nodes.forEach(NR)},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 vR)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new ym),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=mR(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 p=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=yR(p,250),oc.hasAnimatedSinceResize&&(oc.hasAnimatedSinceResize=!1,this.nodes.forEach(s0))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:p,hasRelativeLayoutChanged:h,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||d.getDefaultTransition()||HR,{onLayoutAnimationStart:w,onLayoutAnimationComplete:m}=d.getProps(),g=!this.targetLayout||!Qk(this.targetLayout,y),b=!p&&h;if(this.options.layoutRoot||this.resumeFrom||b||p&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(u,b);const C={...bm(x,"layout"),onPlay:w,onComplete:m};(d.shouldReduceMotion||this.options.layoutRoot)&&(C.delay=0,C.type=!1),this.startAnimation(C)}else p||s0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}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,pi(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($R),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&&Kk(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(i0);return}this.isUpdating||this.nodes.forEach(IR),this.isUpdating=!1,this.nodes.forEach(LR),this.nodes.forEach(PR),this.nodes.forEach(MR),this.clearAllSnapshots();const a=sr.now();wt.delta=jr(0,1e3/60,a-wt.timestamp),wt.timestamp=a,wt.isProcessing=!0,jd.update.process(wt),jd.preRender.process(wt),jd.render.process(wt),wt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Sm.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(DR),this.sharedNodes.forEach(zR)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Fe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Fe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Dt(this.snapshot.measuredBox.x)&&!Dt(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=nt(),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&&!Yk(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,d=c!==this.prevTransformTemplateValue;o&&(a||Ai(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)),WR(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:o}=this.options;if(!o)return nt();const a=o.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(qR))){const{scroll:d}=this.root;d&&(Ls(a.x,d.offset.x),Ls(a.y,d.offset.y))}return a}removeElementScroll(o){var l;const a=nt();if(pn(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:p}=d;d!==this.root&&u&&p.layoutScroll&&(u.wasRoot&&pn(a,o),Ls(a.x,u.offset.x),Ls(a.y,u.offset.y))}return a}applyTransform(o,a=!1){const l=nt();pn(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&&Fs(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Ai(d.latestValues)&&Fs(l,d.latestValues)}return Ai(this.latestValues)&&Fs(l,this.latestValues),l}removeTransform(o){const a=nt();pn(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Ai(c.latestValues))continue;Mp(c.latestValues)&&c.updateSnapshot();const d=nt(),u=c.measurePageBox();pn(d,u),Xy(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,d)}return Ai(this.latestValues)&&Xy(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!==wt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var p;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||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:u}=this.options;if(!(!this.layout||!(d||u))){if(this.resolvedRelativeTargetAt=wt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=nt(),this.relativeTargetOrigin=nt(),fa(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),pn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=nt(),this.targetWithTransforms=nt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Y3(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):pn(this.target,this.layout.layoutBox),$k(this.target,this.targetDelta)):pn(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=nt(),this.relativeTargetOrigin=nt(),fa(this.relativeTargetOrigin,this.target,h.target),pn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Mp(this.parent.latestValues)||Bk(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 y;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===wt.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;pn(this.layoutCorrected,this.layout.layoutBox);const u=this.treeScale.x,p=this.treeScale.y;Q3(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=nt());const{target:h}=o;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Yy(this.prevProjectionDelta.x,this.projectionDelta.x),Yy(this.prevProjectionDelta.y,this.projectionDelta.y)),da(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==u||this.treeScale.y!==p||!n0(this.projectionDelta.x,this.prevProjectionDelta.x)||!n0(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=Is(),this.projectionDelta=Is(),this.projectionDeltaWithTransform=Is()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},d={...this.latestValues},u=Is();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const p=nt(),h=l?l.source:void 0,y=this.layout?this.layout.source:void 0,x=h!==y,w=this.getStack(),m=!w||w.members.length<=1,g=!!(x&&!m&&this.options.crossfade===!0&&!this.path.some(UR));this.animationProgress=0;let b;this.mixTargetDelta=C=>{const S=C/1e3;o0(u.x,o.x,S),o0(u.y,o.y,S),this.setTargetDelta(u),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(fa(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),VR(this.relativeTarget,this.relativeTargetOrigin,p,S),b&&TR(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=nt()),pn(b,this.relativeTarget)),x&&(this.animationValues=d,wR(d,c,this.latestValues,S,g,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(pi(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Fe.update(()=>{oc.hasAnimatedSinceResize=!0,this.currentAnimation=hR(0,r0,{...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(r0),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&&Zk(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||nt();const u=Dt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const p=Dt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+p}pn(a,l),Fs(a,d),da(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new ER),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&&Bd("z",o,c,this.animationValues);for(let d=0;d<Fd.length;d++)Bd(`rotate${Fd[d]}`,o,c,this.animationValues),Bd(`skew${Fd[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 jR;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=sc(o==null?void 0:o.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){const h={};return this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=sc(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Ai(this.latestValues)&&(h.transform=l?l({},""):"none",this.hasProjected=!1),h}const d=c.animationValues||c.latestValues;this.applyTransformsToTarget(),a.transform=AR(this.projectionDeltaWithTransform,this.treeScale,d),l&&(a.transform=l(d,a.transform));const{x:u,y:p}=this.projectionDelta;a.transformOrigin=`${u.origin*100}% ${p.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 h in $a){if(d[h]===void 0)continue;const{correct:y,applyTo:x,isCSSVariable:w}=$a[h],m=a.transform==="none"?d[h]:y(d[h],c);if(x){const g=x.length;for(let b=0;b<g;b++)a[x[b]]=m}else w?this.options.visualElement.renderState.vars[h]=m:a[h]=m}return this.options.layoutId&&(a.pointerEvents=c===this?sc(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(i0),this.root.sharedNodes.clear()}}}function PR(e){e.updateLayout()}function MR(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"?mn(u=>{const p=o?t.measuredBox[u]:t.layoutBox[u],h=Dt(p);p.min=r[u].min,p.max=p.min+h}):Zk(s,t.layoutBox,r)&&mn(u=>{const p=o?t.measuredBox[u]:t.layoutBox[u],h=Dt(r[u]);p.max=p.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+h)});const a=Is();da(a,r,t.layoutBox);const l=Is();o?da(l,e.applyTransform(i,!0),t.measuredBox):da(l,r,t.layoutBox);const c=!Yk(a);let d=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:p,layout:h}=u;if(p&&h){const y=nt();fa(y,t.layoutBox,p.layoutBox);const x=nt();fa(x,r,h.layoutBox),Qk(y,x)||(d=!0),u.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=y,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 OR(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 NR(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function DR(e){e.clearSnapshot()}function i0(e){e.clearMeasurements()}function IR(e){e.isLayoutDirty=!1}function LR(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function s0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function FR(e){e.resolveTargetDelta()}function BR(e){e.calcProjection()}function $R(e){e.resetSkewAndRotation()}function zR(e){e.removeLeadSnapshot()}function o0(e,t,n){e.translate=Qe(t.translate,0,n),e.scale=Qe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function a0(e,t,n,r){e.min=Qe(t.min,n.min,r),e.max=Qe(t.max,n.max,r)}function VR(e,t,n,r){a0(e.x,t.x,n.x,r),a0(e.y,t.y,n.y,r)}function UR(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const HR={duration:.45,ease:[.4,0,.1,1]},l0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),c0=l0("applewebkit/")&&!l0("chrome/")?Math.round:Cn;function u0(e){e.min=c0(e.min),e.max=c0(e.max)}function WR(e){u0(e.x),u0(e.y)}function Zk(e,t,n){return e==="position"||e==="preserve-aspect"&&!G3(t0(t),t0(n),.2)}function qR(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const GR=Xk({attachResizeListener:(e,t)=>Ha(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),$d={current:void 0},Jk=Xk({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!$d.current){const e=new GR({});e.mount(window),e.setOptions({layoutScroll:!0}),$d.current=e}return $d.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),YR={pan:{Feature:uR},drag:{Feature:cR,ProjectionNode:Jk,MeasureLayout:Wk}};function d0(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&&Fe.postRender(()=>s(t,al(t)))}class QR extends wi{mount(){const{current:t}=this.node;t&&(this.unmount=sj(t,(n,r)=>(d0(this.node,r,"Start"),i=>d0(this.node,i,"End"))))}unmount(){}}class KR extends wi{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=ol(Ha(this.node.current,"focus",()=>this.onFocus()),Ha(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function f0(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&&Fe.postRender(()=>s(t,al(t)))}class XR extends wi{mount(){const{current:t}=this.node;t&&(this.unmount=cj(t,(n,r)=>(f0(this.node,r,"Start"),(i,{success:s})=>f0(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Dp=new WeakMap,zd=new WeakMap,ZR=e=>{const t=Dp.get(e.target);t&&t(e)},JR=e=>{e.forEach(ZR)};function eP({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(JR,{root:e,...t})),r[i]}function tP(e,t,n){const r=eP(t);return Dp.set(e,n),r.observe(e),()=>{Dp.delete(e),r.unobserve(e)}}const nP={some:0,all:1};class rP extends wi{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:nP[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(),p=c?d:u;p&&p(l)};return tP(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(iP(t,n))&&this.startObserver()}unmount(){}}function iP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const sP={inView:{Feature:rP},tap:{Feature:XR},focus:{Feature:KR},hover:{Feature:QR}},oP={layout:{ProjectionNode:Jk,MeasureLayout:Wk}},Ip={current:null},eS={current:!1};function aP(){if(eS.current=!0,!!pm)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ip.current=e.matches;e.addListener(t),t()}else Ip.current=!1}const lP=[..._k,Et,hi],cP=e=>lP.find(Ck(e)),uP=new WeakMap;function dP(e,t,n){for(const r in t){const i=t[r],s=n[r];if(jt(i))e.addValue(r,i);else if(jt(s))e.addValue(r,Fa(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,Fa(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const p0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class fP{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=Vm,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=sr.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,Fe.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=Eu(n),this.isVariantNode=zb(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in p){const y=p[h];l[h]!==void 0&&jt(y)&&y.set(l[h],!1)}}mount(t){this.current=t,uP.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)),eS.current||aP(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ip.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),pi(this.notifyUpdate),pi(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=ls.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Fe.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 mo){const n=mo[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):nt()}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<p0.length;r++){const i=p0[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=dP(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=Fa(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"&&(kk(r)||fk(r))?r=parseFloat(r):!cP(r)&&hi.test(n)&&(r=xk(t,n)),this.setBaseTarget(t,jt(r)?r.get():r)),jt(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=Im(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&&!jt(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 ym),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class tS extends fP{constructor(){super(...arguments),this.KeyframeResolver=Tk}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;jt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function pP(e){return window.getComputedStyle(e)}class hP extends tS{constructor(){super(...arguments),this.type="html",this.renderInstance=Zb}readValueFromInstance(t,n){if(ls.has(n))return E5(t,n);{const r=pP(t),i=(Am(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return zk(t,n)}build(t,n,r){Pm(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Lm(t,n,r)}}class mP extends tS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=nt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Xb(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ls.has(n)){const r=yk(n);return r&&r.default||0}return n=Jb.has(n)?n:Em(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return tk(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&Fe.postRender(this.updateDimensions)}build(t,n,r){Nm(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){ek(t,n,r,i)}mount(t){this.isSVGTag=Dm(t.tagName),super.mount(t)}}const gP=(e,t)=>Om(e)?new mP(t):new hP(t,{allowProjection:e!==v.Fragment}),vP=e5({...B3,...sP,...YR,...oP},gP),Me=gj(vP);class yP{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 xP=()=>new yP;function wP(){return Su(xP)}var $r=(e=>(e.None="none",e.Sm="sm",e.Md="md",e.Lg="lg",e.Xl="xl",e.Full="full",e))($r||{});const nS=v.createContext({}),bP={[ne.TooltipDefault]:"Bizimle sohbet edin!",[ne.TooltipActive]:"Yeni mesajlar var!",[ne.CloseButtonAria]:"Kapat",[ne.MessagePlaceholder]:"Mesajınızı yazın",[ne.FileUploadDisabled]:"Dosya gönderim izniniz olmadığı için yükleyemezsiniz",[ne.NewMessagesNotification]:"Yeni mesajlar var!",[ne.ChatCloseConfirm]:"Sohbeti kapatmak istediğinizden emin misiniz?",[ne.ChatCloseWarning]:"Bu işlem geri alınamaz.",[ne.ChatSettings]:"Sohbet Ayarları",[ne.ChatEndConversation]:"Sohbeti Sonlandır",[ne.CancelAction]:"Vazgeç",[ne.CloseAction]:"Kapat",[ne.QuickActions]:"Hızlı işlemler",[ne.GreetingStartChat]:"Sohbete başla",[ne.RateLimitMessage]:"Çok fazla mesaj gönderdiniz. Lütfen {seconds} saniye bekleyin.",[ne.RatingHeaderEvaluate]:"Görüşmenizi Değerlendirin",[ne.RatingHeaderThanks]:"Teşekkürler!",[ne.RatingDescription]:"Lütfen hizmetimizi değerlendirin. Görüşleriniz bizim için önemli.",[ne.RatingRateConversation]:"Görüşmeyi puanlayın",[ne.RatingComment]:"Yorumunuz (İsteğe bağlı)",[ne.RatingCommentPlaceholder]:"Görüşme hakkında düşüncelerinizi paylaşın...",[ne.RatingSubmit]:"Değerlendirmeyi Gönder",[ne.RatingNewConversation]:"Yeni Görüşme Başlat",[ne.RatingThankYouTitle]:"Değerlendirmeniz için teşekkürler!",[ne.RatingThankYouDescription]:"Geri bildiriminiz bizim için çok değerli.",[ne.RatingCountdown]:"Ekran {seconds} saniye içinde kapanacaktır.",[ne.RatingMinimumError]:"Lütfen en az 1 yıldız seçiniz.",[ne.RatingYourScore]:"Puanınız: {score}",[ne.PoweredBy]:"Powered by",[ne.NotificationSoundOn]:"Bildirim sesi aç",[ne.NotificationSoundOff]:"Bildirim sesi kapat"},kP={[k.Background]:"#ffffff",[k.Border]:"#e2e8f0",[k.TooltipText]:"#1e40af",[k.TooltipBackground]:"#dbeafe",[k.TooltipBorder]:"#3b82f6",[k.HeaderBackground]:"#ffffff",[k.HeaderBorder]:"#e2e8f0",[k.HeaderText]:"#1e293b",[k.FooterBackground]:"#f8fafc",[k.FooterBorder]:"#e2e8f0",[k.FooterText]:"#475569",[k.MessageAdminBackground]:"#f1f5f9",[k.MessageAdminText]:"#334155",[k.MessageVisitorBackground]:"#3b82f6",[k.MessageVisitorText]:"#ffffff",[k.MessageAgentBackground]:"#ede9fe",[k.MessageAgentText]:"#5b21b6",[k.GreeterBackground]:"#ffffff",[k.GreeterText]:"#334155",[k.GreeterBorder]:"#e2e8f0",[k.GreeterTopBackground]:"linear-gradient(135deg, #3b82f6 0%, #2563eb 100%)",[k.GreeterTopText]:"#ffffff",[k.GreeterButtonBackground]:"#3b82f6",[k.GreeterButtonText]:"#ffffff",[k.ButtonBackground]:"#3b82f6",[k.ButtonText]:"#ffffff",[k.InputBackground]:"#f8fafc",[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]:"#f59e0b",[k.StarInactiveColor]:"#e2e8f0",[k.ModalOverlayColor]:"rgba(0, 0, 0, 0.4)",[k.ChatCloseConfirmText]:"#dc2626",[k.RatingHeaderBackground]:"#3b82f6",[k.RatingHeaderText]:"#ffffff",[k.RatingSuccessBackground]:"#ffffff",[k.RatingSuccessText]:"#334155",[k.RatingRateConversationText]:"#1e293b"},SP={[k.Background]:"#0a0a0a",[k.Border]:"#262626",[k.TooltipText]:"#e5e5e5",[k.TooltipBackground]:"#262626",[k.TooltipBorder]:"#404040",[k.HeaderBackground]:"#171717",[k.HeaderBorder]:"#262626",[k.HeaderText]:"#fafafa",[k.FooterBackground]:"#0a0a0a",[k.FooterBorder]:"#262626",[k.FooterText]:"#a3a3a3",[k.MessageAdminBackground]:"#262626",[k.MessageAdminText]:"#e5e5e5",[k.MessageVisitorBackground]:"#171717",[k.MessageVisitorText]:"#e5e5e5",[k.MessageAgentBackground]:"#5b21b6",[k.MessageAgentText]:"#e9d5ff",[k.GreeterBackground]:"#171717",[k.GreeterText]:"#e5e5e5",[k.GreeterBorder]:"#262626",[k.GreeterTopBackground]:"linear-gradient(135deg, #262626 0%, #171717 100%)",[k.GreeterTopText]:"#fafafa",[k.GreeterButtonBackground]:"#3b82f6",[k.GreeterButtonText]:"#ffffff",[k.ButtonBackground]:"#3b82f6",[k.ButtonText]:"#ffffff",[k.InputBackground]:"#171717",[k.InputText]:"#e5e5e5",[k.InputBorder]:"#3f3f3f",[k.CloseButtonBackground]:"#262626",[k.CloseButtonText]:"#a3a3a3",[k.CloseButtonHover]:"#404040",[k.IconColor]:"#a3a3a3",[k.IconBackground]:"transparent",[k.ErrorBackground]:"#450a0a",[k.ErrorText]:"#fca5a5",[k.ErrorBorder]:"#7f1d1d",[k.SuccessBackground]:"#052e16",[k.SuccessText]:"#86efac",[k.SuccessBorder]:"#14532d",[k.WarningBackground]:"#451a03",[k.WarningText]:"#fcd34d",[k.WarningBorder]:"#78350f",[k.LinkColor]:"#3b82f6",[k.LinkHoverColor]:"#60a5fa",[k.DividerColor]:"#262626",[k.ShadowColor]:"rgba(0, 0, 0, 0.4)",[k.StarActiveColor]:"#f59e0b",[k.StarInactiveColor]:"#404040",[k.ModalOverlayColor]:"rgba(0, 0, 0, 0.7)",[k.ChatCloseConfirmText]:"#fca5a5",[k.RatingHeaderBackground]:"#171717",[k.RatingHeaderText]:"#fafafa",[k.RatingSuccessBackground]:"#171717",[k.RatingSuccessText]:"#e5e5e5",[k.RatingRateConversationText]:"#e5e5e5"},CP={[$r.None]:"0px",[$r.Sm]:"var(--radius-sm)",[$r.Md]:"var(--radius-md)",[$r.Lg]:"var(--radius-lg)",[$r.Xl]:"var(--radius-lg)",[$r.Full]:"calc(infinity * 1px)"},_P=e=>{const t={...bP};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};function TP(e,t){const n=e.replace(/^#/,"");if(n.length!==6)return e;const r=Math.max(0,Math.round(Number.parseInt(n.slice(0,2),16)*(1-t))),i=Math.max(0,Math.round(Number.parseInt(n.slice(2,4),16)*(1-t))),s=Math.max(0,Math.round(Number.parseInt(n.slice(4,6),16)*(1-t)));return`#${r.toString(16).padStart(2,"0")}${i.toString(16).padStart(2,"0")}${s.toString(16).padStart(2,"0")}`}const Vd="#ffffff";function EP(e){const t=TP(e,.2);return{[k.ButtonBackground]:t,[k.ButtonText]:Vd,[k.GreeterButtonBackground]:t,[k.GreeterButtonText]:Vd,[k.MessageVisitorBackground]:t,[k.MessageVisitorText]:Vd}}const AP=(e,t)=>{var i,s;const r={...t==="dark"?SP:kP};if(t==="dark")return r;if((s=(i=e==null?void 0:e.appearance)==null?void 0:i.design)!=null&&s.colors){const o=e.appearance.design.colors,a=o.main_color;if(a){const l=EP(a);for(const c of Object.keys(l))l[c]&&(r[c]=l[c])}for(const l in o){if(l==="main_color"||l==="secondary_color"||l==="accent_color")continue;const c=l;o[l]&&l in r&&(r[c]=o[l])}}return r},rS="lc:theme:mode";function jP(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function RP(){try{const e=localStorage.getItem(rS);if(e==="light"||e==="dark"||e==="system")return e}catch{}return De.System}function PP({children:e,widget:t}){const[n,r]=v.useState(RP),[i,s]=v.useState(jP);v.useEffect(()=>{const y=window.matchMedia("(prefers-color-scheme: dark)"),x=w=>{s(w.matches?"dark":"light")};return y.addEventListener("change",x),()=>y.removeEventListener("change",x)},[]);const o=n===De.System?i:n,a=v.useCallback(y=>{r(y);try{localStorage.setItem(rS,y)}catch{}},[]),l=AP(t,o),c=_P(t),d=t&&t.appearance&&t.appearance.design&&t.appearance.design.border_radius?t.appearance.design.border_radius:$r.Md,u=y=>l[y],p=y=>c[y],h=()=>CP[d];return f.jsx(nS.Provider,{value:{colors:l,texts:c,getColor:u,getText:p,getRadius:h,mode:n,resolvedMode:o,setMode:a},children:e})}const Se=()=>v.useContext(nS),cs=()=>Se().getText;function Rt({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=k.ButtonText,bgKey:d=k.ButtonBackground,animations:u={},withoutTheming:p,...h}){const y=Se();return f.jsx(Me.button,{type:t,className:Ve("flex items-center justify-center focus:outline-none focus:ring-2 focus:ring-offset-0 font-medium transition-opacity",{"rounded-full":o&&i!=="xs","rounded-lg":!o,"opacity-50 cursor-not-allowed":s,"hover:opacity-90 active:opacity-95":!s},a,Qv[n]&&Qv[n][r],VA[i][o?"rounded":"default"]),disabled:s,style:{transition:"all 0.2s ease",...!p&&{color:y.getColor(c),backgroundColor:y.getColor(d),...o?{}:{borderRadius:y.getRadius()}},...l},...u,...h,children:e})}function X(){}X.Home=function(t){return f.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:f.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"})})};X.Chat=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.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"})});X.Menu=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})});X.MessageTyping=({className:e="size-5",...t})=>f.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:f.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"})});X.Check=function(t){return f.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",height:"1em",width:"1em",...t,children:f.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"})})};X.Website=function(t){return f.jsxs("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:[f.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"}),f.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"}),f.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"})]})};X.ArrowDown=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"})});X.ArrowDown2=e=>f.jsxs("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",...e,children:[f.jsx("g",{id:"SVGRepo_bgCarrier",strokeWidth:1.5}),f.jsx("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5}),f.jsx("g",{id:"SVGRepo_iconCarrier",children:f.jsx("path",{d:"M903.232 256l56.768 50.432L512 768 64 306.432 120.768 256 512 659.072z",fill:"currentColor"})})]});X.ArrowLeft=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"})});X.XCircle=({className:e="e-5",...t})=>f.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:f.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"})});X.X=({className:e="e-5",...t})=>f.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:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})});X.PaperAirplane=({className:e="e-5",...t})=>f.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:f.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"})});X.Spin=function(t){return f.jsx("svg",{"data-name":"Layer 1",viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:f.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"})})};X.ExternalLink=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.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"})});X.Phone=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.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"})});X.Mail=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.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"})});X.Star=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.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"})});X.Plus=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})});X.History=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})});X.Eye=e=>f.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:[f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"}),f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]});X.Lock=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 10.5V6.75a4.5 4.5 0 119 0v3.75M3.75 21.75h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H3.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z"})});X.User=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z"})});X.Emoji=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.182 15.182a4.5 4.5 0 0 1-6.364 0M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0ZM9.75 9.75c0 .414-.168.75-.375.75S9 10.164 9 9.75 9.168 9 9.375 9s.375.336.375.75Zm-.375 0h.008v.015h-.008V9.75Zm5.625 0c0 .414-.168.75-.375.75s-.375-.336-.375-.75.168-.75.375-.75.375.336.375.75Zm-.375 0h.008v.015h-.008V9.75Z"})});X.Paperclip=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m18.375 12.739-7.693 7.693a4.5 4.5 0 0 1-6.364-6.364l10.94-10.94A3 3 0 1 1 19.5 7.372L8.552 18.32m.009-.01-.01.01m5.699-9.941-7.81 7.81a1.5 1.5 0 0 0 2.112 2.13"})});X.Sparkles=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.455 2.456L21.75 6l-1.036.259a3.375 3.375 0 0 0-2.455 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"})});X.Sun=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75v-2.25m-4.773 4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"})});X.Moon=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"})});X.Monitor=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 17.25v1.007a3 3 0 0 1-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0 1 15 18.257V17.25m6-12V15a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 15V5.25m18 0A2.25 2.25 0 0 0 18.75 3H5.25A2.25 2.25 0 0 0 3 5.25m18 0V12a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 12V5.25"})});X.Volume2=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.114 5.636a9 9 0 0 1 0 12.728M16.463 8.288a5.25 5.25 0 0 1 0 7.424M6.75 8.25l4.72-4.72a.75.75 0 0 1 1.28.53v15.88a.75.75 0 0 1-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.01 9.01 0 0 1 2.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75Z"})});X.VolumeX=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.25 9.75 19.5 12m0 0 2.25 2.25M19.5 12l2.25-2.25M19.5 12l-2.25 2.25m-10.5-6 4.72-4.72a.75.75 0 0 1 1.28.53v15.88a.75.75 0 0 1-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.01 9.01 0 0 1 2.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75Z"})});X.Bot=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 3v1.5M4.5 8.25H3m18 0h-1.5M4.5 12H3m18 0h-1.5m-15 3.75H3m18 0h-1.5M8.25 19.5V21M12 3v1.5m0 15V21m3.75-18v1.5m0 15V21m-9-1.5h10.5a2.25 2.25 0 0 0 2.25-2.25V6.75a2.25 2.25 0 0 0-2.25-2.25H6.75A2.25 2.25 0 0 0 4.5 6.75v10.5a2.25 2.25 0 0 0 2.25 2.25Zm.75-12h9v9h-9v-9Z"})});function Lp(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}var st=(e=>(e.CustomerToken="lc:customer:token",e.CustomerRefreshToken="lc:customer:refresh_token",e.DeviceId="lc:device:id",e.AIAgentMode="lc:agent:mode",e.AIAgent="lc:agent:data",e.AIAgentSessionId="lc:agent:session",e.HumanNeedRequested="lc:agent:human_need",e))(st||{});const Fn=(e,t,n)=>{let r=e;["lc:customer:token","lc:customer:refresh_token"].includes(e)&&(r=`${n}:${e}`),localStorage.setItem(r,t)},Zo=(e,t)=>{let n=e;return["lc:customer:token","lc:customer:refresh_token"].includes(e)&&(n=`${t}:${e}`),localStorage.getItem(n)},pa=e=>{localStorage.removeItem(`${e}:lc:customer:token`),localStorage.removeItem(`${e}:lc:customer:refresh_token`),qm(e)},iS=e=>{localStorage.removeItem(`${e}:lc:customer:token`),localStorage.removeItem(`${e}:lc:customer:refresh_token`)},Fl=(e,t,n,r,i)=>{const s=`${e}:`;t&&(n||i)?(localStorage.setItem(`${s}lc:agent:mode`,"true"),localStorage.setItem(`${s}lc:agent:data`,JSON.stringify(t)),r&&localStorage.setItem(`${s}lc:agent:session`,r),i!==void 0&&(i?localStorage.setItem(`${s}lc:agent:human_need`,"true"):localStorage.removeItem(`${s}lc:agent:human_need`))):qm(e)},mr=e=>{const t=`${e}:`,n=localStorage.getItem(`${t}lc:agent:mode`)==="true",r=localStorage.getItem(`${t}lc:agent:data`),i=localStorage.getItem(`${t}lc:agent:session`),s=localStorage.getItem(`${t}lc:agent:human_need`)==="true";let o=null;if(r)try{o=JSON.parse(r)}catch{o=null}return{isAgentMode:n,agent:o,sessionId:i,humanNeedRequested:s}},qm=e=>{const t=`${e}:`;localStorage.removeItem(`${t}lc:agent:mode`),localStorage.removeItem(`${t}lc:agent:data`),localStorage.removeItem(`${t}lc:agent:session`),localStorage.removeItem(`${t}lc:agent:human_need`)},mi=e=>{const t=`${e}:lc:device:id`;let n=localStorage.getItem(t);return n||(n=Lp(),localStorage.setItem(t,n)),n},MP={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},h0=e=>{let t;const n=new Set,r=(d,u)=>{const p=typeof d=="function"?d(t):d;if(!Object.is(p,t)){const h=t;t=u??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(y=>y(t,h))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>c,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(MP?"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},OP=e=>e?h0(e):h0;var sS={exports:{}},oS={},aS={exports:{}},lS={};/**
70
+ `),()=>{document.head.removeChild(h)}},[t]),f.jsx(ej,{isPresent:t,childRef:i,sizeRef:s,children:g.cloneElement(e,{ref:i})})}const nj=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a})=>{const l=Eu(rj),c=g.useId();let d=!0,u=g.useMemo(()=>(d=!1,{id:c,initial:t,isPresent:n,custom:i,onExitComplete:p=>{l.set(p,!0);for(const h of l.values())if(!h)return;r&&r()},register:p=>(l.set(p,!1),()=>l.delete(p))}),[n,l,r]);return s&&d&&(u={...u}),g.useMemo(()=>{l.forEach((p,h)=>l.set(h,!1))},[n]),g.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(e=f.jsx(tj,{isPresent:n,anchorX:a,children:e})),f.jsx(Au.Provider,{value:u,children:e})};function rj(){return new Map}function zb(e=!0){const t=g.useContext(Au);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=g.useId();g.useEffect(()=>{if(e)return i(s)},[e]);const o=g.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const Fl=e=>e.key||"";function ry(e){const t=[];return g.Children.forEach(e,n=>{g.isValidElement(n)&&t.push(n)}),t}const Ar=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left"})=>{const[l,c]=zb(o),d=g.useMemo(()=>ry(e),[e]),u=o&&!l?[]:d.map(Fl),p=g.useRef(!0),h=g.useRef(d),y=Eu(()=>new Map),[w,b]=g.useState(d),[m,v]=g.useState(d);Bb(()=>{p.current=!1,h.current=d;for(let C=0;C<m.length;C++){const _=Fl(m[C]);u.includes(_)?y.delete(_):y.get(_)!==!0&&y.set(_,!1)}},[m,u.length,u.join("-")]);const x=[];if(d!==w){let C=[...d];for(let _=0;_<m.length;_++){const j=m[_],A=Fl(j);u.includes(A)||(C.splice(_,0,j),x.push(j))}return s==="wait"&&x.length&&(C=x),v(ry(C)),b(d),null}const{forceRender:S}=g.useContext(ym);return f.jsx(f.Fragment,{children:m.map(C=>{const _=Fl(C),j=o&&!l?!1:d===m||u.includes(_),A=()=>{if(y.has(_))y.set(_,!0);else return;let E=!0;y.forEach(D=>{D||(E=!1)}),E&&(S==null||S(),v(h.current),o&&(c==null||c()),r&&r())};return f.jsx(nj,{isPresent:j,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,onExitComplete:j?void 0:A,anchorX:a,children:C},_)})})};function bm(e,t){e.indexOf(t)===-1&&e.push(t)}function km(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let kp=()=>{};const Sp={skipAnimations:!1,useManualTiming:!1};function Sm(e){let t;return()=>(t===void 0&&(t=e()),t)}const Cn=e=>e,Ba=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Cm{constructor(){this.subscriptions=[]}add(t){return bm(this.subscriptions,t),()=>km(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 rr=e=>e*1e3,ir=e=>e/1e3;function Vb(e,t){return t?e*(1e3/t):0}const ij=Sm(()=>window.ScrollTimeline!==void 0);class sj{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(ij()&&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 oj extends sj{then(t,n){return this.finished.finally(t).then(()=>{})}}const iy={value:null,addProjectionMetrics:null},_m=e=>Array.isArray(e)&&typeof e[0]=="number",aj={};function lj(e,t){const n=Sm(e);return()=>aj[t]??n()}const za=lj(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ub=(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)})`},ea=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Cp={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ea([0,.65,.55,1]),circOut:ea([.55,0,1,.45]),backIn:ea([.31,.01,.66,-.59]),backOut:ea([.33,1.53,.69,.99])};function Hb(e,t){if(e)return typeof e=="function"&&za()?Ub(e,t):_m(e)?ea(e):Array.isArray(e)?e.map(n=>Hb(n,t)||Cp.easeOut):Cp[e]}function cj(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=Hb(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 Tm(e){return typeof e=="function"&&"applyToOptions"in e}function Em(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const qc=2e4;function Am(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<qc;)t+=n,r=e.next(t);return t>=qc?1/0:t}function uj(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Am(r),qc);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:ir(i)}}function Wb(e){return!!(typeof e=="function"&&za()||!e||typeof e=="string"&&(e in Cp||za())||_m(e)||Array.isArray(e)&&e.every(Wb))}function sy(e,t){e.timeline=t,e.onfinish=null}const $l=["read","resolveKeyframes","update","preRender","render","postRender"];function dj(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,p=!1,h=!1)=>{const w=h&&i?n:r;return p&&o.add(u),w.has(u)||w.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&&iy.value&&iy.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,d.process(u))}};return d}const fj=40;function qb(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=$l.reduce((m,v)=>(m[v]=dj(s,t?v:void 0),m),{}),{read:a,resolveKeyframes:l,update:c,preRender:d,render:u,postRender:p}=o,h=()=>{const m=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(m-i.timestamp,fj),1),i.timestamp=m,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),d.process(i),u.process(i),p.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},y=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:$l.reduce((m,v)=>{const x=o[v];return m[v]=(S,C=!1,_=!1)=>(n||y(),x.schedule(S,C,_)),m},{}),cancel:m=>{for(let v=0;v<$l.length;v++)o[$l[v]].cancel(m)},state:i,steps:o}}const{schedule:jm,cancel:l$}=qb(queueMicrotask,!1),{schedule:Be,cancel:hi,state:wt,steps:Nd}=qb(typeof requestAnimationFrame<"u"?requestAnimationFrame:Cn,!0);let lc;function pj(){lc=void 0}const sr={now:()=>(lc===void 0&&sr.set(wt.isProcessing||Sp.useManualTiming?wt.timestamp:performance.now()),lc),set:e=>{lc=e,queueMicrotask(pj)}},Pn={x:!1,y:!1};function Gb(){return Pn.x||Pn.y}function hj(e){return e==="x"||e==="y"?Pn[e]?null:(Pn[e]=!0,()=>{Pn[e]=!1}):Pn.x||Pn.y?null:(Pn.x=Pn.y=!0,()=>{Pn.x=Pn.y=!1})}function mj(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 Yb(e,t){const n=mj(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function oy(e){return!(e.pointerType==="touch"||Gb())}function gj(e,t,n={}){const[r,i,s]=Yb(e,n),o=a=>{if(!oy(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const d=u=>{oy(u)&&(c(u),l.removeEventListener("pointerleave",d))};l.addEventListener("pointerleave",d,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const Qb=(e,t)=>t?e===t?!0:Qb(e,t.parentElement):!1,Rm=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,vj=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function yj(e){return vj.has(e.tagName)||e.tabIndex!==-1}const ta=new WeakSet;function ay(e){return t=>{t.key==="Enter"&&e(t)}}function Od(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const xj=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=ay(()=>{if(ta.has(n))return;Od(n,"down");const i=ay(()=>{Od(n,"up")}),s=()=>Od(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 ly(e){return Rm(e)&&!Gb()}function wj(e,t,n={}){const[r,i,s]=Yb(e,n),o=a=>{const l=a.currentTarget;if(!ly(a)||ta.has(l))return;ta.add(l);const c=t(l,a),d=(h,y)=>{window.removeEventListener("pointerup",u),window.removeEventListener("pointercancel",p),!(!ly(h)||!ta.has(l))&&(ta.delete(l),typeof c=="function"&&c(h,{success:y}))},u=h=>{d(h,l===window||l===document||n.useGlobalTarget||Qb(l,h.target))},p=h=>{d(h,!1)};window.addEventListener("pointerup",u,i),window.addEventListener("pointercancel",p,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a instanceof HTMLElement&&(a.addEventListener("focus",c=>xj(c,i)),!yj(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}const cy=30,bj=e=>!isNaN(parseFloat(e));class kj{constructor(t,n={}){this.version="12.7.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=sr.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=sr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=bj(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 Cm);const r=this.events[t].add(n);return t==="change"?()=>{r(),Be.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=sr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>cy)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,cy);return Vb(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 Va(e,t){return new kj(e,t)}const Kb=g.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"]},xo={};for(const e in uy)xo[e]={isEnabled:t=>uy[e].some(n=>!!t[n])};function Sj(e){for(const t in e)xo[t]={...xo[t],...e[t]}}const Cj=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 Gc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Cj.has(e)}let Xb=e=>!Gc(e);function _j(e){e&&(Xb=t=>t.startsWith("on")?!Gc(t):e(t))}try{_j(require("@emotion/is-prop-valid").default)}catch{}function Tj(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Xb(i)||n===!0&&Gc(i)||!t&&!Gc(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function Ej(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 ju=g.createContext({});function Ru(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ua(e){return typeof e=="string"||Array.isArray(e)}const Pm=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Mm=["initial",...Pm];function Pu(e){return Ru(e.animate)||Mm.some(t=>Ua(e[t]))}function Zb(e){return!!(Pu(e)||e.variants)}function Aj(e,t){if(Pu(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ua(n)?n:void 0,animate:Ua(r)?r:void 0}}return e.inherit!==!1?t:{}}function jj(e){const{initial:t,animate:n}=Aj(e,g.useContext(ju));return g.useMemo(()=>({initial:t,animate:n}),[dy(t),dy(n)])}function dy(e){return Array.isArray(e)?e.join(" "):e}const Rj=Symbol.for("motionComponentSymbol");function Ds(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Pj(e,t,n){return g.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Ds(n)&&(n.current=r))},[t])}const Nm=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Mj="framerAppearId",Jb="data-"+Nm(Mj),ek=g.createContext({});function Nj(e,t,n,r,i){var w,b;const{visualElement:s}=g.useContext(ju),o=g.useContext(Kb),a=g.useContext(Au),l=g.useContext(wm).reducedMotion,c=g.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=g.useContext(ek);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&Oj(c.current,n,i,u);const p=g.useRef(!1);g.useInsertionEffect(()=>{d&&p.current&&d.update(n,a)});const h=n[Jb],y=g.useRef(!!h&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,h))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,h)));return Bb(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),jm.render(d.render),y.current&&d.animationState&&d.animationState.animateChanges())}),g.useEffect(()=>{d&&(!y.current&&d.animationState&&d.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var m;(m=window.MotionHandoffMarkAsComplete)==null||m.call(window,h)}),y.current=!1))}),d}function Oj(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:tk(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&Ds(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:c})}function tk(e){if(e)return e.options.allowProjection!==!1?e.projection:tk(e.parent)}function Dj({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&Sj(e);function s(a,l){let c;const d={...g.useContext(wm),...a,layoutId:Ij(a)},{isStatic:u}=d,p=jj(a),h=r(a,u);if(!u&&xm){Lj();const y=Fj(d);c=y.MeasureLayout,p.visualElement=Nj(i,h,d,t,y.ProjectionNode)}return f.jsxs(ju.Provider,{value:p,children:[c&&p.visualElement?f.jsx(c,{visualElement:p.visualElement,...d}):null,n(i,a,Pj(h,p.visualElement,l),h,u,p.visualElement)]})}s.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=g.forwardRef(s);return o[Rj]=i,o}function Ij({layoutId:e}){const t=g.useContext(ym).id;return t&&e!==void 0?t+"-"+e:e}function Lj(e,t){g.useContext(Kb).strict}function Fj(e){const{drag:t,layout:n}=xo;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 nk=e=>t=>typeof t=="string"&&t.startsWith(e),Om=nk("--"),$j=nk("var(--"),Dm=e=>$j(e)?Bj.test(e.split("/*")[0].trim()):!1,Bj=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ha={};function zj(e){for(const t in e)Ha[t]=e[t],Om(t)&&(Ha[t].isCSSVariable=!0)}const Po=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],cs=new Set(Po);function rk(e,{layout:t,layoutId:n}){return cs.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Ha[e]||e==="opacity")}const jt=e=>!!(e&&e.getVelocity),ik=(e,t)=>t&&typeof e=="number"?t.transform(e):e,jr=(e,t,n)=>n>t?t:n<e?e:n,Mo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Wa={...Mo,transform:e=>jr(0,1,e)},Bl={...Mo,default:1},ll=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Fr=ll("deg"),or=ll("%"),he=ll("px"),Vj=ll("vh"),Uj=ll("vw"),fy={...or,parse:e=>or.parse(e)/100,transform:e=>or.transform(e*100)},Hj={borderWidth:he,borderTopWidth:he,borderRightWidth:he,borderBottomWidth:he,borderLeftWidth:he,borderRadius:he,radius:he,borderTopLeftRadius:he,borderTopRightRadius:he,borderBottomRightRadius:he,borderBottomLeftRadius:he,width:he,maxWidth:he,height:he,maxHeight:he,top:he,right:he,bottom:he,left:he,padding:he,paddingTop:he,paddingRight:he,paddingBottom:he,paddingLeft:he,margin:he,marginTop:he,marginRight:he,marginBottom:he,marginLeft:he,backgroundPositionX:he,backgroundPositionY:he},Wj={rotate:Fr,rotateX:Fr,rotateY:Fr,rotateZ:Fr,scale:Bl,scaleX:Bl,scaleY:Bl,scaleZ:Bl,skew:Fr,skewX:Fr,skewY:Fr,distance:he,translateX:he,translateY:he,translateZ:he,x:he,y:he,z:he,perspective:he,transformPerspective:he,opacity:Wa,originX:fy,originY:fy,originZ:he},py={...Mo,transform:Math.round},Im={...Hj,...Wj,zIndex:py,size:he,fillOpacity:Wa,strokeOpacity:Wa,numOctaves:py},qj={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Gj=Po.length;function Yj(e,t,n){let r="",i=!0;for(let s=0;s<Gj;s++){const o=Po[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=ik(a,Im[o]);if(!l){i=!1;const d=qj[o]||o;r+=`${d}(${c}) `}n&&(t[o]=c)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Lm(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(cs.has(l)){o=!0;continue}else if(Om(l)){i[l]=c;continue}else{const d=ik(c,Im[l]);l.startsWith("origin")?(a=!0,s[l]=d):r[l]=d}}if(t.transform||(o||n?r.transform=Yj(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 Fm=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function sk(e,t,n){for(const r in t)!jt(t[r])&&!rk(r,n)&&(e[r]=t[r])}function Qj({transformTemplate:e},t){return g.useMemo(()=>{const n=Fm();return Lm(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Kj(e,t){const n=e.style||{},r={};return sk(r,n,e),Object.assign(r,Qj(e,t)),r}function Xj(e,t){const n={},r=Kj(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 Zj=["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 $m(e){return typeof e!="string"||e.includes("-")?!1:!!(Zj.indexOf(e)>-1||/[A-Z]/u.test(e))}const Jj={offset:"stroke-dashoffset",array:"stroke-dasharray"},e5={offset:"strokeDashoffset",array:"strokeDasharray"};function t5(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?Jj:e5;e[s.offset]=he.transform(-r);const o=he.transform(t),a=he.transform(n);e[s.array]=`${o} ${a}`}function hy(e,t,n){return typeof e=="string"?e:he.transform(t+n*e)}function n5(e,t,n){const r=hy(t,e.x,e.width),i=hy(n,e.y,e.height);return`${r} ${i}`}function Bm(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},d,u){if(Lm(e,c,u),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:h,dimensions:y}=e;p.transform&&(y&&(h.transform=p.transform),delete p.transform),y&&(i!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=n5(y,i!==void 0?i:.5,s!==void 0?s:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),o!==void 0&&t5(p,o,a,l,!1)}const ok=()=>({...Fm(),attrs:{}}),zm=e=>typeof e=="string"&&e.toLowerCase()==="svg";function r5(e,t,n,r){const i=g.useMemo(()=>{const s=ok();return Bm(s,t,zm(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};sk(s,e.style,e),i.style={...s,...i.style}}return i}function i5(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=($m(n)?r5:Xj)(r,s,o,n),c=Tj(r,typeof n=="string",e),d=n!==g.Fragment?{...c,...l,ref:i}:{},{children:u}=r,p=g.useMemo(()=>jt(u)?u.get():u,[u]);return g.createElement(n,{...d,children:p})}}function my(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Vm(e,t,n,r){if(typeof t=="function"){const[i,s]=my(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]=my(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const _p=e=>Array.isArray(e),s5=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),o5=e=>_p(e)?e[e.length-1]||0:e;function cc(e){const t=jt(e)?e.get():e;return s5(t)?t.toValue():t}function a5({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,s){const o={latestValues:l5(r,i,s,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const ak=e=>(t,n)=>{const r=g.useContext(ju),i=g.useContext(Au),s=()=>a5(e,t,r,i);return n?s():Eu(s)};function l5(e,t,n,r){const i={},s=r(e,{});for(const p in s)i[p]=cc(s[p]);let{initial:o,animate:a}=e;const l=Pu(e),c=Zb(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"&&!Ru(u)){const p=Array.isArray(u)?u:[u];for(let h=0;h<p.length;h++){const y=Vm(e,p[h]);if(y){const{transitionEnd:w,transition:b,...m}=y;for(const v in m){let x=m[v];if(Array.isArray(x)){const S=d?x.length-1:0;x=x[S]}x!==null&&(i[v]=x)}for(const v in w)i[v]=w[v]}}}return i}function Um(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(jt(r[o])||t.style&&jt(t.style[o])||rk(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const c5={useVisualState:ak({scrapeMotionValuesFromProps:Um,createRenderState:Fm})};function lk(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 ck(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 uk=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 dk(e,t,n,r){ck(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(uk.has(i)?i:Nm(i),t.attrs[i])}function fk(e,t,n){const r=Um(e,t,n);for(const i in e)if(jt(e[i])||jt(t[i])){const s=Po.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const gy=["x","y","width","height","cx","cy","r"],u5={useVisualState:ak({scrapeMotionValuesFromProps:fk,createRenderState:ok,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(cs.has(a)){s=!0;break}}if(!s)return;let o=!t;if(t)for(let a=0;a<gy.length;a++){const l=gy[a];e[l]!==t[l]&&(o=!0)}o&&Be.read(()=>{lk(n,r),Be.render(()=>{Bm(r,i,zm(n.tagName),e.transformTemplate),dk(n,r)})})}})};function d5(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...$m(r)?u5:c5,preloadedFeatures:e,useRender:i5(i),createVisualElement:t,Component:r};return Dj(o)}}function qa(e,t,n){const r=e.getProps();return Vm(r,t,n!==void 0?n:r.custom,e)}const pk=new Set(["width","height","top","left","right","bottom",...Po]);function f5(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Va(n))}function p5(e,t){const n=qa(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=o5(s[o]);f5(e,o,a)}}function h5(e){return!!(jt(e)&&e.add)}function Tp(e,t){const n=e.getValue("willChange");if(h5(n))return n.add(t);if(!n&&Sp.WillChange){const r=new Sp.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function hk(e){return e.props[Jb]}const mk=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,m5=1e-7,g5=12;function v5(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=mk(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>m5&&++a<g5);return o}function cl(e,t,n,r){if(e===t&&n===r)return Cn;const i=s=>v5(s,0,1,e,n);return s=>s===0||s===1?s:mk(i(s),t,r)}const gk=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,vk=e=>t=>1-e(1-t),yk=cl(.33,1.53,.69,.99),Hm=vk(yk),xk=gk(Hm),wk=e=>(e*=2)<1?.5*Hm(e):.5*(2-Math.pow(2,-10*(e-1))),Wm=e=>1-Math.sin(Math.acos(e)),bk=vk(Wm),kk=gk(Wm),Sk=e=>/^0[^.\s]+$/u.test(e);function y5(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Sk(e):!0}const ha=e=>Math.round(e*1e5)/1e5,qm=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function x5(e){return e==null}const w5=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Gm=(e,t)=>n=>!!(typeof n=="string"&&w5.test(n)&&n.startsWith(e)||t&&!x5(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ck=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(qm);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},b5=e=>jr(0,255,e),Dd={...Mo,transform:e=>Math.round(b5(e))},Oi={test:Gm("rgb","red"),parse:Ck("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Dd.transform(e)+", "+Dd.transform(t)+", "+Dd.transform(n)+", "+ha(Wa.transform(r))+")"};function k5(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 Ep={test:Gm("#"),parse:k5,transform:Oi.transform},Is={test:Gm("hsl","hue"),parse:Ck("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+or.transform(ha(t))+", "+or.transform(ha(n))+", "+ha(Wa.transform(r))+")"},Et={test:e=>Oi.test(e)||Ep.test(e)||Is.test(e),parse:e=>Oi.test(e)?Oi.parse(e):Is.test(e)?Is.parse(e):Ep.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Oi.transform(e):Is.transform(e)},S5=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function C5(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(qm))==null?void 0:t.length)||0)+(((n=e.match(S5))==null?void 0:n.length)||0)>0}const _k="number",Tk="color",_5="var",T5="var(",vy="${}",E5=/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 Ga(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(E5,l=>(Et.test(l)?(r.color.push(s),i.push(Tk),n.push(Et.parse(l))):l.startsWith(T5)?(r.var.push(s),i.push(_5),n.push(l)):(r.number.push(s),i.push(_k),n.push(parseFloat(l))),++s,vy)).split(vy);return{values:n,split:a,indexes:r,types:i}}function Ek(e){return Ga(e).values}function Ak(e){const{split:t,types:n}=Ga(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===_k?s+=ha(i[o]):a===Tk?s+=Et.transform(i[o]):s+=i[o]}return s}}const A5=e=>typeof e=="number"?0:e;function j5(e){const t=Ek(e);return Ak(e)(t.map(A5))}const mi={test:C5,parse:Ek,createTransformer:Ak,getAnimatableNone:j5},R5=new Set(["brightness","contrast","saturate","opacity"]);function P5(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(qm)||[];if(!r)return e;const i=n.replace(r,"");let s=R5.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const M5=/\b([a-z-]*)\(.*?\)/gu,Ap={...mi,getAnimatableNone:e=>{const t=e.match(M5);return t?t.map(P5).join(" "):e}},N5={...Im,color:Et,backgroundColor:Et,outlineColor:Et,fill:Et,stroke:Et,borderColor:Et,borderTopColor:Et,borderRightColor:Et,borderBottomColor:Et,borderLeftColor:Et,filter:Ap,WebkitFilter:Ap},jk=e=>N5[e];function Rk(e,t){let n=jk(e);return n!==Ap&&(n=mi),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const O5=new Set(["auto","none","0"]);function D5(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!O5.has(s)&&Ga(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=Rk(n,i)}const Di=e=>e*180/Math.PI,jp=e=>{const t=Di(Math.atan2(e[1],e[0]));return Rp(t)},I5={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:jp,rotateZ:jp,skewX:e=>Di(Math.atan(e[1])),skewY:e=>Di(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Rp=e=>(e=e%360,e<0&&(e+=360),e),yy=jp,xy=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),wy=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),L5={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:xy,scaleY:wy,scale:e=>(xy(e)+wy(e))/2,rotateX:e=>Rp(Di(Math.atan2(e[6],e[5]))),rotateY:e=>Rp(Di(Math.atan2(-e[2],e[0]))),rotateZ:yy,rotate:yy,skewX:e=>Di(Math.atan(e[4])),skewY:e=>Di(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function by(e){return e.includes("scale")?1:0}function Pp(e,t){if(!e||e==="none")return by(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=L5,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=I5,i=a}if(!i)return by(t);const s=r[t],o=i[1].split(",").map($5);return typeof s=="function"?s(o):o[s]}const F5=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Pp(n,t)};function $5(e){return parseFloat(e.trim())}const ky=e=>e===Mo||e===he,B5=new Set(["x","y","z"]),z5=Po.filter(e=>!B5.has(e));function V5(e){const t=[];return z5.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const wo={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})=>Pp(t,"x"),y:(e,{transform:t})=>Pp(t,"y")};wo.translateX=wo.x;wo.translateY=wo.y;const Gi=new Set;let Mp=!1,Np=!1;function Pk(){if(Np){const e=Array.from(Gi).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=V5(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)})}Np=!1,Mp=!1,Gi.forEach(e=>e.complete()),Gi.clear()}function Mk(){Gi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Np=!0)})}function U5(){Mk(),Pk()}class Ym{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?(Gi.add(this),Mp||(Mp=!0,Be.read(Mk),Be.resolveKeyframes(Pk))):(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),Gi.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Gi.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Nk=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),H5=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function W5(e){const t=H5.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function Ok(e,t,n=1){const[r,i]=W5(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return Nk(o)?parseFloat(o):o}return Dm(i)?Ok(i,t,n+1):i}const Dk=e=>t=>t.test(e),q5={test:e=>e==="auto",parse:e=>e},Ik=[Mo,he,or,Fr,Uj,Vj,q5],Sy=e=>Ik.find(Dk(e));class Lk extends Ym{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(),Dm(c))){const d=Ok(c,n.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!pk.has(r)||t.length!==2)return;const[i,s]=t,o=Sy(i),a=Sy(s);if(o!==a)if(ky(o)&&ky(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++)y5(t[i])&&r.push(i);r.length&&D5(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=wo[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]=wo[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 Cy=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(mi.test(e)||e==="0")&&!e.startsWith("url("));function G5(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 Y5(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=Cy(i,t),a=Cy(s,t);return!o||!a?!1:G5(e)||(n==="spring"||Tm(n))&&r}const Q5=e=>e!==null;function Mu(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(Q5),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const K5=40;class Fk{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=sr.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>K5?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&U5(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=sr.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!Y5(t,r,i,s))if(o)this.options.duration=0;else{l&&l(Mu(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 Ye=(e,t,n)=>e+(t-e)*n;function Id(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 X5({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=Id(l,a,e+1/3),s=Id(l,a,e),o=Id(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function Yc(e,t){return n=>n>0?t:e}const Ld=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Z5=[Ep,Oi,Is],J5=e=>Z5.find(t=>t.test(e));function _y(e){const t=J5(e);if(!t)return!1;let n=t.parse(e);return t===Is&&(n=X5(n)),n}const Ty=(e,t)=>{const n=_y(e),r=_y(t);if(!n||!r)return Yc(e,t);const i={...n};return s=>(i.red=Ld(n.red,r.red,s),i.green=Ld(n.green,r.green,s),i.blue=Ld(n.blue,r.blue,s),i.alpha=Ye(n.alpha,r.alpha,s),Oi.transform(i))},e3=(e,t)=>n=>t(e(n)),ul=(...e)=>e.reduce(e3),Op=new Set(["none","hidden"]);function t3(e,t){return Op.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function n3(e,t){return n=>Ye(e,t,n)}function Qm(e){return typeof e=="number"?n3:typeof e=="string"?Dm(e)?Yc:Et.test(e)?Ty:s3:Array.isArray(e)?$k:typeof e=="object"?Et.test(e)?Ty:r3:Yc}function $k(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>Qm(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function r3(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Qm(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function i3(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 s3=(e,t)=>{const n=mi.createTransformer(t),r=Ga(e),i=Ga(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?Op.has(e)&&!i.values.length||Op.has(t)&&!r.values.length?t3(e,t):ul($k(i3(r,i),i.values),n):Yc(e,t)};function Bk(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ye(e,t,n):Qm(e)(e,t)}const o3=5;function zk(e,t,n){const r=Math.max(t-o3,0);return Vb(n-e(r),t-r)}const Ze={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 a3({duration:e=Ze.duration,bounce:t=Ze.bounce,velocity:n=Ze.velocity,mass:r=Ze.mass}){let i,s,o=1-t;o=jr(Ze.minDamping,Ze.maxDamping,o),e=jr(Ze.minDuration,Ze.maxDuration,ir(e)),o<1?(i=c=>{const d=c*o,u=d*e,p=d-n,h=Dp(c,o),y=Math.exp(-u);return Fd-p/h*y},s=c=>{const u=c*o*e,p=u*n+n,h=Math.pow(o,2)*Math.pow(c,2)*e,y=Math.exp(-u),w=Dp(Math.pow(c,2),o);return(-i(c)+Fd>0?-1:1)*((p-h)*y)/w}):(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=c3(i,s,a);if(e=rr(e),isNaN(l))return{stiffness:Ze.stiffness,damping:Ze.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const l3=12;function c3(e,t,n){let r=n;for(let i=1;i<l3;i++)r=r-e(r)/t(r);return r}function Dp(e,t){return e*Math.sqrt(1-t*t)}const u3=["duration","bounce"],d3=["stiffness","damping","mass"];function Ey(e,t){return t.some(n=>e[n]!==void 0)}function f3(e){let t={velocity:Ze.velocity,stiffness:Ze.stiffness,damping:Ze.damping,mass:Ze.mass,isResolvedFromDuration:!1,...e};if(!Ey(e,d3)&&Ey(e,u3))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*jr(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Ze.mass,stiffness:i,damping:s}}else{const n=a3(e);t={...t,...n,mass:Ze.mass},t.isResolvedFromDuration=!0}return t}function Qc(e=Ze.visualDuration,t=Ze.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:p,isResolvedFromDuration:h}=f3({...n,velocity:-ir(n.velocity||0)}),y=p||0,w=c/(2*Math.sqrt(l*d)),b=o-s,m=ir(Math.sqrt(l/d)),v=Math.abs(b)<5;r||(r=v?Ze.restSpeed.granular:Ze.restSpeed.default),i||(i=v?Ze.restDelta.granular:Ze.restDelta.default);let x;if(w<1){const C=Dp(m,w);x=_=>{const j=Math.exp(-w*m*_);return o-j*((y+w*m*b)/C*Math.sin(C*_)+b*Math.cos(C*_))}}else if(w===1)x=C=>o-Math.exp(-m*C)*(b+(y+m*b)*C);else{const C=m*Math.sqrt(w*w-1);x=_=>{const j=Math.exp(-w*m*_),A=Math.min(C*_,300);return o-j*((y+w*m*b)*Math.sinh(A)+C*b*Math.cosh(A))/C}}const S={calculatedDuration:h&&u||null,next:C=>{const _=x(C);if(h)a.done=C>=u;else{let j=0;w<1&&(j=C===0?rr(y):zk(x,C,_));const A=Math.abs(j)<=r,E=Math.abs(o-_)<=i;a.done=A&&E}return a.value=a.done?o:_,a},toString:()=>{const C=Math.min(Am(S),qc),_=Ub(j=>S.next(C*j).value,C,30);return C+"ms "+_},toTransition:()=>{}};return S}Qc.applyToOptions=e=>{const t=uj(e,100,Qc);return e.ease=za()?t.ease:"easeOut",e.duration=rr(t.duration),e.type="keyframes",e};function Ay({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],p={done:!1,value:u},h=A=>a!==void 0&&A<a||l!==void 0&&A>l,y=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let w=n*t;const b=u+w,m=o===void 0?b:o(b);m!==b&&(w=m-u);const v=A=>-w*Math.exp(-A/r),x=A=>m+v(A),S=A=>{const E=v(A),D=x(A);p.done=Math.abs(E)<=c,p.value=p.done?m:D};let C,_;const j=A=>{h(p.value)&&(C=A,_=Qc({keyframes:[p.value,y(p.value)],velocity:zk(x,A,p.value),damping:i,stiffness:s,restDelta:c,restSpeed:d}))};return j(0),{calculatedDuration:null,next:A=>{let E=!1;return!_&&C===void 0&&(E=!0,S(A),j(A)),C!==void 0&&A>=C?_.next(A-C):(!E&&S(A),p)}}}const p3=cl(.42,0,1,1),h3=cl(0,0,.58,1),Vk=cl(.42,0,.58,1),m3=e=>Array.isArray(e)&&typeof e[0]!="number",jy={linear:Cn,easeIn:p3,easeInOut:Vk,easeOut:h3,circIn:Wm,circInOut:kk,circOut:bk,backIn:Hm,backInOut:xk,backOut:yk,anticipate:wk},Ry=e=>{if(_m(e)){kp(e.length===4);const[t,n,r,i]=e;return cl(t,n,r,i)}else if(typeof e=="string")return kp(jy[e]!==void 0),jy[e];return e};function g3(e,t,n){const r=[],i=n||Bk,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]||Cn:t;a=ul(l,a)}r.push(a)}return r}function v3(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(kp(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=g3(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 p=Ba(e[u],e[u+1],d);return a[u](p)};return n?d=>c(jr(e[0],e[s-1],d)):c}function y3(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Ba(0,t,r);e.push(Ye(n,1,i))}}function x3(e){const t=[0];return y3(t,e.length-1),t}function w3(e,t){return e.map(n=>n*t)}function b3(e,t){return e.map(()=>t||Vk).splice(0,e.length-1)}function Kc({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=m3(r)?r.map(Ry):Ry(r),s={done:!1,value:t[0]},o=w3(n&&n.length===t.length?n:x3(t),e),a=v3(o,t,{ease:Array.isArray(i)?i:b3(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const k3=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Be.update(t,!0),stop:()=>hi(t),now:()=>wt.isProcessing?wt.timestamp:sr.now()}},S3={decay:Ay,inertia:Ay,tween:Kc,keyframes:Kc,spring:Qc},C3=e=>e/100;class Km extends Fk{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)||Ym,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=Tm(n)?n:S3[n]||Kc;let l,c;a!==Kc&&typeof t[0]!="number"&&(l=ul(C3,Bk(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=Am(d));const{calculatedDuration:u}=d,p=u+i,h=p*(r+1)-i;return{generator:d,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:u,resolvedDuration:p,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:c,totalDuration:d,resolvedDuration:u}=r;if(this.startTime===null)return s.next(0);const{delay:p,repeat:h,repeatType:y,repeatDelay:w,onUpdate:b}=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 m=this.currentTime-p*(this.speed>=0?1:-1),v=this.speed>=0?m<0:m>d;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let x=this.currentTime,S=s;if(h){const A=Math.min(this.currentTime,d)/u;let E=Math.floor(A),D=A%1;!D&&A>=1&&(D=1),D===1&&E--,E=Math.min(E,h+1),!!(E%2)&&(y==="reverse"?(D=1-D,w&&(D-=w/u)):y==="mirror"&&(S=o)),x=jr(0,1,D)*u}const C=v?{done:!1,value:l[0]}:S.next(x);a&&(C.value=a(C.value));let{done:_}=C;!v&&c!==null&&(_=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const j=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return j&&i!==void 0&&(C.value=Mu(l,this.options,i)),b&&b(C.value),j&&this.finish(),C}get duration(){const{resolved:t}=this;return t?ir(t.calculatedDuration):0}get time(){return ir(this.currentTime)}set time(t){t=rr(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=ir(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=k3,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 _3=new Set(["opacity","clipPath","filter","transform"]),T3=Sm(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Xc=10,E3=2e4;function A3(e){return Tm(e.type)||e.type==="spring"||!Wb(e.ease)}function j3(e,t){const n=new Km({...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<E3;)r=n.sample(s),i.push(r.value),s+=Xc;return{times:void 0,keyframes:i,duration:s-Xc,ease:"linear"}}const Uk={anticipate:wk,backInOut:xk,circInOut:kk};function R3(e){return e in Uk}class Py extends Fk{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new Lk(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"&&za()&&R3(s)&&(s=Uk[s]),A3(this.options)){const{onComplete:u,onUpdate:p,motionValue:h,element:y,...w}=this.options,b=j3(t,w);t=b.keyframes,t.length===1&&(t[1]=t[0]),r=b.duration,i=b.times,s=b.ease,o="keyframes"}const d=cj(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:s});return d.startTime=c??this.calcStartTime(),this.pendingTimeline?(sy(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:u}=this.options;a.set(Mu(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 ir(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return ir(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=rr(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 Cn;const{animation:r}=n;sy(r,t)}return Cn}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:p,...h}=this.options,y=new Km({...h,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),w=rr(this.time);c.setWithVelocity(y.sample(w-Xc).value,y.sample(w).value,Xc)}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 T3()&&r&&_3.has(r)&&(r!=="transform"||!c)&&!l&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const P3={type:"spring",stiffness:500,damping:25,restSpeed:10},M3=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),N3={type:"keyframes",duration:.8},O3={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},D3=(e,{keyframes:t})=>t.length>2?N3:cs.has(e)?e.startsWith("scale")?M3(t[1]):P3:O3;function I3({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 Xm=(e,t,n,r={},i,s)=>o=>{const a=Em(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-rr(l);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:p=>{t.set(p),a.onUpdate&&a.onUpdate(p)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};I3(a)||(d={...d,...D3(e,d)}),d.duration&&(d.duration=rr(d.duration)),d.repeatDelay&&(d.repeatDelay=rr(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 p=Mu(d.keyframes,a);if(p!==void 0)return Be.update(()=>{d.onUpdate(p),d.onComplete()}),new oj([])}return!s&&Py.supports(d)?new Py(d):new Km(d)};function L3({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Hk(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),p=a[d];if(p===void 0||c&&L3(c,d))continue;const h={delay:n,...Em(s||{},d)};let y=!1;if(window.MotionHandoffAnimation){const b=hk(e);if(b){const m=window.MotionHandoffAnimation(b,d,Be);m!==null&&(h.startTime=m,y=!0)}}Tp(e,d),u.start(Xm(d,u,p,e.shouldReduceMotion&&pk.has(d)?{type:!1}:h,e,y));const w=u.animation;w&&l.push(w)}return o&&Promise.all(l).then(()=>{Be.update(()=>{o&&p5(e,o)})}),l}function Ip(e,t,n={}){var l;const r=qa(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(Hk(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:u,staggerDirection:p}=i;return F3(e,t,d+c,u,p,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 F3(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($3).forEach((c,d)=>{c.notify("AnimationStart",t),o.push(Ip(c,t,{...s,delay:n+l(d)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(o)}function $3(e,t){return e.sortNodePosition(t)}function B3(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Ip(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Ip(e,t,n);else{const i=typeof t=="function"?qa(e,t,n.custom):t;r=Promise.all(Hk(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Wk(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 z3=Mm.length;function qk(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?qk(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<z3;n++){const r=Mm[n],i=e.props[r];(Ua(i)||i===!1)&&(t[r]=i)}return t}const V3=[...Pm].reverse(),U3=Pm.length;function H3(e){return t=>Promise.all(t.map(({animation:n,options:r})=>B3(e,n,r)))}function W3(e){let t=H3(e),n=My(),r=!0;const i=l=>(c,d)=>{var p;const u=qa(e,d,l==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(u){const{transition:h,transitionEnd:y,...w}=u;c={...c,...w,...y}}return c};function s(l){t=l(e)}function o(l){const{props:c}=e,d=qk(e.parent)||{},u=[],p=new Set;let h={},y=1/0;for(let b=0;b<U3;b++){const m=V3[b],v=n[m],x=c[m]!==void 0?c[m]:d[m],S=Ua(x),C=m===l?v.isActive:null;C===!1&&(y=b);let _=x===d[m]&&x!==c[m]&&S;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),v.protectedKeys={...h},!v.isActive&&C===null||!x&&!v.prevProp||Ru(x)||typeof x=="boolean")continue;const j=q3(v.prevProp,x);let A=j||m===l&&v.isActive&&!_&&S||b>y&&S,E=!1;const D=Array.isArray(x)?x:[x];let L=D.reduce(i(m),{});C===!1&&(L={});const{prevResolvedValues:O={}}=v,q={...O,...L},$=N=>{A=!0,p.has(N)&&(E=!0,p.delete(N)),v.needsAnimating[N]=!0;const R=e.getValue(N);R&&(R.liveStyle=!1)};for(const N in q){const R=L[N],z=O[N];if(h.hasOwnProperty(N))continue;let H=!1;_p(R)&&_p(z)?H=!Wk(R,z):H=R!==z,H?R!=null?$(N):p.add(N):R!==void 0&&p.has(N)?$(N):v.protectedKeys[N]=!0}v.prevProp=x,v.prevResolvedValues=L,v.isActive&&(h={...h,...L}),r&&e.blockInitialAnimation&&(A=!1),A&&(!(_&&j)||E)&&u.push(...D.map(N=>({animation:N,options:{type:m}})))}if(p.size){const b={};if(typeof c.initial!="boolean"){const m=qa(e,Array.isArray(c.initial)?c.initial[0]:c.initial);m&&m.transition&&(b.transition=m.transition)}p.forEach(m=>{const v=e.getBaseTarget(m),x=e.getValue(m);x&&(x.liveStyle=!0),b[m]=v??null}),u.push({animation:b})}let w=!!u.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(w=!1),r=!1,w?t(u):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)==null||u.forEach(p=>{var h;return(h=p.animationState)==null?void 0:h.setActive(l,c)}),n[l].isActive=c;const d=o(l);for(const p in n)n[p].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=My(),r=!0}}}function q3(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Wk(t,e):!1}function Ci(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function My(){return{animate:Ci(!0),whileInView:Ci(),whileHover:Ci(),whileTap:Ci(),whileDrag:Ci(),whileFocus:Ci(),exit:Ci()}}class wi{constructor(t){this.isMounted=!1,this.node=t}update(){}}class G3 extends wi{constructor(t){super(t),t.animationState||(t.animationState=W3(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ru(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 Y3=0;class Q3 extends wi{constructor(){super(...arguments),this.id=Y3++}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 K3={animation:{Feature:G3},exit:{Feature:Q3}};function Ya(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function dl(e){return{point:{x:e.pageX,y:e.pageY}}}const X3=e=>t=>Rm(t)&&e(t,dl(t));function ma(e,t,n,r){return Ya(e,t,X3(n),r)}function Gk({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Z3({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function J3(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 Yk=1e-4,eR=1-Yk,tR=1+Yk,Qk=.01,nR=0-Qk,rR=0+Qk;function Dt(e){return e.max-e.min}function iR(e,t,n){return Math.abs(e-t)<=n}function Ny(e,t,n,r=.5){e.origin=r,e.originPoint=Ye(t.min,t.max,e.origin),e.scale=Dt(n)/Dt(t),e.translate=Ye(n.min,n.max,e.origin)-e.originPoint,(e.scale>=eR&&e.scale<=tR||isNaN(e.scale))&&(e.scale=1),(e.translate>=nR&&e.translate<=rR||isNaN(e.translate))&&(e.translate=0)}function ga(e,t,n,r){Ny(e.x,t.x,n.x,r?r.originX:void 0),Ny(e.y,t.y,n.y,r?r.originY:void 0)}function Oy(e,t,n){e.min=n.min+t.min,e.max=e.min+Dt(t)}function sR(e,t,n){Oy(e.x,t.x,n.x),Oy(e.y,t.y,n.y)}function Dy(e,t,n){e.min=t.min-n.min,e.max=e.min+Dt(t)}function va(e,t,n){Dy(e.x,t.x,n.x),Dy(e.y,t.y,n.y)}const Iy=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ls=()=>({x:Iy(),y:Iy()}),Ly=()=>({min:0,max:0}),et=()=>({x:Ly(),y:Ly()});function mn(e){return[e("x"),e("y")]}function $d(e){return e===void 0||e===1}function Lp({scale:e,scaleX:t,scaleY:n}){return!$d(e)||!$d(t)||!$d(n)}function Ai(e){return Lp(e)||Kk(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Kk(e){return Fy(e.x)||Fy(e.y)}function Fy(e){return e&&e!=="0%"}function Zc(e,t,n){const r=e-n,i=t*r;return n+i}function $y(e,t,n,r,i){return i!==void 0&&(e=Zc(e,i,r)),Zc(e,n,r)+t}function Fp(e,t=0,n=1,r,i){e.min=$y(e.min,t,n,r,i),e.max=$y(e.max,t,n,r,i)}function Xk(e,{x:t,y:n}){Fp(e.x,t.translate,t.scale,t.originPoint),Fp(e.y,n.translate,n.scale,n.originPoint)}const By=.999999999999,zy=1.0000000000001;function oR(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&&$s(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Xk(e,o)),r&&Ai(s.latestValues)&&$s(e,s.latestValues))}t.x<zy&&t.x>By&&(t.x=1),t.y<zy&&t.y>By&&(t.y=1)}function Fs(e,t){e.min=e.min+t,e.max=e.max+t}function Vy(e,t,n,r,i=.5){const s=Ye(e.min,e.max,i);Fp(e,t,n,s,r)}function $s(e,t){Vy(e.x,t.x,t.scaleX,t.scale,t.originX),Vy(e.y,t.y,t.scaleY,t.scale,t.originY)}function Zk(e,t){return Gk(J3(e.getBoundingClientRect(),t))}function aR(e,t,n){const r=Zk(e,n),{scroll:i}=t;return i&&(Fs(r.x,i.offset.x),Fs(r.y,i.offset.y)),r}const Jk=({current:e})=>e?e.ownerDocument.defaultView:null,Uy=(e,t)=>Math.abs(e-t);function lR(e,t){const n=Uy(e.x,t.x),r=Uy(e.y,t.y);return Math.sqrt(n**2+r**2)}class eS{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=zd(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,h=lR(u.offset,{x:0,y:0})>=3;if(!p&&!h)return;const{point:y}=u,{timestamp:w}=wt;this.history.push({...y,timestamp:w});const{onStart:b,onMove:m}=this.handlers;p||(b&&b(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,u)},this.handlePointerMove=(u,p)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=Bd(p,this.transformPagePoint),Be.update(this.updatePoint,!0)},this.handlePointerUp=(u,p)=>{this.end();const{onEnd:h,onSessionEnd:y,resumeAnimation:w}=this.handlers;if(this.dragSnapToOrigin&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=zd(u.type==="pointercancel"?this.lastMoveEventInfo:Bd(p,this.transformPagePoint),this.history);this.startEvent&&h&&h(u,b),y&&y(u,b)},!Rm(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=dl(t),a=Bd(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=wt;this.history=[{...l,timestamp:c}];const{onSessionStart:d}=n;d&&d(t,zd(a,this.history)),this.removeListeners=ul(ma(this.contextWindow,"pointermove",this.handlePointerMove),ma(this.contextWindow,"pointerup",this.handlePointerUp),ma(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),hi(this.updatePoint)}}function Bd(e,t){return t?{point:t(e.point)}:e}function Hy(e,t){return{x:e.x-t.x,y:e.y-t.y}}function zd({point:e},t){return{point:e,delta:Hy(e,tS(t)),offset:Hy(e,cR(t)),velocity:uR(t,.1)}}function cR(e){return e[0]}function tS(e){return e[e.length-1]}function uR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=tS(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>rr(t)));)n--;if(!r)return{x:0,y:0};const s=ir(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 dR(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ye(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ye(n,e,r.max):Math.min(e,n)),e}function Wy(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 fR(e,{top:t,left:n,bottom:r,right:i}){return{x:Wy(e.x,n,i),y:Wy(e.y,t,r)}}function qy(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 pR(e,t){return{x:qy(e.x,t.x),y:qy(e.y,t.y)}}function hR(e,t){let n=.5;const r=Dt(e),i=Dt(t);return i>r?n=Ba(t.min,t.max-r,e.min):r>i&&(n=Ba(e.min,e.max-i,t.min)),jr(0,1,n)}function mR(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 $p=.35;function gR(e=$p){return e===!1?e=0:e===!0&&(e=$p),{x:Gy(e,"left","right"),y:Gy(e,"top","bottom")}}function Gy(e,t,n){return{min:Yy(e,t),max:Yy(e,n)}}function Yy(e,t){return typeof e=="number"?e:e[t]||0}const vR=new WeakMap;class yR{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=et(),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(dl(d).point)},s=(d,u)=>{const{drag:p,dragPropagation:h,onDragStart:y}=this.getProps();if(p&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=hj(p),!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),mn(b=>{let m=this.getAxisMotionValue(b).get()||0;if(or.test(m)){const{projection:v}=this.visualElement;if(v&&v.layout){const x=v.layout.layoutBox[b];x&&(m=Dt(x)*(parseFloat(m)/100))}}this.originPoint[b]=m}),y&&Be.postRender(()=>y(d,u)),Tp(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},o=(d,u)=>{const{dragPropagation:p,dragDirectionLock:h,onDirectionLock:y,onDrag:w}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:b}=u;if(h&&this.currentDirection===null){this.currentDirection=xR(b),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",u.point,b),this.updateAxis("y",u.point,b),this.visualElement.render(),w&&w(d,u)},a=(d,u)=>this.stop(d,u),l=()=>mn(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 eS(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Jk(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&&Be.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||!zl(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=dR(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&&Ds(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=fR(r.layoutBox,t):this.constraints=!1,this.elastic=gR(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&mn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=mR(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ds(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=aR(r,i.root,this.visualElement.getTransformPagePoint());let o=pR(i.layout.layoutBox,s);if(n){const a=n(Z3(o));this.hasMutatedConstraints=!!a,a&&(o=Gk(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=mn(d=>{if(!zl(d,n,this.currentDirection))return;let u=l&&l[d]||{};o&&(u={min:0,max:0});const p=i?200:1e6,h=i?40:1e7,y={type:"inertia",velocity:r?t[d]:0,bounceStiffness:p,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...u};return this.startAxisValueAnimation(d,y)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Tp(this.visualElement,t),r.start(Xm(t,r,0,n,this.visualElement,!1))}stopAnimation(){mn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){mn(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){mn(n=>{const{drag:r}=this.getProps();if(!zl(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]-Ye(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Ds(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};mn(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=hR({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(),mn(o=>{if(!zl(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(Ye(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;vR.set(this.visualElement,this);const t=this.visualElement.current,n=ma(t,"pointerdown",l=>{const{drag:c,dragListener:d=!0}=this.getProps();c&&d&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Ds(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()),Be.read(r);const o=Ya(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(mn(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=$p,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function zl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function xR(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class wR extends wi{constructor(t){super(t),this.removeGroupControls=Cn,this.removeListeners=Cn,this.controls=new yR(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Cn}unmount(){this.removeGroupControls(),this.removeListeners()}}const Qy=e=>(t,n)=>{e&&Be.postRender(()=>e(t,n))};class bR extends wi{constructor(){super(...arguments),this.removePointerDownListener=Cn}onPointerDown(t){this.session=new eS(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Jk(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&&Be.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=ma(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 uc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ky(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const qo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(he.test(e))e=parseFloat(e);else return e;const n=Ky(e,t.target.x),r=Ky(e,t.target.y);return`${n}% ${r}%`}},kR={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=mi.parse(e);if(i.length>5)return r;const s=mi.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=Ye(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 SR extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;zj(CR),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()})),uc.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()||Be.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),jm.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function nS(e){const[t,n]=zb(),r=g.useContext(ym);return f.jsx(SR,{...e,layoutGroup:r,switchLayoutGroup:g.useContext(ek),isPresent:t,safeToRemove:n})}const CR={borderRadius:{...qo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:qo,borderTopRightRadius:qo,borderBottomLeftRadius:qo,borderBottomRightRadius:qo,boxShadow:kR};function _R(e,t,n){const r=jt(e)?e:Va(e);return r.start(Xm("",r,t,n)),r.animation}function TR(e){return e instanceof SVGElement&&e.tagName!=="svg"}const ER=(e,t)=>e.depth-t.depth;class AR{constructor(){this.children=[],this.isDirty=!1}add(t){bm(this.children,t),this.isDirty=!0}remove(t){km(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ER),this.isDirty=!1,this.children.forEach(t)}}function jR(e,t){const n=sr.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(hi(r),e(s-t))};return Be.read(r,!0),()=>hi(r)}const rS=["TopLeft","TopRight","BottomLeft","BottomRight"],RR=rS.length,Xy=e=>typeof e=="string"?parseFloat(e):e,Zy=e=>typeof e=="number"||he.test(e);function PR(e,t,n,r,i,s){i?(e.opacity=Ye(0,n.opacity??1,MR(r)),e.opacityExit=Ye(t.opacity??1,0,NR(r))):s&&(e.opacity=Ye(t.opacity??1,n.opacity??1,r));for(let o=0;o<RR;o++){const a=`border${rS[o]}Radius`;let l=Jy(t,a),c=Jy(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Zy(l)===Zy(c)?(e[a]=Math.max(Ye(Xy(l),Xy(c),r),0),(or.test(c)||or.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Ye(t.rotate||0,n.rotate||0,r))}function Jy(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const MR=iS(0,.5,bk),NR=iS(.5,.95,Cn);function iS(e,t,n){return r=>r<e?0:r>t?1:n(Ba(e,t,r))}function e0(e,t){e.min=t.min,e.max=t.max}function pn(e,t){e0(e.x,t.x),e0(e.y,t.y)}function t0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function n0(e,t,n,r,i){return e-=t,e=Zc(e,1/n,r),i!==void 0&&(e=Zc(e,1/i,r)),e}function OR(e,t=0,n=1,r=.5,i,s=e,o=e){if(or.test(t)&&(t=parseFloat(t),t=Ye(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=Ye(s.min,s.max,r);e===s&&(a-=t),e.min=n0(e.min,t,n,a,i),e.max=n0(e.max,t,n,a,i)}function r0(e,t,[n,r,i],s,o){OR(e,t[n],t[r],t[i],t.scale,s,o)}const DR=["x","scaleX","originX"],IR=["y","scaleY","originY"];function i0(e,t,n,r){r0(e.x,t,DR,n?n.x:void 0,r?r.x:void 0),r0(e.y,t,IR,n?n.y:void 0,r?r.y:void 0)}function s0(e){return e.translate===0&&e.scale===1}function sS(e){return s0(e.x)&&s0(e.y)}function o0(e,t){return e.min===t.min&&e.max===t.max}function LR(e,t){return o0(e.x,t.x)&&o0(e.y,t.y)}function a0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function oS(e,t){return a0(e.x,t.x)&&a0(e.y,t.y)}function l0(e){return Dt(e.x)/Dt(e.y)}function c0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class FR{constructor(){this.members=[]}add(t){bm(this.members,t),t.scheduleRender()}remove(t){if(km(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 $R(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:p,skewX:h,skewY:y}=n;c&&(r=`perspective(${c}px) ${r}`),d&&(r+=`rotate(${d}deg) `),u&&(r+=`rotateX(${u}deg) `),p&&(r+=`rotateY(${p}deg) `),h&&(r+=`skewX(${h}deg) `),y&&(r+=`skewY(${y}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 Vd=["","X","Y","Z"],BR={visibility:"hidden"},u0=1e3;let zR=0;function Ud(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function aS(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=hk(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Be,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&aS(r)}function lS({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=zR++,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(HR),this.nodes.forEach(QR),this.nodes.forEach(KR),this.nodes.forEach(WR)},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 AR)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Cm),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=TR(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 p=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=jR(p,250),uc.hasAnimatedSinceResize&&(uc.hasAnimatedSinceResize=!1,this.nodes.forEach(f0))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:p,hasRelativeLayoutChanged:h,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||d.getDefaultTransition()||tP,{onLayoutAnimationStart:b,onLayoutAnimationComplete:m}=d.getProps(),v=!this.targetLayout||!oS(this.targetLayout,y),x=!p&&h;if(this.options.layoutRoot||this.resumeFrom||x||p&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(u,x);const S={...Em(w,"layout"),onPlay:b,onComplete:m};(d.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else p||f0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}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,hi(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(XR),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&aS(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let 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(d0);return}this.isUpdating||this.nodes.forEach(GR),this.isUpdating=!1,this.nodes.forEach(YR),this.nodes.forEach(VR),this.nodes.forEach(UR),this.clearAllSnapshots();const a=sr.now();wt.delta=jr(0,1e3/60,a-wt.timestamp),wt.timestamp=a,wt.isProcessing=!0,Nd.update.process(wt),Nd.preRender.process(wt),Nd.render.process(wt),wt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,jm.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(qR),this.sharedNodes.forEach(ZR)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Be.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Be.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Dt(this.snapshot.measuredBox.x)&&!Dt(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=et(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!sS(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,d=c!==this.prevTransformTemplateValue;o&&(a||Ai(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)),nP(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:o}=this.options;if(!o)return et();const a=o.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(rP))){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=et();if(pn(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:p}=d;d!==this.root&&u&&p.layoutScroll&&(u.wasRoot&&pn(a,o),Fs(a.x,u.offset.x),Fs(a.y,u.offset.y))}return a}applyTransform(o,a=!1){const l=et();pn(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&&$s(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Ai(d.latestValues)&&$s(l,d.latestValues)}return Ai(this.latestValues)&&$s(l,this.latestValues),l}removeTransform(o){const a=et();pn(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Ai(c.latestValues))continue;Lp(c.latestValues)&&c.updateSnapshot();const d=et(),u=c.measurePageBox();pn(d,u),i0(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,d)}return Ai(this.latestValues)&&i0(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!==wt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var p;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||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:u}=this.options;if(!(!this.layout||!(d||u))){if(this.resolvedRelativeTargetAt=wt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=et(),this.relativeTargetOrigin=et(),va(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),pn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=et(),this.targetWithTransforms=et()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),sR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):pn(this.target,this.layout.layoutBox),Xk(this.target,this.targetDelta)):pn(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=et(),this.relativeTargetOrigin=et(),va(this.relativeTargetOrigin,this.target,h.target),pn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Lp(this.parent.latestValues)||Kk(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 y;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===wt.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;pn(this.layoutCorrected,this.layout.layoutBox);const u=this.treeScale.x,p=this.treeScale.y;oR(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=et());const{target:h}=o;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(t0(this.prevProjectionDelta.x,this.projectionDelta.x),t0(this.prevProjectionDelta.y,this.projectionDelta.y)),ga(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==u||this.treeScale.y!==p||!c0(this.projectionDelta.x,this.prevProjectionDelta.x)||!c0(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=Ls(),this.projectionDelta=Ls(),this.projectionDeltaWithTransform=Ls()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},d={...this.latestValues},u=Ls();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const p=et(),h=l?l.source:void 0,y=this.layout?this.layout.source:void 0,w=h!==y,b=this.getStack(),m=!b||b.members.length<=1,v=!!(w&&!m&&this.options.crossfade===!0&&!this.path.some(eP));this.animationProgress=0;let x;this.mixTargetDelta=S=>{const C=S/1e3;p0(u.x,o.x,C),p0(u.y,o.y,C),this.setTargetDelta(u),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(va(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),JR(this.relativeTarget,this.relativeTargetOrigin,p,C),x&&LR(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=et()),pn(x,this.relativeTarget)),w&&(this.animationValues=d,PR(d,c,this.latestValues,C,v,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},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&&(hi(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Be.update(()=>{uc.hasAnimatedSinceResize=!0,this.currentAnimation=_R(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&&cS(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||et();const u=Dt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const p=Dt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+p}pn(a,l),$s(a,d),ga(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new FR),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&&Ud("z",o,c,this.animationValues);for(let d=0;d<Vd.length;d++)Ud(`rotate${Vd[d]}`,o,c,this.animationValues),Ud(`skew${Vd[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 BR;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=cc(o==null?void 0:o.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){const h={};return this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=cc(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Ai(this.latestValues)&&(h.transform=l?l({},""):"none",this.hasProjected=!1),h}const d=c.animationValues||c.latestValues;this.applyTransformsToTarget(),a.transform=$R(this.projectionDeltaWithTransform,this.treeScale,d),l&&(a.transform=l(d,a.transform));const{x:u,y:p}=this.projectionDelta;a.transformOrigin=`${u.origin*100}% ${p.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 h in Ha){if(d[h]===void 0)continue;const{correct:y,applyTo:w,isCSSVariable:b}=Ha[h],m=a.transform==="none"?d[h]:y(d[h],c);if(w){const v=w.length;for(let x=0;x<v;x++)a[w[x]]=m}else b?this.options.visualElement.renderState.vars[h]=m:a[h]=m}return this.options.layoutId&&(a.pointerEvents=c===this?cc(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(d0),this.root.sharedNodes.clear()}}}function VR(e){e.updateLayout()}function UR(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"?mn(u=>{const p=o?t.measuredBox[u]:t.layoutBox[u],h=Dt(p);p.min=r[u].min,p.max=p.min+h}):cS(s,t.layoutBox,r)&&mn(u=>{const p=o?t.measuredBox[u]:t.layoutBox[u],h=Dt(r[u]);p.max=p.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+h)});const a=Ls();ga(a,r,t.layoutBox);const l=Ls();o?ga(l,e.applyTransform(i,!0),t.measuredBox):ga(l,r,t.layoutBox);const c=!sS(a);let d=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:p,layout:h}=u;if(p&&h){const y=et();va(y,t.layoutBox,p.layoutBox);const w=et();va(w,r,h.layoutBox),oS(y,w)||(d=!0),u.options.layoutRoot&&(e.relativeTarget=w,e.relativeTargetOrigin=y,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 HR(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 WR(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function qR(e){e.clearSnapshot()}function d0(e){e.clearMeasurements()}function GR(e){e.isLayoutDirty=!1}function YR(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function f0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function QR(e){e.resolveTargetDelta()}function KR(e){e.calcProjection()}function XR(e){e.resetSkewAndRotation()}function ZR(e){e.removeLeadSnapshot()}function p0(e,t,n){e.translate=Ye(t.translate,0,n),e.scale=Ye(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function h0(e,t,n,r){e.min=Ye(t.min,n.min,r),e.max=Ye(t.max,n.max,r)}function JR(e,t,n,r){h0(e.x,t.x,n.x,r),h0(e.y,t.y,n.y,r)}function eP(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const tP={duration:.45,ease:[.4,0,.1,1]},m0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),g0=m0("applewebkit/")&&!m0("chrome/")?Math.round:Cn;function v0(e){e.min=g0(e.min),e.max=g0(e.max)}function nP(e){v0(e.x),v0(e.y)}function cS(e,t,n){return e==="position"||e==="preserve-aspect"&&!iR(l0(t),l0(n),.2)}function rP(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const iP=lS({attachResizeListener:(e,t)=>Ya(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Hd={current:void 0},uS=lS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Hd.current){const e=new iP({});e.mount(window),e.setOptions({layoutScroll:!0}),Hd.current=e}return Hd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),sP={pan:{Feature:bR},drag:{Feature:wR,ProjectionNode:uS,MeasureLayout:nS}};function y0(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&&Be.postRender(()=>s(t,dl(t)))}class oP extends wi{mount(){const{current:t}=this.node;t&&(this.unmount=gj(t,(n,r)=>(y0(this.node,r,"Start"),i=>y0(this.node,i,"End"))))}unmount(){}}class aP extends wi{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=ul(Ya(this.node.current,"focus",()=>this.onFocus()),Ya(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function x0(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&&Be.postRender(()=>s(t,dl(t)))}class lP extends wi{mount(){const{current:t}=this.node;t&&(this.unmount=wj(t,(n,r)=>(x0(this.node,r,"Start"),(i,{success:s})=>x0(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Bp=new WeakMap,Wd=new WeakMap,cP=e=>{const t=Bp.get(e.target);t&&t(e)},uP=e=>{e.forEach(cP)};function dP({root:e,...t}){const n=e||document;Wd.has(n)||Wd.set(n,{});const r=Wd.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(uP,{root:e,...t})),r[i]}function fP(e,t,n){const r=dP(t);return Bp.set(e,n),r.observe(e),()=>{Bp.delete(e),r.unobserve(e)}}const pP={some:0,all:1};class hP extends wi{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:pP[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(),p=c?d:u;p&&p(l)};return fP(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(mP(t,n))&&this.startObserver()}unmount(){}}function mP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const gP={inView:{Feature:hP},tap:{Feature:lP},focus:{Feature:aP},hover:{Feature:oP}},vP={layout:{ProjectionNode:uS,MeasureLayout:nS}},zp={current:null},dS={current:!1};function yP(){if(dS.current=!0,!!xm)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>zp.current=e.matches;e.addListener(t),t()}else zp.current=!1}const xP=[...Ik,Et,mi],wP=e=>xP.find(Dk(e)),bP=new WeakMap;function kP(e,t,n){for(const r in t){const i=t[r],s=n[r];if(jt(i))e.addValue(r,i);else if(jt(s))e.addValue(r,Va(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,Va(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const w0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class SP{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=Ym,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=sr.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,Be.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=Pu(n),this.isVariantNode=Zb(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in p){const y=p[h];l[h]!==void 0&&jt(y)&&y.set(l[h],!1)}}mount(t){this.current=t,bP.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)),dS.current||yP(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:zp.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),hi(this.notifyUpdate),hi(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=cs.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Be.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 xo){const n=xo[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):et()}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<w0.length;r++){const i=w0[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=kP(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=Va(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"&&(Nk(r)||Sk(r))?r=parseFloat(r):!wP(r)&&mi.test(n)&&(r=Rk(t,n)),this.setBaseTarget(t,jt(r)?r.get():r)),jt(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=Vm(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&&!jt(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 Cm),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class fS extends SP{constructor(){super(...arguments),this.KeyframeResolver=Lk}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;jt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function CP(e){return window.getComputedStyle(e)}class _P extends fS{constructor(){super(...arguments),this.type="html",this.renderInstance=ck}readValueFromInstance(t,n){if(cs.has(n))return F5(t,n);{const r=CP(t),i=(Om(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Zk(t,n)}build(t,n,r){Lm(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Um(t,n,r)}}class TP extends fS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=et,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&lk(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(cs.has(n)){const r=jk(n);return r&&r.default||0}return n=uk.has(n)?n:Nm(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return fk(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&Be.postRender(this.updateDimensions)}build(t,n,r){Bm(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){dk(t,n,r,i)}mount(t){this.isSVGTag=zm(t.tagName),super.mount(t)}}const EP=(e,t)=>$m(e)?new TP(t):new _P(t,{allowProjection:e!==g.Fragment}),AP=d5({...K3,...gP,...sP,...vP},EP),Re=Ej(AP);class jP{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 RP=()=>new jP;function PP(){return Eu(RP)}var zr=(e=>(e.None="none",e.Sm="sm",e.Md="md",e.Lg="lg",e.Xl="xl",e.Full="full",e))(zr||{});const pS=g.createContext({}),MP={[ie.TooltipDefault]:"Bizimle sohbet edin!",[ie.TooltipActive]:"Yeni mesajlar var!",[ie.CloseButtonAria]:"Kapat",[ie.MessagePlaceholder]:"Mesajınızı yazın",[ie.FileUploadDisabled]:"Dosya gönderim izniniz olmadığı için yükleyemezsiniz",[ie.NewMessagesNotification]:"Yeni mesajlar var!",[ie.ChatCloseConfirm]:"Sohbeti kapatmak istediğinizden emin misiniz?",[ie.ChatCloseWarning]:"Bu işlem geri alınamaz.",[ie.ChatSettings]:"Sohbet Ayarları",[ie.ChatEndConversation]:"Sohbeti Sonlandır",[ie.CancelAction]:"Vazgeç",[ie.CloseAction]:"Kapat",[ie.QuickActions]:"Hızlı işlemler",[ie.GreetingStartChat]:"Sohbete başla",[ie.RateLimitMessage]:"Çok fazla mesaj gönderdiniz. Lütfen {seconds} saniye bekleyin.",[ie.RatingHeaderEvaluate]:"Görüşmenizi Değerlendirin",[ie.RatingHeaderThanks]:"Teşekkürler!",[ie.RatingDescription]:"Lütfen hizmetimizi değerlendirin. Görüşleriniz bizim için önemli.",[ie.RatingRateConversation]:"Görüşmeyi puanlayın",[ie.RatingComment]:"Yorumunuz (İsteğe bağlı)",[ie.RatingCommentPlaceholder]:"Görüşme hakkında düşüncelerinizi paylaşın...",[ie.RatingSubmit]:"Değerlendirmeyi Gönder",[ie.RatingNewConversation]:"Yeni Görüşme Başlat",[ie.RatingThankYouTitle]:"Değerlendirmeniz için teşekkürler!",[ie.RatingThankYouDescription]:"Geri bildiriminiz bizim için çok değerli.",[ie.RatingCountdown]:"Ekran {seconds} saniye içinde kapanacaktır.",[ie.RatingMinimumError]:"Lütfen en az 1 yıldız seçiniz.",[ie.RatingYourScore]:"Puanınız: {score}",[ie.PoweredBy]:"Powered by",[ie.NotificationSoundOn]:"Bildirim sesi aç",[ie.NotificationSoundOff]:"Bildirim sesi kapat"},NP={[k.Background]:"#ffffff",[k.Border]:"#e2e8f0",[k.TooltipText]:"#1e40af",[k.TooltipBackground]:"#dbeafe",[k.TooltipBorder]:"#3b82f6",[k.HeaderBackground]:"#ffffff",[k.HeaderBorder]:"#e2e8f0",[k.HeaderText]:"#1e293b",[k.FooterBackground]:"#f8fafc",[k.FooterBorder]:"#e2e8f0",[k.FooterText]:"#475569",[k.MessageAdminBackground]:"#f1f5f9",[k.MessageAdminText]:"#334155",[k.MessageVisitorBackground]:"#3b82f6",[k.MessageVisitorText]:"#ffffff",[k.MessageAgentBackground]:"#ede9fe",[k.MessageAgentText]:"#5b21b6",[k.GreeterBackground]:"#ffffff",[k.GreeterText]:"#334155",[k.GreeterBorder]:"#e2e8f0",[k.GreeterTopBackground]:"linear-gradient(135deg, #3b82f6 0%, #2563eb 100%)",[k.GreeterTopText]:"#ffffff",[k.GreeterButtonBackground]:"#3b82f6",[k.GreeterButtonText]:"#ffffff",[k.ButtonBackground]:"#3b82f6",[k.ButtonText]:"#ffffff",[k.InputBackground]:"#f8fafc",[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]:"#f59e0b",[k.StarInactiveColor]:"#e2e8f0",[k.ModalOverlayColor]:"rgba(0, 0, 0, 0.4)",[k.ChatCloseConfirmText]:"#dc2626",[k.RatingHeaderBackground]:"#3b82f6",[k.RatingHeaderText]:"#ffffff",[k.RatingSuccessBackground]:"#ffffff",[k.RatingSuccessText]:"#334155",[k.RatingRateConversationText]:"#1e293b"},OP={[k.Background]:"#0a0a0a",[k.Border]:"#262626",[k.TooltipText]:"#e5e5e5",[k.TooltipBackground]:"#262626",[k.TooltipBorder]:"#404040",[k.HeaderBackground]:"#171717",[k.HeaderBorder]:"#262626",[k.HeaderText]:"#fafafa",[k.FooterBackground]:"#0a0a0a",[k.FooterBorder]:"#262626",[k.FooterText]:"#a3a3a3",[k.MessageAdminBackground]:"#262626",[k.MessageAdminText]:"#e5e5e5",[k.MessageVisitorBackground]:"#171717",[k.MessageVisitorText]:"#e5e5e5",[k.MessageAgentBackground]:"#5b21b6",[k.MessageAgentText]:"#e9d5ff",[k.GreeterBackground]:"#171717",[k.GreeterText]:"#e5e5e5",[k.GreeterBorder]:"#262626",[k.GreeterTopBackground]:"linear-gradient(135deg, #262626 0%, #171717 100%)",[k.GreeterTopText]:"#fafafa",[k.GreeterButtonBackground]:"#3b82f6",[k.GreeterButtonText]:"#ffffff",[k.ButtonBackground]:"#3b82f6",[k.ButtonText]:"#ffffff",[k.InputBackground]:"#171717",[k.InputText]:"#e5e5e5",[k.InputBorder]:"#3f3f3f",[k.CloseButtonBackground]:"#262626",[k.CloseButtonText]:"#a3a3a3",[k.CloseButtonHover]:"#404040",[k.IconColor]:"#a3a3a3",[k.IconBackground]:"transparent",[k.ErrorBackground]:"#450a0a",[k.ErrorText]:"#fca5a5",[k.ErrorBorder]:"#7f1d1d",[k.SuccessBackground]:"#052e16",[k.SuccessText]:"#86efac",[k.SuccessBorder]:"#14532d",[k.WarningBackground]:"#451a03",[k.WarningText]:"#fcd34d",[k.WarningBorder]:"#78350f",[k.LinkColor]:"#3b82f6",[k.LinkHoverColor]:"#60a5fa",[k.DividerColor]:"#262626",[k.ShadowColor]:"rgba(0, 0, 0, 0.4)",[k.StarActiveColor]:"#f59e0b",[k.StarInactiveColor]:"#404040",[k.ModalOverlayColor]:"rgba(0, 0, 0, 0.7)",[k.ChatCloseConfirmText]:"#fca5a5",[k.RatingHeaderBackground]:"#171717",[k.RatingHeaderText]:"#fafafa",[k.RatingSuccessBackground]:"#171717",[k.RatingSuccessText]:"#e5e5e5",[k.RatingRateConversationText]:"#e5e5e5"},DP={[zr.None]:"0px",[zr.Sm]:"var(--radius-sm)",[zr.Md]:"var(--radius-md)",[zr.Lg]:"var(--radius-lg)",[zr.Xl]:"var(--radius-lg)",[zr.Full]:"calc(infinity * 1px)"},IP=e=>{const t={...MP};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};function LP(e,t){const n=e.replace(/^#/,"");if(n.length!==6)return e;const r=Math.max(0,Math.round(Number.parseInt(n.slice(0,2),16)*(1-t))),i=Math.max(0,Math.round(Number.parseInt(n.slice(2,4),16)*(1-t))),s=Math.max(0,Math.round(Number.parseInt(n.slice(4,6),16)*(1-t)));return`#${r.toString(16).padStart(2,"0")}${i.toString(16).padStart(2,"0")}${s.toString(16).padStart(2,"0")}`}const qd="#ffffff";function FP(e){const t=LP(e,.2);return{[k.ButtonBackground]:t,[k.ButtonText]:qd,[k.GreeterButtonBackground]:t,[k.GreeterButtonText]:qd,[k.MessageVisitorBackground]:t,[k.MessageVisitorText]:qd}}const $P=(e,t)=>{var i,s;const r={...t==="dark"?OP:NP};if(t==="dark")return r;if((s=(i=e==null?void 0:e.appearance)==null?void 0:i.design)!=null&&s.colors){const o=e.appearance.design.colors,a=o.main_color;if(a){const l=FP(a);for(const c of Object.keys(l))l[c]&&(r[c]=l[c])}for(const l in o){if(l==="main_color"||l==="secondary_color"||l==="accent_color")continue;const c=l;o[l]&&l in r&&(r[c]=o[l])}}return r},hS="lc:theme:mode";function BP(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function zP(){try{const e=localStorage.getItem(hS);if(e==="light"||e==="dark"||e==="system")return e}catch{}return Le.System}function VP({children:e,widget:t}){const[n,r]=g.useState(zP),[i,s]=g.useState(BP);g.useEffect(()=>{const y=window.matchMedia("(prefers-color-scheme: dark)"),w=b=>{s(b.matches?"dark":"light")};return y.addEventListener("change",w),()=>y.removeEventListener("change",w)},[]);const o=n===Le.System?i:n,a=g.useCallback(y=>{r(y);try{localStorage.setItem(hS,y)}catch{}},[]),l=$P(t,o),c=IP(t),d=t&&t.appearance&&t.appearance.design&&t.appearance.design.border_radius?t.appearance.design.border_radius:zr.Md,u=y=>l[y],p=y=>c[y],h=()=>DP[d];return f.jsx(pS.Provider,{value:{colors:l,texts:c,getColor:u,getText:p,getRadius:h,mode:n,resolvedMode:o,setMode:a},children:e})}const be=()=>g.useContext(pS),us=()=>be().getText;function Rt({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=k.ButtonText,bgKey:d=k.ButtonBackground,animations:u={},withoutTheming:p,...h}){const y=be();return f.jsx(Re.button,{type:t,className:Ie("flex items-center justify-center focus:outline-none focus:ring-2 focus:ring-offset-0 font-medium transition-opacity",{"rounded-full":o&&i!=="xs","rounded-lg":!o,"opacity-50 cursor-not-allowed":s,"hover:opacity-90 active:opacity-95":!s},a,ny[n]&&ny[n][r],JA[i][o?"rounded":"default"]),disabled:s,style:{transition:"all 0.2s ease",...!p&&{color:y.getColor(c),backgroundColor:y.getColor(d),...o?{}:{borderRadius:y.getRadius()}},...l},...u,...h,children:e})}function Z(){}Z.Home=function(t){return f.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:f.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"})})};Z.Chat=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.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"})});Z.Menu=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})});Z.MessageTyping=({className:e="size-5",...t})=>f.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:f.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"})});Z.Check=function(t){return f.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",height:"1em",width:"1em",...t,children:f.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"})})};Z.Website=function(t){return f.jsxs("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:[f.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"}),f.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"}),f.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"})]})};Z.ArrowDown=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"})});Z.ArrowDown2=e=>f.jsxs("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",...e,children:[f.jsx("g",{id:"SVGRepo_bgCarrier",strokeWidth:1.5}),f.jsx("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5}),f.jsx("g",{id:"SVGRepo_iconCarrier",children:f.jsx("path",{d:"M903.232 256l56.768 50.432L512 768 64 306.432 120.768 256 512 659.072z",fill:"currentColor"})})]});Z.ArrowLeft=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"})});Z.XCircle=({className:e="e-5",...t})=>f.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:f.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"})});Z.X=({className:e="e-5",...t})=>f.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:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})});Z.PaperAirplane=({className:e="e-5",...t})=>f.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:f.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"})});Z.Spin=function(t){return f.jsx("svg",{"data-name":"Layer 1",viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:f.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"})})};Z.ExternalLink=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.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"})});Z.Phone=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.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"})});Z.Mail=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.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"})});Z.Star=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.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"})});Z.Plus=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})});Z.History=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})});Z.Eye=e=>f.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:[f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"}),f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]});Z.Lock=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 10.5V6.75a4.5 4.5 0 119 0v3.75M3.75 21.75h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H3.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z"})});Z.User=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z"})});Z.Emoji=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.182 15.182a4.5 4.5 0 0 1-6.364 0M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0ZM9.75 9.75c0 .414-.168.75-.375.75S9 10.164 9 9.75 9.168 9 9.375 9s.375.336.375.75Zm-.375 0h.008v.015h-.008V9.75Zm5.625 0c0 .414-.168.75-.375.75s-.375-.336-.375-.75.168-.75.375-.75.375.336.375.75Zm-.375 0h.008v.015h-.008V9.75Z"})});Z.Paperclip=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m18.375 12.739-7.693 7.693a4.5 4.5 0 0 1-6.364-6.364l10.94-10.94A3 3 0 1 1 19.5 7.372L8.552 18.32m.009-.01-.01.01m5.699-9.941-7.81 7.81a1.5 1.5 0 0 0 2.112 2.13"})});Z.Sparkles=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.455 2.456L21.75 6l-1.036.259a3.375 3.375 0 0 0-2.455 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"})});Z.Sun=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75v-2.25m-4.773 4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"})});Z.Moon=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"})});Z.Monitor=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 17.25v1.007a3 3 0 0 1-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0 1 15 18.257V17.25m6-12V15a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 15V5.25m18 0A2.25 2.25 0 0 0 18.75 3H5.25A2.25 2.25 0 0 0 3 5.25m18 0V12a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 12V5.25"})});Z.Volume2=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.114 5.636a9 9 0 0 1 0 12.728M16.463 8.288a5.25 5.25 0 0 1 0 7.424M6.75 8.25l4.72-4.72a.75.75 0 0 1 1.28.53v15.88a.75.75 0 0 1-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.01 9.01 0 0 1 2.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75Z"})});Z.VolumeX=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.25 9.75 19.5 12m0 0 2.25 2.25M19.5 12l2.25-2.25M19.5 12l-2.25 2.25m-10.5-6 4.72-4.72a.75.75 0 0 1 1.28.53v15.88a.75.75 0 0 1-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.01 9.01 0 0 1 2.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75Z"})});Z.Bot=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 3v1.5M4.5 8.25H3m18 0h-1.5M4.5 12H3m18 0h-1.5m-15 3.75H3m18 0h-1.5M8.25 19.5V21M12 3v1.5m0 15V21m3.75-18v1.5m0 15V21m-9-1.5h10.5a2.25 2.25 0 0 0 2.25-2.25V6.75a2.25 2.25 0 0 0-2.25-2.25H6.75A2.25 2.25 0 0 0 4.5 6.75v10.5a2.25 2.25 0 0 0 2.25 2.25Zm.75-12h9v9h-9v-9Z"})});function Vp(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}var rt=(e=>(e.CustomerToken="lc:customer:token",e.CustomerRefreshToken="lc:customer:refresh_token",e.DeviceId="lc:device:id",e.AIAgentMode="lc:agent:mode",e.AIAgent="lc:agent:data",e.AIAgentSessionId="lc:agent:session",e.HumanNeedRequested="lc:agent:human_need",e))(rt||{});const Fn=(e,t,n)=>{let r=e;["lc:customer:token","lc:customer:refresh_token"].includes(e)&&(r=`${n}:${e}`),localStorage.setItem(r,t)},na=(e,t)=>{let n=e;return["lc:customer:token","lc:customer:refresh_token"].includes(e)&&(n=`${t}:${e}`),localStorage.getItem(n)},ya=e=>{localStorage.removeItem(`${e}:lc:customer:token`),localStorage.removeItem(`${e}:lc:customer:refresh_token`),Zm(e)},mS=e=>{localStorage.removeItem(`${e}:lc:customer:token`),localStorage.removeItem(`${e}:lc:customer:refresh_token`)},Vl=(e,t,n,r,i)=>{const s=`${e}:`;t&&(n||i)?(localStorage.setItem(`${s}lc:agent:mode`,"true"),localStorage.setItem(`${s}lc:agent:data`,JSON.stringify(t)),r&&localStorage.setItem(`${s}lc:agent:session`,r),i!==void 0&&(i?localStorage.setItem(`${s}lc:agent:human_need`,"true"):localStorage.removeItem(`${s}lc:agent:human_need`))):Zm(e)},mr=e=>{const t=`${e}:`,n=localStorage.getItem(`${t}lc:agent:mode`)==="true",r=localStorage.getItem(`${t}lc:agent:data`),i=localStorage.getItem(`${t}lc:agent:session`),s=localStorage.getItem(`${t}lc:agent:human_need`)==="true";let o=null;if(r)try{o=JSON.parse(r)}catch{o=null}return{isAgentMode:n,agent:o,sessionId:i,humanNeedRequested:s}},Zm=e=>{const t=`${e}:`;localStorage.removeItem(`${t}lc:agent:mode`),localStorage.removeItem(`${t}lc:agent:data`),localStorage.removeItem(`${t}lc:agent:session`),localStorage.removeItem(`${t}lc:agent:human_need`)},Rr=e=>{const t=`${e}:lc:device:id`;let n=localStorage.getItem(t);return n||(n=Vp(),localStorage.setItem(t,n)),n},UP={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},b0=e=>{let t;const n=new Set,r=(d,u)=>{const p=typeof d=="function"?d(t):d;if(!Object.is(p,t)){const h=t;t=u??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(y=>y(t,h))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>c,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(UP?"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},HP=e=>e?b0(e):b0;var gS={exports:{}},vS={},yS={exports:{}},xS={};/**
71
71
  * @license React
72
72
  * use-sync-external-store-shim.production.min.js
73
73
  *
@@ -75,7 +75,7 @@ Error generating stack: `+s.message+`
75
75
  *
76
76
  * This source code is licensed under the MIT license found in the
77
77
  * LICENSE file in the root directory of this source tree.
78
- */var vo=v;function NP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var DP=typeof Object.is=="function"?Object.is:NP,IP=vo.useState,LP=vo.useEffect,FP=vo.useLayoutEffect,BP=vo.useDebugValue;function $P(e,t){var n=t(),r=IP({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return FP(function(){i.value=n,i.getSnapshot=t,Ud(i)&&s({inst:i})},[e,n,t]),LP(function(){return Ud(i)&&s({inst:i}),e(function(){Ud(i)&&s({inst:i})})},[e]),BP(n),n}function Ud(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!DP(e,n)}catch{return!0}}function zP(e,t){return t()}var VP=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?zP:$P;lS.useSyncExternalStore=vo.useSyncExternalStore!==void 0?vo.useSyncExternalStore:VP;aS.exports=lS;var UP=aS.exports;/**
78
+ */var bo=g;function WP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qP=typeof Object.is=="function"?Object.is:WP,GP=bo.useState,YP=bo.useEffect,QP=bo.useLayoutEffect,KP=bo.useDebugValue;function XP(e,t){var n=t(),r=GP({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return QP(function(){i.value=n,i.getSnapshot=t,Gd(i)&&s({inst:i})},[e,n,t]),YP(function(){return Gd(i)&&s({inst:i}),e(function(){Gd(i)&&s({inst:i})})},[e]),KP(n),n}function Gd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!qP(e,n)}catch{return!0}}function ZP(e,t){return t()}var JP=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?ZP:XP;xS.useSyncExternalStore=bo.useSyncExternalStore!==void 0?bo.useSyncExternalStore:JP;yS.exports=xS;var eM=yS.exports;/**
79
79
  * @license React
80
80
  * use-sync-external-store-shim/with-selector.production.min.js
81
81
  *
@@ -83,49 +83,49 @@ Error generating stack: `+s.message+`
83
83
  *
84
84
  * This source code is licensed under the MIT license found in the
85
85
  * LICENSE file in the root directory of this source tree.
86
- */var ju=v,HP=UP;function WP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qP=typeof Object.is=="function"?Object.is:WP,GP=HP.useSyncExternalStore,YP=ju.useRef,QP=ju.useEffect,KP=ju.useMemo,XP=ju.useDebugValue;oS.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=YP(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=KP(function(){function l(h){if(!c){if(c=!0,d=h,h=r(h),i!==void 0&&o.hasValue){var y=o.value;if(i(y,h))return u=y}return u=h}if(y=u,qP(d,h))return y;var x=r(h);return i!==void 0&&i(y,x)?y:(d=h,u=x)}var c=!1,d,u,p=n===void 0?null:n;return[function(){return l(t())},p===null?void 0:function(){return l(p())}]},[t,n,r,i]);var a=GP(e,s[0],s[1]);return QP(function(){o.hasValue=!0,o.value=a},[a]),XP(a),a};sS.exports=oS;var ZP=sS.exports;const JP=Rr(ZP),cS={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:eM}=J,{useSyncExternalStoreWithSelector:tM}=JP;let m0=!1;const nM=e=>e;function rM(e,t=nM,n){(cS?"production":void 0)!=="production"&&n&&!m0&&(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"),m0=!0);const r=tM(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return eM(r),r}const g0=e=>{(cS?"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"?OP(e):e,n=(r,i)=>rM(t,r,i);return Object.assign(n,t),n},iM=e=>e?g0(e):g0,re=iM(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,showActionButtons:!1,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=>{var n;if(e({isHaveChat:t}),localStorage.setItem("lc:widget:isHaveChat",t.toString()),!t){e({showActionButtons:!1});const r=(n=re.getState().widget)==null?void 0:n.link_id;r&&localStorage.setItem(`${r}:showActionButtons`,"false")}},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}),historyChat:null,setHistoryChat:t=>e({historyChat:t}),historyMessages:null,setHistoryMessages:t=>e({historyMessages:t}),showHistoryOnRegistration:!1,setShowHistoryOnRegistration:t=>e({showHistoryOnRegistration:t}),aiAgent:null,setAIAgent:t=>e(n=>{var i;const r=(i=n.widget)==null?void 0:i.link_id;return r&&Fl(r,t,n.isAIAgentMode,n.aiAgentSessionId,n.humanNeedRequested),{aiAgent:t}}),isAIAgentMode:!1,setIsAIAgentMode:t=>e(n=>{var i;const r=(i=n.widget)==null?void 0:i.link_id;return r&&Fl(r,n.aiAgent,t,n.aiAgentSessionId,n.humanNeedRequested),{isAIAgentMode:t}}),aiAgentSessionId:null,setAIAgentSessionId:t=>e(n=>{var i;const r=(i=n.widget)==null?void 0:i.link_id;return r&&Fl(r,n.aiAgent,n.isAIAgentMode,t,n.humanNeedRequested),{aiAgentSessionId:t}}),humanNeedRequested:!1,setHumanNeedRequested:t=>e(n=>{var i;const r=(i=n.widget)==null?void 0:i.link_id;if(r){const s=`${r}:`;t?localStorage.setItem(`${s}${st.HumanNeedRequested}`,"true"):localStorage.removeItem(`${s}${st.HumanNeedRequested}`),n.aiAgent&&n.isAIAgentMode&&Fl(r,n.aiAgent,n.isAIAgentMode,n.aiAgentSessionId,t)}return{humanNeedRequested:t}}),aiAgentMessages:[],setAIAgentMessages:t=>e(n=>({aiAgentMessages:typeof t=="function"?t(n.aiAgentMessages):t})),addAIAgentMessage:t=>e(n=>({aiAgentMessages:[...n.aiAgentMessages,t]})),clearAIAgentState:()=>e(t=>{var r;const n=(r=t.widget)==null?void 0:r.link_id;return n&&qm(n),{aiAgent:null,isAIAgentMode:!1,aiAgentSessionId:null,humanNeedRequested:!1,aiAgentMessages:[],connectingToOperator:!1,showOperatorForm:!1}}),connectingToOperator:!1,setConnectingToOperator:t=>e({connectingToOperator:t}),showOperatorForm:!1,setShowOperatorForm:t=>e({showOperatorForm:t}),setShowActionButtons:t=>e(n=>{var i;const r=(i=n.widget)==null?void 0:i.link_id;return r&&localStorage.setItem(`${r}:showActionButtons`,t.toString()),{showActionButtons:t}})})),sM=e=>({accessToken:localStorage.getItem(`${e}:${st.CustomerToken}`)||"",refreshToken:localStorage.getItem(`${e}:${st.CustomerRefreshToken}`)||""}),ll=()=>{const{widget:e}=re();return e?sM(e.link_id):null},Yi=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 Fp(e){return e&&typeof e=="object"&&"customer_token"in e&&"customer_refresh_token"in e}const Gm=()=>lm({mutationFn:e=>Mr(`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,device_id:e.device_id,is_agent_mode:e.is_agent_mode,widget_version:"2026.01.05-1"})})}),oM=(e,t)=>Mr(`clients/${e}/chats`,{headers:t}),ac=(e,t)=>Mr(`clients/${e}/chats`,{method:"DELETE",headers:t}),aM=(e,t,n)=>Mr("review",{method:"POST",body:JSON.stringify({rating:e,comment:t||void 0}),headers:{...n,"X-Device-Id":Zo(st.DeviceId,"")||""}}),lM=()=>{const e=ll();return lm({mutationFn:t=>aM(t.rating,t.comment,Yi(e))})},cM=e=>{const t=ll();return lm({mutationFn:n=>Mr(`clients/${e}/chats/files`,{method:"POST",headers:Yi(t),body:OT({files:n},{arrayWithBracketAndIndex:!1,arrayWithBrackets:!1})})})};function uM(e){return e&&typeof e=="object"&&"file_urls"in e}const dM=e=>{const t=`${rb}/visitors/identify`,n=JSON.stringify(e);try{fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:n,keepalive:!0,credentials:"include"}).catch(()=>{if(navigator.sendBeacon){const r=new Blob([n],{type:"application/json"});navigator.sendBeacon(t,r)}})}catch{if(navigator.sendBeacon){const r=new Blob([n],{type:"application/json"});navigator.sendBeacon(t,r)}}},fM=(e,t)=>yb({queryKey:["visitors","history",e,t],queryFn:()=>Mr(`visitors/history?widget_id=${e}&device_id=${t}`),enabled:!!e&&!!t}),pM=(e,t,n)=>Mr(`visitors/chats/${e}/messages?widget_id=${t}&device_id=${n}`);async function hM(e){const[t,n]=await Mr(`widgets/${e}/agent`);return n===204?[null,n]:[t,n]}function us(e){this._maxSize=e,this.clear()}us.prototype.clear=function(){this._size=0,this._values=Object.create(null)};us.prototype.get=function(e){return this._values[e]};us.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var mM=/[^.^\]^[]+|(?=\[\]|\.\.)/g,uS=/^\d+$/,gM=/^\d/,vM=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,yM=/^\s*(['"]?)(.*?)(\1)\s*$/,Ym=512,v0=new us(Ym),y0=new us(Ym),x0=new us(Ym),Qi={Cache:us,split:Bp,normalizePath:Hd,setter:function(e){var t=Hd(e);return y0.get(e)||y0.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=Hd(e);return x0.get(e)||x0.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+(Qm(n)||uS.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){xM(Array.isArray(e)?e:Bp(e),t,n)}};function Hd(e){return v0.get(e)||v0.set(e,Bp(e).map(function(t){return t.replace(yM,"$2")}))}function Bp(e){return e.match(mM)||[""]}function xM(e,t,n){var r=e.length,i,s,o,a;for(s=0;s<r;s++)i=e[s],i&&(kM(i)&&(i='"'+i+'"'),a=Qm(i),o=!a&&/^\d+$/.test(i),t.call(n,i,a,o,s,e))}function Qm(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function wM(e){return e.match(gM)&&!e.match(uS)}function bM(e){return vM.test(e)}function kM(e){return!Qm(e)&&(wM(e)||bM(e))}const SM=/[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,Ru=e=>e.match(SM)||[],Pu=e=>e[0].toUpperCase()+e.slice(1),Km=(e,t)=>Ru(e).join(t).toLowerCase(),dS=e=>Ru(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),CM=e=>Pu(dS(e)),_M=e=>Km(e,"_"),TM=e=>Km(e,"-"),EM=e=>Pu(Km(e," ")),AM=e=>Ru(e).map(Pu).join(" ");var Wd={words:Ru,upperFirst:Pu,camelCase:dS,pascalCase:CM,snakeCase:_M,kebabCase:TM,sentenceCase:EM,titleCase:AM},Xm={exports:{}};Xm.exports=function(e){return fS(jM(e),e)};Xm.exports.array=fS;function fS(e,t){var n=e.length,r=new Array(n),i={},s=n,o=RM(t),a=PM(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 p;try{p=", node was:"+JSON.stringify(c)}catch{p=""}throw new Error("Cyclic dependency"+p)}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 h=o.get(c)||new Set;if(h=Array.from(h),d=h.length){u.add(c);do{var y=h[--d];l(y,a.get(y),u)}while(d);u.delete(c)}r[--n]=c}}}function jM(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 RM(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 PM(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var MM=Xm.exports;const OM=Rr(MM),NM=Object.prototype.toString,DM=Error.prototype.toString,IM=RegExp.prototype.toString,LM=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",FM=/^Symbol\((.*)\)(.*)$/;function BM(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function w0(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return BM(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return LM.call(e).replace(FM,"Symbol($1)");const r=NM.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+DM.call(e)+"]":r==="RegExp"?IM.call(e):null}function ci(e,t){let n=w0(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let s=w0(this[r],t);return s!==null?s:i},2)}function pS(e){return e==null?[]:[].concat(e)}let hS,mS,gS,$M=/\$\{\s*(\w+)\s*\}/g;hS=Symbol.toStringTag;class b0{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[hS]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],pS(t).forEach(s=>{if(Wt.isError(s)){this.errors.push(...s.errors);const o=s.inner.length?s.inner:[s];this.inner.push(...o)}else this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}mS=Symbol.hasInstance;gS=Symbol.toStringTag;class Wt extends Error{static formatError(t,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof t=="string"?t.replace($M,(i,s)=>ci(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 b0(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[gS]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Wt)}static[mS](t){return b0[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Qn={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 \`${ci(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${ci(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${ci(n,!0)}\``+i}},$t={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"},zM={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"},$p={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},VM={isValue:"${path} field must be ${value}"},lc={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},UM={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"},HM={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: \`${ci(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: \`${ci(n,!0)}\``}return Wt.formatError(Qn.notType,e)}};Object.assign(Object.create(null),{mixed:Qn,string:$t,number:zM,date:$p,object:lc,array:UM,boolean:VM,tuple:HM});const Zm=e=>e&&e.__isYupSchema__;class Qc{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 Qc(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(!Zm(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const Bl={context:"$",value:"."};class ds{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]===Bl.context,this.isValue=this.key[0]===Bl.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?Bl.context:this.isValue?Bl.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&Qi.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}}ds.prototype.__isYupRef=!0;const Ii=e=>e==null;function bs(e){function t({value:n,path:r="",options:i,originalValue:s,schema:o},a,l){const{name:c,test:d,params:u,message:p,skipAbsent:h}=e;let{parent:y,context:x,abortEarly:w=o.spec.abortEarly,disableStackTrace:m=o.spec.disableStackTrace}=i;function g(F){return ds.isRef(F)?F.getValue(n,y,x):F}function b(F={}){const D=Object.assign({value:n,originalValue:s,label:o.spec.label,path:F.path||r,spec:o.spec,disableStackTrace:F.disableStackTrace||m},u,F.params);for(const z of Object.keys(D))D[z]=g(D[z]);const G=new Wt(Wt.formatError(F.message||p,D),n,D.path,F.type||c,D.disableStackTrace);return G.params=D,G}const C=w?a:l;let S={path:r,parent:y,type:c,from:i.from,createError:b,resolve:g,options:i,originalValue:s,schema:o};const _=F=>{Wt.isError(F)?C(F):F?l(null):C(b())},j=F=>{Wt.isError(F)?C(F):a(F)};if(h&&Ii(n))return _(!0);let E;try{var L;if(E=d.call(S,n,S),typeof((L=E)==null?void 0:L.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${S.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(E).then(_,j)}}catch(F){j(F);return}_(E)}return t.OPTIONS=e,t}function WM(e,t,n,r=n){let i,s,o;return t?(Qi.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",p=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&&p>=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[p],e=u?e.spec.types[p]: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 Kc extends Set{describe(){const t=[];for(const n of this.values())t.push(ds.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 Kc(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function Bs(e,t=new Map){if(Zm(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]=Bs(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,Bs(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(Bs(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=Bs(i,t)}else throw Error(`Unable to clone ${e}`);return n}class lr{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 Kc,this._blacklist=new Kc,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Qn.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=Bs(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&&Ii(s))return s;let o=ci(t),a=ci(s);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
86
+ */var Nu=g,tM=eM;function nM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var rM=typeof Object.is=="function"?Object.is:nM,iM=tM.useSyncExternalStore,sM=Nu.useRef,oM=Nu.useEffect,aM=Nu.useMemo,lM=Nu.useDebugValue;vS.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=sM(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=aM(function(){function l(h){if(!c){if(c=!0,d=h,h=r(h),i!==void 0&&o.hasValue){var y=o.value;if(i(y,h))return u=y}return u=h}if(y=u,rM(d,h))return y;var w=r(h);return i!==void 0&&i(y,w)?y:(d=h,u=w)}var c=!1,d,u,p=n===void 0?null:n;return[function(){return l(t())},p===null?void 0:function(){return l(p())}]},[t,n,r,i]);var a=iM(e,s[0],s[1]);return oM(function(){o.hasValue=!0,o.value=a},[a]),lM(a),a};gS.exports=vS;var cM=gS.exports;const uM=Pr(cM),wS={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:dM}=ee,{useSyncExternalStoreWithSelector:fM}=uM;let k0=!1;const pM=e=>e;function hM(e,t=pM,n){(wS?"production":void 0)!=="production"&&n&&!k0&&(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"),k0=!0);const r=fM(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return dM(r),r}const S0=e=>{(wS?"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"?HP(e):e,n=(r,i)=>hM(t,r,i);return Object.assign(n,t),n},mM=e=>e?S0(e):S0,ne=mM(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,showActionButtons:!1,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=>{var n;if(e({isHaveChat:t}),localStorage.setItem("lc:widget:isHaveChat",t.toString()),!t){e({showActionButtons:!1});const r=(n=ne.getState().widget)==null?void 0:n.link_id;r&&localStorage.setItem(`${r}:showActionButtons`,"false")}},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}),historyChat:null,setHistoryChat:t=>e({historyChat:t}),historyMessages:null,setHistoryMessages:t=>e({historyMessages:t}),showHistoryOnRegistration:!1,setShowHistoryOnRegistration:t=>e({showHistoryOnRegistration:t}),aiAgent:null,setAIAgent:t=>e(n=>{var i;const r=(i=n.widget)==null?void 0:i.link_id;return r&&Vl(r,t,n.isAIAgentMode,n.aiAgentSessionId,n.humanNeedRequested),{aiAgent:t}}),isAIAgentMode:!1,setIsAIAgentMode:t=>e(n=>{var i;const r=(i=n.widget)==null?void 0:i.link_id;return r&&Vl(r,n.aiAgent,t,n.aiAgentSessionId,n.humanNeedRequested),{isAIAgentMode:t}}),aiAgentSessionId:null,setAIAgentSessionId:t=>e(n=>{var i;const r=(i=n.widget)==null?void 0:i.link_id;return r&&Vl(r,n.aiAgent,n.isAIAgentMode,t,n.humanNeedRequested),{aiAgentSessionId:t}}),humanNeedRequested:!1,setHumanNeedRequested:t=>e(n=>{var i;const r=(i=n.widget)==null?void 0:i.link_id;if(r){const s=`${r}:`;t?localStorage.setItem(`${s}${rt.HumanNeedRequested}`,"true"):localStorage.removeItem(`${s}${rt.HumanNeedRequested}`),n.aiAgent&&n.isAIAgentMode&&Vl(r,n.aiAgent,n.isAIAgentMode,n.aiAgentSessionId,t)}return{humanNeedRequested:t}}),aiAgentMessages:[],setAIAgentMessages:t=>e(n=>({aiAgentMessages:typeof t=="function"?t(n.aiAgentMessages):t})),addAIAgentMessage:t=>e(n=>({aiAgentMessages:[...n.aiAgentMessages,t]})),clearAIAgentState:()=>e(t=>{var r;const n=(r=t.widget)==null?void 0:r.link_id;return n&&Zm(n),{aiAgent:null,isAIAgentMode:!1,aiAgentSessionId:null,humanNeedRequested:!1,aiAgentMessages:[],connectingToOperator:!1,showOperatorForm:!1}}),connectingToOperator:!1,setConnectingToOperator:t=>e({connectingToOperator:t}),showOperatorForm:!1,setShowOperatorForm:t=>e({showOperatorForm:t}),setShowActionButtons:t=>e(n=>{var i;const r=(i=n.widget)==null?void 0:i.link_id;return r&&localStorage.setItem(`${r}:showActionButtons`,t.toString()),{showActionButtons:t}})})),gM=e=>({accessToken:localStorage.getItem(`${e}:${rt.CustomerToken}`)||"",refreshToken:localStorage.getItem(`${e}:${rt.CustomerRefreshToken}`)||""}),fl=()=>{const{widget:e}=ne();return e?gM(e.link_id):null},Yi=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}},Qs=e=>{const t=document.cookie.split(";").find(n=>n.includes(e));return t?t.split("=")[1]:null},vM=e=>na(rt.DeviceId,e)||Qs("device_id")||Rr(e),Qi=(e,t)=>({...e,"X-Device-Id":vM(t)});function Up(e){return e&&typeof e=="object"&&"customer_token"in e&&"customer_refresh_token"in e}const Jm=()=>hm({mutationFn:e=>Nr(`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,device_id:e.device_id,is_agent_mode:e.is_agent_mode,widget_version:"2026.01.05-1"})})}),yM=(e,t)=>Nr(`clients/${e}/chats`,{headers:t}),dc=(e,t)=>Nr(`clients/${e}/chats`,{method:"DELETE",headers:t}),xM=(e,t,n,r)=>Nr("review",{method:"POST",body:JSON.stringify({rating:e,comment:t||void 0}),headers:Qi(n??{},r)}),wM=()=>{const e=fl(),{widget:t}=ne(),n=(t==null?void 0:t.link_id)??"";return hm({mutationFn:r=>xM(r.rating,r.comment,Yi(e),n)})},bM=e=>{const t=fl(),{widget:n}=ne(),r=(n==null?void 0:n.link_id)??"";return hm({mutationFn:i=>Nr(`clients/${e}/chats/files`,{method:"POST",headers:Qi(Yi(t),r),body:HT({files:i},{arrayWithBracketAndIndex:!1,arrayWithBrackets:!1})})})};function kM(e){return e&&typeof e=="object"&&"file_urls"in e}const SM=e=>{const t=`${hb}/visitors/identify`,n=JSON.stringify(e);try{fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:n,keepalive:!0,credentials:"include"}).catch(()=>{if(navigator.sendBeacon){const r=new Blob([n],{type:"application/json"});navigator.sendBeacon(t,r)}})}catch{if(navigator.sendBeacon){const r=new Blob([n],{type:"application/json"});navigator.sendBeacon(t,r)}}},CM=(e,t)=>jb({queryKey:["visitors","history",e,t],queryFn:()=>Nr(`visitors/history?widget_id=${e}&device_id=${t}`),enabled:!!e&&!!t}),_M=(e,t,n)=>Nr(`visitors/chats/${e}/messages?widget_id=${t}&device_id=${n}`);async function TM(e){const[t,n]=await Nr(`widgets/${e}/agent`);return n===204?[null,n]:[t,n]}function ds(e){this._maxSize=e,this.clear()}ds.prototype.clear=function(){this._size=0,this._values=Object.create(null)};ds.prototype.get=function(e){return this._values[e]};ds.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var EM=/[^.^\]^[]+|(?=\[\]|\.\.)/g,bS=/^\d+$/,AM=/^\d/,jM=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,RM=/^\s*(['"]?)(.*?)(\1)\s*$/,eg=512,C0=new ds(eg),_0=new ds(eg),T0=new ds(eg),Ki={Cache:ds,split:Hp,normalizePath:Yd,setter:function(e){var t=Yd(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=Yd(e);return T0.get(e)||T0.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+(tg(n)||bS.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){PM(Array.isArray(e)?e:Hp(e),t,n)}};function Yd(e){return C0.get(e)||C0.set(e,Hp(e).map(function(t){return t.replace(RM,"$2")}))}function Hp(e){return e.match(EM)||[""]}function PM(e,t,n){var r=e.length,i,s,o,a;for(s=0;s<r;s++)i=e[s],i&&(OM(i)&&(i='"'+i+'"'),a=tg(i),o=!a&&/^\d+$/.test(i),t.call(n,i,a,o,s,e))}function tg(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function MM(e){return e.match(AM)&&!e.match(bS)}function NM(e){return jM.test(e)}function OM(e){return!tg(e)&&(MM(e)||NM(e))}const DM=/[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,Ou=e=>e.match(DM)||[],Du=e=>e[0].toUpperCase()+e.slice(1),ng=(e,t)=>Ou(e).join(t).toLowerCase(),kS=e=>Ou(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),IM=e=>Du(kS(e)),LM=e=>ng(e,"_"),FM=e=>ng(e,"-"),$M=e=>Du(ng(e," ")),BM=e=>Ou(e).map(Du).join(" ");var Qd={words:Ou,upperFirst:Du,camelCase:kS,pascalCase:IM,snakeCase:LM,kebabCase:FM,sentenceCase:$M,titleCase:BM},rg={exports:{}};rg.exports=function(e){return SS(zM(e),e)};rg.exports.array=SS;function SS(e,t){var n=e.length,r=new Array(n),i={},s=n,o=VM(t),a=UM(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 p;try{p=", node was:"+JSON.stringify(c)}catch{p=""}throw new Error("Cyclic dependency"+p)}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 h=o.get(c)||new Set;if(h=Array.from(h),d=h.length){u.add(c);do{var y=h[--d];l(y,a.get(y),u)}while(d);u.delete(c)}r[--n]=c}}}function zM(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 VM(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 UM(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var HM=rg.exports;const WM=Pr(HM),qM=Object.prototype.toString,GM=Error.prototype.toString,YM=RegExp.prototype.toString,QM=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",KM=/^Symbol\((.*)\)(.*)$/;function XM(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function E0(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return XM(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return QM.call(e).replace(KM,"Symbol($1)");const r=qM.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+GM.call(e)+"]":r==="RegExp"?YM.call(e):null}function ui(e,t){let n=E0(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let s=E0(this[r],t);return s!==null?s:i},2)}function CS(e){return e==null?[]:[].concat(e)}let _S,TS,ES,ZM=/\$\{\s*(\w+)\s*\}/g;_S=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[_S]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],CS(t).forEach(s=>{if(Wt.isError(s)){this.errors.push(...s.errors);const o=s.inner.length?s.inner:[s];this.inner.push(...o)}else this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}TS=Symbol.hasInstance;ES=Symbol.toStringTag;class Wt extends Error{static formatError(t,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof t=="string"?t.replace(ZM,(i,s)=>ui(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[ES]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Wt)}static[TS](t){return A0[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Qn={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 \`${ui(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${ui(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${ui(n,!0)}\``+i}},Bt={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"},JM={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"},Wp={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},eN={isValue:"${path} field must be ${value}"},fc={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},tN={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"},nN={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: \`${ui(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: \`${ui(n,!0)}\``}return Wt.formatError(Qn.notType,e)}};Object.assign(Object.create(null),{mixed:Qn,string:Bt,number:JM,date:Wp,object:fc,array:tN,boolean:eN,tuple:nN});const ig=e=>e&&e.__isYupSchema__;class Jc{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 Jc(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(!ig(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const Ul={context:"$",value:"."};class fs{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]===Ul.context,this.isValue=this.key[0]===Ul.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?Ul.context:this.isValue?Ul.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&Ki.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}}fs.prototype.__isYupRef=!0;const Ii=e=>e==null;function ks(e){function t({value:n,path:r="",options:i,originalValue:s,schema:o},a,l){const{name:c,test:d,params:u,message:p,skipAbsent:h}=e;let{parent:y,context:w,abortEarly:b=o.spec.abortEarly,disableStackTrace:m=o.spec.disableStackTrace}=i;function v(L){return fs.isRef(L)?L.getValue(n,y,w):L}function x(L={}){const O=Object.assign({value:n,originalValue:s,label:o.spec.label,path:L.path||r,spec:o.spec,disableStackTrace:L.disableStackTrace||m},u,L.params);for(const $ of Object.keys(O))O[$]=v(O[$]);const q=new Wt(Wt.formatError(L.message||p,O),n,O.path,L.type||c,O.disableStackTrace);return q.params=O,q}const S=b?a:l;let C={path:r,parent:y,type:c,from:i.from,createError:x,resolve:v,options:i,originalValue:s,schema:o};const _=L=>{Wt.isError(L)?S(L):L?l(null):S(x())},j=L=>{Wt.isError(L)?S(L):a(L)};if(h&&Ii(n))return _(!0);let E;try{var D;if(E=d.call(C,n,C),typeof((D=E)==null?void 0:D.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${C.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(E).then(_,j)}}catch(L){j(L);return}_(E)}return t.OPTIONS=e,t}function rN(e,t,n,r=n){let i,s,o;return t?(Ki.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",p=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&&p>=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[p],e=u?e.spec.types[p]: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 eu extends Set{describe(){const t=[];for(const n of this.values())t.push(fs.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new eu(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function Bs(e,t=new Map){if(ig(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]=Bs(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,Bs(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(Bs(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=Bs(i,t)}else throw Error(`Unable to clone ${e}`);return n}class lr{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new eu,this._blacklist=new eu,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Qn.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=Bs(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&&Ii(s))return s;let o=ui(t),a=ui(s);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
87
87
 
88
88
  attempted value: ${o}
89
- `+(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=x=>{i||(i=!0,n(x,o))},u=x=>{i||(i=!0,r(x,o))},p=s.length,h=[];if(!p)return u([]);let y={value:o,originalValue:a,path:l,options:c,schema:this};for(let x=0;x<s.length;x++){const w=s[x];w(y,d,function(g){g&&(Array.isArray(g)?h.push(...g):h.push(g)),--p<=0&&u(h)})}}asNestedTest({key:t,index:n,parent:r,parentPath:i,originalParent:s,options:o}){const a=t??n;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof a=="number";let c=r[a];const 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,p,h)=>this.resolve(d)._validate(c,d,p,h)}validate(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return new Promise((o,a)=>i._validate(t,n,(l,c)=>{Wt.isError(l)&&(l.value=c),a(l)},(l,c)=>{l.length?a(new Wt(l,c,void 0,void 0,s)):o(c)}))}validateSync(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s,o=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return i._validate(t,Object.assign({},n,{sync:!0}),(a,l)=>{throw Wt.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new Wt(a,t,void 0,void 0,o);s=l}),s}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(Wt.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(Wt.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Bs(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=bs({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=bs({message:n,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=Qn.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Qn.notNull){return this.nullability(!1,t)}required(t=Qn.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=Qn.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=bs(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=pS(t).map(s=>new ds(s));return i.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new Qc(i,n):Qc.fromOptions(i,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=bs({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=Qn.oneOf){let r=this.clone();return t.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r.internalTests.whiteList=bs({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=Qn.notOneOf){let r=this.clone();return t.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r.internalTests.blacklist=bs({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)}}}lr.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])lr.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:o}=WM(this,t,n,r.context);return o[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])lr.prototype[e]=lr.prototype.oneOf;for(const e of["not","nope"])lr.prototype[e]=lr.prototype.notOneOf;const qM=/^(\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=zp(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 zp(e){var t,n;const r=qM.exec(e);return r?{year:pr(r[1]),month:pr(r[2],1)-1,day:pr(r[3],1),hour:pr(r[4]),minute:pr(r[5]),second:pr(r[6]),millisecond:r[7]?pr(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:pr(r[10]),minuteOffset:pr(r[11])}:null}function pr(e,t=0){return Number(e)||t}let YM=/^[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])?)*$/,QM=/^((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,KM=/^(?:[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,XM="^\\d{4}-\\d{2}-\\d{2}",ZM="\\d{2}:\\d{2}:\\d{2}",JM="(([+-]\\d{2}(:?\\d{2})?)|Z)",eO=new RegExp(`${XM}T${ZM}(\\.\\d+)?${JM}$`),tO=e=>Ii(e)||e===e.trim(),nO={}.toString();function Xc(){return new vS}class vS extends lr{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===nO?t:i})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||Qn.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=$t.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=$t.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=$t.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||$t.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&r||o.search(t)!==-1})}email(t=$t.email){return this.matches(YM,{name:"email",message:t,excludeEmptyString:!0})}url(t=$t.url){return this.matches(QM,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=$t.uuid){return this.matches(KM,{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(eO,{name:"datetime",message:n||$t.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||$t.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:s=>{if(!s||r)return!0;const o=zp(s);return o?!!o.z:!1}}).test({name:"datetime_precision",message:n||$t.datetime_precision,params:{precision:i},skipAbsent:!0,test:s=>{if(!s||i==null)return!0;const o=zp(s);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=$t.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:tO})}lowercase(t=$t.lowercase){return this.transform(n=>Ii(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Ii(n)||n===n.toLowerCase()})}uppercase(t=$t.uppercase){return this.transform(n=>Ii(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Ii(n)||n===n.toUpperCase()})}}Xc.prototype=vS.prototype;let rO=new Date(""),iO=e=>Object.prototype.toString.call(e)==="[object Date]";class Mu extends lr{constructor(){super({type:"date",check(t){return iO(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)?Mu.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(ds.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=$p.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=$p.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)}})}}Mu.INVALID_DATE=rO;Mu.prototype;function sO(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([o,a])=>`${o}-${a}`));function s(o,a){let l=Qi.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),ds.isRef(a)&&a.isSibling?s(a.path,o):Zm(a)&&"deps"in a&&a.deps.forEach(l=>s(l,o))}return OM.array(Array.from(r),n).reverse()}function k0(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 yS(e){return(t,n)=>k0(e,t)-k0(e,n)}const oO=(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 cc(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=cc(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=cc(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(cc)}):"optional"in e?e.optional():e}const aO=(e,t)=>{const n=[...Qi.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),i=Qi.getter(Qi.join(n),!0)(e);return!!(i&&r in i)};let S0=e=>Object.prototype.toString.call(e)==="[object Object]";function C0(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const lO=yS([]);function Jm(e){return new xS(e)}class xS extends lr{constructor(t){super({type:"object",check(n){return S0(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=lO,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 p=s[u],h=u in i;if(p){let y,x=i[u];c.path=(n.path?`${n.path}.`:"")+u,p=p.resolve({value:x,context:n.context,parent:l});let w=p instanceof lr?p.spec:void 0,m=w==null?void 0:w.strict;if(w!=null&&w.strip){d=d||u in i;continue}y=!n.__validating||!m?p.cast(i[u],c):i[u],y!==void 0&&(l[u]=y)}else h&&!o&&(l[u]=i[u]);(h!==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||!S0(c)){i(l,c);return}o=o||c;let d=[];for(let u of this._nodes){let p=this.fields[u];!p||ds.isRef(p)||d.push(p.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=sO(t,n),r._sortErrors=yS(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 cc(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=Qi.getter(t,!0);return this.transform(s=>{if(!s)return s;let o=s;return aO(s,t)&&(o=Object.assign({},s),r||delete o[t],o[n]=i(s)),o})}json(){return this.transform(oO)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||lc.exact,test(n){if(n==null)return!0;const r=C0(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=lc.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=C0(this.schema,i);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=lc.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(Wd.camelCase)}snakeCase(){return this.transformKeys(Wd.snakeCase)}constantCase(){return this.transformKeys(t=>Wd.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}}Jm.prototype=xS.prototype;var cO=function(t){return uO(t)&&!dO(t)};function uO(e){return!!e&&typeof e=="object"}function dO(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||hO(e)}var fO=typeof Symbol=="function"&&Symbol.for,pO=fO?Symbol.for("react.element"):60103;function hO(e){return e.$$typeof===pO}function mO(e){return Array.isArray(e)?[]:{}}function Zc(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Wa(mO(e),e,t):e}function gO(e,t,n){return e.concat(t).map(function(r){return Zc(r,n)})}function vO(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(i){r[i]=Zc(e[i],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=Zc(t[i],n):r[i]=Wa(e[i],t[i],n)}),r}function Wa(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||gO,n.isMergeableObject=n.isMergeableObject||cO;var r=Array.isArray(t),i=Array.isArray(e),s=r===i;return s?r?n.arrayMerge(e,t,n):vO(e,t,n):Zc(t,n)}Wa.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return Wa(r,i,n)},{})};var Vp=Wa,wS=typeof global=="object"&&global&&global.Object===Object&&global,yO=typeof self=="object"&&self&&self.Object===Object&&self,ur=wS||yO||Function("return this")(),gi=ur.Symbol,bS=Object.prototype,xO=bS.hasOwnProperty,wO=bS.toString,Uo=gi?gi.toStringTag:void 0;function bO(e){var t=xO.call(e,Uo),n=e[Uo];try{e[Uo]=void 0;var r=!0}catch{}var i=wO.call(e);return r&&(t?e[Uo]=n:delete e[Uo]),i}var kO=Object.prototype,SO=kO.toString;function CO(e){return SO.call(e)}var _O="[object Null]",TO="[object Undefined]",_0=gi?gi.toStringTag:void 0;function fs(e){return e==null?e===void 0?TO:_O:_0&&_0 in Object(e)?bO(e):CO(e)}function kS(e,t){return function(n){return e(t(n))}}var eg=kS(Object.getPrototypeOf,Object);function ps(e){return e!=null&&typeof e=="object"}var EO="[object Object]",AO=Function.prototype,jO=Object.prototype,SS=AO.toString,RO=jO.hasOwnProperty,PO=SS.call(Object);function T0(e){if(!ps(e)||fs(e)!=EO)return!1;var t=eg(e);if(t===null)return!0;var n=RO.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&SS.call(n)==PO}function MO(){this.__data__=[],this.size=0}function CS(e,t){return e===t||e!==e&&t!==t}function Ou(e,t){for(var n=e.length;n--;)if(CS(e[n][0],t))return n;return-1}var OO=Array.prototype,NO=OO.splice;function DO(e){var t=this.__data__,n=Ou(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():NO.call(t,n,1),--this.size,!0}function IO(e){var t=this.__data__,n=Ou(t,e);return n<0?void 0:t[n][1]}function LO(e){return Ou(this.__data__,e)>-1}function FO(e,t){var n=this.__data__,r=Ou(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Or(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])}}Or.prototype.clear=MO;Or.prototype.delete=DO;Or.prototype.get=IO;Or.prototype.has=LO;Or.prototype.set=FO;function BO(){this.__data__=new Or,this.size=0}function $O(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function zO(e){return this.__data__.get(e)}function VO(e){return this.__data__.has(e)}function cl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var UO="[object AsyncFunction]",HO="[object Function]",WO="[object GeneratorFunction]",qO="[object Proxy]";function _S(e){if(!cl(e))return!1;var t=fs(e);return t==HO||t==WO||t==UO||t==qO}var qd=ur["__core-js_shared__"],E0=function(){var e=/[^.]+$/.exec(qd&&qd.keys&&qd.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function GO(e){return!!E0&&E0 in e}var YO=Function.prototype,QO=YO.toString;function hs(e){if(e!=null){try{return QO.call(e)}catch{}try{return e+""}catch{}}return""}var KO=/[\\^$.*+?()[\]{}|]/g,XO=/^\[object .+?Constructor\]$/,ZO=Function.prototype,JO=Object.prototype,eN=ZO.toString,tN=JO.hasOwnProperty,nN=RegExp("^"+eN.call(tN).replace(KO,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function rN(e){if(!cl(e)||GO(e))return!1;var t=_S(e)?nN:XO;return t.test(hs(e))}function iN(e,t){return e==null?void 0:e[t]}function ms(e,t){var n=iN(e,t);return rN(n)?n:void 0}var qa=ms(ur,"Map"),Ga=ms(Object,"create");function sN(){this.__data__=Ga?Ga(null):{},this.size=0}function oN(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var aN="__lodash_hash_undefined__",lN=Object.prototype,cN=lN.hasOwnProperty;function uN(e){var t=this.__data__;if(Ga){var n=t[e];return n===aN?void 0:n}return cN.call(t,e)?t[e]:void 0}var dN=Object.prototype,fN=dN.hasOwnProperty;function pN(e){var t=this.__data__;return Ga?t[e]!==void 0:fN.call(t,e)}var hN="__lodash_hash_undefined__";function mN(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ga&&t===void 0?hN:t,this}function is(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])}}is.prototype.clear=sN;is.prototype.delete=oN;is.prototype.get=uN;is.prototype.has=pN;is.prototype.set=mN;function gN(){this.size=0,this.__data__={hash:new is,map:new(qa||Or),string:new is}}function vN(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Nu(e,t){var n=e.__data__;return vN(t)?n[typeof t=="string"?"string":"hash"]:n.map}function yN(e){var t=Nu(this,e).delete(e);return this.size-=t?1:0,t}function xN(e){return Nu(this,e).get(e)}function wN(e){return Nu(this,e).has(e)}function bN(e,t){var n=Nu(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function bi(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])}}bi.prototype.clear=gN;bi.prototype.delete=yN;bi.prototype.get=xN;bi.prototype.has=wN;bi.prototype.set=bN;var kN=200;function SN(e,t){var n=this.__data__;if(n instanceof Or){var r=n.__data__;if(!qa||r.length<kN-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new bi(r)}return n.set(e,t),this.size=n.size,this}function jo(e){var t=this.__data__=new Or(e);this.size=t.size}jo.prototype.clear=BO;jo.prototype.delete=$O;jo.prototype.get=zO;jo.prototype.has=VO;jo.prototype.set=SN;function CN(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var A0=function(){try{var e=ms(Object,"defineProperty");return e({},"",{}),e}catch{}}();function TS(e,t,n){t=="__proto__"&&A0?A0(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var _N=Object.prototype,TN=_N.hasOwnProperty;function ES(e,t,n){var r=e[t];(!(TN.call(e,t)&&CS(r,n))||n===void 0&&!(t in e))&&TS(e,t,n)}function Du(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?TS(n,a,l):ES(n,a,l)}return n}function EN(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var AN="[object Arguments]";function j0(e){return ps(e)&&fs(e)==AN}var AS=Object.prototype,jN=AS.hasOwnProperty,RN=AS.propertyIsEnumerable,PN=j0(function(){return arguments}())?j0:function(e){return ps(e)&&jN.call(e,"callee")&&!RN.call(e,"callee")},ul=Array.isArray;function MN(){return!1}var jS=typeof rn=="object"&&rn&&!rn.nodeType&&rn,R0=jS&&typeof sn=="object"&&sn&&!sn.nodeType&&sn,ON=R0&&R0.exports===jS,P0=ON?ur.Buffer:void 0,NN=P0?P0.isBuffer:void 0,RS=NN||MN,DN=9007199254740991,IN=/^(?:0|[1-9]\d*)$/;function LN(e,t){var n=typeof e;return t=t??DN,!!t&&(n=="number"||n!="symbol"&&IN.test(e))&&e>-1&&e%1==0&&e<t}var FN=9007199254740991;function PS(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=FN}var BN="[object Arguments]",$N="[object Array]",zN="[object Boolean]",VN="[object Date]",UN="[object Error]",HN="[object Function]",WN="[object Map]",qN="[object Number]",GN="[object Object]",YN="[object RegExp]",QN="[object Set]",KN="[object String]",XN="[object WeakMap]",ZN="[object ArrayBuffer]",JN="[object DataView]",e4="[object Float32Array]",t4="[object Float64Array]",n4="[object Int8Array]",r4="[object Int16Array]",i4="[object Int32Array]",s4="[object Uint8Array]",o4="[object Uint8ClampedArray]",a4="[object Uint16Array]",l4="[object Uint32Array]",$e={};$e[e4]=$e[t4]=$e[n4]=$e[r4]=$e[i4]=$e[s4]=$e[o4]=$e[a4]=$e[l4]=!0;$e[BN]=$e[$N]=$e[ZN]=$e[zN]=$e[JN]=$e[VN]=$e[UN]=$e[HN]=$e[WN]=$e[qN]=$e[GN]=$e[YN]=$e[QN]=$e[KN]=$e[XN]=!1;function c4(e){return ps(e)&&PS(e.length)&&!!$e[fs(e)]}function tg(e){return function(t){return e(t)}}var MS=typeof rn=="object"&&rn&&!rn.nodeType&&rn,ha=MS&&typeof sn=="object"&&sn&&!sn.nodeType&&sn,u4=ha&&ha.exports===MS,Gd=u4&&wS.process,yo=function(){try{var e=ha&&ha.require&&ha.require("util").types;return e||Gd&&Gd.binding&&Gd.binding("util")}catch{}}(),M0=yo&&yo.isTypedArray,d4=M0?tg(M0):c4,f4=Object.prototype,p4=f4.hasOwnProperty;function OS(e,t){var n=ul(e),r=!n&&PN(e),i=!n&&!r&&RS(e),s=!n&&!r&&!i&&d4(e),o=n||r||i||s,a=o?EN(e.length,String):[],l=a.length;for(var c in e)(t||p4.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||LN(c,l)))&&a.push(c);return a}var h4=Object.prototype;function ng(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||h4;return e===n}var m4=kS(Object.keys,Object),g4=Object.prototype,v4=g4.hasOwnProperty;function y4(e){if(!ng(e))return m4(e);var t=[];for(var n in Object(e))v4.call(e,n)&&n!="constructor"&&t.push(n);return t}function NS(e){return e!=null&&PS(e.length)&&!_S(e)}function rg(e){return NS(e)?OS(e):y4(e)}function x4(e,t){return e&&Du(t,rg(t),e)}function w4(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var b4=Object.prototype,k4=b4.hasOwnProperty;function S4(e){if(!cl(e))return w4(e);var t=ng(e),n=[];for(var r in e)r=="constructor"&&(t||!k4.call(e,r))||n.push(r);return n}function ig(e){return NS(e)?OS(e,!0):S4(e)}function C4(e,t){return e&&Du(t,ig(t),e)}var DS=typeof rn=="object"&&rn&&!rn.nodeType&&rn,O0=DS&&typeof sn=="object"&&sn&&!sn.nodeType&&sn,_4=O0&&O0.exports===DS,N0=_4?ur.Buffer:void 0,D0=N0?N0.allocUnsafe:void 0;function T4(e,t){if(t)return e.slice();var n=e.length,r=D0?D0(n):new e.constructor(n);return e.copy(r),r}function IS(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function E4(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 LS(){return[]}var A4=Object.prototype,j4=A4.propertyIsEnumerable,I0=Object.getOwnPropertySymbols,sg=I0?function(e){return e==null?[]:(e=Object(e),E4(I0(e),function(t){return j4.call(e,t)}))}:LS;function R4(e,t){return Du(e,sg(e),t)}function FS(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var P4=Object.getOwnPropertySymbols,BS=P4?function(e){for(var t=[];e;)FS(t,sg(e)),e=eg(e);return t}:LS;function M4(e,t){return Du(e,BS(e),t)}function $S(e,t,n){var r=t(e);return ul(e)?r:FS(r,n(e))}function O4(e){return $S(e,rg,sg)}function N4(e){return $S(e,ig,BS)}var Up=ms(ur,"DataView"),Hp=ms(ur,"Promise"),Wp=ms(ur,"Set"),qp=ms(ur,"WeakMap"),L0="[object Map]",D4="[object Object]",F0="[object Promise]",B0="[object Set]",$0="[object WeakMap]",z0="[object DataView]",I4=hs(Up),L4=hs(qa),F4=hs(Hp),B4=hs(Wp),$4=hs(qp),yr=fs;(Up&&yr(new Up(new ArrayBuffer(1)))!=z0||qa&&yr(new qa)!=L0||Hp&&yr(Hp.resolve())!=F0||Wp&&yr(new Wp)!=B0||qp&&yr(new qp)!=$0)&&(yr=function(e){var t=fs(e),n=t==D4?e.constructor:void 0,r=n?hs(n):"";if(r)switch(r){case I4:return z0;case L4:return L0;case F4:return F0;case B4:return B0;case $4:return $0}return t});var z4=Object.prototype,V4=z4.hasOwnProperty;function U4(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&V4.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var V0=ur.Uint8Array;function og(e){var t=new e.constructor(e.byteLength);return new V0(t).set(new V0(e)),t}function H4(e,t){var n=t?og(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var W4=/\w*$/;function q4(e){var t=new e.constructor(e.source,W4.exec(e));return t.lastIndex=e.lastIndex,t}var U0=gi?gi.prototype:void 0,H0=U0?U0.valueOf:void 0;function G4(e){return H0?Object(H0.call(e)):{}}function Y4(e,t){var n=t?og(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Q4="[object Boolean]",K4="[object Date]",X4="[object Map]",Z4="[object Number]",J4="[object RegExp]",eD="[object Set]",tD="[object String]",nD="[object Symbol]",rD="[object ArrayBuffer]",iD="[object DataView]",sD="[object Float32Array]",oD="[object Float64Array]",aD="[object Int8Array]",lD="[object Int16Array]",cD="[object Int32Array]",uD="[object Uint8Array]",dD="[object Uint8ClampedArray]",fD="[object Uint16Array]",pD="[object Uint32Array]";function hD(e,t,n){var r=e.constructor;switch(t){case rD:return og(e);case Q4:case K4:return new r(+e);case iD:return H4(e,n);case sD:case oD:case aD:case lD:case cD:case uD:case dD:case fD:case pD:return Y4(e,n);case X4:return new r;case Z4:case tD:return new r(e);case J4:return q4(e);case eD:return new r;case nD:return G4(e)}}var W0=Object.create,mD=function(){function e(){}return function(t){if(!cl(t))return{};if(W0)return W0(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function gD(e){return typeof e.constructor=="function"&&!ng(e)?mD(eg(e)):{}}var vD="[object Map]";function yD(e){return ps(e)&&yr(e)==vD}var q0=yo&&yo.isMap,xD=q0?tg(q0):yD,wD="[object Set]";function bD(e){return ps(e)&&yr(e)==wD}var G0=yo&&yo.isSet,kD=G0?tg(G0):bD,SD=1,CD=2,_D=4,zS="[object Arguments]",TD="[object Array]",ED="[object Boolean]",AD="[object Date]",jD="[object Error]",VS="[object Function]",RD="[object GeneratorFunction]",PD="[object Map]",MD="[object Number]",US="[object Object]",OD="[object RegExp]",ND="[object Set]",DD="[object String]",ID="[object Symbol]",LD="[object WeakMap]",FD="[object ArrayBuffer]",BD="[object DataView]",$D="[object Float32Array]",zD="[object Float64Array]",VD="[object Int8Array]",UD="[object Int16Array]",HD="[object Int32Array]",WD="[object Uint8Array]",qD="[object Uint8ClampedArray]",GD="[object Uint16Array]",YD="[object Uint32Array]",Ie={};Ie[zS]=Ie[TD]=Ie[FD]=Ie[BD]=Ie[ED]=Ie[AD]=Ie[$D]=Ie[zD]=Ie[VD]=Ie[UD]=Ie[HD]=Ie[PD]=Ie[MD]=Ie[US]=Ie[OD]=Ie[ND]=Ie[DD]=Ie[ID]=Ie[WD]=Ie[qD]=Ie[GD]=Ie[YD]=!0;Ie[jD]=Ie[VS]=Ie[LD]=!1;function ma(e,t,n,r,i,s){var o,a=t&SD,l=t&CD,c=t&_D;if(o!==void 0)return o;if(!cl(e))return e;var d=ul(e);if(d){if(o=U4(e),!a)return IS(e,o)}else{var u=yr(e),p=u==VS||u==RD;if(RS(e))return T4(e,a);if(u==US||u==zS||p&&!i){if(o=l||p?{}:gD(e),!a)return l?M4(e,C4(o,e)):R4(e,x4(o,e))}else{if(!Ie[u])return i?e:{};o=hD(e,u,a)}}s||(s=new jo);var h=s.get(e);if(h)return h;s.set(e,o),kD(e)?e.forEach(function(w){o.add(ma(w,t,n,w,e,s))}):xD(e)&&e.forEach(function(w,m){o.set(m,ma(w,t,n,m,e,s))});var y=c?l?N4:O4:l?ig:rg,x=d?void 0:y(e);return CN(x||e,function(w,m){x&&(m=w,w=e[m]),ES(o,m,ma(w,t,n,m,e,s))}),o}var QD=1,KD=4;function $l(e){return ma(e,QD|KD)}var Y0=Array.isArray,Q0=Object.keys,XD=Object.prototype.hasOwnProperty,ZD=typeof Element<"u";function Gp(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=Y0(e),r=Y0(t),i,s,o;if(n&&r){if(s=e.length,s!=t.length)return!1;for(i=s;i--!==0;)if(!Gp(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=Q0(e);if(s=u.length,s!==Q0(t).length)return!1;for(i=s;i--!==0;)if(!XD.call(t,u[i]))return!1;if(ZD&&e instanceof Element&&t instanceof Element)return e===t;for(i=s;i--!==0;)if(o=u[i],!(o==="_owner"&&e.$$typeof)&&!Gp(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var JD=function(t,n){try{return Gp(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 ji=Rr(JD);var eI=4;function K0(e){return ma(e,eI)}function HS(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 tI="[object Symbol]";function ag(e){return typeof e=="symbol"||ps(e)&&fs(e)==tI}var nI="Expected a function";function lg(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(nI);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(lg.Cache||bi),n}lg.Cache=bi;var rI=500;function iI(e){var t=lg(e,function(r){return n.size===rI&&n.clear(),r}),n=t.cache;return t}var sI=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oI=/\\(\\)?/g,aI=iI(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(sI,function(n,r,i,s){t.push(i?s.replace(oI,"$1"):r||n)}),t}),lI=1/0;function cI(e){if(typeof e=="string"||ag(e))return e;var t=e+"";return t=="0"&&1/e==-lI?"-0":t}var uI=1/0,X0=gi?gi.prototype:void 0,Z0=X0?X0.toString:void 0;function WS(e){if(typeof e=="string")return e;if(ul(e))return HS(e,WS)+"";if(ag(e))return Z0?Z0.call(e):"";var t=e+"";return t=="0"&&1/e==-uI?"-0":t}function dI(e){return e==null?"":WS(e)}function qS(e){return ul(e)?HS(e,cI):ag(e)?[e]:IS(aI(dI(e)))}var GS={exports:{}},Oe={};/** @license React v16.13.1
89
+ `+(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=w=>{i||(i=!0,n(w,o))},u=w=>{i||(i=!0,r(w,o))},p=s.length,h=[];if(!p)return u([]);let y={value:o,originalValue:a,path:l,options:c,schema:this};for(let w=0;w<s.length;w++){const b=s[w];b(y,d,function(v){v&&(Array.isArray(v)?h.push(...v):h.push(v)),--p<=0&&u(h)})}}asNestedTest({key:t,index:n,parent:r,parentPath:i,originalParent:s,options:o}){const a=t??n;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof a=="number";let c=r[a];const 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,p,h)=>this.resolve(d)._validate(c,d,p,h)}validate(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return new Promise((o,a)=>i._validate(t,n,(l,c)=>{Wt.isError(l)&&(l.value=c),a(l)},(l,c)=>{l.length?a(new Wt(l,c,void 0,void 0,s)):o(c)}))}validateSync(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s,o=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return i._validate(t,Object.assign({},n,{sync:!0}),(a,l)=>{throw Wt.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new Wt(a,t,void 0,void 0,o);s=l}),s}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(Wt.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(Wt.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Bs(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=ks({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=ks({message:n,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=Qn.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Qn.notNull){return this.nullability(!1,t)}required(t=Qn.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=Qn.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=ks(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=CS(t).map(s=>new fs(s));return i.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new Jc(i,n):Jc.fromOptions(i,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=ks({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=Qn.oneOf){let r=this.clone();return t.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r.internalTests.whiteList=ks({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=Qn.notOneOf){let r=this.clone();return t.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r.internalTests.blacklist=ks({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)}}}lr.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])lr.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:o}=rN(this,t,n,r.context);return o[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])lr.prototype[e]=lr.prototype.oneOf;for(const e of["not","nope"])lr.prototype[e]=lr.prototype.notOneOf;const iN=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function sN(e){const t=qp(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 qp(e){var t,n;const r=iN.exec(e);return r?{year:pr(r[1]),month:pr(r[2],1)-1,day:pr(r[3],1),hour:pr(r[4]),minute:pr(r[5]),second:pr(r[6]),millisecond:r[7]?pr(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:pr(r[10]),minuteOffset:pr(r[11])}:null}function pr(e,t=0){return Number(e)||t}let oN=/^[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])?)*$/,aN=/^((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,lN=/^(?:[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,cN="^\\d{4}-\\d{2}-\\d{2}",uN="\\d{2}:\\d{2}:\\d{2}",dN="(([+-]\\d{2}(:?\\d{2})?)|Z)",fN=new RegExp(`${cN}T${uN}(\\.\\d+)?${dN}$`),pN=e=>Ii(e)||e===e.trim(),hN={}.toString();function tu(){return new AS}class AS extends lr{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===hN?t:i})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||Qn.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=Bt.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=Bt.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=Bt.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||Bt.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&r||o.search(t)!==-1})}email(t=Bt.email){return this.matches(oN,{name:"email",message:t,excludeEmptyString:!0})}url(t=Bt.url){return this.matches(aN,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Bt.uuid){return this.matches(lN,{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(fN,{name:"datetime",message:n||Bt.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||Bt.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:s=>{if(!s||r)return!0;const o=qp(s);return o?!!o.z:!1}}).test({name:"datetime_precision",message:n||Bt.datetime_precision,params:{precision:i},skipAbsent:!0,test:s=>{if(!s||i==null)return!0;const o=qp(s);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Bt.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:pN})}lowercase(t=Bt.lowercase){return this.transform(n=>Ii(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Ii(n)||n===n.toLowerCase()})}uppercase(t=Bt.uppercase){return this.transform(n=>Ii(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Ii(n)||n===n.toUpperCase()})}}tu.prototype=AS.prototype;let mN=new Date(""),gN=e=>Object.prototype.toString.call(e)==="[object Date]";class Iu extends lr{constructor(){super({type:"date",check(t){return gN(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=sN(t),isNaN(t)?Iu.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(fs.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=Wp.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=Wp.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)}})}}Iu.INVALID_DATE=mN;Iu.prototype;function vN(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([o,a])=>`${o}-${a}`));function s(o,a){let l=Ki.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),fs.isRef(a)&&a.isSibling?s(a.path,o):ig(a)&&"deps"in a&&a.deps.forEach(l=>s(l,o))}return WM.array(Array.from(r),n).reverse()}function j0(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 jS(e){return(t,n)=>j0(e,t)-j0(e,n)}const yN=(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 pc(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=pc(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=pc(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(pc)}):"optional"in e?e.optional():e}const xN=(e,t)=>{const n=[...Ki.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),i=Ki.getter(Ki.join(n),!0)(e);return!!(i&&r in i)};let R0=e=>Object.prototype.toString.call(e)==="[object Object]";function P0(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const wN=jS([]);function sg(e){return new RS(e)}class RS extends lr{constructor(t){super({type:"object",check(n){return R0(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=wN,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 p=s[u],h=u in i;if(p){let y,w=i[u];c.path=(n.path?`${n.path}.`:"")+u,p=p.resolve({value:w,context:n.context,parent:l});let b=p instanceof lr?p.spec:void 0,m=b==null?void 0:b.strict;if(b!=null&&b.strip){d=d||u in i;continue}y=!n.__validating||!m?p.cast(i[u],c):i[u],y!==void 0&&(l[u]=y)}else h&&!o&&(l[u]=i[u]);(h!==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||!R0(c)){i(l,c);return}o=o||c;let d=[];for(let u of this._nodes){let p=this.fields[u];!p||fs.isRef(p)||d.push(p.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=vN(t,n),r._sortErrors=jS(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 pc(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=Ki.getter(t,!0);return this.transform(s=>{if(!s)return s;let o=s;return xN(s,t)&&(o=Object.assign({},s),r||delete o[t],o[n]=i(s)),o})}json(){return this.transform(yN)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||fc.exact,test(n){if(n==null)return!0;const r=P0(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=fc.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=P0(this.schema,i);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=fc.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(Qd.camelCase)}snakeCase(){return this.transformKeys(Qd.snakeCase)}constantCase(){return this.transformKeys(t=>Qd.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}}sg.prototype=RS.prototype;var bN=function(t){return kN(t)&&!SN(t)};function kN(e){return!!e&&typeof e=="object"}function SN(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||TN(e)}var CN=typeof Symbol=="function"&&Symbol.for,_N=CN?Symbol.for("react.element"):60103;function TN(e){return e.$$typeof===_N}function EN(e){return Array.isArray(e)?[]:{}}function nu(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Qa(EN(e),e,t):e}function AN(e,t,n){return e.concat(t).map(function(r){return nu(r,n)})}function jN(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(i){r[i]=nu(e[i],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=nu(t[i],n):r[i]=Qa(e[i],t[i],n)}),r}function Qa(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||AN,n.isMergeableObject=n.isMergeableObject||bN;var r=Array.isArray(t),i=Array.isArray(e),s=r===i;return s?r?n.arrayMerge(e,t,n):jN(e,t,n):nu(t,n)}Qa.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return Qa(r,i,n)},{})};var Gp=Qa,PS=typeof global=="object"&&global&&global.Object===Object&&global,RN=typeof self=="object"&&self&&self.Object===Object&&self,ur=PS||RN||Function("return this")(),gi=ur.Symbol,MS=Object.prototype,PN=MS.hasOwnProperty,MN=MS.toString,Go=gi?gi.toStringTag:void 0;function NN(e){var t=PN.call(e,Go),n=e[Go];try{e[Go]=void 0;var r=!0}catch{}var i=MN.call(e);return r&&(t?e[Go]=n:delete e[Go]),i}var ON=Object.prototype,DN=ON.toString;function IN(e){return DN.call(e)}var LN="[object Null]",FN="[object Undefined]",M0=gi?gi.toStringTag:void 0;function ps(e){return e==null?e===void 0?FN:LN:M0&&M0 in Object(e)?NN(e):IN(e)}function NS(e,t){return function(n){return e(t(n))}}var og=NS(Object.getPrototypeOf,Object);function hs(e){return e!=null&&typeof e=="object"}var $N="[object Object]",BN=Function.prototype,zN=Object.prototype,OS=BN.toString,VN=zN.hasOwnProperty,UN=OS.call(Object);function N0(e){if(!hs(e)||ps(e)!=$N)return!1;var t=og(e);if(t===null)return!0;var n=VN.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&OS.call(n)==UN}function HN(){this.__data__=[],this.size=0}function DS(e,t){return e===t||e!==e&&t!==t}function Lu(e,t){for(var n=e.length;n--;)if(DS(e[n][0],t))return n;return-1}var WN=Array.prototype,qN=WN.splice;function GN(e){var t=this.__data__,n=Lu(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():qN.call(t,n,1),--this.size,!0}function YN(e){var t=this.__data__,n=Lu(t,e);return n<0?void 0:t[n][1]}function QN(e){return Lu(this.__data__,e)>-1}function KN(e,t){var n=this.__data__,r=Lu(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Or(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])}}Or.prototype.clear=HN;Or.prototype.delete=GN;Or.prototype.get=YN;Or.prototype.has=QN;Or.prototype.set=KN;function XN(){this.__data__=new Or,this.size=0}function ZN(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function JN(e){return this.__data__.get(e)}function eO(e){return this.__data__.has(e)}function pl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var tO="[object AsyncFunction]",nO="[object Function]",rO="[object GeneratorFunction]",iO="[object Proxy]";function IS(e){if(!pl(e))return!1;var t=ps(e);return t==nO||t==rO||t==tO||t==iO}var Kd=ur["__core-js_shared__"],O0=function(){var e=/[^.]+$/.exec(Kd&&Kd.keys&&Kd.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function sO(e){return!!O0&&O0 in e}var oO=Function.prototype,aO=oO.toString;function ms(e){if(e!=null){try{return aO.call(e)}catch{}try{return e+""}catch{}}return""}var lO=/[\\^$.*+?()[\]{}|]/g,cO=/^\[object .+?Constructor\]$/,uO=Function.prototype,dO=Object.prototype,fO=uO.toString,pO=dO.hasOwnProperty,hO=RegExp("^"+fO.call(pO).replace(lO,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function mO(e){if(!pl(e)||sO(e))return!1;var t=IS(e)?hO:cO;return t.test(ms(e))}function gO(e,t){return e==null?void 0:e[t]}function gs(e,t){var n=gO(e,t);return mO(n)?n:void 0}var Ka=gs(ur,"Map"),Xa=gs(Object,"create");function vO(){this.__data__=Xa?Xa(null):{},this.size=0}function yO(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var xO="__lodash_hash_undefined__",wO=Object.prototype,bO=wO.hasOwnProperty;function kO(e){var t=this.__data__;if(Xa){var n=t[e];return n===xO?void 0:n}return bO.call(t,e)?t[e]:void 0}var SO=Object.prototype,CO=SO.hasOwnProperty;function _O(e){var t=this.__data__;return Xa?t[e]!==void 0:CO.call(t,e)}var TO="__lodash_hash_undefined__";function EO(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Xa&&t===void 0?TO:t,this}function ss(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])}}ss.prototype.clear=vO;ss.prototype.delete=yO;ss.prototype.get=kO;ss.prototype.has=_O;ss.prototype.set=EO;function AO(){this.size=0,this.__data__={hash:new ss,map:new(Ka||Or),string:new ss}}function jO(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Fu(e,t){var n=e.__data__;return jO(t)?n[typeof t=="string"?"string":"hash"]:n.map}function RO(e){var t=Fu(this,e).delete(e);return this.size-=t?1:0,t}function PO(e){return Fu(this,e).get(e)}function MO(e){return Fu(this,e).has(e)}function NO(e,t){var n=Fu(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function bi(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])}}bi.prototype.clear=AO;bi.prototype.delete=RO;bi.prototype.get=PO;bi.prototype.has=MO;bi.prototype.set=NO;var OO=200;function DO(e,t){var n=this.__data__;if(n instanceof Or){var r=n.__data__;if(!Ka||r.length<OO-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new bi(r)}return n.set(e,t),this.size=n.size,this}function No(e){var t=this.__data__=new Or(e);this.size=t.size}No.prototype.clear=XN;No.prototype.delete=ZN;No.prototype.get=JN;No.prototype.has=eO;No.prototype.set=DO;function IO(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var D0=function(){try{var e=gs(Object,"defineProperty");return e({},"",{}),e}catch{}}();function LS(e,t,n){t=="__proto__"&&D0?D0(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var LO=Object.prototype,FO=LO.hasOwnProperty;function FS(e,t,n){var r=e[t];(!(FO.call(e,t)&&DS(r,n))||n===void 0&&!(t in e))&&LS(e,t,n)}function $u(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?LS(n,a,l):FS(n,a,l)}return n}function $O(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var BO="[object Arguments]";function I0(e){return hs(e)&&ps(e)==BO}var $S=Object.prototype,zO=$S.hasOwnProperty,VO=$S.propertyIsEnumerable,UO=I0(function(){return arguments}())?I0:function(e){return hs(e)&&zO.call(e,"callee")&&!VO.call(e,"callee")},hl=Array.isArray;function HO(){return!1}var BS=typeof rn=="object"&&rn&&!rn.nodeType&&rn,L0=BS&&typeof sn=="object"&&sn&&!sn.nodeType&&sn,WO=L0&&L0.exports===BS,F0=WO?ur.Buffer:void 0,qO=F0?F0.isBuffer:void 0,zS=qO||HO,GO=9007199254740991,YO=/^(?:0|[1-9]\d*)$/;function QO(e,t){var n=typeof e;return t=t??GO,!!t&&(n=="number"||n!="symbol"&&YO.test(e))&&e>-1&&e%1==0&&e<t}var KO=9007199254740991;function VS(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=KO}var XO="[object Arguments]",ZO="[object Array]",JO="[object Boolean]",e4="[object Date]",t4="[object Error]",n4="[object Function]",r4="[object Map]",i4="[object Number]",s4="[object Object]",o4="[object RegExp]",a4="[object Set]",l4="[object String]",c4="[object WeakMap]",u4="[object ArrayBuffer]",d4="[object DataView]",f4="[object Float32Array]",p4="[object Float64Array]",h4="[object Int8Array]",m4="[object Int16Array]",g4="[object Int32Array]",v4="[object Uint8Array]",y4="[object Uint8ClampedArray]",x4="[object Uint16Array]",w4="[object Uint32Array]",Ve={};Ve[f4]=Ve[p4]=Ve[h4]=Ve[m4]=Ve[g4]=Ve[v4]=Ve[y4]=Ve[x4]=Ve[w4]=!0;Ve[XO]=Ve[ZO]=Ve[u4]=Ve[JO]=Ve[d4]=Ve[e4]=Ve[t4]=Ve[n4]=Ve[r4]=Ve[i4]=Ve[s4]=Ve[o4]=Ve[a4]=Ve[l4]=Ve[c4]=!1;function b4(e){return hs(e)&&VS(e.length)&&!!Ve[ps(e)]}function ag(e){return function(t){return e(t)}}var US=typeof rn=="object"&&rn&&!rn.nodeType&&rn,xa=US&&typeof sn=="object"&&sn&&!sn.nodeType&&sn,k4=xa&&xa.exports===US,Xd=k4&&PS.process,ko=function(){try{var e=xa&&xa.require&&xa.require("util").types;return e||Xd&&Xd.binding&&Xd.binding("util")}catch{}}(),$0=ko&&ko.isTypedArray,S4=$0?ag($0):b4,C4=Object.prototype,_4=C4.hasOwnProperty;function HS(e,t){var n=hl(e),r=!n&&UO(e),i=!n&&!r&&zS(e),s=!n&&!r&&!i&&S4(e),o=n||r||i||s,a=o?$O(e.length,String):[],l=a.length;for(var c in e)(t||_4.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||QO(c,l)))&&a.push(c);return a}var T4=Object.prototype;function lg(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||T4;return e===n}var E4=NS(Object.keys,Object),A4=Object.prototype,j4=A4.hasOwnProperty;function R4(e){if(!lg(e))return E4(e);var t=[];for(var n in Object(e))j4.call(e,n)&&n!="constructor"&&t.push(n);return t}function WS(e){return e!=null&&VS(e.length)&&!IS(e)}function cg(e){return WS(e)?HS(e):R4(e)}function P4(e,t){return e&&$u(t,cg(t),e)}function M4(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var N4=Object.prototype,O4=N4.hasOwnProperty;function D4(e){if(!pl(e))return M4(e);var t=lg(e),n=[];for(var r in e)r=="constructor"&&(t||!O4.call(e,r))||n.push(r);return n}function ug(e){return WS(e)?HS(e,!0):D4(e)}function I4(e,t){return e&&$u(t,ug(t),e)}var qS=typeof rn=="object"&&rn&&!rn.nodeType&&rn,B0=qS&&typeof sn=="object"&&sn&&!sn.nodeType&&sn,L4=B0&&B0.exports===qS,z0=L4?ur.Buffer:void 0,V0=z0?z0.allocUnsafe:void 0;function F4(e,t){if(t)return e.slice();var n=e.length,r=V0?V0(n):new e.constructor(n);return e.copy(r),r}function GS(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function $4(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 YS(){return[]}var B4=Object.prototype,z4=B4.propertyIsEnumerable,U0=Object.getOwnPropertySymbols,dg=U0?function(e){return e==null?[]:(e=Object(e),$4(U0(e),function(t){return z4.call(e,t)}))}:YS;function V4(e,t){return $u(e,dg(e),t)}function QS(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var U4=Object.getOwnPropertySymbols,KS=U4?function(e){for(var t=[];e;)QS(t,dg(e)),e=og(e);return t}:YS;function H4(e,t){return $u(e,KS(e),t)}function XS(e,t,n){var r=t(e);return hl(e)?r:QS(r,n(e))}function W4(e){return XS(e,cg,dg)}function q4(e){return XS(e,ug,KS)}var Yp=gs(ur,"DataView"),Qp=gs(ur,"Promise"),Kp=gs(ur,"Set"),Xp=gs(ur,"WeakMap"),H0="[object Map]",G4="[object Object]",W0="[object Promise]",q0="[object Set]",G0="[object WeakMap]",Y0="[object DataView]",Y4=ms(Yp),Q4=ms(Ka),K4=ms(Qp),X4=ms(Kp),Z4=ms(Xp),yr=ps;(Yp&&yr(new Yp(new ArrayBuffer(1)))!=Y0||Ka&&yr(new Ka)!=H0||Qp&&yr(Qp.resolve())!=W0||Kp&&yr(new Kp)!=q0||Xp&&yr(new Xp)!=G0)&&(yr=function(e){var t=ps(e),n=t==G4?e.constructor:void 0,r=n?ms(n):"";if(r)switch(r){case Y4:return Y0;case Q4:return H0;case K4:return W0;case X4:return q0;case Z4:return G0}return t});var J4=Object.prototype,eD=J4.hasOwnProperty;function tD(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&eD.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Q0=ur.Uint8Array;function fg(e){var t=new e.constructor(e.byteLength);return new Q0(t).set(new Q0(e)),t}function nD(e,t){var n=t?fg(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var rD=/\w*$/;function iD(e){var t=new e.constructor(e.source,rD.exec(e));return t.lastIndex=e.lastIndex,t}var K0=gi?gi.prototype:void 0,X0=K0?K0.valueOf:void 0;function sD(e){return X0?Object(X0.call(e)):{}}function oD(e,t){var n=t?fg(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var aD="[object Boolean]",lD="[object Date]",cD="[object Map]",uD="[object Number]",dD="[object RegExp]",fD="[object Set]",pD="[object String]",hD="[object Symbol]",mD="[object ArrayBuffer]",gD="[object DataView]",vD="[object Float32Array]",yD="[object Float64Array]",xD="[object Int8Array]",wD="[object Int16Array]",bD="[object Int32Array]",kD="[object Uint8Array]",SD="[object Uint8ClampedArray]",CD="[object Uint16Array]",_D="[object Uint32Array]";function TD(e,t,n){var r=e.constructor;switch(t){case mD:return fg(e);case aD:case lD:return new r(+e);case gD:return nD(e,n);case vD:case yD:case xD:case wD:case bD:case kD:case SD:case CD:case _D:return oD(e,n);case cD:return new r;case uD:case pD:return new r(e);case dD:return iD(e);case fD:return new r;case hD:return sD(e)}}var Z0=Object.create,ED=function(){function e(){}return function(t){if(!pl(t))return{};if(Z0)return Z0(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function AD(e){return typeof e.constructor=="function"&&!lg(e)?ED(og(e)):{}}var jD="[object Map]";function RD(e){return hs(e)&&yr(e)==jD}var J0=ko&&ko.isMap,PD=J0?ag(J0):RD,MD="[object Set]";function ND(e){return hs(e)&&yr(e)==MD}var ex=ko&&ko.isSet,OD=ex?ag(ex):ND,DD=1,ID=2,LD=4,ZS="[object Arguments]",FD="[object Array]",$D="[object Boolean]",BD="[object Date]",zD="[object Error]",JS="[object Function]",VD="[object GeneratorFunction]",UD="[object Map]",HD="[object Number]",eC="[object Object]",WD="[object RegExp]",qD="[object Set]",GD="[object String]",YD="[object Symbol]",QD="[object WeakMap]",KD="[object ArrayBuffer]",XD="[object DataView]",ZD="[object Float32Array]",JD="[object Float64Array]",eI="[object Int8Array]",tI="[object Int16Array]",nI="[object Int32Array]",rI="[object Uint8Array]",iI="[object Uint8ClampedArray]",sI="[object Uint16Array]",oI="[object Uint32Array]",Fe={};Fe[ZS]=Fe[FD]=Fe[KD]=Fe[XD]=Fe[$D]=Fe[BD]=Fe[ZD]=Fe[JD]=Fe[eI]=Fe[tI]=Fe[nI]=Fe[UD]=Fe[HD]=Fe[eC]=Fe[WD]=Fe[qD]=Fe[GD]=Fe[YD]=Fe[rI]=Fe[iI]=Fe[sI]=Fe[oI]=!0;Fe[zD]=Fe[JS]=Fe[QD]=!1;function wa(e,t,n,r,i,s){var o,a=t&DD,l=t&ID,c=t&LD;if(o!==void 0)return o;if(!pl(e))return e;var d=hl(e);if(d){if(o=tD(e),!a)return GS(e,o)}else{var u=yr(e),p=u==JS||u==VD;if(zS(e))return F4(e,a);if(u==eC||u==ZS||p&&!i){if(o=l||p?{}:AD(e),!a)return l?H4(e,I4(o,e)):V4(e,P4(o,e))}else{if(!Fe[u])return i?e:{};o=TD(e,u,a)}}s||(s=new No);var h=s.get(e);if(h)return h;s.set(e,o),OD(e)?e.forEach(function(b){o.add(wa(b,t,n,b,e,s))}):PD(e)&&e.forEach(function(b,m){o.set(m,wa(b,t,n,m,e,s))});var y=c?l?q4:W4:l?ug:cg,w=d?void 0:y(e);return IO(w||e,function(b,m){w&&(m=b,b=e[m]),FS(o,m,wa(b,t,n,m,e,s))}),o}var aI=1,lI=4;function Hl(e){return wa(e,aI|lI)}var tx=Array.isArray,nx=Object.keys,cI=Object.prototype.hasOwnProperty,uI=typeof Element<"u";function Zp(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=tx(e),r=tx(t),i,s,o;if(n&&r){if(s=e.length,s!=t.length)return!1;for(i=s;i--!==0;)if(!Zp(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=nx(e);if(s=u.length,s!==nx(t).length)return!1;for(i=s;i--!==0;)if(!cI.call(t,u[i]))return!1;if(uI&&e instanceof Element&&t instanceof Element)return e===t;for(i=s;i--!==0;)if(o=u[i],!(o==="_owner"&&e.$$typeof)&&!Zp(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var dI=function(t,n){try{return Zp(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 ji=Pr(dI);var fI=4;function rx(e){return wa(e,fI)}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 pI="[object Symbol]";function pg(e){return typeof e=="symbol"||hs(e)&&ps(e)==pI}var hI="Expected a function";function hg(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(hI);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(hg.Cache||bi),n}hg.Cache=bi;var mI=500;function gI(e){var t=hg(e,function(r){return n.size===mI&&n.clear(),r}),n=t.cache;return t}var vI=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yI=/\\(\\)?/g,xI=gI(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(vI,function(n,r,i,s){t.push(i?s.replace(yI,"$1"):r||n)}),t}),wI=1/0;function bI(e){if(typeof e=="string"||pg(e))return e;var t=e+"";return t=="0"&&1/e==-wI?"-0":t}var kI=1/0,ix=gi?gi.prototype:void 0,sx=ix?ix.toString:void 0;function nC(e){if(typeof e=="string")return e;if(hl(e))return tC(e,nC)+"";if(pg(e))return sx?sx.call(e):"";var t=e+"";return t=="0"&&1/e==-kI?"-0":t}function SI(e){return e==null?"":nC(e)}function rC(e){return hl(e)?tC(e,bI):pg(e)?[e]:GS(xI(SI(e)))}var iC={exports:{}},Me={};/** @license React v16.13.1
90
90
  * react-is.production.min.js
91
91
  *
92
92
  * Copyright (c) Facebook, Inc. and its affiliates.
93
93
  *
94
94
  * This source code is licensed under the MIT license found in the
95
95
  * LICENSE file in the root directory of this source tree.
96
- */var vt=typeof Symbol=="function"&&Symbol.for,cg=vt?Symbol.for("react.element"):60103,ug=vt?Symbol.for("react.portal"):60106,Iu=vt?Symbol.for("react.fragment"):60107,Lu=vt?Symbol.for("react.strict_mode"):60108,Fu=vt?Symbol.for("react.profiler"):60114,Bu=vt?Symbol.for("react.provider"):60109,$u=vt?Symbol.for("react.context"):60110,dg=vt?Symbol.for("react.async_mode"):60111,zu=vt?Symbol.for("react.concurrent_mode"):60111,Vu=vt?Symbol.for("react.forward_ref"):60112,Uu=vt?Symbol.for("react.suspense"):60113,fI=vt?Symbol.for("react.suspense_list"):60120,Hu=vt?Symbol.for("react.memo"):60115,Wu=vt?Symbol.for("react.lazy"):60116,pI=vt?Symbol.for("react.block"):60121,hI=vt?Symbol.for("react.fundamental"):60117,mI=vt?Symbol.for("react.responder"):60118,gI=vt?Symbol.for("react.scope"):60119;function un(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case cg:switch(e=e.type,e){case dg:case zu:case Iu:case Fu:case Lu:case Uu:return e;default:switch(e=e&&e.$$typeof,e){case $u:case Vu:case Wu:case Hu:case Bu:return e;default:return t}}case ug:return t}}}function YS(e){return un(e)===zu}Oe.AsyncMode=dg;Oe.ConcurrentMode=zu;Oe.ContextConsumer=$u;Oe.ContextProvider=Bu;Oe.Element=cg;Oe.ForwardRef=Vu;Oe.Fragment=Iu;Oe.Lazy=Wu;Oe.Memo=Hu;Oe.Portal=ug;Oe.Profiler=Fu;Oe.StrictMode=Lu;Oe.Suspense=Uu;Oe.isAsyncMode=function(e){return YS(e)||un(e)===dg};Oe.isConcurrentMode=YS;Oe.isContextConsumer=function(e){return un(e)===$u};Oe.isContextProvider=function(e){return un(e)===Bu};Oe.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===cg};Oe.isForwardRef=function(e){return un(e)===Vu};Oe.isFragment=function(e){return un(e)===Iu};Oe.isLazy=function(e){return un(e)===Wu};Oe.isMemo=function(e){return un(e)===Hu};Oe.isPortal=function(e){return un(e)===ug};Oe.isProfiler=function(e){return un(e)===Fu};Oe.isStrictMode=function(e){return un(e)===Lu};Oe.isSuspense=function(e){return un(e)===Uu};Oe.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Iu||e===zu||e===Fu||e===Lu||e===Uu||e===fI||typeof e=="object"&&e!==null&&(e.$$typeof===Wu||e.$$typeof===Hu||e.$$typeof===Bu||e.$$typeof===$u||e.$$typeof===Vu||e.$$typeof===hI||e.$$typeof===mI||e.$$typeof===gI||e.$$typeof===pI)};Oe.typeOf=un;GS.exports=Oe;var vI=GS.exports,QS=vI,yI={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},xI={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},KS={};KS[QS.ForwardRef]=yI;KS[QS.Memo]=xI;function pt(){return pt=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},pt.apply(this,arguments)}function XS(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 qu=v.createContext(void 0);qu.displayName="FormikContext";qu.Provider;qu.Consumer;function wI(){var e=v.useContext(qu);return e}var Rn=function(t){return typeof t=="function"},Gu=function(t){return t!==null&&typeof t=="object"},bI=function(t){return String(Math.floor(Number(t)))===t},Yd=function(t){return Object.prototype.toString.call(t)==="[object String]"},Qd=function(t){return Gu(t)&&Rn(t.then)};function Xt(e,t,n,r){r===void 0&&(r=0);for(var i=qS(t);e&&r<i.length;)e=e[i[r++]];return r!==i.length&&!e||e===void 0?n:e}function Ki(e,t,n){for(var r=K0(e),i=r,s=0,o=qS(t);s<o.length-1;s++){var a=o[s],l=Xt(e,o.slice(0,s+1));if(l&&(Gu(l)||Array.isArray(l)))i=i[a]=K0(l);else{var c=o[s+1];i=i[a]=bI(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 ZS(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];Gu(a)?n.get(a)||(n.set(a,!0),r[o]=Array.isArray(a)?[]:{},ZS(a,t,n,r[o])):r[o]=t}return r}function kI(e,t){switch(t.type){case"SET_VALUES":return pt({},e,{values:t.payload});case"SET_TOUCHED":return pt({},e,{touched:t.payload});case"SET_ERRORS":return ji(e.errors,t.payload)?e:pt({},e,{errors:t.payload});case"SET_STATUS":return pt({},e,{status:t.payload});case"SET_ISSUBMITTING":return pt({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return pt({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return pt({},e,{values:Ki(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return pt({},e,{touched:Ki(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return pt({},e,{errors:Ki(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return pt({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return pt({},e,{touched:ZS(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return pt({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return pt({},e,{isSubmitting:!1});default:return e}}var _i={},zl={};function SI(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=XS(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),p=pt({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:d},u),h=v.useRef(p.initialValues),y=v.useRef(p.initialErrors||_i),x=v.useRef(p.initialTouched||zl),w=v.useRef(p.initialStatus),m=v.useRef(!1),g=v.useRef({});v.useEffect(function(){return m.current=!0,function(){m.current=!1}},[]);var b=v.useState(0),C=b[1],S=v.useRef({values:$l(p.initialValues),errors:$l(p.initialErrors)||_i,touched:$l(p.initialTouched)||zl,status:$l(p.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),_=S.current,j=v.useCallback(function(R){var K=S.current;S.current=kI(K,R),K!==S.current&&C(function(I){return I+1})},[]),A=v.useCallback(function(R,K){return new Promise(function(I,H){var te=p.validate(R,K);te==null?I(_i):Qd(te)?te.then(function(de){I(de||_i)},function(de){H(de)}):I(te)})},[p.validate]),E=v.useCallback(function(R,K){var I=p.validationSchema,H=Rn(I)?I(K):I,te=K&&H.validateAt?H.validateAt(K,R):_I(R,H);return new Promise(function(de,xe){te.then(function(){de(_i)},function(Ue){Ue.name==="ValidationError"?de(CI(Ue)):xe(Ue)})})},[p.validationSchema]),L=v.useCallback(function(R,K){return new Promise(function(I){return I(g.current[R].validate(K))})},[]),F=v.useCallback(function(R){var K=Object.keys(g.current).filter(function(H){return Rn(g.current[H].validate)}),I=K.length>0?K.map(function(H){return L(H,Xt(R,H))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(I).then(function(H){return H.reduce(function(te,de,xe){return de==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||de&&(te=Ki(te,K[xe],de)),te},{})})},[L]),D=v.useCallback(function(R){return Promise.all([F(R),p.validationSchema?E(R):{},p.validate?A(R):{}]).then(function(K){var I=K[0],H=K[1],te=K[2],de=Vp.all([I,H,te],{arrayMerge:TI});return de})},[p.validate,p.validationSchema,F,A,E]),G=hn(function(R){return R===void 0&&(R=_.values),j({type:"SET_ISVALIDATING",payload:!0}),D(R).then(function(K){return m.current&&(j({type:"SET_ISVALIDATING",payload:!1}),j({type:"SET_ERRORS",payload:K})),K})});v.useEffect(function(){o&&m.current===!0&&ji(h.current,p.initialValues)&&G(h.current)},[o,G]);var z=v.useCallback(function(R){var K=R&&R.values?R.values:h.current,I=R&&R.errors?R.errors:y.current?y.current:p.initialErrors||{},H=R&&R.touched?R.touched:x.current?x.current:p.initialTouched||{},te=R&&R.status?R.status:w.current?w.current:p.initialStatus;h.current=K,y.current=I,x.current=H,w.current=te;var de=function(){j({type:"RESET_FORM",payload:{isSubmitting:!!R&&!!R.isSubmitting,errors:I,touched:H,status:te,values:K,isValidating:!!R&&!!R.isValidating,submitCount:R&&R.submitCount&&typeof R.submitCount=="number"?R.submitCount:0}})};if(p.onReset){var xe=p.onReset(_.values,O);Qd(xe)?xe.then(de):de()}else de()},[p.initialErrors,p.initialStatus,p.initialTouched,p.onReset]);v.useEffect(function(){m.current===!0&&!ji(h.current,p.initialValues)&&c&&(h.current=p.initialValues,z(),o&&G(h.current))},[c,p.initialValues,z,o,G]),v.useEffect(function(){c&&m.current===!0&&!ji(y.current,p.initialErrors)&&(y.current=p.initialErrors||_i,j({type:"SET_ERRORS",payload:p.initialErrors||_i}))},[c,p.initialErrors]),v.useEffect(function(){c&&m.current===!0&&!ji(x.current,p.initialTouched)&&(x.current=p.initialTouched||zl,j({type:"SET_TOUCHED",payload:p.initialTouched||zl}))},[c,p.initialTouched]),v.useEffect(function(){c&&m.current===!0&&!ji(w.current,p.initialStatus)&&(w.current=p.initialStatus,j({type:"SET_STATUS",payload:p.initialStatus}))},[c,p.initialStatus,p.initialTouched]);var $=hn(function(R){if(g.current[R]&&Rn(g.current[R].validate)){var K=Xt(_.values,R),I=g.current[R].validate(K);return Qd(I)?(j({type:"SET_ISVALIDATING",payload:!0}),I.then(function(H){return H}).then(function(H){j({type:"SET_FIELD_ERROR",payload:{field:R,value:H}}),j({type:"SET_ISVALIDATING",payload:!1})})):(j({type:"SET_FIELD_ERROR",payload:{field:R,value:I}}),Promise.resolve(I))}else if(p.validationSchema)return j({type:"SET_ISVALIDATING",payload:!0}),E(_.values,R).then(function(H){return H}).then(function(H){j({type:"SET_FIELD_ERROR",payload:{field:R,value:Xt(H,R)}}),j({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),N=v.useCallback(function(R,K){var I=K.validate;g.current[R]={validate:I}},[]),M=v.useCallback(function(R){delete g.current[R]},[]),P=hn(function(R,K){j({type:"SET_TOUCHED",payload:R});var I=K===void 0?i:K;return I?G(_.values):Promise.resolve()}),B=v.useCallback(function(R){j({type:"SET_ERRORS",payload:R})},[]),U=hn(function(R,K){var I=Rn(R)?R(_.values):R;j({type:"SET_VALUES",payload:I});var H=K===void 0?n:K;return H?G(I):Promise.resolve()}),W=v.useCallback(function(R,K){j({type:"SET_FIELD_ERROR",payload:{field:R,value:K}})},[]),q=hn(function(R,K,I){j({type:"SET_FIELD_VALUE",payload:{field:R,value:K}});var H=I===void 0?n:I;return H?G(Ki(_.values,R,K)):Promise.resolve()}),se=v.useCallback(function(R,K){var I=K,H=R,te;if(!Yd(R)){R.persist&&R.persist();var de=R.target?R.target:R.currentTarget,xe=de.type,Ue=de.name,lt=de.id,Un=de.value,dn=de.checked,ys=de.outerHTML,fr=de.options,Nr=de.multiple;I=K||Ue||lt,H=/number|range/.test(xe)?(te=parseFloat(Un),isNaN(te)?"":te):/checkbox/.test(xe)?AI(Xt(_.values,I),dn,Un):fr&&Nr?EI(fr):Un}I&&q(I,H)},[q,_.values]),ie=hn(function(R){if(Yd(R))return function(K){return se(K,R)};se(R)}),pe=hn(function(R,K,I){K===void 0&&(K=!0),j({type:"SET_FIELD_TOUCHED",payload:{field:R,value:K}});var H=I===void 0?i:I;return H?G(_.values):Promise.resolve()}),ce=v.useCallback(function(R,K){R.persist&&R.persist();var I=R.target,H=I.name,te=I.id,de=I.outerHTML,xe=K||H||te;pe(xe,!0)},[pe]),_e=hn(function(R){if(Yd(R))return function(K){return ce(K,R)};ce(R)}),Re=v.useCallback(function(R){Rn(R)?j({type:"SET_FORMIK_STATE",payload:R}):j({type:"SET_FORMIK_STATE",payload:function(){return R}})},[]),Y=v.useCallback(function(R){j({type:"SET_STATUS",payload:R})},[]),V=v.useCallback(function(R){j({type:"SET_ISSUBMITTING",payload:R})},[]),Z=hn(function(){return j({type:"SUBMIT_ATTEMPT"}),G().then(function(R){var K=R instanceof Error,I=!K&&Object.keys(R).length===0;if(I){var H;try{if(H=ae(),H===void 0)return}catch(te){throw te}return Promise.resolve(H).then(function(te){return m.current&&j({type:"SUBMIT_SUCCESS"}),te}).catch(function(te){if(m.current)throw j({type:"SUBMIT_FAILURE"}),te})}else if(m.current&&(j({type:"SUBMIT_FAILURE"}),K))throw R})}),ue=hn(function(R){R&&R.preventDefault&&Rn(R.preventDefault)&&R.preventDefault(),R&&R.stopPropagation&&Rn(R.stopPropagation)&&R.stopPropagation(),Z().catch(function(K){console.warn("Warning: An unhandled error was caught from submitForm()",K)})}),O={resetForm:z,validateForm:G,validateField:$,setErrors:B,setFieldError:W,setFieldTouched:pe,setFieldValue:q,setStatus:Y,setSubmitting:V,setTouched:P,setValues:U,setFormikState:Re,submitForm:Z},ae=hn(function(){return d(_.values,O)}),ee=hn(function(R){R&&R.preventDefault&&Rn(R.preventDefault)&&R.preventDefault(),R&&R.stopPropagation&&Rn(R.stopPropagation)&&R.stopPropagation(),z()}),ke=v.useCallback(function(R){return{value:Xt(_.values,R),error:Xt(_.errors,R),touched:!!Xt(_.touched,R),initialValue:Xt(h.current,R),initialTouched:!!Xt(x.current,R),initialError:Xt(y.current,R)}},[_.errors,_.touched,_.values]),he=v.useCallback(function(R){return{setValue:function(I,H){return q(R,I,H)},setTouched:function(I,H){return pe(R,I,H)},setError:function(I){return W(R,I)}}},[q,pe,W]),Ze=v.useCallback(function(R){var K=Gu(R),I=K?R.name:R,H=Xt(_.values,I),te={name:I,value:H,onChange:ie,onBlur:_e};if(K){var de=R.type,xe=R.value,Ue=R.as,lt=R.multiple;de==="checkbox"?xe===void 0?te.checked=!!H:(te.checked=!!(Array.isArray(H)&&~H.indexOf(xe)),te.value=xe):de==="radio"?(te.checked=H===xe,te.value=xe):Ue==="select"&&lt&&(te.value=te.value||[],te.multiple=!0)}return te},[_e,ie,_.values]),qe=v.useMemo(function(){return!ji(h.current,_.values)},[h.current,_.values]),Bt=v.useMemo(function(){return typeof a<"u"?qe?_.errors&&Object.keys(_.errors).length===0:a!==!1&&Rn(a)?a(p):a:_.errors&&Object.keys(_.errors).length===0},[a,qe,_.errors,p]),fe=pt({},_,{initialValues:h.current,initialErrors:y.current,initialTouched:x.current,initialStatus:w.current,handleBlur:_e,handleChange:ie,handleReset:ee,handleSubmit:ue,resetForm:z,setErrors:B,setFormikState:Re,setFieldTouched:pe,setFieldValue:q,setFieldError:W,setStatus:Y,setSubmitting:V,setTouched:P,setValues:U,submitForm:Z,validateForm:G,validateField:$,isValid:Bt,dirty:qe,unregisterField:M,registerField:N,getFieldProps:Ze,getFieldMeta:ke,getFieldHelpers:he,validateOnBlur:i,validateOnChange:n,validateOnMount:o});return fe}function CI(e){var t={};if(e.inner){if(e.inner.length===0)return Ki(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;Xt(t,o.path)||(t=Ki(t,o.path,o.message))}}return t}function _I(e,t,n,r){n===void 0&&(n=!1);var i=Yp(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:i})}function Yp(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||T0(i)?Yp(i):i!==""?i:void 0}):T0(e[r])?t[r]=Yp(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function TI(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?Vp(Array.isArray(s)?[]:{},s,n):s}else n.isMergeableObject(s)?r[o]=Vp(e[o],s,n):e.indexOf(s)===-1&&r.push(s)}),r}function EI(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function AI(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 jI=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?v.useLayoutEffect:v.useEffect;function hn(e){var t=v.useRef(e);return jI(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 RI=v.forwardRef(function(e,t){var n=e.action,r=XS(e,["action"]),i=n??"#",s=wI(),o=s.handleReset,a=s.handleSubmit;return v.createElement("form",pt({onSubmit:a,ref:t,onReset:o,action:i},r))});RI.displayName="Form";const JS=({init:e,schema:t,action:n,validateOnBlur:r=!1})=>SI({initialValues:e,validationSchema:t,validateOnBlur:r,enableReinitialize:!0,validateOnChange:!1,validateOnMount:!1,onSubmit:i=>{n(i)}});function fg({id:e,text:t,className:n,required:r}){const i=Se();return t?f.jsxs("label",{htmlFor:e,className:Ve("mb-1 block text-sm font-medium",n),style:{color:i.getColor(k.InputText)},children:[t,r&&f.jsx("span",{className:"ml-1",style:{color:i.getColor(k.ErrorText)},children:"*"})]}):null}const Kd={sm:"px-3 py-1 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-15"};function PI({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:p,autoFocus:h,...y}){const x=Se(),w=x.getRadius(),m=l?x.getColor(k.ErrorBorder):x.getColor(k.InputBorder),g=x.getColor(k.LinkColor);return f.jsxs("div",{className:Ve({"mb-2":!o},d),style:{"--focus-ring":g},children:[f.jsx(fg,{id:e,text:t,required:a}),f.jsxs("div",{className:"flex items-center",children:[r&&f.jsx("span",{className:Ve("inline-block border border-solid border-r-0 rounded-l-md",Kd[i]),style:{borderColor:l?x.getColor(k.ErrorBorder):x.getColor(k.InputBorder),backgroundColor:x.getColor(k.InputBackground),borderRadius:w},children:r}),f.jsx("input",{id:e,autoFocus:h,className:Ve("border border-solid block w-full outline-none transition-[border-color,box-shadow] duration-200 focus:ring-2 focus:ring-offset-0 rounded-lg",Kd[i],{"rounded-l-none":!!r,"rounded-r-none":!!n}),type:s,required:a,"aria-describedby":c,"aria-invalid":u,"aria-label":p,style:{fontSize:"16px",color:l?x.getColor(k.ErrorText):x.getColor(k.InputText),backgroundColor:x.getColor(k.InputBackground),borderColor:m,borderRadius:w,"--tw-ring-color":g},...y}),n&&f.jsx("span",{className:Ve("inline-block border border-solid border-l-0 rounded-r-md",Kd[i]),style:{borderColor:l?x.getColor(k.ErrorBorder):x.getColor(k.InputBorder),backgroundColor:x.getColor(k.InputBackground),borderRadius:w},children:n})]}),!!l&&f.jsx("p",{className:"mt-1 text-xs",style:{color:x.getColor(k.ErrorText)},children:l})]})}const J0=(e,t)=>{const n=new Date;n.setFullYear(n.getFullYear()+1),document.cookie=`${e}=${t};expires=${n.toUTCString()};path=/`},eC=v.createContext({}),MI=()=>`${window.location.pathname}_$$_${document.title}`,OI=()=>{const e=localStorage.getItem("page");return!e||e===""?"/":e},NI=()=>{const e=localStorage.getItem("p-history");if(!e||e==="")return[];try{return JSON.parse(e)}catch{return[]}};function DI({children:e}){const[t,n]=v.useState("/"),[r,i]=v.useState(NI());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 f.jsx(eC.Provider,{value:{page:t,setPage:o,history:r,clearHistory:s},children:e})}function Yu(){return v.useContext(eC)}const ga=e=>{const t=document.cookie.split(";").find(n=>n.includes(e));return t?t.split("=")[1]:null};function II({label:e,id:t,value:n="",className:r,placeholder:i,children:s,required:o,error:a,...l}){const c=Se();return f.jsxs("div",{className:r,children:[e&&f.jsx(fg,{id:t,required:o,text:e}),f.jsxs("select",{id:t,"aria-placeholder":i,value:n,"aria-label":e,className:"block w-full rounded-lg border border-solid px-3 py-2 text-sm outline-none transition-[border-color,box-shadow] duration-200 focus:ring-2 focus:ring-offset-0",style:{backgroundColor:c.getColor(k.InputBackground),color:c.getColor(k.InputText),borderColor:a?c.getColor(k.ErrorBorder):c.getColor(k.InputBorder),borderRadius:c.getRadius(),"--tw-ring-color":c.getColor(k.LinkColor)},onChange:l.onChange,required:o,...l,children:[i&&f.jsx("option",{value:"",disabled:!0,children:i}),s]}),!!a&&f.jsx("p",{className:"mt-1 text-xs",style:{color:c.getColor(k.ErrorText)},children:a})]})}const ex={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:""}},LI={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"},FI={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 BI({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,error:p,...h}){const y=Se(),x=y.getColor(k.InputText),w=y.getColor(k.LinkColor),m=y.getColor(k.InputBorder),g=y.getColor(k.InputBackground),b=y.getColor(k.ErrorText);return f.jsxs("div",{children:[f.jsxs("div",{className:`flex items-center justify-between gap-2 ${u?"flex-row-reverse":""} ${ex[d].label}`,children:[f.jsxs("label",{className:"disable-highlight relative flex cursor-pointer items-center rounded-md",htmlFor:l,children:[f.jsx("input",{id:l,name:t,type:"checkbox",className:`peer cursor-pointer appearance-none rounded-md border-2 border-solid transition-all ${LI[c]} ${ex[d].input}`,style:{borderColor:i?w:m,backgroundColor:i?w:g},required:n,checked:i,value:r,onChange:C=>s==null?void 0:s(C.target.checked),onBlur:C=>o==null?void 0:o(C.target.checked),...h}),f.jsx("div",{className:"pointer-events-none absolute left-2/4 top-2/4 -translate-x-1/2 -translate-y-1/2 text-white opacity-0 transition-opacity peer-checked:opacity-100",children:f.jsx(X.Check,{className:FI[c]})})]}),f.jsx("label",{className:"disable-highlight flex grow cursor-pointer select-none items-center text-sm",style:{color:x},htmlFor:l,children:e})]}),(a||p)&&f.jsx("small",{className:"text-xs",style:{color:b},children:p||a})]})}function $I({id:e,value:t,name:n,onChange:r,children:i,disabled:s,className:o}){const a=Se(),l=a.getColor(k.InputText),c=a.getColor(k.LinkColor);return f.jsxs("label",{htmlFor:e,className:Ve("relative flex cursor-pointer items-center gap-2 rounded-md focus-within:outline-none",{"opacity-60 cursor-not-allowed":s},o),children:[f.jsx("input",{type:"radio",id:e,name:n,value:e,checked:t,onChange:d=>r==null?void 0:r(d.target.checked),className:"h-4 w-4 min-w-4 cursor-pointer appearance-none border-2 transition-all focus:ring-0 focus:ring-offset-0",style:{borderRadius:"50%",borderColor:t?c:a.getColor(k.InputBorder),backgroundColor:t?c:a.getColor(k.InputBackground),boxShadow:t?`inset 0 0 0 3px ${a.getColor(k.Background)}`:void 0},disabled:s}),f.jsx("span",{className:"text-sm font-medium",style:{color:l},children:i})]})}function zI({id:e,label:t,children:n,required:r,className:i,error:s}){const o=Se(),a=o.getColor(k.InputText),l=o.getColor(k.ErrorText);return f.jsxs("fieldset",{id:e,className:i,children:[t&&f.jsxs("legend",{className:"mb-1.5 block text-sm font-medium",style:{color:a},children:[t,r&&f.jsx("span",{style:{color:l,marginLeft:4},children:"*"})]}),f.jsx("div",{className:"flex flex-col gap-2",children:n}),s&&f.jsx("p",{className:"mt-1 text-xs",style:{color:l},children:s})]})}const tx=Object.assign($I,{Group:zI});function Qu({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:p=!1,style:h,borderless:y=!1,...x}){const w=Se();return f.jsxs("div",{className:Ve({"mb-2":!s},i),children:[t&&f.jsx(fg,{id:e,text:t,required:l}),f.jsx("textarea",{className:Ve("resize-none max-h-36 w-full py-2 px-3 block outline-none transition-[border-color,box-shadow] duration-200 rounded-lg",{"border border-solid focus:ring-2 focus:ring-offset-0":!y,"border-none bg-transparent":y}),id:e,rows:o,"aria-invalid":d,...x,ref:u,autoFocus:p,style:{...h,fontSize:"14px",color:c?w.getColor(k.ErrorText):w.getColor(k.InputText),...!y&&{backgroundColor:w.getColor(k.InputBackground),borderColor:c?w.getColor(k.ErrorBorder):w.getColor(k.InputBorder),borderRadius:w.getRadius(),"--tw-ring-color":w.getColor(k.LinkColor)}}}),!!c&&f.jsx("p",{className:"mt-1 text-xs",style:{color:w.getColor(k.ErrorText)},children:c})]})}function xo({variant:e="block",className:t=""}){const n=Se(),r=n.getText,a=`text-[10px] flex items-center justify-center gap-1 transition-opacity hover:opacity-80 ${e==="block"?"w-full py-1.5 px-3 text-center":""} ${t}`.trim(),l=e==="block"?{color:n.getColor(k.FooterText)}:{color:n.getColor(k.FooterText)};return f.jsxs("a",{href:"https://www.chatier.app",target:"_blank",rel:"noopener noreferrer",className:a,style:l,children:[f.jsx("span",{children:r(ne.PoweredBy)}),f.jsx("span",{className:"font-semibold",children:"Chatier"})]})}function VI({onOk:e,clientId:t,widgetId:n,appearance:r,aiAgentMode:i=!1,onAIAgentStart:s,onOperatorConnect:o,isConnectingToOperator:a=!1}){var _,j,A,E,L,F;const l=Se(),{defaultValues:c,widget:d,setIsHaveChat:u}=re(),[p,h]=v.useState(!1),y=v.useRef(null);v.useEffect(()=>{const D=setTimeout(()=>{var z;const G=(z=y.current)==null?void 0:z.querySelector('input:not([type="hidden"]), select, textarea');G==null||G.focus()},150);return()=>clearTimeout(D)},[]);const x=Yu(),w=Gm(),m=!!c&&"username"in c,g=(j=(_=r==null?void 0:r.body)==null?void 0:_.inputs)==null?void 0:j.reduce((D,G)=>{let z=G.remember?ga(G.name):c==null?void 0:c[G.name];return G.options&&z&&!G.options.includes(z)&&(z=void 0),G.name==="username"&&m&&(z=c.username),D[G.name]=z||"",D},{}),b=Jm((E=(A=r==null?void 0:r.body)==null?void 0:A.inputs)==null?void 0:E.reduce((D,G)=>(D[G.name]=G.required?Xc().required(`${G.label} alanı zorunludur`):Xc(),D),{})),C=JS({init:{...g},schema:b,validateOnBlur:!1,action:async D=>{var G,z;if(!(p||a)){h(!0);try{m&&(D.username=c.username),c!=null&&c.secret_data&&(D.secret_data=c.secret_data);for(const M in D)typeof D[M]=="string"&&(D[M]=D[M].trim());if(o){for(const M of((G=r==null?void 0:r.body)==null?void 0:G.inputs)||[])M.remember&&J0(M.name,D[M.name]);o(D);return}const[$,N]=await w.mutateAsync({inputs:D,history:x.history,client_id:t,widget_id:n,device_id:mi((d==null?void 0:d.link_id)||""),is_agent_mode:i});if(zn(N)){Fp($)&&(Fn(st.CustomerToken,$.customer_token,(d==null?void 0:d.link_id)||""),Fn(st.CustomerRefreshToken,$.customer_refresh_token,(d==null?void 0:d.link_id)||""),Fn(st.DeviceId,$.device_id,(d==null?void 0:d.link_id)||"")),x.clearHistory();for(const M of((z=r==null?void 0:r.body)==null?void 0:z.inputs)||[])M.remember&&J0(M.name,D[M.name]);u(!0),i?s==null||s():e==null||e();return}ho($,{form:C})}catch($){console.error("Chat creation error:",$)}finally{h(!1)}}}}),S=l.getColor(k.GreeterBackground);return f.jsxs("section",{className:"h-full overflow-y-auto px-5",style:{backgroundColor:S},children:[f.jsxs("form",{ref:y,autoComplete:"off",className:"grid grid-cols-1 gap-4",onSubmit:C.handleSubmit,children:[(F=(L=r==null?void 0:r.body)==null?void 0:L.inputs)==null?void 0:F.map((D,G)=>{var $,N;const z=G===0;if(["text","email","phone"].includes(D.type))return f.jsx(PI,{id:D.name,name:D.name,type:D.type,label:D.label,value:C.values[D.name],onChange:C.handleChange,onBlur:C.handleBlur,disabled:D.name==="username"&&m,readOnly:D.name==="username"&&m,autoComplete:"off",placeholder:D.placeholder,error:C.errors[D.name],ariaInvalid:C.errors.name?!0:void 0,required:D.required,noMargin:!0,autoFocus:z},D.name);if(D.type==="select")return f.jsx(II,{id:D.name,name:D.name,value:C.values[D.name],onChange:C.handleChange,label:D.label,error:C.errors[D.name],required:D.required,placeholder:D.placeholder,autoFocus:z,children:($=D.options)==null?void 0:$.map(M=>f.jsx("option",{value:M,children:M},M))},D.name);if(D.type==="checkbox")return f.jsx(BI,{id:D.name,name:D.name,value:C.values[D.name],checked:C.values[D.name]==="true",onChange:C.handleChange,required:D.required,error:C.errors[D.name],children:D.label},D.name);if(D.type==="radio")return f.jsx(tx.Group,{id:D.name,label:D.label,required:D.required,error:C.errors[D.name],children:(N=D.options)==null?void 0:N.map(M=>f.jsx(tx,{onChange:P=>{P?C.setFieldValue(D.name,M):C.setFieldValue(D.name,"")},id:M,name:D.name,value:M===C.values[D.name],children:M},M))},D.name);if(D.type==="textarea")return f.jsx(Qu,{id:D.name,name:D.name,value:C.values[D.name],onChange:C.handleChange,onBlur:C.handleBlur,placeholder:D.placeholder,error:C.errors[D.name],required:D.required,label:D.label,noMargin:!0,autoFocus:z},D.name)}),f.jsx(Rt,{textKey:k.GreeterButtonText,bgKey:k.GreeterButtonBackground,type:"submit",size:"lg",disabled:p||a,className:"transition-all duration-300 hover:opacity-90 transform hover:translate-y-[-1px] shadow-sm",children:p||a?f.jsxs("div",{className:"flex items-center justify-center",children:[f.jsx("span",{className:"mr-2",children:o?"Bağlanıyor":"Yükleniyor"}),f.jsx("span",{className:"animate-pulse",children:"..."})]}):o?"Canlı Desteğe Bağlan":"Sohbet Oluştur"})]}),f.jsx(xo,{variant:"block",className:"py-2"})]})}var tn=(e=>(e.Open="open",e.Closed="closed",e.Pending="pending",e.Deleted="deleted",e.Created="created",e.Agent="agent",e))(tn||{}),gn=(e=>(e.AdminJoin="admin_join",e.AdminLeave="admin_leave",e.ChatCreated="chat_created",e.AdminToggleUpload="admin_toggle_upload",e))(gn||{}),ye=(e=>(e.Customer="customer",e.User="user",e.Agent="agent",e.System="system",e.Activity="activity",e))(ye||{});const gs=e=>{const t=UE(),n=(r,i)=>{var o;const s=((o=NB.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}};var UI={exports:{}},Xd={exports:{}},nx;function tC(){return nx||(nx=1,function(e,t){(function(n,r){e.exports=r()})(ch,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",o="second",a="minute",l="hour",c="day",d="week",u="month",p="quarter",h="year",y="date",x="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(z){var $=["th","st","nd","rd"],N=z%100;return"["+z+($[(N-20)%10]||$[N]||$[0])+"]"}},b=function(z,$,N){var M=String(z);return!M||M.length>=$?z:""+Array($+1-M.length).join(N)+z},C={s:b,z:function(z){var $=-z.utcOffset(),N=Math.abs($),M=Math.floor(N/60),P=N%60;return($<=0?"+":"-")+b(M,2,"0")+":"+b(P,2,"0")},m:function z($,N){if($.date()<N.date())return-z(N,$);var M=12*(N.year()-$.year())+(N.month()-$.month()),P=$.clone().add(M,u),B=N-P<0,U=$.clone().add(M+(B?-1:1),u);return+(-(M+(N-P)/(B?P-U:U-P))||0)},a:function(z){return z<0?Math.ceil(z)||0:Math.floor(z)},p:function(z){return{M:u,y:h,w:d,d:c,D:y,h:l,m:a,s:o,ms:s,Q:p}[z]||String(z||"").toLowerCase().replace(/s$/,"")},u:function(z){return z===void 0}},S="en",_={};_[S]=g;var j="$isDayjsObject",A=function(z){return z instanceof D||!(!z||!z[j])},E=function z($,N,M){var P;if(!$)return S;if(typeof $=="string"){var B=$.toLowerCase();_[B]&&(P=B),N&&(_[B]=N,P=B);var U=$.split("-");if(!P&&U.length>1)return z(U[0])}else{var W=$.name;_[W]=$,P=W}return!M&&P&&(S=P),P||!M&&S},L=function(z,$){if(A(z))return z.clone();var N=typeof $=="object"?$:{};return N.date=z,N.args=arguments,new D(N)},F=C;F.l=E,F.i=A,F.w=function(z,$){return L(z,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var D=function(){function z(N){this.$L=E(N.locale,null,!0),this.parse(N),this.$x=this.$x||N.x||{},this[j]=!0}var $=z.prototype;return $.parse=function(N){this.$d=function(M){var P=M.date,B=M.utc;if(P===null)return new Date(NaN);if(F.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var U=P.match(w);if(U){var W=U[2]-1||0,q=(U[7]||"0").substring(0,3);return B?new Date(Date.UTC(U[1],W,U[3]||1,U[4]||0,U[5]||0,U[6]||0,q)):new Date(U[1],W,U[3]||1,U[4]||0,U[5]||0,U[6]||0,q)}}return new Date(P)}(N),this.init()},$.init=function(){var N=this.$d;this.$y=N.getFullYear(),this.$M=N.getMonth(),this.$D=N.getDate(),this.$W=N.getDay(),this.$H=N.getHours(),this.$m=N.getMinutes(),this.$s=N.getSeconds(),this.$ms=N.getMilliseconds()},$.$utils=function(){return F},$.isValid=function(){return this.$d.toString()!==x},$.isSame=function(N,M){var P=L(N);return this.startOf(M)<=P&&P<=this.endOf(M)},$.isAfter=function(N,M){return L(N)<this.startOf(M)},$.isBefore=function(N,M){return this.endOf(M)<L(N)},$.$g=function(N,M,P){return F.u(N)?this[M]:this.set(P,N)},$.unix=function(){return Math.floor(this.valueOf()/1e3)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(N,M){var P=this,B=!!F.u(M)||M,U=F.p(N),W=function(Y,V){var Z=F.w(P.$u?Date.UTC(P.$y,V,Y):new Date(P.$y,V,Y),P);return B?Z:Z.endOf(c)},q=function(Y,V){return F.w(P.toDate()[Y].apply(P.toDate("s"),(B?[0,0,0,0]:[23,59,59,999]).slice(V)),P)},se=this.$W,ie=this.$M,pe=this.$D,ce="set"+(this.$u?"UTC":"");switch(U){case h:return B?W(1,0):W(31,11);case u:return B?W(1,ie):W(0,ie+1);case d:var _e=this.$locale().weekStart||0,Re=(se<_e?se+7:se)-_e;return W(B?pe-Re:pe+(6-Re),ie);case c:case y:return q(ce+"Hours",0);case l:return q(ce+"Minutes",1);case a:return q(ce+"Seconds",2);case o:return q(ce+"Milliseconds",3);default:return this.clone()}},$.endOf=function(N){return this.startOf(N,!1)},$.$set=function(N,M){var P,B=F.p(N),U="set"+(this.$u?"UTC":""),W=(P={},P[c]=U+"Date",P[y]=U+"Date",P[u]=U+"Month",P[h]=U+"FullYear",P[l]=U+"Hours",P[a]=U+"Minutes",P[o]=U+"Seconds",P[s]=U+"Milliseconds",P)[B],q=B===c?this.$D+(M-this.$W):M;if(B===u||B===h){var se=this.clone().set(y,1);se.$d[W](q),se.init(),this.$d=se.set(y,Math.min(this.$D,se.daysInMonth())).$d}else W&&this.$d[W](q);return this.init(),this},$.set=function(N,M){return this.clone().$set(N,M)},$.get=function(N){return this[F.p(N)]()},$.add=function(N,M){var P,B=this;N=Number(N);var U=F.p(M),W=function(ie){var pe=L(B);return F.w(pe.date(pe.date()+Math.round(ie*N)),B)};if(U===u)return this.set(u,this.$M+N);if(U===h)return this.set(h,this.$y+N);if(U===c)return W(1);if(U===d)return W(7);var q=(P={},P[a]=r,P[l]=i,P[o]=n,P)[U]||1,se=this.$d.getTime()+N*q;return F.w(se,this)},$.subtract=function(N,M){return this.add(-1*N,M)},$.format=function(N){var M=this,P=this.$locale();if(!this.isValid())return P.invalidDate||x;var B=N||"YYYY-MM-DDTHH:mm:ssZ",U=F.z(this),W=this.$H,q=this.$m,se=this.$M,ie=P.weekdays,pe=P.months,ce=P.meridiem,_e=function(V,Z,ue,O){return V&&(V[Z]||V(M,B))||ue[Z].slice(0,O)},Re=function(V){return F.s(W%12||12,V,"0")},Y=ce||function(V,Z,ue){var O=V<12?"AM":"PM";return ue?O.toLowerCase():O};return B.replace(m,function(V,Z){return Z||function(ue){switch(ue){case"YY":return String(M.$y).slice(-2);case"YYYY":return F.s(M.$y,4,"0");case"M":return se+1;case"MM":return F.s(se+1,2,"0");case"MMM":return _e(P.monthsShort,se,pe,3);case"MMMM":return _e(pe,se);case"D":return M.$D;case"DD":return F.s(M.$D,2,"0");case"d":return String(M.$W);case"dd":return _e(P.weekdaysMin,M.$W,ie,2);case"ddd":return _e(P.weekdaysShort,M.$W,ie,3);case"dddd":return ie[M.$W];case"H":return String(W);case"HH":return F.s(W,2,"0");case"h":return Re(1);case"hh":return Re(2);case"a":return Y(W,q,!0);case"A":return Y(W,q,!1);case"m":return String(q);case"mm":return F.s(q,2,"0");case"s":return String(M.$s);case"ss":return F.s(M.$s,2,"0");case"SSS":return F.s(M.$ms,3,"0");case"Z":return U}return null}(V)||U.replace(":","")})},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(N,M,P){var B,U=this,W=F.p(M),q=L(N),se=(q.utcOffset()-this.utcOffset())*r,ie=this-q,pe=function(){return F.m(U,q)};switch(W){case h:B=pe()/12;break;case u:B=pe();break;case p:B=pe()/3;break;case d:B=(ie-se)/6048e5;break;case c:B=(ie-se)/864e5;break;case l:B=ie/i;break;case a:B=ie/r;break;case o:B=ie/n;break;default:B=ie}return P?B:F.a(B)},$.daysInMonth=function(){return this.endOf(u).$D},$.$locale=function(){return _[this.$L]},$.locale=function(N,M){if(!N)return this.$L;var P=this.clone(),B=E(N,M,!0);return B&&(P.$L=B),P},$.clone=function(){return F.w(this.$d,this)},$.toDate=function(){return new Date(this.valueOf())},$.toJSON=function(){return this.isValid()?this.toISOString():null},$.toISOString=function(){return this.$d.toISOString()},$.toString=function(){return this.$d.toUTCString()},z}(),G=D.prototype;return L.prototype=G,[["$ms",s],["$s",o],["$m",a],["$H",l],["$W",c],["$M",u],["$y",h],["$D",y]].forEach(function(z){G[z[1]]=function($){return this.$g($,z[0],z[1])}}),L.extend=function(z,$){return z.$i||(z($,D,L),z.$i=!0),L},L.locale=E,L.isDayjs=A,L.unix=function(z){return L(1e3*z)},L.en=_[S],L.Ls=_,L.p={},L})}(Xd)),Xd.exports}(function(e,t){(function(n,r){e.exports=r(tC())})(ch,function(n){function r(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var i=r(n),s={name:"tr",weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekStart:1,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(o){return o+"."}};return i.default.locale(s,null,!0),s})})(UI);var nC={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ch,function(){return function(n,r,i){n=n||{};var s=r.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function a(c,d,u,p){return s.fromToBase(c,d,u,p)}i.en.relativeTime=o,s.fromToBase=function(c,d,u,p,h){for(var y,x,w,m=u.$locale().relativeTime||o,g=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],b=g.length,C=0;C<b;C+=1){var S=g[C];S.d&&(y=p?i(c).diff(u,S.d,!0):u.diff(c,S.d,!0));var _=(n.rounding||Math.round)(Math.abs(y));if(w=y>0,_<=S.r||!S.r){_<=1&&C>0&&(S=g[C-1]);var j=m[S.l];h&&(_=h(""+_)),x=typeof j=="string"?j.replace("%d",_):j(_,d,S.l,w);break}}if(d)return x;var A=w?m.future:m.past;return typeof A=="function"?A(x):A.replace("%s",x)},s.to=function(c,d){return a(c,d,this,!0)},s.from=function(c,d){return a(c,d,this)};var l=function(c){return c.$u?i.utc():i()};s.toNow=function(c){return this.to(l(this),c)},s.fromNow=function(c){return this.from(l(this),c)}}})})(nC);var HI=nC.exports;const WI=Rr(HI);var qI=tC();const Zd=Rr(qI),GI=(e="tr")=>(Zd.extend(WI),Zd.locale(e),Zd);function YI({onHasHistory:e,emptyStateText:t}){const n=re(g=>g.widget),r=re(g=>g.setHistoryChat),i=re(g=>g.setHistoryMessages),s=Se(),o=gs(),[a,l]=v.useState(null),c=GI(),d=v.useRef(!1),u=n!=null&&n.link_id?mi(n.link_id):null,{data:p,isLoading:h}=fM((n==null?void 0:n.link_id)||"",u||"");if(v.useEffect(()=>{if(!h&&p){const[g,b]=p,C=zn(b)&&Array.isArray(g)&&g.length>0;if(C&&!d.current){const S=g[0];if(S.status===tn.Open||S.status===tn.Pending){console.log("ChatHistoryList: Auto-joining active chat",S._id),d.current=!0,r(S),i(null),o.push("chat");return}}e&&e(C)}},[h,p,e,o,r,i]),!(n!=null&&n.link_id))return null;if(h)return f.jsx("div",{className:"p-4 text-center text-xs opacity-50",children:"Yükleniyor..."});if(!p)return null;const[y,x]=p;if(!zn(x)||!Array.isArray(y))return null;const w=g=>c(g).fromNow(),m=g=>{var b;return g.who_joined_details&&Array.isArray(g.who_joined_details)&&g.who_joined_details.length>0?g.who_joined_details[0].name||"Atanmamış":g.participant_logs&&Array.isArray(g.participant_logs)&&g.participant_logs.length>0?g.participant_logs[0].name||"Atanmamış":(b=g.archive_summary)!=null&&b.admin_name?g.archive_summary.admin_name:"Atanmamış"};return y.length===0?f.jsx("div",{className:"h-full flex items-center justify-center p-6 text-center",children:f.jsxs("div",{className:"max-w-xs",children:[f.jsx("div",{className:"text-sm font-medium opacity-80",children:"Henüz sohbet yok"}),f.jsx("div",{className:"mt-2 text-xs opacity-60",children:t||"Yeni bir sohbet başlatmak için aşağıdaki butonu kullanabilirsiniz."})]})}):f.jsx("div",{className:"flex flex-col h-full",children:f.jsx("div",{className:"flex-1 overflow-y-auto space-y-0 min-h-0",children:y.map(g=>f.jsxs("button",{type:"button",className:"w-full flex justify-between items-center gap-2 p-5 text-left transition-colors",style:{color:s.getColor(k.InputText),backgroundColor:a===g._id?s.getColor(k.MessageAdminBackground):"transparent",cursor:"pointer"},onMouseEnter:()=>l(g._id),onMouseLeave:()=>l(null),onClick:()=>{r(g),i(null),o.push("chat")},children:[f.jsx("span",{className:"font-medium text-sm truncate flex-1 min-w-0",children:m(g)}),f.jsx("span",{className:"text-xs flex-shrink-0 tabular-nums",style:{color:s.getColor(k.FooterText)},children:w(g.created_at)})]},g._id))})})}const Jd=[De.Light,De.Dark,De.System];function QI(e){switch(e){case De.Light:return X.Sun;case De.Dark:return X.Moon;case De.System:return X.Monitor;default:return X.Monitor}}function KI(){const e=Se(),{mode:t,setMode:n}=e,r=()=>{const s=Jd.indexOf(t),o=Jd[(s+1)%Jd.length];n(o)},i=QI(t);return f.jsx("button",{type:"button",onClick:r,className:"flex items-center justify-center p-1.5 rounded-md hover:opacity-80 transition-opacity",style:{backgroundColor:"transparent",color:e.getColor(k.HeaderText)},title:t===De.Light?"Açık tema":t===De.Dark?"Koyu tema":"Sistem",children:f.jsx(i,{className:"size-5"})})}const cr=Object.create(null);cr.open="0";cr.close="1";cr.ping="2";cr.pong="3";cr.message="4";cr.upgrade="5";cr.noop="6";const uc=Object.create(null);Object.keys(cr).forEach(e=>{uc[cr[e]]=e});const Qp={type:"error",data:"parser error"},rC=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",iC=typeof ArrayBuffer=="function",sC=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,pg=({type:e,data:t},n,r)=>rC&&t instanceof Blob?n?r(t):rx(t,r):iC&&(t instanceof ArrayBuffer||sC(t))?n?r(t):rx(new Blob([t]),r):r(cr[e]+(t||"")),rx=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function ix(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let ef;function XI(e,t){if(rC&&e.data instanceof Blob)return e.data.arrayBuffer().then(ix).then(t);if(iC&&(e.data instanceof ArrayBuffer||sC(e.data)))return t(ix(e.data));pg(e,!1,n=>{ef||(ef=new TextEncoder),t(ef.encode(n))})}const sx="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Jo=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<sx.length;e++)Jo[sx.charCodeAt(e)]=e;const ZI=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=Jo[e.charCodeAt(r)],o=Jo[e.charCodeAt(r+1)],a=Jo[e.charCodeAt(r+2)],l=Jo[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},JI=typeof ArrayBuffer=="function",hg=(e,t)=>{if(typeof e!="string")return{type:"message",data:oC(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:eL(e.substring(1),t)}:uc[n]?e.length>1?{type:uc[n],data:e.substring(1)}:{type:uc[n]}:Qp},eL=(e,t)=>{if(JI){const n=ZI(e);return oC(n,t)}else return{base64:!0,data:e}},oC=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},aC="",tL=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{pg(s,!1,a=>{r[o]=a,++i===n&&t(r.join(aC))})})},nL=(e,t)=>{const n=e.split(aC),r=[];for(let i=0;i<n.length;i++){const s=hg(n[i],t);if(r.push(s),s.type==="error")break}return r};function rL(){return new TransformStream({transform(e,t){XI(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 tf;function Vl(e){return e.reduce((t,n)=>t+n.length,0)}function Ul(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 iL(e,t){tf||(tf=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(Vl(n)<1)break;const l=Ul(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(Vl(n)<2)break;const l=Ul(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(Vl(n)<8)break;const l=Ul(n,8),c=new DataView(l.buffer,l.byteOffset,l.length),d=c.getUint32(0);if(d>Math.pow(2,21)-1){a.enqueue(Qp);break}i=d*Math.pow(2,32)+c.getUint32(4),r=3}else{if(Vl(n)<i)break;const l=Ul(n,i);a.enqueue(hg(s?l:tf.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(Qp);break}}}})}const lC=4;function at(e){if(e)return sL(e)}function sL(e){for(var t in at.prototype)e[t]=at.prototype[t];return e}at.prototype.on=at.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};at.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};at.prototype.off=at.prototype.removeListener=at.prototype.removeAllListeners=at.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};at.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};at.prototype.emitReserved=at.prototype.emit;at.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};at.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Ku=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),bn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),oL="arraybuffer";function cC(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const aL=bn.setTimeout,lL=bn.clearTimeout;function Xu(e,t){t.useNativeTimers?(e.setTimeoutFn=aL.bind(bn),e.clearTimeoutFn=lL.bind(bn)):(e.setTimeoutFn=bn.setTimeout.bind(bn),e.clearTimeoutFn=bn.clearTimeout.bind(bn))}const cL=1.33;function uL(e){return typeof e=="string"?dL(e):Math.ceil((e.byteLength||e.size)*cL)}function dL(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 uC(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function fL(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function pL(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 hL extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class mg extends at{constructor(t){super(),this.writable=!1,Xu(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new hL(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=hg(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=fL(t);return n.length?"?"+n:""}}class mL extends mg{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)};nL(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,tL(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]=uC()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let dC=!1;try{dC=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const gL=dC;function vL(){}class yL extends mL{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 ar extends at{constructor(t,n,r){super(),this.createRequest=t,Xu(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=cC(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=ar.requestsCount++,ar.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=vL,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete ar.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()}}ar.requestsCount=0;ar.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",ox);else if(typeof addEventListener=="function"){const e="onpagehide"in bn?"pagehide":"unload";addEventListener(e,ox,!1)}}function ox(){for(let e in ar.requests)ar.requests.hasOwnProperty(e)&&ar.requests[e].abort()}const xL=function(){const e=fC({xdomain:!1});return e&&e.responseType!==null}();class wL extends yL{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=xL&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new ar(fC,this.uri(),t)}}function fC(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||gL))return new XMLHttpRequest}catch{}if(!t)try{return new bn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const pC=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class bL extends mg{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=pC?{}:cC(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;pg(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}i&&Ku(()=>{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]=uC()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const nf=bn.WebSocket||bn.MozWebSocket;class kL extends bL{createSocket(t,n,r){return pC?new nf(t,n,r):n?new nf(t,n):new nf(t)}doWrite(t,n){this.ws.send(n)}}class SL extends mg{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=iL(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=rL();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&&Ku(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const CL={websocket:kL,webtransport:SL,polling:wL},_L=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,TL=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Kp(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=_L.exec(e||""),s={},o=14;for(;o--;)s[TL[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=EL(s,s.path),s.queryKey=AL(s,s.query),s}function EL(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 AL(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const Xp=typeof addEventListener=="function"&&typeof removeEventListener=="function",dc=[];Xp&&addEventListener("offline",()=>{dc.forEach(e=>e())},!1);class ui extends at{constructor(t,n){if(super(),this.binaryType=oL,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=Kp(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=Kp(n.host).host);Xu(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=pL(this.opts.query)),Xp&&(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"})},dc.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=lC,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&&ui.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",ui.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+=uL(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,Ku(()=>{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(ui.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(),Xp&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=dc.indexOf(this._offlineEventListener);r!==-1&&dc.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ui.protocol=lC;class jL extends ui{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;ui.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;ui.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 p=new Error("probe error");p.transport=n.name,this.emitReserved("upgradeError",p)}}))};function s(){r||(r=!0,d(),n.close(),n=null)}const o=u=>{const p=new Error("probe error: "+u);p.transport=n.name,s(),this.emitReserved("upgradeError",p)};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 RL=class extends jL{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=>CL[i]).filter(i=>!!i)),super(t,r)}};function PL(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=Kp(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 ML=typeof ArrayBuffer=="function",OL=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,hC=Object.prototype.toString,NL=typeof Blob=="function"||typeof Blob<"u"&&hC.call(Blob)==="[object BlobConstructor]",DL=typeof File=="function"||typeof File<"u"&&hC.call(File)==="[object FileConstructor]";function gg(e){return ML&&(e instanceof ArrayBuffer||OL(e))||NL&&e instanceof Blob||DL&&e instanceof File}function fc(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(fc(e[n]))return!0;return!1}if(gg(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return fc(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&fc(e[n]))return!0;return!1}function IL(e){const t=[],n=e.data,r=e;return r.data=Zp(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Zp(e,t){if(!e)return e;if(gg(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]=Zp(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]=Zp(e[r],t));return n}return e}function LL(e,t){return e.data=Jp(e.data,t),delete e.attachments,e}function Jp(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]=Jp(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Jp(e[n],t));return e}const FL=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],BL=5;var Ee;(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"})(Ee||(Ee={}));class $L{constructor(t){this.replacer=t}encode(t){return(t.type===Ee.EVENT||t.type===Ee.ACK)&&fc(t)?this.encodeAsBinary({type:t.type===Ee.EVENT?Ee.BINARY_EVENT:Ee.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Ee.BINARY_EVENT||t.type===Ee.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=IL(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function ax(e){return Object.prototype.toString.call(e)==="[object Object]"}class vg extends at{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===Ee.BINARY_EVENT;r||n.type===Ee.BINARY_ACK?(n.type=r?Ee.EVENT:Ee.ACK,this.reconstructor=new zL(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(gg(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(Ee[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Ee.BINARY_EVENT||r.type===Ee.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(vg.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 Ee.CONNECT:return ax(n);case Ee.DISCONNECT:return n===void 0;case Ee.CONNECT_ERROR:return typeof n=="string"||ax(n);case Ee.EVENT:case Ee.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&FL.indexOf(n[0])===-1);case Ee.ACK:case Ee.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class zL{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=LL(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const VL=Object.freeze(Object.defineProperty({__proto__:null,Decoder:vg,Encoder:$L,get PacketType(){return Ee},protocol:BL},Symbol.toStringTag,{value:"Module"}));function Dn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const UL=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class mC extends at{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=[Dn(t,"open",this.onopen.bind(this)),Dn(t,"packet",this.onpacket.bind(this)),Dn(t,"error",this.onerror.bind(this)),Dn(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(UL.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:Ee.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:Ee.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 Ee.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 Ee.EVENT:case Ee.BINARY_EVENT:this.onevent(t);break;case Ee.ACK:case Ee.BINARY_ACK:this.onack(t);break;case Ee.DISCONNECT:this.ondisconnect();break;case Ee.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:Ee.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:Ee.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 Ro(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}Ro.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};Ro.prototype.reset=function(){this.attempts=0};Ro.prototype.setMin=function(e){this.ms=e};Ro.prototype.setMax=function(e){this.max=e};Ro.prototype.setJitter=function(e){this.jitter=e};class eh extends at{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Xu(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Ro({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||VL;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 RL(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Dn(n,"open",function(){r.onopen(),t&&t()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=Dn(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(Dn(t,"ping",this.onping.bind(this)),Dn(t,"data",this.ondata.bind(this)),Dn(t,"error",this.onerror.bind(this)),Dn(t,"close",this.onclose.bind(this)),Dn(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){Ku(()=>{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 mC(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Ho={};function pc(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=PL(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=Ho[i]&&s in Ho[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new eh(r,t):(Ho[i]||(Ho[i]=new eh(r,t)),l=Ho[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(pc,{Manager:eh,Socket:mC,io:pc,connect:pc});const gC=v.createContext(null),dr=()=>{const e=v.useContext(gC);if(!e)throw new Error("useWebsocket must be used within a WebSocketProvider");return e},HL=({children:e})=>{const{widget:t,isHaveChat:n,isAIAgentMode:r}=re(),i=v.useRef(null),s=v.useRef(!1),o=v.useRef(!1),a=v.useRef(null),[l,c]=v.useState(!1),[d,u]=v.useState(!1),p=v.useCallback(S=>{var _;console.log("WS: cleanupSocket called",{reason:S,hasSocket:!!i.current,isConnected:(_=i.current)==null?void 0:_.connected,currentLinkId:a.current}),i.current&&(console.log("WS: Cleaning up existing socket.",S||""),i.current.removeAllListeners(),i.current.disconnect(),i.current=null),c(!1),u(!1),o.current=!1,s.current=!1,a.current=null},[]),h=v.useCallback((S,_,j)=>{if(a.current===S&&(o.current||i.current&&i.current.connected)){console.log("WS: Connect called but already connecting or connected for same linkId.");return}if(!_&&!j){console.log("WS: Connect skipped - no active chat or AI agent mode");return}const A=Zo(st.CustomerToken,S)||ga("customer_token"),E=Zo(st.CustomerRefreshToken,S)||ga("customer_refresh_token");if(!A||!E){if(console.log("WS: Connect skipped - missing required tokens"),_){console.log("WS: Clearing stale isHaveChat flag due to missing tokens"),localStorage.removeItem("lc:widget:isHaveChat");try{re.getState().setIsHaveChat(!1)}catch{}}return}if(i.current&&!i.current.connected&&(console.log("WS: Cleaning up disconnected/failed socket before new connection"),i.current.removeAllListeners(),i.current.disconnect(),i.current=null),i.current&&i.current.connected){console.log("WS: Already connected, skipping new connection");return}console.log("WS: Attempting to connect...",{linkId:S,tokenPrefix:`${A==null?void 0:A.substring(0,20)}...`,refreshTokenPrefix:`${E==null?void 0:E.substring(0,20)}...`,deviceId:Zo(st.DeviceId,S)}),o.current=!0,a.current=S;const L=pc(jT,{transports:["websocket"],forceNew:!0,timeout:1e4,auth:{customer_token:A,device_id:Zo(st.DeviceId,S)||ga("device_id"),customer_refresh_token:E}});i.current=L,L.on("error",F=>{console.error("WS: Websocket error",F),o.current=!1}),L.on("connect_error",F=>{console.error("WS: Connect error",F),o.current=!1,c(!1),u(!1),i.current===L&&(i.current=null,a.current=null);const D=(F==null?void 0:F.message)||String(F);if(D.toLowerCase().includes("unauthorized")||D.includes("401")){console.log("WS: Unauthorized error, clearing tokens only"),S&&iS(S),localStorage.removeItem("lc:widget:isHaveChat");try{re.getState().setIsHaveChat(!1)}catch{}}}),L.on("disconnect",F=>{var G;console.log("WS: Disconnected",F),c(!1),u(!1),o.current=!1,s.current=!1,i.current===L&&(i.current=null,a.current=null);const D=re.getState();F==="io server disconnect"&&((G=D.widget)!=null&&G.link_id)&&(D.isHaveChat||D.isAIAgentMode)&&(console.log("WS: Server disconnect, attempting reconnect..."),setTimeout(()=>{h(D.widget.link_id,D.isHaveChat,D.isAIAgentMode)},500))}),L.on("connect",()=>{console.log("WS: Connected successfully"),c(!0),o.current=!1}),L.on("connection:ready",()=>{console.log("WS: Connection ready received"),s.current=!0,u(!0)})},[]);v.useEffect(()=>{const S=t==null?void 0:t.link_id;return S&&(n||r)?(console.log("WS: Auto-connecting due to linkId and isHaveChat/isAIAgentMode",{isHaveChat:n,isAIAgentMode:r}),h(S,n,r)):!n&&!r&&(console.log("WS: Auto-disconnect due to no isHaveChat and no isAIAgentMode"),p("no active chat flags")),()=>{}},[t==null?void 0:t.link_id,n,r,h,p]),v.useEffect(()=>()=>{console.log("WS: Provider unmounting, cleaning up"),p("provider unmount")},[p]),v.useEffect(()=>{const S=()=>{console.log("WS: Page unloading, disconnecting socket"),i.current&&(i.current.disconnect(),i.current=null)},_=()=>{console.log("WS: Page hidden (pagehide), disconnecting socket"),i.current&&(i.current.disconnect(),i.current=null)};return window.addEventListener("beforeunload",S),window.addEventListener("pagehide",_),()=>{window.removeEventListener("beforeunload",S),window.removeEventListener("pagehide",_)}},[]);const y=v.useCallback(()=>{const S=t==null?void 0:t.link_id;S?h(S,n,r):console.warn("WS: Manual connect failed, no link_id available.")},[t==null?void 0:t.link_id,n,r,h]),x=v.useCallback(()=>{console.log("WS: Reconnecting..."),p("manual reconnect");const S=t==null?void 0:t.link_id;S&&setTimeout(()=>{h(S,n,r)},100)},[t==null?void 0:t.link_id,n,r,h,p]),w=v.useCallback(()=>{console.log("WS: Manual disconnect"),p("manual disconnect")},[p]),m=v.useCallback((S,_)=>{var j;(j=i.current)==null||j.on(S,_)},[]),g=v.useCallback((S,_)=>{var j;(j=i.current)==null||j.off(S,_)},[]),b=v.useCallback((S,_,j)=>{i.current&&i.current.connected?i.current.emit(S,_,j):console.warn(`WS: Cannot emit event '${S}', socket not connected.`)},[]),C=v.useMemo(()=>({connectionReady:d,connected:l,connect:y,reconnect:x,disconnect:w,on:m,off:g,emit:b}),[l,d,y,x,w,m,g,b]);return f.jsx(gC.Provider,{value:C,children:e})},Jc=(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])},Po=()=>{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},WL=()=>{let e=!1;return typeof window<"u"&&(e=new URLSearchParams(window.location.search).get("fullscreen")==="true"),e},Zu=()=>v.useMemo(()=>typeof window>"u"||new URLSearchParams(window.location.search).get("fullscreen")==="true"?!1:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent),[]);var He=(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.AgentRequestHuman="agent:request:human",e.AgentMessageCreate="agent:message:create",e.ChatUpdateInputs="chat:update:inputs",e))(He||{}),ve=(e=>(e.Connect="connect",e.Disconnect="disconnect",e.ConnectionReady="connection:ready",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.ChatUserJoin="chat:user:join",e.AgentMessageChunk="agent:message:chunk",e.AgentMessageFinalMetadata="agent:message:final_metadata",e.AgentSpamWarning="agent:spam:warning",e.AgentSpamBanned="agent:spam:banned",e))(ve||{});function qL(){const e=Yu(),t=v.useCallback(()=>{const n=window.location.pathname;n!==e.page&&e.setPage(n)},[e.page]);return Jc("popstate",t),null}function GL(){const e=dr(),t=Yu(),n=v.useCallback(()=>{const r=window.location.pathname;if(r!==t.page){if(e){e.emit(He.PageChange,{page:r});return}t.setPage(r)}},[e,t.page]);return Jc("popstate",n),v.useEffect(()=>{if(!e)return;const r=OI(),i=MI();r!==i&&(e.emit(He.PageChange,{page:i}),t.setPage(i))},[e]),null}function YL(){return qL(),null}const lx=(e,t)=>{var n;return(n=e.find(r=>r.type===t))==null?void 0:n.content};function QL(){var ce,_e,Re,Y;const e=Se(),t=re(V=>V.widget),n=re(V=>V.setOpen),r=re(V=>V.setAIAgent),i=re(V=>V.setIsAIAgentMode),s=re(V=>V.setIsHaveChat),o=re(V=>V.isHaveChat),a=re(V=>V.humanNeedRequested),l=re(V=>V.setHumanNeedRequested),c=re(V=>V.aiAgent),d=re(V=>V.setShowActionButtons),u=re(V=>V.defaultValues),[p,h]=v.useState(!1),[y,x]=v.useState(!1),[w,m]=v.useState(null),g=gs(),b=Po(),C=Zu(),[S,_]=v.useState(!0),[j,A]=v.useState(!1),E=Yu(),L=Gm(),F=dr(),[D,G]=v.useState(null),z=v.useRef(!1),$=v.useRef(!1),N=v.useRef(!1),M=ll(),P=v.useCallback(async()=>{var Z,ue,O;if(!t)return;m(null),re.getState().setHistoryChat(null),re.getState().setHistoryMessages(null),re.getState().clearAIAgentState(),d(!1);const V=(((O=(ue=(Z=t.appearance)==null?void 0:Z.body)==null?void 0:ue.inputs)==null?void 0:O.length)||0)>0;if(D){if(N.current)return;N.current=!0;try{const ae={username:(u==null?void 0:u.username)||"Ziyaretçi",email:`visitor_${Date.now()}@temp.local`};u!=null&&u.secret_data&&(ae.secret_data=u.secret_data);const[ee,ke]=await L.mutateAsync({inputs:ae,history:E.history,client_id:t.client_id,widget_id:t.link_id,device_id:mi(t.link_id),is_agent_mode:!0});zn(ke)&&Fp(ee)?(Fn(st.CustomerToken,ee.customer_token,t.link_id),Fn(st.CustomerRefreshToken,ee.customer_refresh_token,t.link_id),Fn(st.DeviceId,ee.device_id,t.link_id),E.clearHistory(),s(!0),r(D),i(!0),g.push("chat")):(ho(ee),(ee==null?void 0:ee.statusCode)===403&&m((ee==null?void 0:ee.message)||"Sohbet başlatılamadı."))}catch(ae){console.error("Error creating chat for AI agent:",ae)}finally{N.current=!1}return}if(!V){if(N.current)return;N.current=!0;try{const ae={};u!=null&&u.secret_data&&(ae.secret_data=u.secret_data),u!=null&&u.username&&(ae.username=u.username);const[ee,ke]=await L.mutateAsync({inputs:ae,history:E.history,client_id:t.client_id,widget_id:t.link_id,device_id:mi(t.link_id)});zn(ke)&&Fp(ee)?(Fn(st.CustomerToken,ee.customer_token,t.link_id),Fn(st.CustomerRefreshToken,ee.customer_refresh_token,t.link_id),Fn(st.DeviceId,ee.device_id,t.link_id),E.clearHistory(),s(!0),g.push("chat")):(ho(ee),(ee==null?void 0:ee.statusCode)===403&&m((ee==null?void 0:ee.message)||"Sohbet başlatılamadı."))}catch(ae){console.error("Error creating chat:",ae)}finally{N.current=!1}return}_(!1)},[t,D,L,E,u==null?void 0:u.secret_data,u==null?void 0:u.username,s,r,i,g,d]),B=v.useCallback(V=>{A(V)},[]);if(!t)return null;const U=()=>{n(!1)};v.useEffect(()=>{var ue,O,ae;if(!t||z.current)return;z.current=!0;const V=mr(t.link_id);if(V.isAgentMode&&V.agent&&(M!=null&&M.accessToken)){if(r(V.agent),i(!0),V.sessionId&&re.getState().setAIAgentSessionId(V.sessionId),V.humanNeedRequested){if(re.getState().setHumanNeedRequested(!0),!((((ae=(O=(ue=t.appearance)==null?void 0:ue.body)==null?void 0:O.inputs)==null?void 0:ae.length)||0)>0)){g.push("chat");return}return}G(V.agent),g.push("chat");return}(async()=>{try{const[ee,ke]=await hM(t.link_id);ke===200&&ee&&ee.is_active&&G(ee)}catch(ee){console.error("Failed to check AI agent:",ee)}})()},[t,M==null?void 0:M.accessToken,M==null?void 0:M.refreshToken,g,r,i]),v.useEffect(()=>{if(p||!t||!M||!M.accessToken){$.current=!1;return}if($.current||a)return;if(o){g.push("chat");return}const V=mr(t.link_id);V.isAgentMode&&V.agent&&!V.humanNeedRequested||($.current=!0,oM(t.client_id,Yi(M)).then(([Z,ue])=>{if(zn(ue))a||g.push("chat");else if(ue===403){const O=mr(t.link_id);if(O.isAgentMode&&O.agent){if(O.humanNeedRequested){r(O.agent),i(!1),O.sessionId&&re.getState().setAIAgentSessionId(O.sessionId),re.getState().setHumanNeedRequested(!0);return}r(O.agent),i(!0),O.sessionId&&re.getState().setAIAgentSessionId(O.sessionId),g.push("chat")}else pa(t.link_id||""),h(!0)}else ue===404?(pa(t.link_id||""),h(!0)):ue===401?(iS(t.link_id||""),h(!0)):g.push("chat")}).catch(()=>g.push("chat")))},[p,g,r,i,t,M==null?void 0:M.accessToken,M==null?void 0:M.refreshToken,o,a]);const W=lx(((_e=(ce=t.appearance)==null?void 0:ce.head)==null?void 0:_e.elements)||[],"text"),q=lx(((Y=(Re=t.appearance)==null?void 0:Re.head)==null?void 0:Y.elements)||[],"title"),se=()=>{if(a&&t){let V=c;if(!V){const Z=mr(t.link_id);Z.agent&&(V=Z.agent,r(Z.agent),G(Z.agent))}if(V){i(!0),re.getState().setHistoryChat(null),re.getState().setHistoryMessages(null),g.push("chat");return}}_(!0)},ie=()=>{D&&(r(D),i(!0),re.getState().setHistoryChat(null),re.getState().setHistoryMessages(null),g.push("chat"))},pe=v.useCallback(V=>{if(!F||y)return;x(!0);const Z=()=>{F.emit(He.AgentRequestHuman,{},ue=>{x(!1),ue!=null&&ue.success&&(re.getState().setIsHaveChat(!0),d(!1),i(!1),l(!1),re.getState().clearAIAgentState(),g.push("chat"))})};V&&Object.keys(V).length>0?F.emit(He.ChatUpdateInputs,{inputs:V},ue=>{ue!=null&&ue.success?Z():x(!1)}):Z()},[F,y,i,l,g]);return v.useEffect(()=>{var V,Z,ue;if(a){if(!c&&t){const O=mr(t.link_id);O.agent&&(r(O.agent),G(O.agent))}(c||mr((t==null?void 0:t.link_id)||"").agent)&&((((ue=(Z=(V=t==null?void 0:t.appearance)==null?void 0:V.body)==null?void 0:Z.inputs)==null?void 0:ue.length)||0)>0?_(!1):pe())}},[a,c,t,pe,r]),f.jsxs("div",{className:"h-full w-full flex flex-col relative overflow-hidden",children:[f.jsxs("header",{className:"flex items-center justify-between px-4 py-3 flex-shrink-0 overflow-visible min-h-[52px]",style:{backgroundColor:e.getColor(k.HeaderBackground),color:e.getColor(k.HeaderText),borderColor:e.getColor(k.HeaderBorder),...b?{}:{borderTopLeftRadius:e.getRadius(),borderTopRightRadius:e.getRadius()}},children:[f.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[!S&&(j||a&&(c||t&&mr(t.link_id).agent))&&f.jsx("button",{type:"button",onClick:se,className:"flex-shrink-0 p-1 hover:opacity-80 transition-opacity",children:f.jsx(X.ArrowLeft,{className:"w-5 h-5"})}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsx("div",{className:"text-sm font-semibold truncate",children:S?"Geçmiş sohbetler":q||"Müşteri Hizmetleri"}),!S&&W&&f.jsx("div",{className:"text-xs opacity-90 truncate",children:W})]})]}),f.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0 ml-2",children:[f.jsx(KI,{}),C&&f.jsx("button",{type:"button",onClick:U,className:"p-1.5 rounded-md hover:opacity-80 transition-opacity",children:f.jsx(X.X,{className:"w-5 h-5"})})]})]}),f.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-h-0",style:{backgroundColor:e.getColor(k.Background)},children:S?f.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-h-0",children:f.jsx(YI,{onHasHistory:B,emptyStateText:w||void 0})}):f.jsx("div",{className:"flex-1 overflow-y-auto",children:f.jsx(VI,{clientId:t.client_id,widgetId:t.link_id,appearance:t.appearance,aiAgentMode:!!D&&!a,onAIAgentStart:ie,onOk:()=>{a&&c||(re.getState().setHistoryChat(null),re.getState().setHistoryMessages(null),g.push("chat"))},onOperatorConnect:a&&(c||mr(t.link_id).agent)?pe:void 0,isConnectingToOperator:y})})}),S&&f.jsxs("div",{className:"flex-shrink-0",style:{backgroundColor:e.getColor(k.Background)},children:[f.jsx("div",{className:"px-5 py-2",children:f.jsxs(Rt,{onClick:P,size:"lg",className:"w-full flex items-center justify-center gap-2",children:[f.jsx(X.Plus,{className:"size-4"}),f.jsx("span",{children:"Yeni Sohbet Başlat"})]})}),f.jsx(xo,{variant:"block"})]})]})}function KL(){return f.jsxs(f.Fragment,{children:[f.jsx(QL,{}),f.jsx(YL,{})]})}const XL=[{path:"/",component:KL,name:"registration"}];function rt({className:e="",style:t}){const n=Se();return f.jsx("div",{className:`animate-pulse rounded ${e}`,style:{backgroundColor:n.getColor(k.MessageAdminBackground),opacity:.6,...t}})}function ZL(){const e=Se();return f.jsxs("section",{className:"flex flex-col gap-3 w-full grow pt-4 px-4 overflow-y-auto",children:[f.jsx("div",{className:"flex w-full items-center justify-start",children:f.jsx(rt,{className:"h-12 w-3/5",style:{borderRadius:e.getRadius()}})}),f.jsx("div",{className:"flex w-full items-center justify-end",children:f.jsx(rt,{className:"h-10 w-2/5",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(k.MessageVisitorBackground),opacity:.4}})}),f.jsx("div",{className:"flex w-full items-center justify-start",children:f.jsx(rt,{className:"h-16 w-4/5",style:{borderRadius:e.getRadius()}})}),f.jsx("div",{className:"flex w-full items-center justify-end",children:f.jsx(rt,{className:"h-8 w-1/3",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(k.MessageVisitorBackground),opacity:.4}})}),f.jsx("div",{className:"flex w-full items-center justify-start",children:f.jsx(rt,{className:"h-10 w-1/2",style:{borderRadius:e.getRadius()}})})]})}function JL(){const e=Se();return f.jsxs("div",{className:"p-3 flex items-center gap-3",style:{backgroundColor:e.getColor(k.FooterBackground),borderRadius:e.getRadius()},children:[f.jsx("div",{className:"grow",children:f.jsx(rt,{className:"h-12 w-full",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(k.InputBackground)}})}),f.jsx(rt,{className:"h-12 w-12 rounded-full"})]})}function eF(){const e=Se();return f.jsxs("header",{className:"p-4 flex justify-between items-center z-10",style:{backgroundColor:e.getColor(k.HeaderBackground),borderBottom:`1px solid ${e.getColor(k.HeaderBorder)}`},children:[f.jsx(rt,{className:"h-5 w-36"}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(rt,{className:"h-5 w-5 rounded"}),f.jsx(rt,{className:"h-5 w-5 rounded"})]})]})}function tF(){const e=Se();return f.jsx("section",{className:"h-full overflow-y-auto px-4 py-3",style:{backgroundColor:e.getColor(k.GreeterBackground)},children:f.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[f.jsxs("div",{children:[f.jsx(rt,{className:"h-4 w-20 mb-1"}),f.jsx(rt,{className:"h-11 w-full",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(k.InputBackground)}})]}),f.jsxs("div",{children:[f.jsx(rt,{className:"h-4 w-24 mb-1"}),f.jsx(rt,{className:"h-11 w-full",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(k.InputBackground)}})]}),f.jsxs("div",{children:[f.jsx(rt,{className:"h-4 w-16 mb-1"}),f.jsx(rt,{className:"h-11 w-full",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(k.InputBackground)}})]}),f.jsx(rt,{className:"h-11 w-full mt-2",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(k.GreeterButtonBackground),opacity:.5}})]})})}function nF(){const e=Se();return f.jsxs("div",{className:"relative flex flex-col gap-3 items-center justify-center h-44",style:{backgroundColor:e.getColor(k.GreeterTopBackground)},children:[f.jsx(rt,{className:"h-7 w-40"}),f.jsx(rt,{className:"h-4 w-56"})]})}function vC(){const e=Se();return f.jsxs("div",{className:"h-full w-full flex flex-col overflow-hidden",style:{backgroundColor:e.getColor(k.Background)},children:[f.jsx(eF,{}),f.jsx(ZL,{}),f.jsx(JL,{}),f.jsxs("div",{className:"py-1.5 px-3 flex items-center justify-center gap-1",style:{borderTop:`1px solid ${e.getColor(k.FooterBorder)}`,backgroundColor:e.getColor(k.FooterBackground)},children:[f.jsx(rt,{className:"h-3 w-20"}),f.jsx(rt,{className:"h-3.5 w-3.5 rounded"})]})]})}function th(){const e=Se(),t=typeof window<"u"&&window.innerWidth<768;return f.jsxs("div",{className:`h-full w-full relative overflow-hidden ${t?"":"rounded-xl"}`,style:{backgroundColor:e.getColor(k.GreeterBackground)},children:[f.jsx(nF,{}),f.jsx("div",{style:{height:t?"calc(var(--app-height,100dvh) - 11rem)":"calc(100% - 11rem)"},children:f.jsx(tF,{})})]})}const rF="/notify.mp3",yg="lc:notification_sound_muted",yC=()=>{try{return sessionStorage.getItem(yg)==="1"}catch{return!1}},xC=e=>{try{sessionStorage.setItem(yg,e?"1":"0")}catch{}},iF=async e=>{try{if(sessionStorage.getItem(yg)==="1")return}catch{}await new Audio(e||rF).play()},rf=[De.Light,De.Dark,De.System];function sF(e){switch(e){case De.Light:return X.Sun;case De.Dark:return X.Moon;case De.System:return X.Monitor;default:return X.Monitor}}function oF({onChatClose:e}){const[t,n]=v.useState(!1),[r,i]=v.useState(!1),[s,o]=v.useState(()=>yC()),a=v.useRef(null),l=v.useRef(null),c=Se(),d=cs(),u=dr(),{setShowActionButtons:p}=re(),{mode:h,setMode:y}=c,x=()=>{u==null||u.emit(He.ChatClose,{}),p(!1),e()},w=()=>{const b=rf.indexOf(h),C=rf[(b+1)%rf.length];y(C)},m=()=>{const b=!s;xC(b),o(b)};v.useEffect(()=>{if(!r)return;const b=C=>{var S,_;(S=l.current)!=null&&S.contains(C.target)||(_=a.current)!=null&&_.contains(C.target)||i(!1)};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[r]);const g=r&&f.jsxs(Me.div,{ref:l,onMouseDown:b=>b.stopPropagation(),initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:"absolute right-0 top-full z-[9999] mt-1.5 py-1 min-w-[175px] rounded-lg shadow-lg !text-sm",style:{backgroundColor:c.getColor(k.Background),borderColor:c.getColor(k.Border),borderRadius:c.getRadius(),boxShadow:`0 4px 12px ${c.getColor(k.ShadowColor)}`},children:[f.jsxs("button",{type:"button",className:"w-full px-3 py-2 text-left text-sm flex items-center gap-2 rounded-t-lg hover:opacity-80 transition-opacity",style:{color:c.getColor(k.ErrorText)},onClick:()=>{i(!1),n(!0)},children:[f.jsx(X.XCircle,{className:"size-4 flex-shrink-0"}),d(ne.ChatEndConversation)]}),f.jsxs("button",{type:"button",className:"w-full px-3 py-2 text-left text-sm flex items-center gap-2 hover:opacity-80 transition-opacity",style:{color:c.getColor(k.InputText)},onClick:m,children:[s?f.jsx(X.VolumeX,{className:"size-4 flex-shrink-0"}):f.jsx(X.Volume2,{className:"size-4 flex-shrink-0"}),d(s?ne.NotificationSoundOn:ne.NotificationSoundOff)]}),f.jsx("div",{className:"my-1 h-px",style:{backgroundColor:c.getColor(k.DividerColor)}}),f.jsxs("button",{type:"button",className:"w-full px-3 py-2 text-left text-sm flex items-center gap-2 rounded-b-lg hover:opacity-80 transition-opacity",style:{color:c.getColor(k.InputText)},onClick:w,children:[(()=>{const b=sF(h);return f.jsx(b,{className:"size-4 flex-shrink-0"})})(),h===De.Light?"Açık tema":h===De.Dark?"Koyu tema":"Sistem"]})]});return f.jsxs(f.Fragment,{children:[f.jsx(Ar,{children:t&&f.jsx(Me.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:c.getColor(k.ModalOverlayColor)},children:f.jsxs(Me.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:c.getColor(k.Background),borderRadius:c.getRadius()},children:[f.jsx("div",{className:"text-base font-semibold mb-2",style:{color:c.getColor(k.ChatCloseConfirmText)},children:d(ne.ChatCloseConfirm)}),f.jsx("div",{className:"text-sm mb-4",style:{color:c.getColor(k.FooterText)},children:d(ne.ChatCloseWarning)}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsx("button",{type:"button",className:"px-3 py-1.5 text-sm rounded-lg transition-opacity hover:opacity-90",style:{backgroundColor:c.getColor(k.GreeterBackground),color:c.getColor(k.GreeterText),borderRadius:c.getRadius()},onClick:()=>n(!1),children:d(ne.CancelAction)}),f.jsx("button",{type:"button",className:"px-3 py-1.5 text-sm rounded-lg transition-opacity hover:opacity-90",style:{backgroundColor:c.getColor(k.ErrorBackground),color:c.getColor(k.ErrorText),borderRadius:c.getRadius()},onClick:x,children:d(ne.CloseAction)})]})]})})}),f.jsxs("div",{className:"relative flex-shrink-0",children:[f.jsx("button",{ref:a,type:"button",onClick:()=>i(b=>!b),className:"flex items-center justify-center p-1.5 rounded-md hover:opacity-80 transition-opacity",style:{backgroundColor:"transparent",color:c.getColor(k.HeaderText)},title:d(ne.ChatSettings),"aria-expanded":r,children:f.jsx(X.Menu,{className:"size-5"})}),f.jsx(Ar,{children:g})]})]})}function aF(e){let t=e.replace(/<hr\b[^>]*>/gi,""),n;do n=t,t=t.replace(/<p\b[^>]*>(?:\s|&nbsp;|&#160;|&#x0*[aA]0;|&#X0*[aA]0;|<br\s*\/?>)*<\/p>/gi,"");while(t!==n);return t}function cx({text:e}){const n=Se().getColor(k.LinkColor),i=(s=>{const o=aF(s),a=/(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,l=o.split(/(<[^>]*>)/g);let c="",d=!1;for(let u=0;u<l.length;u++){const p=l[u];if(p.startsWith("<")&&p.endsWith(">"))if(p.match(/^<a\s/i)){if(p.includes("style="))c+=p;else{const h=p.replace(/^(<a\s[^>]*)(>)$/i,`$1 style="color: ${n}; text-decoration: underline;"$2`);c+=h}d=!0}else p.match(/^<\/a>/i)?(c+=p,d=!1):c+=p;else if(!d&&p.trim()){const h=p.replace(a,y=>{const x=y.replace(/[">]+$/,"");return`<a href="${/^https?:\/\//i.test(x)?x:`https://${x}`}" target="_blank" rel="noopener noreferrer" style="color: ${n}; text-decoration: underline;">${x}</a>`});c+=h}else c+=p}return c})(e);return f.jsx("div",{className:"linkified !text-sm w-full min-w-0",dangerouslySetInnerHTML:{__html:i}})}const ux="opacity-0 group-hover/item:opacity-100 transition-opacity duration-200";function wC({files:e,className:t,onDelete:n,hideName:r}){const i=Po(),[s,o]=v.useState(new Map);v.useEffect(()=>{const y=new Map;for(let x=0;x<e.length;x++){const w=e[x];if(w instanceof File){const m=URL.createObjectURL(w);y.set(x,m)}}return o(y),()=>{for(const x of y.values())URL.revokeObjectURL(x)}},[e]);const a=y=>{var w;return((w=(y instanceof File?y.name:y).split(".").pop())==null?void 0:w.toLowerCase())||""},l=y=>y instanceof File?y.name:y.split("/").pop()||y,c=y=>{const[x,w]=y.split(".");return x.length>10?`${x.slice(0,10)}...${w}`:y},d=y=>{const x=["jpg","jpeg","png","gif","bmp","webp","svg"],w=a(y);return x.includes(w)},u=(y,x)=>{if(y instanceof File){const w=s.get(x);w&&window.open(w,"_blank")}else window.open(y,"_blank")},p=(y,x)=>{y.stopPropagation(),n==null||n(x)},h=(y,x)=>y instanceof File?s.get(x)||"":y;return f.jsx("div",{className:Ve("flex gap-2 w-full overflow-x-auto",t),children:e.map((y,x)=>{const w=l(y),m=a(y),g=d(y),b=h(y,x);return f.jsxs("div",{onClick:()=>u(y,x),className:"min-w-20 max-w-20 cursor-pointer group/item border border-gray-200 rounded-lg p-1.5 hover:shadow-md transition-all duration-200 hover:border-gray-300 bg-white relative",children:[n&&f.jsx("button",{onClick:C=>p(C,x),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:f.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:f.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"})})}),g?f.jsx("div",{className:"aspect-square w-fit mb-0.5 overflow-hidden rounded",children:f.jsx("img",{src:b,alt:w,className:"w-16 h-16 min-h-16 min-w-16 object-cover group-hover/item:scale-105 transition-transform duration-200"})}):f.jsx("div",{className:"min-w-16 aspect-square w-full mb-0.5 flex items-center justify-center bg-gray-50 rounded group-hover/item:bg-gray-100 transition-colors duration-200",children:f.jsxs("div",{className:"text-center",children:[f.jsx("div",{className:"w-6 h-6 mx-auto mb-0.5 bg-blue-100 rounded flex items-center justify-center",children:f.jsx("svg",{className:"w-3 h-3 text-blue-600",fill:"currentColor",viewBox:"0 0 20 20",children:f.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"})})}),f.jsx("div",{className:Ve("text-[10px] font-medium text-gray-600 uppercase",{[ux]:r}),children:m||"file"})]})}),f.jsx("div",{className:Ve("max-w-16 text-[10px] text-gray-700 font-medium truncate text-ellipsis overflow-hidden",{[ux]:r}),title:w,children:c(w)})]},x)})})}const lF={hidden:{opacity:0,y:8},visible:{opacity:1,y:0}},cF={hidden:{opacity:0,y:8,scale:.95},visible:{opacity:1,y:0,scale:1}};function uF({buttons:e,className:t=""}){const n=Se();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://")?f.jsx(X.ExternalLink,{className:"size-4"}):s.startsWith("tel:")?f.jsx(X.Phone,{className:"size-4"}):s.startsWith("mailto:")?f.jsx(X.Mail,{className:"size-4"}):null;return f.jsx(Me.div,{className:Ve(t,"mt-2"),initial:"hidden",animate:"visible",variants:lF,transition:{duration:.3,ease:"easeOut",staggerChildren:.08},children:f.jsx("div",{className:"rounded-lg ",style:{backgroundColor:`${n.getColor(k.Background)}f0`},children:f.jsx("div",{className:"flex flex-wrap gap-2",children:e.map((s,o)=>f.jsxs(Me.button,{variants:cF,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:[f.jsxs("span",{className:"flex items-center gap-2",children:[i(s.url),f.jsx("span",{className:"font-medium",children:s.label})]}),f.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 dx=e=>e?(typeof e=="string"&&(e=new Date(e)),e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})):"",fx=["Düşünüyorum...","Araştırıyorum...","Cevapları karşılaştırıyorum...","En iyi cevabı hazırlıyorum...","Bilgileri derliyorum...","Kaynakları tarıyorum...","Analiz ediyorum...","Yanıtı oluşturuyorum..."];function bC({messages:e,isTyping:t,chat:n,streamingContent:r}){var C,S,_,j;const i=v.useRef(null),s=v.useRef(null),[o,a]=v.useState(!0),l=v.useRef(!0),{widget:c,showActionButtons:d}=re(),u=Se(),p=v.useRef(!0),h=v.useRef(new Set),[y,x]=v.useState(0);v.useEffect(()=>{e.length>0&&p.current&&requestAnimationFrame(()=>{p.current=!1})},[e]),v.useEffect(()=>{e.length===0&&h.current.clear()},[e.length]),v.useEffect(()=>{if(!t||r===void 0||r)return;const A=setInterval(()=>{x(E=>(E+1)%fx.length)},2500);return()=>clearInterval(A)},[t,r]);const w=()=>{const A=s.current;A&&(A.scrollTop=A.scrollHeight)},m=()=>{if(s.current){const{scrollTop:A,scrollHeight:E,clientHeight:L}=s.current,F=E-A<=L+10;l.current=F,a(F)}};v.useEffect(()=>{(l.current||t)&&w()},[e,t,r]);const g=(A,E)=>{if(p.current)return{initial:!1,animate:{}};const L=A.id||"";return h.current.has(L)?E===ye.Customer?{initial:!1,animate:{opacity:1,x:0}}:{initial:!1,animate:{}}:(h.current.add(L),E===ye.Customer?{initial:{opacity:0,x:30},animate:{opacity:1,x:0}}:{initial:!1,animate:{}})},b=A=>A===ye.Customer?"18px 18px 4px 18px":A===ye.User||A===ye.Agent?"18px 18px 18px 4px":u.getRadius();return f.jsxs("section",{onScroll:m,ref:s,className:"flex flex-col gap-3 w-full grow pt-4 px-4 overflow-y-auto overflow-x-hidden scrollbar",children:[((S=(C=c==null?void 0:c.appearance)==null?void 0:C.design)==null?void 0:S.greeting_message)&&f.jsx("div",{className:"flex w-full items-center justify-start",children:f.jsx("div",{className:"max-w-[80%] whitespace-pre-wrap border-0 px-3 py-2 !text-sm",style:{backgroundColor:u.getColor(k.MessageAdminBackground),color:u.getColor(k.MessageAdminText),borderRadius:"18px 18px 18px 4px"},children:(j=(_=c==null?void 0:c.appearance)==null?void 0:_.design)==null?void 0:j.greeting_message})}),f.jsx(Ar,{children:Array.isArray(e)&&e.filter(E=>{var L;return E!=null&&(!!E.content||(((L=E.files)==null?void 0:L.length)??0)>0)&&E.content!==`
97
- `}).map((E,L)=>{var D;const F=g(E,E.sender_type);return f.jsxs(Me.div,{initial:F.initial,animate:F.animate,transition:{duration:.25,ease:"easeOut"},className:Ve("flex flex-col w-full min-w-0 justify-center break-words",{"items-end":E.sender_type===ye.Customer||E.activity_type===gn.ChatCreated,"items-start":E.sender_type===ye.User||E.sender_type===ye.Agent,"items-center":E.sender_type===ye.System||E.sender_type===ye.Activity}),children:[E.sender_type===ye.System&&f.jsx("div",{className:"max-w-full whitespace-pre-wrap break-words overflow-hidden px-3 py-1.5 text-sm",style:{backgroundColor:u.getColor(k.MessageAdminBackground),color:u.getColor(k.MessageAdminText),borderRadius:u.getRadius()},children:E.content}),([ye.Customer,ye.User,ye.Agent].includes(E.sender_type)||E.activity_type===gn.ChatCreated)&&f.jsxs("div",{className:Ve("max-w-[80%] border-0 px-3 py-2",{"whitespace-pre-wrap !text-sm":E.sender_type===ye.Customer||E.activity_type===gn.ChatCreated||E.sender_type===ye.Agent&&!((D=E.content)!=null&&D.includes('id="chaty"'))}),style:{backgroundColor:E.sender_type===ye.User||E.sender_type===ye.Agent?u.getColor(k.MessageAdminBackground):u.getColor(k.MessageVisitorBackground),color:E.sender_type===ye.User||E.sender_type===ye.Agent?u.getColor(k.MessageAdminText):u.getColor(k.MessageVisitorText),borderRadius:b(E.sender_type)},children:[E.files&&E.files.length>0&&f.jsx(wC,{files:E.files,className:"mb-1",hideName:!0}),E.sender_type===ye.User||E.sender_type===ye.Agent?f.jsx(cx,{text:E.content}):E.content,E.created_at&&f.jsx("div",{className:"text-[0.5rem] text-right opacity-70 mt-1",style:{color:E.sender_type===ye.User||E.sender_type===ye.Agent?u.getColor(k.MessageAdminText):u.getColor(k.MessageVisitorText)},children:dx(E.created_at)})]}),([ye.Customer,ye.User,ye.Agent].includes(E.sender_type)||E.activity_type===gn.ChatCreated)&&E.buttons&&E.buttons.length>0&&f.jsx("div",{className:Ve("w-full",{"flex justify-end":E.sender_type===ye.Customer||E.activity_type===gn.ChatCreated,"flex justify-start":E.sender_type===ye.User||E.sender_type===ye.Agent}),children:f.jsx("div",{className:"max-w-[80%]",children:f.jsx(uF,{buttons:E.buttons})})}),E.sender_type===ye.Activity&&E.activity_type!==gn.ChatCreated&&f.jsx("div",{className:"max-w-full border-0 rounded-full px-3 py-1 text-xs shadow-none break-words overflow-hidden",style:{backgroundColor:u.getColor(k.MessageAdminBackground),color:u.getColor(k.MessageAdminText)},children:E.activity_type===gn.AdminLeave?`${E.content.split("_")[2]} odadan ayrıldı`:E.activity_type===gn.AdminJoin?`${E.content.split("_")[2]} odaya katıldı`:E.activity_type===gn.AdminToggleUpload?E.content.includes("is_customer_uploadable:true")?"Dosya gönderim izni açıldı":"Dosya gönderim izni kapatıldı":E.content}),ye.System===E.sender_type&&f.jsx("div",{className:"text-xs",style:{color:u.getColor(k.MessageAdminText)},children:E.created_at&&dx(E.created_at)})]},E.id||L)})}),t&&f.jsx(Me.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.2},className:"flex w-full items-center justify-start mt-1",children:r!==void 0?f.jsx("div",{className:"max-w-[80%] border-0 px-3 py-2 whitespace-pre-wrap min-w-[4rem] !text-sm",style:{backgroundColor:u.getColor(k.MessageAdminBackground),color:u.getColor(k.MessageAdminText),borderRadius:"18px 18px 18px 4px"},children:r?f.jsx(cx,{text:r}):f.jsxs("div",{className:"flex items-center gap-2 py-1",children:[f.jsx(X.Sparkles,{className:"size-4 flex-shrink-0 sparkle-pulse",style:{color:u.getColor(k.MessageAdminText)}}),f.jsx(Ar,{mode:"wait",children:f.jsx(Me.span,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:-8},transition:{duration:.2},className:"!text-sm",style:{color:u.getColor(k.MessageAdminText)},children:fx[y]},y)})]})}):f.jsx("div",{className:"flex items-center rounded-full px-4 py-2",style:{backgroundColor:u.getColor(k.MessageAdminBackground)},children:f.jsxs("div",{className:"flex space-x-1",children:[f.jsx("div",{className:"size-1.5 rounded-full dot-wave",style:{backgroundColor:u.getColor(k.MessageAdminText),animationDelay:"0ms"}}),f.jsx("div",{className:"size-1.5 rounded-full dot-wave",style:{backgroundColor:u.getColor(k.MessageAdminText),animationDelay:"150ms"}}),f.jsx("div",{className:"size-1.5 rounded-full dot-wave",style:{backgroundColor:u.getColor(k.MessageAdminText),animationDelay:"300ms"}})]})})}),!o&&f.jsx("div",{className:"absolute right-4 z-10 transition-all duration-200",style:{bottom:d?"8rem":"7rem"},children:f.jsx(Rt,{type:"button",variant:"primary",kind:"solid",rounded:!0,className:"size-10 flex items-center justify-center p-0! shadow-md",onClick:()=>{var A,E;(E=s.current)==null||E.scrollTo({top:(A=s.current)==null?void 0:A.scrollHeight,behavior:"smooth"})},children:f.jsx(X.ArrowDown,{className:"size-4"})})}),f.jsx("div",{ref:i})]})}/**
96
+ */var gt=typeof Symbol=="function"&&Symbol.for,mg=gt?Symbol.for("react.element"):60103,gg=gt?Symbol.for("react.portal"):60106,Bu=gt?Symbol.for("react.fragment"):60107,zu=gt?Symbol.for("react.strict_mode"):60108,Vu=gt?Symbol.for("react.profiler"):60114,Uu=gt?Symbol.for("react.provider"):60109,Hu=gt?Symbol.for("react.context"):60110,vg=gt?Symbol.for("react.async_mode"):60111,Wu=gt?Symbol.for("react.concurrent_mode"):60111,qu=gt?Symbol.for("react.forward_ref"):60112,Gu=gt?Symbol.for("react.suspense"):60113,CI=gt?Symbol.for("react.suspense_list"):60120,Yu=gt?Symbol.for("react.memo"):60115,Qu=gt?Symbol.for("react.lazy"):60116,_I=gt?Symbol.for("react.block"):60121,TI=gt?Symbol.for("react.fundamental"):60117,EI=gt?Symbol.for("react.responder"):60118,AI=gt?Symbol.for("react.scope"):60119;function un(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case mg:switch(e=e.type,e){case vg:case Wu:case Bu:case Vu:case zu:case Gu:return e;default:switch(e=e&&e.$$typeof,e){case Hu:case qu:case Qu:case Yu:case Uu:return e;default:return t}}case gg:return t}}}function sC(e){return un(e)===Wu}Me.AsyncMode=vg;Me.ConcurrentMode=Wu;Me.ContextConsumer=Hu;Me.ContextProvider=Uu;Me.Element=mg;Me.ForwardRef=qu;Me.Fragment=Bu;Me.Lazy=Qu;Me.Memo=Yu;Me.Portal=gg;Me.Profiler=Vu;Me.StrictMode=zu;Me.Suspense=Gu;Me.isAsyncMode=function(e){return sC(e)||un(e)===vg};Me.isConcurrentMode=sC;Me.isContextConsumer=function(e){return un(e)===Hu};Me.isContextProvider=function(e){return un(e)===Uu};Me.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===mg};Me.isForwardRef=function(e){return un(e)===qu};Me.isFragment=function(e){return un(e)===Bu};Me.isLazy=function(e){return un(e)===Qu};Me.isMemo=function(e){return un(e)===Yu};Me.isPortal=function(e){return un(e)===gg};Me.isProfiler=function(e){return un(e)===Vu};Me.isStrictMode=function(e){return un(e)===zu};Me.isSuspense=function(e){return un(e)===Gu};Me.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Bu||e===Wu||e===Vu||e===zu||e===Gu||e===CI||typeof e=="object"&&e!==null&&(e.$$typeof===Qu||e.$$typeof===Yu||e.$$typeof===Uu||e.$$typeof===Hu||e.$$typeof===qu||e.$$typeof===TI||e.$$typeof===EI||e.$$typeof===AI||e.$$typeof===_I)};Me.typeOf=un;iC.exports=Me;var jI=iC.exports,oC=jI,RI={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},PI={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},aC={};aC[oC.ForwardRef]=RI;aC[oC.Memo]=PI;function ft(){return ft=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},ft.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 Ku=g.createContext(void 0);Ku.displayName="FormikContext";Ku.Provider;Ku.Consumer;function MI(){var e=g.useContext(Ku);return e}var Rn=function(t){return typeof t=="function"},Xu=function(t){return t!==null&&typeof t=="object"},NI=function(t){return String(Math.floor(Number(t)))===t},Zd=function(t){return Object.prototype.toString.call(t)==="[object String]"},Jd=function(t){return Xu(t)&&Rn(t.then)};function Xt(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 Xi(e,t,n){for(var r=rx(e),i=r,s=0,o=rC(t);s<o.length-1;s++){var a=o[s],l=Xt(e,o.slice(0,s+1));if(l&&(Xu(l)||Array.isArray(l)))i=i[a]=rx(l);else{var c=o[s+1];i=i[a]=NI(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 cC(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];Xu(a)?n.get(a)||(n.set(a,!0),r[o]=Array.isArray(a)?[]:{},cC(a,t,n,r[o])):r[o]=t}return r}function OI(e,t){switch(t.type){case"SET_VALUES":return ft({},e,{values:t.payload});case"SET_TOUCHED":return ft({},e,{touched:t.payload});case"SET_ERRORS":return ji(e.errors,t.payload)?e:ft({},e,{errors:t.payload});case"SET_STATUS":return ft({},e,{status:t.payload});case"SET_ISSUBMITTING":return ft({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return ft({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return ft({},e,{values:Xi(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return ft({},e,{touched:Xi(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return ft({},e,{errors:Xi(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return ft({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return ft({},e,{touched:cC(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return ft({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return ft({},e,{isSubmitting:!1});default:return e}}var _i={},Wl={};function DI(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"]),p=ft({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:d},u),h=g.useRef(p.initialValues),y=g.useRef(p.initialErrors||_i),w=g.useRef(p.initialTouched||Wl),b=g.useRef(p.initialStatus),m=g.useRef(!1),v=g.useRef({});g.useEffect(function(){return m.current=!0,function(){m.current=!1}},[]);var x=g.useState(0),S=x[1],C=g.useRef({values:Hl(p.initialValues),errors:Hl(p.initialErrors)||_i,touched:Hl(p.initialTouched)||Wl,status:Hl(p.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),_=C.current,j=g.useCallback(function(M){var J=C.current;C.current=OI(J,M),J!==C.current&&S(function(F){return F+1})},[]),A=g.useCallback(function(M,J){return new Promise(function(F,U){var ae=p.validate(M,J);ae==null?F(_i):Jd(ae)?ae.then(function(de){F(de||_i)},function(de){U(de)}):F(ae)})},[p.validate]),E=g.useCallback(function(M,J){var F=p.validationSchema,U=Rn(F)?F(J):F,ae=J&&U.validateAt?U.validateAt(J,M):LI(M,U);return new Promise(function(de,Se){ae.then(function(){de(_i)},function(at){at.name==="ValidationError"?de(II(at)):Se(at)})})},[p.validationSchema]),D=g.useCallback(function(M,J){return new Promise(function(F){return F(v.current[M].validate(J))})},[]),L=g.useCallback(function(M){var J=Object.keys(v.current).filter(function(U){return Rn(v.current[U].validate)}),F=J.length>0?J.map(function(U){return D(U,Xt(M,U))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(F).then(function(U){return U.reduce(function(ae,de,Se){return de==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||de&&(ae=Xi(ae,J[Se],de)),ae},{})})},[D]),O=g.useCallback(function(M){return Promise.all([L(M),p.validationSchema?E(M):{},p.validate?A(M):{}]).then(function(J){var F=J[0],U=J[1],ae=J[2],de=Gp.all([F,U,ae],{arrayMerge:FI});return de})},[p.validate,p.validationSchema,L,A,E]),q=hn(function(M){return M===void 0&&(M=_.values),j({type:"SET_ISVALIDATING",payload:!0}),O(M).then(function(J){return m.current&&(j({type:"SET_ISVALIDATING",payload:!1}),j({type:"SET_ERRORS",payload:J})),J})});g.useEffect(function(){o&&m.current===!0&&ji(h.current,p.initialValues)&&q(h.current)},[o,q]);var $=g.useCallback(function(M){var J=M&&M.values?M.values:h.current,F=M&&M.errors?M.errors:y.current?y.current:p.initialErrors||{},U=M&&M.touched?M.touched:w.current?w.current:p.initialTouched||{},ae=M&&M.status?M.status:b.current?b.current:p.initialStatus;h.current=J,y.current=F,w.current=U,b.current=ae;var de=function(){j({type:"RESET_FORM",payload:{isSubmitting:!!M&&!!M.isSubmitting,errors:F,touched:U,status:ae,values:J,isValidating:!!M&&!!M.isValidating,submitCount:M&&M.submitCount&&typeof M.submitCount=="number"?M.submitCount:0}})};if(p.onReset){var Se=p.onReset(_.values,Y);Jd(Se)?Se.then(de):de()}else de()},[p.initialErrors,p.initialStatus,p.initialTouched,p.onReset]);g.useEffect(function(){m.current===!0&&!ji(h.current,p.initialValues)&&c&&(h.current=p.initialValues,$(),o&&q(h.current))},[c,p.initialValues,$,o,q]),g.useEffect(function(){c&&m.current===!0&&!ji(y.current,p.initialErrors)&&(y.current=p.initialErrors||_i,j({type:"SET_ERRORS",payload:p.initialErrors||_i}))},[c,p.initialErrors]),g.useEffect(function(){c&&m.current===!0&&!ji(w.current,p.initialTouched)&&(w.current=p.initialTouched||Wl,j({type:"SET_TOUCHED",payload:p.initialTouched||Wl}))},[c,p.initialTouched]),g.useEffect(function(){c&&m.current===!0&&!ji(b.current,p.initialStatus)&&(b.current=p.initialStatus,j({type:"SET_STATUS",payload:p.initialStatus}))},[c,p.initialStatus,p.initialTouched]);var B=hn(function(M){if(v.current[M]&&Rn(v.current[M].validate)){var J=Xt(_.values,M),F=v.current[M].validate(J);return Jd(F)?(j({type:"SET_ISVALIDATING",payload:!0}),F.then(function(U){return U}).then(function(U){j({type:"SET_FIELD_ERROR",payload:{field:M,value:U}}),j({type:"SET_ISVALIDATING",payload:!1})})):(j({type:"SET_FIELD_ERROR",payload:{field:M,value:F}}),Promise.resolve(F))}else if(p.validationSchema)return j({type:"SET_ISVALIDATING",payload:!0}),E(_.values,M).then(function(U){return U}).then(function(U){j({type:"SET_FIELD_ERROR",payload:{field:M,value:Xt(U,M)}}),j({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),I=g.useCallback(function(M,J){var F=J.validate;v.current[M]={validate:F}},[]),N=g.useCallback(function(M){delete v.current[M]},[]),R=hn(function(M,J){j({type:"SET_TOUCHED",payload:M});var F=J===void 0?i:J;return F?q(_.values):Promise.resolve()}),z=g.useCallback(function(M){j({type:"SET_ERRORS",payload:M})},[]),H=hn(function(M,J){var F=Rn(M)?M(_.values):M;j({type:"SET_VALUES",payload:F});var U=J===void 0?n:J;return U?q(F):Promise.resolve()}),W=g.useCallback(function(M,J){j({type:"SET_FIELD_ERROR",payload:{field:M,value:J}})},[]),G=hn(function(M,J,F){j({type:"SET_FIELD_VALUE",payload:{field:M,value:J}});var U=F===void 0?n:F;return U?q(Xi(_.values,M,J)):Promise.resolve()}),te=g.useCallback(function(M,J){var F=J,U=M,ae;if(!Zd(M)){M.persist&&M.persist();var de=M.target?M.target:M.currentTarget,Se=de.type,at=de.name,vt=de.id,Un=de.value,dn=de.checked,xs=de.outerHTML,fr=de.options,Dr=de.multiple;F=J||at||vt,U=/number|range/.test(Se)?(ae=parseFloat(Un),isNaN(ae)?"":ae):/checkbox/.test(Se)?BI(Xt(_.values,F),dn,Un):fr&&Dr?$I(fr):Un}F&&G(F,U)},[G,_.values]),se=hn(function(M){if(Zd(M))return function(J){return te(J,M)};te(M)}),pe=hn(function(M,J,F){J===void 0&&(J=!0),j({type:"SET_FIELD_TOUCHED",payload:{field:M,value:J}});var U=F===void 0?i:F;return U?q(_.values):Promise.resolve()}),ue=g.useCallback(function(M,J){M.persist&&M.persist();var F=M.target,U=F.name,ae=F.id,de=F.outerHTML,Se=J||U||ae;pe(Se,!0)},[pe]),ke=hn(function(M){if(Zd(M))return function(J){return ue(J,M)};ue(M)}),Ne=g.useCallback(function(M){Rn(M)?j({type:"SET_FORMIK_STATE",payload:M}):j({type:"SET_FORMIK_STATE",payload:function(){return M}})},[]),Q=g.useCallback(function(M){j({type:"SET_STATUS",payload:M})},[]),V=g.useCallback(function(M){j({type:"SET_ISSUBMITTING",payload:M})},[]),P=hn(function(){return j({type:"SUBMIT_ATTEMPT"}),q().then(function(M){var J=M instanceof Error,F=!J&&Object.keys(M).length===0;if(F){var U;try{if(U=me(),U===void 0)return}catch(ae){throw ae}return Promise.resolve(U).then(function(ae){return m.current&&j({type:"SUBMIT_SUCCESS"}),ae}).catch(function(ae){if(m.current)throw j({type:"SUBMIT_FAILURE"}),ae})}else if(m.current&&(j({type:"SUBMIT_FAILURE"}),J))throw M})}),K=hn(function(M){M&&M.preventDefault&&Rn(M.preventDefault)&&M.preventDefault(),M&&M.stopPropagation&&Rn(M.stopPropagation)&&M.stopPropagation(),P().catch(function(J){console.warn("Warning: An unhandled error was caught from submitForm()",J)})}),Y={resetForm:$,validateForm:q,validateField:B,setErrors:z,setFieldError:W,setFieldTouched:pe,setFieldValue:G,setStatus:Q,setSubmitting:V,setTouched:R,setValues:H,setFormikState:Ne,submitForm:P},me=hn(function(){return d(_.values,Y)}),re=hn(function(M){M&&M.preventDefault&&Rn(M.preventDefault)&&M.preventDefault(),M&&M.stopPropagation&&Rn(M.stopPropagation)&&M.stopPropagation(),$()}),Ee=g.useCallback(function(M){return{value:Xt(_.values,M),error:Xt(_.errors,M),touched:!!Xt(_.touched,M),initialValue:Xt(h.current,M),initialTouched:!!Xt(w.current,M),initialError:Xt(y.current,M)}},[_.errors,_.touched,_.values]),ot=g.useCallback(function(M){return{setValue:function(F,U){return G(M,F,U)},setTouched:function(F,U){return pe(M,F,U)},setError:function(F){return W(M,F)}}},[G,pe,W]),$t=g.useCallback(function(M){var J=Xu(M),F=J?M.name:M,U=Xt(_.values,F),ae={name:F,value:U,onChange:se,onBlur:ke};if(J){var de=M.type,Se=M.value,at=M.as,vt=M.multiple;de==="checkbox"?Se===void 0?ae.checked=!!U:(ae.checked=!!(Array.isArray(U)&&~U.indexOf(Se)),ae.value=Se):de==="radio"?(ae.checked=U===Se,ae.value=Se):at==="select"&&vt&&(ae.value=ae.value||[],ae.multiple=!0)}return ae},[ke,se,_.values]),oe=g.useMemo(function(){return!ji(h.current,_.values)},[h.current,_.values]),ye=g.useMemo(function(){return typeof a<"u"?oe?_.errors&&Object.keys(_.errors).length===0:a!==!1&&Rn(a)?a(p):a:_.errors&&Object.keys(_.errors).length===0},[a,oe,_.errors,p]),Oe=ft({},_,{initialValues:h.current,initialErrors:y.current,initialTouched:w.current,initialStatus:b.current,handleBlur:ke,handleChange:se,handleReset:re,handleSubmit:K,resetForm:$,setErrors:z,setFormikState:Ne,setFieldTouched:pe,setFieldValue:G,setFieldError:W,setStatus:Q,setSubmitting:V,setTouched:R,setValues:H,submitForm:P,validateForm:q,validateField:B,isValid:ye,dirty:oe,unregisterField:N,registerField:I,getFieldProps:$t,getFieldMeta:Ee,getFieldHelpers:ot,validateOnBlur:i,validateOnChange:n,validateOnMount:o});return Oe}function II(e){var t={};if(e.inner){if(e.inner.length===0)return Xi(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;Xt(t,o.path)||(t=Xi(t,o.path,o.message))}}return t}function LI(e,t,n,r){n===void 0&&(n=!1);var i=Jp(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:i})}function Jp(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||N0(i)?Jp(i):i!==""?i:void 0}):N0(e[r])?t[r]=Jp(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function FI(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?Gp(Array.isArray(s)?[]:{},s,n):s}else n.isMergeableObject(s)?r[o]=Gp(e[o],s,n):e.indexOf(s)===-1&&r.push(s)}),r}function $I(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function BI(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 zI=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?g.useLayoutEffect:g.useEffect;function hn(e){var t=g.useRef(e);return zI(function(){t.current=e}),g.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 VI=g.forwardRef(function(e,t){var n=e.action,r=lC(e,["action"]),i=n??"#",s=MI(),o=s.handleReset,a=s.handleSubmit;return g.createElement("form",ft({onSubmit:a,ref:t,onReset:o,action:i},r))});VI.displayName="Form";const uC=({init:e,schema:t,action:n,validateOnBlur:r=!1})=>DI({initialValues:e,validationSchema:t,validateOnBlur:r,enableReinitialize:!0,validateOnChange:!1,validateOnMount:!1,onSubmit:i=>{n(i)}});function yg({id:e,text:t,className:n,required:r}){const i=be();return t?f.jsxs("label",{htmlFor:e,className:Ie("mb-1 block text-sm font-medium",n),style:{color:i.getColor(k.InputText)},children:[t,r&&f.jsx("span",{className:"ml-1",style:{color:i.getColor(k.ErrorText)},children:"*"})]}):null}const ef={sm:"px-3 py-1 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-15"};function UI({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:p,autoFocus:h,...y}){const w=be(),b=w.getRadius(),m=l?w.getColor(k.ErrorBorder):w.getColor(k.InputBorder),v=w.getColor(k.LinkColor);return f.jsxs("div",{className:Ie({"mb-2":!o},d),style:{"--focus-ring":v},children:[f.jsx(yg,{id:e,text:t,required:a}),f.jsxs("div",{className:"flex items-center",children:[r&&f.jsx("span",{className:Ie("inline-block border border-solid border-r-0 rounded-l-md",ef[i]),style:{borderColor:l?w.getColor(k.ErrorBorder):w.getColor(k.InputBorder),backgroundColor:w.getColor(k.InputBackground),borderRadius:b},children:r}),f.jsx("input",{id:e,autoFocus:h,className:Ie("border border-solid block w-full outline-none transition-[border-color,box-shadow] duration-200 focus:ring-2 focus:ring-offset-0 rounded-lg",ef[i],{"rounded-l-none":!!r,"rounded-r-none":!!n}),type:s,required:a,"aria-describedby":c,"aria-invalid":u,"aria-label":p,style:{fontSize:"16px",color:l?w.getColor(k.ErrorText):w.getColor(k.InputText),backgroundColor:w.getColor(k.InputBackground),borderColor:m,borderRadius:b,"--tw-ring-color":v},...y}),n&&f.jsx("span",{className:Ie("inline-block border border-solid border-l-0 rounded-r-md",ef[i]),style:{borderColor:l?w.getColor(k.ErrorBorder):w.getColor(k.InputBorder),backgroundColor:w.getColor(k.InputBackground),borderRadius:b},children:n})]}),!!l&&f.jsx("p",{className:"mt-1 text-xs",style:{color:w.getColor(k.ErrorText)},children:l})]})}const ox=(e,t)=>{const n=new Date;n.setFullYear(n.getFullYear()+1),document.cookie=`${e}=${t};expires=${n.toUTCString()};path=/`},dC=g.createContext({}),HI=()=>`${window.location.pathname}_$$_${document.title}`,WI=()=>{const e=localStorage.getItem("page");return!e||e===""?"/":e},qI=()=>{const e=localStorage.getItem("p-history");if(!e||e==="")return[];try{return JSON.parse(e)}catch{return[]}};function GI({children:e}){const[t,n]=g.useState("/"),[r,i]=g.useState(qI());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 f.jsx(dC.Provider,{value:{page:t,setPage:o,history:r,clearHistory:s},children:e})}function Zu(){return g.useContext(dC)}function YI({label:e,id:t,value:n="",className:r,placeholder:i,children:s,required:o,error:a,...l}){const c=be();return f.jsxs("div",{className:r,children:[e&&f.jsx(yg,{id:t,required:o,text:e}),f.jsxs("select",{id:t,"aria-placeholder":i,value:n,"aria-label":e,className:"block w-full rounded-lg border border-solid px-3 py-2 text-sm outline-none transition-[border-color,box-shadow] duration-200 focus:ring-2 focus:ring-offset-0",style:{backgroundColor:c.getColor(k.InputBackground),color:c.getColor(k.InputText),borderColor:a?c.getColor(k.ErrorBorder):c.getColor(k.InputBorder),borderRadius:c.getRadius(),"--tw-ring-color":c.getColor(k.LinkColor)},onChange:l.onChange,required:o,...l,children:[i&&f.jsx("option",{value:"",disabled:!0,children:i}),s]}),!!a&&f.jsx("p",{className:"mt-1 text-xs",style:{color:c.getColor(k.ErrorText)},children:a})]})}const ax={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:""}},QI={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"},KI={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 XI({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,error:p,...h}){const y=be(),w=y.getColor(k.InputText),b=y.getColor(k.LinkColor),m=y.getColor(k.InputBorder),v=y.getColor(k.InputBackground),x=y.getColor(k.ErrorText);return f.jsxs("div",{children:[f.jsxs("div",{className:`flex items-center justify-between gap-2 ${u?"flex-row-reverse":""} ${ax[d].label}`,children:[f.jsxs("label",{className:"disable-highlight relative flex cursor-pointer items-center rounded-md",htmlFor:l,children:[f.jsx("input",{id:l,name:t,type:"checkbox",className:`peer cursor-pointer appearance-none rounded-md border-2 border-solid transition-all ${QI[c]} ${ax[d].input}`,style:{borderColor:i?b:m,backgroundColor:i?b:v},required:n,checked:i,value:r,onChange:S=>s==null?void 0:s(S.target.checked),onBlur:S=>o==null?void 0:o(S.target.checked),...h}),f.jsx("div",{className:"pointer-events-none absolute left-2/4 top-2/4 -translate-x-1/2 -translate-y-1/2 text-white opacity-0 transition-opacity peer-checked:opacity-100",children:f.jsx(Z.Check,{className:KI[c]})})]}),f.jsx("label",{className:"disable-highlight flex grow cursor-pointer select-none items-center text-sm",style:{color:w},htmlFor:l,children:e})]}),(a||p)&&f.jsx("small",{className:"text-xs",style:{color:x},children:p||a})]})}function ZI({id:e,value:t,name:n,onChange:r,children:i,disabled:s,className:o}){const a=be(),l=a.getColor(k.InputText),c=a.getColor(k.LinkColor);return f.jsxs("label",{htmlFor:e,className:Ie("relative flex cursor-pointer items-center gap-2 rounded-md focus-within:outline-none",{"opacity-60 cursor-not-allowed":s},o),children:[f.jsx("input",{type:"radio",id:e,name:n,value:e,checked:t,onChange:d=>r==null?void 0:r(d.target.checked),className:"h-4 w-4 min-w-4 cursor-pointer appearance-none border-2 transition-all focus:ring-0 focus:ring-offset-0",style:{borderRadius:"50%",borderColor:t?c:a.getColor(k.InputBorder),backgroundColor:t?c:a.getColor(k.InputBackground),boxShadow:t?`inset 0 0 0 3px ${a.getColor(k.Background)}`:void 0},disabled:s}),f.jsx("span",{className:"text-sm font-medium",style:{color:l},children:i})]})}function JI({id:e,label:t,children:n,required:r,className:i,error:s}){const o=be(),a=o.getColor(k.InputText),l=o.getColor(k.ErrorText);return f.jsxs("fieldset",{id:e,className:i,children:[t&&f.jsxs("legend",{className:"mb-1.5 block text-sm font-medium",style:{color:a},children:[t,r&&f.jsx("span",{style:{color:l,marginLeft:4},children:"*"})]}),f.jsx("div",{className:"flex flex-col gap-2",children:n}),s&&f.jsx("p",{className:"mt-1 text-xs",style:{color:l},children:s})]})}const lx=Object.assign(ZI,{Group:JI});function Ju({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:p=!1,style:h,borderless:y=!1,...w}){const b=be();return f.jsxs("div",{className:Ie({"mb-2":!s},i),children:[t&&f.jsx(yg,{id:e,text:t,required:l}),f.jsx("textarea",{className:Ie("resize-none max-h-36 w-full py-2 px-3 block outline-none transition-[border-color,box-shadow] duration-200 rounded-lg",{"border border-solid focus:ring-2 focus:ring-offset-0":!y,"border-none bg-transparent":y}),id:e,rows:o,"aria-invalid":d,...w,ref:u,autoFocus:p,style:{...h,fontSize:"14px",color:c?b.getColor(k.ErrorText):b.getColor(k.InputText),...!y&&{backgroundColor:b.getColor(k.InputBackground),borderColor:c?b.getColor(k.ErrorBorder):b.getColor(k.InputBorder),borderRadius:b.getRadius(),"--tw-ring-color":b.getColor(k.LinkColor)}}}),!!c&&f.jsx("p",{className:"mt-1 text-xs",style:{color:b.getColor(k.ErrorText)},children:c})]})}function So({variant:e="block",className:t=""}){const n=be(),r=n.getText,a=`text-[10px] flex items-center justify-center gap-1 transition-opacity hover:opacity-80 ${e==="block"?"w-full py-1.5 px-3 text-center":""} ${t}`.trim(),l=e==="block"?{color:n.getColor(k.FooterText)}:{color:n.getColor(k.FooterText)};return f.jsxs("a",{href:"https://www.chatier.app",target:"_blank",rel:"noopener noreferrer",className:a,style:l,children:[f.jsx("span",{children:r(ie.PoweredBy)}),f.jsx("span",{className:"font-semibold",children:"Chatier"})]})}function eL({onOk:e,clientId:t,widgetId:n,appearance:r,aiAgentMode:i=!1,onAIAgentStart:s,onOperatorConnect:o,isConnectingToOperator:a=!1}){var _,j,A,E,D,L;const l=be(),{defaultValues:c,widget:d,setIsHaveChat:u}=ne(),[p,h]=g.useState(!1),y=g.useRef(null);g.useEffect(()=>{const O=setTimeout(()=>{var $;const q=($=y.current)==null?void 0:$.querySelector('input:not([type="hidden"]), select, textarea');q==null||q.focus()},150);return()=>clearTimeout(O)},[]);const w=Zu(),b=Jm(),m=!!c&&"username"in c,v=(j=(_=r==null?void 0:r.body)==null?void 0:_.inputs)==null?void 0:j.reduce((O,q)=>{let $=q.remember?Qs(q.name):c==null?void 0:c[q.name];return q.options&&$&&!q.options.includes($)&&($=void 0),q.name==="username"&&m&&($=c.username),O[q.name]=$||"",O},{}),x=sg((E=(A=r==null?void 0:r.body)==null?void 0:A.inputs)==null?void 0:E.reduce((O,q)=>(O[q.name]=q.required?tu().required(`${q.label} alanı zorunludur`):tu(),O),{})),S=uC({init:{...v},schema:x,validateOnBlur:!1,action:async O=>{var q,$;if(!(p||a)){h(!0);try{m&&(O.username=c.username),c!=null&&c.secret_data&&(O.secret_data=c.secret_data);for(const N in O)typeof O[N]=="string"&&(O[N]=O[N].trim());if(o){for(const N of((q=r==null?void 0:r.body)==null?void 0:q.inputs)||[])N.remember&&ox(N.name,O[N.name]);o(O);return}const[B,I]=await b.mutateAsync({inputs:O,history:w.history,client_id:t,widget_id:n,device_id:Rr((d==null?void 0:d.link_id)||""),is_agent_mode:i});if(zn(I)){Up(B)&&(Fn(rt.CustomerToken,B.customer_token,(d==null?void 0:d.link_id)||""),Fn(rt.CustomerRefreshToken,B.customer_refresh_token,(d==null?void 0:d.link_id)||""),Fn(rt.DeviceId,B.device_id,(d==null?void 0:d.link_id)||"")),w.clearHistory();for(const N of(($=r==null?void 0:r.body)==null?void 0:$.inputs)||[])N.remember&&ox(N.name,O[N.name]);u(!0),i?s==null||s():e==null||e();return}yo(B,{form:S})}catch(B){console.error("Chat creation error:",B)}finally{h(!1)}}}}),C=l.getColor(k.GreeterBackground);return f.jsxs("section",{className:"h-full overflow-y-auto px-5",style:{backgroundColor:C},children:[f.jsxs("form",{ref:y,autoComplete:"off",className:"grid grid-cols-1 gap-4",onSubmit:S.handleSubmit,children:[(L=(D=r==null?void 0:r.body)==null?void 0:D.inputs)==null?void 0:L.map((O,q)=>{var B,I;const $=q===0;if(["text","email","phone"].includes(O.type))return f.jsx(UI,{id:O.name,name:O.name,type:O.type,label:O.label,value:S.values[O.name],onChange:S.handleChange,onBlur:S.handleBlur,disabled:O.name==="username"&&m,readOnly:O.name==="username"&&m,autoComplete:"off",placeholder:O.placeholder,error:S.errors[O.name],ariaInvalid:S.errors.name?!0:void 0,required:O.required,noMargin:!0,autoFocus:$},O.name);if(O.type==="select")return f.jsx(YI,{id:O.name,name:O.name,value:S.values[O.name],onChange:S.handleChange,label:O.label,error:S.errors[O.name],required:O.required,placeholder:O.placeholder,autoFocus:$,children:(B=O.options)==null?void 0:B.map(N=>f.jsx("option",{value:N,children:N},N))},O.name);if(O.type==="checkbox")return f.jsx(XI,{id:O.name,name:O.name,value:S.values[O.name],checked:S.values[O.name]==="true",onChange:S.handleChange,required:O.required,error:S.errors[O.name],children:O.label},O.name);if(O.type==="radio")return f.jsx(lx.Group,{id:O.name,label:O.label,required:O.required,error:S.errors[O.name],children:(I=O.options)==null?void 0:I.map(N=>f.jsx(lx,{onChange:R=>{R?S.setFieldValue(O.name,N):S.setFieldValue(O.name,"")},id:N,name:O.name,value:N===S.values[O.name],children:N},N))},O.name);if(O.type==="textarea")return f.jsx(Ju,{id:O.name,name:O.name,value:S.values[O.name],onChange:S.handleChange,onBlur:S.handleBlur,placeholder:O.placeholder,error:S.errors[O.name],required:O.required,label:O.label,noMargin:!0,autoFocus:$},O.name)}),f.jsx(Rt,{textKey:k.GreeterButtonText,bgKey:k.GreeterButtonBackground,type:"submit",size:"lg",disabled:p||a,className:"transition-all duration-300 hover:opacity-90 transform hover:translate-y-[-1px] shadow-sm",children:p||a?f.jsxs("div",{className:"flex items-center justify-center",children:[f.jsx("span",{className:"mr-2",children:o?"Bağlanıyor":"Yükleniyor"}),f.jsx("span",{className:"animate-pulse",children:"..."})]}):o?"Canlı Desteğe Bağlan":"Sohbet Oluştur"})]}),f.jsx(So,{variant:"block",className:"py-2"})]})}var tn=(e=>(e.Open="open",e.Closed="closed",e.Pending="pending",e.Deleted="deleted",e.Created="created",e.Agent="agent",e))(tn||{}),gn=(e=>(e.AdminJoin="admin_join",e.AdminLeave="admin_leave",e.ChatCreated="chat_created",e.AdminToggleUpload="admin_toggle_upload",e))(gn||{}),ve=(e=>(e.Customer="customer",e.User="user",e.Agent="agent",e.System="system",e.Activity="activity",e))(ve||{});const vs=e=>{const t=eA(),n=(r,i)=>{var o;const s=((o=Z6.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}};var tL={exports:{}},tf={exports:{}},cx;function fC(){return cx||(cx=1,function(e,t){(function(n,r){e.exports=r()})(mh,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",o="second",a="minute",l="hour",c="day",d="week",u="month",p="quarter",h="year",y="date",w="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function($){var B=["th","st","nd","rd"],I=$%100;return"["+$+(B[(I-20)%10]||B[I]||B[0])+"]"}},x=function($,B,I){var N=String($);return!N||N.length>=B?$:""+Array(B+1-N.length).join(I)+$},S={s:x,z:function($){var B=-$.utcOffset(),I=Math.abs(B),N=Math.floor(I/60),R=I%60;return(B<=0?"+":"-")+x(N,2,"0")+":"+x(R,2,"0")},m:function $(B,I){if(B.date()<I.date())return-$(I,B);var N=12*(I.year()-B.year())+(I.month()-B.month()),R=B.clone().add(N,u),z=I-R<0,H=B.clone().add(N+(z?-1:1),u);return+(-(N+(I-R)/(z?R-H:H-R))||0)},a:function($){return $<0?Math.ceil($)||0:Math.floor($)},p:function($){return{M:u,y:h,w:d,d:c,D:y,h:l,m:a,s:o,ms:s,Q:p}[$]||String($||"").toLowerCase().replace(/s$/,"")},u:function($){return $===void 0}},C="en",_={};_[C]=v;var j="$isDayjsObject",A=function($){return $ instanceof O||!(!$||!$[j])},E=function $(B,I,N){var R;if(!B)return C;if(typeof B=="string"){var z=B.toLowerCase();_[z]&&(R=z),I&&(_[z]=I,R=z);var H=B.split("-");if(!R&&H.length>1)return $(H[0])}else{var W=B.name;_[W]=B,R=W}return!N&&R&&(C=R),R||!N&&C},D=function($,B){if(A($))return $.clone();var I=typeof B=="object"?B:{};return I.date=$,I.args=arguments,new O(I)},L=S;L.l=E,L.i=A,L.w=function($,B){return D($,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var O=function(){function $(I){this.$L=E(I.locale,null,!0),this.parse(I),this.$x=this.$x||I.x||{},this[j]=!0}var B=$.prototype;return B.parse=function(I){this.$d=function(N){var R=N.date,z=N.utc;if(R===null)return new Date(NaN);if(L.u(R))return new Date;if(R instanceof Date)return new Date(R);if(typeof R=="string"&&!/Z$/i.test(R)){var H=R.match(b);if(H){var W=H[2]-1||0,G=(H[7]||"0").substring(0,3);return z?new Date(Date.UTC(H[1],W,H[3]||1,H[4]||0,H[5]||0,H[6]||0,G)):new Date(H[1],W,H[3]||1,H[4]||0,H[5]||0,H[6]||0,G)}}return new Date(R)}(I),this.init()},B.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},B.$utils=function(){return L},B.isValid=function(){return this.$d.toString()!==w},B.isSame=function(I,N){var R=D(I);return this.startOf(N)<=R&&R<=this.endOf(N)},B.isAfter=function(I,N){return D(I)<this.startOf(N)},B.isBefore=function(I,N){return this.endOf(N)<D(I)},B.$g=function(I,N,R){return L.u(I)?this[N]:this.set(R,I)},B.unix=function(){return Math.floor(this.valueOf()/1e3)},B.valueOf=function(){return this.$d.getTime()},B.startOf=function(I,N){var R=this,z=!!L.u(N)||N,H=L.p(I),W=function(Q,V){var P=L.w(R.$u?Date.UTC(R.$y,V,Q):new Date(R.$y,V,Q),R);return z?P:P.endOf(c)},G=function(Q,V){return L.w(R.toDate()[Q].apply(R.toDate("s"),(z?[0,0,0,0]:[23,59,59,999]).slice(V)),R)},te=this.$W,se=this.$M,pe=this.$D,ue="set"+(this.$u?"UTC":"");switch(H){case h:return z?W(1,0):W(31,11);case u:return z?W(1,se):W(0,se+1);case d:var ke=this.$locale().weekStart||0,Ne=(te<ke?te+7:te)-ke;return W(z?pe-Ne:pe+(6-Ne),se);case c:case y:return G(ue+"Hours",0);case l:return G(ue+"Minutes",1);case a:return G(ue+"Seconds",2);case o:return G(ue+"Milliseconds",3);default:return this.clone()}},B.endOf=function(I){return this.startOf(I,!1)},B.$set=function(I,N){var R,z=L.p(I),H="set"+(this.$u?"UTC":""),W=(R={},R[c]=H+"Date",R[y]=H+"Date",R[u]=H+"Month",R[h]=H+"FullYear",R[l]=H+"Hours",R[a]=H+"Minutes",R[o]=H+"Seconds",R[s]=H+"Milliseconds",R)[z],G=z===c?this.$D+(N-this.$W):N;if(z===u||z===h){var te=this.clone().set(y,1);te.$d[W](G),te.init(),this.$d=te.set(y,Math.min(this.$D,te.daysInMonth())).$d}else W&&this.$d[W](G);return this.init(),this},B.set=function(I,N){return this.clone().$set(I,N)},B.get=function(I){return this[L.p(I)]()},B.add=function(I,N){var R,z=this;I=Number(I);var H=L.p(N),W=function(se){var pe=D(z);return L.w(pe.date(pe.date()+Math.round(se*I)),z)};if(H===u)return this.set(u,this.$M+I);if(H===h)return this.set(h,this.$y+I);if(H===c)return W(1);if(H===d)return W(7);var G=(R={},R[a]=r,R[l]=i,R[o]=n,R)[H]||1,te=this.$d.getTime()+I*G;return L.w(te,this)},B.subtract=function(I,N){return this.add(-1*I,N)},B.format=function(I){var N=this,R=this.$locale();if(!this.isValid())return R.invalidDate||w;var z=I||"YYYY-MM-DDTHH:mm:ssZ",H=L.z(this),W=this.$H,G=this.$m,te=this.$M,se=R.weekdays,pe=R.months,ue=R.meridiem,ke=function(V,P,K,Y){return V&&(V[P]||V(N,z))||K[P].slice(0,Y)},Ne=function(V){return L.s(W%12||12,V,"0")},Q=ue||function(V,P,K){var Y=V<12?"AM":"PM";return K?Y.toLowerCase():Y};return z.replace(m,function(V,P){return P||function(K){switch(K){case"YY":return String(N.$y).slice(-2);case"YYYY":return L.s(N.$y,4,"0");case"M":return te+1;case"MM":return L.s(te+1,2,"0");case"MMM":return ke(R.monthsShort,te,pe,3);case"MMMM":return ke(pe,te);case"D":return N.$D;case"DD":return L.s(N.$D,2,"0");case"d":return String(N.$W);case"dd":return ke(R.weekdaysMin,N.$W,se,2);case"ddd":return ke(R.weekdaysShort,N.$W,se,3);case"dddd":return se[N.$W];case"H":return String(W);case"HH":return L.s(W,2,"0");case"h":return Ne(1);case"hh":return Ne(2);case"a":return Q(W,G,!0);case"A":return Q(W,G,!1);case"m":return String(G);case"mm":return L.s(G,2,"0");case"s":return String(N.$s);case"ss":return L.s(N.$s,2,"0");case"SSS":return L.s(N.$ms,3,"0");case"Z":return H}return null}(V)||H.replace(":","")})},B.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},B.diff=function(I,N,R){var z,H=this,W=L.p(N),G=D(I),te=(G.utcOffset()-this.utcOffset())*r,se=this-G,pe=function(){return L.m(H,G)};switch(W){case h:z=pe()/12;break;case u:z=pe();break;case p:z=pe()/3;break;case d:z=(se-te)/6048e5;break;case c:z=(se-te)/864e5;break;case l:z=se/i;break;case a:z=se/r;break;case o:z=se/n;break;default:z=se}return R?z:L.a(z)},B.daysInMonth=function(){return this.endOf(u).$D},B.$locale=function(){return _[this.$L]},B.locale=function(I,N){if(!I)return this.$L;var R=this.clone(),z=E(I,N,!0);return z&&(R.$L=z),R},B.clone=function(){return L.w(this.$d,this)},B.toDate=function(){return new Date(this.valueOf())},B.toJSON=function(){return this.isValid()?this.toISOString():null},B.toISOString=function(){return this.$d.toISOString()},B.toString=function(){return this.$d.toUTCString()},$}(),q=O.prototype;return D.prototype=q,[["$ms",s],["$s",o],["$m",a],["$H",l],["$W",c],["$M",u],["$y",h],["$D",y]].forEach(function($){q[$[1]]=function(B){return this.$g(B,$[0],$[1])}}),D.extend=function($,B){return $.$i||($(B,O,D),$.$i=!0),D},D.locale=E,D.isDayjs=A,D.unix=function($){return D(1e3*$)},D.en=_[C],D.Ls=_,D.p={},D})}(tf)),tf.exports}(function(e,t){(function(n,r){e.exports=r(fC())})(mh,function(n){function r(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var i=r(n),s={name:"tr",weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekStart:1,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(o){return o+"."}};return i.default.locale(s,null,!0),s})})(tL);var pC={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(mh,function(){return function(n,r,i){n=n||{};var s=r.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function a(c,d,u,p){return s.fromToBase(c,d,u,p)}i.en.relativeTime=o,s.fromToBase=function(c,d,u,p,h){for(var y,w,b,m=u.$locale().relativeTime||o,v=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],x=v.length,S=0;S<x;S+=1){var C=v[S];C.d&&(y=p?i(c).diff(u,C.d,!0):u.diff(c,C.d,!0));var _=(n.rounding||Math.round)(Math.abs(y));if(b=y>0,_<=C.r||!C.r){_<=1&&S>0&&(C=v[S-1]);var j=m[C.l];h&&(_=h(""+_)),w=typeof j=="string"?j.replace("%d",_):j(_,d,C.l,b);break}}if(d)return w;var A=b?m.future:m.past;return typeof A=="function"?A(w):A.replace("%s",w)},s.to=function(c,d){return a(c,d,this,!0)},s.from=function(c,d){return a(c,d,this)};var l=function(c){return c.$u?i.utc():i()};s.toNow=function(c){return this.to(l(this),c)},s.fromNow=function(c){return this.from(l(this),c)}}})})(pC);var nL=pC.exports;const rL=Pr(nL);var iL=fC();const nf=Pr(iL),sL=(e="tr")=>(nf.extend(rL),nf.locale(e),nf);function oL({onHasHistory:e,emptyStateText:t}){const n=ne(x=>x.widget),r=ne(x=>x.setHistoryChat),i=ne(x=>x.setHistoryMessages),s=be(),o=vs(),[a,l]=g.useState(null),c=sL(),d=g.useRef(!1),u=n!=null&&n.link_id?Rr(n.link_id):null,{data:p,isLoading:h}=CM((n==null?void 0:n.link_id)||"",u||"");if(g.useEffect(()=>{if(!h&&p){const[x,S]=p,C=zn(S)&&Array.isArray(x)&&x.length>0;if(C&&!d.current){const _=x[0];if(_.status===tn.Open||_.status===tn.Pending){console.log("ChatHistoryList: Auto-joining active chat",_._id),d.current=!0,r(_),i(null),o.push("chat");return}}e&&e(C)}},[h,p,e,o,r,i]),!(n!=null&&n.link_id))return null;if(h)return f.jsx("div",{className:"p-4 text-center text-xs opacity-50",children:"Yükleniyor..."});if(!p)return null;const[y,w]=p;if(!zn(w)||!Array.isArray(y))return null;const b=x=>c(x).fromNow(),m=x=>{const S=x.map(_=>typeof _=="string"?_.trim():"").filter(Boolean);if(S.length===0)return"Atanmamış";if(S.length===1)return S[0];if(S.length===2)return`${S[0]} ve ${S[1]}`;if(S.length===3)return`${S[0]}, ${S[1]} ve ${S[2]}`;const C=S.length-2;return`${S[0]}, ${S[1]} ve ${C} kişi daha`},v=x=>{var S;if(x.who_joined_details&&Array.isArray(x.who_joined_details)&&x.who_joined_details.length>0){const C=x.who_joined_details.map(_=>_.name||"");return m(C)}if(x.participant_logs&&Array.isArray(x.participant_logs)&&x.participant_logs.length>0){const C=x.participant_logs.map(_=>_.name||"");return m(C)}return(S=x.archive_summary)!=null&&S.admin_name?x.archive_summary.admin_name:"Atanmamış"};return y.length===0?f.jsx("div",{className:"h-full flex items-center justify-center p-6 text-center",children:f.jsxs("div",{className:"max-w-xs",children:[f.jsx("div",{className:"text-sm font-medium opacity-80",children:"Henüz sohbet yok"}),f.jsx("div",{className:"mt-2 text-xs opacity-60",children:t||"Yeni bir sohbet başlatmak için aşağıdaki butonu kullanabilirsiniz."})]})}):f.jsx("div",{className:"flex flex-col h-full",children:f.jsx("div",{className:"flex-1 overflow-y-auto space-y-0 min-h-0",children:y.map(x=>f.jsxs("button",{type:"button",className:"w-full flex justify-between items-center gap-2 p-5 text-left transition-colors",style:{color:s.getColor(k.InputText),backgroundColor:a===x._id?s.getColor(k.MessageAdminBackground):"transparent",cursor:"pointer"},onMouseEnter:()=>l(x._id),onMouseLeave:()=>l(null),onClick:()=>{r(x),i(null),o.push("chat")},children:[f.jsx("span",{className:"font-medium text-sm truncate flex-1 min-w-0",children:v(x)}),f.jsx("span",{className:"text-xs flex-shrink-0 tabular-nums",style:{color:s.getColor(k.FooterText)},children:b(x.created_at)})]},x._id))})})}const rf=[Le.Light,Le.Dark,Le.System];function aL(e){switch(e){case Le.Light:return Z.Sun;case Le.Dark:return Z.Moon;case Le.System:return Z.Monitor;default:return Z.Monitor}}function lL(){const e=be(),{mode:t,setMode:n}=e,r=()=>{const s=rf.indexOf(t),o=rf[(s+1)%rf.length];n(o)},i=aL(t);return f.jsx("button",{type:"button",onClick:r,className:"flex items-center justify-center p-1.5 rounded-md hover:opacity-80 transition-opacity",style:{backgroundColor:"transparent",color:e.getColor(k.HeaderText)},title:t===Le.Light?"Açık tema":t===Le.Dark?"Koyu tema":"Sistem",children:f.jsx(i,{className:"size-5"})})}const cr=Object.create(null);cr.open="0";cr.close="1";cr.ping="2";cr.pong="3";cr.message="4";cr.upgrade="5";cr.noop="6";const hc=Object.create(null);Object.keys(cr).forEach(e=>{hc[cr[e]]=e});const eh={type:"error",data:"parser error"},hC=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",mC=typeof ArrayBuffer=="function",gC=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,xg=({type:e,data:t},n,r)=>hC&&t instanceof Blob?n?r(t):ux(t,r):mC&&(t instanceof ArrayBuffer||gC(t))?n?r(t):ux(new Blob([t]),r):r(cr[e]+(t||"")),ux=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function dx(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let sf;function cL(e,t){if(hC&&e.data instanceof Blob)return e.data.arrayBuffer().then(dx).then(t);if(mC&&(e.data instanceof ArrayBuffer||gC(e.data)))return t(dx(e.data));xg(e,!1,n=>{sf||(sf=new TextEncoder),t(sf.encode(n))})}const fx="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ra=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<fx.length;e++)ra[fx.charCodeAt(e)]=e;const uL=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=ra[e.charCodeAt(r)],o=ra[e.charCodeAt(r+1)],a=ra[e.charCodeAt(r+2)],l=ra[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},dL=typeof ArrayBuffer=="function",wg=(e,t)=>{if(typeof e!="string")return{type:"message",data:vC(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:fL(e.substring(1),t)}:hc[n]?e.length>1?{type:hc[n],data:e.substring(1)}:{type:hc[n]}:eh},fL=(e,t)=>{if(dL){const n=uL(e);return vC(n,t)}else return{base64:!0,data:e}},vC=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},yC="",pL=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{xg(s,!1,a=>{r[o]=a,++i===n&&t(r.join(yC))})})},hL=(e,t)=>{const n=e.split(yC),r=[];for(let i=0;i<n.length;i++){const s=wg(n[i],t);if(r.push(s),s.type==="error")break}return r};function mL(){return new TransformStream({transform(e,t){cL(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 of;function ql(e){return e.reduce((t,n)=>t+n.length,0)}function Gl(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 gL(e,t){of||(of=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(ql(n)<1)break;const l=Gl(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(ql(n)<2)break;const l=Gl(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(ql(n)<8)break;const l=Gl(n,8),c=new DataView(l.buffer,l.byteOffset,l.length),d=c.getUint32(0);if(d>Math.pow(2,21)-1){a.enqueue(eh);break}i=d*Math.pow(2,32)+c.getUint32(4),r=3}else{if(ql(n)<i)break;const l=Gl(n,i);a.enqueue(wg(s?l:of.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(eh);break}}}})}const xC=4;function st(e){if(e)return vL(e)}function vL(e){for(var t in st.prototype)e[t]=st.prototype[t];return e}st.prototype.on=st.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};st.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};st.prototype.off=st.prototype.removeListener=st.prototype.removeAllListeners=st.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};st.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};st.prototype.emitReserved=st.prototype.emit;st.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};st.prototype.hasListeners=function(e){return!!this.listeners(e).length};const ed=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),bn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),yL="arraybuffer";function wC(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const xL=bn.setTimeout,wL=bn.clearTimeout;function td(e,t){t.useNativeTimers?(e.setTimeoutFn=xL.bind(bn),e.clearTimeoutFn=wL.bind(bn)):(e.setTimeoutFn=bn.setTimeout.bind(bn),e.clearTimeoutFn=bn.clearTimeout.bind(bn))}const bL=1.33;function kL(e){return typeof e=="string"?SL(e):Math.ceil((e.byteLength||e.size)*bL)}function SL(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 bC(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function CL(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function _L(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 TL extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class bg extends st{constructor(t){super(),this.writable=!1,td(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 TL(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=wg(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=CL(t);return n.length?"?"+n:""}}class EL extends bg{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)};hL(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,pL(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]=bC()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let kC=!1;try{kC=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const AL=kC;function jL(){}class RL extends EL{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 ar extends st{constructor(t,n,r){super(),this.createRequest=t,td(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=wC(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=ar.requestsCount++,ar.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=jL,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete ar.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()}}ar.requestsCount=0;ar.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",px);else if(typeof addEventListener=="function"){const e="onpagehide"in bn?"pagehide":"unload";addEventListener(e,px,!1)}}function px(){for(let e in ar.requests)ar.requests.hasOwnProperty(e)&&ar.requests[e].abort()}const PL=function(){const e=SC({xdomain:!1});return e&&e.responseType!==null}();class ML extends RL{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=PL&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new ar(SC,this.uri(),t)}}function SC(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||AL))return new XMLHttpRequest}catch{}if(!t)try{return new bn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const CC=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class NL extends bg{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=CC?{}:wC(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;xg(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}i&&ed(()=>{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]=bC()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const af=bn.WebSocket||bn.MozWebSocket;class OL extends NL{createSocket(t,n,r){return CC?new af(t,n,r):n?new af(t,n):new af(t)}doWrite(t,n){this.ws.send(n)}}class DL extends bg{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=gL(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=mL();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&&ed(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const IL={websocket:OL,webtransport:DL,polling:ML},LL=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,FL=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function th(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=LL.exec(e||""),s={},o=14;for(;o--;)s[FL[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=$L(s,s.path),s.queryKey=BL(s,s.query),s}function $L(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 BL(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const nh=typeof addEventListener=="function"&&typeof removeEventListener=="function",mc=[];nh&&addEventListener("offline",()=>{mc.forEach(e=>e())},!1);class di extends st{constructor(t,n){if(super(),this.binaryType=yL,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=th(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=th(n.host).host);td(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=_L(this.opts.query)),nh&&(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"})},mc.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=xC,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&&di.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",di.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+=kL(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,ed(()=>{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(di.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(),nh&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=mc.indexOf(this._offlineEventListener);r!==-1&&mc.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}di.protocol=xC;class zL extends di{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;di.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;di.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 p=new Error("probe error");p.transport=n.name,this.emitReserved("upgradeError",p)}}))};function s(){r||(r=!0,d(),n.close(),n=null)}const o=u=>{const p=new Error("probe error: "+u);p.transport=n.name,s(),this.emitReserved("upgradeError",p)};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 VL=class extends zL{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=>IL[i]).filter(i=>!!i)),super(t,r)}};function UL(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=th(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 HL=typeof ArrayBuffer=="function",WL=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,_C=Object.prototype.toString,qL=typeof Blob=="function"||typeof Blob<"u"&&_C.call(Blob)==="[object BlobConstructor]",GL=typeof File=="function"||typeof File<"u"&&_C.call(File)==="[object FileConstructor]";function kg(e){return HL&&(e instanceof ArrayBuffer||WL(e))||qL&&e instanceof Blob||GL&&e instanceof File}function gc(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(gc(e[n]))return!0;return!1}if(kg(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return gc(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&gc(e[n]))return!0;return!1}function YL(e){const t=[],n=e.data,r=e;return r.data=rh(n,t),r.attachments=t.length,{packet:r,buffers:t}}function rh(e,t){if(!e)return e;if(kg(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]=rh(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]=rh(e[r],t));return n}return e}function QL(e,t){return e.data=ih(e.data,t),delete e.attachments,e}function ih(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]=ih(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=ih(e[n],t));return e}const KL=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],XL=5;var Te;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(Te||(Te={}));class ZL{constructor(t){this.replacer=t}encode(t){return(t.type===Te.EVENT||t.type===Te.ACK)&&gc(t)?this.encodeAsBinary({type:t.type===Te.EVENT?Te.BINARY_EVENT:Te.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Te.BINARY_EVENT||t.type===Te.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=YL(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function hx(e){return Object.prototype.toString.call(e)==="[object Object]"}class Sg extends st{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===Te.BINARY_EVENT;r||n.type===Te.BINARY_ACK?(n.type=r?Te.EVENT:Te.ACK,this.reconstructor=new JL(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(kg(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(Te[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Te.BINARY_EVENT||r.type===Te.BINARY_ACK){const s=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(s,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(o)}if(t.charAt(n+1)==="/"){const s=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(s,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const s=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}r.id=Number(t.substring(s,n+1))}if(t.charAt(++n)){const s=this.tryParse(t.substr(n));if(Sg.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case Te.CONNECT:return hx(n);case Te.DISCONNECT:return n===void 0;case Te.CONNECT_ERROR:return typeof n=="string"||hx(n);case Te.EVENT:case Te.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&KL.indexOf(n[0])===-1);case Te.ACK:case Te.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class JL{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=QL(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const eF=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Sg,Encoder:ZL,get PacketType(){return Te},protocol:XL},Symbol.toStringTag,{value:"Module"}));function Dn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const tF=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class TC extends st{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=[Dn(t,"open",this.onopen.bind(this)),Dn(t,"packet",this.onpacket.bind(this)),Dn(t,"error",this.onerror.bind(this)),Dn(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(tF.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:Te.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const 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:Te.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Te.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Te.EVENT:case Te.BINARY_EVENT:this.onevent(t);break;case Te.ACK:case Te.BINARY_ACK:this.onack(t);break;case Te.DISCONNECT:this.ondisconnect();break;case Te.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:Te.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Te.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Oo(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}Oo.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};Oo.prototype.reset=function(){this.attempts=0};Oo.prototype.setMin=function(e){this.ms=e};Oo.prototype.setMax=function(e){this.max=e};Oo.prototype.setJitter=function(e){this.jitter=e};class sh extends st{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,td(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 Oo({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||eF;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 VL(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Dn(n,"open",function(){r.onopen(),t&&t()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=Dn(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(Dn(t,"ping",this.onping.bind(this)),Dn(t,"data",this.ondata.bind(this)),Dn(t,"error",this.onerror.bind(this)),Dn(t,"close",this.onclose.bind(this)),Dn(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){ed(()=>{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 TC(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 Yo={};function vc(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=UL(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=Yo[i]&&s in Yo[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new sh(r,t):(Yo[i]||(Yo[i]=new sh(r,t)),l=Yo[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(vc,{Manager:sh,Socket:TC,io:vc,connect:vc});const EC=g.createContext(null),dr=()=>{const e=g.useContext(EC);if(!e)throw new Error("useWebsocket must be used within a WebSocketProvider");return e},nF=({children:e})=>{const{widget:t,isHaveChat:n,isAIAgentMode:r}=ne(),i=g.useRef(null),s=g.useRef(!1),o=g.useRef(!1),a=g.useRef(null),[l,c]=g.useState(!1),[d,u]=g.useState(!1),p=g.useCallback(C=>{var _;console.log("WS: cleanupSocket called",{reason:C,hasSocket:!!i.current,isConnected:(_=i.current)==null?void 0:_.connected,currentLinkId:a.current}),i.current&&(console.log("WS: Cleaning up existing socket.",C||""),i.current.removeAllListeners(),i.current.disconnect(),i.current=null),c(!1),u(!1),o.current=!1,s.current=!1,a.current=null},[]),h=g.useCallback((C,_,j)=>{if(a.current===C&&(o.current||i.current&&i.current.connected)){console.log("WS: Connect called but already connecting or connected for same linkId.");return}if(!_&&!j){console.log("WS: Connect skipped - no active chat or AI agent mode");return}const A=na(rt.CustomerToken,C)||Qs("customer_token"),E=na(rt.CustomerRefreshToken,C)||Qs("customer_refresh_token");if(!A||!E){if(console.log("WS: Connect skipped - missing required tokens"),_){console.log("WS: Clearing stale isHaveChat flag due to missing tokens"),localStorage.removeItem("lc:widget:isHaveChat");try{ne.getState().setIsHaveChat(!1)}catch{}}return}if(i.current&&!i.current.connected&&(console.log("WS: Cleaning up disconnected/failed socket before new connection"),i.current.removeAllListeners(),i.current.disconnect(),i.current=null),i.current&&i.current.connected){console.log("WS: Already connected, skipping new connection");return}console.log("WS: Attempting to connect...",{linkId:C,tokenPrefix:`${A==null?void 0:A.substring(0,20)}...`,refreshTokenPrefix:`${E==null?void 0:E.substring(0,20)}...`,deviceId:na(rt.DeviceId,C)}),o.current=!0,a.current=C;const D=vc(BT,{transports:["websocket"],forceNew:!0,timeout:1e4,auth:{customer_token:A,device_id:na(rt.DeviceId,C)||Qs("device_id"),customer_refresh_token:E}});i.current=D,D.on("error",L=>{console.error("WS: Websocket error",L),o.current=!1}),D.on("connect_error",L=>{console.error("WS: Connect error",L),o.current=!1,c(!1),u(!1),i.current===D&&(i.current=null,a.current=null);const O=(L==null?void 0:L.message)||String(L);if(O.toLowerCase().includes("unauthorized")||O.includes("401")){console.log("WS: Unauthorized error, clearing tokens only"),C&&mS(C),localStorage.removeItem("lc:widget:isHaveChat");try{ne.getState().setIsHaveChat(!1)}catch{}}}),D.on("disconnect",L=>{var q;console.log("WS: Disconnected",L),c(!1),u(!1),o.current=!1,s.current=!1,i.current===D&&(i.current=null,a.current=null);const O=ne.getState();L==="io server disconnect"&&((q=O.widget)!=null&&q.link_id)&&(O.isHaveChat||O.isAIAgentMode)&&(console.log("WS: Server disconnect, attempting reconnect..."),setTimeout(()=>{h(O.widget.link_id,O.isHaveChat,O.isAIAgentMode)},500))}),D.on("connect",()=>{console.log("WS: Connected successfully"),c(!0),o.current=!1}),D.on("connection:ready",()=>{console.log("WS: Connection ready received"),s.current=!0,u(!0)})},[]);g.useEffect(()=>{const C=t==null?void 0:t.link_id;return C&&(n||r)?(console.log("WS: Auto-connecting due to linkId and isHaveChat/isAIAgentMode",{isHaveChat:n,isAIAgentMode:r}),h(C,n,r)):!n&&!r&&(console.log("WS: Auto-disconnect due to no isHaveChat and no isAIAgentMode"),p("no active chat flags")),()=>{}},[t==null?void 0:t.link_id,n,r,h,p]),g.useEffect(()=>()=>{console.log("WS: Provider unmounting, cleaning up"),p("provider unmount")},[p]),g.useEffect(()=>{const C=()=>{console.log("WS: Page unloading, disconnecting socket"),i.current&&(i.current.disconnect(),i.current=null)},_=()=>{console.log("WS: Page hidden (pagehide), disconnecting socket"),i.current&&(i.current.disconnect(),i.current=null)};return window.addEventListener("beforeunload",C),window.addEventListener("pagehide",_),()=>{window.removeEventListener("beforeunload",C),window.removeEventListener("pagehide",_)}},[]);const y=g.useCallback(()=>{const C=t==null?void 0:t.link_id;C?h(C,n,r):console.warn("WS: Manual connect failed, no link_id available.")},[t==null?void 0:t.link_id,n,r,h]),w=g.useCallback(()=>{console.log("WS: Reconnecting..."),p("manual reconnect");const C=t==null?void 0:t.link_id;C&&setTimeout(()=>{h(C,n,r)},100)},[t==null?void 0:t.link_id,n,r,h,p]),b=g.useCallback(()=>{console.log("WS: Manual disconnect"),p("manual disconnect")},[p]),m=g.useCallback((C,_)=>{var j;(j=i.current)==null||j.on(C,_)},[]),v=g.useCallback((C,_)=>{var j;(j=i.current)==null||j.off(C,_)},[]),x=g.useCallback((C,_,j)=>{i.current&&i.current.connected?i.current.emit(C,_,j):console.warn(`WS: Cannot emit event '${C}', socket not connected.`)},[]),S=g.useMemo(()=>({connectionReady:d,connected:l,connect:y,reconnect:w,disconnect:b,on:m,off:v,emit:x}),[l,d,y,w,b,m,v,x]);return f.jsx(EC.Provider,{value:S,children:e})},ru=(e,t,n)=>{const r=typeof window<"u"?window:void 0;g.useEffect(()=>(r.addEventListener(e,t),()=>{r.removeEventListener(e,t,!1)}),[e,t,r])},Do=()=>{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},rF=()=>{let e=!1;return typeof window<"u"&&(e=new URLSearchParams(window.location.search).get("fullscreen")==="true"),e},nd=()=>g.useMemo(()=>typeof window>"u"||new URLSearchParams(window.location.search).get("fullscreen")==="true"?!1:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent),[]);var He=(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.AgentRequestHuman="agent:request:human",e.AgentMessageCreate="agent:message:create",e.ChatUpdateInputs="chat:update:inputs",e))(He||{}),ge=(e=>(e.Connect="connect",e.Disconnect="disconnect",e.ConnectionReady="connection:ready",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.ChatUserJoin="chat:user:join",e.AgentMessageChunk="agent:message:chunk",e.AgentMessageFinalMetadata="agent:message:final_metadata",e.AgentSpamWarning="agent:spam:warning",e.AgentSpamBanned="agent:spam:banned",e))(ge||{});function iF(){const e=Zu(),t=g.useCallback(()=>{const n=window.location.pathname;n!==e.page&&e.setPage(n)},[e.page]);return ru("popstate",t),null}function sF(){const e=dr(),t=Zu(),n=g.useCallback(()=>{const r=window.location.pathname;if(r!==t.page){if(e){e.emit(He.PageChange,{page:r});return}t.setPage(r)}},[e,t.page]);return ru("popstate",n),g.useEffect(()=>{if(!e)return;const r=WI(),i=HI();r!==i&&(e.emit(He.PageChange,{page:i}),t.setPage(i))},[e]),null}function oF(){return iF(),null}const mx=(e,t)=>{var n;return(n=e.find(r=>r.type===t))==null?void 0:n.content};function aF(){var ue,ke,Ne,Q;const e=be(),t=ne(V=>V.widget),n=ne(V=>V.setOpen),r=ne(V=>V.setAIAgent),i=ne(V=>V.setIsAIAgentMode),s=ne(V=>V.setIsHaveChat),o=ne(V=>V.isHaveChat),a=ne(V=>V.humanNeedRequested),l=ne(V=>V.setHumanNeedRequested),c=ne(V=>V.aiAgent),d=ne(V=>V.setShowActionButtons),u=ne(V=>V.defaultValues),[p,h]=g.useState(!1),[y,w]=g.useState(!1),[b,m]=g.useState(null),v=vs(),x=Do(),S=nd(),[C,_]=g.useState(!0),[j,A]=g.useState(!1),E=Zu(),D=Jm(),L=dr(),[O,q]=g.useState(null),$=g.useRef(!1),B=g.useRef(!1),I=g.useRef(!1),N=fl(),R=g.useCallback(async()=>{var P,K,Y;if(!t)return;m(null),ne.getState().setHistoryChat(null),ne.getState().setHistoryMessages(null),ne.getState().clearAIAgentState(),d(!1);const V=(((Y=(K=(P=t.appearance)==null?void 0:P.body)==null?void 0:K.inputs)==null?void 0:Y.length)||0)>0;if(O){if(I.current)return;I.current=!0;try{const me={username:(u==null?void 0:u.username)||"Ziyaretçi",email:`visitor_${Date.now()}@temp.local`};u!=null&&u.secret_data&&(me.secret_data=u.secret_data);const[re,Ee]=await D.mutateAsync({inputs:me,history:E.history,client_id:t.client_id,widget_id:t.link_id,device_id:Rr(t.link_id),is_agent_mode:!0});zn(Ee)&&Up(re)?(Fn(rt.CustomerToken,re.customer_token,t.link_id),Fn(rt.CustomerRefreshToken,re.customer_refresh_token,t.link_id),Fn(rt.DeviceId,re.device_id,t.link_id),E.clearHistory(),s(!0),r(O),i(!0),v.push("chat")):(yo(re),(re==null?void 0:re.statusCode)===403&&m((re==null?void 0:re.message)||"Sohbet başlatılamadı."))}catch(me){console.error("Error creating chat for AI agent:",me)}finally{I.current=!1}return}if(!V){if(I.current)return;I.current=!0;try{const me={};u!=null&&u.secret_data&&(me.secret_data=u.secret_data),u!=null&&u.username&&(me.username=u.username);const[re,Ee]=await D.mutateAsync({inputs:me,history:E.history,client_id:t.client_id,widget_id:t.link_id,device_id:Rr(t.link_id)});zn(Ee)&&Up(re)?(Fn(rt.CustomerToken,re.customer_token,t.link_id),Fn(rt.CustomerRefreshToken,re.customer_refresh_token,t.link_id),Fn(rt.DeviceId,re.device_id,t.link_id),E.clearHistory(),s(!0),v.push("chat")):(yo(re),(re==null?void 0:re.statusCode)===403&&m((re==null?void 0:re.message)||"Sohbet başlatılamadı."))}catch(me){console.error("Error creating chat:",me)}finally{I.current=!1}return}_(!1)},[t,O,D,E,u==null?void 0:u.secret_data,u==null?void 0:u.username,s,r,i,v,d]),z=g.useCallback(V=>{A(V)},[]);if(!t)return null;const H=()=>{n(!1)};g.useEffect(()=>{var K,Y,me;if(!t||$.current)return;$.current=!0;const V=mr(t.link_id);if(V.isAgentMode&&V.agent&&(N!=null&&N.accessToken)){if(r(V.agent),i(!0),V.sessionId&&ne.getState().setAIAgentSessionId(V.sessionId),V.humanNeedRequested){if(ne.getState().setHumanNeedRequested(!0),!((((me=(Y=(K=t.appearance)==null?void 0:K.body)==null?void 0:Y.inputs)==null?void 0:me.length)||0)>0)){v.push("chat");return}return}q(V.agent),v.push("chat");return}(async()=>{try{const[re,Ee]=await TM(t.link_id);Ee===200&&re&&re.is_active&&q(re)}catch(re){console.error("Failed to check AI agent:",re)}})()},[t,N==null?void 0:N.accessToken,N==null?void 0:N.refreshToken,v,r,i]),g.useEffect(()=>{if(p||!t||!N||!N.accessToken){B.current=!1;return}if(B.current||a)return;if(o){v.push("chat");return}const V=mr(t.link_id);V.isAgentMode&&V.agent&&!V.humanNeedRequested||(B.current=!0,yM(t.client_id,Qi(Yi(N),t.link_id)).then(([P,K])=>{if(zn(K))a||v.push("chat");else if(K===403){const Y=mr(t.link_id);if(Y.isAgentMode&&Y.agent){if(Y.humanNeedRequested){r(Y.agent),i(!1),Y.sessionId&&ne.getState().setAIAgentSessionId(Y.sessionId),ne.getState().setHumanNeedRequested(!0);return}r(Y.agent),i(!0),Y.sessionId&&ne.getState().setAIAgentSessionId(Y.sessionId),v.push("chat")}else ya(t.link_id||""),h(!0)}else K===404?(ya(t.link_id||""),h(!0)):K===401?(mS(t.link_id||""),h(!0)):v.push("chat")}).catch(()=>v.push("chat")))},[p,v,r,i,t,N==null?void 0:N.accessToken,N==null?void 0:N.refreshToken,o,a]);const W=mx(((ke=(ue=t.appearance)==null?void 0:ue.head)==null?void 0:ke.elements)||[],"text"),G=mx(((Q=(Ne=t.appearance)==null?void 0:Ne.head)==null?void 0:Q.elements)||[],"title"),te=()=>{if(a&&t){let V=c;if(!V){const P=mr(t.link_id);P.agent&&(V=P.agent,r(P.agent),q(P.agent))}if(V){i(!0),ne.getState().setHistoryChat(null),ne.getState().setHistoryMessages(null),v.push("chat");return}}_(!0)},se=()=>{O&&(r(O),i(!0),ne.getState().setHistoryChat(null),ne.getState().setHistoryMessages(null),v.push("chat"))},pe=g.useCallback(V=>{if(!L||y)return;w(!0);const P=()=>{L.emit(He.AgentRequestHuman,{},K=>{w(!1),K!=null&&K.success&&(ne.getState().setIsHaveChat(!0),d(!1),i(!1),l(!1),ne.getState().clearAIAgentState(),v.push("chat"))})};V&&Object.keys(V).length>0?L.emit(He.ChatUpdateInputs,{inputs:V},K=>{K!=null&&K.success?P():w(!1)}):P()},[L,y,i,l,v]);return g.useEffect(()=>{var V,P,K;if(a){if(!c&&t){const Y=mr(t.link_id);Y.agent&&(r(Y.agent),q(Y.agent))}(c||mr((t==null?void 0:t.link_id)||"").agent)&&((((K=(P=(V=t==null?void 0:t.appearance)==null?void 0:V.body)==null?void 0:P.inputs)==null?void 0:K.length)||0)>0?_(!1):pe())}},[a,c,t,pe,r]),f.jsxs("div",{className:"h-full w-full flex flex-col relative overflow-hidden",children:[f.jsxs("header",{className:"flex items-center justify-between px-4 py-3 flex-shrink-0 overflow-visible min-h-[52px]",style:{backgroundColor:e.getColor(k.HeaderBackground),color:e.getColor(k.HeaderText),borderColor:e.getColor(k.HeaderBorder),...x?{}:{borderTopLeftRadius:e.getRadius(),borderTopRightRadius:e.getRadius()}},children:[f.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[!C&&(j||a&&(c||t&&mr(t.link_id).agent))&&f.jsx("button",{type:"button",onClick:te,className:"flex-shrink-0 p-1 hover:opacity-80 transition-opacity",children:f.jsx(Z.ArrowLeft,{className:"w-5 h-5"})}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsx("div",{className:"text-sm font-semibold truncate",children:C?"Geçmiş sohbetler":G||"Müşteri Hizmetleri"}),!C&&W&&f.jsx("div",{className:"text-xs opacity-90 truncate",children:W})]})]}),f.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0 ml-2",children:[f.jsx(lL,{}),S&&f.jsx("button",{type:"button",onClick:H,className:"p-1.5 rounded-md hover:opacity-80 transition-opacity",children:f.jsx(Z.X,{className:"w-5 h-5"})})]})]}),f.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-h-0",style:{backgroundColor:e.getColor(k.Background)},children:C?f.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-h-0",children:f.jsx(oL,{onHasHistory:z,emptyStateText:b||void 0})}):f.jsx("div",{className:"flex-1 overflow-y-auto",children:f.jsx(eL,{clientId:t.client_id,widgetId:t.link_id,appearance:t.appearance,aiAgentMode:!!O&&!a,onAIAgentStart:se,onOk:()=>{a&&c||(ne.getState().setHistoryChat(null),ne.getState().setHistoryMessages(null),v.push("chat"))},onOperatorConnect:a&&(c||mr(t.link_id).agent)?pe:void 0,isConnectingToOperator:y})})}),C&&f.jsxs("div",{className:"flex-shrink-0",style:{backgroundColor:e.getColor(k.Background)},children:[f.jsx("div",{className:"px-5 py-2",children:f.jsxs(Rt,{onClick:R,size:"lg",className:"w-full flex items-center justify-center gap-2",children:[f.jsx(Z.Plus,{className:"size-4"}),f.jsx("span",{children:"Yeni Sohbet Başlat"})]})}),f.jsx(So,{variant:"block"})]})]})}function lF(){return f.jsxs(f.Fragment,{children:[f.jsx(aF,{}),f.jsx(oF,{})]})}const cF=[{path:"/",component:lF,name:"registration"}];function tt({className:e="",style:t}){const n=be();return f.jsx("div",{className:`animate-pulse rounded ${e}`,style:{backgroundColor:n.getColor(k.MessageAdminBackground),opacity:.6,...t}})}function uF(){const e=be();return f.jsxs("section",{className:"flex flex-col gap-3 w-full grow pt-4 px-4 overflow-y-auto",children:[f.jsx("div",{className:"flex w-full items-center justify-start",children:f.jsx(tt,{className:"h-12 w-3/5",style:{borderRadius:e.getRadius()}})}),f.jsx("div",{className:"flex w-full items-center justify-end",children:f.jsx(tt,{className:"h-10 w-2/5",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(k.MessageVisitorBackground),opacity:.4}})}),f.jsx("div",{className:"flex w-full items-center justify-start",children:f.jsx(tt,{className:"h-16 w-4/5",style:{borderRadius:e.getRadius()}})}),f.jsx("div",{className:"flex w-full items-center justify-end",children:f.jsx(tt,{className:"h-8 w-1/3",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(k.MessageVisitorBackground),opacity:.4}})}),f.jsx("div",{className:"flex w-full items-center justify-start",children:f.jsx(tt,{className:"h-10 w-1/2",style:{borderRadius:e.getRadius()}})})]})}function dF(){const e=be();return f.jsxs("div",{className:"p-3 flex items-center gap-3",style:{backgroundColor:e.getColor(k.FooterBackground),borderRadius:e.getRadius()},children:[f.jsx("div",{className:"grow",children:f.jsx(tt,{className:"h-12 w-full",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(k.InputBackground)}})}),f.jsx(tt,{className:"h-12 w-12 rounded-full"})]})}function fF(){const e=be();return f.jsxs("header",{className:"p-4 flex justify-between items-center z-10",style:{backgroundColor:e.getColor(k.HeaderBackground),borderBottom:`1px solid ${e.getColor(k.HeaderBorder)}`},children:[f.jsx(tt,{className:"h-5 w-36"}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(tt,{className:"h-5 w-5 rounded"}),f.jsx(tt,{className:"h-5 w-5 rounded"})]})]})}function pF(){const e=be();return f.jsx("section",{className:"h-full overflow-y-auto px-4 py-3",style:{backgroundColor:e.getColor(k.GreeterBackground)},children:f.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[f.jsxs("div",{children:[f.jsx(tt,{className:"h-4 w-20 mb-1"}),f.jsx(tt,{className:"h-11 w-full",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(k.InputBackground)}})]}),f.jsxs("div",{children:[f.jsx(tt,{className:"h-4 w-24 mb-1"}),f.jsx(tt,{className:"h-11 w-full",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(k.InputBackground)}})]}),f.jsxs("div",{children:[f.jsx(tt,{className:"h-4 w-16 mb-1"}),f.jsx(tt,{className:"h-11 w-full",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(k.InputBackground)}})]}),f.jsx(tt,{className:"h-11 w-full mt-2",style:{borderRadius:e.getRadius(),backgroundColor:e.getColor(k.GreeterButtonBackground),opacity:.5}})]})})}function hF(){const e=be();return f.jsxs("div",{className:"relative flex flex-col gap-3 items-center justify-center h-44",style:{backgroundColor:e.getColor(k.GreeterTopBackground)},children:[f.jsx(tt,{className:"h-7 w-40"}),f.jsx(tt,{className:"h-4 w-56"})]})}function AC(){const e=be();return f.jsxs("div",{className:"h-full w-full flex flex-col overflow-hidden",style:{backgroundColor:e.getColor(k.Background)},children:[f.jsx(fF,{}),f.jsx(uF,{}),f.jsx(dF,{}),f.jsxs("div",{className:"py-1.5 px-3 flex items-center justify-center gap-1",style:{borderTop:`1px solid ${e.getColor(k.FooterBorder)}`,backgroundColor:e.getColor(k.FooterBackground)},children:[f.jsx(tt,{className:"h-3 w-20"}),f.jsx(tt,{className:"h-3.5 w-3.5 rounded"})]})]})}function oh(){const e=be(),t=typeof window<"u"&&window.innerWidth<768;return f.jsxs("div",{className:`h-full w-full relative overflow-hidden ${t?"":"rounded-xl"}`,style:{backgroundColor:e.getColor(k.GreeterBackground)},children:[f.jsx(hF,{}),f.jsx("div",{style:{height:t?"calc(var(--app-height,100dvh) - 11rem)":"calc(100% - 11rem)"},children:f.jsx(pF,{})})]})}const mF=/^admin_([a-f0-9]{24})_(.+)$/i;function Ks(e){return e.profile_id?`id:${e.profile_id}`:`name:${e.name.trim().toLowerCase()}`}function gx(e){const t=e.trim().match(mF);return t?{profile_id:t[1],name:t[2]}:null}function gF(e,t){const n=e?[...e]:[],r=Ks(t),i=n.findIndex(s=>Ks(s)===r);if(i>=0){const s=n[i];return n[i]={...s,...t,name:t.name||s.name,avatar:t.avatar??s.avatar,profile_id:t.profile_id??s.profile_id},n}return[...n,t]}function ah(e,t){return e!=null&&e.length?e.filter(n=>!(t.profile_id&&n.profile_id===t.profile_id||!t.profile_id&&t.name&&n.name===t.name)):[]}function vF(e,t){const n=t.profile_id!=null&&t.profile_id!==""?ah(e,{profile_id:t.profile_id}):ah(e,{name:t.name});return[t,...n]}function ia(e){const t=e[0];return t?{agent_name:t.name,agent_avatar:t.avatar}:{agent_name:void 0,agent_avatar:void 0}}function yF(e){const t=new Map,n=[];for(const r of e)if(r.sender_type===ve.Activity){if(r.activity_type===gn.AdminJoin){let i;const s=typeof r.content=="string"?gx(r.content):null;if(s)i={profile_id:s.profile_id,name:s.name};else if(r.sender_name)i={name:r.sender_name};else continue;const o=Ks(i);t.has(o)||n.push(o);const a=t.get(o);t.set(o,{...a,...i,name:i.name,avatar:i.avatar??(a==null?void 0:a.avatar),profile_id:i.profile_id??(a==null?void 0:a.profile_id)})}else if(r.activity_type===gn.AdminLeave){const i=typeof r.content=="string"?gx(r.content):null;if(i){const s=Ks({profile_id:i.profile_id,name:i.name});t.delete(s);const o=n.indexOf(s);o>=0&&n.splice(o,1)}else if(r.sender_name){const s=Ks({name:r.sender_name});t.delete(s);const o=n.indexOf(s);o>=0&&n.splice(o,1)}}}return n.map(r=>t.get(r)).filter(r=>r!=null)}function Cg(e,t){return e!=null&&e.trim()?[{name:e.trim(),avatar:t}]:[]}function vx(e){const t=e.participants&&e.participants.length>0?e.participants:Cg(e.agent_name,e.agent_avatar),n=ia(t);return{...e,participants:t,agent_name:n.agent_name,agent_avatar:n.agent_avatar}}function xF(e){var s,o;const t=e.who_joined_details;if(t!=null&&t.length)return t.map(a=>({profile_id:a.profile_id,name:a.name,avatar:a.avatar}));const n=e.participant_logs;if(n!=null&&n.length)return n.map(a=>({profile_id:a.user_id,name:a.name}));const r=(s=e.archive_summary)==null?void 0:s.admin_name,i=(o=e.archive_summary)==null?void 0:o.agent_avatar;return r?[{name:r,avatar:i}]:[]}const wF="/notify.mp3",_g="lc:notification_sound_muted",jC=()=>{try{return sessionStorage.getItem(_g)==="1"}catch{return!1}},RC=e=>{try{sessionStorage.setItem(_g,e?"1":"0")}catch{}},bF=async e=>{try{if(sessionStorage.getItem(_g)==="1")return}catch{}await new Audio(e||wF).play()},lf=[Le.Light,Le.Dark,Le.System];function kF(e){switch(e){case Le.Light:return Z.Sun;case Le.Dark:return Z.Moon;case Le.System:return Z.Monitor;default:return Z.Monitor}}function SF({onChatClose:e}){const[t,n]=g.useState(!1),[r,i]=g.useState(!1),[s,o]=g.useState(()=>jC()),a=g.useRef(null),l=g.useRef(null),c=be(),d=us(),u=dr(),{setShowActionButtons:p}=ne(),{mode:h,setMode:y}=c,w=()=>{u==null||u.emit(He.ChatClose,{}),p(!1),e()},b=()=>{const x=lf.indexOf(h),S=lf[(x+1)%lf.length];y(S)},m=()=>{const x=!s;RC(x),o(x)};g.useEffect(()=>{if(!r)return;const x=S=>{var C,_;(C=l.current)!=null&&C.contains(S.target)||(_=a.current)!=null&&_.contains(S.target)||i(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[r]);const v=r&&f.jsxs(Re.div,{ref:l,onMouseDown:x=>x.stopPropagation(),initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:"absolute right-0 top-full z-[9999] mt-1.5 py-1 min-w-[175px] rounded-lg shadow-lg !text-sm",style:{backgroundColor:c.getColor(k.Background),borderColor:c.getColor(k.Border),borderRadius:c.getRadius(),boxShadow:`0 4px 12px ${c.getColor(k.ShadowColor)}`},children:[f.jsxs("button",{type:"button",className:"w-full px-3 py-2 text-left text-sm flex items-center gap-2 rounded-t-lg hover:opacity-80 transition-opacity",style:{color:c.getColor(k.ErrorText)},onClick:()=>{i(!1),n(!0)},children:[f.jsx(Z.XCircle,{className:"size-4 flex-shrink-0"}),d(ie.ChatEndConversation)]}),f.jsxs("button",{type:"button",className:"w-full px-3 py-2 text-left text-sm flex items-center gap-2 hover:opacity-80 transition-opacity",style:{color:c.getColor(k.InputText)},onClick:m,children:[s?f.jsx(Z.VolumeX,{className:"size-4 flex-shrink-0"}):f.jsx(Z.Volume2,{className:"size-4 flex-shrink-0"}),d(s?ie.NotificationSoundOn:ie.NotificationSoundOff)]}),f.jsx("div",{className:"my-1 h-px",style:{backgroundColor:c.getColor(k.DividerColor)}}),f.jsxs("button",{type:"button",className:"w-full px-3 py-2 text-left text-sm flex items-center gap-2 rounded-b-lg hover:opacity-80 transition-opacity",style:{color:c.getColor(k.InputText)},onClick:b,children:[(()=>{const x=kF(h);return f.jsx(x,{className:"size-4 flex-shrink-0"})})(),h===Le.Light?"Açık tema":h===Le.Dark?"Koyu tema":"Sistem"]})]});return f.jsxs(f.Fragment,{children:[f.jsx(Ar,{children:t&&f.jsx(Re.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:c.getColor(k.ModalOverlayColor)},children:f.jsxs(Re.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:c.getColor(k.Background),borderRadius:c.getRadius()},children:[f.jsx("div",{className:"text-base font-semibold mb-2",style:{color:c.getColor(k.ChatCloseConfirmText)},children:d(ie.ChatCloseConfirm)}),f.jsx("div",{className:"text-sm mb-4",style:{color:c.getColor(k.FooterText)},children:d(ie.ChatCloseWarning)}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsx("button",{type:"button",className:"px-3 py-1.5 text-sm rounded-lg transition-opacity hover:opacity-90",style:{backgroundColor:c.getColor(k.GreeterBackground),color:c.getColor(k.GreeterText),borderRadius:c.getRadius()},onClick:()=>n(!1),children:d(ie.CancelAction)}),f.jsx("button",{type:"button",className:"px-3 py-1.5 text-sm rounded-lg transition-opacity hover:opacity-90",style:{backgroundColor:c.getColor(k.ErrorBackground),color:c.getColor(k.ErrorText),borderRadius:c.getRadius()},onClick:w,children:d(ie.CloseAction)})]})]})})}),f.jsxs("div",{className:"relative flex-shrink-0",children:[f.jsx("button",{ref:a,type:"button",onClick:()=>i(x=>!x),className:"flex items-center justify-center p-1.5 rounded-md hover:opacity-80 transition-opacity",style:{backgroundColor:"transparent",color:c.getColor(k.HeaderText)},title:d(ie.ChatSettings),"aria-expanded":r,children:f.jsx(Z.Menu,{className:"size-5"})}),f.jsx(Ar,{children:v})]})]})}function CF(e){let t=e.replace(/<hr\b[^>]*>/gi,""),n;do n=t,t=t.replace(/<p\b[^>]*>(?:\s|&nbsp;|&#160;|&#x0*[aA]0;|&#X0*[aA]0;|<br\s*\/?>)*<\/p>/gi,"");while(t!==n);return t}function yx({text:e}){const n=be().getColor(k.LinkColor),i=(s=>{const o=CF(s),a=/(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,l=o.split(/(<[^>]*>)/g);let c="",d=!1;for(let u=0;u<l.length;u++){const p=l[u];if(p.startsWith("<")&&p.endsWith(">"))if(p.match(/^<a\s/i)){if(p.includes("style="))c+=p;else{const h=p.replace(/^(<a\s[^>]*)(>)$/i,`$1 style="color: ${n}; text-decoration: underline;"$2`);c+=h}d=!0}else p.match(/^<\/a>/i)?(c+=p,d=!1):c+=p;else if(!d&&p.trim()){const h=p.replace(a,y=>{const w=y.replace(/[">]+$/,"");return`<a href="${/^https?:\/\//i.test(w)?w:`https://${w}`}" target="_blank" rel="noopener noreferrer" style="color: ${n}; text-decoration: underline;">${w}</a>`});c+=h}else c+=p}return c})(e);return f.jsx("div",{className:"linkified !text-sm w-full min-w-0",dangerouslySetInnerHTML:{__html:i}})}const xx="opacity-0 group-hover/item:opacity-100 transition-opacity duration-200";function PC({files:e,className:t,onDelete:n,hideName:r}){const i=Do(),[s,o]=g.useState(new Map);g.useEffect(()=>{const y=new Map;for(let w=0;w<e.length;w++){const b=e[w];if(b instanceof File){const m=URL.createObjectURL(b);y.set(w,m)}}return o(y),()=>{for(const w of y.values())URL.revokeObjectURL(w)}},[e]);const a=y=>{var b;return((b=(y instanceof File?y.name:y).split(".").pop())==null?void 0:b.toLowerCase())||""},l=y=>y instanceof File?y.name:y.split("/").pop()||y,c=y=>{const[w,b]=y.split(".");return w.length>10?`${w.slice(0,10)}...${b}`:y},d=y=>{const w=["jpg","jpeg","png","gif","bmp","webp","svg"],b=a(y);return w.includes(b)},u=(y,w)=>{if(y instanceof File){const b=s.get(w);b&&window.open(b,"_blank")}else window.open(y,"_blank")},p=(y,w)=>{y.stopPropagation(),n==null||n(w)},h=(y,w)=>y instanceof File?s.get(w)||"":y;return f.jsx("div",{className:Ie("flex gap-2 w-full overflow-x-auto",t),children:e.map((y,w)=>{const b=l(y),m=a(y),v=d(y),x=h(y,w);return f.jsxs("div",{onClick:()=>u(y,w),className:"min-w-20 max-w-20 cursor-pointer group/item border border-gray-200 rounded-lg p-1.5 hover:shadow-md transition-all duration-200 hover:border-gray-300 bg-white relative",children:[n&&f.jsx("button",{onClick:S=>p(S,w),className:Ie("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:f.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:f.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"})})}),v?f.jsx("div",{className:"aspect-square w-fit mb-0.5 overflow-hidden rounded",children:f.jsx("img",{src:x,alt:b,className:"w-16 h-16 min-h-16 min-w-16 object-cover group-hover/item:scale-105 transition-transform duration-200"})}):f.jsx("div",{className:"min-w-16 aspect-square w-full mb-0.5 flex items-center justify-center bg-gray-50 rounded group-hover/item:bg-gray-100 transition-colors duration-200",children:f.jsxs("div",{className:"text-center",children:[f.jsx("div",{className:"w-6 h-6 mx-auto mb-0.5 bg-blue-100 rounded flex items-center justify-center",children:f.jsx("svg",{className:"w-3 h-3 text-blue-600",fill:"currentColor",viewBox:"0 0 20 20",children:f.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"})})}),f.jsx("div",{className:Ie("text-[10px] font-medium text-gray-600 uppercase",{[xx]:r}),children:m||"file"})]})}),f.jsx("div",{className:Ie("max-w-16 text-[10px] text-gray-700 font-medium truncate text-ellipsis overflow-hidden",{[xx]:r}),title:b,children:c(b)})]},w)})})}const _F={hidden:{opacity:0,y:8},visible:{opacity:1,y:0}},TF={hidden:{opacity:0,y:8,scale:.95},visible:{opacity:1,y:0,scale:1}};function EF({buttons:e,className:t=""}){const n=be();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://")?f.jsx(Z.ExternalLink,{className:"size-4"}):s.startsWith("tel:")?f.jsx(Z.Phone,{className:"size-4"}):s.startsWith("mailto:")?f.jsx(Z.Mail,{className:"size-4"}):null;return f.jsx(Re.div,{className:Ie(t,"mt-2"),initial:"hidden",animate:"visible",variants:_F,transition:{duration:.3,ease:"easeOut",staggerChildren:.08},children:f.jsx("div",{className:"rounded-lg ",style:{backgroundColor:`${n.getColor(k.Background)}f0`},children:f.jsx("div",{className:"flex flex-wrap gap-2",children:e.map((s,o)=>f.jsxs(Re.button,{variants:TF,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:[f.jsxs("span",{className:"flex items-center gap-2",children:[i(s.url),f.jsx("span",{className:"font-medium",children:s.label})]}),f.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 wx=e=>e?(typeof e=="string"&&(e=new Date(e)),e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})):"",bx=["Düşünüyorum...","Araştırıyorum...","Cevapları karşılaştırıyorum...","En iyi cevabı hazırlıyorum...","Bilgileri derliyorum...","Kaynakları tarıyorum...","Analiz ediyorum...","Yanıtı oluşturuyorum..."];function MC({messages:e,isTyping:t,chat:n,streamingContent:r}){var S,C,_,j;const i=g.useRef(null),s=g.useRef(null),[o,a]=g.useState(!0),l=g.useRef(!0),{widget:c,showActionButtons:d}=ne(),u=be(),p=g.useRef(!0),h=g.useRef(new Set),[y,w]=g.useState(0);g.useEffect(()=>{e.length>0&&p.current&&requestAnimationFrame(()=>{p.current=!1})},[e]),g.useEffect(()=>{e.length===0&&h.current.clear()},[e.length]),g.useEffect(()=>{if(!t||r===void 0||r)return;const A=setInterval(()=>{w(E=>(E+1)%bx.length)},2500);return()=>clearInterval(A)},[t,r]);const b=()=>{const A=s.current;A&&(A.scrollTop=A.scrollHeight)},m=()=>{if(s.current){const{scrollTop:A,scrollHeight:E,clientHeight:D}=s.current,L=E-A<=D+10;l.current=L,a(L)}};g.useEffect(()=>{(l.current||t)&&b()},[e,t,r]);const v=(A,E)=>{if(p.current)return{initial:!1,animate:{}};const D=A.id||"";return h.current.has(D)?E===ve.Customer?{initial:!1,animate:{opacity:1,x:0}}:{initial:!1,animate:{}}:(h.current.add(D),E===ve.Customer?{initial:{opacity:0,x:30},animate:{opacity:1,x:0}}:{initial:!1,animate:{}})},x=A=>A===ve.Customer?"18px 18px 4px 18px":A===ve.User||A===ve.Agent?"18px 18px 18px 4px":u.getRadius();return f.jsxs("section",{onScroll:m,ref:s,className:"flex flex-col gap-3 w-full grow pt-4 px-4 overflow-y-auto overflow-x-hidden scrollbar",children:[((C=(S=c==null?void 0:c.appearance)==null?void 0:S.design)==null?void 0:C.greeting_message)&&f.jsx("div",{className:"flex w-full items-center justify-start",children:f.jsx("div",{className:"max-w-[80%] whitespace-pre-wrap border-0 px-3 py-2 !text-sm",style:{backgroundColor:u.getColor(k.MessageAdminBackground),color:u.getColor(k.MessageAdminText),borderRadius:"18px 18px 18px 4px"},children:(j=(_=c==null?void 0:c.appearance)==null?void 0:_.design)==null?void 0:j.greeting_message})}),f.jsx(Ar,{children:Array.isArray(e)&&e.filter(E=>{var D;return E!=null&&(!!E.content||(((D=E.files)==null?void 0:D.length)??0)>0)&&E.content!==`
97
+ `}).map((E,D)=>{var O;const L=v(E,E.sender_type);return f.jsxs(Re.div,{initial:L.initial,animate:L.animate,transition:{duration:.25,ease:"easeOut"},className:Ie("flex flex-col w-full min-w-0 justify-center break-words",{"items-end":E.sender_type===ve.Customer||E.activity_type===gn.ChatCreated,"items-start":E.sender_type===ve.User||E.sender_type===ve.Agent,"items-center":E.sender_type===ve.System||E.sender_type===ve.Activity}),children:[E.sender_type===ve.System&&f.jsx("div",{className:"max-w-full whitespace-pre-wrap break-words overflow-hidden px-3 py-1.5 text-sm",style:{backgroundColor:u.getColor(k.MessageAdminBackground),color:u.getColor(k.MessageAdminText),borderRadius:u.getRadius()},children:E.content}),([ve.Customer,ve.User,ve.Agent].includes(E.sender_type)||E.activity_type===gn.ChatCreated)&&f.jsxs("div",{className:Ie("max-w-[80%] border-0 px-3 py-2",{"whitespace-pre-wrap !text-sm":E.sender_type===ve.Customer||E.activity_type===gn.ChatCreated||E.sender_type===ve.Agent&&!((O=E.content)!=null&&O.includes('id="chaty"'))}),style:{backgroundColor:E.sender_type===ve.User||E.sender_type===ve.Agent?u.getColor(k.MessageAdminBackground):u.getColor(k.MessageVisitorBackground),color:E.sender_type===ve.User||E.sender_type===ve.Agent?u.getColor(k.MessageAdminText):u.getColor(k.MessageVisitorText),borderRadius:x(E.sender_type)},children:[E.files&&E.files.length>0&&f.jsx(PC,{files:E.files,className:"mb-1",hideName:!0}),E.sender_type===ve.User||E.sender_type===ve.Agent?f.jsx(yx,{text:E.content}):E.content,E.created_at&&f.jsx("div",{className:"text-[0.5rem] text-right opacity-70 mt-1",style:{color:E.sender_type===ve.User||E.sender_type===ve.Agent?u.getColor(k.MessageAdminText):u.getColor(k.MessageVisitorText)},children:wx(E.created_at)})]}),([ve.Customer,ve.User,ve.Agent].includes(E.sender_type)||E.activity_type===gn.ChatCreated)&&E.buttons&&E.buttons.length>0&&f.jsx("div",{className:Ie("w-full",{"flex justify-end":E.sender_type===ve.Customer||E.activity_type===gn.ChatCreated,"flex justify-start":E.sender_type===ve.User||E.sender_type===ve.Agent}),children:f.jsx("div",{className:"max-w-[80%]",children:f.jsx(EF,{buttons:E.buttons})})}),E.sender_type===ve.Activity&&E.activity_type!==gn.ChatCreated&&f.jsx("div",{className:"max-w-full border-0 rounded-full px-3 py-1 text-xs shadow-none break-words overflow-hidden",style:{backgroundColor:u.getColor(k.MessageAdminBackground),color:u.getColor(k.MessageAdminText)},children:E.activity_type===gn.AdminLeave?`${E.content.split("_")[2]} odadan ayrıldı`:E.activity_type===gn.AdminJoin?`${E.content.split("_")[2]} odaya katıldı`:E.activity_type===gn.AdminToggleUpload?E.content.includes("is_customer_uploadable:true")?"Dosya gönderim izni açıldı":"Dosya gönderim izni kapatıldı":E.content}),ve.System===E.sender_type&&f.jsx("div",{className:"text-xs",style:{color:u.getColor(k.MessageAdminText)},children:E.created_at&&wx(E.created_at)})]},E.id||D)})}),t&&f.jsx(Re.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.2},className:"flex w-full items-center justify-start mt-1",children:r!==void 0?f.jsx("div",{className:"max-w-[80%] border-0 px-3 py-2 whitespace-pre-wrap min-w-[4rem] !text-sm",style:{backgroundColor:u.getColor(k.MessageAdminBackground),color:u.getColor(k.MessageAdminText),borderRadius:"18px 18px 18px 4px"},children:r?f.jsx(yx,{text:r}):f.jsxs("div",{className:"flex items-center gap-2 py-1",children:[f.jsx(Z.Sparkles,{className:"size-4 flex-shrink-0 sparkle-pulse",style:{color:u.getColor(k.MessageAdminText)}}),f.jsx(Ar,{mode:"wait",children:f.jsx(Re.span,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:-8},transition:{duration:.2},className:"!text-sm",style:{color:u.getColor(k.MessageAdminText)},children:bx[y]},y)})]})}):f.jsx("div",{className:"flex items-center rounded-full px-4 py-2",style:{backgroundColor:u.getColor(k.MessageAdminBackground)},children:f.jsxs("div",{className:"flex space-x-1",children:[f.jsx("div",{className:"size-1.5 rounded-full dot-wave",style:{backgroundColor:u.getColor(k.MessageAdminText),animationDelay:"0ms"}}),f.jsx("div",{className:"size-1.5 rounded-full dot-wave",style:{backgroundColor:u.getColor(k.MessageAdminText),animationDelay:"150ms"}}),f.jsx("div",{className:"size-1.5 rounded-full dot-wave",style:{backgroundColor:u.getColor(k.MessageAdminText),animationDelay:"300ms"}})]})})}),!o&&f.jsx("div",{className:"absolute right-4 z-10 transition-all duration-200",style:{bottom:d?"8rem":"7rem"},children:f.jsx(Rt,{type:"button",variant:"primary",kind:"solid",rounded:!0,className:"size-10 flex items-center justify-center p-0! shadow-md",onClick:()=>{var A,E;(E=s.current)==null||E.scrollTo({top:(A=s.current)==null?void 0:A.scrollHeight,behavior:"smooth"})},children:f.jsx(Z.ArrowDown,{className:"size-4"})})}),f.jsx("div",{ref:i})]})}/**
98
98
  * @license lucide-react v0.511.0 - ISC
99
99
  *
100
100
  * This source code is licensed under the ISC license.
101
101
  * See the LICENSE file in the root directory of this source tree.
102
- */const dF=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),fF=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),px=e=>{const t=fF(e);return t.charAt(0).toUpperCase()+t.slice(1)},kC=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),pF=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
102
+ */const AF=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jF=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),kx=e=>{const t=jF(e);return t.charAt(0).toUpperCase()+t.slice(1)},NC=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),RF=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
103
103
  * @license lucide-react v0.511.0 - ISC
104
104
  *
105
105
  * This source code is licensed under the ISC license.
106
106
  * See the LICENSE file in the root directory of this source tree.
107
- */var hF={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
107
+ */var PF={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
108
108
  * @license lucide-react v0.511.0 - ISC
109
109
  *
110
110
  * This source code is licensed under the ISC license.
111
111
  * See the LICENSE file in the root directory of this source tree.
112
- */const mF=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,...hF,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:kC("lucide",i),...!s&&!pF(a)&&{"aria-hidden":"true"},...a},[...o.map(([c,d])=>v.createElement(c,d)),...Array.isArray(s)?s:[s]]));/**
112
+ */const MF=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},l)=>g.createElement("svg",{ref:l,...PF,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:NC("lucide",i),...!s&&!RF(a)&&{"aria-hidden":"true"},...a},[...o.map(([c,d])=>g.createElement(c,d)),...Array.isArray(s)?s:[s]]));/**
113
113
  * @license lucide-react v0.511.0 - ISC
114
114
  *
115
115
  * This source code is licensed under the ISC license.
116
116
  * See the LICENSE file in the root directory of this source tree.
117
- */const SC=(e,t)=>{const n=v.forwardRef(({className:r,...i},s)=>v.createElement(mF,{ref:s,iconNode:t,className:kC(`lucide-${dF(px(e))}`,`lucide-${e}`,r),...i}));return n.displayName=px(e),n};/**
117
+ */const OC=(e,t)=>{const n=g.forwardRef(({className:r,...i},s)=>g.createElement(MF,{ref:s,iconNode:t,className:NC(`lucide-${AF(kx(e))}`,`lucide-${e}`,r),...i}));return n.displayName=kx(e),n};/**
118
118
  * @license lucide-react v0.511.0 - ISC
119
119
  *
120
120
  * This source code is licensed under the ISC license.
121
121
  * See the LICENSE file in the root directory of this source tree.
122
- */const gF=[["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"}]],vF=SC("cloud-upload",gF);/**
122
+ */const NF=[["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"}]],OF=OC("cloud-upload",NF);/**
123
123
  * @license lucide-react v0.511.0 - ISC
124
124
  *
125
125
  * This source code is licensed under the ISC license.
126
126
  * See the LICENSE file in the root directory of this source tree.
127
- */const yF=[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]],xF=SC("paperclip",yF);var CC={exports:{}},wF="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",bF=wF,kF=bF;function _C(){}function TC(){}TC.resetWarningCache=_C;var SF=function(){function e(r,i,s,o,a,l){if(l!==kF){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:TC,resetWarningCache:_C};return n.PropTypes=n,n};CC.exports=SF();var CF=CC.exports;const Ne=Rr(CF);function vs(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 _F=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 wo(e,t,n){const r=TF(e),{webkitRelativePath:i}=e,s=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof r.path!="string"&&hx(r,"path",s),hx(r,"relativePath",s),r}function TF(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),i=_F.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function hx(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const EF=[".DS_Store","Thumbs.db"];function AF(e){return vs(this,void 0,void 0,function*(){return eu(e)&&jF(e.dataTransfer)?OF(e.dataTransfer,e.type):RF(e)?PF(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?MF(e):[]})}function jF(e){return eu(e)}function RF(e){return eu(e)&&eu(e.target)}function eu(e){return typeof e=="object"&&e!==null}function PF(e){return nh(e.target.files).map(t=>wo(t))}function MF(e){return vs(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>wo(n))})}function OF(e,t){return vs(this,void 0,void 0,function*(){if(e.items){const n=nh(e.items).filter(i=>i.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(NF));return mx(EC(r))}return mx(nh(e.files).map(n=>wo(n)))})}function mx(e){return e.filter(t=>EF.indexOf(t.name)===-1)}function nh(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 NF(e){if(typeof e.webkitGetAsEntry!="function")return gx(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?AC(t):gx(e,t)}function EC(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?EC(n):[n]],[])}function gx(e,t){return vs(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,wo(o)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return wo(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function DF(e){return vs(this,void 0,void 0,function*(){return e.isDirectory?AC(e):IF(e)})}function AC(e){const t=e.createReader();return new Promise((n,r)=>{const i=[];function s(){t.readEntries(o=>vs(this,void 0,void 0,function*(){if(o.length){const a=Promise.all(o.map(DF));i.push(a),s()}else try{const a=yield Promise.all(i);n(a)}catch(a){r(a)}}),o=>{r(o)})}s()})}function IF(e){return vs(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const i=wo(r,e.fullPath);t(i)},r=>{n(r)})})})}var sf=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 vx(e){return BF(e)||FF(e)||RC(e)||LF()}function LF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
128
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function BF(e){if(Array.isArray(e))return rh(e)}function yx(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 xx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yx(Object(n),!0).forEach(function(r){jC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ya(e,t){return VF(e)||zF(e,t)||RC(e,t)||$F()}function $F(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
129
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RC(e,t){if(e){if(typeof e=="string")return rh(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 rh(e,t)}}function rh(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 zF(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 VF(e){if(Array.isArray(e))return e}var UF=typeof sf=="function"?sf:sf.default,HF="file-invalid-type",WF="file-too-large",qF="file-too-small",GF="too-many-files",YF=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:HF,message:"File type must be ".concat(r)}},wx=function(t){return{code:WF,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},bx=function(t){return{code:qF,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},QF={code:GF,message:"Too many files"};function PC(e,t){var n=e.type==="application/x-moz-file"||UF(e,t);return[n,n?null:YF(t)]}function MC(e,t,n){if(Ri(e.size))if(Ri(t)&&Ri(n)){if(e.size>n)return[!1,wx(n)];if(e.size<t)return[!1,bx(t)]}else{if(Ri(t)&&e.size<t)return[!1,bx(t)];if(Ri(n)&&e.size>n)return[!1,wx(n)]}return[!0,null]}function Ri(e){return e!=null}function KF(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=PC(l,n),d=Ya(c,1),u=d[0],p=MC(l,r,i),h=Ya(p,1),y=h[0],x=a?a(l):null;return u&&y&&!x})}function tu(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Hl(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 kx(e){e.preventDefault()}function XF(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function ZF(e){return e.indexOf("Edge/")!==-1}function JF(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return XF(e)||ZF(e)}function Gn(){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!tu(r)&&a&&a.apply(void 0,[r].concat(s)),tu(r)})}}function eB(){return"showOpenFilePicker"in window}function tB(e){if(Ri(e)){var t=Object.entries(e).filter(function(n){var r=Ya(n,2),i=r[0],s=r[1],o=!0;return OC(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(NC))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(n,r){var i=Ya(r,2),s=i[0],o=i[1];return xx(xx({},n),{},jC({},s,o))},{});return[{description:"Files",accept:t}]}return e}function nB(e){if(Ri(e))return Object.entries(e).reduce(function(t,n){var r=Ya(n,2),i=r[0],s=r[1];return[].concat(vx(t),[i],vx(s))},[]).filter(function(t){return OC(t)||NC(t)}).join(",")}function rB(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function iB(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function OC(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function NC(e){return/^.*\.[\w]+$/.test(e)}var sB=["children"],oB=["open"],aB=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],lB=["refKey","onChange","onClick"];function cB(e){return fB(e)||dB(e)||DC(e)||uB()}function uB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
130
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function fB(e){if(Array.isArray(e))return ih(e)}function of(e,t){return mB(e)||hB(e,t)||DC(e,t)||pB()}function pB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
131
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DC(e,t){if(e){if(typeof e=="string")return ih(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 ih(e,t)}}function ih(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 hB(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 mB(e){if(Array.isArray(e))return e}function Sx(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 Ge(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Sx(Object(n),!0).forEach(function(r){sh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nu(e,t){if(e==null)return{};var n=gB(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 gB(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 dl=v.forwardRef(function(e,t){var n=e.children,r=nu(e,sB),i=vB(r),s=i.open,o=nu(i,oB);return v.useImperativeHandle(t,function(){return{open:s}},[s]),J.createElement(v.Fragment,null,n(Ge(Ge({},o),{},{open:s})))});dl.displayName="Dropzone";var IC={disabled:!1,getFilesFromEvent:AF,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};dl.defaultProps=IC;dl.propTypes={children:Ne.func,accept:Ne.objectOf(Ne.arrayOf(Ne.string)),multiple:Ne.bool,preventDropOnDocument:Ne.bool,noClick:Ne.bool,noKeyboard:Ne.bool,noDrag:Ne.bool,noDragEventsBubbling:Ne.bool,minSize:Ne.number,maxSize:Ne.number,maxFiles:Ne.number,disabled:Ne.bool,getFilesFromEvent:Ne.func,onFileDialogCancel:Ne.func,onFileDialogOpen:Ne.func,useFsAccessApi:Ne.bool,autoFocus:Ne.bool,onDragEnter:Ne.func,onDragLeave:Ne.func,onDragOver:Ne.func,onDrop:Ne.func,onDropAccepted:Ne.func,onDropRejected:Ne.func,onError:Ne.func,validator:Ne.func};var oh={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function vB(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Ge(Ge({},IC),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,p=t.onDrop,h=t.onDropAccepted,y=t.onDropRejected,x=t.onFileDialogCancel,w=t.onFileDialogOpen,m=t.useFsAccessApi,g=t.autoFocus,b=t.preventDropOnDocument,C=t.noClick,S=t.noKeyboard,_=t.noDrag,j=t.noDragEventsBubbling,A=t.onError,E=t.validator,L=v.useMemo(function(){return nB(n)},[n]),F=v.useMemo(function(){return tB(n)},[n]),D=v.useMemo(function(){return typeof w=="function"?w:Cx},[w]),G=v.useMemo(function(){return typeof x=="function"?x:Cx},[x]),z=v.useRef(null),$=v.useRef(null),N=v.useReducer(yB,oh),M=of(N,2),P=M[0],B=M[1],U=P.isFocused,W=P.isFileDialogActive,q=v.useRef(typeof window<"u"&&window.isSecureContext&&m&&eB()),se=function(){!q.current&&W&&setTimeout(function(){if($.current){var H=$.current.files;H.length||(B({type:"closeDialog"}),G())}},300)};v.useEffect(function(){return window.addEventListener("focus",se,!1),function(){window.removeEventListener("focus",se,!1)}},[$,W,G,q]);var ie=v.useRef([]),pe=function(H){z.current&&z.current.contains(H.target)||(H.preventDefault(),ie.current=[])};v.useEffect(function(){return b&&(document.addEventListener("dragover",kx,!1),document.addEventListener("drop",pe,!1)),function(){b&&(document.removeEventListener("dragover",kx),document.removeEventListener("drop",pe))}},[z,b]),v.useEffect(function(){return!r&&g&&z.current&&z.current.focus(),function(){}},[z,g,r]);var ce=v.useCallback(function(I){A?A(I):console.error(I)},[A]),_e=v.useCallback(function(I){I.preventDefault(),I.persist(),Bt(I),ie.current=[].concat(cB(ie.current),[I.target]),Hl(I)&&Promise.resolve(i(I)).then(function(H){if(!(tu(I)&&!j)){var te=H.length,de=te>0&&KF({files:H,accept:L,minSize:o,maxSize:s,multiple:a,maxFiles:l,validator:E}),xe=te>0&&!de;B({isDragAccept:de,isDragReject:xe,isDragActive:!0,type:"setDraggedFiles"}),c&&c(I)}}).catch(function(H){return ce(H)})},[i,c,ce,j,L,o,s,a,l,E]),Re=v.useCallback(function(I){I.preventDefault(),I.persist(),Bt(I);var H=Hl(I);if(H&&I.dataTransfer)try{I.dataTransfer.dropEffect="copy"}catch{}return H&&u&&u(I),!1},[u,j]),Y=v.useCallback(function(I){I.preventDefault(),I.persist(),Bt(I);var H=ie.current.filter(function(de){return z.current&&z.current.contains(de)}),te=H.indexOf(I.target);te!==-1&&H.splice(te,1),ie.current=H,!(H.length>0)&&(B({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Hl(I)&&d&&d(I))},[z,d,j]),V=v.useCallback(function(I,H){var te=[],de=[];I.forEach(function(xe){var Ue=PC(xe,L),lt=of(Ue,2),Un=lt[0],dn=lt[1],ys=MC(xe,o,s),fr=of(ys,2),Nr=fr[0],xs=fr[1],Mo=E?E(xe):null;if(Un&&Nr&&!Mo)te.push(xe);else{var ki=[dn,xs];Mo&&(ki=ki.concat(Mo)),de.push({file:xe,errors:ki.filter(function(Hn){return Hn})})}}),(!a&&te.length>1||a&&l>=1&&te.length>l)&&(te.forEach(function(xe){de.push({file:xe,errors:[QF]})}),te.splice(0)),B({acceptedFiles:te,fileRejections:de,isDragReject:de.length>0,type:"setFiles"}),p&&p(te,de,H),de.length>0&&y&&y(de,H),te.length>0&&h&&h(te,H)},[B,a,L,o,s,l,p,h,y,E]),Z=v.useCallback(function(I){I.preventDefault(),I.persist(),Bt(I),ie.current=[],Hl(I)&&Promise.resolve(i(I)).then(function(H){tu(I)&&!j||V(H,I)}).catch(function(H){return ce(H)}),B({type:"reset"})},[i,V,ce,j]),ue=v.useCallback(function(){if(q.current){B({type:"openDialog"}),D();var I={multiple:a,types:F};window.showOpenFilePicker(I).then(function(H){return i(H)}).then(function(H){V(H,null),B({type:"closeDialog"})}).catch(function(H){rB(H)?(G(H),B({type:"closeDialog"})):iB(H)?(q.current=!1,$.current?($.current.value=null,$.current.click()):ce(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."))):ce(H)});return}$.current&&(B({type:"openDialog"}),D(),$.current.value=null,$.current.click())},[B,D,G,m,V,ce,F,a]),O=v.useCallback(function(I){!z.current||!z.current.isEqualNode(I.target)||(I.key===" "||I.key==="Enter"||I.keyCode===32||I.keyCode===13)&&(I.preventDefault(),ue())},[z,ue]),ae=v.useCallback(function(){B({type:"focus"})},[]),ee=v.useCallback(function(){B({type:"blur"})},[]),ke=v.useCallback(function(){C||(JF()?setTimeout(ue,0):ue())},[C,ue]),he=function(H){return r?null:H},Ze=function(H){return S?null:he(H)},qe=function(H){return _?null:he(H)},Bt=function(H){j&&H.stopPropagation()},fe=v.useMemo(function(){return function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},H=I.refKey,te=H===void 0?"ref":H,de=I.role,xe=I.onKeyDown,Ue=I.onFocus,lt=I.onBlur,Un=I.onClick,dn=I.onDragEnter,ys=I.onDragOver,fr=I.onDragLeave,Nr=I.onDrop,xs=nu(I,aB);return Ge(Ge(sh({onKeyDown:Ze(Gn(xe,O)),onFocus:Ze(Gn(Ue,ae)),onBlur:Ze(Gn(lt,ee)),onClick:he(Gn(Un,ke)),onDragEnter:qe(Gn(dn,_e)),onDragOver:qe(Gn(ys,Re)),onDragLeave:qe(Gn(fr,Y)),onDrop:qe(Gn(Nr,Z)),role:typeof de=="string"&&de!==""?de:"presentation"},te,z),!r&&!S?{tabIndex:0}:{}),xs)}},[z,O,ae,ee,ke,_e,Re,Y,Z,S,_,r]),R=v.useCallback(function(I){I.stopPropagation()},[]),K=v.useMemo(function(){return function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},H=I.refKey,te=H===void 0?"ref":H,de=I.onChange,xe=I.onClick,Ue=nu(I,lB),lt=sh({accept:L,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:he(Gn(de,Z)),onClick:he(Gn(xe,R)),tabIndex:-1},te,$);return Ge(Ge({},lt),Ue)}},[$,n,a,Z,r]);return Ge(Ge({},P),{},{isFocused:U&&!r,getRootProps:fe,getInputProps:K,rootRef:z,inputRef:$,open:he(ue)})}function yB(e,t){switch(t.type){case"focus":return Ge(Ge({},e),{},{isFocused:!0});case"blur":return Ge(Ge({},e),{},{isFocused:!1});case"openDialog":return Ge(Ge({},oh),{},{isFileDialogActive:!0});case"closeDialog":return Ge(Ge({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Ge(Ge({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Ge(Ge({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return Ge({},oh);default:return e}}function Cx(){}const LC=5*1024*1024,bo={"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"]},_x=Object.values(bo).flat();function xB(e){var r;if(e.size>LC)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(bo).includes(e.type)||_x.includes(t)?{isValid:!0,error:""}:{isValid:!1,error:`Desteklenmeyen dosya tipi. Kabul edilen tipler: ${_x.join(", ")}`}}function ru(e){for(const t of e){const n=xB(t);if(!n.isValid)return n}return{isValid:!0,error:""}}function FC({onDrop:e}){const t=n=>{const r=ru(n);if(!r.isValid){alert(r.error);return}e(n)};return f.jsx("div",{className:"flex items-center justify-center border rounded-md cursor-pointer bg-slate-100 dropzone border-slate-200 dz-clickable",children:f.jsx(dl,{onDrop:t,accept:Object.keys(bo).reduce((n,r)=>(n[r]=bo[r],n),{}),maxSize:LC,children:({getRootProps:n,getInputProps:r})=>f.jsxs("div",{className:"w-full py-5 text-lg text-center dz-message needsclick",...n(),children:[f.jsx("input",{...r()}),f.jsx("div",{className:"mb-3",children:f.jsx(vF,{className:"block size-12 mx-auto text-slate-500 fill-slate-200"})}),f.jsxs("h5",{className:"mb-0 font-normal text-slate-500 text-15",children:["Yüklemek istediğiniz görseli buraya sürükleyin veya"," ",f.jsx("span",{className:"text-custom-500",children:"seçmek için tıklayın"})]})]})})})}FC.Button=({onDrop:e})=>{const t=Se(),n=r=>{const i=ru(r);if(!i.isValid){en({description:i.error,variant:"error"});return}e(r)};return f.jsx(dl,{onDrop:n,accept:Object.keys(bo).reduce((r,i)=>(r[i]=bo[i],r),{}),children:({getRootProps:r,getInputProps:i})=>f.jsxs("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center text-center dz-message needsclick cursor-pointer",...r(),children:[f.jsx("input",{...i()}),f.jsx(xF,{style:{color:t.getColor(k.IconColor)},className:"size-5"})]})})};const Tx=[{name:"Yüzler",icon:"😊",emojis:["😀","😃","😄","😁","😆","😅","🤣","😂","🙂","😊","😇","🥰","😍","🤩","😘","😗","😚","😙","🥲","😋","😛","😜","🤪","😝","🤑","🤗","🤭","🤫","🤔","🫡","🤐","🤨","😐","😑","😶","🫥","😏","😒","🙄","😬","😮‍💨","🤥","😌","😔","😪","🤤","😴","😷","🤒","🤕","🤢","🤮","🥴","😵","🤯","🥳","🥸","😎","🤓","🧐","😕","🫤","😟","🙁","😮","😯","😲","😳","🥺","🥹","😦","😧","😨","😰","😥","😢","😭","😱","😖","😣","😞","😓","😩","😫","🥱","😤","😡","😠"]},{name:"El",icon:"👋",emojis:["👋","🤚","🖐️","✋","🖖","🫱","🫲","🫳","🫴","👌","🤌","🤏","✌️","🤞","🫰","🤟","🤘","🤙","👈","👉","👆","🖕","👇","☝️","🫵","👍","👎","✊","👊","🤛","🤜","👏","🙌","🫶","👐","🤲","🤝","🙏","💪","🦾"]},{name:"Kalp",icon:"❤️",emojis:["❤️","🧡","💛","💚","💙","💜","🖤","🤍","🤎","💔","❤️‍🔥","❤️‍🩹","❣️","💕","💞","💓","💗","💖","💘","💝","💟","♥️","💋","🫂"]},{name:"Hayvan",icon:"🐱",emojis:["🐶","🐱","🐭","🐹","🐰","🦊","🐻","🐼","🐻‍❄️","🐨","🐯","🦁","🐮","🐷","🐸","🐵","🐔","🐧","🐦","🐤","🦆","🦅","🦉","🦇","🐺","🐗","🐴","🦄","🐝","🪱","🐛","🦋","🐌","🐞","🐜","🪰","🐢","🐍","🦎","🐙"]},{name:"Yiyecek",icon:"🍕",emojis:["🍎","🍐","🍊","🍋","🍌","🍉","🍇","🍓","🫐","🍈","🍒","🍑","🥭","🍍","🥥","🥝","🍅","🍆","🥑","🫛","🥦","🥬","🌶️","🫑","🍕","🍔","🍟","🌭","🍿","🧀","🥚","🍳","🥞","🧇","🥓","🍖","🍗","🌮","🌯","🥗","☕","🍵","🧃","🥤","🍺","🍷","🥂","🍰"]},{name:"Aktivite",icon:"⚽",emojis:["⚽","🏀","🏈","⚾","🥎","🎾","🏐","🏉","🥏","🎱","🏓","🏸","🥅","⛳","🎯","🏹","🎣","🤿","🥊","🥋","🎿","⛷️","🏂","🪂","🏋️","🤸","🎮","🕹️","🎲","🧩","🎭","🎨","🎬","🎤","🎧","🎼","🎹","🥁","🎷","🎺"]},{name:"Nesne",icon:"💡",emojis:["⌚","📱","💻","⌨️","🖥️","🖨️","🖱️","💾","💿","📷","📹","🎥","📞","📟","📠","📺","🔋","🔌","💡","🔦","🕯️","🧯","💰","💳","💎","🔧","🔨","🪛","🔩","⚙️","🔑","🗝️","📦","📫","📝","✏️","🖊️","📎","📌","✂️"]}];function BC({onSelect:e,isOpen:t,onClose:n}){const r=Se(),[i,s]=v.useState(0),o=v.useRef(null),a=v.useRef(null);return v.useEffect(()=>{if(!t)return;const l=c=>{o.current&&!o.current.contains(c.target)&&n()};return document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[t,n]),v.useEffect(()=>{a.current&&(a.current.scrollTop=0)},[i]),f.jsx(Ar,{children:t&&f.jsxs(Me.div,{ref:o,onMouseDown:l=>l.stopPropagation(),initial:{opacity:0,y:8,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:8,scale:.95},transition:{duration:.15},className:"absolute bottom-full left-0 mb-2 z-50 overflow-hidden",style:{width:"280px",backgroundColor:r.getColor(k.Background),border:`1px solid ${r.getColor(k.Border)}`,borderRadius:r.getRadius(),boxShadow:`0 4px 20px ${r.getColor(k.ShadowColor)}`},children:[f.jsx("div",{className:"flex items-center gap-0.5 px-1.5 py-1.5 overflow-x-auto",style:{borderBottom:`1px solid ${r.getColor(k.DividerColor)}`},children:Tx.map((l,c)=>f.jsx("button",{type:"button",onClick:()=>s(c),className:"flex-shrink-0 w-8 h-8 flex items-center justify-center rounded-md text-base transition-colors",style:{backgroundColor:c===i?r.getColor(k.InputBackground):"transparent"},title:l.name,children:l.icon},l.name))}),f.jsx("div",{ref:a,className:"grid grid-cols-8 gap-0.5 p-1.5 overflow-y-auto",style:{maxHeight:"200px"},children:Tx[i].emojis.map((l,c)=>f.jsx("button",{type:"button",onClick:()=>{e(l),n()},className:"w-8 h-8 flex items-center justify-center rounded-md text-lg hover:scale-110 transition-transform",style:{backgroundColor:"transparent"},onMouseEnter:d=>{d.currentTarget.style.backgroundColor=r.getColor(k.InputBackground)},onMouseLeave:d=>{d.currentTarget.style.backgroundColor="transparent"},children:l},`${l}-${c}`))})]})})}const Ex=2;function wB({onNewMessage:e,client_id:t,is_uploadable:n,messages:r,onEvaluateChat:i,onNewChat:s,onSendMessage:o,isHistoryMode:a=!1,historyChat:l}){const c=v.useRef(null),d=dr(),u=cM(t),p=Se(),h=cs(),{setIsInputFocused:y,showActionButtons:x,setShowActionButtons:w}=re(),[m,g]=v.useState(""),[b,C]=v.useState("3rem"),[S,_]=v.useState(!1),[j,A]=v.useState([]),[E,L]=v.useState(0),[F,D]=v.useState(!1),[G,z]=v.useState(0),[$,N]=v.useState(null),[M,P]=v.useState(!1),B=()=>{if(!a||!l||l.status!==tn.Closed||!l.closed_at)return!1;const Y=new Date(l.closed_at);return(new Date().getTime()-Y.getTime())/(1e3*60*60)>2},U=a&&(l==null?void 0:l.status)===tn.Closed&&B();v.useEffect(()=>{if(r.length>0){const Y=r[r.length-1];Y.id!==$&&(N(Y.id),Y.sender_type===ye.User&&(L(0),D(!1)))}},[r,$]),v.useEffect(()=>{let Y;return F&&G>0&&(Y=window.setTimeout(()=>{z(V=>V<=1?(D(!1),L(0),0):V-1)},1e3)),()=>clearTimeout(Y)},[F,G]),v.useEffect(()=>{const Y=c.current;if(Y){const V=()=>y(!0),Z=()=>y(!1);return Y.addEventListener("focus",V),Y.addEventListener("blur",Z),()=>{Y.removeEventListener("focus",V),Y.removeEventListener("blur",Z)}}},[y]),v.useEffect(()=>{const Y=()=>{w(!0)},V=()=>{w(!1)};return d==null||d.on(ve.ChatUserShowButton,Y),d==null||d.on(ve.MessageUserCreate,V),()=>{d==null||d.off(ve.ChatUserShowButton,Y),d==null||d.off(ve.MessageUserCreate,V)}},[d,w]),v.useEffect(()=>{r.length>0&&r[r.length-1].activity_type==="admin_join"&&w(!1)},[r,w]),Jc("lc:rate-limit",Y=>{const V=Y.detail&&Y.detail.seconds||3;D(!0),z(V),L(0)}),Jc("paste",Y=>{const V=Y.clipboardData.items,Z=[];for(const ue of V){const O=ue.getAsFile();O&&Z.push(O)}if(Z.length>0&&!n){en({description:h(ne.FileUploadDisabled),variant:"error"});return}if(Z.length>0){const ue=ru(Z);if(!ue.isValid){en({description:ue.error,variant:"error"});return}A([...j,...Z])}});const W=async()=>{const Y=m.trim(),V=!!n&&j.length>0,Z=Y.length>0&&Y.length<Ex;if(!Y&&!V||Z)return;if(E>5&&!F){D(!0),z(3);return}if(F||S)return;const ue=m,O=[...j];g(""),A([]),c.current&&(c.current.style.height="3rem",C("3rem")),_(!0);let ae;if(n&&O.length>0){const[ee,ke]=await u.mutateAsync(O);if(!zn(ke)){zA(ee,ke),_(!1),g(ue),A(O);return}uM(ee)&&(ae=ee.file_urls)}if(o){o(ue,ae),_(!1);return}d==null||d.emit(He.MessageCreate,{content:ue,files:ae},ee=>{e(ee),_(!1),L(ke=>ke+1),w(!1)})},se=(m.trim().length>=Ex||j.length>0)&&!S&&!F,ie=Y=>{d==null||d.emit(He.MessageTyping,{content:Y})},pe=()=>{d==null||d.emit(He.ChatClose,{}),w(!1),i==null||i()},ce=()=>{d==null||d.emit(He.ChatClose,{}),w(!1),s==null||s()},_e=v.useCallback(Y=>{const V=c.current;if(V){const Z=V.selectionStart,ue=V.selectionEnd,O=m.substring(0,Z)+Y+m.substring(ue);O.length<=2e3&&(g(O),ie(O),setTimeout(()=>{V.selectionStart=V.selectionEnd=Z+Y.length,V.focus()},0))}else{const Z=m+Y;Z.length<=2e3&&(g(Z),ie(Z))}},[m]),Re=a&&(l==null?void 0:l.status)===tn.Closed;return U?null:f.jsxs(f.Fragment,{children:[Re&&f.jsxs("div",{className:"px-5 flex flex-col gap-2",children:[f.jsxs("div",{className:"p-3 rounded-lg flex items-center gap-2",style:{backgroundColor:p.getColor(k.InputBackground),borderColor:p.getColor(k.InputBorder),borderWidth:"1px",borderStyle:"solid",borderRadius:p.getRadius()},children:[f.jsx(X.Lock,{className:"w-5 h-5 flex-shrink-0",style:{color:p.getColor(k.FooterText)}}),f.jsx("span",{className:"text-sm",style:{color:p.getColor(k.FooterText)},children:"Bu sohbet kapatılmıştır."})]}),f.jsxs(Rt,{size:"lg",onClick:()=>{s==null||s()},className:"rounded-lg gap-2 transition-all",children:[f.jsx(X.Plus,{className:"size-4"}),f.jsx("span",{children:"Yeni Sohbet Başlat"})]}),f.jsx(xo,{variant:"block"})]}),F&&f.jsxs(Me.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:p.getColor(k.ErrorBackground),borderColor:p.getColor(k.ErrorBorder),borderWidth:"1px",borderStyle:"solid",borderRadius:p.getRadius()},children:[f.jsx(X.XCircle,{className:"size-4 mr-2",style:{color:p.getColor(k.ErrorText)}}),f.jsx("span",{className:"text-sm font-medium",style:{color:p.getColor(k.ErrorText)},children:h(ne.RateLimitMessage).replace("{seconds}",G.toString())})]}),x&&f.jsxs(Me.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mb-2 mx-3 flex gap-2",children:[f.jsxs(Rt,{className:"flex-1 flex items-center justify-center gap-2",size:"md",variant:"primary",kind:"outline",onClick:pe,style:{borderColor:p.getColor(k.ButtonBackground),color:p.getColor(k.ButtonBackground),backgroundColor:"transparent"},children:[f.jsx(X.Star,{className:"size-4"}),f.jsx("span",{children:"Değerlendir"})]}),f.jsxs(Rt,{size:"md",className:"flex-1 flex items-center justify-center gap-2",onClick:ce,children:[f.jsx(X.Plus,{className:"size-4"}),f.jsx("span",{children:"Yeni Sohbet"})]})]}),(!a||a&&(l==null?void 0:l.status)!==tn.Closed&&(l==null?void 0:l.status)!==tn.Deleted)&&f.jsxs("form",{className:"flex flex-col relative",onSubmit:Y=>{Y.preventDefault(),W()},children:[f.jsx("div",{className:"mx-4 border-t",style:{borderColor:p.getColor(k.DividerColor)}}),n&&j&&j.length>0&&f.jsx("div",{className:"px-3 pt-2 overflow-x-auto",children:f.jsx(wC,{files:j,onDelete:Y=>{A(j.filter((V,Z)=>Z!==Y))}})}),f.jsxs("div",{className:"flex gap-2 px-3 py-1 w-full",children:[f.jsxs("div",{className:"flex-1 min-w-0 relative",children:[f.jsx(Qu,{id:"message",inputRef:c,className:"grow",noMargin:!0,borderless:!0,autoComplete:"off",disabled:F,style:{height:b,maxHeight:"6rem",opacity:F?.5:1,cursor:F?"not-allowed":"text",boxShadow:"none"},placeholder:F?h(ne.RateLimitMessage).replace("{seconds}",G.toString()):h(ne.MessagePlaceholder),value:m,maxLength:2e3,onChange:Y=>{if(F)return;const V=Y.target.value;if(V.length<=2e3&&(g(V),ie(V)),V.length>0&&Y.currentTarget.scrollHeight>Y.currentTarget.clientHeight){const Z=`${Y.currentTarget.scrollHeight}px`;Y.currentTarget.style.height=Z,C(Z)}else Y.currentTarget.style.height="3rem",C("3rem")},onKeyDown:Y=>{if(F){Y.preventDefault();return}Y.key==="Enter"&&!Y.shiftKey&&(Y.preventDefault(),W())}}),m.length>=500&&f.jsx("div",{className:"absolute bottom-2 right-3 text-xs pointer-events-none",style:{color:m.length>=2e3?p.getColor(k.ErrorText):p.getColor(k.FooterText),fontWeight:m.length>=2e3?"600":"normal"},children:2e3-m.length})]}),f.jsx("div",{className:"flex items-center gap-1 flex-shrink-0 pb-0.5",children:f.jsx(Me.div,{whileTap:{scale:.9},children:f.jsx(Rt,{className:"!bg-transparent rounded-full w-8 h-8 min-w-8 flex items-center justify-center transition-colors disabled:!opacity-100",type:"submit",size:"xs",disabled:!se,style:{opacity:1,color:se?p.getColor(k.ButtonBackground):p.getColor(k.FooterText)},children:S?f.jsx(X.Spin,{className:"size-4 animate-spin"}):F?f.jsx("span",{className:"text-[10px] font-bold",children:G}):f.jsx(X.PaperAirplane,{className:"size-5"})})})})]}),f.jsx(BC,{isOpen:M,onClose:()=>P(!1),onSelect:_e}),f.jsxs("div",{className:"px-3 pb-1.5 flex items-center justify-between",children:[f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx("button",{type:"button",onClick:()=>P(!M),className:"p-1.5 rounded-md transition-colors",style:{color:p.getColor(k.IconColor)},children:f.jsx(X.Emoji,{className:"size-5"})}),n&&f.jsx(FC.Button,{onDrop:Y=>{if(Y.length){const V=ru(Y);if(!V.isValid){en({description:V.error,variant:"error"});return}A([...j,...Y])}}})]}),f.jsx(xo,{variant:"inline"})]})]})]})}const Ax=[["#6366f1","#8b5cf6"],["#3b82f6","#06b6d4"],["#10b981","#34d399"],["#f59e0b","#f97316"],["#ef4444","#f472b6"],["#8b5cf6","#ec4899"],["#14b8a6","#22d3ee"],["#f43f5e","#fb923c"]];function ah({name:e,avatar:t,className:n="text-neutral-500",textColor:r,subtitle:i}){const s=v.useMemo(()=>{const o=e.charCodeAt(0)||0,a=Ax[o%Ax.length];return`linear-gradient(135deg, ${a[0]}, ${a[1]})`},[e]);return f.jsxs(Me.div,{initial:{opacity:.8},animate:{opacity:1},className:"flex gap-2 items-center",children:[f.jsx("div",{className:"min-w-max",children:f.jsxs("span",{children:[t&&f.jsx("img",{className:"size-10 rounded-full border border-white/20 shadow-sm",src:t,"aria-label":e}),!t&&f.jsx("div",{className:"size-10 rounded-full flex items-center justify-center font-semibold text-white shadow-sm",style:{background:s},children:e.charAt(0).toUpperCase()})]})}),f.jsxs("div",{className:"flex flex-col",children:[f.jsx("span",{className:Ve("line-clamp-1 font-medium",n),style:r?{color:r}:void 0,children:e}),i&&f.jsx("span",{className:"text-xs opacity-75 line-clamp-1",style:r?{color:r}:void 0,children:i})]})]})}function bB({chat:e,isTyping:t,shortcutMessages:n,messages:r,onNewMessage:i,onChatClose:s,onEvaluateChat:o,onNewChat:a,onSendMessage:l,isHistoryMode:c=!1,spamWarningMessage:d,onDismissSpamWarning:u}){const{widget:p,setOpen:h,open:y,isHaveChat:x,isInputFocused:w}=re(),m=re(G=>G.historyChat),g=Se(),b=Po(),C=Zu(),S=dr(),_=gs(),j=v.useRef(new Set),A=v.useRef(!1),E=()=>{h(!1)},L=v.useCallback(()=>{if(!S||!y||!x||!Array.isArray(r))return;const G=r.filter(z=>z.sender_type===ye.User&&!j.current.has(z.id)).map(z=>z.id);G.length!==0&&S.emit(He.MessageRead,{message_ids:G},z=>{if(z&&z.success===!0)for(const $ of G)j.current.add($)})},[S,r,y,x]);v.useEffect(()=>{y&&(A.current=!0),y&&x&&(w||A.current)&&(L(),A.current=!1)},[y,x,w,L]);const F=()=>{var z,$,N,M;return((M=(N=($=(z=p==null?void 0:p.appearance)==null?void 0:z.head)==null?void 0:$.elements)==null?void 0:N.find(P=>P.type==="title"))==null?void 0:M.content)||"Müşteri Hizmetleri"},D=()=>{var $,N,M,P,B,U;if(c&&m)return"Geçmiş sohbet";if(e!=null&&e.agent_name)return e.agent_name;const G=(N=($=p==null?void 0:p.appearance)==null?void 0:$.design)==null?void 0:N.greeting_header;return G||((U=(B=(P=(M=p==null?void 0:p.appearance)==null?void 0:M.head)==null?void 0:P.elements)==null?void 0:B.find(W=>W.type==="text"))==null?void 0:U.content)||"Bizimle Sohbet Edin"};return f.jsxs(f.Fragment,{children:[f.jsxs("header",{className:"px-4 py-3 flex items-center justify-between flex-shrink-0 overflow-visible min-h-[52px]",style:{backgroundColor:g.getColor(k.HeaderBackground),color:g.getColor(k.HeaderText),borderColor:g.getColor(k.HeaderBorder),...b?{}:{borderTopLeftRadius:g.getRadius(),borderTopRightRadius:g.getRadius()}},children:[f.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[c&&f.jsx("button",{type:"button",onClick:()=>{re.getState().setHistoryChat(null),re.getState().setHistoryMessages(null),re.getState().setShowHistoryOnRegistration(!0),_.push("registration")},className:"flex-shrink-0 p-1 hover:opacity-80 transition-opacity",children:f.jsx(X.ArrowLeft,{className:"w-5 h-5"})}),(()=>{var G,z,$,N;if(c&&m){const M=(G=m.who_joined_details)==null?void 0:G[0],P=(z=m.participant_logs)==null?void 0:z[0],B=(M==null?void 0:M.name)||(P==null?void 0:P.name)||(($=m.archive_summary)==null?void 0:$.admin_name);if(B){const U=(M==null?void 0:M.avatar)||((N=m.archive_summary)==null?void 0:N.agent_avatar)||void 0;return f.jsx(ah,{name:B,avatar:U,textColor:g.getColor(k.HeaderText)})}}return!c&&(e!=null&&e.agent_name)?f.jsx(ah,{name:e.agent_name,avatar:e.agent_avatar,textColor:g.getColor(k.HeaderText)}):f.jsx("div",{className:"flex-1 min-w-0",children:c?f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"font-medium truncate",children:F()}),f.jsx("div",{className:"text-sm opacity-90 truncate",children:D()})]}):f.jsx("div",{className:"font-medium truncate",children:D()})})})()]}),f.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(!c||c&&(e==null?void 0:e.status)!==tn.Closed)&&f.jsx(oF,{onChatClose:s}),C&&f.jsx("button",{type:"button",onClick:E,className:"p-1 hover:opacity-80 transition-opacity",children:f.jsx(X.X,{className:"w-5 h-5 cursor-pointer"})})]})]}),f.jsx(bC,{messages:r,isTyping:t||n.length>0,chat:e}),f.jsx(Ar,{children:d&&f.jsxs(Me.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{duration:.2},className:"mx-3 mb-2 p-3 rounded-lg flex items-start gap-2",style:{backgroundColor:g.getColor(k.ErrorBackground),borderColor:g.getColor(k.ErrorBorder),borderWidth:"1px",borderStyle:"solid",borderRadius:g.getRadius()},children:[f.jsx(X.XCircle,{className:"size-4 flex-shrink-0 mt-0.5",style:{color:g.getColor(k.ErrorText)}}),f.jsx("span",{className:"text-sm",style:{color:g.getColor(k.ErrorText)},children:d}),f.jsx("button",{type:"button",className:"ml-auto flex-shrink-0",onClick:u,style:{color:g.getColor(k.ErrorText)},children:f.jsx(X.X,{className:"size-4"})})]})}),f.jsx(wB,{client_id:(p==null?void 0:p.client_id)||"",is_uploadable:e.is_customer_uploadable,messages:r,onNewMessage:G=>{i(G)},onEvaluateChat:o,onNewChat:a,onSendMessage:l,isHistoryMode:c,historyChat:c?re.getState().historyChat:void 0})]})}function kB({rating:e,onChange:t}){const n=Se();return f.jsx("div",{className:"flex items-center justify-center gap-0.5 my-2",children:[1,2,3,4,5].map(r=>{const i=r<=e,s=!i&&r-.5<=e;return f.jsxs(Me.div,{className:"relative w-8 h-8 cursor-pointer",whileHover:{scale:1.15},whileTap:{scale:.95},transition:{duration:.15},children:[f.jsx("svg",{className:"w-8 h-8",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:f.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&&f.jsx("div",{className:"absolute top-0 left-0 w-4 h-8 overflow-hidden",children:f.jsx("svg",{className:"w-8 h-8",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:f.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&&f.jsx("svg",{className:"w-8 h-8 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:f.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"})}),f.jsxs("div",{className:"absolute inset-0 flex",children:[f.jsx("button",{type:"button",onClick:()=>t(r-.5),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${r-.5} stars`}),f.jsx("button",{type:"button",onClick:()=>t(r),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${r} stars`})]})]},r)})})}function SB({onOk:e}){const t=Se(),n=cs(),r=Zu(),[i,s]=v.useState(0),[o,a]=v.useState(!1),[l,c]=v.useState(10),d=lM(),[u,p]=v.useState(!1);v.useEffect(()=>{if(o){const w=setInterval(()=>{c(m=>m<=1?(clearInterval(w),e(!0),0):m-1)},1e3);return()=>clearInterval(w)}},[o]);const h=Jm({comment:Xc()}),y=JS({init:{comment:""},schema:h,action:async w=>{const[m,g]=await d.mutateAsync({rating:i,comment:w.comment});if(zn(g)){a(!0);return}ho(m,{form:y})}}),x=()=>{e(!0)};return f.jsxs(Me.div,{className:"flex flex-col h-full",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[f.jsxs("header",{className:"min-h-[48px] flex-shrink-0 overflow-visible flex justify-between items-center z-10 px-5 py-2.5",style:{borderColor:t.getColor(k.HeaderBorder),color:t.getColor(k.HeaderText)},children:[f.jsx("div",{className:"font-medium !text-sm",children:n(o?ne.RatingHeaderThanks:ne.RatingHeaderEvaluate)}),r&&f.jsx("button",{type:"button",onClick:()=>e(!1),className:"p-1.5 rounded-md hover:opacity-70 transition-opacity",style:{color:t.getColor(k.HeaderText)},children:f.jsx(X.X,{className:"size-4"})})]}),f.jsx("div",{className:"flex-1 p-4 overflow-y-auto flex flex-col",children:o?f.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[f.jsx("div",{className:"mb-3",style:{color:t.getColor(k.SuccessText)},children:f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-12 w-12",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),f.jsx("h2",{className:"text-lg font-semibold mb-1.5",style:{color:t.getColor(k.HeaderText)},children:n(ne.RatingThankYouTitle)}),f.jsx("p",{className:"mb-6 text-sm",style:{color:t.getColor(k.FooterText)},children:n(ne.RatingThankYouDescription)}),f.jsx("p",{className:"mb-3 text-xs",style:{color:t.getColor(k.FooterText)},children:n(ne.RatingCountdown).replace("{seconds}",l.toString())}),f.jsx(Rt,{onClick:x,size:"md",className:"w-full max-w-xs",children:n(ne.RatingNewConversation)})]}):f.jsxs("div",{className:"flex flex-col",children:[f.jsx("div",{className:"text-center mb-4",children:f.jsx("p",{className:"text-sm",style:{color:t.getColor(k.FooterText)},children:n(ne.RatingDescription)})}),f.jsxs("div",{className:"mb-4",children:[f.jsx("h3",{className:"text-center font-medium mb-1.5 text-base",style:{color:t.getColor(k.RatingRateConversationText)},children:n(ne.RatingRateConversation)}),f.jsx(kB,{rating:i,onChange:w=>{s(w),w>=1&&p(!1)}}),i>0&&f.jsx("p",{className:"text-center text-xs mt-1",style:{color:t.getColor(k.FooterText)},children:n(ne.RatingYourScore).replace("{score}",Number.isInteger(i)?i.toString():i.toFixed(1))}),i>0&&i<1||u?f.jsx("p",{className:"text-center text-xs mt-1",style:{color:t.getColor(k.ErrorText)},children:n(ne.RatingMinimumError)}):null]}),f.jsxs("form",{onSubmit:y.handleSubmit,className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("label",{htmlFor:"comment",className:"block text-xs font-medium mb-1",style:{color:t.getColor(k.InputText)},children:n(ne.RatingComment)}),f.jsx(Qu,{id:"comment",onChange:y.handleChange,onBlur:y.handleBlur,value:y.values.comment,placeholder:n(ne.RatingCommentPlaceholder),className:"rounded-lg",error:y.errors.comment})]}),f.jsxs("div",{className:"flex flex-col gap-2 pt-1",children:[f.jsx(Rt,{type:"submit",size:"lg",onClick:w=>{i<1&&(w.preventDefault(),w.stopPropagation(),p(!0))},className:"w-full",children:n(ne.RatingSubmit)}),f.jsx(Rt,{onClick:x,size:"lg",variant:"secondary",kind:"subtle",className:"w-full",bgKey:k.GreeterBackground,textKey:k.GreeterText,children:n(ne.RatingNewConversation)})]})]})]})}),f.jsx(xo,{variant:"block"})]})}function CB({onSendMessage:e,disabled:t,loading:n=!1}){const r=v.useRef(null),i=Se(),s=cs(),{setIsInputFocused:o}=re(),[a,l]=v.useState(""),[c,d]=v.useState("3rem"),[u,p]=v.useState(!1),h=v.useRef(n);v.useEffect(()=>{h.current&&!n&&!t&&setTimeout(()=>{var w;(w=r.current)==null||w.focus()},100),h.current=n},[n,t]),v.useEffect(()=>{t&&p(!1)},[t]);const y=()=>{if(!a.trim()||t)return;const w=a;l(""),r.current&&(r.current.style.height="3rem",d("3rem")),e(w)},x=v.useCallback(w=>{if(t)return;const m=r.current;if(m){const g=m.selectionStart,b=m.selectionEnd,C=a.substring(0,g)+w+a.substring(b);C.length<=2e3&&(l(C),setTimeout(()=>{m.selectionStart=m.selectionEnd=g+w.length,m.focus()},0))}else{const g=a+w;g.length<=2e3&&l(g)}},[a,t]);return f.jsxs("form",{className:"flex flex-col relative",onSubmit:w=>{w.preventDefault(),y()},children:[f.jsx("div",{className:"mx-4 border-t",style:{borderColor:i.getColor(k.DividerColor)}}),f.jsxs("div",{className:"flex gap-2 px-3 py-1 w-full",children:[f.jsxs("div",{className:"flex-1 min-w-0 relative",children:[f.jsx(Qu,{id:"ai-message",inputRef:r,className:"grow",noMargin:!0,borderless:!0,autoComplete:"off",disabled:t,style:{height:c,maxHeight:"6rem",opacity:t?.5:1,cursor:t?"not-allowed":"text",boxShadow:"none"},placeholder:s(ne.MessagePlaceholder),value:a,maxLength:2e3,onFocus:()=>o(!0),onBlur:()=>o(!1),onChange:w=>{if(t)return;const m=w.target.value;if(m.length<=2e3&&l(m),m.length>0&&w.currentTarget.scrollHeight>w.currentTarget.clientHeight){const g=`${w.currentTarget.scrollHeight}px`;w.currentTarget.style.height=g,d(g)}else w.currentTarget.style.height="3rem",d("3rem")},onKeyDown:w=>{if(t){w.preventDefault();return}w.key==="Enter"&&!w.shiftKey&&(w.preventDefault(),y())}}),a.length>=500&&f.jsx("div",{className:"absolute bottom-2 right-3 text-xs pointer-events-none",style:{color:a.length>=2e3?i.getColor(k.ErrorText):i.getColor(k.FooterText),fontWeight:a.length>=2e3?"600":"normal"},children:2e3-a.length})]}),f.jsx("div",{className:"flex items-center gap-1 flex-shrink-0 pb-0.5",children:f.jsx(Me.div,{whileTap:{scale:.9},children:f.jsx(Rt,{className:"!bg-transparent rounded-full w-8 h-8 min-w-8 flex items-center justify-center transition-colors disabled:!opacity-100",type:"submit",size:"xs",withoutTheming:!0,disabled:t||!a.trim(),style:{opacity:1,backgroundColor:"transparent",color:a.trim()?i.getColor(k.ButtonBackground):i.getColor(k.FooterText)},children:n?f.jsx(X.Spin,{className:"size-4 animate-spin"}):f.jsx(X.PaperAirplane,{className:"size-5"})})})})]}),f.jsx(BC,{isOpen:u,onClose:()=>p(!1),onSelect:x}),f.jsxs("div",{className:"px-3 pb-1.5 flex items-center justify-between",children:[f.jsx("div",{className:"flex items-center gap-1",children:f.jsx("button",{type:"button",disabled:t,onClick:()=>!t&&p(!u),className:"p-1.5 rounded-md transition-colors disabled:opacity-50 disabled:cursor-not-allowed",style:{color:i.getColor(k.IconColor)},children:f.jsx(X.Emoji,{className:"size-5"})})}),f.jsx(xo,{variant:"inline"})]})]})}const af=[De.Light,De.Dark,De.System];function _B(e){switch(e){case De.Light:return X.Sun;case De.Dark:return X.Moon;case De.System:return X.Monitor;default:return X.Monitor}}function TB({onChatClose:e}){const[t,n]=v.useState(!1),[r,i]=v.useState(!1),[s,o]=v.useState(()=>yC()),a=v.useRef(null),l=v.useRef(null),c=Se(),d=cs(),{mode:u,setMode:p}=c,h=()=>e(),y=()=>{const m=af.indexOf(u),g=af[(m+1)%af.length];p(g)},x=()=>{const m=!s;xC(m),o(m)};v.useEffect(()=>{if(!r)return;const m=g=>{var b,C;(b=l.current)!=null&&b.contains(g.target)||(C=a.current)!=null&&C.contains(g.target)||i(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[r]);const w=r&&f.jsxs(Me.div,{ref:l,onMouseDown:m=>m.stopPropagation(),initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:"absolute right-0 top-full z-[9999] mt-1.5 py-1 min-w-[175px] rounded-lg shadow-lg !text-sm",style:{backgroundColor:c.getColor(k.Background),borderColor:c.getColor(k.Border),borderRadius:c.getRadius(),boxShadow:`0 4px 12px ${c.getColor(k.ShadowColor)}`},children:[f.jsxs("button",{type:"button",className:"w-full px-3 py-2 text-left text-sm flex items-center gap-2 rounded-t-lg hover:opacity-80 transition-opacity",style:{color:c.getColor(k.ErrorText)},onClick:()=>{i(!1),n(!0)},children:[f.jsx(X.XCircle,{className:"size-4 flex-shrink-0"}),d(ne.ChatEndConversation)]}),f.jsxs("button",{type:"button",className:"w-full px-3 py-2 text-left text-sm flex items-center gap-2 hover:opacity-80 transition-opacity",style:{color:c.getColor(k.InputText)},onClick:x,children:[s?f.jsx(X.VolumeX,{className:"size-4 flex-shrink-0"}):f.jsx(X.Volume2,{className:"size-4 flex-shrink-0"}),d(s?ne.NotificationSoundOn:ne.NotificationSoundOff)]}),f.jsx("div",{className:"my-1 h-px",style:{backgroundColor:c.getColor(k.DividerColor)}}),f.jsxs("button",{type:"button",className:"w-full px-3 py-2 text-left text-sm flex items-center gap-2 rounded-b-lg hover:opacity-80 transition-opacity",style:{color:c.getColor(k.InputText)},onClick:y,children:[(()=>{const m=_B(u);return f.jsx(m,{className:"size-4 flex-shrink-0"})})(),u===De.Light?"Açık tema":u===De.Dark?"Koyu tema":"Sistem"]})]});return f.jsxs(f.Fragment,{children:[f.jsx(Ar,{children:t&&f.jsx(Me.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:c.getColor(k.ModalOverlayColor)},children:f.jsxs(Me.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:c.getColor(k.Background),borderRadius:c.getRadius()},children:[f.jsx("div",{className:"text-base font-semibold mb-2",style:{color:c.getColor(k.ChatCloseConfirmText)},children:d(ne.ChatCloseConfirm)}),f.jsx("div",{className:"text-sm mb-4",style:{color:c.getColor(k.FooterText)},children:d(ne.ChatCloseWarning)}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsx("button",{type:"button",className:"px-3 py-1.5 text-sm rounded-lg transition-opacity hover:opacity-90",style:{backgroundColor:c.getColor(k.GreeterBackground),color:c.getColor(k.GreeterText),borderRadius:c.getRadius()},onClick:()=>n(!1),children:d(ne.CancelAction)}),f.jsx("button",{type:"button",className:"px-3 py-1.5 text-sm rounded-lg transition-opacity hover:opacity-90",style:{backgroundColor:c.getColor(k.ErrorBackground),color:c.getColor(k.ErrorText),borderRadius:c.getRadius()},onClick:h,children:d(ne.CloseAction)})]})]})})}),f.jsxs("div",{className:"relative flex-shrink-0",children:[f.jsx("button",{ref:a,type:"button",onClick:()=>i(m=>!m),className:"flex items-center justify-center p-1.5 rounded-md hover:opacity-80 transition-opacity",style:{backgroundColor:"transparent",color:c.getColor(k.HeaderText)},title:d(ne.ChatSettings),"aria-expanded":r,children:f.jsx(X.Menu,{className:"size-5"})}),f.jsx(Ar,{children:w})]})]})}function EB({onOperatorConnected:e,onChatClose:t}){var ce,_e,Re;const{widget:n,setOpen:r,aiAgent:i,aiAgentMessages:s,addAIAgentMessage:o,setAIAgentMessages:a,aiAgentSessionId:l,setAIAgentSessionId:c,humanNeedRequested:d,setHumanNeedRequested:u,setIsAIAgentMode:p}=re(),h=Se(),y=Po(),x=Zu(),w=dr(),m=gs(),[g,b]=v.useState(!1),[C,S]=v.useState(!1),[_,j]=v.useState(!1),[A,E]=v.useState(!1),[L,F]=v.useState(""),[D,G]=v.useState(!1),[z,$]=v.useState(0),[N,M]=v.useState(null),P=()=>{r(!1)},B=()=>{u(!1),t()},U=(((Re=(_e=(ce=n==null?void 0:n.appearance)==null?void 0:ce.body)==null?void 0:_e.inputs)==null?void 0:Re.length)||0)>0,W=v.useRef(!1),q=v.useRef(!1);v.useEffect(()=>{if(!i||W.current)return;if(s.length>0){W.current=!0;return}if(!w||!w.connected){const Z=setInterval(()=>{w&&w.connected&&(clearInterval(Z),Y())},100),ue=setTimeout(()=>{clearInterval(Z),W.current||V()},3e3);return()=>{clearInterval(Z),clearTimeout(ue)}}Y();function Y(){W.current||!w||(W.current=!0,w.emit(He.MessageList,{},Z=>{Array.isArray(Z)&&Z.length>0?a(Z):V()}))}function V(){if(!i)return;const Z={id:Lp(),content:`Merhaba! Ben ${i.name}. Size nasıl yardımcı olabilirim?`,created_at:new Date,files:[],sender_type:ye.User};o(Z)}},[w,i,s.length,a,o]),v.useEffect(()=>{if(g)if(L)S(!0);else{const Y=setTimeout(()=>S(!0),1e3);return()=>clearTimeout(Y)}else S(!1)},[g,L]),v.useEffect(()=>{if(z>0){const Y=requestAnimationFrame(()=>$(0));return()=>cancelAnimationFrame(Y)}},[z]),v.useEffect(()=>{if(!w)return;const Y=({token:O})=>{F(ae=>ae+O)},V=O=>{O!=null&&O.human_need&&u(!0)},Z=O=>{O.repeat_count===3&&M(O.message)},ue=()=>{t()};return w.on(ve.AgentMessageChunk,Y),w.on(ve.AgentMessageFinalMetadata,V),w.on(ve.AgentSpamWarning,Z),w.on(ve.AgentSpamBanned,ue),()=>{w.off(ve.AgentMessageChunk,Y),w.off(ve.AgentMessageFinalMetadata,V),w.off(ve.AgentSpamWarning,Z),w.off(ve.AgentSpamBanned,ue)}},[w,u,t]);const se=v.useCallback(Y=>{if(!n||!i||!w||d||_||q.current)return;q.current=!0;const V=`temp-${Date.now()}`,Z={id:V,content:Y,created_at:new Date,files:[],sender_type:ye.Customer};o(Z),F(""),G(!0),b(!0),j(!0);const ue=l||mi(n.link_id);w.emit(He.AgentMessageCreate,{question:Y,agent_id:i.id,session_id:ue},O=>{if(q.current=!1,G(!1),F(""),b(!1),j(!1),!O){const ae={id:Lp(),content:"Üzgünüm, bir hata oluştu. Lütfen tekrar deneyin veya canlı destek personelimıze bağlanın.",created_at:new Date,files:[],sender_type:ye.System};a(ee=>ee.filter(ke=>ke.id!==V).concat([ae])),u(!0);return}O.session_id&&c(O.session_id),o(O.agent_message),O.human_need&&u(!0)})},[n,i,d,_,w,l,o,a,c,u]),ie=v.useCallback(Y=>{if(!w||A)return;E(!0);const V=()=>{w.emit(He.AgentRequestHuman,{},Z=>{E(!1),Z!=null&&Z.success?(re.getState().setIsHaveChat(!0),p(!1),u(!1),re.getState().clearAIAgentState(),e()):console.error("Failed to request human operator")})};Y&&Object.keys(Y).length>0?w.emit(He.ChatUpdateInputs,{inputs:Y},Z=>{Z!=null&&Z.success?V():(console.error("Failed to update chat inputs"),E(!1))}):V()},[w,A,p,u,e]),pe=()=>{U?m.push("registration"):ie()};return i?f.jsxs("div",{className:"flex flex-col h-full min-h-0 flex-1 w-full",children:[f.jsxs("header",{className:"px-4 py-3 flex items-center justify-between flex-shrink-0 overflow-visible min-h-[52px]",style:{backgroundColor:h.getColor(k.HeaderBackground),color:h.getColor(k.HeaderText),borderColor:h.getColor(k.HeaderBorder),...y?{}:{borderTopLeftRadius:h.getRadius(),borderTopRightRadius:h.getRadius()}},children:[f.jsx("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:f.jsx(ah,{name:i.name,avatar:i.avatar,textColor:h.getColor(k.HeaderText),subtitle:"AI Asistan"})}),f.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[f.jsx(TB,{onChatClose:B}),x&&f.jsx("button",{type:"button",onClick:P,className:"p-1 hover:opacity-80 transition-opacity",children:f.jsx(X.X,{className:"w-5 h-5 cursor-pointer"})})]})]}),f.jsxs("div",{className:"flex flex-col flex-1 min-h-0 w-full overflow-hidden",children:[f.jsx(bC,{messages:s,isTyping:C||g&&!!L,streamingContent:D?L:void 0,skipAnimationForLastN:z}),f.jsx(Ar,{children:N&&f.jsxs(Me.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{duration:.2},className:"mx-3 mb-2 p-3 rounded-lg flex items-start gap-2 flex-shrink-0",style:{backgroundColor:h.getColor(k.ErrorBackground),borderColor:h.getColor(k.ErrorBorder),borderWidth:"1px",borderStyle:"solid",borderRadius:h.getRadius()},children:[f.jsx(X.XCircle,{className:"size-4 flex-shrink-0 mt-0.5",style:{color:h.getColor(k.ErrorText)}}),f.jsx("span",{className:"text-sm",style:{color:h.getColor(k.ErrorText)},children:N}),f.jsx("button",{type:"button",className:"ml-auto flex-shrink-0",onClick:()=>M(null),style:{color:h.getColor(k.ErrorText)},children:f.jsx(X.X,{className:"size-4"})})]})}),d?f.jsx(Me.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},className:"flex-shrink-0 w-full flex flex-col items-stretch justify-center px-4 pt-8 pb-10",style:{backgroundColor:h.getColor(k.Background)},children:f.jsx(Me.div,{className:"relative w-full max-w-lg mx-auto overflow-hidden",style:{borderRadius:h.getRadius()},animate:{filter:["brightness(1)","brightness(1.1)","brightness(1)"]},transition:{duration:2.5,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"},children:f.jsx(Rt,{onClick:pe,disabled:A,size:"lg",className:"w-full flex items-center justify-center gap-2",children:A?f.jsx("span",{className:"animate-pulse",children:"Bağlanıyor..."}):f.jsxs(f.Fragment,{children:[f.jsx(X.User,{className:"w-5 h-5"}),f.jsx("span",{children:"Canlı Desteğe Bağlan"})]})})})}):f.jsx(CB,{onSendMessage:se,disabled:_,loading:_})]})]}):null}function AB({children:e}){const{widget:t}=re();return t?f.jsx("section",{className:"h-full w-full relative",children:e}):null}function jB({children:e}){const t=dr(),n=gs(),{historyChat:r,isAIAgentMode:i,aiAgent:s}=re(),[o,a]=v.useState(!0),[l,c]=v.useState(!1),d=v.useRef(!1);return v.useEffect(()=>{if(r){a(!1);return}if(!t){a(!1);return}const u=()=>{a(!1),c(!1),d.current=!0},p=()=>{i&&s||(c(!0),n.push("registration"))};return t.on(ve.Connect,u),t.on(ve.Disconnect,p),t.connected?(a(!1),d.current=!0):t.connect(),()=>{t.off(ve.Connect,u),t.off(ve.Disconnect,p)}},[t,r,i,s,n]),i&&s||r?e:!t||l?(t||n.push("registration"),f.jsx(th,{})):d.current&&!t.connected?f.jsx(th,{}):o||!t.connected?f.jsx(vC,{}):e}function jx(e,t){const n=new Map;for(const r of t)r!=null&&r.id&&n.set(r.id,r);for(const r of e)r!=null&&r.id&&!n.has(r.id)&&n.set(r.id,r);return Array.from(n.values()).sort((r,i)=>new Date(r.created_at).getTime()-new Date(i.created_at).getTime())}function RB(){const e=O=>{if(!O||typeof O!="object")return!1;const ae=String((O==null?void 0:O.error)||(O==null?void 0:O.message)||"").toLowerCase(),ee=Number((O==null?void 0:O.status)||(O==null?void 0:O.statusCode)||0);return(O==null?void 0:O.retryAfter)!==void 0||ee===429||/too\s+many|rate\s*limit|çok\s+fazla/.test(ae)},t=O=>{const ae=Number((O==null?void 0:O.retryAfter)??(O==null?void 0:O.seconds));return Number.isFinite(ae)&&ae>0?ae:3},{widget:n,setOpen:r,setIsHaveChat:i,historyChat:s,setHistoryChat:o,historyMessages:a,setHistoryMessages:l,aiAgent:c,isAIAgentMode:d,clearAIAgentState:u}=re(),p=Se(),h=dr(),{connected:y,connectionReady:x}=h,w=ll(),m=gs(),g=Po(),[b,C]=v.useState(null),[S,_]=v.useState([]),[j,A]=v.useState(!1),[E,L]=v.useState([]),[F,D]=v.useState([]),[G,z]=v.useState(!1),$=Gm(),N=v.useRef(!1),M=v.useRef(null),P=v.useRef(!1),[B,U]=v.useState(!1),[W,q]=v.useState(null);v.useEffect(()=>{console.log("WS: ChatDetailView socket state:",{connected:y,connectionReady:x,hasChat:!!b,chatViewEmitted:N.current})},[y,x,b]),v.useEffect(()=>{if(b||s||d){U(!1);return}const O=setTimeout(()=>{!b&&!s&&!d&&(console.warn("WS: Connection timeout reached in ChatDetailView"),U(!0))},1e4);return()=>clearTimeout(O)},[b,s,d]),v.useEffect(()=>{if(!s||!n)return;if(C({status:s.status,is_customer_uploadable:!1}),a){_(a);return}const O=mi(n.link_id);pM(s._id,n.link_id,O).then(([ae,ee])=>{if(zn(ee)&&Array.isArray(ae)){const ke=ae.map(he=>({id:he._id,content:he.content,created_at:he.created_at,files:he.files,sender_type:he.sender_type,activity_type:he.activity_type,answers:he.answers,reply_id:he.reply_id,buttons:he.buttons}));_(ke),l(ke)}}).catch(ae=>{console.error("Failed to load history messages",ae)})},[s,n,a,l]),v.useEffect(()=>{if(!n||d||s)return;const O=mr(n.link_id);O.isAgentMode&&O.agent&&(console.log("ChatDetailView: Recovering AI Agent state from localStorage"),re.getState().setAIAgent(O.agent),re.getState().setIsAIAgentMode(!0),O.sessionId&&re.getState().setAIAgentSessionId(O.sessionId),O.humanNeedRequested&&re.getState().setHumanNeedRequested(!0))},[n,d,s]);const se=async(O,ae)=>{var Bt;if(!n)return;if(!s){const fe=`temp-${Date.now()}`,R={id:fe,content:O,created_at:new Date,files:ae||[],sender_type:ye.Customer,answers:[],reply_id:void 0,buttons:[]};_(K=>[...K,R]),h==null||h.emit(He.MessageCreate,{content:O,files:ae},K=>{const I=Array.isArray(K)?K[0]:K;if(I&&I.isError){_(te=>te.filter(de=>de.id!==fe));const H=e(I);H||ho(I),H&&typeof window<"u"&&window.dispatchEvent(new CustomEvent("lc:rate-limit",{detail:{seconds:t(I)}}));return}_(H=>H.map(te=>te.id===fe?I:te))});return}const ee={},ke=n.appearance;if((Bt=ke==null?void 0:ke.body)!=null&&Bt.inputs){for(const fe of ke.body.inputs)if(fe.required||fe.remember){const R=ga(fe.name);R&&(ee[fe.name]=R)}}const he=re.getState().defaultValues;if(he){he.username&&(ee.username=he.username),he.secret_data&&(ee.secret_data=he.secret_data);for(const fe in he)ee[fe]||(ee[fe]=he[fe])}const[Ze,qe]=await $.mutateAsync({inputs:ee,history:[],client_id:n.client_id,widget_id:n.link_id,device_id:mi(n.link_id)});if(zn(qe)){o(null),i(!0),Ze&&typeof Ze=="object"&&"customer_token"in Ze&&(Fn(st.CustomerToken,Ze.customer_token,n.link_id),Fn(st.CustomerRefreshToken,Ze.customer_refresh_token,n.link_id));let fe=0;const R=20,K=`temp-${Date.now()}`,I={id:K,content:O,created_at:new Date,files:ae||[],sender_type:ye.Customer,answers:[],reply_id:void 0,buttons:[]};_(te=>[...te,I]);const H=setInterval(()=>{fe+=1,h!=null&&h.connected?(h.emit(He.MessageCreate,{content:O,files:ae},te=>{const de=Array.isArray(te)?te[0]:te;if(de&&de.isError){_(Ue=>Ue.filter(lt=>lt.id!==K));const xe=e(de);xe||ho(de),xe&&typeof window<"u"&&window.dispatchEvent(new CustomEvent("lc:rate-limit",{detail:{seconds:t(de)}}));return}_(xe=>xe.map(Ue=>Ue.id===K?de:Ue))}),clearInterval(H)):fe>=R&&clearInterval(H)},200)}},ie=O=>{!O&&!g&&r(!1),z(!0),pa((n==null?void 0:n.link_id)||""),i(!1),C(null),_([]),L([]),o(null),re.getState().setHistoryMessages(null),re.getState().setShowHistoryOnRegistration(!1),u(),ac(n.client_id,Yi(w)).then(()=>{h==null||h.disconnect(),m.push("registration")})},pe=()=>{b?(localStorage.setItem("showActionButtons","false"),C({...b,status:tn.Closed})):ie(!1)};v.useEffect(()=>{if(h&&!(d&&c)){if(s){N.current=!1,P.current=!1;return}if(!y||!x){y||(P.current=!1,N.current=!1,M.current=null);return}P.current=!0,!(!n||N.current)&&(N.current=!0,console.log("ChatView: Emitting chat:view request"),h.emit(He.ChatView,{},O=>{if(console.log("ChatView: Received response",{chatReceived:O!==null,chatStatus:O==null?void 0:O.status,hasAgentName:!!(O!=null&&O.agent_name),hasError:O&&"error"in O}),re.getState().historyChat){N.current=!1;return}if(O===null||O&&"error"in O||!(O!=null&&O.status)){console.log("ChatView returned invalid chat (null, error, or missing status), cleaning up and redirecting to registration",{chat:O}),r(!1),i(!1),ac(n.client_id,Yi(w)),_([]),L([]),o(null),re.getState().setHistoryMessages(null),u(),pa((n==null?void 0:n.link_id)||""),h.disconnect(),m.push("registration"),N.current=!1;return}console.log("ChatView: Setting chat state",{status:O.status}),C(O),i(!0)}))}},[s,h,n,y,x,w,m,r,i,o,d,c,u]);const ce=()=>{pe()},_e=()=>{ie(!0)},[Re,Y]=v.useState(!1),V=v.useCallback(()=>{console.log("handleOperatorConnected: Starting operator connection flow"),N.current=!1,M.current=null,P.current=!1;const O=re.getState().aiAgentMessages;O.length>0&&_(O),Y(!0)},[]);v.useEffect(()=>{if(Re){if(!h||!y||!x){console.log("handleOperatorConnected: Waiting for socket connection...",{connected:y,connectionReady:x});return}if(console.log("handleOperatorConnected: Socket ready, fetching chat view"),N.current){Y(!1);return}N.current=!0,h.emit(He.ChatView,{},O=>{console.log("handleOperatorConnected: ChatView result",O),O&&!("error"in O)&&O.status?(C(O),i(!0),h.emit(He.MessageList,{},ee=>{console.log("handleOperatorConnected: MessageList result",ee),Array.isArray(ee)&&_(ke=>jx(ke,ee))})):(console.log("handleOperatorConnected: Invalid chat result, clearing state",O),i(!1)),Y(!1)})}},[Re,h,y,x,i]);const Z=()=>{u(),g||r(!1),z(!0),pa((n==null?void 0:n.link_id)||""),i(!1),C(null),_([]),L([]),o(null),re.getState().setHistoryMessages(null),re.getState().setShowHistoryOnRegistration(!1),ac(n.client_id,Yi(w)).then(()=>{h==null||h.disconnect(),m.push("registration")})},ue=v.useCallback(O=>{if(d&&c&&!s){const{aiAgentMessages:ae,addAIAgentMessage:ee}=re.getState();if(ae.some(ke=>ke.id===O.id))return;ee(O);return}b&&![tn.Closed,tn.Deleted].includes(b.status)&&_(ae=>{const ee=ae.filter(he=>{var Ze;return!((Ze=he.id)!=null&&Ze.startsWith("temp-")&&he.content===O.content)});return ee.some(he=>he.id===O.id)?ee:[...ee,O]})},[b,d,c,s]);return v.useEffect(()=>{if(!h)return;const O=fe=>{const R={content:fe.content,created_at:fe.created_at,files:fe.files,id:fe._id,sender_type:fe.sender_type,answers:fe.answers,reply_id:fe.reply_id,buttons:fe.buttons};if(E.length>0){L(K=>[...K,R]);return}fe.is_shortcut?L([R]):ue(R),A(!1)},ae=fe=>{const R={content:fe.content,created_at:fe.created_at,files:fe.files,id:fe._id,sender_type:fe.sender_type,activity_type:fe.activity_type,sender_name:fe.sender_name,answers:fe.answers,reply_id:fe.reply_id,buttons:fe.buttons};ue(R)},ee=fe=>{!fe||!fe.name?C(R=>R?{...R,agent_name:void 0,agent_avatar:void 0}:null):(C(R=>R?{...R,agent_name:fe.name,agent_avatar:fe.avatar}:null),D(R=>R.includes(fe.name)?R:[...R,fe.name]))},ke=()=>{A(!0)},he=()=>{pe()},Ze=({is_customer_uploadable:fe})=>{C(R=>R?{...R,is_customer_uploadable:fe}:null)},qe=fe=>{D(R=>{const K=R.filter(I=>I!==fe.name);return fe.hasOtherAdmins?K.length>0&&C(I=>I?{...I,agent_name:K[0],agent_avatar:void 0}:null):C(I=>I?{...I,agent_name:void 0,agent_avatar:void 0}:null),K})},Bt=fe=>{D(R=>R.includes(fe.name)?R:[...R,fe.name]),C(R=>R?R.agent_name?R:{...R,agent_name:fe.name,agent_avatar:void 0}:null)};return h.on(ve.MessageAgentCreate,O),h.on(ve.MessageUserCreate,ae),h.on(ve.MessageCustomerCreate,ae),h.on(ve.ChatUserAssignee,ee),h.on(ve.MessageAgentTyping,ke),h.on(ve.ChatUserClose,he),h.on(ve.ChatToggleUpload,Ze),h.on(ve.ChatUserLeave,qe),h.on(ve.ChatUserJoin,Bt),()=>{h.off(ve.MessageAgentCreate,O),h.off(ve.MessageUserCreate,ae),h.off(ve.MessageCustomerCreate,ae),h.off(ve.ChatUserAssignee,ee),h.off(ve.MessageAgentTyping,ke),h.off(ve.ChatUserClose,he),h.off(ve.ChatToggleUpload,Ze),h.off(ve.ChatUserLeave,qe),h.off(ve.ChatUserJoin,Bt)}},[ue,F]),v.useEffect(()=>{if(!h)return;const O=ee=>{ee.repeat_count===3&&q(ee.message)},ae=()=>{h.emit(He.ChatClose,{}),re.getState().setShowActionButtons(!1),pe()};return h.on(ve.AgentSpamWarning,O),h.on(ve.AgentSpamBanned,ae),()=>{h.off(ve.AgentSpamWarning,O),h.off(ve.AgentSpamBanned,ae)}},[h,pe]),v.useEffect(()=>{if(!h||!b||s){M.current=null;return}const O=`${b.status}-${b.agent_name||"no-agent"}`;M.current!==O&&(M.current=O,h.emit(He.MessageList,{},ae=>{if(!Array.isArray(ae)){console.warn("MessageList response is not an array:",ae),M.current=null;return}_(he=>jx(he,ae));const ee=new Map;for(const he of ae)he.sender_type===ye.Activity&&(he.activity_type===gn.AdminJoin&&he.sender_name?ee.set(he.sender_name,!0):he.activity_type===gn.AdminLeave&&he.sender_name&&ee.set(he.sender_name,!1));const ke=Array.from(ee.entries()).filter(([he,Ze])=>Ze).map(([he])=>he);D(ke)}))},[h,b,s]),v.useEffect(()=>{const O=setTimeout(()=>{A(!1)},2e3);return()=>clearTimeout(O)},[j]),v.useEffect(()=>{if(!n||E.length===0)return;let O=0;n.writing_timeout&&(O=[...E[0].content].length/n.writing_timeout,O<0&&(O=0));const ae=setTimeout(()=>{ue(E[0]),L(E.slice(1))},O*1e3);return()=>clearTimeout(ae)},[E,n]),G?f.jsx(th,{}):d&&c&&!s?f.jsxs(f.Fragment,{children:[f.jsx("div",{id:"chat-alert-portal"}),f.jsx("div",{className:`h-full w-full ${g?"":"rounded-xl"} shadow-sm flex flex-col overflow-hidden`,style:{height:g?"100%":"",minHeight:g?"var(--app-height, 100dvh)":"",maxHeight:g?"var(--app-height, 100dvh)":"",backgroundColor:p.getColor(k.Background)},children:f.jsx(EB,{onOperatorConnected:V,onChatClose:Z})})]}):f.jsxs(f.Fragment,{children:[f.jsx("div",{id:"chat-alert-portal"}),f.jsx("div",{className:`h-full w-full ${g?"":"rounded-xl"} shadow-sm flex flex-col overflow-hidden`,style:{height:g?"100%":"",minHeight:g?"var(--app-height, 100dvh)":"",maxHeight:g?"var(--app-height, 100dvh)":"",backgroundColor:p.getColor(k.Background)},children:b?b.status===tn.Closed&&!s?f.jsx(SB,{onOk:ie}):f.jsx(bB,{chat:b,isTyping:j,messages:S,shortcutMessages:E,onNewMessage:ue,onChatClose:pe,onEvaluateChat:ce,onNewChat:_e,onSendMessage:se,isHistoryMode:!!s,spamWarningMessage:W,onDismissSpamWarning:()=>q(null)}):B?f.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-6 text-center",children:[f.jsx("div",{className:"w-12 h-12 rounded-full flex items-center justify-center mb-4",style:{backgroundColor:p.getColor(k.InputBorder)},children:f.jsx(X.XCircle,{className:"w-6 h-6 opacity-50"})}),f.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Bağlantı Kurulamadı"}),f.jsx("p",{className:"text-sm opacity-60 mb-6",children:"Sunucuyla bağlantı sağlanırken bir sorun oluştu. Lütfen tekrar deneyin."}),f.jsx("button",{type:"button",onClick:()=>ie(!0),className:"px-6 py-2 rounded-lg font-medium transition-all",style:{backgroundColor:p.getColor(k.ButtonBackground),color:p.getColor(k.ButtonText),borderRadius:p.getRadius()},children:"Tekrar Dene"})]}):f.jsx(vC,{})})]})}function PB(){return GL(),null}function MB(){return f.jsxs(jB,{children:[f.jsx(AB,{children:f.jsx(RB,{})}),f.jsx(PB,{})]})}const OB=[{path:"/chat",component:MB,name:"chat"}],$C=[...OB],zC=[...XL],NB=[...$C,...zC];function lh({text:e}){var c,d,u,p;const{widget:t,isHaveChat:n,isTooltipVisible:r,setIsTooltipVisible:i,onTooltipClose:s}=re(),o=Se(),a=cs(),l=()=>{i(!1),s&&s()};return r?f.jsxs(Me.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:[f.jsx("button",{onClick:l,className:"absolute top-2 right-2 p-1 rounded-full hover:bg-black/10 transition-colors","aria-label":a(ne.CloseButtonAria),children:f.jsx(X.X,{className:"size-3"})}),f.jsx(Me.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=(c=t==null?void 0:t.appearance)==null?void 0:c.design)==null?void 0:d.tooltip_message_active:(p=(u=t==null?void 0:t.appearance)==null?void 0:u.design)==null?void 0:p.tooltip_message)||a(n?ne.TooltipActive:ne.TooltipDefault)}),f.jsx("div",{className:"absolute bottom-0 right-4 w-3 h-3 transform rotate-45 translate-y-1.5",style:{backgroundColor:o.getColor(k.TooltipBackground)}})]},"widget-tooltip"):null}function Rx({fallback:e,fallbackOpen:t}){const[n]=v.useState(window.document.title),r=dr(),{isHaveChat:i,open:s,soundPath:o}=re(),[a,l]=v.useState(!0),[c,d]=v.useState(0),[u,p]=v.useState(null),h=cs(),y=()=>{iF(o)},x=(w,m)=>{if(u&&clearInterval(u),w||!i||m===0||Number.isNaN(m)){window.document.title=n,p(null);return}const g=setInterval(()=>{if(w||!i||m===0||Number.isNaN(m)){window.document.title=n,clearInterval(g),p(null);return}const b=`${m} ${h(ne.NewMessagesNotification)} - ${n}`;window.document.title!==b?window.document.title=b:window.document.title=n},1e3);return p(g),()=>{clearInterval(g),p(null)}};return v.useEffect(()=>x(s&&a,c),[c,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(m=>m+1),y())};return r.on(ve.MessageAgentCreate,w),r.on(ve.ChatUserAssignee,y),()=>{r.off(ve.MessageAgentCreate,w),r.off(ve.ChatUserAssignee,y)}},[r,i,s,a]),s?null:i&&c>0?f.jsx(lh,{text:h(ne.NewMessagesNotification)}):!i&&t?e:null}function DB({children:e,border:t}){var M,P,B,U;const n=dr(),{open:r,setOpen:i,setIsHaveChat:s,isHaveChat:o,widget:a,onOpen:l,onClose:c,humanNeedRequested:d}=re(),[u]=v.useState(!0),p=gs(),h=ll(),y=dm(),x=Se(),{resolvedMode:w}=x,m=Po(),g=WL(),[b,C]=v.useState({x:0,y:0}),S=wP(),_=v.useRef(null),j=v.useRef(null),[A,E]=v.useState(!1),[L,F]=v.useState(!1);v.useEffect(()=>((()=>{E("ontouchstart"in window||navigator.maxTouchPoints>0)})(),window.addEventListener("touchstart",()=>{E(!0)},{once:!0}),()=>{window.removeEventListener("touchstart",()=>{E(!0)})}),[]),v.useEffect(()=>{o&&y.pathname==="/"&&h&&h.accessToken&&!d&&p.push("chat")},[o,y.pathname,h,p,d]),v.useEffect(()=>{r?requestAnimationFrame(()=>{F(!0)}):F(!1)},[r]);const D=W=>{if(!_.current||!j.current)return W;const q=_.current.getBoundingClientRect(),se={width:window.innerWidth,height:window.innerHeight},ie={top:20,right:20,bottom:40,left:20};let pe=W.x,ce=W.y;return q.right+pe-b.x>se.width-ie.right&&(pe=se.width-ie.right-q.width-(q.left-b.x)),q.left+pe-b.x<ie.left&&(pe=ie.left-(q.left-b.x)),q.bottom+ce-b.y>se.height-ie.bottom&&(ce=se.height-ie.bottom-q.height-(q.top-b.y)),q.top+ce-b.y<ie.top&&(ce=ie.top-(q.top-b.y)),{x:pe,y:ce}},G=()=>{i(!0),n&&(n.emit(He.WidgetOpen,{}),l&&l())},z=()=>{i(!1),n&&(n.emit(He.WidgetClose,{}),c&&c())},$=()=>{i(!1),s(!1),ac(a.client_id,Yi(h)),p.push("registration")};v.useEffect(()=>{if(m&&(o||g)&&G(),!(!n||!a))return n.on(ve.Banned,$),()=>{n.off(ve.Banned,$)}},[]);function N(W){A&&S.start(W)}return f.jsxs("section",{className:"relative w-full h-full",ref:j,"data-theme":w,children:[r&&f.jsx("div",{className:Ve("fixed z-300 overflow-hidden transition-all duration-300 ease-out",{"":t&&!m,"bottom-24 right-8 rounded-xl":!m,"!bottom-0 !right-0":m,"opacity-100 scale-100 translate-y-0":L,"opacity-0 scale-95 translate-y-2":!L}),style:{width:m?"100%":((P=(M=a==null?void 0:a.appearance)==null?void 0:M.design)==null?void 0:P.width)||"21rem",height:m?"var(--app-height, 100dvh)":((U=(B=a==null?void 0:a.appearance)==null?void 0:B.design)==null?void 0:U.height)||"30rem",left:m?"0":"",right:m?"0px !important":"",maxHeight:m?"var(--app-height, 100dvh)":"",boxShadow:m?"":`0 10px 25px -5px ${x.getColor(k.ShadowColor)}, 0 8px 10px -6px ${x.getColor(k.ShadowColor)}`,backgroundColor:x.getColor(k.Background)},children:e}),!A&&f.jsxs("div",{className:"fixed bottom-[40px] right-[20px] z-400",children:[f.jsx(Rx,{fallback:f.jsx(lh,{}),fallbackOpen:u}),!r&&f.jsxs(Rt,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:G,children:[f.jsx(Me.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:x.getColor(k.ButtonBackground)}}),f.jsx(X.Chat,{className:"size-6"})]},"desktop-open-button"),r&&!m&&f.jsx(Rt,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:z,children:f.jsx(X.ArrowDown2,{className:"size-6"})},"desktop-close-button")]}),A&&f.jsxs(Me.div,{ref:_,className:"fixed z-400 bottom-24 right-5",initial:{bottom:"96px",right:"20px"},animate:{x:b.x,y:b.y},drag:A,dragControls:S,dragMomentum:!1,dragElastic:0,onDragEnd:(W,q)=>{const se={x:b.x+q.offset.x,y:b.y+q.offset.y},ie=D(se);C(ie)},children:[f.jsx(Rx,{fallback:f.jsx(lh,{}),fallbackOpen:u}),!r&&f.jsx("div",{className:"cursor-move",onPointerDown:N,children:f.jsxs(Rt,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:G,children:[f.jsx(Me.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:x.getColor(k.ButtonBackground)}}),f.jsx(X.Chat,{className:"size-6"})]})},"chat-button"),r&&!m&&f.jsx(Rt,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:z,children:f.jsx(X.ArrowDown2,{className:"size-6"})},"desktop-close-button")]})]})}function IB(e){const{widget:t}=re();return f.jsx(PP,{widget:t,children:f.jsx(DB,{...e})})}function LB(){const{isHaveChat:e,isAIAgentMode:t}=re();return f.jsx(oA,{initialEntries:[e||t?"/chat":"/"],future:{v7_startTransition:!0},children:f.jsx(IB,{border:!0,children:f.jsxs(lA,{children:[$C.map((n,r)=>f.jsx(hp,{path:n.path,element:f.jsx(n.component,{})},r)),zC.map((n,r)=>f.jsx(hp,{path:n.path,element:f.jsx(n.component,{})},r))]})})})}const FB=v.forwardRef((e,t)=>{const n=localStorage.getItem("lc:device:id"),{data:r,isLoading:i,error:s}=dE(e.link_id,n||void 0),{widget:o,setWidget:a,setSoundPath:l,setDefaultValues:c,setOpen:d,setOnTooltipClose:u,setIsTooltipVisible:p,setOnOpen:h,setOnClose:y,onOpen:x,onClose:w}=re();return v.useImperativeHandle(t,()=>({open:()=>{d(!0),x&&x()},close:()=>{d(!1),w&&w()}})),v.useEffect(()=>{r&&pE(r)&&a(r),e.soundPath&&l(e.soundPath),e.defaultValues&&c(e.defaultValues),e.onTooltipClose&&u(e.onTooltipClose),e.showTooltip===!1&&p(!1),e.onOpen&&h(e.onOpen),e.onClose&&y(e.onClose)},[r,e.soundPath,e.defaultValues,e.onTooltipClose,e.showTooltip,e.onOpen,e.onClose]),i?f.jsx("div",{children:"Loading..."}):s||!r||!o?null:f.jsx(DI,{children:f.jsx(HL,{children:f.jsx(LB,{})})})}),BB=new YT;let Px=null;function $B(e){if(!e.container)return;const t=J.createRef();return Px=tb(e.container),Px.render(f.jsxs(JT,{client:BB,children:[f.jsx(FB,{...e,ref:t}),f.jsx(IA,{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()},identify:n=>{if(!e.link_id)return;const r=mi(e.link_id);dM({widget_id:e.link_id,device_id:r,decrypted_data:n})}}}window.widget=$B});export default zB();
127
+ */const DF=[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]],IF=OC("paperclip",DF);var DC={exports:{}},LF="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",FF=LF,$F=FF;function IC(){}function LC(){}LC.resetWarningCache=IC;var BF=function(){function e(r,i,s,o,a,l){if(l!==$F){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:LC,resetWarningCache:IC};return n.PropTypes=n,n};DC.exports=BF();var zF=DC.exports;const De=Pr(zF);function ys(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 VF=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 Co(e,t,n){const r=UF(e),{webkitRelativePath:i}=e,s=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof r.path!="string"&&Sx(r,"path",s),Sx(r,"relativePath",s),r}function UF(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),i=VF.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function Sx(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const HF=[".DS_Store","Thumbs.db"];function WF(e){return ys(this,void 0,void 0,function*(){return iu(e)&&qF(e.dataTransfer)?KF(e.dataTransfer,e.type):GF(e)?YF(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?QF(e):[]})}function qF(e){return iu(e)}function GF(e){return iu(e)&&iu(e.target)}function iu(e){return typeof e=="object"&&e!==null}function YF(e){return lh(e.target.files).map(t=>Co(t))}function QF(e){return ys(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Co(n))})}function KF(e,t){return ys(this,void 0,void 0,function*(){if(e.items){const n=lh(e.items).filter(i=>i.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(XF));return Cx(FC(r))}return Cx(lh(e.files).map(n=>Co(n)))})}function Cx(e){return e.filter(t=>HF.indexOf(t.name)===-1)}function lh(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 XF(e){if(typeof e.webkitGetAsEntry!="function")return _x(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?$C(t):_x(e,t)}function FC(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?FC(n):[n]],[])}function _x(e,t){return ys(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,Co(o)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Co(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function ZF(e){return ys(this,void 0,void 0,function*(){return e.isDirectory?$C(e):JF(e)})}function $C(e){const t=e.createReader();return new Promise((n,r)=>{const i=[];function s(){t.readEntries(o=>ys(this,void 0,void 0,function*(){if(o.length){const a=Promise.all(o.map(ZF));i.push(a),s()}else try{const a=yield Promise.all(i);n(a)}catch(a){r(a)}}),o=>{r(o)})}s()})}function JF(e){return ys(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const i=Co(r,e.fullPath);t(i)},r=>{n(r)})})})}var cf=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 Tx(e){return n6(e)||t6(e)||zC(e)||e6()}function e6(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
128
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function t6(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function n6(e){if(Array.isArray(e))return ch(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 Ax(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){BC(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 BC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Za(e,t){return s6(e)||i6(e,t)||zC(e,t)||r6()}function r6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
129
+ 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 ch(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 ch(e,t)}}function ch(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 i6(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 s6(e){if(Array.isArray(e))return e}var o6=typeof cf=="function"?cf:cf.default,a6="file-invalid-type",l6="file-too-large",c6="file-too-small",u6="too-many-files",d6=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:a6,message:"File type must be ".concat(r)}},jx=function(t){return{code:l6,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Rx=function(t){return{code:c6,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},f6={code:u6,message:"Too many files"};function VC(e,t){var n=e.type==="application/x-moz-file"||o6(e,t);return[n,n?null:d6(t)]}function UC(e,t,n){if(Ri(e.size))if(Ri(t)&&Ri(n)){if(e.size>n)return[!1,jx(n)];if(e.size<t)return[!1,Rx(t)]}else{if(Ri(t)&&e.size<t)return[!1,Rx(t)];if(Ri(n)&&e.size>n)return[!1,jx(n)]}return[!0,null]}function Ri(e){return e!=null}function p6(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=VC(l,n),d=Za(c,1),u=d[0],p=UC(l,r,i),h=Za(p,1),y=h[0],w=a?a(l):null;return u&&y&&!w})}function su(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Yl(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 Px(e){e.preventDefault()}function h6(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function m6(e){return e.indexOf("Edge/")!==-1}function g6(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return h6(e)||m6(e)}function Gn(){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!su(r)&&a&&a.apply(void 0,[r].concat(s)),su(r)})}}function v6(){return"showOpenFilePicker"in window}function y6(e){if(Ri(e)){var t=Object.entries(e).filter(function(n){var r=Za(n,2),i=r[0],s=r[1],o=!0;return HC(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(WC))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(n,r){var i=Za(r,2),s=i[0],o=i[1];return Ax(Ax({},n),{},BC({},s,o))},{});return[{description:"Files",accept:t}]}return e}function x6(e){if(Ri(e))return Object.entries(e).reduce(function(t,n){var r=Za(n,2),i=r[0],s=r[1];return[].concat(Tx(t),[i],Tx(s))},[]).filter(function(t){return HC(t)||WC(t)}).join(",")}function w6(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function b6(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function HC(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function WC(e){return/^.*\.[\w]+$/.test(e)}var k6=["children"],S6=["open"],C6=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],_6=["refKey","onChange","onClick"];function T6(e){return j6(e)||A6(e)||qC(e)||E6()}function E6(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
130
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function A6(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function j6(e){if(Array.isArray(e))return uh(e)}function uf(e,t){return M6(e)||P6(e,t)||qC(e,t)||R6()}function R6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
131
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qC(e,t){if(e){if(typeof e=="string")return uh(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 uh(e,t)}}function uh(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 P6(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 M6(e){if(Array.isArray(e))return e}function Mx(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 qe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Mx(Object(n),!0).forEach(function(r){dh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ou(e,t){if(e==null)return{};var n=N6(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 N6(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 ml=g.forwardRef(function(e,t){var n=e.children,r=ou(e,k6),i=O6(r),s=i.open,o=ou(i,S6);return g.useImperativeHandle(t,function(){return{open:s}},[s]),ee.createElement(g.Fragment,null,n(qe(qe({},o),{},{open:s})))});ml.displayName="Dropzone";var GC={disabled:!1,getFilesFromEvent:WF,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};ml.defaultProps=GC;ml.propTypes={children:De.func,accept:De.objectOf(De.arrayOf(De.string)),multiple:De.bool,preventDropOnDocument:De.bool,noClick:De.bool,noKeyboard:De.bool,noDrag:De.bool,noDragEventsBubbling:De.bool,minSize:De.number,maxSize:De.number,maxFiles:De.number,disabled:De.bool,getFilesFromEvent:De.func,onFileDialogCancel:De.func,onFileDialogOpen:De.func,useFsAccessApi:De.bool,autoFocus:De.bool,onDragEnter:De.func,onDragLeave:De.func,onDragOver:De.func,onDrop:De.func,onDropAccepted:De.func,onDropRejected:De.func,onError:De.func,validator:De.func};var fh={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function O6(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=qe(qe({},GC),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,p=t.onDrop,h=t.onDropAccepted,y=t.onDropRejected,w=t.onFileDialogCancel,b=t.onFileDialogOpen,m=t.useFsAccessApi,v=t.autoFocus,x=t.preventDropOnDocument,S=t.noClick,C=t.noKeyboard,_=t.noDrag,j=t.noDragEventsBubbling,A=t.onError,E=t.validator,D=g.useMemo(function(){return x6(n)},[n]),L=g.useMemo(function(){return y6(n)},[n]),O=g.useMemo(function(){return typeof b=="function"?b:Nx},[b]),q=g.useMemo(function(){return typeof w=="function"?w:Nx},[w]),$=g.useRef(null),B=g.useRef(null),I=g.useReducer(D6,fh),N=uf(I,2),R=N[0],z=N[1],H=R.isFocused,W=R.isFileDialogActive,G=g.useRef(typeof window<"u"&&window.isSecureContext&&m&&v6()),te=function(){!G.current&&W&&setTimeout(function(){if(B.current){var U=B.current.files;U.length||(z({type:"closeDialog"}),q())}},300)};g.useEffect(function(){return window.addEventListener("focus",te,!1),function(){window.removeEventListener("focus",te,!1)}},[B,W,q,G]);var se=g.useRef([]),pe=function(U){$.current&&$.current.contains(U.target)||(U.preventDefault(),se.current=[])};g.useEffect(function(){return x&&(document.addEventListener("dragover",Px,!1),document.addEventListener("drop",pe,!1)),function(){x&&(document.removeEventListener("dragover",Px),document.removeEventListener("drop",pe))}},[$,x]),g.useEffect(function(){return!r&&v&&$.current&&$.current.focus(),function(){}},[$,v,r]);var ue=g.useCallback(function(F){A?A(F):console.error(F)},[A]),ke=g.useCallback(function(F){F.preventDefault(),F.persist(),ye(F),se.current=[].concat(T6(se.current),[F.target]),Yl(F)&&Promise.resolve(i(F)).then(function(U){if(!(su(F)&&!j)){var ae=U.length,de=ae>0&&p6({files:U,accept:D,minSize:o,maxSize:s,multiple:a,maxFiles:l,validator:E}),Se=ae>0&&!de;z({isDragAccept:de,isDragReject:Se,isDragActive:!0,type:"setDraggedFiles"}),c&&c(F)}}).catch(function(U){return ue(U)})},[i,c,ue,j,D,o,s,a,l,E]),Ne=g.useCallback(function(F){F.preventDefault(),F.persist(),ye(F);var U=Yl(F);if(U&&F.dataTransfer)try{F.dataTransfer.dropEffect="copy"}catch{}return U&&u&&u(F),!1},[u,j]),Q=g.useCallback(function(F){F.preventDefault(),F.persist(),ye(F);var U=se.current.filter(function(de){return $.current&&$.current.contains(de)}),ae=U.indexOf(F.target);ae!==-1&&U.splice(ae,1),se.current=U,!(U.length>0)&&(z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Yl(F)&&d&&d(F))},[$,d,j]),V=g.useCallback(function(F,U){var ae=[],de=[];F.forEach(function(Se){var at=VC(Se,D),vt=uf(at,2),Un=vt[0],dn=vt[1],xs=UC(Se,o,s),fr=uf(xs,2),Dr=fr[0],ws=fr[1],Io=E?E(Se):null;if(Un&&Dr&&!Io)ae.push(Se);else{var ki=[dn,ws];Io&&(ki=ki.concat(Io)),de.push({file:Se,errors:ki.filter(function(Hn){return Hn})})}}),(!a&&ae.length>1||a&&l>=1&&ae.length>l)&&(ae.forEach(function(Se){de.push({file:Se,errors:[f6]})}),ae.splice(0)),z({acceptedFiles:ae,fileRejections:de,isDragReject:de.length>0,type:"setFiles"}),p&&p(ae,de,U),de.length>0&&y&&y(de,U),ae.length>0&&h&&h(ae,U)},[z,a,D,o,s,l,p,h,y,E]),P=g.useCallback(function(F){F.preventDefault(),F.persist(),ye(F),se.current=[],Yl(F)&&Promise.resolve(i(F)).then(function(U){su(F)&&!j||V(U,F)}).catch(function(U){return ue(U)}),z({type:"reset"})},[i,V,ue,j]),K=g.useCallback(function(){if(G.current){z({type:"openDialog"}),O();var F={multiple:a,types:L};window.showOpenFilePicker(F).then(function(U){return i(U)}).then(function(U){V(U,null),z({type:"closeDialog"})}).catch(function(U){w6(U)?(q(U),z({type:"closeDialog"})):b6(U)?(G.current=!1,B.current?(B.current.value=null,B.current.click()):ue(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."))):ue(U)});return}B.current&&(z({type:"openDialog"}),O(),B.current.value=null,B.current.click())},[z,O,q,m,V,ue,L,a]),Y=g.useCallback(function(F){!$.current||!$.current.isEqualNode(F.target)||(F.key===" "||F.key==="Enter"||F.keyCode===32||F.keyCode===13)&&(F.preventDefault(),K())},[$,K]),me=g.useCallback(function(){z({type:"focus"})},[]),re=g.useCallback(function(){z({type:"blur"})},[]),Ee=g.useCallback(function(){S||(g6()?setTimeout(K,0):K())},[S,K]),ot=function(U){return r?null:U},$t=function(U){return C?null:ot(U)},oe=function(U){return _?null:ot(U)},ye=function(U){j&&U.stopPropagation()},Oe=g.useMemo(function(){return function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},U=F.refKey,ae=U===void 0?"ref":U,de=F.role,Se=F.onKeyDown,at=F.onFocus,vt=F.onBlur,Un=F.onClick,dn=F.onDragEnter,xs=F.onDragOver,fr=F.onDragLeave,Dr=F.onDrop,ws=ou(F,C6);return qe(qe(dh({onKeyDown:$t(Gn(Se,Y)),onFocus:$t(Gn(at,me)),onBlur:$t(Gn(vt,re)),onClick:ot(Gn(Un,Ee)),onDragEnter:oe(Gn(dn,ke)),onDragOver:oe(Gn(xs,Ne)),onDragLeave:oe(Gn(fr,Q)),onDrop:oe(Gn(Dr,P)),role:typeof de=="string"&&de!==""?de:"presentation"},ae,$),!r&&!C?{tabIndex:0}:{}),ws)}},[$,Y,me,re,Ee,ke,Ne,Q,P,C,_,r]),M=g.useCallback(function(F){F.stopPropagation()},[]),J=g.useMemo(function(){return function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},U=F.refKey,ae=U===void 0?"ref":U,de=F.onChange,Se=F.onClick,at=ou(F,_6),vt=dh({accept:D,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:ot(Gn(de,P)),onClick:ot(Gn(Se,M)),tabIndex:-1},ae,B);return qe(qe({},vt),at)}},[B,n,a,P,r]);return qe(qe({},R),{},{isFocused:H&&!r,getRootProps:Oe,getInputProps:J,rootRef:$,inputRef:B,open:ot(K)})}function D6(e,t){switch(t.type){case"focus":return qe(qe({},e),{},{isFocused:!0});case"blur":return qe(qe({},e),{},{isFocused:!1});case"openDialog":return qe(qe({},fh),{},{isFileDialogActive:!0});case"closeDialog":return qe(qe({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return qe(qe({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return qe(qe({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return qe({},fh);default:return e}}function Nx(){}const YC=5*1024*1024,_o={"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"]},Ox=Object.values(_o).flat();function I6(e){var r;if(e.size>YC)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(_o).includes(e.type)||Ox.includes(t)?{isValid:!0,error:""}:{isValid:!1,error:`Desteklenmeyen dosya tipi. Kabul edilen tipler: ${Ox.join(", ")}`}}function au(e){for(const t of e){const n=I6(t);if(!n.isValid)return n}return{isValid:!0,error:""}}function QC({onDrop:e}){const t=n=>{const r=au(n);if(!r.isValid){alert(r.error);return}e(n)};return f.jsx("div",{className:"flex items-center justify-center border rounded-md cursor-pointer bg-slate-100 dropzone border-slate-200 dz-clickable",children:f.jsx(ml,{onDrop:t,accept:Object.keys(_o).reduce((n,r)=>(n[r]=_o[r],n),{}),maxSize:YC,children:({getRootProps:n,getInputProps:r})=>f.jsxs("div",{className:"w-full py-5 text-lg text-center dz-message needsclick",...n(),children:[f.jsx("input",{...r()}),f.jsx("div",{className:"mb-3",children:f.jsx(OF,{className:"block size-12 mx-auto text-slate-500 fill-slate-200"})}),f.jsxs("h5",{className:"mb-0 font-normal text-slate-500 text-15",children:["Yüklemek istediğiniz görseli buraya sürükleyin veya"," ",f.jsx("span",{className:"text-custom-500",children:"seçmek için tıklayın"})]})]})})})}QC.Button=({onDrop:e})=>{const t=be(),n=r=>{const i=au(r);if(!i.isValid){en({description:i.error,variant:"error"});return}e(r)};return f.jsx(ml,{onDrop:n,accept:Object.keys(_o).reduce((r,i)=>(r[i]=_o[i],r),{}),children:({getRootProps:r,getInputProps:i})=>f.jsxs("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center text-center dz-message needsclick cursor-pointer",...r(),children:[f.jsx("input",{...i()}),f.jsx(IF,{style:{color:t.getColor(k.IconColor)},className:"size-5"})]})})};const Dx=[{name:"Yüzler",icon:"😊",emojis:["😀","😃","😄","😁","😆","😅","🤣","😂","🙂","😊","😇","🥰","😍","🤩","😘","😗","😚","😙","🥲","😋","😛","😜","🤪","😝","🤑","🤗","🤭","🤫","🤔","🫡","🤐","🤨","😐","😑","😶","🫥","😏","😒","🙄","😬","😮‍💨","🤥","😌","😔","😪","🤤","😴","😷","🤒","🤕","🤢","🤮","🥴","😵","🤯","🥳","🥸","😎","🤓","🧐","😕","🫤","😟","🙁","😮","😯","😲","😳","🥺","🥹","😦","😧","😨","😰","😥","😢","😭","😱","😖","😣","😞","😓","😩","😫","🥱","😤","😡","😠"]},{name:"El",icon:"👋",emojis:["👋","🤚","🖐️","✋","🖖","🫱","🫲","🫳","🫴","👌","🤌","🤏","✌️","🤞","🫰","🤟","🤘","🤙","👈","👉","👆","🖕","👇","☝️","🫵","👍","👎","✊","👊","🤛","🤜","👏","🙌","🫶","👐","🤲","🤝","🙏","💪","🦾"]},{name:"Kalp",icon:"❤️",emojis:["❤️","🧡","💛","💚","💙","💜","🖤","🤍","🤎","💔","❤️‍🔥","❤️‍🩹","❣️","💕","💞","💓","💗","💖","💘","💝","💟","♥️","💋","🫂"]},{name:"Hayvan",icon:"🐱",emojis:["🐶","🐱","🐭","🐹","🐰","🦊","🐻","🐼","🐻‍❄️","🐨","🐯","🦁","🐮","🐷","🐸","🐵","🐔","🐧","🐦","🐤","🦆","🦅","🦉","🦇","🐺","🐗","🐴","🦄","🐝","🪱","🐛","🦋","🐌","🐞","🐜","🪰","🐢","🐍","🦎","🐙"]},{name:"Yiyecek",icon:"🍕",emojis:["🍎","🍐","🍊","🍋","🍌","🍉","🍇","🍓","🫐","🍈","🍒","🍑","🥭","🍍","🥥","🥝","🍅","🍆","🥑","🫛","🥦","🥬","🌶️","🫑","🍕","🍔","🍟","🌭","🍿","🧀","🥚","🍳","🥞","🧇","🥓","🍖","🍗","🌮","🌯","🥗","☕","🍵","🧃","🥤","🍺","🍷","🥂","🍰"]},{name:"Aktivite",icon:"⚽",emojis:["⚽","🏀","🏈","⚾","🥎","🎾","🏐","🏉","🥏","🎱","🏓","🏸","🥅","⛳","🎯","🏹","🎣","🤿","🥊","🥋","🎿","⛷️","🏂","🪂","🏋️","🤸","🎮","🕹️","🎲","🧩","🎭","🎨","🎬","🎤","🎧","🎼","🎹","🥁","🎷","🎺"]},{name:"Nesne",icon:"💡",emojis:["⌚","📱","💻","⌨️","🖥️","🖨️","🖱️","💾","💿","📷","📹","🎥","📞","📟","📠","📺","🔋","🔌","💡","🔦","🕯️","🧯","💰","💳","💎","🔧","🔨","🪛","🔩","⚙️","🔑","🗝️","📦","📫","📝","✏️","🖊️","📎","📌","✂️"]}];function KC({onSelect:e,isOpen:t,onClose:n}){const r=be(),[i,s]=g.useState(0),o=g.useRef(null),a=g.useRef(null);return g.useEffect(()=>{if(!t)return;const l=c=>{o.current&&!o.current.contains(c.target)&&n()};return document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[t,n]),g.useEffect(()=>{a.current&&(a.current.scrollTop=0)},[i]),f.jsx(Ar,{children:t&&f.jsxs(Re.div,{ref:o,onMouseDown:l=>l.stopPropagation(),initial:{opacity:0,y:8,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:8,scale:.95},transition:{duration:.15},className:"absolute bottom-full left-0 mb-2 z-50 overflow-hidden",style:{width:"280px",backgroundColor:r.getColor(k.Background),border:`1px solid ${r.getColor(k.Border)}`,borderRadius:r.getRadius(),boxShadow:`0 4px 20px ${r.getColor(k.ShadowColor)}`},children:[f.jsx("div",{className:"flex items-center gap-0.5 px-1.5 py-1.5 overflow-x-auto",style:{borderBottom:`1px solid ${r.getColor(k.DividerColor)}`},children:Dx.map((l,c)=>f.jsx("button",{type:"button",onClick:()=>s(c),className:"flex-shrink-0 w-8 h-8 flex items-center justify-center rounded-md text-base transition-colors",style:{backgroundColor:c===i?r.getColor(k.InputBackground):"transparent"},title:l.name,children:l.icon},l.name))}),f.jsx("div",{ref:a,className:"grid grid-cols-8 gap-0.5 p-1.5 overflow-y-auto",style:{maxHeight:"200px"},children:Dx[i].emojis.map((l,c)=>f.jsx("button",{type:"button",onClick:()=>{e(l),n()},className:"w-8 h-8 flex items-center justify-center rounded-md text-lg hover:scale-110 transition-transform",style:{backgroundColor:"transparent"},onMouseEnter:d=>{d.currentTarget.style.backgroundColor=r.getColor(k.InputBackground)},onMouseLeave:d=>{d.currentTarget.style.backgroundColor="transparent"},children:l},`${l}-${c}`))})]})})}const Ix=2;function L6({onNewMessage:e,client_id:t,is_uploadable:n,messages:r,onEvaluateChat:i,onNewChat:s,onSendMessage:o,isHistoryMode:a=!1,historyChat:l}){const c=g.useRef(null),d=dr(),u=bM(t),p=be(),h=us(),{setIsInputFocused:y,showActionButtons:w,setShowActionButtons:b}=ne(),[m,v]=g.useState(""),[x,S]=g.useState("3rem"),[C,_]=g.useState(!1),[j,A]=g.useState([]),[E,D]=g.useState(0),[L,O]=g.useState(!1),[q,$]=g.useState(0),[B,I]=g.useState(null),[N,R]=g.useState(!1),z=()=>{if(!a||!l||l.status!==tn.Closed||!l.closed_at)return!1;const Q=new Date(l.closed_at);return(new Date().getTime()-Q.getTime())/(1e3*60*60)>2},H=a&&(l==null?void 0:l.status)===tn.Closed&&z();g.useEffect(()=>{if(r.length>0){const Q=r[r.length-1];Q.id!==B&&(I(Q.id),Q.sender_type===ve.User&&(D(0),O(!1)))}},[r,B]),g.useEffect(()=>{let Q;return L&&q>0&&(Q=window.setTimeout(()=>{$(V=>V<=1?(O(!1),D(0),0):V-1)},1e3)),()=>clearTimeout(Q)},[L,q]),g.useEffect(()=>{const Q=c.current;if(Q){const V=()=>y(!0),P=()=>y(!1);return Q.addEventListener("focus",V),Q.addEventListener("blur",P),()=>{Q.removeEventListener("focus",V),Q.removeEventListener("blur",P)}}},[y]),g.useEffect(()=>{const Q=()=>{b(!0)},V=()=>{b(!1)};return d==null||d.on(ge.ChatUserShowButton,Q),d==null||d.on(ge.MessageUserCreate,V),()=>{d==null||d.off(ge.ChatUserShowButton,Q),d==null||d.off(ge.MessageUserCreate,V)}},[d,b]),g.useEffect(()=>{r.length>0&&r[r.length-1].activity_type==="admin_join"&&b(!1)},[r,b]),ru("lc:rate-limit",Q=>{const V=Q.detail&&Q.detail.seconds||3;O(!0),$(V),D(0)}),ru("paste",Q=>{const V=Q.clipboardData.items,P=[];for(const K of V){const Y=K.getAsFile();Y&&P.push(Y)}if(P.length>0&&!n){en({description:h(ie.FileUploadDisabled),variant:"error"});return}if(P.length>0){const K=au(P);if(!K.isValid){en({description:K.error,variant:"error"});return}A([...j,...P])}});const W=async()=>{const Q=m.trim(),V=!!n&&j.length>0,P=Q.length>0&&Q.length<Ix;if(!Q&&!V||P)return;if(E>5&&!L){O(!0),$(3);return}if(L||C)return;const K=m,Y=[...j];v(""),A([]),c.current&&(c.current.style.height="3rem",S("3rem")),_(!0);let me;if(n&&Y.length>0){const[re,Ee]=await u.mutateAsync(Y);if(!zn(Ee)){ZA(re,Ee),_(!1),v(K),A(Y);return}kM(re)&&(me=re.file_urls)}if(o){o(K,me),_(!1);return}d==null||d.emit(He.MessageCreate,{content:K,files:me},re=>{e(re),_(!1),D(Ee=>Ee+1),b(!1)})},te=(m.trim().length>=Ix||j.length>0)&&!C&&!L,se=Q=>{d==null||d.emit(He.MessageTyping,{content:Q})},pe=()=>{d==null||d.emit(He.ChatClose,{}),b(!1),i==null||i()},ue=()=>{d==null||d.emit(He.ChatClose,{}),b(!1),s==null||s()},ke=g.useCallback(Q=>{const V=c.current;if(V){const P=V.selectionStart,K=V.selectionEnd,Y=m.substring(0,P)+Q+m.substring(K);Y.length<=2e3&&(v(Y),se(Y),setTimeout(()=>{V.selectionStart=V.selectionEnd=P+Q.length,V.focus()},0))}else{const P=m+Q;P.length<=2e3&&(v(P),se(P))}},[m]),Ne=a&&(l==null?void 0:l.status)===tn.Closed;return H?null:f.jsxs(f.Fragment,{children:[Ne&&f.jsxs("div",{className:"px-5 flex flex-col gap-2",children:[f.jsxs("div",{className:"p-3 rounded-lg flex items-center gap-2",style:{backgroundColor:p.getColor(k.InputBackground),borderColor:p.getColor(k.InputBorder),borderWidth:"1px",borderStyle:"solid",borderRadius:p.getRadius()},children:[f.jsx(Z.Lock,{className:"w-5 h-5 flex-shrink-0",style:{color:p.getColor(k.FooterText)}}),f.jsx("span",{className:"text-sm",style:{color:p.getColor(k.FooterText)},children:"Bu sohbet kapatılmıştır."})]}),f.jsxs(Rt,{size:"lg",onClick:()=>{s==null||s()},className:"rounded-lg gap-2 transition-all",children:[f.jsx(Z.Plus,{className:"size-4"}),f.jsx("span",{children:"Yeni Sohbet Başlat"})]}),f.jsx(So,{variant:"block"})]}),L&&f.jsxs(Re.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:p.getColor(k.ErrorBackground),borderColor:p.getColor(k.ErrorBorder),borderWidth:"1px",borderStyle:"solid",borderRadius:p.getRadius()},children:[f.jsx(Z.XCircle,{className:"size-4 mr-2",style:{color:p.getColor(k.ErrorText)}}),f.jsx("span",{className:"text-sm font-medium",style:{color:p.getColor(k.ErrorText)},children:h(ie.RateLimitMessage).replace("{seconds}",q.toString())})]}),w&&f.jsxs(Re.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mb-2 mx-3 flex gap-2",children:[f.jsxs(Rt,{className:"flex-1 flex items-center justify-center gap-2",size:"md",variant:"primary",kind:"outline",onClick:pe,style:{borderColor:p.getColor(k.ButtonBackground),color:p.getColor(k.ButtonBackground),backgroundColor:"transparent"},children:[f.jsx(Z.Star,{className:"size-4"}),f.jsx("span",{children:"Değerlendir"})]}),f.jsxs(Rt,{size:"md",className:"flex-1 flex items-center justify-center gap-2",onClick:ue,children:[f.jsx(Z.Plus,{className:"size-4"}),f.jsx("span",{children:"Yeni Sohbet"})]})]}),(!a||a&&(l==null?void 0:l.status)!==tn.Closed&&(l==null?void 0:l.status)!==tn.Deleted)&&f.jsxs("form",{className:"flex flex-col relative",onSubmit:Q=>{Q.preventDefault(),W()},children:[f.jsx("div",{className:"mx-4 border-t",style:{borderColor:p.getColor(k.DividerColor)}}),n&&j&&j.length>0&&f.jsx("div",{className:"px-3 pt-2 overflow-x-auto",children:f.jsx(PC,{files:j,onDelete:Q=>{A(j.filter((V,P)=>P!==Q))}})}),f.jsxs("div",{className:"flex gap-2 px-3 py-1 w-full",children:[f.jsxs("div",{className:"flex-1 min-w-0 relative",children:[f.jsx(Ju,{id:"message",inputRef:c,className:"grow",noMargin:!0,borderless:!0,autoComplete:"off",disabled:L,style:{height:x,maxHeight:"6rem",opacity:L?.5:1,cursor:L?"not-allowed":"text",boxShadow:"none"},placeholder:L?h(ie.RateLimitMessage).replace("{seconds}",q.toString()):h(ie.MessagePlaceholder),value:m,maxLength:2e3,onChange:Q=>{if(L)return;const V=Q.target.value;if(V.length<=2e3&&(v(V),se(V)),V.length>0&&Q.currentTarget.scrollHeight>Q.currentTarget.clientHeight){const P=`${Q.currentTarget.scrollHeight}px`;Q.currentTarget.style.height=P,S(P)}else Q.currentTarget.style.height="3rem",S("3rem")},onKeyDown:Q=>{if(L){Q.preventDefault();return}Q.key==="Enter"&&!Q.shiftKey&&(Q.preventDefault(),W())}}),m.length>=500&&f.jsx("div",{className:"absolute bottom-2 right-3 text-xs pointer-events-none",style:{color:m.length>=2e3?p.getColor(k.ErrorText):p.getColor(k.FooterText),fontWeight:m.length>=2e3?"600":"normal"},children:2e3-m.length})]}),f.jsx("div",{className:"flex items-center gap-1 flex-shrink-0 pb-0.5",children:f.jsx(Re.div,{whileTap:{scale:.9},children:f.jsx(Rt,{className:"!bg-transparent rounded-full w-8 h-8 min-w-8 flex items-center justify-center transition-colors disabled:!opacity-100",type:"submit",size:"xs",disabled:!te,style:{opacity:1,color:te?p.getColor(k.ButtonBackground):p.getColor(k.FooterText)},children:C?f.jsx(Z.Spin,{className:"size-4 animate-spin"}):L?f.jsx("span",{className:"text-[10px] font-bold",children:q}):f.jsx(Z.PaperAirplane,{className:"size-5"})})})})]}),f.jsx(KC,{isOpen:N,onClose:()=>R(!1),onSelect:ke}),f.jsxs("div",{className:"px-3 pb-1.5 flex items-center justify-between",children:[f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx("button",{type:"button",onClick:()=>R(!N),className:"p-1.5 rounded-md transition-colors",style:{color:p.getColor(k.IconColor)},children:f.jsx(Z.Emoji,{className:"size-5"})}),n&&f.jsx(QC.Button,{onDrop:Q=>{if(Q.length){const V=au(Q);if(!V.isValid){en({description:V.error,variant:"error"});return}A([...j,...Q])}}})]}),f.jsx(So,{variant:"inline"})]})]})]})}const Lx=[["#6366f1","#8b5cf6"],["#3b82f6","#06b6d4"],["#10b981","#34d399"],["#f59e0b","#f97316"],["#ef4444","#f472b6"],["#8b5cf6","#ec4899"],["#14b8a6","#22d3ee"],["#f43f5e","#fb923c"]];function ph({name:e,avatar:t,className:n="text-neutral-500",textColor:r,subtitle:i}){const s=g.useMemo(()=>{const o=e.charCodeAt(0)||0,a=Lx[o%Lx.length];return`linear-gradient(135deg, ${a[0]}, ${a[1]})`},[e]);return f.jsxs(Re.div,{initial:{opacity:.8},animate:{opacity:1},className:"flex gap-2 items-center",children:[f.jsx("div",{className:"min-w-max",children:f.jsxs("span",{children:[t&&f.jsx("img",{className:"size-10 rounded-full border border-white/20 shadow-sm",src:t,"aria-label":e}),!t&&f.jsx("div",{className:"size-10 rounded-full flex items-center justify-center font-semibold text-white shadow-sm",style:{background:s},children:e.charAt(0).toUpperCase()})]})}),f.jsxs("div",{className:"flex flex-col",children:[f.jsx("span",{className:Ie("line-clamp-1 font-medium",n),style:r?{color:r}:void 0,children:e}),i&&f.jsx("span",{className:"text-xs opacity-75 line-clamp-1",style:r?{color:r}:void 0,children:i})]})]})}const Fx=[["#6366f1","#8b5cf6"],["#3b82f6","#06b6d4"],["#10b981","#34d399"],["#f59e0b","#f97316"],["#ef4444","#f472b6"],["#8b5cf6","#ec4899"],["#14b8a6","#22d3ee"],["#f43f5e","#fb923c"]],zs=32;function F6({participant:e,className:t}){const n=g.useMemo(()=>{const r=e.name.charCodeAt(0)||0,i=Fx[r%Fx.length];return`linear-gradient(135deg, ${i[0]}, ${i[1]})`},[e.name]);return f.jsx("span",{title:e.name,className:Ie("block rounded-full border border-white/25 shadow-sm overflow-hidden",t),children:e.avatar?f.jsx("img",{className:"rounded-full object-cover",style:{width:zs,height:zs},src:e.avatar,alt:"",title:e.name}):f.jsx("div",{className:"flex items-center justify-center font-semibold text-white text-xs",style:{width:zs,height:zs,background:n},children:e.name.charAt(0).toUpperCase()})})}const df=3;function $x({participants:e,textColor:t,className:n}){const r=g.useMemo(()=>e.map(l=>l.name).join(", "),[e]);if(e.length===0)return null;const i=e.length>df,s=i?e.slice(0,df-1):e,o=i?e.length-(df-1):0,a=e[0];return f.jsxs("div",{className:Ie("group/participant relative inline-flex max-w-full",n),children:[f.jsxs(Re.div,{initial:{opacity:.8},animate:{opacity:1},className:"flex gap-2 items-center min-w-0 cursor-default",children:[f.jsx("div",{className:"flex items-center flex-shrink-0",children:f.jsxs("div",{className:"flex flex-row items-center -space-x-2",children:[s.map((l,c)=>f.jsx("div",{className:"relative",style:{zIndex:s.length-c},title:l.name,children:f.jsx(F6,{participant:l})},`${Ks(l)}-${c}`)),i?f.jsxs("div",{title:r,className:"relative flex items-center justify-center rounded-full border border-white/25 bg-black/25 text-xs font-semibold shadow-sm",style:{width:zs,height:zs,zIndex:0},children:["+",o]}):null]})}),f.jsx("div",{className:"flex flex-col min-w-0",children:f.jsx("span",{className:"line-clamp-1 font-medium text-neutral-500",style:t?{color:t}:void 0,title:a.name,children:a.name})})]}),f.jsx("div",{role:"tooltip",className:"pointer-events-none absolute left-0 top-full z-[100] mt-1 max-w-[min(280px,calc(100vw-2rem))] rounded-md px-2 py-1.5 text-xs font-normal leading-snug shadow-lg opacity-0 transition-opacity duration-150 group-hover/participant:opacity-100 bg-neutral-900 text-white border border-white/10",children:r})]})}function $6({chat:e,isTyping:t,shortcutMessages:n,messages:r,onNewMessage:i,onChatClose:s,onEvaluateChat:o,onNewChat:a,onSendMessage:l,isHistoryMode:c=!1,spamWarningMessage:d,onDismissSpamWarning:u}){const{widget:p,setOpen:h,open:y,isHaveChat:w,isInputFocused:b}=ne(),m=ne(q=>q.historyChat),v=be(),x=Do(),S=nd(),C=dr(),_=vs(),j=g.useRef(new Set),A=g.useRef(!1),E=()=>{h(!1)},D=g.useCallback(()=>{if(!C||!y||!w||!Array.isArray(r))return;const q=r.filter($=>$.sender_type===ve.User&&!j.current.has($.id)).map($=>$.id);q.length!==0&&C.emit(He.MessageRead,{message_ids:q},$=>{if($&&$.success===!0)for(const B of q)j.current.add(B)})},[C,r,y,w]);g.useEffect(()=>{y&&(A.current=!0),y&&w&&(b||A.current)&&(D(),A.current=!1)},[y,w,b,D]);const L=()=>{var $,B,I,N;return((N=(I=(B=($=p==null?void 0:p.appearance)==null?void 0:$.head)==null?void 0:B.elements)==null?void 0:I.find(R=>R.type==="title"))==null?void 0:N.content)||"Müşteri Hizmetleri"},O=()=>{var I,N,R,z,H,W,G,te;if(c&&m)return"Geçmiş sohbet";const q=((N=(I=e==null?void 0:e.participants)==null?void 0:I[0])==null?void 0:N.name)||(e==null?void 0:e.agent_name);if(q)return q;const $=(z=(R=p==null?void 0:p.appearance)==null?void 0:R.design)==null?void 0:z.greeting_header;return $||((te=(G=(W=(H=p==null?void 0:p.appearance)==null?void 0:H.head)==null?void 0:W.elements)==null?void 0:G.find(se=>se.type==="text"))==null?void 0:te.content)||"Bizimle Sohbet Edin"};return f.jsxs(f.Fragment,{children:[f.jsxs("header",{className:"px-4 py-3 flex items-center justify-between flex-shrink-0 overflow-visible min-h-[52px]",style:{backgroundColor:v.getColor(k.HeaderBackground),color:v.getColor(k.HeaderText),borderColor:v.getColor(k.HeaderBorder),...x?{}:{borderTopLeftRadius:v.getRadius(),borderTopRightRadius:v.getRadius()}},children:[f.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[c&&f.jsx("button",{type:"button",onClick:()=>{ne.getState().setHistoryChat(null),ne.getState().setHistoryMessages(null),ne.getState().setShowHistoryOnRegistration(!0),_.push("registration")},className:"flex-shrink-0 p-1 hover:opacity-80 transition-opacity",children:f.jsx(Z.ArrowLeft,{className:"w-5 h-5"})}),(()=>{if(c&&m){const q=xF(m);if(q.length>1)return f.jsx($x,{participants:q,textColor:v.getColor(k.HeaderText)});if(q.length===1)return f.jsx(ph,{name:q[0].name,avatar:q[0].avatar,textColor:v.getColor(k.HeaderText)})}if(!c&&e){const q=e.participants&&e.participants.length>0?e.participants:Cg(e.agent_name,e.agent_avatar);if(q.length>1)return f.jsx($x,{participants:q,textColor:v.getColor(k.HeaderText)});if(q.length===1)return f.jsx(ph,{name:q[0].name,avatar:q[0].avatar,textColor:v.getColor(k.HeaderText)})}return f.jsx("div",{className:"flex-1 min-w-0",children:c?f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"font-medium truncate",children:L()}),f.jsx("div",{className:"text-sm opacity-90 truncate",children:O()})]}):f.jsx("div",{className:"font-medium truncate",children:O()})})})()]}),f.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(!c||c&&(e==null?void 0:e.status)!==tn.Closed)&&f.jsx(SF,{onChatClose:s}),S&&f.jsx("button",{type:"button",onClick:E,className:"p-1 hover:opacity-80 transition-opacity",children:f.jsx(Z.X,{className:"w-5 h-5 cursor-pointer"})})]})]}),f.jsx(MC,{messages:r,isTyping:t||n.length>0,chat:e}),f.jsx(Ar,{children:d&&f.jsxs(Re.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{duration:.2},className:"mx-3 mb-2 p-3 rounded-lg flex items-start gap-2",style:{backgroundColor:v.getColor(k.ErrorBackground),borderColor:v.getColor(k.ErrorBorder),borderWidth:"1px",borderStyle:"solid",borderRadius:v.getRadius()},children:[f.jsx(Z.XCircle,{className:"size-4 flex-shrink-0 mt-0.5",style:{color:v.getColor(k.ErrorText)}}),f.jsx("span",{className:"text-sm",style:{color:v.getColor(k.ErrorText)},children:d}),f.jsx("button",{type:"button",className:"ml-auto flex-shrink-0",onClick:u,style:{color:v.getColor(k.ErrorText)},children:f.jsx(Z.X,{className:"size-4"})})]})}),f.jsx(L6,{client_id:(p==null?void 0:p.client_id)||"",is_uploadable:e.is_customer_uploadable,messages:r,onNewMessage:q=>{i(q)},onEvaluateChat:o,onNewChat:a,onSendMessage:l,isHistoryMode:c,historyChat:c?ne.getState().historyChat:void 0})]})}function B6({rating:e,onChange:t}){const n=be();return f.jsx("div",{className:"flex items-center justify-center gap-0.5 my-2",children:[1,2,3,4,5].map(r=>{const i=r<=e,s=!i&&r-.5<=e;return f.jsxs(Re.div,{className:"relative w-8 h-8 cursor-pointer",whileHover:{scale:1.15},whileTap:{scale:.95},transition:{duration:.15},children:[f.jsx("svg",{className:"w-8 h-8",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:f.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&&f.jsx("div",{className:"absolute top-0 left-0 w-4 h-8 overflow-hidden",children:f.jsx("svg",{className:"w-8 h-8",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:f.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&&f.jsx("svg",{className:"w-8 h-8 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:f.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"})}),f.jsxs("div",{className:"absolute inset-0 flex",children:[f.jsx("button",{type:"button",onClick:()=>t(r-.5),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${r-.5} stars`}),f.jsx("button",{type:"button",onClick:()=>t(r),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${r} stars`})]})]},r)})})}function z6({onOk:e}){const t=be(),n=us(),r=nd(),[i,s]=g.useState(0),[o,a]=g.useState(!1),[l,c]=g.useState(10),d=wM(),[u,p]=g.useState(!1);g.useEffect(()=>{if(o){const b=setInterval(()=>{c(m=>m<=1?(clearInterval(b),e(!0),0):m-1)},1e3);return()=>clearInterval(b)}},[o]);const h=sg({comment:tu()}),y=uC({init:{comment:""},schema:h,action:async b=>{const[m,v]=await d.mutateAsync({rating:i,comment:b.comment});if(zn(v)){a(!0);return}yo(m,{form:y})}}),w=()=>{e(!0)};return f.jsxs(Re.div,{className:"flex flex-col h-full",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[f.jsxs("header",{className:"min-h-[48px] flex-shrink-0 overflow-visible flex justify-between items-center z-10 px-5 py-2.5",style:{borderColor:t.getColor(k.HeaderBorder),color:t.getColor(k.HeaderText)},children:[f.jsx("div",{className:"font-medium !text-sm",children:n(o?ie.RatingHeaderThanks:ie.RatingHeaderEvaluate)}),r&&f.jsx("button",{type:"button",onClick:()=>e(!1),className:"p-1.5 rounded-md hover:opacity-70 transition-opacity",style:{color:t.getColor(k.HeaderText)},children:f.jsx(Z.X,{className:"size-4"})})]}),f.jsx("div",{className:"flex-1 p-4 overflow-y-auto flex flex-col",children:o?f.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[f.jsx("div",{className:"mb-3",style:{color:t.getColor(k.SuccessText)},children:f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-12 w-12",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),f.jsx("h2",{className:"text-lg font-semibold mb-1.5",style:{color:t.getColor(k.HeaderText)},children:n(ie.RatingThankYouTitle)}),f.jsx("p",{className:"mb-6 text-sm",style:{color:t.getColor(k.FooterText)},children:n(ie.RatingThankYouDescription)}),f.jsx("p",{className:"mb-3 text-xs",style:{color:t.getColor(k.FooterText)},children:n(ie.RatingCountdown).replace("{seconds}",l.toString())}),f.jsx(Rt,{onClick:w,size:"md",className:"w-full max-w-xs",children:n(ie.RatingNewConversation)})]}):f.jsxs("div",{className:"flex flex-col",children:[f.jsx("div",{className:"text-center mb-4",children:f.jsx("p",{className:"text-sm",style:{color:t.getColor(k.FooterText)},children:n(ie.RatingDescription)})}),f.jsxs("div",{className:"mb-4",children:[f.jsx("h3",{className:"text-center font-medium mb-1.5 text-base",style:{color:t.getColor(k.RatingRateConversationText)},children:n(ie.RatingRateConversation)}),f.jsx(B6,{rating:i,onChange:b=>{s(b),b>=1&&p(!1)}}),i>0&&f.jsx("p",{className:"text-center text-xs mt-1",style:{color:t.getColor(k.FooterText)},children:n(ie.RatingYourScore).replace("{score}",Number.isInteger(i)?i.toString():i.toFixed(1))}),i>0&&i<1||u?f.jsx("p",{className:"text-center text-xs mt-1",style:{color:t.getColor(k.ErrorText)},children:n(ie.RatingMinimumError)}):null]}),f.jsxs("form",{onSubmit:y.handleSubmit,className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("label",{htmlFor:"comment",className:"block text-xs font-medium mb-1",style:{color:t.getColor(k.InputText)},children:n(ie.RatingComment)}),f.jsx(Ju,{id:"comment",onChange:y.handleChange,onBlur:y.handleBlur,value:y.values.comment,placeholder:n(ie.RatingCommentPlaceholder),className:"rounded-lg",error:y.errors.comment})]}),f.jsxs("div",{className:"flex flex-col gap-2 pt-1",children:[f.jsx(Rt,{type:"submit",size:"lg",onClick:b=>{i<1&&(b.preventDefault(),b.stopPropagation(),p(!0))},className:"w-full",children:n(ie.RatingSubmit)}),f.jsx(Rt,{onClick:w,size:"lg",variant:"secondary",kind:"subtle",className:"w-full",bgKey:k.GreeterBackground,textKey:k.GreeterText,children:n(ie.RatingNewConversation)})]})]})]})}),f.jsx(So,{variant:"block"})]})}function V6({onSendMessage:e,disabled:t,loading:n=!1}){const r=g.useRef(null),i=be(),s=us(),{setIsInputFocused:o}=ne(),[a,l]=g.useState(""),[c,d]=g.useState("3rem"),[u,p]=g.useState(!1),h=g.useRef(n);g.useEffect(()=>{h.current&&!n&&!t&&setTimeout(()=>{var b;(b=r.current)==null||b.focus()},100),h.current=n},[n,t]),g.useEffect(()=>{t&&p(!1)},[t]);const y=()=>{if(!a.trim()||t)return;const b=a;l(""),r.current&&(r.current.style.height="3rem",d("3rem")),e(b)},w=g.useCallback(b=>{if(t)return;const m=r.current;if(m){const v=m.selectionStart,x=m.selectionEnd,S=a.substring(0,v)+b+a.substring(x);S.length<=2e3&&(l(S),setTimeout(()=>{m.selectionStart=m.selectionEnd=v+b.length,m.focus()},0))}else{const v=a+b;v.length<=2e3&&l(v)}},[a,t]);return f.jsxs("form",{className:"flex flex-col relative",onSubmit:b=>{b.preventDefault(),y()},children:[f.jsx("div",{className:"mx-4 border-t",style:{borderColor:i.getColor(k.DividerColor)}}),f.jsxs("div",{className:"flex gap-2 px-3 py-1 w-full",children:[f.jsxs("div",{className:"flex-1 min-w-0 relative",children:[f.jsx(Ju,{id:"ai-message",inputRef:r,className:"grow",noMargin:!0,borderless:!0,autoComplete:"off",disabled:t,style:{height:c,maxHeight:"6rem",opacity:t?.5:1,cursor:t?"not-allowed":"text",boxShadow:"none"},placeholder:s(ie.MessagePlaceholder),value:a,maxLength:2e3,onFocus:()=>o(!0),onBlur:()=>o(!1),onChange:b=>{if(t)return;const m=b.target.value;if(m.length<=2e3&&l(m),m.length>0&&b.currentTarget.scrollHeight>b.currentTarget.clientHeight){const v=`${b.currentTarget.scrollHeight}px`;b.currentTarget.style.height=v,d(v)}else b.currentTarget.style.height="3rem",d("3rem")},onKeyDown:b=>{if(t){b.preventDefault();return}b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),y())}}),a.length>=500&&f.jsx("div",{className:"absolute bottom-2 right-3 text-xs pointer-events-none",style:{color:a.length>=2e3?i.getColor(k.ErrorText):i.getColor(k.FooterText),fontWeight:a.length>=2e3?"600":"normal"},children:2e3-a.length})]}),f.jsx("div",{className:"flex items-center gap-1 flex-shrink-0 pb-0.5",children:f.jsx(Re.div,{whileTap:{scale:.9},children:f.jsx(Rt,{className:"!bg-transparent rounded-full w-8 h-8 min-w-8 flex items-center justify-center transition-colors disabled:!opacity-100",type:"submit",size:"xs",withoutTheming:!0,disabled:t||!a.trim(),style:{opacity:1,backgroundColor:"transparent",color:a.trim()?i.getColor(k.ButtonBackground):i.getColor(k.FooterText)},children:n?f.jsx(Z.Spin,{className:"size-4 animate-spin"}):f.jsx(Z.PaperAirplane,{className:"size-5"})})})})]}),f.jsx(KC,{isOpen:u,onClose:()=>p(!1),onSelect:w}),f.jsxs("div",{className:"px-3 pb-1.5 flex items-center justify-between",children:[f.jsx("div",{className:"flex items-center gap-1",children:f.jsx("button",{type:"button",disabled:t,onClick:()=>!t&&p(!u),className:"p-1.5 rounded-md transition-colors disabled:opacity-50 disabled:cursor-not-allowed",style:{color:i.getColor(k.IconColor)},children:f.jsx(Z.Emoji,{className:"size-5"})})}),f.jsx(So,{variant:"inline"})]})]})}const ff=[Le.Light,Le.Dark,Le.System];function U6(e){switch(e){case Le.Light:return Z.Sun;case Le.Dark:return Z.Moon;case Le.System:return Z.Monitor;default:return Z.Monitor}}function H6({onChatClose:e}){const[t,n]=g.useState(!1),[r,i]=g.useState(!1),[s,o]=g.useState(()=>jC()),a=g.useRef(null),l=g.useRef(null),c=be(),d=us(),{mode:u,setMode:p}=c,h=()=>e(),y=()=>{const m=ff.indexOf(u),v=ff[(m+1)%ff.length];p(v)},w=()=>{const m=!s;RC(m),o(m)};g.useEffect(()=>{if(!r)return;const m=v=>{var x,S;(x=l.current)!=null&&x.contains(v.target)||(S=a.current)!=null&&S.contains(v.target)||i(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[r]);const b=r&&f.jsxs(Re.div,{ref:l,onMouseDown:m=>m.stopPropagation(),initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:"absolute right-0 top-full z-[9999] mt-1.5 py-1 min-w-[175px] rounded-lg shadow-lg !text-sm",style:{backgroundColor:c.getColor(k.Background),borderColor:c.getColor(k.Border),borderRadius:c.getRadius(),boxShadow:`0 4px 12px ${c.getColor(k.ShadowColor)}`},children:[f.jsxs("button",{type:"button",className:"w-full px-3 py-2 text-left text-sm flex items-center gap-2 rounded-t-lg hover:opacity-80 transition-opacity",style:{color:c.getColor(k.ErrorText)},onClick:()=>{i(!1),n(!0)},children:[f.jsx(Z.XCircle,{className:"size-4 flex-shrink-0"}),d(ie.ChatEndConversation)]}),f.jsxs("button",{type:"button",className:"w-full px-3 py-2 text-left text-sm flex items-center gap-2 hover:opacity-80 transition-opacity",style:{color:c.getColor(k.InputText)},onClick:w,children:[s?f.jsx(Z.VolumeX,{className:"size-4 flex-shrink-0"}):f.jsx(Z.Volume2,{className:"size-4 flex-shrink-0"}),d(s?ie.NotificationSoundOn:ie.NotificationSoundOff)]}),f.jsx("div",{className:"my-1 h-px",style:{backgroundColor:c.getColor(k.DividerColor)}}),f.jsxs("button",{type:"button",className:"w-full px-3 py-2 text-left text-sm flex items-center gap-2 rounded-b-lg hover:opacity-80 transition-opacity",style:{color:c.getColor(k.InputText)},onClick:y,children:[(()=>{const m=U6(u);return f.jsx(m,{className:"size-4 flex-shrink-0"})})(),u===Le.Light?"Açık tema":u===Le.Dark?"Koyu tema":"Sistem"]})]});return f.jsxs(f.Fragment,{children:[f.jsx(Ar,{children:t&&f.jsx(Re.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:c.getColor(k.ModalOverlayColor)},children:f.jsxs(Re.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:c.getColor(k.Background),borderRadius:c.getRadius()},children:[f.jsx("div",{className:"text-base font-semibold mb-2",style:{color:c.getColor(k.ChatCloseConfirmText)},children:d(ie.ChatCloseConfirm)}),f.jsx("div",{className:"text-sm mb-4",style:{color:c.getColor(k.FooterText)},children:d(ie.ChatCloseWarning)}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsx("button",{type:"button",className:"px-3 py-1.5 text-sm rounded-lg transition-opacity hover:opacity-90",style:{backgroundColor:c.getColor(k.GreeterBackground),color:c.getColor(k.GreeterText),borderRadius:c.getRadius()},onClick:()=>n(!1),children:d(ie.CancelAction)}),f.jsx("button",{type:"button",className:"px-3 py-1.5 text-sm rounded-lg transition-opacity hover:opacity-90",style:{backgroundColor:c.getColor(k.ErrorBackground),color:c.getColor(k.ErrorText),borderRadius:c.getRadius()},onClick:h,children:d(ie.CloseAction)})]})]})})}),f.jsxs("div",{className:"relative flex-shrink-0",children:[f.jsx("button",{ref:a,type:"button",onClick:()=>i(m=>!m),className:"flex items-center justify-center p-1.5 rounded-md hover:opacity-80 transition-opacity",style:{backgroundColor:"transparent",color:c.getColor(k.HeaderText)},title:d(ie.ChatSettings),"aria-expanded":r,children:f.jsx(Z.Menu,{className:"size-5"})}),f.jsx(Ar,{children:b})]})]})}function W6({onOperatorConnected:e,onChatClose:t}){var ue,ke,Ne;const{widget:n,setOpen:r,aiAgent:i,aiAgentMessages:s,addAIAgentMessage:o,setAIAgentMessages:a,aiAgentSessionId:l,setAIAgentSessionId:c,humanNeedRequested:d,setHumanNeedRequested:u,setIsAIAgentMode:p}=ne(),h=be(),y=Do(),w=nd(),b=dr(),m=vs(),[v,x]=g.useState(!1),[S,C]=g.useState(!1),[_,j]=g.useState(!1),[A,E]=g.useState(!1),[D,L]=g.useState(""),[O,q]=g.useState(!1),[$,B]=g.useState(0),[I,N]=g.useState(null),R=()=>{r(!1)},z=()=>{u(!1),t()},H=(((Ne=(ke=(ue=n==null?void 0:n.appearance)==null?void 0:ue.body)==null?void 0:ke.inputs)==null?void 0:Ne.length)||0)>0,W=g.useRef(!1),G=g.useRef(!1);g.useEffect(()=>{if(!i||W.current)return;if(s.length>0){W.current=!0;return}if(!b||!b.connected){const P=setInterval(()=>{b&&b.connected&&(clearInterval(P),Q())},100),K=setTimeout(()=>{clearInterval(P),W.current||V()},3e3);return()=>{clearInterval(P),clearTimeout(K)}}Q();function Q(){W.current||!b||(W.current=!0,b.emit(He.MessageList,{},P=>{Array.isArray(P)&&P.length>0?a(P):V()}))}function V(){if(!i)return;const P={id:Vp(),content:`Merhaba! Ben ${i.name}. Size nasıl yardımcı olabilirim?`,created_at:new Date,files:[],sender_type:ve.User};o(P)}},[b,i,s.length,a,o]),g.useEffect(()=>{if(v)if(D)C(!0);else{const Q=setTimeout(()=>C(!0),1e3);return()=>clearTimeout(Q)}else C(!1)},[v,D]),g.useEffect(()=>{if($>0){const Q=requestAnimationFrame(()=>B(0));return()=>cancelAnimationFrame(Q)}},[$]),g.useEffect(()=>{if(!b)return;const Q=({token:Y})=>{L(me=>me+Y)},V=Y=>{Y!=null&&Y.human_need&&u(!0)},P=Y=>{Y.repeat_count===3&&N(Y.message)},K=()=>{t()};return b.on(ge.AgentMessageChunk,Q),b.on(ge.AgentMessageFinalMetadata,V),b.on(ge.AgentSpamWarning,P),b.on(ge.AgentSpamBanned,K),()=>{b.off(ge.AgentMessageChunk,Q),b.off(ge.AgentMessageFinalMetadata,V),b.off(ge.AgentSpamWarning,P),b.off(ge.AgentSpamBanned,K)}},[b,u,t]);const te=g.useCallback(Q=>{if(!n||!i||!b||d||_||G.current)return;G.current=!0;const V=`temp-${Date.now()}`,P={id:V,content:Q,created_at:new Date,files:[],sender_type:ve.Customer};o(P),L(""),q(!0),x(!0),j(!0);const K=l||Rr(n.link_id);b.emit(He.AgentMessageCreate,{question:Q,agent_id:i.id,session_id:K},Y=>{if(G.current=!1,q(!1),L(""),x(!1),j(!1),!Y){const me={id:Vp(),content:"Üzgünüm, bir hata oluştu. Lütfen tekrar deneyin veya canlı destek personelimıze bağlanın.",created_at:new Date,files:[],sender_type:ve.System};a(re=>re.filter(Ee=>Ee.id!==V).concat([me])),u(!0);return}Y.session_id&&c(Y.session_id),o(Y.agent_message),Y.human_need&&u(!0)})},[n,i,d,_,b,l,o,a,c,u]),se=g.useCallback(Q=>{if(!b||A)return;E(!0);const V=()=>{b.emit(He.AgentRequestHuman,{},P=>{E(!1),P!=null&&P.success?(ne.getState().setIsHaveChat(!0),p(!1),u(!1),ne.getState().clearAIAgentState(),e()):console.error("Failed to request human operator")})};Q&&Object.keys(Q).length>0?b.emit(He.ChatUpdateInputs,{inputs:Q},P=>{P!=null&&P.success?V():(console.error("Failed to update chat inputs"),E(!1))}):V()},[b,A,p,u,e]),pe=()=>{H?m.push("registration"):se()};return i?f.jsxs("div",{className:"flex flex-col h-full min-h-0 flex-1 w-full",children:[f.jsxs("header",{className:"px-4 py-3 flex items-center justify-between flex-shrink-0 overflow-visible min-h-[52px]",style:{backgroundColor:h.getColor(k.HeaderBackground),color:h.getColor(k.HeaderText),borderColor:h.getColor(k.HeaderBorder),...y?{}:{borderTopLeftRadius:h.getRadius(),borderTopRightRadius:h.getRadius()}},children:[f.jsx("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:f.jsx(ph,{name:i.name,avatar:i.avatar,textColor:h.getColor(k.HeaderText),subtitle:"AI Asistan"})}),f.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[f.jsx(H6,{onChatClose:z}),w&&f.jsx("button",{type:"button",onClick:R,className:"p-1 hover:opacity-80 transition-opacity",children:f.jsx(Z.X,{className:"w-5 h-5 cursor-pointer"})})]})]}),f.jsxs("div",{className:"flex flex-col flex-1 min-h-0 w-full overflow-hidden",children:[f.jsx(MC,{messages:s,isTyping:S||v&&!!D,streamingContent:O?D:void 0,skipAnimationForLastN:$}),f.jsx(Ar,{children:I&&f.jsxs(Re.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{duration:.2},className:"mx-3 mb-2 p-3 rounded-lg flex items-start gap-2 flex-shrink-0",style:{backgroundColor:h.getColor(k.ErrorBackground),borderColor:h.getColor(k.ErrorBorder),borderWidth:"1px",borderStyle:"solid",borderRadius:h.getRadius()},children:[f.jsx(Z.XCircle,{className:"size-4 flex-shrink-0 mt-0.5",style:{color:h.getColor(k.ErrorText)}}),f.jsx("span",{className:"text-sm",style:{color:h.getColor(k.ErrorText)},children:I}),f.jsx("button",{type:"button",className:"ml-auto flex-shrink-0",onClick:()=>N(null),style:{color:h.getColor(k.ErrorText)},children:f.jsx(Z.X,{className:"size-4"})})]})}),d?f.jsx(Re.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},className:"flex-shrink-0 w-full flex flex-col items-stretch justify-center px-4 pt-8 pb-10",style:{backgroundColor:h.getColor(k.Background)},children:f.jsx(Re.div,{className:"relative w-full max-w-lg mx-auto overflow-hidden",style:{borderRadius:h.getRadius()},animate:{filter:["brightness(1)","brightness(1.1)","brightness(1)"]},transition:{duration:2.5,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"},children:f.jsx(Rt,{onClick:pe,disabled:A,size:"lg",className:"w-full flex items-center justify-center gap-2",children:A?f.jsx("span",{className:"animate-pulse",children:"Bağlanıyor..."}):f.jsxs(f.Fragment,{children:[f.jsx(Z.User,{className:"w-5 h-5"}),f.jsx("span",{children:"Canlı Desteğe Bağlan"})]})})})}):f.jsx(V6,{onSendMessage:te,disabled:_,loading:_})]})]}):null}function q6({children:e}){const{widget:t}=ne();return t?f.jsx("section",{className:"h-full w-full relative",children:e}):null}function G6({children:e}){const t=dr(),n=vs(),{historyChat:r,isAIAgentMode:i,aiAgent:s}=ne(),[o,a]=g.useState(!0),[l,c]=g.useState(!1),d=g.useRef(!1);return g.useEffect(()=>{if(r){a(!1);return}if(!t){a(!1);return}const u=()=>{a(!1),c(!1),d.current=!0},p=()=>{i&&s||(c(!0),n.push("registration"))};return t.on(ge.Connect,u),t.on(ge.Disconnect,p),t.connected?(a(!1),d.current=!0):t.connect(),()=>{t.off(ge.Connect,u),t.off(ge.Disconnect,p)}},[t,r,i,s,n]),i&&s||r?e:!t||l?(t||n.push("registration"),f.jsx(oh,{})):d.current&&!t.connected?f.jsx(oh,{}):o||!t.connected?f.jsx(AC,{}):e}function Bx(e,t){const n=new Map;for(const r of t)r!=null&&r.id&&n.set(r.id,r);for(const r of e)r!=null&&r.id&&!n.has(r.id)&&n.set(r.id,r);return Array.from(n.values()).sort((r,i)=>new Date(r.created_at).getTime()-new Date(i.created_at).getTime())}function Y6(){const e=P=>{if(!P||typeof P!="object")return!1;const K=String((P==null?void 0:P.error)||(P==null?void 0:P.message)||"").toLowerCase(),Y=Number((P==null?void 0:P.status)||(P==null?void 0:P.statusCode)||0);return(P==null?void 0:P.retryAfter)!==void 0||Y===429||/too\s+many|rate\s*limit|çok\s+fazla/.test(K)},t=P=>{const K=Number((P==null?void 0:P.retryAfter)??(P==null?void 0:P.seconds));return Number.isFinite(K)&&K>0?K:3},{widget:n,setOpen:r,setIsHaveChat:i,historyChat:s,setHistoryChat:o,historyMessages:a,setHistoryMessages:l,aiAgent:c,isAIAgentMode:d,clearAIAgentState:u}=ne(),p=be(),h=dr(),{connected:y,connectionReady:w}=h,b=fl(),m=vs(),v=Do(),[x,S]=g.useState(null),[C,_]=g.useState([]),[j,A]=g.useState(!1),[E,D]=g.useState([]),[L,O]=g.useState(!1),q=Jm(),$=g.useRef(!1),B=g.useRef(null),I=g.useRef(!1),[N,R]=g.useState(!1),[z,H]=g.useState(null);g.useEffect(()=>{console.log("WS: ChatDetailView socket state:",{connected:y,connectionReady:w,hasChat:!!x,chatViewEmitted:$.current})},[y,w,x]),g.useEffect(()=>{if(x||s||d){R(!1);return}const P=setTimeout(()=>{!x&&!s&&!d&&(console.warn("WS: Connection timeout reached in ChatDetailView"),R(!0))},1e4);return()=>clearTimeout(P)},[x,s,d]),g.useEffect(()=>{if(!s||!n)return;if(S({status:s.status,is_customer_uploadable:!1}),a){_(a);return}const P=Rr(n.link_id);_M(s._id,n.link_id,P).then(([K,Y])=>{if(zn(Y)&&Array.isArray(K)){const me=K.map(re=>({id:re._id,content:re.content,created_at:re.created_at,files:re.files,sender_type:re.sender_type,activity_type:re.activity_type,answers:re.answers,reply_id:re.reply_id,buttons:re.buttons}));_(me),l(me)}}).catch(K=>{console.error("Failed to load history messages",K)})},[s,n,a,l]),g.useEffect(()=>{if(!n||d||s)return;const P=mr(n.link_id);P.isAgentMode&&P.agent&&(console.log("ChatDetailView: Recovering AI Agent state from localStorage"),ne.getState().setAIAgent(P.agent),ne.getState().setIsAIAgentMode(!0),P.sessionId&&ne.getState().setAIAgentSessionId(P.sessionId),P.humanNeedRequested&&ne.getState().setHumanNeedRequested(!0))},[n,d,s]);const W=async(P,K)=>{var $t;if(!n)return;if(!s){const oe=`temp-${Date.now()}`,ye={id:oe,content:P,created_at:new Date,files:K||[],sender_type:ve.Customer,answers:[],reply_id:void 0,buttons:[]};_(Oe=>[...Oe,ye]),h==null||h.emit(He.MessageCreate,{content:P,files:K},Oe=>{const M=Array.isArray(Oe)?Oe[0]:Oe;if(M&&M.isError){_(F=>F.filter(U=>U.id!==oe));const J=e(M);J||yo(M),J&&typeof window<"u"&&window.dispatchEvent(new CustomEvent("lc:rate-limit",{detail:{seconds:t(M)}}));return}_(J=>J.map(F=>F.id===oe?M:F))});return}const Y={},me=n.appearance;if(($t=me==null?void 0:me.body)!=null&&$t.inputs){for(const oe of me.body.inputs)if(oe.required||oe.remember){const ye=Qs(oe.name);ye&&(Y[oe.name]=ye)}}const re=ne.getState().defaultValues;if(re){re.username&&(Y.username=re.username),re.secret_data&&(Y.secret_data=re.secret_data);for(const oe in re)Y[oe]||(Y[oe]=re[oe])}const[Ee,ot]=await q.mutateAsync({inputs:Y,history:[],client_id:n.client_id,widget_id:n.link_id,device_id:Rr(n.link_id)});if(zn(ot)){o(null),i(!0),Ee&&typeof Ee=="object"&&"customer_token"in Ee&&(Fn(rt.CustomerToken,Ee.customer_token,n.link_id),Fn(rt.CustomerRefreshToken,Ee.customer_refresh_token,n.link_id));let oe=0;const ye=20,Oe=`temp-${Date.now()}`,M={id:Oe,content:P,created_at:new Date,files:K||[],sender_type:ve.Customer,answers:[],reply_id:void 0,buttons:[]};_(F=>[...F,M]);const J=setInterval(()=>{oe+=1,h!=null&&h.connected?(h.emit(He.MessageCreate,{content:P,files:K},F=>{const U=Array.isArray(F)?F[0]:F;if(U&&U.isError){_(de=>de.filter(Se=>Se.id!==Oe));const ae=e(U);ae||yo(U),ae&&typeof window<"u"&&window.dispatchEvent(new CustomEvent("lc:rate-limit",{detail:{seconds:t(U)}}));return}_(ae=>ae.map(de=>de.id===Oe?U:de))}),clearInterval(J)):oe>=ye&&clearInterval(J)},200)}},G=P=>{!P&&!v&&r(!1),O(!0),ya((n==null?void 0:n.link_id)||""),i(!1),S(null),_([]),D([]),o(null),ne.getState().setHistoryMessages(null),ne.getState().setShowHistoryOnRegistration(!1),u(),dc(n.client_id,Qi(Yi(b),n.link_id)).then(()=>{h==null||h.disconnect(),m.push("registration")})},te=()=>{x?(localStorage.setItem("showActionButtons","false"),S({...x,status:tn.Closed})):G(!1)};g.useEffect(()=>{if(h&&!(d&&c)){if(s){$.current=!1,I.current=!1;return}if(!y||!w){y||(I.current=!1,$.current=!1,B.current=null);return}I.current=!0,!(!n||$.current)&&($.current=!0,console.log("ChatView: Emitting chat:view request"),h.emit(He.ChatView,{},P=>{if(console.log("ChatView: Received response",{chatReceived:P!==null,chatStatus:P==null?void 0:P.status,hasAgentName:!!(P!=null&&P.agent_name),hasError:P&&"error"in P}),ne.getState().historyChat){$.current=!1;return}if(P===null||P&&"error"in P||!(P!=null&&P.status)){console.log("ChatView returned invalid chat (null, error, or missing status), cleaning up and redirecting to registration",{chat:P}),r(!1),i(!1),dc(n.client_id,Qi(Yi(b),n.link_id)),_([]),D([]),o(null),ne.getState().setHistoryMessages(null),u(),ya((n==null?void 0:n.link_id)||""),h.disconnect(),m.push("registration"),$.current=!1;return}console.log("ChatView: Setting chat state",{status:P.status}),S(vx(P)),i(!0)}))}},[s,h,n,y,w,b,m,r,i,o,d,c,u]);const se=()=>{te()},pe=()=>{G(!0)},[ue,ke]=g.useState(!1),Ne=g.useCallback(()=>{console.log("handleOperatorConnected: Starting operator connection flow"),$.current=!1,B.current=null,I.current=!1;const P=ne.getState().aiAgentMessages;P.length>0&&_(P),ke(!0)},[]);g.useEffect(()=>{if(ue){if(!h||!y||!w){console.log("handleOperatorConnected: Waiting for socket connection...",{connected:y,connectionReady:w});return}if(console.log("handleOperatorConnected: Socket ready, fetching chat view"),$.current){ke(!1);return}$.current=!0,h.emit(He.ChatView,{},P=>{console.log("handleOperatorConnected: ChatView result",P),P&&!("error"in P)&&P.status?(S(vx(P)),i(!0),h.emit(He.MessageList,{},Y=>{console.log("handleOperatorConnected: MessageList result",Y),Array.isArray(Y)&&_(me=>Bx(me,Y))})):(console.log("handleOperatorConnected: Invalid chat result, clearing state",P),i(!1)),ke(!1)})}},[ue,h,y,w,i]);const Q=()=>{u(),v||r(!1),O(!0),ya((n==null?void 0:n.link_id)||""),i(!1),S(null),_([]),D([]),o(null),ne.getState().setHistoryMessages(null),ne.getState().setShowHistoryOnRegistration(!1),dc(n.client_id,Qi(Yi(b),n.link_id)).then(()=>{h==null||h.disconnect(),m.push("registration")})},V=g.useCallback(P=>{if(d&&c&&!s){const{aiAgentMessages:K,addAIAgentMessage:Y}=ne.getState();if(K.some(me=>me.id===P.id))return;Y(P);return}x&&![tn.Closed,tn.Deleted].includes(x.status)&&_(K=>{const Y=K.filter(re=>{var Ee;return!((Ee=re.id)!=null&&Ee.startsWith("temp-")&&re.content===P.content)});return Y.some(re=>re.id===P.id)?Y:[...Y,P]})},[x,d,c,s]);return g.useEffect(()=>{if(!h)return;const P=oe=>{const ye={content:oe.content,created_at:oe.created_at,files:oe.files,id:oe._id,sender_type:oe.sender_type,answers:oe.answers,reply_id:oe.reply_id,buttons:oe.buttons};if(E.length>0){D(Oe=>[...Oe,ye]);return}oe.is_shortcut?D([ye]):V(ye),A(!1)},K=oe=>{const ye={content:oe.content,created_at:oe.created_at,files:oe.files,id:oe._id,sender_type:oe.sender_type,activity_type:oe.activity_type,sender_name:oe.sender_name,answers:oe.answers,reply_id:oe.reply_id,buttons:oe.buttons};V(ye)},Y=oe=>{!oe||!oe.name?S(ye=>ye?{...ye,agent_name:void 0,agent_avatar:void 0,participants:[]}:null):S(ye=>{if(!ye)return null;const Oe=vF(ye.participants,{profile_id:oe.id,name:oe.name,avatar:oe.avatar}),M=ia(Oe);return{...ye,participants:Oe,...M}})},me=()=>{A(!0)},re=()=>{te()},Ee=({is_customer_uploadable:oe})=>{S(ye=>ye?{...ye,is_customer_uploadable:oe}:null)},ot=oe=>{S(ye=>{if(!ye)return null;const Oe=ah(ye.participants,{profile_id:oe.profile_id});if(!oe.hasOtherAdmins||Oe.length===0)return{...ye,participants:[],agent_name:void 0,agent_avatar:void 0};const M=ia(Oe);return{...ye,participants:Oe,...M}})},$t=oe=>{S(ye=>{if(!ye)return null;const Oe=gF(ye.participants,{profile_id:oe.profile_id,name:oe.name,avatar:oe.avatar}),M=ia(Oe);return{...ye,participants:Oe,...M}})};return h.on(ge.MessageAgentCreate,P),h.on(ge.MessageUserCreate,K),h.on(ge.MessageCustomerCreate,K),h.on(ge.ChatUserAssignee,Y),h.on(ge.MessageAgentTyping,me),h.on(ge.ChatUserClose,re),h.on(ge.ChatToggleUpload,Ee),h.on(ge.ChatUserLeave,ot),h.on(ge.ChatUserJoin,$t),()=>{h.off(ge.MessageAgentCreate,P),h.off(ge.MessageUserCreate,K),h.off(ge.MessageCustomerCreate,K),h.off(ge.ChatUserAssignee,Y),h.off(ge.MessageAgentTyping,me),h.off(ge.ChatUserClose,re),h.off(ge.ChatToggleUpload,Ee),h.off(ge.ChatUserLeave,ot),h.off(ge.ChatUserJoin,$t)}},[V,E]),g.useEffect(()=>{if(!h)return;const P=Y=>{Y.repeat_count===3&&H(Y.message)},K=()=>{h.emit(He.ChatClose,{}),ne.getState().setShowActionButtons(!1),te()};return h.on(ge.AgentSpamWarning,P),h.on(ge.AgentSpamBanned,K),()=>{h.off(ge.AgentSpamWarning,P),h.off(ge.AgentSpamBanned,K)}},[h,te]),g.useEffect(()=>{if(!h||!x||s){B.current=null;return}const P=`${x.status}-${x.agent_name||"no-agent"}`;B.current!==P&&(B.current=P,h.emit(He.MessageList,{},K=>{if(!Array.isArray(K)){console.warn("MessageList response is not an array:",K),B.current=null;return}_(Y=>Bx(Y,K)),S(Y=>{if(!Y)return null;const me=yF(K),re=me.length>0?me:Y.participants&&Y.participants.length>0?Y.participants:Cg(Y.agent_name,Y.agent_avatar),Ee=ia(re);return{...Y,participants:re,...Ee}})}))},[h,x,s]),g.useEffect(()=>{const P=setTimeout(()=>{A(!1)},2e3);return()=>clearTimeout(P)},[j]),g.useEffect(()=>{if(!n||E.length===0)return;let P=0;n.writing_timeout&&(P=[...E[0].content].length/n.writing_timeout,P<0&&(P=0));const K=setTimeout(()=>{V(E[0]),D(E.slice(1))},P*1e3);return()=>clearTimeout(K)},[E,n]),L?f.jsx(oh,{}):d&&c&&!s?f.jsxs(f.Fragment,{children:[f.jsx("div",{id:"chat-alert-portal"}),f.jsx("div",{className:`h-full w-full ${v?"":"rounded-xl"} shadow-sm flex flex-col overflow-hidden`,style:{height:v?"100%":"",minHeight:v?"var(--app-height, 100dvh)":"",maxHeight:v?"var(--app-height, 100dvh)":"",backgroundColor:p.getColor(k.Background)},children:f.jsx(W6,{onOperatorConnected:Ne,onChatClose:Q})})]}):f.jsxs(f.Fragment,{children:[f.jsx("div",{id:"chat-alert-portal"}),f.jsx("div",{className:`h-full w-full ${v?"":"rounded-xl"} shadow-sm flex flex-col overflow-hidden`,style:{height:v?"100%":"",minHeight:v?"var(--app-height, 100dvh)":"",maxHeight:v?"var(--app-height, 100dvh)":"",backgroundColor:p.getColor(k.Background)},children:x?x.status===tn.Closed&&!s?f.jsx(z6,{onOk:G}):f.jsx($6,{chat:x,isTyping:j,messages:C,shortcutMessages:E,onNewMessage:V,onChatClose:te,onEvaluateChat:se,onNewChat:pe,onSendMessage:W,isHistoryMode:!!s,spamWarningMessage:z,onDismissSpamWarning:()=>H(null)}):N?f.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-6 text-center",children:[f.jsx("div",{className:"w-12 h-12 rounded-full flex items-center justify-center mb-4",style:{backgroundColor:p.getColor(k.InputBorder)},children:f.jsx(Z.XCircle,{className:"w-6 h-6 opacity-50"})}),f.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Bağlantı Kurulamadı"}),f.jsx("p",{className:"text-sm opacity-60 mb-6",children:"Sunucuyla bağlantı sağlanırken bir sorun oluştu. Lütfen tekrar deneyin."}),f.jsx("button",{type:"button",onClick:()=>G(!0),className:"px-6 py-2 rounded-lg font-medium transition-all",style:{backgroundColor:p.getColor(k.ButtonBackground),color:p.getColor(k.ButtonText),borderRadius:p.getRadius()},children:"Tekrar Dene"})]}):f.jsx(AC,{})})]})}function Q6(){return sF(),null}function K6(){return f.jsxs(G6,{children:[f.jsx(q6,{children:f.jsx(Y6,{})}),f.jsx(Q6,{})]})}const X6=[{path:"/chat",component:K6,name:"chat"}],XC=[...X6],ZC=[...cF],Z6=[...XC,...ZC];function hh({text:e}){var c,d,u,p;const{widget:t,isHaveChat:n,isTooltipVisible:r,setIsTooltipVisible:i,onTooltipClose:s}=ne(),o=be(),a=us(),l=()=>{i(!1),s&&s()};return r?f.jsxs(Re.div,{initial:{opacity:0,scale:.8,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:10},transition:{type:"spring",damping:20,stiffness:300},className:Ie("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:[f.jsx("button",{onClick:l,className:"absolute top-2 right-2 p-1 rounded-full hover:bg-black/10 transition-colors","aria-label":a(ie.CloseButtonAria),children:f.jsx(Z.X,{className:"size-3"})}),f.jsx(Re.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=(c=t==null?void 0:t.appearance)==null?void 0:c.design)==null?void 0:d.tooltip_message_active:(p=(u=t==null?void 0:t.appearance)==null?void 0:u.design)==null?void 0:p.tooltip_message)||a(n?ie.TooltipActive:ie.TooltipDefault)}),f.jsx("div",{className:"absolute bottom-0 right-4 w-3 h-3 transform rotate-45 translate-y-1.5",style:{backgroundColor:o.getColor(k.TooltipBackground)}})]},"widget-tooltip"):null}function zx({fallback:e,fallbackOpen:t}){const[n]=g.useState(window.document.title),r=dr(),{isHaveChat:i,open:s,soundPath:o}=ne(),[a,l]=g.useState(!0),[c,d]=g.useState(0),[u,p]=g.useState(null),h=us(),y=()=>{bF(o)},w=(b,m)=>{if(u&&clearInterval(u),b||!i||m===0||Number.isNaN(m)){window.document.title=n,p(null);return}const v=setInterval(()=>{if(b||!i||m===0||Number.isNaN(m)){window.document.title=n,clearInterval(v),p(null);return}const x=`${m} ${h(ie.NewMessagesNotification)} - ${n}`;window.document.title!==x?window.document.title=x:window.document.title=n},1e3);return p(v),()=>{clearInterval(v),p(null)}};return g.useEffect(()=>w(s&&a,c),[c,s,a]),g.useEffect(()=>{const b=()=>{l(document.visibilityState==="visible")};return document.addEventListener("visibilitychange",b,!1),()=>{document.removeEventListener("visibilitychange",b)}},[]),g.useEffect(()=>{if(i&&s&&a&&d(0),!r||!i||s&&a)return;const b=()=>{!i||s&&a||(d(m=>m+1),y())};return r.on(ge.MessageAgentCreate,b),r.on(ge.ChatUserAssignee,y),()=>{r.off(ge.MessageAgentCreate,b),r.off(ge.ChatUserAssignee,y)}},[r,i,s,a]),s?null:i&&c>0?f.jsx(hh,{text:h(ie.NewMessagesNotification)}):!i&&t?e:null}function J6({children:e,border:t}){var N,R,z,H;const n=dr(),{open:r,setOpen:i,setIsHaveChat:s,isHaveChat:o,widget:a,onOpen:l,onClose:c,humanNeedRequested:d}=ne(),[u]=g.useState(!0),p=vs(),h=fl(),y=vm(),w=be(),{resolvedMode:b}=w,m=Do(),v=rF(),[x,S]=g.useState({x:0,y:0}),C=PP(),_=g.useRef(null),j=g.useRef(null),[A,E]=g.useState(!1),[D,L]=g.useState(!1);g.useEffect(()=>((()=>{E("ontouchstart"in window||navigator.maxTouchPoints>0)})(),window.addEventListener("touchstart",()=>{E(!0)},{once:!0}),()=>{window.removeEventListener("touchstart",()=>{E(!0)})}),[]),g.useEffect(()=>{o&&y.pathname==="/"&&h&&h.accessToken&&!d&&p.push("chat")},[o,y.pathname,h,p,d]),g.useEffect(()=>{r?requestAnimationFrame(()=>{L(!0)}):L(!1)},[r]);const O=W=>{if(!_.current||!j.current)return W;const G=_.current.getBoundingClientRect(),te={width:window.innerWidth,height:window.innerHeight},se={top:20,right:20,bottom:40,left:20};let pe=W.x,ue=W.y;return G.right+pe-x.x>te.width-se.right&&(pe=te.width-se.right-G.width-(G.left-x.x)),G.left+pe-x.x<se.left&&(pe=se.left-(G.left-x.x)),G.bottom+ue-x.y>te.height-se.bottom&&(ue=te.height-se.bottom-G.height-(G.top-x.y)),G.top+ue-x.y<se.top&&(ue=se.top-(G.top-x.y)),{x:pe,y:ue}},q=()=>{i(!0),n&&(n.emit(He.WidgetOpen,{}),l&&l())},$=()=>{i(!1),n&&(n.emit(He.WidgetClose,{}),c&&c())},B=()=>{i(!1),s(!1),dc(a.client_id,Qi(Yi(h),a.link_id)),p.push("registration")};g.useEffect(()=>{if(m&&(o||v)&&q(),!(!n||!a))return n.on(ge.Banned,B),()=>{n.off(ge.Banned,B)}},[]);function I(W){A&&C.start(W)}return f.jsxs("section",{className:"relative w-full h-full",ref:j,"data-theme":b,children:[r&&f.jsx("div",{className:Ie("fixed z-300 overflow-hidden transition-all duration-300 ease-out",{"":t&&!m,"bottom-24 right-8 rounded-xl":!m,"!bottom-0 !right-0":m,"opacity-100 scale-100 translate-y-0":D,"opacity-0 scale-95 translate-y-2":!D}),style:{width:m?"100%":((R=(N=a==null?void 0:a.appearance)==null?void 0:N.design)==null?void 0:R.width)||"21rem",height:m?"var(--app-height, 100dvh)":((H=(z=a==null?void 0:a.appearance)==null?void 0:z.design)==null?void 0:H.height)||"30rem",left:m?"0":"",right:m?"0px !important":"",maxHeight:m?"var(--app-height, 100dvh)":"",boxShadow:m?"":`0 10px 25px -5px ${w.getColor(k.ShadowColor)}, 0 8px 10px -6px ${w.getColor(k.ShadowColor)}`,backgroundColor:w.getColor(k.Background)},children:e}),!A&&f.jsxs("div",{className:"fixed bottom-[40px] right-[20px] z-400",children:[f.jsx(zx,{fallback:f.jsx(hh,{}),fallbackOpen:u}),!r&&f.jsxs(Rt,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:q,children:[f.jsx(Re.span,{initial:{scale:.8,opacity:0},animate:{scale:[1,1.2,1],opacity:[.7,0,.7]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,repeatType:"loop"},className:Ie("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:w.getColor(k.ButtonBackground)}}),f.jsx(Z.Chat,{className:"size-6"})]},"desktop-open-button"),r&&!m&&f.jsx(Rt,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:$,children:f.jsx(Z.ArrowDown2,{className:"size-6"})},"desktop-close-button")]}),A&&f.jsxs(Re.div,{ref:_,className:"fixed z-400 bottom-24 right-5",initial:{bottom:"96px",right:"20px"},animate:{x:x.x,y:x.y},drag:A,dragControls:C,dragMomentum:!1,dragElastic:0,onDragEnd:(W,G)=>{const te={x:x.x+G.offset.x,y:x.y+G.offset.y},se=O(te);S(se)},children:[f.jsx(zx,{fallback:f.jsx(hh,{}),fallbackOpen:u}),!r&&f.jsx("div",{className:"cursor-move",onPointerDown:I,children:f.jsxs(Rt,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:q,children:[f.jsx(Re.span,{initial:{scale:.8,opacity:0},animate:{scale:[1,1.2,1],opacity:[.7,0,.7]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,repeatType:"loop"},className:Ie("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:w.getColor(k.ButtonBackground)}}),f.jsx(Z.Chat,{className:"size-6"})]})},"chat-button"),r&&!m&&f.jsx(Rt,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:$,children:f.jsx(Z.ArrowDown2,{className:"size-6"})},"desktop-close-button")]})]})}function e$(e){const{widget:t}=ne();return f.jsx(VP,{widget:t,children:f.jsx(J6,{...e})})}function t$(){const{isHaveChat:e,isAIAgentMode:t}=ne();return f.jsx(vA,{initialEntries:[e||t?"/chat":"/"],future:{v7_startTransition:!0},children:f.jsx(e$,{border:!0,children:f.jsxs(xA,{children:[XC.map((n,r)=>f.jsx(xp,{path:n.path,element:f.jsx(n.component,{})},r)),ZC.map((n,r)=>f.jsx(xp,{path:n.path,element:f.jsx(n.component,{})},r))]})})})}const n$=g.forwardRef((e,t)=>{const n=localStorage.getItem("lc:device:id"),{data:r,isLoading:i,error:s}=kE(e.link_id,n||void 0),{widget:o,setWidget:a,setSoundPath:l,setDefaultValues:c,setOpen:d,setOnTooltipClose:u,setIsTooltipVisible:p,setOnOpen:h,setOnClose:y,onOpen:w,onClose:b}=ne();return g.useImperativeHandle(t,()=>({open:()=>{d(!0),w&&w()},close:()=>{d(!1),b&&b()}})),g.useEffect(()=>{r&&CE(r)&&a(r),e.soundPath&&l(e.soundPath),e.defaultValues&&c(e.defaultValues),e.onTooltipClose&&u(e.onTooltipClose),e.showTooltip===!1&&p(!1),e.onOpen&&h(e.onOpen),e.onClose&&y(e.onClose)},[r,e.soundPath,e.defaultValues,e.onTooltipClose,e.showTooltip,e.onOpen,e.onClose]),i?f.jsx("div",{children:"Loading..."}):s||!r||!o?null:f.jsx(GI,{children:f.jsx(nF,{children:f.jsx(t$,{})})})}),r$=new sE;let Vx=null;function i$(e){if(!e.container)return;const t=ee.createRef();return Vx=fb(e.container),Vx.render(f.jsxs(uE,{client:r$,children:[f.jsx(n$,{...e,ref:t}),f.jsx(GA,{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()},identify:n=>{if(!e.link_id)return;const r=Rr(e.link_id);SM({widget_id:e.link_id,device_id:r,decrypted_data:n})}}}window.widget=i$});export default s$();