@botuyo/chat-widget-standalone 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ChatWidget-DQS2YAHX.js +33 -0
- package/dist/ChatWidget-DQS2YAHX.js.map +1 -0
- package/dist/botuyo-chat.css +1 -1
- package/dist/{botuyo-chat.js → botuyo-chat.es.js} +2 -2
- package/dist/botuyo-chat.es.js.map +1 -0
- package/dist/botuyo-chat.umd.css +1 -0
- package/dist/botuyo-chat.umd.js +2 -0
- package/dist/botuyo-chat.umd.js.map +1 -0
- package/dist/{chunk-audio-BT2WWPfS.js → chunk-audio-DG36n3qS.js} +2 -2
- package/dist/{chunk-audio-BT2WWPfS.js.map → chunk-audio-DG36n3qS.js.map} +1 -1
- package/dist/{chunk-chat-ui-BHfnFN_3.js → chunk-chat-ui-TnfA4tMe.js} +42 -41
- package/dist/chunk-chat-ui-TnfA4tMe.js.map +1 -0
- package/dist/{chunk-gallery-CHMxgXlB.js → chunk-gallery-DsrT5sHg.js} +2 -2
- package/dist/{chunk-gallery-CHMxgXlB.js.map → chunk-gallery-DsrT5sHg.js.map} +1 -1
- package/dist/src/chat-widget/ChatWidget.d.ts +1 -0
- package/dist/src/chat-widget/ChatWidget.d.ts.map +1 -1
- package/dist/src/chat-widget/components/ChatWindow.d.ts.map +1 -1
- package/dist/src/chat-widget/components/Launcher.d.ts.map +1 -1
- package/dist/src/chat-widget/components/MessageBubble.d.ts +1 -0
- package/dist/src/chat-widget/components/MessageBubble.d.ts.map +1 -1
- package/dist/src/chat-widget/components/MessageBubble.stories.d.ts +1 -0
- package/dist/src/chat-widget/components/MessageBubble.stories.d.ts.map +1 -1
- package/dist/src/chat-widget/contexts/AnimationContext.d.ts +69 -0
- package/dist/src/chat-widget/contexts/AnimationContext.d.ts.map +1 -0
- package/dist/src/chat-widget/hooks/useChatSocket.d.ts.map +1 -1
- package/dist/src/chat-widget/hooks/useChatWidget.d.ts.map +1 -1
- package/dist/src/chat-widget/hooks/useWidgetTheme.d.ts +1 -1
- package/dist/src/chat-widget/types/index.d.ts +52 -0
- package/dist/src/chat-widget/types/index.d.ts.map +1 -1
- package/dist/src/chat-widget/utils/theme.d.ts +2 -2
- package/dist/src/chat-widget/utils/theme.d.ts.map +1 -1
- package/dist/src/chat-widget/utils/theme.examples.d.ts +2 -2
- package/dist/src/chat-widget/utils/theme.examples.d.ts.map +1 -1
- package/dist/stats-umd.html +4949 -0
- package/dist/stats.html +1 -1
- package/package.json +6 -2
- package/dist/ChatWidget-BCHSZnMy.js +0 -33
- package/dist/ChatWidget-BCHSZnMy.js.map +0 -1
- package/dist/botuyo-chat.js.map +0 -1
- package/dist/chunk-chat-ui-BHfnFN_3.js.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).BotUyoChat={})}(this,function(e){"use strict";function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n,r,o={exports:{}},i={},a={exports:{}},s={};function l(){return r||(r=1,a.exports=(n||(n=1,function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,a=i>>>1;r<a;){var s=2*(r+1)-1,l=e[s],c=s+1,u=e[c];if(0>o(l,n))c<i&&0>o(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<i&&0>o(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(e.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],c=[],u=1,d=null,f=3,p=!1,h=!1,m=!1,g=!1,y="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,v="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var o=n(c);null!==o;){if(null===o.callback)r(c);else{if(!(o.startTime<=e))break;r(c),o.sortIndex=o.expirationTime,t(l,o)}o=n(c)}}function k(e){if(m=!1,w(e),!h)if(null!==n(l))h=!0,S||(S=!0,x());else{var t=n(c);null!==t&&O(k,t.startTime-e)}}var x,S=!1,_=-1,E=5,C=-1;function z(){return!(!g&&e.unstable_now()-C<E)}function A(){if(g=!1,S){var t=e.unstable_now();C=t;var o=!0;try{e:{h=!1,m&&(m=!1,b(_),_=-1),p=!0;var i=f;try{t:{for(w(t),d=n(l);null!==d&&!(d.expirationTime>t&&z());){var a=d.callback;if("function"==typeof a){d.callback=null,f=d.priorityLevel;var s=a(d.expirationTime<=t);if(t=e.unstable_now(),"function"==typeof s){d.callback=s,w(t),o=!0;break t}d===n(l)&&r(l),w(t)}else r(l);d=n(l)}if(null!==d)o=!0;else{var u=n(c);null!==u&&O(k,u.startTime-t),o=!1}}break e}finally{d=null,f=i,p=!1}o=void 0}}finally{o?x():S=!1}}}if("function"==typeof v)x=function(){v(A)};else if("undefined"!=typeof MessageChannel){var N=new MessageChannel,T=N.port2;N.port1.onmessage=A,x=function(){T.postMessage(null)}}else x=function(){y(A,0)};function O(t,n){_=y(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,o,i){var a=e.unstable_now();switch(i="object"==typeof i&&null!==i&&"number"==typeof(i=i.delay)&&0<i?a+i:a,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return r={id:u++,callback:o,priorityLevel:r,startTime:i,expirationTime:s=i+s,sortIndex:-1},i>a?(r.sortIndex=i,t(c,r),null===n(l)&&r===n(c)&&(m?(b(_),_=-1):m=!0,O(k,i-a))):(r.sortIndex=s,t(l,r),h||p||(h=!0,S||(S=!0,x()))),r},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}}(s)),s)),a.exports}var c,u,d={exports:{}},f={};function p(){if(c)return f;c=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),h=Symbol.iterator;var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,y={};function b(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||m}function v(){}function w(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||m}b.prototype.isReactComponent={},b.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("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")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=b.prototype;var k=w.prototype=new v;k.constructor=w,g(k,b.prototype),k.isPureReactComponent=!0;var x=Array.isArray;function S(){}var _={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function C(t,n,r){var o=r.ref;return{$$typeof:e,type:t,key:n,ref:void 0!==o?o:null,props:r}}function z(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var A=/\/+/g;function N(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(n=""+e.key,r={"=":"=0",":":"=2"},"$"+n.replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var n,r}function T(n,r,o,i,a){var s=typeof n;"undefined"!==s&&"boolean"!==s||(n=null);var l,c,u=!1;if(null===n)u=!0;else switch(s){case"bigint":case"string":case"number":u=!0;break;case"object":switch(n.$$typeof){case e:case t:u=!0;break;case d:return T((u=n._init)(n._payload),r,o,i,a)}}if(u)return a=a(n),u=""===i?"."+N(n,0):i,x(a)?(o="",null!=u&&(o=u.replace(A,"$&/")+"/"),T(a,r,o,"",function(e){return e})):null!=a&&(z(a)&&(l=a,c=o+(null==a.key||n&&n.key===a.key?"":(""+a.key).replace(A,"$&/")+"/")+u,a=C(l.type,c,l.props)),r.push(a)),1;u=0;var f,p=""===i?".":i+":";if(x(n))for(var m=0;m<n.length;m++)u+=T(i=n[m],r,o,s=p+N(i,m),a);else if("function"==typeof(m=null===(f=n)||"object"!=typeof f?null:"function"==typeof(f=h&&f[h]||f["@@iterator"])?f:null))for(n=m.call(n),m=0;!(i=n.next()).done;)u+=T(i=i.value,r,o,s=p+N(i,m++),a);else if("object"===s){if("function"==typeof n.then)return T(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(S,S):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(n),r,o,i,a);throw r=String(n),Error("Objects are not valid as a React child (found: "+("[object Object]"===r?"object with keys {"+Object.keys(n).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.")}return u}function O(e,t,n){if(null==e)return e;var r=[],o=0;return T(e,r,"","",function(e){return t.call(n,e,o++)}),r}function P(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var I="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},M={map:O,forEach:function(e,t,n){O(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return O(e,function(){t++}),t},toArray:function(e){return O(e,function(e){return e})||[]},only:function(e){if(!z(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};return f.Activity=p,f.Children=M,f.Component=b,f.Fragment=n,f.Profiler=o,f.PureComponent=w,f.StrictMode=r,f.Suspense=l,f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=_,f.__COMPILER_RUNTIME={__proto__:null,c:function(e){return _.H.useMemoCache(e)}},f.cache=function(e){return function(){return e.apply(null,arguments)}},f.cacheSignal=function(){return null},f.cloneElement=function(e,t,n){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var r=g({},e.props),o=e.key;if(null!=t)for(i in void 0!==t.key&&(o=""+t.key),t)!E.call(t,i)||"key"===i||"__self"===i||"__source"===i||"ref"===i&&void 0===t.ref||(r[i]=t[i]);var i=arguments.length-2;if(1===i)r.children=n;else if(1<i){for(var a=Array(i),s=0;s<i;s++)a[s]=arguments[s+2];r.children=a}return C(e.type,o,r)},f.createContext=function(e){return(e={$$typeof:a,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:i,_context:e},e},f.createElement=function(e,t,n){var r,o={},i=null;if(null!=t)for(r in void 0!==t.key&&(i=""+t.key),t)E.call(t,r)&&"key"!==r&&"__self"!==r&&"__source"!==r&&(o[r]=t[r]);var a=arguments.length-2;if(1===a)o.children=n;else if(1<a){for(var s=Array(a),l=0;l<a;l++)s[l]=arguments[l+2];o.children=s}if(e&&e.defaultProps)for(r in a=e.defaultProps)void 0===o[r]&&(o[r]=a[r]);return C(e,i,o)},f.createRef=function(){return{current:null}},f.forwardRef=function(e){return{$$typeof:s,render:e}},f.isValidElement=z,f.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:P}},f.memo=function(e,t){return{$$typeof:u,type:e,compare:void 0===t?null:t}},f.startTransition=function(e){var t=_.T,n={};_.T=n;try{var r=e(),o=_.S;null!==o&&o(n,r),"object"==typeof r&&null!==r&&"function"==typeof r.then&&r.then(S,I)}catch(i){I(i)}finally{null!==t&&null!==n.types&&(t.types=n.types),_.T=t}},f.unstable_useCacheRefresh=function(){return _.H.useCacheRefresh()},f.use=function(e){return _.H.use(e)},f.useActionState=function(e,t,n){return _.H.useActionState(e,t,n)},f.useCallback=function(e,t){return _.H.useCallback(e,t)},f.useContext=function(e){return _.H.useContext(e)},f.useDebugValue=function(){},f.useDeferredValue=function(e,t){return _.H.useDeferredValue(e,t)},f.useEffect=function(e,t){return _.H.useEffect(e,t)},f.useEffectEvent=function(e){return _.H.useEffectEvent(e)},f.useId=function(){return _.H.useId()},f.useImperativeHandle=function(e,t,n){return _.H.useImperativeHandle(e,t,n)},f.useInsertionEffect=function(e,t){return _.H.useInsertionEffect(e,t)},f.useLayoutEffect=function(e,t){return _.H.useLayoutEffect(e,t)},f.useMemo=function(e,t){return _.H.useMemo(e,t)},f.useOptimistic=function(e,t){return _.H.useOptimistic(e,t)},f.useReducer=function(e,t,n){return _.H.useReducer(e,t,n)},f.useRef=function(e){return _.H.useRef(e)},f.useState=function(e){return _.H.useState(e)},f.useSyncExternalStore=function(e,t,n){return _.H.useSyncExternalStore(e,t,n)},f.useTransition=function(){return _.H.useTransition()},f.version="19.2.3",f}function h(){return u||(u=1,d.exports=p()),d.exports}var m,g,y,b,v={exports:{}},w={};function k(){if(m)return w;m=1;var e=h();function t(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;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."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");var i=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(e,t){return"font"===e?"":"string"==typeof t?"use-credentials"===t?t:"":void 0}return w.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,w.createPortal=function(e,n){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!n||1!==n.nodeType&&9!==n.nodeType&&11!==n.nodeType)throw Error(t(299));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:o,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,n,null,r)},w.flushSync=function(e){var t=i.T,n=r.p;try{if(i.T=null,r.p=2,e)return e()}finally{i.T=t,r.p=n,r.d.f()}},w.preconnect=function(e,t){"string"==typeof e&&(t?t="string"==typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:t=null,r.d.C(e,t))},w.prefetchDNS=function(e){"string"==typeof e&&r.d.D(e)},w.preinit=function(e,t){if("string"==typeof e&&t&&"string"==typeof t.as){var n=t.as,o=a(n,t.crossOrigin),i="string"==typeof t.integrity?t.integrity:void 0,s="string"==typeof t.fetchPriority?t.fetchPriority:void 0;"style"===n?r.d.S(e,"string"==typeof t.precedence?t.precedence:void 0,{crossOrigin:o,integrity:i,fetchPriority:s}):"script"===n&&r.d.X(e,{crossOrigin:o,integrity:i,fetchPriority:s,nonce:"string"==typeof t.nonce?t.nonce:void 0})}},w.preinitModule=function(e,t){if("string"==typeof e)if("object"==typeof t&&null!==t){if(null==t.as||"script"===t.as){var n=a(t.as,t.crossOrigin);r.d.M(e,{crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0})}}else null==t&&r.d.M(e)},w.preload=function(e,t){if("string"==typeof e&&"object"==typeof t&&null!==t&&"string"==typeof t.as){var n=t.as,o=a(n,t.crossOrigin);r.d.L(e,n,{crossOrigin:o,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0,type:"string"==typeof t.type?t.type:void 0,fetchPriority:"string"==typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"string"==typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"==typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"==typeof t.imageSizes?t.imageSizes:void 0,media:"string"==typeof t.media?t.media:void 0})}},w.preloadModule=function(e,t){if("string"==typeof e)if(t){var n=a(t.as,t.crossOrigin);r.d.m(e,{as:"string"==typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0})}else r.d.m(e)},w.requestFormReset=function(e){r.d.r(e)},w.unstable_batchedUpdates=function(e,t){return e(t)},w.useFormState=function(e,t,n){return i.H.useFormState(e,t,n)},w.useFormStatus=function(){return i.H.useHostTransitionStatus()},w.version="19.2.3",w}function x(){if(g)return v.exports;return g=1,function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),v.exports=k(),v.exports}function S(){if(y)return i;y=1;var e=l(),t=h(),n=x();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;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."}function o(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function a(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function s(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function c(e){if(31===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function u(e){if(a(e)!==e)throw Error(r(188))}function d(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=d(e)))return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for("react.element"),m=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),S=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),T=Symbol.for("react.memo_cache_sentinel"),O=Symbol.iterator;function P(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=O&&e[O]||e["@@iterator"])?e:null}var I=Symbol.for("react.client.reference");function M(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===I?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case b:return"Fragment";case w:return"Profiler";case v:return"StrictMode";case E:return"Suspense";case C:return"SuspenseList";case N:return"Activity"}if("object"==typeof e)switch(e.$$typeof){case g:return"Portal";case S:return e.displayName||"Context";case k:return(e._context.displayName||"Context")+".Consumer";case _:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case z:return null!==(t=e.displayName||null)?t:M(e.type)||"Memo";case A:t=e._payload,e=e._init;try{return M(e(t))}catch(n){}}return null}var j=Array.isArray,F=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,D={pending:!1,data:null,method:null,action:null},R=[],U=-1;function B(e){return{current:e}}function $(e){0>U||(e.current=R[U],R[U]=null,U--)}function H(e,t){U++,R[U]=e.current,e.current=t}var V,q,W=B(null),Z=B(null),Q=B(null),K=B(null);function G(e,t){switch(H(Q,t),H(Z,e),H(W,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=wd(t=vd(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}$(W),H(W,e)}function Y(){$(W),$(Z),$(Q)}function J(e){null!==e.memoizedState&&H(K,e);var t=W.current,n=wd(t,e.type);t!==n&&(H(Z,e),H(W,n))}function X(e){Z.current===e&&($(W),$(Z)),K.current===e&&($(K),pf._currentValue=D)}function ee(e){if(void 0===V)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);V=t&&t[1]||"",q=-1<n.stack.indexOf("\n at")?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+V+e+q}var te=!1;function ne(e,t){if(!e||te)return"";te=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(o){var r=o}Reflect.construct(e,[],n)}else{try{n.call()}catch(i){r=i}e.call(n.prototype)}}else{try{throw Error()}catch(a){r=a}(n=e())&&"function"==typeof n.catch&&n.catch(function(){})}}catch(s){if(s&&r&&"string"==typeof s.stack)return[s.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=r.DetermineComponentFrameRoot(),a=i[0],s=i[1];if(a&&s){var l=a.split("\n"),c=s.split("\n");for(o=r=0;r<l.length&&!l[r].includes("DetermineComponentFrameRoot");)r++;for(;o<c.length&&!c[o].includes("DetermineComponentFrameRoot");)o++;if(r===l.length||o===c.length)for(r=l.length-1,o=c.length-1;1<=r&&0<=o&&l[r]!==c[o];)o--;for(;1<=r&&0<=o;r--,o--)if(l[r]!==c[o]){if(1!==r||1!==o)do{if(r--,0>--o||l[r]!==c[o]){var u="\n"+l[r].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}}while(1<=r&&0<=o);break}}}finally{te=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?ee(n):""}function re(e,t){switch(e.tag){case 26:case 27:case 5:return ee(e.type);case 16:return ee("Lazy");case 13:return e.child!==t&&null!==t?ee("Suspense Fallback"):ee("Suspense");case 19:return ee("SuspenseList");case 0:case 15:return ne(e.type,!1);case 11:return ne(e.type.render,!1);case 1:return ne(e.type,!0);case 31:return ee("Activity");default:return""}}function oe(e){try{var t="",n=null;do{t+=re(e,n),n=e,e=e.return}while(e);return t}catch(r){return"\nError generating stack: "+r.message+"\n"+r.stack}}var ie=Object.prototype.hasOwnProperty,ae=e.unstable_scheduleCallback,se=e.unstable_cancelCallback,le=e.unstable_shouldYield,ce=e.unstable_requestPaint,ue=e.unstable_now,de=e.unstable_getCurrentPriorityLevel,fe=e.unstable_ImmediatePriority,pe=e.unstable_UserBlockingPriority,he=e.unstable_NormalPriority,me=e.unstable_LowPriority,ge=e.unstable_IdlePriority,ye=e.log,be=e.unstable_setDisableYieldValue,ve=null,we=null;function ke(e){if("function"==typeof ye&&be(e),we&&"function"==typeof we.setStrictMode)try{we.setStrictMode(ve,e)}catch(t){}}var xe=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(Se(e)/_e|0)|0},Se=Math.log,_e=Math.LN2;var Ee=256,Ce=262144,ze=4194304;function Ae(e){var t=42&e;if(0!==t)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ne(e,t,n){var r=e.pendingLanes;if(0===r)return 0;var o=0,i=e.suspendedLanes,a=e.pingedLanes;e=e.warmLanes;var s=134217727&r;return 0!==s?0!==(r=s&~i)?o=Ae(r):0!==(a&=s)?o=Ae(a):n||0!==(n=s&~e)&&(o=Ae(n)):0!==(s=r&~i)?o=Ae(s):0!==a?o=Ae(a):n||0!==(n=r&~e)&&(o=Ae(n)),0===o?0:0!==t&&t!==o&&0===(t&i)&&((i=o&-o)>=(n=t&-t)||32===i&&4194048&n)?t:o}function Te(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function Oe(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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;default:return-1}}function Pe(){var e=ze;return!(62914560&(ze<<=1))&&(ze=4194304),e}function Ie(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Me(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function je(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-xe(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|261930&n}function Fe(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-xe(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}function Le(e,t){var n=t&-t;return 0!==((n=42&n?1:De(n))&(e.suspendedLanes|t))?0:n}function De(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Re(e){return 2<(e&=-e)?8<e?134217727&e?32:268435456:8:2}function Ue(){var e=L.p;return 0!==e?e:void 0===(e=window.event)?32:Nf(e.type)}function Be(e,t){var n=L.p;try{return L.p=e,t()}finally{L.p=n}}var $e=Math.random().toString(36).slice(2),He="__reactFiber$"+$e,Ve="__reactProps$"+$e,qe="__reactContainer$"+$e,We="__reactEvents$"+$e,Ze="__reactListeners$"+$e,Qe="__reactHandles$"+$e,Ke="__reactResources$"+$e,Ge="__reactMarker$"+$e;function Ye(e){delete e[He],delete e[Ve],delete e[We],delete e[Ze],delete e[Qe]}function Je(e){var t=e[He];if(t)return t;for(var n=e.parentNode;n;){if(t=n[qe]||n[He]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Dd(e);null!==e;){if(n=e[He])return n;e=Dd(e)}return t}n=(e=n).parentNode}return null}function Xe(e){if(e=e[He]||e[qe]){var t=e.tag;if(5===t||6===t||13===t||31===t||26===t||27===t||3===t)return e}return null}function et(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(r(33))}function tt(e){var t=e[Ke];return t||(t=e[Ke]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function nt(e){e[Ge]=!0}var rt=new Set,ot={};function it(e,t){at(e,t),at(e+"Capture",t)}function at(e,t){for(ot[e]=t,e=0;e<t.length;e++)rt.add(t[e])}var st=RegExp("^[: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]*$"),lt={},ct={};function ut(e,t,n){if(o=t,ie.call(ct,o)||!ie.call(lt,o)&&(st.test(o)?ct[o]=!0:(lt[o]=!0,0)))if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":return void e.removeAttribute(t);case"boolean":var r=t.toLowerCase().slice(0,5);if("data-"!==r&&"aria-"!==r)return void e.removeAttribute(t)}e.setAttribute(t,""+n)}var o}function dt(e,t,n){if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(t)}e.setAttribute(t,""+n)}}function ft(e,t,n,r){if(null===r)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(n)}e.setAttributeNS(t,n,""+r)}}function pt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function ht(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function mt(e){if(!e._valueTracker){var t=ht(e)?"checked":"value";e._valueTracker=function(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&void 0!==r&&"function"==typeof r.get&&"function"==typeof r.set){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){n=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e,t,""+e[t])}}function gt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ht(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function yt(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(iy){return e.body}}var bt=/[\n"\\]/g;function vt(e){return e.replace(bt,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function wt(e,t,n,r,o,i,a,s){e.name="",null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a?e.type=a:e.removeAttribute("type"),null!=t?"number"===a?(0===t&&""===e.value||e.value!=t)&&(e.value=""+pt(t)):e.value!==""+pt(t)&&(e.value=""+pt(t)):"submit"!==a&&"reset"!==a||e.removeAttribute("value"),null!=t?xt(e,a,pt(t)):null!=n?xt(e,a,pt(n)):null!=r&&e.removeAttribute("value"),null==o&&null!=i&&(e.defaultChecked=!!i),null!=o&&(e.checked=o&&"function"!=typeof o&&"symbol"!=typeof o),null!=s&&"function"!=typeof s&&"symbol"!=typeof s&&"boolean"!=typeof s?e.name=""+pt(s):e.removeAttribute("name")}function kt(e,t,n,r,o,i,a,s){if(null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i&&(e.type=i),null!=t||null!=n){if(("submit"===i||"reset"===i)&&null==t)return void mt(e);n=null!=n?""+pt(n):"",t=null!=t?""+pt(t):n,s||t===e.value||(e.value=t),e.defaultValue=t}r="function"!=typeof(r=null!=r?r:o)&&"symbol"!=typeof r&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a&&(e.name=a),mt(e)}function xt(e,t,n){"number"===t&&yt(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function St(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+pt(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function _t(e,t,n){null==t||((t=""+pt(t))!==e.value&&(e.value=t),null!=n)?e.defaultValue=null!=n?""+pt(n):"":e.defaultValue!==t&&(e.defaultValue=t)}function Et(e,t,n,o){if(null==t){if(null!=o){if(null!=n)throw Error(r(92));if(j(o)){if(1<o.length)throw Error(r(93));o=o[0]}n=o}null==n&&(n=""),t=n}n=pt(t),e.defaultValue=n,(o=e.textContent)===n&&""!==o&&null!==o&&(e.value=o),mt(e)}function Ct(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var zt=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function At(e,t,n){var r=0===t.indexOf("--");null==n||"boolean"==typeof n||""===n?r?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":r?e.setProperty(t,n):"number"!=typeof n||0===n||zt.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Nt(e,t,n){if(null!=t&&"object"!=typeof t)throw Error(r(62));if(e=e.style,null!=n){for(var o in n)!n.hasOwnProperty(o)||null!=t&&t.hasOwnProperty(o)||(0===o.indexOf("--")?e.setProperty(o,""):"float"===o?e.cssFloat="":e[o]="");for(var i in t)o=t[i],t.hasOwnProperty(i)&&n[i]!==o&&At(e,i,o)}else for(var a in t)t.hasOwnProperty(a)&&At(e,a,t[a])}function Tt(e){if(-1===e.indexOf("-"))return!1;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 Ot=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Pt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function It(e){return Pt.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Mt(){}var jt=null;function Ft(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Lt=null,Dt=null;function Rt(e){var t=Xe(e);if(t&&(e=t.stateNode)){var n=e[Ve]||null;e:switch(e=t.stateNode,t.type){case"input":if(wt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+vt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var o=n[t];if(o!==e&&o.form===e.form){var i=o[Ve]||null;if(!i)throw Error(r(90));wt(o,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)(o=n[t]).form===e.form&>(o)}break e;case"textarea":_t(e,n.value,n.defaultValue);break e;case"select":null!=(t=n.value)&&St(e,!!n.multiple,t,!1)}}}var Ut=!1;function Bt(e,t,n){if(Ut)return e(t,n);Ut=!0;try{return e(t)}finally{if(Ut=!1,(null!==Lt||null!==Dt)&&(tu(),Lt&&(t=Lt,e=Dt,Dt=Lt=null,Rt(t),e)))for(t=0;t<e.length;t++)Rt(e[t])}}function $t(e,t){var n=e.stateNode;if(null===n)return null;var o=n[Ve]||null;if(null===o)return null;n=o[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":(o=!o.disabled)||(o=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!o;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(r(231,t,typeof n));return n}var Ht=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Vt=!1;if(Ht)try{var qt={};Object.defineProperty(qt,"passive",{get:function(){Vt=!0}}),window.addEventListener("test",qt,qt),window.removeEventListener("test",qt,qt)}catch(iy){Vt=!1}var Wt=null,Zt=null,Qt=null;function Kt(){if(Qt)return Qt;var e,t,n=Zt,r=n.length,o="value"in Wt?Wt.value:Wt.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return Qt=o.slice(e,1<t?1-t:void 0)}function Gt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Yt(){return!0}function Jt(){return!1}function Xt(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?Yt:Jt,this.isPropagationStopped=Jt,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Yt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Yt)},persist:function(){},isPersistent:Yt}),t}var en,tn,nn,rn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},on=Xt(rn),an=f({},rn,{view:0,detail:0}),sn=Xt(an),ln=f({},an,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==nn&&(nn&&"mousemove"===e.type?(en=e.screenX-nn.screenX,tn=e.screenY-nn.screenY):tn=en=0,nn=e),en)},movementY:function(e){return"movementY"in e?e.movementY:tn}}),cn=Xt(ln),un=Xt(f({},ln,{dataTransfer:0})),dn=Xt(f({},an,{relatedTarget:0})),fn=Xt(f({},rn,{animationName:0,elapsedTime:0,pseudoElement:0})),pn=Xt(f({},rn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),hn=Xt(f({},rn,{data:0})),mn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gn={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"},yn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=yn[e])&&!!t[e]}function vn(){return bn}var wn=Xt(f({},an,{key:function(e){if(e.key){var t=mn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Gt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?gn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vn,charCode:function(e){return"keypress"===e.type?Gt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Gt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),kn=Xt(f({},ln,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),xn=Xt(f({},an,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vn})),Sn=Xt(f({},rn,{propertyName:0,elapsedTime:0,pseudoElement:0})),_n=Xt(f({},ln,{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})),En=Xt(f({},rn,{newState:0,oldState:0})),Cn=[9,13,27,32],zn=Ht&&"CompositionEvent"in window,An=null;Ht&&"documentMode"in document&&(An=document.documentMode);var Nn=Ht&&"TextEvent"in window&&!An,Tn=Ht&&(!zn||An&&8<An&&11>=An),On=String.fromCharCode(32),Pn=!1;function In(e,t){switch(e){case"keyup":return-1!==Cn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var jn=!1;var Fn={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 Ln(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Fn[e.type]:"textarea"===t}function Dn(e,t,n,r){Lt?Dt?Dt.push(r):Dt=[r]:Lt=r,0<(t=id(t,"onChange")).length&&(n=new on("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Rn=null,Un=null;function Bn(e){Yu(e,0)}function $n(e){if(gt(et(e)))return e}function Hn(e,t){if("change"===e)return t}var Vn=!1;if(Ht){var qn;if(Ht){var Wn="oninput"in document;if(!Wn){var Zn=document.createElement("div");Zn.setAttribute("oninput","return;"),Wn="function"==typeof Zn.oninput}qn=Wn}else qn=!1;Vn=qn&&(!document.documentMode||9<document.documentMode)}function Qn(){Rn&&(Rn.detachEvent("onpropertychange",Kn),Un=Rn=null)}function Kn(e){if("value"===e.propertyName&&$n(Un)){var t=[];Dn(t,Un,e,Ft(e)),Bt(Bn,t)}}function Gn(e,t,n){"focusin"===e?(Qn(),Un=n,(Rn=t).attachEvent("onpropertychange",Kn)):"focusout"===e&&Qn()}function Yn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return $n(Un)}function Jn(e,t){if("click"===e)return $n(t)}function Xn(e,t){if("input"===e||"change"===e)return $n(t)}var er="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function tr(e,t){if(er(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)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 o=n[r];if(!ie.call(t,o)||!er(e[o],t[o]))return!1}return!0}function nr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function rr(e,t){var n,r=nr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=nr(r)}}function or(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?or(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function ir(e){for(var t=yt((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=yt((e=t.contentWindow).document)}return t}function ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var sr=Ht&&"documentMode"in document&&11>=document.documentMode,lr=null,cr=null,ur=null,dr=!1;function fr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;dr||null==lr||lr!==yt(r)||("selectionStart"in(r=lr)&&ar(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},ur&&tr(ur,r)||(ur=r,0<(r=id(cr,"onSelect")).length&&(t=new on("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=lr)))}function pr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var hr={animationend:pr("Animation","AnimationEnd"),animationiteration:pr("Animation","AnimationIteration"),animationstart:pr("Animation","AnimationStart"),transitionrun:pr("Transition","TransitionRun"),transitionstart:pr("Transition","TransitionStart"),transitioncancel:pr("Transition","TransitionCancel"),transitionend:pr("Transition","TransitionEnd")},mr={},gr={};function yr(e){if(mr[e])return mr[e];if(!hr[e])return e;var t,n=hr[e];for(t in n)if(n.hasOwnProperty(t)&&t in gr)return mr[e]=n[t];return e}Ht&&(gr=document.createElement("div").style,"AnimationEvent"in window||(delete hr.animationend.animation,delete hr.animationiteration.animation,delete hr.animationstart.animation),"TransitionEvent"in window||delete hr.transitionend.transition);var br=yr("animationend"),vr=yr("animationiteration"),wr=yr("animationstart"),kr=yr("transitionrun"),xr=yr("transitionstart"),Sr=yr("transitioncancel"),_r=yr("transitionend"),Er=new Map,Cr="abort auxClick beforeToggle 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 zr(e,t){Er.set(e,t),it(t,[e])}Cr.push("scrollEnd");var Ar="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},Nr=[],Tr=0,Or=0;function Pr(){for(var e=Tr,t=Or=Tr=0;t<e;){var n=Nr[t];Nr[t++]=null;var r=Nr[t];Nr[t++]=null;var o=Nr[t];Nr[t++]=null;var i=Nr[t];if(Nr[t++]=null,null!==r&&null!==o){var a=r.pending;null===a?o.next=o:(o.next=a.next,a.next=o),r.pending=o}0!==i&&Fr(n,o,i)}}function Ir(e,t,n,r){Nr[Tr++]=e,Nr[Tr++]=t,Nr[Tr++]=n,Nr[Tr++]=r,Or|=r,e.lanes|=r,null!==(e=e.alternate)&&(e.lanes|=r)}function Mr(e,t,n,r){return Ir(e,t,n,r),Lr(e)}function jr(e,t){return Ir(e,null,null,t),Lr(e)}function Fr(e,t,n){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n);for(var o=!1,i=e.return;null!==i;)i.childLanes|=n,null!==(r=i.alternate)&&(r.childLanes|=n),22===i.tag&&(null===(e=i.stateNode)||1&e._visibility||(o=!0)),e=i,i=i.return;return 3===e.tag?(i=e.stateNode,o&&null!==t&&(o=31-xe(n),null===(r=(e=i.hiddenUpdates)[o])?e[o]=[t]:r.push(t),t.lane=536870912|n),i):null}function Lr(e){if(50<Wc)throw Wc=0,Zc=null,Error(r(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var Dr={};function Rr(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.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ur(e,t,n,r){return new Rr(e,t,n,r)}function Br(e){return!(!(e=e.prototype)||!e.isReactComponent)}function $r(e,t){var n=e.alternate;return null===n?((n=Ur(e.tag,t,e.key,e.mode)).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=65011712&e.flags,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=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Hr(e,t){e.flags&=65011714;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Vr(e,t,n,o,i,a){var s=0;if(o=e,"function"==typeof e)Br(e)&&(s=1);else if("string"==typeof e)s=function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!=typeof t.precedence||"string"!=typeof t.href||""===t.href)break;return!0;case"link":if("string"!=typeof t.rel||"string"!=typeof t.href||""===t.href||t.onLoad||t.onError)break;return"stylesheet"!==t.rel||(e=t.disabled,"string"==typeof t.precedence&&null==e);case"script":if(t.async&&"function"!=typeof t.async&&"symbol"!=typeof t.async&&!t.onLoad&&!t.onError&&t.src&&"string"==typeof t.src)return!0}return!1}(e,n,W.current)?26:"html"===e||"head"===e||"body"===e?27:5;else e:switch(e){case N:return(e=Ur(31,n,t,i)).elementType=N,e.lanes=a,e;case b:return qr(n.children,i,a,t);case v:s=8,i|=24;break;case w:return(e=Ur(12,n,t,2|i)).elementType=w,e.lanes=a,e;case E:return(e=Ur(13,n,t,i)).elementType=E,e.lanes=a,e;case C:return(e=Ur(19,n,t,i)).elementType=C,e.lanes=a,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case S:s=10;break e;case k:s=9;break e;case _:s=11;break e;case z:s=14;break e;case A:s=16,o=null;break e}s=29,n=Error(r(130,null===e?"null":typeof e,"")),o=null}return(t=Ur(s,n,t,i)).elementType=e,t.type=o,t.lanes=a,t}function qr(e,t,n,r){return(e=Ur(7,e,r,t)).lanes=n,e}function Wr(e,t,n){return(e=Ur(6,e,null,t)).lanes=n,e}function Zr(e){var t=Ur(18,null,null,0);return t.stateNode=e,t}function Qr(e,t,n){return(t=Ur(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Kr=new WeakMap;function Gr(e,t){if("object"==typeof e&&null!==e){var n=Kr.get(e);return void 0!==n?n:(t={value:e,source:t,stack:oe(t)},Kr.set(e,t),t)}return{value:e,source:t,stack:oe(t)}}var Yr=[],Jr=0,Xr=null,eo=0,to=[],no=0,ro=null,oo=1,io="";function ao(e,t){Yr[Jr++]=eo,Yr[Jr++]=Xr,Xr=e,eo=t}function so(e,t,n){to[no++]=oo,to[no++]=io,to[no++]=ro,ro=e;var r=oo;e=io;var o=32-xe(r)-1;r&=~(1<<o),n+=1;var i=32-xe(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,oo=1<<32-xe(t)+o|n<<o|r,io=i+e}else oo=1<<i|n<<o|r,io=e}function lo(e){null!==e.return&&(ao(e,1),so(e,1,0))}function co(e){for(;e===Xr;)Xr=Yr[--Jr],Yr[Jr]=null,eo=Yr[--Jr],Yr[Jr]=null;for(;e===ro;)ro=to[--no],to[no]=null,io=to[--no],to[no]=null,oo=to[--no],to[no]=null}function uo(e,t){to[no++]=oo,to[no++]=io,to[no++]=ro,oo=t.id,io=t.overflow,ro=e}var fo=null,po=null,ho=!1,mo=null,go=!1,yo=Error(r(519));function bo(e){throw _o(Gr(Error(r(418,1<arguments.length&&void 0!==arguments[1]&&arguments[1]?"text":"HTML","")),e)),yo}function vo(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[He]=e,t[Ve]=r,n){case"dialog":Ju("cancel",t),Ju("close",t);break;case"iframe":case"object":case"embed":Ju("load",t);break;case"video":case"audio":for(n=0;n<Ku.length;n++)Ju(Ku[n],t);break;case"source":Ju("error",t);break;case"img":case"image":case"link":Ju("error",t),Ju("load",t);break;case"details":Ju("toggle",t);break;case"input":Ju("invalid",t),kt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Ju("invalid",t);break;case"textarea":Ju("invalid",t),Et(t,r.value,r.defaultValue,r.children)}"string"!=typeof(n=r.children)&&"number"!=typeof n&&"bigint"!=typeof n||t.textContent===""+n||!0===r.suppressHydrationWarning||dd(t.textContent,n)?(null!=r.popover&&(Ju("beforetoggle",t),Ju("toggle",t)),null!=r.onScroll&&Ju("scroll",t),null!=r.onScrollEnd&&Ju("scrollend",t),null!=r.onClick&&(t.onclick=Mt),t=!0):t=!1,t||bo(e,!0)}function wo(e){for(fo=e.return;fo;)switch(fo.tag){case 5:case 31:case 13:return void(go=!1);case 27:case 3:return void(go=!0);default:fo=fo.return}}function ko(e){if(e!==fo)return!1;if(!ho)return wo(e),ho=!0,!1;var t,n=e.tag;if((t=3!==n&&27!==n)&&((t=5===n)&&(t=!("form"!==(t=e.type)&&"button"!==t)||kd(e.type,e.memoizedProps)),t=!t),t&&po&&bo(e),wo(e),13===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(r(317));po=Ld(e)}else if(31===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(r(317));po=Ld(e)}else 27===n?(n=po,Ad(e.type)?(e=Fd,Fd=null,po=e):po=n):po=fo?jd(e.stateNode.nextSibling):null;return!0}function xo(){po=fo=null,ho=!1}function So(){var e=mo;return null!==e&&(null===Pc?Pc=e:Pc.push.apply(Pc,e),mo=null),e}function _o(e){null===mo?mo=[e]:mo.push(e)}var Eo=B(null),Co=null,zo=null;function Ao(e,t,n){H(Eo,t._currentValue),t._currentValue=n}function No(e){e._currentValue=Eo.current,$(Eo)}function To(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Oo(e,t,n,o){var i=e.child;for(null!==i&&(i.return=e);null!==i;){var a=i.dependencies;if(null!==a){var s=i.child;a=a.firstContext;e:for(;null!==a;){var l=a;a=i;for(var c=0;c<t.length;c++)if(l.context===t[c]){a.lanes|=n,null!==(l=a.alternate)&&(l.lanes|=n),To(a.return,n,e),o||(s=null);break e}a=l.next}}else if(18===i.tag){if(null===(s=i.return))throw Error(r(341));s.lanes|=n,null!==(a=s.alternate)&&(a.lanes|=n),To(s,n,e),s=null}else s=i.child;if(null!==s)s.return=i;else for(s=i;null!==s;){if(s===e){s=null;break}if(null!==(i=s.sibling)){i.return=s.return,s=i;break}s=s.return}i=s}}function Po(e,t,n,o){e=null;for(var i=t,a=!1;null!==i;){if(!a)if(524288&i.flags)a=!0;else if(262144&i.flags)break;if(10===i.tag){var s=i.alternate;if(null===s)throw Error(r(387));if(null!==(s=s.memoizedProps)){var l=i.type;er(i.pendingProps.value,s.value)||(null!==e?e.push(l):e=[l])}}else if(i===K.current){if(null===(s=i.alternate))throw Error(r(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(null!==e?e.push(pf):e=[pf])}i=i.return}null!==e&&Oo(t,e,n,o),t.flags|=262144}function Io(e){for(e=e.firstContext;null!==e;){if(!er(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Mo(e){Co=e,zo=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function jo(e){return Lo(Co,e)}function Fo(e,t){return null===Co&&Mo(e),Lo(e,t)}function Lo(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},null===zo){if(null===e)throw Error(r(308));zo=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else zo=zo.next=t;return n}var Do="undefined"!=typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Ro=e.unstable_scheduleCallback,Uo=e.unstable_NormalPriority,Bo={$$typeof:S,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function $o(){return{controller:new Do,data:new Map,refCount:0}}function Ho(e){e.refCount--,0===e.refCount&&Ro(Uo,function(){e.controller.abort()})}var Vo=null,qo=0,Wo=0,Zo=null;function Qo(){if(0===--qo&&null!==Vo){null!==Zo&&(Zo.status="fulfilled");var e=Vo;Vo=null,Wo=0,Zo=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var Ko=F.S;F.S=function(e,t){jc=ue(),"object"==typeof t&&null!==t&&"function"==typeof t.then&&function(e,t){if(null===Vo){var n=Vo=[];qo=0,Wo=Vu(),Zo={status:"pending",value:void 0,then:function(e){n.push(e)}}}qo++,t.then(Qo,Qo)}(0,t),null!==Ko&&Ko(e,t)};var Go=B(null);function Yo(){var e=Go.current;return null!==e?e:gc.pooledCache}function Jo(e,t){H(Go,null===t?Go.current:t.pool)}function Xo(){var e=Yo();return null===e?null:{parent:Bo._currentValue,pool:e}}var ei=Error(r(460)),ti=Error(r(474)),ni=Error(r(542)),ri={then:function(){}};function oi(e){return"fulfilled"===(e=e.status)||"rejected"===e}function ii(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(Mt,Mt),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw ci(e=t.reason),e;default:if("string"==typeof t.status)t.then(Mt,Mt);else{if(null!==(e=gc)&&100<e.shellSuspendCounter)throw Error(r(482));(e=t).status="pending",e.then(function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}},function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw ci(e=t.reason),e}throw si=t,ei}}function ai(e){try{return(0,e._init)(e._payload)}catch(t){if(null!==t&&"object"==typeof t&&"function"==typeof t.then)throw si=t,ei;throw t}}var si=null;function li(){if(null===si)throw Error(r(459));var e=si;return si=null,e}function ci(e){if(e===ei||e===ni)throw Error(r(483))}var ui=null,di=0;function fi(e){var t=di;return di+=1,null===ui&&(ui=[]),ii(ui,e,t)}function pi(e,t){t=t.props.ref,e.ref=void 0!==t?t:null}function hi(e,t){if(t.$$typeof===p)throw Error(r(525));throw e=Object.prototype.toString.call(t),Error(r(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function mi(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function o(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function i(e,t){return(e=$r(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=67108866,n):r:(t.flags|=67108866,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=67108866),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Wr(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){var o=n.type;return o===b?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===A&&ai(o)===t.type)?(pi(t=i(t,n.props),n),t.return=e,t):(pi(t=Vr(n.type,n.key,n.props,null,e.mode,r),n),t.return=e,t)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Qr(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,r,o){return null===t||7!==t.tag?((t=qr(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function f(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t||"bigint"==typeof t)return(t=Wr(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case m:return pi(n=Vr(t.type,t.key,t.props,null,e.mode,n),t),n.return=e,n;case g:return(t=Qr(t,e.mode,n)).return=e,t;case A:return f(e,t=ai(t),n)}if(j(t)||P(t))return(t=qr(t,e.mode,n,null)).return=e,t;if("function"==typeof t.then)return f(e,fi(t),n);if(t.$$typeof===S)return f(e,Fo(e,t),n);hi(e,t)}return null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n||"bigint"==typeof n)return null!==o?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case m:return n.key===o?c(e,t,n,r):null;case g:return n.key===o?u(e,t,n,r):null;case A:return p(e,t,n=ai(n),r)}if(j(n)||P(n))return null!==o?null:d(e,t,n,r,null);if("function"==typeof n.then)return p(e,t,fi(n),r);if(n.$$typeof===S)return p(e,t,Fo(e,n),r);hi(e,n)}return null}function h(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r||"bigint"==typeof r)return l(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case m:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o);case g:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o);case A:return h(e,t,n,r=ai(r),o)}if(j(r)||P(r))return d(t,e=e.get(n)||null,r,o,null);if("function"==typeof r.then)return h(e,t,n,fi(r),o);if(r.$$typeof===S)return h(e,t,n,Fo(t,r),o);hi(t,r)}return null}function y(l,c,u,d){if("object"==typeof u&&null!==u&&u.type===b&&null===u.key&&(u=u.props.children),"object"==typeof u&&null!==u){switch(u.$$typeof){case m:e:{for(var v=u.key;null!==c;){if(c.key===v){if((v=u.type)===b){if(7===c.tag){n(l,c.sibling),(d=i(c,u.props.children)).return=l,l=d;break e}}else if(c.elementType===v||"object"==typeof v&&null!==v&&v.$$typeof===A&&ai(v)===c.type){n(l,c.sibling),pi(d=i(c,u.props),u),d.return=l,l=d;break e}n(l,c);break}t(l,c),c=c.sibling}u.type===b?((d=qr(u.props.children,l.mode,d,u.key)).return=l,l=d):(pi(d=Vr(u.type,u.key,u.props,null,l.mode,d),u),d.return=l,l=d)}return s(l);case g:e:{for(v=u.key;null!==c;){if(c.key===v){if(4===c.tag&&c.stateNode.containerInfo===u.containerInfo&&c.stateNode.implementation===u.implementation){n(l,c.sibling),(d=i(c,u.children||[])).return=l,l=d;break e}n(l,c);break}t(l,c),c=c.sibling}(d=Qr(u,l.mode,d)).return=l,l=d}return s(l);case A:return y(l,c,u=ai(u),d)}if(j(u))return function(r,i,s,l){for(var c=null,u=null,d=i,m=i=0,g=null;null!==d&&m<s.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var y=p(r,d,s[m],l);if(null===y){null===d&&(d=g);break}e&&d&&null===y.alternate&&t(r,d),i=a(y,i,m),null===u?c=y:u.sibling=y,u=y,d=g}if(m===s.length)return n(r,d),ho&&ao(r,m),c;if(null===d){for(;m<s.length;m++)null!==(d=f(r,s[m],l))&&(i=a(d,i,m),null===u?c=d:u.sibling=d,u=d);return ho&&ao(r,m),c}for(d=o(d);m<s.length;m++)null!==(g=h(d,r,m,s[m],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),i=a(g,i,m),null===u?c=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(r,e)}),ho&&ao(r,m),c}(l,c,u,d);if(P(u)){if("function"!=typeof(v=P(u)))throw Error(r(150));return function(i,s,l,c){if(null==l)throw Error(r(151));for(var u=null,d=null,m=s,g=s=0,y=null,b=l.next();null!==m&&!b.done;g++,b=l.next()){m.index>g?(y=m,m=null):y=m.sibling;var v=p(i,m,b.value,c);if(null===v){null===m&&(m=y);break}e&&m&&null===v.alternate&&t(i,m),s=a(v,s,g),null===d?u=v:d.sibling=v,d=v,m=y}if(b.done)return n(i,m),ho&&ao(i,g),u;if(null===m){for(;!b.done;g++,b=l.next())null!==(b=f(i,b.value,c))&&(s=a(b,s,g),null===d?u=b:d.sibling=b,d=b);return ho&&ao(i,g),u}for(m=o(m);!b.done;g++,b=l.next())null!==(b=h(m,i,g,b.value,c))&&(e&&null!==b.alternate&&m.delete(null===b.key?g:b.key),s=a(b,s,g),null===d?u=b:d.sibling=b,d=b);return e&&m.forEach(function(e){return t(i,e)}),ho&&ao(i,g),u}(l,c,u=v.call(u),d)}if("function"==typeof u.then)return y(l,c,fi(u),d);if(u.$$typeof===S)return y(l,c,Fo(l,u),d);hi(l,u)}return"string"==typeof u&&""!==u||"number"==typeof u||"bigint"==typeof u?(u=""+u,null!==c&&6===c.tag?(n(l,c.sibling),(d=i(c,u)).return=l,l=d):(n(l,c),(d=Wr(u,l.mode,d)).return=l,l=d),s(l)):n(l,c)}return function(e,t,n,r){try{di=0;var o=y(e,t,n,r);return ui=null,o}catch(a){if(a===ei||a===ni)throw a;var i=Ur(29,a,null,e.mode);return i.lanes=r,i.return=e,i}}}var gi=mi(!0),yi=mi(!1),bi=!1;function vi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function wi(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ki(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function xi(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&mc){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,t=Lr(e),Fr(e,null,n),t}return Ir(e,r,t,n),Lr(e)}function Si(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194048&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Fe(e,n)}}function _i(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ei=!1;function Ci(){if(Ei){if(null!==Zo)throw Zo}}function zi(e,t,n,r){Ei=!1;var o=e.updateQueue;bi=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var l=s,c=l.next;l.next=null,null===a?i=c:a.next=c,a=l;var u=e.alternate;null!==u&&((s=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(null!==i){var d=o.baseState;for(a=0,u=c=l=null,s=i;;){var p=-536870913&s.lane,h=p!==s.lane;if(h?(bc&p)===p:(r&p)===p){0!==p&&p===Wo&&(Ei=!0),null!==u&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var m=e,g=s;p=t;var y=n;switch(g.tag){case 1:if("function"==typeof(m=g.payload)){d=m.call(y,d,p);break e}d=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null==(p="function"==typeof(m=g.payload)?m.call(y,d,p):m))break e;d=f({},d,p);break e;case 2:bi=!0}}null!==(p=s.callback)&&(e.flags|=64,h&&(e.flags|=8192),null===(h=o.callbacks)?o.callbacks=[p]:h.push(p))}else h={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=h,l=d):u=u.next=h,a|=p;if(null===(s=s.next)){if(null===(s=o.shared.pending))break;s=(h=s).next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}null===u&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,null===i&&(o.shared.lanes=0),Cc|=a,e.lanes=a,e.memoizedState=d}}function Ai(e,t){if("function"!=typeof e)throw Error(r(191,e));e.call(t)}function Ni(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)Ai(n[e],t)}var Ti=B(null),Oi=B(0);function Pi(e,t){H(Oi,e=_c),H(Ti,t),_c=e|t.baseLanes}function Ii(){H(Oi,_c),H(Ti,Ti.current)}function Mi(){_c=Oi.current,$(Ti),$(Oi)}var ji=B(null),Fi=null;function Li(e){var t=e.alternate;H($i,1&$i.current),H(ji,e),null===Fi&&(null===t||null!==Ti.current||null!==t.memoizedState)&&(Fi=e)}function Di(e){H($i,$i.current),H(ji,e),null===Fi&&(Fi=e)}function Ri(e){22===e.tag?(H($i,$i.current),H(ji,e),null===Fi&&(Fi=e)):Ui()}function Ui(){H($i,$i.current),H(ji,ji.current)}function Bi(e){$(ji),Fi===e&&(Fi=null),$($i)}var $i=B(0);function Hi(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Id(n)||Md(n)))return t}else if(19!==t.tag||"forwards"!==t.memoizedProps.revealOrder&&"backwards"!==t.memoizedProps.revealOrder&&"unstable_legacy-backwards"!==t.memoizedProps.revealOrder&&"together"!==t.memoizedProps.revealOrder){if(null!==t.child){t.child.return=t,t=t.child;continue}}else if(128&t.flags)return t;if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Vi=0,qi=null,Wi=null,Zi=null,Qi=!1,Ki=!1,Gi=!1,Yi=0,Ji=0,Xi=null,ea=0;function ta(){throw Error(r(321))}function na(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!er(e[n],t[n]))return!1;return!0}function ra(e,t,n,r,o,i){return Vi=i,qi=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=null===e||null===e.memoizedState?bs:vs,Gi=!1,i=n(r,o),Gi=!1,Ki&&(i=ia(t,n,r,o)),oa(e),i}function oa(e){F.H=ys;var t=null!==Wi&&null!==Wi.next;if(Vi=0,Zi=Wi=qi=null,Qi=!1,Ji=0,Xi=null,t)throw Error(r(300));null===e||js||null!==(e=e.dependencies)&&Io(e)&&(js=!0)}function ia(e,t,n,o){qi=e;var i=0;do{if(Ki&&(Xi=null),Ji=0,Ki=!1,25<=i)throw Error(r(301));if(i+=1,Zi=Wi=null,null!=e.updateQueue){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,null!=a.memoCache&&(a.memoCache.index=0)}F.H=ws,a=t(n,o)}while(Ki);return a}function aa(){var e=F.H,t=e.useState()[0];return t="function"==typeof t.then?fa(t):t,e=e.useState()[0],(null!==Wi?Wi.memoizedState:null)!==e&&(qi.flags|=1024),t}function sa(){var e=0!==Yi;return Yi=0,e}function la(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ca(e){if(Qi){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}Qi=!1}Vi=0,Zi=Wi=qi=null,Ki=!1,Ji=Yi=0,Xi=null}function ua(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Zi?qi.memoizedState=Zi=e:Zi=Zi.next=e,Zi}function da(){if(null===Wi){var e=qi.alternate;e=null!==e?e.memoizedState:null}else e=Wi.next;var t=null===Zi?qi.memoizedState:Zi.next;if(null!==t)Zi=t,Wi=e;else{if(null===e){if(null===qi.alternate)throw Error(r(467));throw Error(r(310))}e={memoizedState:(Wi=e).memoizedState,baseState:Wi.baseState,baseQueue:Wi.baseQueue,queue:Wi.queue,next:null},null===Zi?qi.memoizedState=Zi=e:Zi=Zi.next=e}return Zi}function fa(e){var t=Ji;return Ji+=1,null===Xi&&(Xi=[]),e=ii(Xi,e,t),t=qi,null===(null===Zi?t.memoizedState:Zi.next)&&(t=t.alternate,F.H=null===t||null===t.memoizedState?bs:vs),e}function pa(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then)return fa(e);if(e.$$typeof===S)return jo(e)}throw Error(r(438,String(e)))}function ha(e){var t=null,n=qi.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var r=qi.alternate;null!==r&&(null!==(r=r.updateQueue)&&(null!=(r=r.memoCache)&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(null==t&&(t={data:[],index:0}),null===n&&(n={lastEffect:null,events:null,stores:null,memoCache:null},qi.updateQueue=n),n.memoCache=t,void 0===(n=t.data[t.index]))for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=T;return t.index++,n}function ma(e,t){return"function"==typeof t?t(e):t}function ga(e){return ya(da(),Wi,e)}function ya(e,t,n){var o=e.queue;if(null===o)throw Error(r(311));o.lastRenderedReducer=n;var i=e.baseQueue,a=o.pending;if(null!==a){if(null!==i){var s=i.next;i.next=a.next,a.next=s}t.baseQueue=i=a,o.pending=null}if(a=e.baseState,null===i)e.memoizedState=a;else{var l=s=null,c=null,u=t=i.next,d=!1;do{var f=-536870913&u.lane;if(f!==u.lane?(bc&f)===f:(Vi&f)===f){var p=u.revertLane;if(0===p)null!==c&&(c=c.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Wo&&(d=!0);else{if((Vi&p)===p){u=u.next,p===Wo&&(d=!0);continue}f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(l=c=f,s=a):c=c.next=f,qi.lanes|=p,Cc|=p}f=u.action,Gi&&n(a,f),a=u.hasEagerState?u.eagerState:n(a,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(l=c=p,s=a):c=c.next=p,qi.lanes|=f,Cc|=f;u=u.next}while(null!==u&&u!==t);if(null===c?s=a:c.next=l,!er(a,e.memoizedState)&&(js=!0,d&&null!==(n=Zo)))throw n;e.memoizedState=a,e.baseState=s,e.baseQueue=c,o.lastRenderedState=a}return null===i&&(o.lanes=0),[e.memoizedState,o.dispatch]}function ba(e){var t=da(),n=t.queue;if(null===n)throw Error(r(311));n.lastRenderedReducer=e;var o=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{a=e(a,s.action),s=s.next}while(s!==i);er(a,t.memoizedState)||(js=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,o]}function va(e,t,n){var o=qi,i=da(),a=ho;if(a){if(void 0===n)throw Error(r(407));n=n()}else n=t();var s=!er((Wi||i).memoizedState,n);if(s&&(i.memoizedState=n,js=!0),i=i.queue,Va(xa.bind(null,o,i,e),[e]),i.getSnapshot!==t||s||null!==Zi&&1&Zi.memoizedState.tag){if(o.flags|=2048,Ra(9,{destroy:void 0},ka.bind(null,o,i,n,t),null),null===gc)throw Error(r(349));a||127&Vi||wa(o,t,n)}return n}function wa(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=qi.updateQueue)?(t={lastEffect:null,events:null,stores:null,memoCache:null},qi.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function ka(e,t,n,r){t.value=n,t.getSnapshot=r,Sa(t)&&_a(e)}function xa(e,t,n){return n(function(){Sa(t)&&_a(e)})}function Sa(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!er(e,n)}catch(r){return!0}}function _a(e){var t=jr(e,2);null!==t&&Gc(t,e,2)}function Ea(e){var t=ua();if("function"==typeof e){var n=e;if(e=n(),Gi){ke(!0);try{n()}finally{ke(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:e},t}function Ca(e,t,n,r){return e.baseState=n,ya(e,Wi,"function"==typeof r?r:ma)}function za(e,t,n,o,i){if(hs(e))throw Error(r(485));if(null!==(e=t.action)){var a={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){a.listeners.push(e)}};null!==F.T?n(!0):a.isTransition=!1,o(a),null===(n=t.pending)?(a.next=t.pending=a,Aa(t,a)):(a.next=n.next,t.pending=n.next=a)}}function Aa(e,t){var n=t.action,r=t.payload,o=e.state;if(t.isTransition){var i=F.T,a={};F.T=a;try{var s=n(o,r),l=F.S;null!==l&&l(a,s),Na(e,t,s)}catch(c){Oa(e,t,c)}finally{null!==i&&null!==a.types&&(i.types=a.types),F.T=i}}else try{Na(e,t,i=n(o,r))}catch(u){Oa(e,t,u)}}function Na(e,t,n){null!==n&&"object"==typeof n&&"function"==typeof n.then?n.then(function(n){Ta(e,t,n)},function(n){return Oa(e,t,n)}):Ta(e,t,n)}function Ta(e,t,n){t.status="fulfilled",t.value=n,Pa(t),e.state=n,null!==(t=e.pending)&&((n=t.next)===t?e.pending=null:(n=n.next,t.next=n,Aa(e,n)))}function Oa(e,t,n){var r=e.pending;if(e.pending=null,null!==r){r=r.next;do{t.status="rejected",t.reason=n,Pa(t),t=t.next}while(t!==r)}e.action=null}function Pa(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ia(e,t){return t}function Ma(e,t){if(ho){var n=gc.formState;if(null!==n){e:{var r=qi;if(ho){if(po){t:{for(var o=po,i=go;8!==o.nodeType;){if(!i){o=null;break t}if(null===(o=jd(o.nextSibling))){o=null;break t}}o="F!"===(i=o.data)||"F"===i?o:null}if(o){po=jd(o.nextSibling),r="F!"===o.data;break e}}bo(r)}r=!1}r&&(t=n[0])}}return(n=ua()).memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ia,lastRenderedState:t},n.queue=r,n=ds.bind(null,qi,r),r.dispatch=n,r=Ea(!1),i=ps.bind(null,qi,!1,r.queue),o={state:t,dispatch:null,action:e,pending:null},(r=ua()).queue=o,n=za.bind(null,qi,o,i,n),o.dispatch=n,r.memoizedState=e,[t,n,!1]}function ja(e){return Fa(da(),Wi,e)}function Fa(e,t,n){if(t=ya(e,t,Ia)[0],e=ga(ma)[0],"object"==typeof t&&null!==t&&"function"==typeof t.then)try{var r=fa(t)}catch(a){if(a===ei)throw ni;throw a}else r=t;var o=(t=da()).queue,i=o.dispatch;return n!==t.memoizedState&&(qi.flags|=2048,Ra(9,{destroy:void 0},La.bind(null,o,n),null)),[r,i,e]}function La(e,t){e.action=t}function Da(e){var t=da(),n=Wi;if(null!==n)return Fa(t,n,e);da(),t=t.memoizedState;var r=(n=da()).queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ra(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},null===(t=qi.updateQueue)&&(t={lastEffect:null,events:null,stores:null,memoCache:null},qi.updateQueue=t),null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ua(){return da().memoizedState}function Ba(e,t,n,r){var o=ua();qi.flags|=e,o.memoizedState=Ra(1|t,{destroy:void 0},n,void 0===r?null:r)}function $a(e,t,n,r){var o=da();r=void 0===r?null:r;var i=o.memoizedState.inst;null!==Wi&&null!==r&&na(r,Wi.memoizedState.deps)?o.memoizedState=Ra(t,i,n,r):(qi.flags|=e,o.memoizedState=Ra(1|t,i,n,r))}function Ha(e,t){Ba(8390656,8,e,t)}function Va(e,t){$a(2048,8,e,t)}function qa(e){var t=da().memoizedState;return function(e){qi.flags|=4;var t=qi.updateQueue;if(null===t)t={lastEffect:null,events:null,stores:null,memoCache:null},qi.updateQueue=t,t.events=[e];else{var n=t.events;null===n?t.events=[e]:n.push(e)}}({ref:t,nextImpl:e}),function(){if(2&mc)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Wa(e,t){return $a(4,2,e,t)}function Za(e,t){return $a(4,4,e,t)}function Qa(e,t){if("function"==typeof t){e=e();var n=t(e);return function(){"function"==typeof n?n():t(null)}}if(null!=t)return e=e(),t.current=e,function(){t.current=null}}function Ka(e,t,n){n=null!=n?n.concat([e]):null,$a(4,4,Qa.bind(null,t,e),n)}function Ga(){}function Ya(e,t){var n=da();t=void 0===t?null:t;var r=n.memoizedState;return null!==t&&na(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ja(e,t){var n=da();t=void 0===t?null:t;var r=n.memoizedState;if(null!==t&&na(t,r[1]))return r[0];if(r=e(),Gi){ke(!0);try{e()}finally{ke(!1)}}return n.memoizedState=[r,t],r}function Xa(e,t,n){return void 0===n||1073741824&Vi&&!(261930&bc)?e.memoizedState=t:(e.memoizedState=n,e=Kc(),qi.lanes|=e,Cc|=e,n)}function es(e,t,n,r){return er(n,t)?n:null!==Ti.current?(e=Xa(e,n,r),er(e,t)||(js=!0),e):42&Vi&&(!(1073741824&Vi)||261930&bc)?(e=Kc(),qi.lanes|=e,Cc|=e,t):(js=!0,e.memoizedState=n)}function ts(e,t,n,r,o){var i=L.p;L.p=0!==i&&8>i?i:8;var a,s,l,c=F.T,u={};F.T=u,ps(e,!1,t,n);try{var d=o(),f=F.S;if(null!==f&&f(u,d),null!==d&&"object"==typeof d&&"function"==typeof d.then)fs(e,t,(a=r,s=[],l={status:"pending",value:null,reason:null,then:function(e){s.push(e)}},d.then(function(){l.status="fulfilled",l.value=a;for(var e=0;e<s.length;e++)(0,s[e])(a)},function(e){for(l.status="rejected",l.reason=e,e=0;e<s.length;e++)(0,s[e])(void 0)}),l),Qc());else fs(e,t,r,Qc())}catch(p){fs(e,t,{then:function(){},status:"rejected",reason:p},Qc())}finally{L.p=i,null!==c&&null!==u.types&&(c.types=u.types),F.T=c}}function ns(){}function rs(e,t,n,o){if(5!==e.tag)throw Error(r(476));var i=os(e).queue;ts(e,i,t,D,null===n?ns:function(){return is(e),n(o)})}function os(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:D,baseState:D,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:D},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:n},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function is(e){var t=os(e);null===t.next&&(t=e.alternate.memoizedState),fs(e,t.next.queue,{},Qc())}function as(){return jo(pf)}function ss(){return da().memoizedState}function ls(){return da().memoizedState}function cs(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=Qc(),r=xi(t,e=ki(n),n);return null!==r&&(Gc(r,t,n),Si(r,t,n)),t={cache:$o()},void(e.payload=t)}t=t.return}}function us(e,t,n){var r=Qc();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},hs(e)?ms(t,n):null!==(n=Mr(e,t,n,r))&&(Gc(n,e,r),gs(n,t,r))}function ds(e,t,n){fs(e,t,n,Qc())}function fs(e,t,n,r){var o={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(hs(e))ms(t,o);else{var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=i(a,n);if(o.hasEagerState=!0,o.eagerState=s,er(s,a))return Ir(e,t,o,0),null===gc&&Pr(),!1}catch(l){}if(null!==(n=Mr(e,t,o,r)))return Gc(n,e,r),gs(n,t,r),!0}return!1}function ps(e,t,n,o){if(o={lane:2,revertLane:Vu(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},hs(e)){if(t)throw Error(r(479))}else null!==(t=Mr(e,n,o,2))&&Gc(t,e,2)}function hs(e){var t=e.alternate;return e===qi||null!==t&&t===qi}function ms(e,t){Ki=Qi=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gs(e,t,n){if(4194048&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Fe(e,n)}}var ys={readContext:jo,use:pa,useCallback:ta,useContext:ta,useEffect:ta,useImperativeHandle:ta,useLayoutEffect:ta,useInsertionEffect:ta,useMemo:ta,useReducer:ta,useRef:ta,useState:ta,useDebugValue:ta,useDeferredValue:ta,useTransition:ta,useSyncExternalStore:ta,useId:ta,useHostTransitionStatus:ta,useFormState:ta,useActionState:ta,useOptimistic:ta,useMemoCache:ta,useCacheRefresh:ta};ys.useEffectEvent=ta;var bs={readContext:jo,use:pa,useCallback:function(e,t){return ua().memoizedState=[e,void 0===t?null:t],e},useContext:jo,useEffect:Ha,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,Ba(4194308,4,Qa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ba(4194308,4,e,t)},useInsertionEffect:function(e,t){Ba(4,2,e,t)},useMemo:function(e,t){var n=ua();t=void 0===t?null:t;var r=e();if(Gi){ke(!0);try{e()}finally{ke(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ua();if(void 0!==n){var o=n(t);if(Gi){ke(!0);try{n(t)}finally{ke(!1)}}}else o=t;return r.memoizedState=r.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},r.queue=e,e=e.dispatch=us.bind(null,qi,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ua().memoizedState=e},useState:function(e){var t=(e=Ea(e)).queue,n=ds.bind(null,qi,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ga,useDeferredValue:function(e,t){return Xa(ua(),e,t)},useTransition:function(){var e=Ea(!1);return e=ts.bind(null,qi,e.queue,!0,!1),ua().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var o=qi,i=ua();if(ho){if(void 0===n)throw Error(r(407));n=n()}else{if(n=t(),null===gc)throw Error(r(349));127&bc||wa(o,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Ha(xa.bind(null,o,a,e),[e]),o.flags|=2048,Ra(9,{destroy:void 0},ka.bind(null,o,a,n,t),null),n},useId:function(){var e=ua(),t=gc.identifierPrefix;if(ho){var n=io;t="_"+t+"R_"+(n=(oo&~(1<<32-xe(oo)-1)).toString(32)+n),0<(n=Yi++)&&(t+="H"+n.toString(32)),t+="_"}else t="_"+t+"r_"+(n=ea++).toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:as,useFormState:Ma,useActionState:Ma,useOptimistic:function(e){var t=ua();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ps.bind(null,qi,!0,n),n.dispatch=t,[e,t]},useMemoCache:ha,useCacheRefresh:function(){return ua().memoizedState=cs.bind(null,qi)},useEffectEvent:function(e){var t=ua(),n={impl:e};return t.memoizedState=n,function(){if(2&mc)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},vs={readContext:jo,use:pa,useCallback:Ya,useContext:jo,useEffect:Va,useImperativeHandle:Ka,useInsertionEffect:Wa,useLayoutEffect:Za,useMemo:Ja,useReducer:ga,useRef:Ua,useState:function(){return ga(ma)},useDebugValue:Ga,useDeferredValue:function(e,t){return es(da(),Wi.memoizedState,e,t)},useTransition:function(){var e=ga(ma)[0],t=da().memoizedState;return["boolean"==typeof e?e:fa(e),t]},useSyncExternalStore:va,useId:ss,useHostTransitionStatus:as,useFormState:ja,useActionState:ja,useOptimistic:function(e,t){return Ca(da(),0,e,t)},useMemoCache:ha,useCacheRefresh:ls};vs.useEffectEvent=qa;var ws={readContext:jo,use:pa,useCallback:Ya,useContext:jo,useEffect:Va,useImperativeHandle:Ka,useInsertionEffect:Wa,useLayoutEffect:Za,useMemo:Ja,useReducer:ba,useRef:Ua,useState:function(){return ba(ma)},useDebugValue:Ga,useDeferredValue:function(e,t){var n=da();return null===Wi?Xa(n,e,t):es(n,Wi.memoizedState,e,t)},useTransition:function(){var e=ba(ma)[0],t=da().memoizedState;return["boolean"==typeof e?e:fa(e),t]},useSyncExternalStore:va,useId:ss,useHostTransitionStatus:as,useFormState:Da,useActionState:Da,useOptimistic:function(e,t){var n=da();return null!==Wi?Ca(n,0,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:ha,useCacheRefresh:ls};function ks(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:f({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}ws.useEffectEvent=qa;var xs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Qc(),o=ki(r);o.payload=t,null!=n&&(o.callback=n),null!==(t=xi(e,o,r))&&(Gc(t,e,r),Si(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Qc(),o=ki(r);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=xi(e,o,r))&&(Gc(t,e,r),Si(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Qc(),r=ki(n);r.tag=2,null!=t&&(r.callback=t),null!==(t=xi(e,r,n))&&(Gc(t,e,n),Si(t,e,n))}};function Ss(e,t,n,r,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!tr(n,r)||!tr(o,i))}function _s(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&xs.enqueueReplaceState(t,t.state,null)}function Es(e,t){var n=t;if("ref"in t)for(var r in n={},t)"ref"!==r&&(n[r]=t[r]);if(e=e.defaultProps)for(var o in n===t&&(n=f({},n)),e)void 0===n[o]&&(n[o]=e[o]);return n}function Cs(e){Ar(e)}function zs(e){console.error(e)}function As(e){Ar(e)}function Ns(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Ts(e,t,n){try{(0,e.onCaughtError)(n.value,{componentStack:n.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Os(e,t,n){return(n=ki(n)).tag=3,n.payload={element:null},n.callback=function(){Ns(e,t)},n}function Ps(e){return(e=ki(e)).tag=3,e}function Is(e,t,n,r){var o=n.type.getDerivedStateFromError;if("function"==typeof o){var i=r.value;e.payload=function(){return o(i)},e.callback=function(){Ts(t,n,r)}}var a=n.stateNode;null!==a&&"function"==typeof a.componentDidCatch&&(e.callback=function(){Ts(t,n,r),"function"!=typeof o&&(null===Dc?Dc=new Set([this]):Dc.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:null!==e?e:""})})}var Ms=Error(r(461)),js=!1;function Fs(e,t,n,r){t.child=null===e?yi(t,null,n,r):gi(t,e.child,n,r)}function Ls(e,t,n,r,o){n=n.render;var i=t.ref;if("ref"in r){var a={};for(var s in r)"ref"!==s&&(a[s]=r[s])}else a=r;return Mo(t),r=ra(e,t,n,a,i,o),s=sa(),null===e||js?(ho&&s&&lo(t),t.flags|=1,Fs(e,t,r,o),t.child):(la(e,t,o),al(e,t,o))}function Ds(e,t,n,r,o){if(null===e){var i=n.type;return"function"!=typeof i||Br(i)||void 0!==i.defaultProps||null!==n.compare?((e=Vr(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,Rs(e,t,i,r,o))}if(i=e.child,!sl(e,o)){var a=i.memoizedProps;if((n=null!==(n=n.compare)?n:tr)(a,r)&&e.ref===t.ref)return al(e,t,o)}return t.flags|=1,(e=$r(i,r)).ref=t.ref,e.return=t,t.child=e}function Rs(e,t,n,r,o){if(null!==e){var i=e.memoizedProps;if(tr(i,r)&&e.ref===t.ref){if(js=!1,t.pendingProps=r=i,!sl(e,o))return t.lanes=e.lanes,al(e,t,o);131072&e.flags&&(js=!0)}}return Ws(e,t,n,r,o)}function Us(e,t,n,r){var o=r.children,i=null!==e?e.memoizedState:null;if(null===e&&null===t.stateNode&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),"hidden"===r.mode){if(128&t.flags){if(i=null!==i?i.baseLanes|n:n,null!==e){for(r=t.child=e.child,o=0;null!==r;)o=o|r.lanes|r.childLanes,r=r.sibling;r=o&~i}else r=0,t.child=null;return $s(e,t,i,n,r)}if(!(536870912&n))return r=t.lanes=536870912,$s(e,t,null!==i?i.baseLanes|n:n,n,r);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&Jo(0,null!==i?i.cachePool:null),null!==i?Pi(t,i):Ii(),Ri(t)}else null!==i?(Jo(0,i.cachePool),Pi(t,i),Ui(),t.memoizedState=null):(null!==e&&Jo(0,null),Ii(),Ui());return Fs(e,t,o,n),t.child}function Bs(e,t){return null!==e&&22===e.tag||null!==t.stateNode||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function $s(e,t,n,r,o){var i=Yo();return i=null===i?null:{parent:Bo._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},null!==e&&Jo(0,null),Ii(),Ri(t),null!==e&&Po(e,t,r,!0),t.childLanes=o,null}function Hs(e,t){return(t=tl({mode:t.mode,children:t.children},e.mode)).ref=e.ref,e.child=t,t.return=e,t}function Vs(e,t,n){return gi(t,e.child,null,n),(e=Hs(t,t.pendingProps)).flags|=2,Bi(t),t.memoizedState=null,e}function qs(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=4194816);else{if("function"!=typeof n&&"object"!=typeof n)throw Error(r(284));null!==e&&e.ref===n||(t.flags|=4194816)}}function Ws(e,t,n,r,o){return Mo(t),n=ra(e,t,n,r,void 0,o),r=sa(),null===e||js?(ho&&r&&lo(t),t.flags|=1,Fs(e,t,n,o),t.child):(la(e,t,o),al(e,t,o))}function Zs(e,t,n,r,o,i){return Mo(t),t.updateQueue=null,n=ia(t,r,n,o),oa(e),r=sa(),null===e||js?(ho&&r&&lo(t),t.flags|=1,Fs(e,t,n,i),t.child):(la(e,t,i),al(e,t,i))}function Qs(e,t,n,r,o){if(Mo(t),null===t.stateNode){var i=Dr,a=n.contextType;"object"==typeof a&&null!==a&&(i=jo(a)),i=new n(r,i),t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,i.updater=xs,t.stateNode=i,i._reactInternals=t,(i=t.stateNode).props=r,i.state=t.memoizedState,i.refs={},vi(t),a=n.contextType,i.context="object"==typeof a&&null!==a?jo(a):Dr,i.state=t.memoizedState,"function"==typeof(a=n.getDerivedStateFromProps)&&(ks(t,n,a,r),i.state=t.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(a=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),a!==i.state&&xs.enqueueReplaceState(i,i.state,null),zi(t,r,i,o),Ci(),i.state=t.memoizedState),"function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!0}else if(null===e){i=t.stateNode;var s=t.memoizedProps,l=Es(n,s);i.props=l;var c=i.context,u=n.contextType;a=Dr,"object"==typeof u&&null!==u&&(a=jo(u));var d=n.getDerivedStateFromProps;u="function"==typeof d||"function"==typeof i.getSnapshotBeforeUpdate,s=t.pendingProps!==s,u||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(s||c!==a)&&_s(t,i,r,a),bi=!1;var f=t.memoizedState;i.state=f,zi(t,r,i,o),Ci(),c=t.memoizedState,s||f!==c||bi?("function"==typeof d&&(ks(t,n,d,r),c=t.memoizedState),(l=bi||Ss(t,n,l,r,f,c,a))?(u||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.flags|=4194308)):("function"==typeof i.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),i.props=r,i.state=c,i.context=a,r=l):("function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,wi(e,t),u=Es(n,a=t.memoizedProps),i.props=u,d=t.pendingProps,f=i.context,c=n.contextType,l=Dr,"object"==typeof c&&null!==c&&(l=jo(c)),(c="function"==typeof(s=n.getDerivedStateFromProps)||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(a!==d||f!==l)&&_s(t,i,r,l),bi=!1,f=t.memoizedState,i.state=f,zi(t,r,i,o),Ci();var p=t.memoizedState;a!==d||f!==p||bi||null!==e&&null!==e.dependencies&&Io(e.dependencies)?("function"==typeof s&&(ks(t,n,s,r),p=t.memoizedState),(u=bi||Ss(t,n,u,r,f,p,l)||null!==e&&null!==e.dependencies&&Io(e.dependencies))?(c||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,p,l),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof i.componentDidUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),i.props=r,i.state=p,i.context=l,r=u):("function"!=typeof i.componentDidUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return i=r,qs(e,t),r=!!(128&t.flags),i||r?(i=t.stateNode,n=r&&"function"!=typeof n.getDerivedStateFromError?null:i.render(),t.flags|=1,null!==e&&r?(t.child=gi(t,e.child,null,o),t.child=gi(t,null,n,o)):Fs(e,t,n,o),t.memoizedState=i.state,e=t.child):e=al(e,t,o),e}function Ks(e,t,n,r){return xo(),t.flags|=256,Fs(e,t,n,r),t.child}var Gs={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ys(e){return{baseLanes:e,cachePool:Xo()}}function Js(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=Nc),e}function Xs(e,t,n){var o,i=t.pendingProps,a=!1,s=!!(128&t.flags);if((o=s)||(o=(null===e||null!==e.memoizedState)&&!!(2&$i.current)),o&&(a=!0,t.flags&=-129),o=!!(32&t.flags),t.flags&=-33,null===e){if(ho){if(a?Li(t):Ui(),(e=po)?null!==(e=null!==(e=Pd(e,go))&&"&"!==e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==ro?{id:oo,overflow:io}:null,retryLane:536870912,hydrationErrors:null},(n=Zr(e)).return=t,t.child=n,fo=t,po=null):e=null,null===e)throw bo(t);return Md(e)?t.lanes=32:t.lanes=536870912,null}var l=i.children;return i=i.fallback,a?(Ui(),l=tl({mode:"hidden",children:l},a=t.mode),i=qr(i,a,n,null),l.return=t,i.return=t,l.sibling=i,t.child=l,(i=t.child).memoizedState=Ys(n),i.childLanes=Js(e,o,n),t.memoizedState=Gs,Bs(null,i)):(Li(t),el(t,l))}var c=e.memoizedState;if(null!==c&&null!==(l=c.dehydrated)){if(s)256&t.flags?(Li(t),t.flags&=-257,t=nl(e,t,n)):null!==t.memoizedState?(Ui(),t.child=e.child,t.flags|=128,t=null):(Ui(),l=i.fallback,a=t.mode,i=tl({mode:"visible",children:i.children},a),(l=qr(l,a,n,null)).flags|=2,i.return=t,l.return=t,i.sibling=l,t.child=i,gi(t,e.child,null,n),(i=t.child).memoizedState=Ys(n),i.childLanes=Js(e,o,n),t.memoizedState=Gs,t=Bs(null,i));else if(Li(t),Md(l)){if(o=l.nextSibling&&l.nextSibling.dataset)var u=o.dgst;o=u,(i=Error(r(419))).stack="",i.digest=o,_o({value:i,source:null,stack:null}),t=nl(e,t,n)}else if(js||Po(e,t,n,!1),o=0!==(n&e.childLanes),js||o){if(null!==(o=gc)&&(0!==(i=Le(o,n))&&i!==c.retryLane))throw c.retryLane=i,jr(e,i),Gc(o,e,i),Ms;Id(l)||lu(),t=nl(e,t,n)}else Id(l)?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,po=jd(l.nextSibling),fo=t,ho=!0,mo=null,go=!1,null!==e&&uo(t,e),(t=el(t,i.children)).flags|=4096);return t}return a?(Ui(),l=i.fallback,a=t.mode,u=(c=e.child).sibling,(i=$r(c,{mode:"hidden",children:i.children})).subtreeFlags=65011712&c.subtreeFlags,null!==u?l=$r(u,l):(l=qr(l,a,n,null)).flags|=2,l.return=t,i.return=t,i.sibling=l,t.child=i,Bs(null,i),i=t.child,null===(l=e.child.memoizedState)?l=Ys(n):(null!==(a=l.cachePool)?(c=Bo._currentValue,a=a.parent!==c?{parent:c,pool:c}:a):a=Xo(),l={baseLanes:l.baseLanes|n,cachePool:a}),i.memoizedState=l,i.childLanes=Js(e,o,n),t.memoizedState=Gs,Bs(e.child,i)):(Li(t),e=(n=e.child).sibling,(n=$r(n,{mode:"visible",children:i.children})).return=t,n.sibling=null,null!==e&&(null===(o=t.deletions)?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function el(e,t){return(t=tl({mode:"visible",children:t},e.mode)).return=e,e.child=t}function tl(e,t){return(e=Ur(22,e,null,t)).lanes=0,e}function nl(e,t,n){return gi(t,e.child,null,n),(e=el(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function rl(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),To(e.return,t,n)}function ol(e,t,n,r,o,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o,treeForkCount:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o,a.treeForkCount=i)}function il(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;r=r.children;var a=$i.current,s=!!(2&a);if(s?(a=1&a|2,t.flags|=128):a&=1,H($i,a),Fs(e,t,r,n),r=ho?eo:0,!s&&null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&rl(e,n,t);else if(19===e.tag)rl(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===Hi(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),ol(t,!1,o,n,i,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===Hi(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}ol(t,!0,n,null,i,r);break;case"together":ol(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function al(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Cc|=t.lanes,0===(n&t.childLanes)){if(null===e)return null;if(Po(e,t,n,!1),0===(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(r(153));if(null!==t.child){for(n=$r(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=$r(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function sl(e,t){return 0!==(e.lanes&t)||!(null===(e=e.dependencies)||!Io(e))}function ll(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)js=!0;else{if(!(sl(e,n)||128&t.flags))return js=!1,function(e,t,n){switch(t.tag){case 3:G(t,t.stateNode.containerInfo),Ao(0,Bo,e.memoizedState.cache),xo();break;case 27:case 5:J(t);break;case 4:G(t,t.stateNode.containerInfo);break;case 10:Ao(0,t.type,t.memoizedProps.value);break;case 31:if(null!==t.memoizedState)return t.flags|=128,Di(t),null;break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(Li(t),t.flags|=128,null):0!==(n&t.child.childLanes)?Xs(e,t,n):(Li(t),null!==(e=al(e,t,n))?e.sibling:null);Li(t);break;case 19:var o=!!(128&e.flags);if((r=0!==(n&t.childLanes))||(Po(e,t,n,!1),r=0!==(n&t.childLanes)),o){if(r)return il(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),H($i,$i.current),r)break;return null;case 22:return t.lanes=0,Us(e,t,n,t.pendingProps);case 24:Ao(0,Bo,e.memoizedState.cache)}return al(e,t,n)}(e,t,n);js=!!(131072&e.flags)}else js=!1,ho&&1048576&t.flags&&so(t,eo,t.index);switch(t.lanes=0,t.tag){case 16:e:{var o=t.pendingProps;if(e=ai(t.elementType),t.type=e,"function"!=typeof e){if(null!=e){var i=e.$$typeof;if(i===_){t.tag=11,t=Ls(null,t,e,o,n);break e}if(i===z){t.tag=14,t=Ds(null,t,e,o,n);break e}}throw t=M(e)||e,Error(r(306,t,""))}Br(e)?(o=Es(e,o),t.tag=1,t=Qs(null,t,e,o,n)):(t.tag=0,t=Ws(null,t,e,o,n))}return t;case 0:return Ws(e,t,t.type,t.pendingProps,n);case 1:return Qs(e,t,o=t.type,i=Es(o,t.pendingProps),n);case 3:e:{if(G(t,t.stateNode.containerInfo),null===e)throw Error(r(387));o=t.pendingProps;var a=t.memoizedState;i=a.element,wi(e,t),zi(t,o,null,n);var s=t.memoizedState;if(o=s.cache,Ao(0,Bo,o),o!==a.cache&&Oo(t,[Bo],n,!0),Ci(),o=s.element,a.isDehydrated){if(a={element:o,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Ks(e,t,o,n);break e}if(o!==i){_o(i=Gr(Error(r(424)),t)),t=Ks(e,t,o,n);break e}if(9===(e=t.stateNode.containerInfo).nodeType)e=e.body;else e="HTML"===e.nodeName?e.ownerDocument.body:e;for(po=jd(e.firstChild),fo=t,ho=!0,mo=null,go=!0,n=yi(t,null,o,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(xo(),o===i){t=al(e,t,n);break e}Fs(e,t,o,n)}t=t.child}return t;case 26:return qs(e,t),null===e?(n=Zd(t.type,null,t.pendingProps,null))?t.memoizedState=n:ho||(n=t.type,e=t.pendingProps,(o=bd(Q.current).createElement(n))[He]=t,o[Ve]=e,hd(o,n,e),nt(o),t.stateNode=o):t.memoizedState=Zd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return J(t),null===e&&ho&&(o=t.stateNode=Rd(t.type,t.pendingProps,Q.current),fo=t,go=!0,i=po,Ad(t.type)?(Fd=i,po=jd(o.firstChild)):po=i),Fs(e,t,t.pendingProps.children,n),qs(e,t),null===e&&(t.flags|=4194304),t.child;case 5:return null===e&&ho&&((i=o=po)&&(null!==(o=function(e,t,n,r){for(;1===e.nodeType;){var o=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&("INPUT"!==e.nodeName||"hidden"!==e.type))break}else if(r){if(!e[Ge])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(i=e.getAttribute("rel"))&&e.hasAttribute("data-precedence"))break;if(i!==o.rel||e.getAttribute("href")!==(null==o.href||""===o.href?null:o.href)||e.getAttribute("crossorigin")!==(null==o.crossOrigin?null:o.crossOrigin)||e.getAttribute("title")!==(null==o.title?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((i=e.getAttribute("src"))!==(null==o.src?null:o.src)||e.getAttribute("type")!==(null==o.type?null:o.type)||e.getAttribute("crossorigin")!==(null==o.crossOrigin?null:o.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var i=null==o.name?null:""+o.name;if("hidden"===o.type&&e.getAttribute("name")===i)return e}if(null===(e=jd(e.nextSibling)))break}return null}(o,t.type,t.pendingProps,go))?(t.stateNode=o,fo=t,po=jd(o.firstChild),go=!1,i=!0):i=!1),i||bo(t)),J(t),i=t.type,a=t.pendingProps,s=null!==e?e.memoizedProps:null,o=a.children,kd(i,a)?o=null:null!==s&&kd(i,s)&&(t.flags|=32),null!==t.memoizedState&&(i=ra(e,t,aa,null,null,n),pf._currentValue=i),qs(e,t),Fs(e,t,o,n),t.child;case 6:return null===e&&ho&&((e=n=po)&&(null!==(n=function(e,t,n){if(""===t)return null;for(;3!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!n)return null;if(null===(e=jd(e.nextSibling)))return null}return e}(n,t.pendingProps,go))?(t.stateNode=n,fo=t,po=null,e=!0):e=!1),e||bo(t)),null;case 13:return Xs(e,t,n);case 4:return G(t,t.stateNode.containerInfo),o=t.pendingProps,null===e?t.child=gi(t,null,o,n):Fs(e,t,o,n),t.child;case 11:return Ls(e,t,t.type,t.pendingProps,n);case 7:return Fs(e,t,t.pendingProps,n),t.child;case 8:case 12:return Fs(e,t,t.pendingProps.children,n),t.child;case 10:return o=t.pendingProps,Ao(0,t.type,o.value),Fs(e,t,o.children,n),t.child;case 9:return i=t.type._context,o=t.pendingProps.children,Mo(t),o=o(i=jo(i)),t.flags|=1,Fs(e,t,o,n),t.child;case 14:return Ds(e,t,t.type,t.pendingProps,n);case 15:return Rs(e,t,t.type,t.pendingProps,n);case 19:return il(e,t,n);case 31:return function(e,t,n){var o=t.pendingProps,i=!!(128&t.flags);if(t.flags&=-129,null===e){if(ho){if("hidden"===o.mode)return e=Hs(t,o),t.lanes=536870912,Bs(null,e);if(Di(t),(e=po)?null!==(e=null!==(e=Pd(e,go))&&"&"===e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==ro?{id:oo,overflow:io}:null,retryLane:536870912,hydrationErrors:null},(n=Zr(e)).return=t,t.child=n,fo=t,po=null):e=null,null===e)throw bo(t);return t.lanes=536870912,null}return Hs(t,o)}var a=e.memoizedState;if(null!==a){var s=a.dehydrated;if(Di(t),i)if(256&t.flags)t.flags&=-257,t=Vs(e,t,n);else{if(null===t.memoizedState)throw Error(r(558));t.child=e.child,t.flags|=128,t=null}else if(js||Po(e,t,n,!1),i=0!==(n&e.childLanes),js||i){if(null!==(o=gc)&&0!==(s=Le(o,n))&&s!==a.retryLane)throw a.retryLane=s,jr(e,s),Gc(o,e,s),Ms;lu(),t=Vs(e,t,n)}else e=a.treeContext,po=jd(s.nextSibling),fo=t,ho=!0,mo=null,go=!1,null!==e&&uo(t,e),(t=Hs(t,o)).flags|=4096;return t}return(e=$r(e.child,{mode:o.mode,children:o.children})).ref=t.ref,t.child=e,e.return=t,e}(e,t,n);case 22:return Us(e,t,n,t.pendingProps);case 24:return Mo(t),o=jo(Bo),null===e?(null===(i=Yo())&&(i=gc,a=$o(),i.pooledCache=a,a.refCount++,null!==a&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:o,cache:i},vi(t),Ao(0,Bo,i)):(0!==(e.lanes&n)&&(wi(e,t),zi(t,null,null,n),Ci()),i=e.memoizedState,a=t.memoizedState,i.parent!==o?(i={parent:o,cache:o},t.memoizedState=i,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=i),Ao(0,Bo,o)):(o=a.cache,Ao(0,Bo,o),o!==i.cache&&Oo(t,[Bo],n,!0))),Fs(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function cl(e){e.flags|=4}function ul(e,t,n,r,o){if((t=!!(32&e.mode))&&(t=!1),t){if(e.flags|=16777216,(335544128&o)===o)if(e.stateNode.complete)e.flags|=8192;else{if(!iu())throw si=ri,ti;e.flags|=8192}}else e.flags&=-16777217}function dl(e,t){if("stylesheet"!==t.type||4&t.state.loading)e.flags&=-16777217;else if(e.flags|=16777216,!sf(t)){if(!iu())throw si=ri,ti;e.flags|=8192}}function fl(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?Pe():536870912,e.lanes|=t,Tc|=t)}function pl(e,t){if(!ho)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function hl(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=65011712&o.subtreeFlags,r|=65011712&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function ml(e,t,n){var o=t.pendingProps;switch(co(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return hl(t),null;case 3:return n=t.stateNode,o=null,null!==e&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),No(Bo),Y(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(ko(t)?cl(t):null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,So())),hl(t),null;case 26:var i=t.type,a=t.memoizedState;return null===e?(cl(t),null!==a?(hl(t),dl(t,a)):(hl(t),ul(t,i,0,0,n))):a?a!==e.memoizedState?(cl(t),hl(t),dl(t,a)):(hl(t),t.flags&=-16777217):((e=e.memoizedProps)!==o&&cl(t),hl(t),ul(t,i,0,0,n)),null;case 27:if(X(t),n=Q.current,i=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==o&&cl(t);else{if(!o){if(null===t.stateNode)throw Error(r(166));return hl(t),null}e=W.current,ko(t)?vo(t):(e=Rd(i,o,n),t.stateNode=e,cl(t))}return hl(t),null;case 5:if(X(t),i=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==o&&cl(t);else{if(!o){if(null===t.stateNode)throw Error(r(166));return hl(t),null}if(a=W.current,ko(t))vo(t);else{var s=bd(Q.current);switch(a){case 1:a=s.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:a=s.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":a=s.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":a=s.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":(a=s.createElement("div")).innerHTML="<script><\/script>",a=a.removeChild(a.firstChild);break;case"select":a="string"==typeof o.is?s.createElement("select",{is:o.is}):s.createElement("select"),o.multiple?a.multiple=!0:o.size&&(a.size=o.size);break;default:a="string"==typeof o.is?s.createElement(i,{is:o.is}):s.createElement(i)}}a[He]=t,a[Ve]=o;e:for(s=t.child;null!==s;){if(5===s.tag||6===s.tag)a.appendChild(s.stateNode);else if(4!==s.tag&&27!==s.tag&&null!==s.child){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;null===s.sibling;){if(null===s.return||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=a;e:switch(hd(a,i,o),i){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&cl(t)}}return hl(t),ul(t,t.type,null===e||e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==o&&cl(t);else{if("string"!=typeof o&&null===t.stateNode)throw Error(r(166));if(e=Q.current,ko(t)){if(e=t.stateNode,n=t.memoizedProps,o=null,null!==(i=fo))switch(i.tag){case 27:case 5:o=i.memoizedProps}e[He]=t,(e=!!(e.nodeValue===n||null!==o&&!0===o.suppressHydrationWarning||dd(e.nodeValue,n)))||bo(t,!0)}else(e=bd(e).createTextNode(o))[He]=t,t.stateNode=e}return hl(t),null;case 31:if(n=t.memoizedState,null===e||null!==e.memoizedState){if(o=ko(t),null!==n){if(null===e){if(!o)throw Error(r(318));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(r(557));e[He]=t}else xo(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;hl(t),e=!1}else n=So(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return 256&t.flags?(Bi(t),t):(Bi(t),null);if(128&t.flags)throw Error(r(558))}return hl(t),null;case 13:if(o=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(i=ko(t),null!==o&&null!==o.dehydrated){if(null===e){if(!i)throw Error(r(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(r(317));i[He]=t}else xo(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;hl(t),i=!1}else i=So(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return 256&t.flags?(Bi(t),t):(Bi(t),null)}return Bi(t),128&t.flags?(t.lanes=n,t):(n=null!==o,e=null!==e&&null!==e.memoizedState,n&&(i=null,null!==(o=t.child).alternate&&null!==o.alternate.memoizedState&&null!==o.alternate.memoizedState.cachePool&&(i=o.alternate.memoizedState.cachePool.pool),a=null,null!==o.memoizedState&&null!==o.memoizedState.cachePool&&(a=o.memoizedState.cachePool.pool),a!==i&&(o.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),fl(t,t.updateQueue),hl(t),null);case 4:return Y(),null===e&&td(t.stateNode.containerInfo),hl(t),null;case 10:return No(t.type),hl(t),null;case 19:if($($i),null===(o=t.memoizedState))return hl(t),null;if(i=!!(128&t.flags),null===(a=o.rendering))if(i)pl(o,!1);else{if(0!==Ec||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(a=Hi(e))){for(t.flags|=128,pl(o,!1),e=a.updateQueue,t.updateQueue=e,fl(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)Hr(n,e),n=n.sibling;return H($i,1&$i.current|2),ho&&ao(t,o.treeForkCount),t.child}e=e.sibling}null!==o.tail&&ue()>Fc&&(t.flags|=128,i=!0,pl(o,!1),t.lanes=4194304)}else{if(!i)if(null!==(e=Hi(a))){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,fl(t,e),pl(o,!0),null===o.tail&&"hidden"===o.tailMode&&!a.alternate&&!ho)return hl(t),null}else 2*ue()-o.renderingStartTime>Fc&&536870912!==n&&(t.flags|=128,i=!0,pl(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(null!==(e=o.last)?e.sibling=a:t.child=a,o.last=a)}return null!==o.tail?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=ue(),e.sibling=null,n=$i.current,H($i,i?1&n|2:1&n),ho&&ao(t,o.treeForkCount),e):(hl(t),null);case 22:case 23:return Bi(t),Mi(),o=null!==t.memoizedState,null!==e?null!==e.memoizedState!==o&&(t.flags|=8192):o&&(t.flags|=8192),o?!!(536870912&n)&&!(128&t.flags)&&(hl(t),6&t.subtreeFlags&&(t.flags|=8192)):hl(t),null!==(n=t.updateQueue)&&fl(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),o=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(o=t.memoizedState.cachePool.pool),o!==n&&(t.flags|=2048),null!==e&&$(Go),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),No(Bo),hl(t),null;case 25:case 30:return null}throw Error(r(156,t.tag))}function gl(e,t){switch(co(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return No(Bo),Y(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return X(t),null;case 31:if(null!==t.memoizedState){if(Bi(t),null===t.alternate)throw Error(r(340));xo()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(Bi(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(r(340));xo()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return $($i),null;case 4:return Y(),null;case 10:return No(t.type),null;case 22:case 23:return Bi(t),Mi(),null!==e&&$(Go),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return No(Bo),null;default:return null}}function yl(e,t){switch(co(t),t.tag){case 3:No(Bo),Y();break;case 26:case 27:case 5:X(t);break;case 4:Y();break;case 31:null!==t.memoizedState&&Bi(t);break;case 13:Bi(t);break;case 19:$($i);break;case 10:No(t.type);break;case 22:case 23:Bi(t),Mi(),null!==e&&$(Go);break;case 24:No(Bo)}}function bl(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var o=r.next;n=o;do{if((n.tag&e)===e){r=void 0;var i=n.create,a=n.inst;r=i(),a.destroy=r}n=n.next}while(n!==o)}}catch(s){Eu(t,t.return,s)}}function vl(e,t,n){try{var r=t.updateQueue,o=null!==r?r.lastEffect:null;if(null!==o){var i=o.next;r=i;do{if((r.tag&e)===e){var a=r.inst,s=a.destroy;if(void 0!==s){a.destroy=void 0,o=t;var l=n,c=s;try{c()}catch(u){Eu(o,l,u)}}}r=r.next}while(r!==i)}}catch(u){Eu(t,t.return,u)}}function wl(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{Ni(t,n)}catch(r){Eu(e,e.return,r)}}}function kl(e,t,n){n.props=Es(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Eu(e,t,r)}}function xl(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;default:r=e.stateNode}"function"==typeof n?e.refCleanup=n(r):n.current=r}}catch(o){Eu(e,t,o)}}function Sl(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"==typeof r)try{r()}catch(o){Eu(e,t,o)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(i){Eu(e,t,i)}else n.current=null}function _l(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(o){Eu(e,e.return,o)}}function El(e,t,n){try{var o=e.stateNode;!function(e,t,n,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,a=null,s=null,l=null,c=null,u=null,d=null;for(h in n){var f=n[h];if(n.hasOwnProperty(h)&&null!=f)switch(h){case"checked":case"value":break;case"defaultValue":c=f;default:o.hasOwnProperty(h)||fd(e,t,h,null,o,f)}}for(var p in o){var h=o[p];if(f=n[p],o.hasOwnProperty(p)&&(null!=h||null!=f))switch(p){case"type":a=h;break;case"name":i=h;break;case"checked":u=h;break;case"defaultChecked":d=h;break;case"value":s=h;break;case"defaultValue":l=h;break;case"children":case"dangerouslySetInnerHTML":if(null!=h)throw Error(r(137,t));break;default:h!==f&&fd(e,t,p,h,o,f)}}return void wt(e,s,l,c,u,d,a,i);case"select":for(a in h=s=l=p=null,n)if(c=n[a],n.hasOwnProperty(a)&&null!=c)switch(a){case"value":break;case"multiple":h=c;default:o.hasOwnProperty(a)||fd(e,t,a,null,o,c)}for(i in o)if(a=o[i],c=n[i],o.hasOwnProperty(i)&&(null!=a||null!=c))switch(i){case"value":p=a;break;case"defaultValue":l=a;break;case"multiple":s=a;default:a!==c&&fd(e,t,i,a,o,c)}return t=l,n=s,o=h,void(null!=p?St(e,!!n,p,!1):!!o!=!!n&&(null!=t?St(e,!!n,t,!0):St(e,!!n,n?[]:"",!1)));case"textarea":for(l in h=p=null,n)if(i=n[l],n.hasOwnProperty(l)&&null!=i&&!o.hasOwnProperty(l))switch(l){case"value":case"children":break;default:fd(e,t,l,null,o,i)}for(s in o)if(i=o[s],a=n[s],o.hasOwnProperty(s)&&(null!=i||null!=a))switch(s){case"value":p=i;break;case"defaultValue":h=i;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=i)throw Error(r(91));break;default:i!==a&&fd(e,t,s,i,o,a)}return void _t(e,p,h);case"option":for(var m in n)if(p=n[m],n.hasOwnProperty(m)&&null!=p&&!o.hasOwnProperty(m))if("selected"===m)e.selected=!1;else fd(e,t,m,null,o,p);for(c in o)if(p=o[c],h=n[c],o.hasOwnProperty(c)&&p!==h&&(null!=p||null!=h))if("selected"===c)e.selected=p&&"function"!=typeof p&&"symbol"!=typeof p;else fd(e,t,c,p,o,h);return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var g in n)p=n[g],n.hasOwnProperty(g)&&null!=p&&!o.hasOwnProperty(g)&&fd(e,t,g,null,o,p);for(u in o)if(p=o[u],h=n[u],o.hasOwnProperty(u)&&p!==h&&(null!=p||null!=h))switch(u){case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(r(137,t));break;default:fd(e,t,u,p,o,h)}return;default:if(Tt(t)){for(var y in n)p=n[y],n.hasOwnProperty(y)&&void 0!==p&&!o.hasOwnProperty(y)&&pd(e,t,y,void 0,o,p);for(d in o)p=o[d],h=n[d],!o.hasOwnProperty(d)||p===h||void 0===p&&void 0===h||pd(e,t,d,p,o,h);return}}for(var b in n)p=n[b],n.hasOwnProperty(b)&&null!=p&&!o.hasOwnProperty(b)&&fd(e,t,b,null,o,p);for(f in o)p=o[f],h=n[f],!o.hasOwnProperty(f)||p===h||null==p&&null==h||fd(e,t,f,p,o,h)}(o,e.type,n,t),o[Ve]=t}catch(i){Eu(e,e.return,i)}}function Cl(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&Ad(e.type)||4===e.tag}function zl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Cl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&Ad(e.type))continue e;if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Al(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?(9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).insertBefore(e,t):((t=9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Mt));else if(4!==r&&(27===r&&Ad(e.type)&&(n=e.stateNode,t=null),null!==(e=e.child)))for(Al(e,t,n),e=e.sibling;null!==e;)Al(e,t,n),e=e.sibling}function Nl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&(27===r&&Ad(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(Nl(e,t,n),e=e.sibling;null!==e;)Nl(e,t,n),e=e.sibling}function Tl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);hd(t,r,n),t[He]=e,t[Ve]=n}catch(i){Eu(e,e.return,i)}}var Ol=!1,Pl=!1,Il=!1,Ml="function"==typeof WeakSet?WeakSet:Set,jl=null;function Fl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Gl(e,n),4&r&&bl(5,n);break;case 1:if(Gl(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(a){Eu(n,n.return,a)}else{var o=Es(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(s){Eu(n,n.return,s)}}64&r&&wl(n),512&r&&xl(n,n.return);break;case 3:if(Gl(e,n),64&r&&null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:t=n.child.stateNode}try{Ni(e,t)}catch(a){Eu(n,n.return,a)}}break;case 27:null===t&&4&r&&Tl(n);case 26:case 5:Gl(e,n),null===t&&4&r&&_l(n),512&r&&xl(n,n.return);break;case 12:Gl(e,n);break;case 31:Gl(e,n),4&r&&$l(e,n);break;case 13:Gl(e,n),4&r&&Hl(e,n),64&r&&(null!==(e=n.memoizedState)&&(null!==(e=e.dehydrated)&&function(e,t){var n=e.ownerDocument;if("$~"===e.data)e._reactRetry=t;else if("$?"!==e.data||"loading"!==n.readyState)t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}(e,n=Nu.bind(null,n))));break;case 22:if(!(r=null!==n.memoizedState||Ol)){t=null!==t&&null!==t.memoizedState||Pl,o=Ol;var i=Pl;Ol=r,(Pl=t)&&!i?Jl(e,n,!!(8772&n.subtreeFlags)):Gl(e,n),Ol=o,Pl=i}break;case 30:break;default:Gl(e,n)}}function Ll(e){var t=e.alternate;null!==t&&(e.alternate=null,Ll(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&Ye(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Dl=null,Rl=!1;function Ul(e,t,n){for(n=n.child;null!==n;)Bl(e,t,n),n=n.sibling}function Bl(e,t,n){if(we&&"function"==typeof we.onCommitFiberUnmount)try{we.onCommitFiberUnmount(ve,n)}catch(i){}switch(n.tag){case 26:Pl||Sl(n,t),Ul(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:Pl||Sl(n,t);var r=Dl,o=Rl;Ad(n.type)&&(Dl=n.stateNode,Rl=!1),Ul(e,t,n),Ud(n.stateNode),Dl=r,Rl=o;break;case 5:Pl||Sl(n,t);case 6:if(r=Dl,o=Rl,Dl=null,Ul(e,t,n),Rl=o,null!==(Dl=r))if(Rl)try{(9===Dl.nodeType?Dl.body:"HTML"===Dl.nodeName?Dl.ownerDocument.body:Dl).removeChild(n.stateNode)}catch(a){Eu(n,t,a)}else try{Dl.removeChild(n.stateNode)}catch(a){Eu(n,t,a)}break;case 18:null!==Dl&&(Rl?(Nd(9===(e=Dl).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,n.stateNode),Zf(e)):Nd(Dl,n.stateNode));break;case 4:r=Dl,o=Rl,Dl=n.stateNode.containerInfo,Rl=!0,Ul(e,t,n),Dl=r,Rl=o;break;case 0:case 11:case 14:case 15:vl(2,n,t),Pl||vl(4,n,t),Ul(e,t,n);break;case 1:Pl||(Sl(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount&&kl(n,t,r)),Ul(e,t,n);break;case 21:Ul(e,t,n);break;case 22:Pl=(r=Pl)||null!==n.memoizedState,Ul(e,t,n),Pl=r;break;default:Ul(e,t,n)}}function $l(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&null!==(e=e.memoizedState))){e=e.dehydrated;try{Zf(e)}catch(n){Eu(t,t.return,n)}}}function Hl(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&(null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))))try{Zf(e)}catch(n){Eu(t,t.return,n)}}function Vl(e,t){var n=function(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new Ml),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new Ml),t;default:throw Error(r(435,e.tag))}}(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Tu.bind(null,e,t);t.then(r,r)}})}function ql(e,t){var n=t.deletions;if(null!==n)for(var o=0;o<n.length;o++){var i=n[o],a=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 27:if(Ad(l.type)){Dl=l.stateNode,Rl=!1;break e}break;case 5:Dl=l.stateNode,Rl=!1;break e;case 3:case 4:Dl=l.stateNode.containerInfo,Rl=!0;break e}l=l.return}if(null===Dl)throw Error(r(160));Bl(a,s,i),Dl=null,Rl=!1,null!==(a=i.alternate)&&(a.return=null),i.return=null}if(13886&t.subtreeFlags)for(t=t.child;null!==t;)Zl(t,e),t=t.sibling}var Wl=null;function Zl(e,t){var n=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ql(t,e),Ql(e),4&o&&(vl(3,e,e.return),bl(3,e),vl(5,e,e.return));break;case 1:ql(t,e),Ql(e),512&o&&(Pl||null===n||Sl(n,n.return)),64&o&&Ol&&(null!==(e=e.updateQueue)&&(null!==(o=e.callbacks)&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===n?o:n.concat(o))));break;case 26:var i=Wl;if(ql(t,e),Ql(e),512&o&&(Pl||null===n||Sl(n,n.return)),4&o){var a=null!==n?n.memoizedState:null;if(o=e.memoizedState,null===n)if(null===o)if(null===e.stateNode){e:{o=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(o){case"title":(!(a=i.getElementsByTagName("title")[0])||a[Ge]||a[He]||"http://www.w3.org/2000/svg"===a.namespaceURI||a.hasAttribute("itemprop"))&&(a=i.createElement(o),i.head.insertBefore(a,i.querySelector("head > title"))),hd(a,o,n),a[He]=e,nt(a),o=a;break e;case"link":var s=of("link","href",i).get(o+(n.href||""));if(s)for(var l=0;l<s.length;l++)if((a=s[l]).getAttribute("href")===(null==n.href||""===n.href?null:n.href)&&a.getAttribute("rel")===(null==n.rel?null:n.rel)&&a.getAttribute("title")===(null==n.title?null:n.title)&&a.getAttribute("crossorigin")===(null==n.crossOrigin?null:n.crossOrigin)){s.splice(l,1);break t}hd(a=i.createElement(o),o,n),i.head.appendChild(a);break;case"meta":if(s=of("meta","content",i).get(o+(n.content||"")))for(l=0;l<s.length;l++)if((a=s[l]).getAttribute("content")===(null==n.content?null:""+n.content)&&a.getAttribute("name")===(null==n.name?null:n.name)&&a.getAttribute("property")===(null==n.property?null:n.property)&&a.getAttribute("http-equiv")===(null==n.httpEquiv?null:n.httpEquiv)&&a.getAttribute("charset")===(null==n.charSet?null:n.charSet)){s.splice(l,1);break t}hd(a=i.createElement(o),o,n),i.head.appendChild(a);break;default:throw Error(r(468,o))}a[He]=e,nt(a),o=a}e.stateNode=o}else af(i,e.type,e.stateNode);else e.stateNode=Xd(i,o,e.memoizedProps);else a!==o?(null===a?null!==n.stateNode&&(n=n.stateNode).parentNode.removeChild(n):a.count--,null===o?af(i,e.type,e.stateNode):Xd(i,o,e.memoizedProps)):null===o&&null!==e.stateNode&&El(e,e.memoizedProps,n.memoizedProps)}break;case 27:ql(t,e),Ql(e),512&o&&(Pl||null===n||Sl(n,n.return)),null!==n&&4&o&&El(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ql(t,e),Ql(e),512&o&&(Pl||null===n||Sl(n,n.return)),32&e.flags){i=e.stateNode;try{Ct(i,"")}catch(m){Eu(e,e.return,m)}}4&o&&null!=e.stateNode&&El(e,i=e.memoizedProps,null!==n?n.memoizedProps:i),1024&o&&(Il=!0);break;case 6:if(ql(t,e),Ql(e),4&o){if(null===e.stateNode)throw Error(r(162));o=e.memoizedProps,n=e.stateNode;try{n.nodeValue=o}catch(m){Eu(e,e.return,m)}}break;case 3:if(rf=null,i=Wl,Wl=Hd(t.containerInfo),ql(t,e),Wl=i,Ql(e),4&o&&null!==n&&n.memoizedState.isDehydrated)try{Zf(t.containerInfo)}catch(m){Eu(e,e.return,m)}Il&&(Il=!1,Kl(e));break;case 4:o=Wl,Wl=Hd(e.stateNode.containerInfo),ql(t,e),Ql(e),Wl=o;break;case 12:default:ql(t,e),Ql(e);break;case 31:case 19:ql(t,e),Ql(e),4&o&&(null!==(o=e.updateQueue)&&(e.updateQueue=null,Vl(e,o)));break;case 13:ql(t,e),Ql(e),8192&e.child.flags&&null!==e.memoizedState!=(null!==n&&null!==n.memoizedState)&&(Mc=ue()),4&o&&(null!==(o=e.updateQueue)&&(e.updateQueue=null,Vl(e,o)));break;case 22:i=null!==e.memoizedState;var c=null!==n&&null!==n.memoizedState,u=Ol,d=Pl;if(Ol=u||i,Pl=d||c,ql(t,e),Pl=d,Ol=u,Ql(e),8192&o)e:for(t=e.stateNode,t._visibility=i?-2&t._visibility:1|t._visibility,i&&(null===n||c||Ol||Pl||Yl(e)),n=null,t=e;;){if(5===t.tag||26===t.tag){if(null===n){c=n=t;try{if(a=c.stateNode,i)"function"==typeof(s=a.style).setProperty?s.setProperty("display","none","important"):s.display="none";else{l=c.stateNode;var f=c.memoizedProps.style,p=null!=f&&f.hasOwnProperty("display")?f.display:null;l.style.display=null==p||"boolean"==typeof p?"":(""+p).trim()}}catch(m){Eu(c,c.return,m)}}}else if(6===t.tag){if(null===n){c=t;try{c.stateNode.nodeValue=i?"":c.memoizedProps}catch(m){Eu(c,c.return,m)}}}else if(18===t.tag){if(null===n){c=t;try{var h=c.stateNode;i?Td(h,!0):Td(c.stateNode,!1)}catch(m){Eu(c,c.return,m)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}4&o&&(null!==(o=e.updateQueue)&&(null!==(n=o.retryQueue)&&(o.retryQueue=null,Vl(e,n))));case 30:case 21:}}function Ql(e){var t=e.flags;if(2&t){try{for(var n,o=e.return;null!==o;){if(Cl(o)){n=o;break}o=o.return}if(null==n)throw Error(r(160));switch(n.tag){case 27:var i=n.stateNode;Nl(e,zl(e),i);break;case 5:var a=n.stateNode;32&n.flags&&(Ct(a,""),n.flags&=-33),Nl(e,zl(e),a);break;case 3:case 4:var s=n.stateNode.containerInfo;Al(e,zl(e),s);break;default:throw Error(r(161))}}catch(l){Eu(e,e.return,l)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Kl(e){if(1024&e.subtreeFlags)for(e=e.child;null!==e;){var t=e;Kl(t),5===t.tag&&1024&t.flags&&t.stateNode.reset(),e=e.sibling}}function Gl(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)Fl(e,t.alternate,t),t=t.sibling}function Yl(e){for(e=e.child;null!==e;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:vl(4,t,t.return),Yl(t);break;case 1:Sl(t,t.return);var n=t.stateNode;"function"==typeof n.componentWillUnmount&&kl(t,t.return,n),Yl(t);break;case 27:Ud(t.stateNode);case 26:case 5:Sl(t,t.return),Yl(t);break;case 22:null===t.memoizedState&&Yl(t);break;default:Yl(t)}e=e.sibling}}function Jl(e,t,n){for(n=n&&!!(8772&t.subtreeFlags),t=t.child;null!==t;){var r=t.alternate,o=e,i=t,a=i.flags;switch(i.tag){case 0:case 11:case 15:Jl(o,i,n),bl(4,i);break;case 1:if(Jl(o,i,n),"function"==typeof(o=(r=i).stateNode).componentDidMount)try{o.componentDidMount()}catch(c){Eu(r,r.return,c)}if(null!==(o=(r=i).updateQueue)){var s=r.stateNode;try{var l=o.shared.hiddenCallbacks;if(null!==l)for(o.shared.hiddenCallbacks=null,o=0;o<l.length;o++)Ai(l[o],s)}catch(c){Eu(r,r.return,c)}}n&&64&a&&wl(i),xl(i,i.return);break;case 27:Tl(i);case 26:case 5:Jl(o,i,n),n&&null===r&&4&a&&_l(i),xl(i,i.return);break;case 12:Jl(o,i,n);break;case 31:Jl(o,i,n),n&&4&a&&$l(o,i);break;case 13:Jl(o,i,n),n&&4&a&&Hl(o,i);break;case 22:null===i.memoizedState&&Jl(o,i,n),xl(i,i.return);break;case 30:break;default:Jl(o,i,n)}t=t.sibling}}function Xl(e,t){var n=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==n&&(null!=e&&e.refCount++,null!=n&&Ho(n))}function ec(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Ho(e))}function tc(e,t,n,r){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)nc(e,t,n,r),t=t.sibling}function nc(e,t,n,r){var o=t.flags;switch(t.tag){case 0:case 11:case 15:tc(e,t,n,r),2048&o&&bl(9,t);break;case 1:case 31:case 13:default:tc(e,t,n,r);break;case 3:tc(e,t,n,r),2048&o&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Ho(e)));break;case 12:if(2048&o){tc(e,t,n,r),e=t.stateNode;try{var i=t.memoizedProps,a=i.id,s=i.onPostCommit;"function"==typeof s&&s(a,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(l){Eu(t,t.return,l)}}else tc(e,t,n,r);break;case 23:break;case 22:i=t.stateNode,a=t.alternate,null!==t.memoizedState?2&i._visibility?tc(e,t,n,r):oc(e,t):2&i._visibility?tc(e,t,n,r):(i._visibility|=2,rc(e,t,n,r,!!(10256&t.subtreeFlags)||!1)),2048&o&&Xl(a,t);break;case 24:tc(e,t,n,r),2048&o&&ec(t.alternate,t)}}function rc(e,t,n,r,o){for(o=o&&(!!(10256&t.subtreeFlags)||!1),t=t.child;null!==t;){var i=e,a=t,s=n,l=r,c=a.flags;switch(a.tag){case 0:case 11:case 15:rc(i,a,s,l,o),bl(8,a);break;case 23:break;case 22:var u=a.stateNode;null!==a.memoizedState?2&u._visibility?rc(i,a,s,l,o):oc(i,a):(u._visibility|=2,rc(i,a,s,l,o)),o&&2048&c&&Xl(a.alternate,a);break;case 24:rc(i,a,s,l,o),o&&2048&c&&ec(a.alternate,a);break;default:rc(i,a,s,l,o)}t=t.sibling}}function oc(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var n=e,r=t,o=r.flags;switch(r.tag){case 22:oc(n,r),2048&o&&Xl(r.alternate,r);break;case 24:oc(n,r),2048&o&&ec(r.alternate,r);break;default:oc(n,r)}t=t.sibling}}var ic=8192;function ac(e,t,n){if(e.subtreeFlags&ic)for(e=e.child;null!==e;)sc(e,t,n),e=e.sibling}function sc(e,t,n){switch(e.tag){case 26:ac(e,t,n),e.flags&ic&&null!==e.memoizedState&&function(e,t,n,r){if(!("stylesheet"!==n.type||"string"==typeof r.media&&!1===matchMedia(r.media).matches||4&n.state.loading)){if(null===n.instance){var o=Qd(r.href),i=t.querySelector(Kd(o));if(i)return null!==(t=i._p)&&"object"==typeof t&&"function"==typeof t.then&&(e.count++,e=cf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,void nt(i);i=t.ownerDocument||t,r=Gd(r),(o=Bd.get(o))&&tf(r,o),nt(i=i.createElement("link"));var a=i;a._p=new Promise(function(e,t){a.onload=e,a.onerror=t}),hd(i,"link",r),n.instance=i}null===e.stylesheets&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(3&n.state.loading)&&(e.count++,n=cf.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}(n,Wl,e.memoizedState,e.memoizedProps);break;case 5:default:ac(e,t,n);break;case 3:case 4:var r=Wl;Wl=Hd(e.stateNode.containerInfo),ac(e,t,n),Wl=r;break;case 22:null===e.memoizedState&&(null!==(r=e.alternate)&&null!==r.memoizedState?(r=ic,ic=16777216,ac(e,t,n),ic=r):ac(e,t,n))}}function lc(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do{t=e.sibling,e.sibling=null,e=t}while(null!==e)}}function cc(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];jl=r,fc(r,e)}lc(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)uc(e),e=e.sibling}function uc(e){switch(e.tag){case 0:case 11:case 15:cc(e),2048&e.flags&&vl(9,e,e.return);break;case 3:case 12:default:cc(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&2&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-3,dc(e)):cc(e)}}function dc(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];jl=r,fc(r,e)}lc(e)}for(e=e.child;null!==e;){switch((t=e).tag){case 0:case 11:case 15:vl(8,t,t.return),dc(t);break;case 22:2&(n=t.stateNode)._visibility&&(n._visibility&=-3,dc(t));break;default:dc(t)}e=e.sibling}}function fc(e,t){for(;null!==jl;){var n=jl;switch(n.tag){case 0:case 11:case 15:vl(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var r=n.memoizedState.cachePool.pool;null!=r&&r.refCount++}break;case 24:Ho(n.memoizedState.cache)}if(null!==(r=n.child))r.return=n,jl=r;else e:for(n=e;null!==jl;){var o=(r=jl).sibling,i=r.return;if(Ll(r),r===n){jl=null;break e}if(null!==o){o.return=i,jl=o;break e}jl=i}}}var pc={getCacheForType:function(e){var t=jo(Bo),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return jo(Bo).controller.signal}},hc="function"==typeof WeakMap?WeakMap:Map,mc=0,gc=null,yc=null,bc=0,vc=0,wc=null,kc=!1,xc=!1,Sc=!1,_c=0,Ec=0,Cc=0,zc=0,Ac=0,Nc=0,Tc=0,Oc=null,Pc=null,Ic=!1,Mc=0,jc=0,Fc=1/0,Lc=null,Dc=null,Rc=0,Uc=null,Bc=null,$c=0,Hc=0,Vc=null,qc=null,Wc=0,Zc=null;function Qc(){return 2&mc&&0!==bc?bc&-bc:null!==F.T?Vu():Ue()}function Kc(){if(0===Nc)if(536870912&bc&&!ho)Nc=536870912;else{var e=Ce;!(3932160&(Ce<<=1))&&(Ce=262144),Nc=e}return null!==(e=ji.current)&&(e.flags|=32),Nc}function Gc(e,t,n){(e!==gc||2!==vc&&9!==vc)&&null===e.cancelPendingCommit||(ru(e,0),eu(e,bc,Nc,!1)),Me(e,n),2&mc&&e===gc||(e===gc&&(!(2&mc)&&(zc|=n),4===Ec&&eu(e,bc,Nc,!1)),Lu(e))}function Yc(e,t,n){if(6&mc)throw Error(r(327));for(var o=!n&&!(127&t)&&0===(t&e.expiredLanes)||Te(e,t),i=o?function(e,t){var n=mc;mc|=2;var o=au(),i=su();gc!==e||bc!==t?(Lc=null,Fc=ue()+500,ru(e,t)):xc=Te(e,t);e:for(;;)try{if(0!==vc&&null!==yc){t=yc;var a=wc;t:switch(vc){case 1:vc=0,wc=null,hu(e,t,a,1);break;case 2:case 9:if(oi(a)){vc=0,wc=null,pu(t);break}t=function(){2!==vc&&9!==vc||gc!==e||(vc=7),Lu(e)},a.then(t,t);break e;case 3:vc=7;break e;case 4:vc=5;break e;case 7:oi(a)?(vc=0,wc=null,pu(t)):(vc=0,wc=null,hu(e,t,a,7));break;case 5:var s=null;switch(yc.tag){case 26:s=yc.memoizedState;case 5:case 27:var l=yc;if(s?sf(s):l.stateNode.complete){vc=0,wc=null;var c=l.sibling;if(null!==c)yc=c;else{var u=l.return;null!==u?(yc=u,mu(u)):yc=null}break t}}vc=0,wc=null,hu(e,t,a,5);break;case 6:vc=0,wc=null,hu(e,t,a,6);break;case 8:nu(),Ec=6;break e;default:throw Error(r(462))}}du();break}catch(d){ou(e,d)}return zo=Co=null,F.H=o,F.A=i,mc=n,null!==yc?0:(gc=null,bc=0,Pr(),Ec)}(e,t):cu(e,t,!0),a=o;;){if(0===i){xc&&!o&&eu(e,t,0,!1);break}if(n=e.current.alternate,!a||Xc(n)){if(2===i){if(a=t,e.errorRecoveryDisabledLanes&a)var s=0;else s=0!==(s=-536870913&e.pendingLanes)?s:536870912&s?536870912:0;if(0!==s){t=s;e:{var l=e;i=Oc;var c=l.current.memoizedState.isDehydrated;if(c&&(ru(l,s).flags|=256),2!==(s=cu(l,s,!1))){if(Sc&&!c){l.errorRecoveryDisabledLanes|=a,zc|=a,i=4;break e}a=Pc,Pc=i,null!==a&&(null===Pc?Pc=a:Pc.push.apply(Pc,a))}i=s}if(a=!1,2!==i)continue}}if(1===i){ru(e,0),eu(e,t,0,!0);break}e:{switch(o=e,a=i){case 0:case 1:throw Error(r(345));case 4:if((4194048&t)!==t)break;case 6:eu(o,t,Nc,!kc);break e;case 2:Pc=null;break;case 3:case 5:break;default:throw Error(r(329))}if((62914560&t)===t&&10<(i=Mc+300-ue())){if(eu(o,t,Nc,!kc),0!==Ne(o,0,!0))break e;$c=t,o.timeoutHandle=Sd(Jc.bind(null,o,n,Pc,Lc,Ic,t,Nc,zc,Tc,kc,a,"Throttled",-0,0),i)}else Jc(o,n,Pc,Lc,Ic,t,Nc,zc,Tc,kc,a,null,-0,0)}break}i=cu(e,t,!1),a=!1}Lu(e)}function Jc(e,t,n,r,o,i,a,s,l,c,u,d,f,p){if(e.timeoutHandle=-1,8192&(d=t.subtreeFlags)||!(16785408&~d)){sc(t,i,d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Mt});var h=(62914560&i)===i?Mc-ue():(4194048&i)===i?jc-ue():0;if(null!==(h=function(e,t){return e.stylesheets&&0===e.count&&df(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&df(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&0===lf&&(lf=62500*function(){if("function"==typeof performance.getEntriesByType){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var o=n[r],i=o.transferSize,a=o.initiatorType,s=o.duration;if(i&&s&&md(a)){for(a=0,s=o.responseEnd,r+=1;r<n.length;r++){var l=n[r],c=l.startTime;if(c>s)break;var u=l.transferSize,d=l.initiatorType;u&&md(d)&&(a+=u*((l=l.responseEnd)<s?1:(s-c)/(l-c)))}if(--r,t+=8*(i+a)/(o.duration/1e3),10<++e)break}}if(0<e)return t/e/1e6}return navigator.connection&&"number"==typeof(e=navigator.connection.downlink)?e:5}());var o=setTimeout(function(){if(e.waitingForImages=!1,0===e.count&&(e.stylesheets&&df(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>lf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(o)}}:null}(d,h)))return $c=i,e.cancelPendingCommit=h(yu.bind(null,e,t,i,n,r,o,a,s,l,u,d,null,f,p)),void eu(e,i,a,!c)}yu(e,t,i,n,r,o,a,s,l)}function Xc(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&(null!==(n=t.updateQueue)&&null!==(n=n.stores)))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!er(i(),o))return!1}catch(a){return!1}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function eu(e,t,n,r){t&=~Ac,t&=~zc,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var o=t;0<o;){var i=31-xe(o),a=1<<i;r[i]=-1,o&=~a}0!==n&&je(e,n,t)}function tu(){return!!(6&mc)||(Du(0),!1)}function nu(){if(null!==yc){if(0===vc)var e=yc.return;else zo=Co=null,ca(e=yc),ui=null,di=0,e=yc;for(;null!==e;)yl(e.alternate,e),e=e.return;yc=null}}function ru(e,t){var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,_d(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),$c=0,nu(),gc=e,yc=n=$r(e.current,null),bc=t,vc=0,wc=null,kc=!1,xc=Te(e,t),Sc=!1,Tc=Nc=Ac=zc=Cc=Ec=0,Pc=Oc=null,Ic=!1,8&t&&(t|=32&t);var r=e.entangledLanes;if(0!==r)for(e=e.entanglements,r&=t;0<r;){var o=31-xe(r),i=1<<o;t|=e[o],r&=~i}return _c=t,Pr(),n}function ou(e,t){qi=null,F.H=ys,t===ei||t===ni?(t=li(),vc=3):t===ti?(t=li(),vc=4):vc=t===Ms?8:null!==t&&"object"==typeof t&&"function"==typeof t.then?6:1,wc=t,null===yc&&(Ec=1,Ns(e,Gr(t,e.current)))}function iu(){var e=ji.current;return null===e||((4194048&bc)===bc?null===Fi:!!((62914560&bc)===bc||536870912&bc)&&e===Fi)}function au(){var e=F.H;return F.H=ys,null===e?ys:e}function su(){var e=F.A;return F.A=pc,e}function lu(){Ec=4,kc||(4194048&bc)!==bc&&null!==ji.current||(xc=!0),!(134217727&Cc)&&!(134217727&zc)||null===gc||eu(gc,bc,Nc,!1)}function cu(e,t,n){var r=mc;mc|=2;var o=au(),i=su();gc===e&&bc===t||(Lc=null,ru(e,t)),t=!1;var a=Ec;e:for(;;)try{if(0!==vc&&null!==yc){var s=yc,l=wc;switch(vc){case 8:nu(),a=6;break e;case 3:case 2:case 9:case 6:null===ji.current&&(t=!0);var c=vc;if(vc=0,wc=null,hu(e,s,l,c),n&&xc){a=0;break e}break;default:c=vc,vc=0,wc=null,hu(e,s,l,c)}}uu(),a=Ec;break}catch(u){ou(e,u)}return t&&e.shellSuspendCounter++,zo=Co=null,mc=r,F.H=o,F.A=i,null===yc&&(gc=null,bc=0,Pr()),a}function uu(){for(;null!==yc;)fu(yc)}function du(){for(;null!==yc&&!le();)fu(yc)}function fu(e){var t=ll(e.alternate,e,_c);e.memoizedProps=e.pendingProps,null===t?mu(e):yc=t}function pu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Zs(n,t,t.pendingProps,t.type,void 0,bc);break;case 11:t=Zs(n,t,t.pendingProps,t.type.render,t.ref,bc);break;case 5:ca(t);default:yl(n,t),t=ll(n,t=yc=Hr(t,_c),_c)}e.memoizedProps=e.pendingProps,null===t?mu(e):yc=t}function hu(e,t,n,o){zo=Co=null,ca(t),ui=null,di=0;var i=t.return;try{if(function(e,t,n,o,i){if(n.flags|=32768,null!==o&&"object"==typeof o&&"function"==typeof o.then){if(null!==(t=n.alternate)&&Po(t,n,i,!0),null!==(n=ji.current)){switch(n.tag){case 31:case 13:return null===Fi?lu():null===n.alternate&&0===Ec&&(Ec=3),n.flags&=-257,n.flags|=65536,n.lanes=i,o===ri?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([o]):t.add(o),Cu(e,o,i)),!1;case 22:return n.flags|=65536,o===ri?n.flags|=16384:(null===(t=n.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([o])},n.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([o]):n.add(o),Cu(e,o,i)),!1}throw Error(r(435,n.tag))}return Cu(e,o,i),lu(),!1}if(ho)return null!==(t=ji.current)?(!(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=i,o!==yo&&_o(Gr(e=Error(r(422),{cause:o}),n))):(o!==yo&&_o(Gr(t=Error(r(423),{cause:o}),n)),(e=e.current.alternate).flags|=65536,i&=-i,e.lanes|=i,o=Gr(o,n),_i(e,i=Os(e.stateNode,o,i)),4!==Ec&&(Ec=2)),!1;var a=Error(r(520),{cause:o});if(a=Gr(a,n),null===Oc?Oc=[a]:Oc.push(a),4!==Ec&&(Ec=2),null===t)return!0;o=Gr(o,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,_i(n,e=Os(n.stateNode,o,e)),!1;case 1:if(t=n.type,a=n.stateNode,!(128&n.flags||"function"!=typeof t.getDerivedStateFromError&&(null===a||"function"!=typeof a.componentDidCatch||null!==Dc&&Dc.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,Is(i=Ps(i),e,n,o),_i(n,i),!1}n=n.return}while(null!==n);return!1}(e,i,t,n,bc))return Ec=1,Ns(e,Gr(n,e.current)),void(yc=null)}catch(a){if(null!==i)throw yc=i,a;return Ec=1,Ns(e,Gr(n,e.current)),void(yc=null)}32768&t.flags?(ho||1===o?e=!0:xc||536870912&bc?e=!1:(kc=e=!0,(2===o||9===o||3===o||6===o)&&(null!==(o=ji.current)&&13===o.tag&&(o.flags|=16384))),gu(t,e)):mu(t)}function mu(e){var t=e;do{if(32768&t.flags)return void gu(t,kc);e=t.return;var n=ml(t.alternate,t,_c);if(null!==n)return void(yc=n);if(null!==(t=t.sibling))return void(yc=t);yc=t=e}while(null!==t);0===Ec&&(Ec=5)}function gu(e,t){do{var n=gl(e.alternate,e);if(null!==n)return n.flags&=32767,void(yc=n);if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling))return void(yc=e);yc=e=n}while(null!==e);Ec=6,yc=null}function yu(e,t,n,o,i,a,s,l,c){e.cancelPendingCommit=null;do{xu()}while(0!==Rc);if(6&mc)throw Error(r(327));if(null!==t){if(t===e.current)throw Error(r(177));if(a=t.lanes|t.childLanes,function(e,t,n,r,o,i){var a=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,l=e.expirationTimes,c=e.hiddenUpdates;for(n=a&~n;0<n;){var u=31-xe(n),d=1<<u;s[u]=0,l[u]=-1;var f=c[u];if(null!==f)for(c[u]=null,u=0;u<f.length;u++){var p=f[u];null!==p&&(p.lane&=-536870913)}n&=~d}0!==r&&je(e,r,0),0!==i&&0===o&&0!==e.tag&&(e.suspendedLanes|=i&~(a&~t))}(e,n,a|=Or,s,l,c),e===gc&&(yc=gc=null,bc=0),Bc=t,Uc=e,$c=n,Hc=a,Vc=i,qc=o,10256&t.subtreeFlags||10256&t.flags?(e.callbackNode=null,e.callbackPriority=0,ae(he,function(){return Su(),null})):(e.callbackNode=null,e.callbackPriority=0),o=!!(13878&t.flags),13878&t.subtreeFlags||o){o=F.T,F.T=null,i=L.p,L.p=2,s=mc,mc|=4;try{!function(e,t){if(e=e.containerInfo,gd=xf,ar(e=ir(e))){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var o=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(o&&0!==o.rangeCount){n=o.anchorNode;var i=o.anchorOffset,a=o.focusNode;o=o.focusOffset;try{n.nodeType,a.nodeType}catch(g){n=null;break e}var s=0,l=-1,c=-1,u=0,d=0,f=e,p=null;t:for(;;){for(var h;f!==n||0!==i&&3!==f.nodeType||(l=s+i),f!==a||0!==o&&3!==f.nodeType||(c=s+o),3===f.nodeType&&(s+=f.nodeValue.length),null!==(h=f.firstChild);)p=f,f=h;for(;;){if(f===e)break t;if(p===n&&++u===i&&(l=s),p===a&&++d===o&&(c=s),null!==(h=f.nextSibling))break;p=(f=p).parentNode}f=h}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(yd={focusedElem:e,selectionRange:n},xf=!1,jl=t;null!==jl;)if(e=(t=jl).child,1028&t.subtreeFlags&&null!==e)e.return=t,jl=e;else for(;null!==jl;){switch(a=(t=jl).alternate,e=t.flags,t.tag){case 0:if(4&e&&null!==(e=null!==(e=t.updateQueue)?e.events:null))for(n=0;n<e.length;n++)(i=e[n]).ref.impl=i.nextImpl;break;case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(1024&e&&null!==a){e=void 0,n=t,i=a.memoizedProps,a=a.memoizedState,o=n.stateNode;try{var m=Es(n.type,i);e=o.getSnapshotBeforeUpdate(m,a),o.__reactInternalSnapshotBeforeUpdate=e}catch(y){Eu(n,n.return,y)}}break;case 3:if(1024&e)if(9===(n=(e=t.stateNode.containerInfo).nodeType))Od(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Od(e);break;default:e.textContent=""}break;default:if(1024&e)throw Error(r(163))}if(null!==(e=t.sibling)){e.return=t.return,jl=e;break}jl=t.return}}(e,t)}finally{mc=s,L.p=i,F.T=o}}Rc=1,bu(),vu(),wu()}}function bu(){if(1===Rc){Rc=0;var e=Uc,t=Bc,n=!!(13878&t.flags);if(13878&t.subtreeFlags||n){n=F.T,F.T=null;var r=L.p;L.p=2;var o=mc;mc|=4;try{Zl(t,e);var i=yd,a=ir(e.containerInfo),s=i.focusedElem,l=i.selectionRange;if(a!==s&&s&&s.ownerDocument&&or(s.ownerDocument.documentElement,s)){if(null!==l&&ar(s)){var c=l.start,u=l.end;if(void 0===u&&(u=c),"selectionStart"in s)s.selectionStart=c,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),h=s.textContent.length,m=Math.min(l.start,h),g=void 0===l.end?m:Math.min(l.end,h);!p.extend&&m>g&&(a=g,g=m,m=a);var y=rr(s,m),b=rr(s,g);if(y&&b&&(1!==p.rangeCount||p.anchorNode!==y.node||p.anchorOffset!==y.offset||p.focusNode!==b.node||p.focusOffset!==b.offset)){var v=d.createRange();v.setStart(y.node,y.offset),p.removeAllRanges(),m>g?(p.addRange(v),p.extend(b.node,b.offset)):(v.setEnd(b.node,b.offset),p.addRange(v))}}}}for(d=[],p=s;p=p.parentNode;)1===p.nodeType&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for("function"==typeof s.focus&&s.focus(),s=0;s<d.length;s++){var w=d[s];w.element.scrollLeft=w.left,w.element.scrollTop=w.top}}xf=!!gd,yd=gd=null}finally{mc=o,L.p=r,F.T=n}}e.current=t,Rc=2}}function vu(){if(2===Rc){Rc=0;var e=Uc,t=Bc,n=!!(8772&t.flags);if(8772&t.subtreeFlags||n){n=F.T,F.T=null;var r=L.p;L.p=2;var o=mc;mc|=4;try{Fl(e,t.alternate,t)}finally{mc=o,L.p=r,F.T=n}}Rc=3}}function wu(){if(4===Rc||3===Rc){Rc=0,ce();var e=Uc,t=Bc,n=$c,r=qc;10256&t.subtreeFlags||10256&t.flags?Rc=5:(Rc=0,Bc=Uc=null,ku(e,e.pendingLanes));var o=e.pendingLanes;if(0===o&&(Dc=null),Re(n),t=t.stateNode,we&&"function"==typeof we.onCommitFiberRoot)try{we.onCommitFiberRoot(ve,t,void 0,!(128&~t.current.flags))}catch(l){}if(null!==r){t=F.T,o=L.p,L.p=2,F.T=null;try{for(var i=e.onRecoverableError,a=0;a<r.length;a++){var s=r[a];i(s.value,{componentStack:s.stack})}}finally{F.T=t,L.p=o}}3&$c&&xu(),Lu(e),o=e.pendingLanes,261930&n&&42&o?e===Zc?Wc++:(Wc=0,Zc=e):Wc=0,Du(0)}}function ku(e,t){0===(e.pooledCacheLanes&=t)&&(null!=(t=e.pooledCache)&&(e.pooledCache=null,Ho(t)))}function xu(){return bu(),vu(),wu(),Su()}function Su(){if(5!==Rc)return!1;var e=Uc,t=Hc;Hc=0;var n=Re($c),o=F.T,i=L.p;try{L.p=32>n?32:n,F.T=null,n=Vc,Vc=null;var a=Uc,s=$c;if(Rc=0,Bc=Uc=null,$c=0,6&mc)throw Error(r(331));var l=mc;if(mc|=4,uc(a.current),nc(a,a.current,s,n),mc=l,Du(0,!1),we&&"function"==typeof we.onPostCommitFiberRoot)try{we.onPostCommitFiberRoot(ve,a)}catch(c){}return!0}finally{L.p=i,F.T=o,ku(e,t)}}function _u(e,t,n){t=Gr(n,t),null!==(e=xi(e,t=Os(e.stateNode,t,2),2))&&(Me(e,2),Lu(e))}function Eu(e,t,n){if(3===e.tag)_u(e,e,n);else for(;null!==t;){if(3===t.tag){_u(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Dc||!Dc.has(r))){e=Gr(n,e),null!==(r=xi(t,n=Ps(2),2))&&(Is(n,r,t,e),Me(r,2),Lu(r));break}}t=t.return}}function Cu(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new hc;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(Sc=!0,o.add(n),e=zu.bind(null,e,t,n),t.then(e,e))}function zu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,gc===e&&(bc&n)===n&&(4===Ec||3===Ec&&(62914560&bc)===bc&&300>ue()-Mc?!(2&mc)&&ru(e,0):Ac|=n,Tc===bc&&(Tc=0)),Lu(e)}function Au(e,t){0===t&&(t=Pe()),null!==(e=jr(e,t))&&(Me(e,t),Lu(e))}function Nu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Au(e,n)}function Tu(e,t){var n=0;switch(e.tag){case 31:case 13:var o=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(r(314))}null!==o&&o.delete(t),Au(e,n)}var Ou=null,Pu=null,Iu=!1,Mu=!1,ju=!1,Fu=0;function Lu(e){e!==Pu&&null===e.next&&(null===Pu?Ou=Pu=e:Pu=Pu.next=e),Mu=!0,Iu||(Iu=!0,Cd(function(){6&mc?ae(fe,Ru):Uu()}))}function Du(e,t){if(!ju&&Mu){ju=!0;do{for(var n=!1,r=Ou;null!==r;){if(0!==e){var o=r.pendingLanes;if(0===o)var i=0;else{var a=r.suspendedLanes,s=r.pingedLanes;i=(1<<31-xe(42|e)+1)-1,i=201326741&(i&=o&~(a&~s))?201326741&i|1:i?2|i:0}0!==i&&(n=!0,Hu(r,i))}else i=bc,!(3&(i=Ne(r,r===gc?i:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||Te(r,i)||(n=!0,Hu(r,i));r=r.next}}while(n);ju=!1}}function Ru(){Uu()}function Uu(){Mu=Iu=!1;var e=0;0!==Fu&&function(){var e=window.event;if(e&&"popstate"===e.type)return e!==xd&&(xd=e,!0);return xd=null,!1}()&&(e=Fu);for(var t=ue(),n=null,r=Ou;null!==r;){var o=r.next,i=Bu(r,t);0===i?(r.next=null,null===n?Ou=o:n.next=o,null===o&&(Pu=n)):(n=r,(0!==e||3&i)&&(Mu=!0)),r=o}0!==Rc&&5!==Rc||Du(e),0!==Fu&&(Fu=0)}function Bu(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=-62914561&e.pendingLanes;0<i;){var a=31-xe(i),s=1<<a,l=o[a];-1===l?0!==(s&n)&&0===(s&r)||(o[a]=Oe(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}if(n=bc,n=Ne(e,e===(t=gc)?n:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle),r=e.callbackNode,0===n||e===t&&(2===vc||9===vc)||null!==e.cancelPendingCommit)return null!==r&&null!==r&&se(r),e.callbackNode=null,e.callbackPriority=0;if(!(3&n)||Te(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==r&&se(r),Re(n)){case 2:case 8:n=pe;break;case 32:default:n=he;break;case 268435456:n=ge}return r=$u.bind(null,e),n=ae(n,r),e.callbackPriority=t,e.callbackNode=n,t}return null!==r&&null!==r&&se(r),e.callbackPriority=2,e.callbackNode=null,2}function $u(e,t){if(0!==Rc&&5!==Rc)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(xu()&&e.callbackNode!==n)return null;var r=bc;return 0===(r=Ne(e,e===gc?r:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle))?null:(Yc(e,r,t),Bu(e,ue()),null!=e.callbackNode&&e.callbackNode===n?$u.bind(null,e):null)}function Hu(e,t){if(xu())return null;Yc(e,t,!0)}function Vu(){if(0===Fu){var e=Wo;0===e&&(e=Ee,!(261888&(Ee<<=1))&&(Ee=256)),Fu=e}return Fu}function qu(e){return null==e||"symbol"==typeof e||"boolean"==typeof e?null:"function"==typeof e?e:It(""+e)}function Wu(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}for(var Zu=0;Zu<Cr.length;Zu++){var Qu=Cr[Zu];zr(Qu.toLowerCase(),"on"+(Qu[0].toUpperCase()+Qu.slice(1)))}zr(br,"onAnimationEnd"),zr(vr,"onAnimationIteration"),zr(wr,"onAnimationStart"),zr("dblclick","onDoubleClick"),zr("focusin","onFocus"),zr("focusout","onBlur"),zr(kr,"onTransitionRun"),zr(xr,"onTransitionStart"),zr(Sr,"onTransitionCancel"),zr(_r,"onTransitionEnd"),at("onMouseEnter",["mouseout","mouseover"]),at("onMouseLeave",["mouseout","mouseover"]),at("onPointerEnter",["pointerout","pointerover"]),at("onPointerLeave",["pointerout","pointerover"]),it("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),it("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),it("onBeforeInput",["compositionend","keypress","textInput","paste"]),it("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),it("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),it("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ku="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(" "),Gu=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ku));function Yu(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==i&&o.isPropagationStopped())break e;i=s,o.currentTarget=c;try{i(o)}catch(u){Ar(u)}o.currentTarget=null,i=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==i&&o.isPropagationStopped())break e;i=s,o.currentTarget=c;try{i(o)}catch(u){Ar(u)}o.currentTarget=null,i=l}}}}function Ju(e,t){var n=t[We];void 0===n&&(n=t[We]=new Set);var r=e+"__bubble";n.has(r)||(nd(t,e,2,!1),n.add(r))}function Xu(e,t,n){var r=0;t&&(r|=4),nd(n,e,r,t)}var ed="_reactListening"+Math.random().toString(36).slice(2);function td(e){if(!e[ed]){e[ed]=!0,rt.forEach(function(t){"selectionchange"!==t&&(Gu.has(t)||Xu(t,!1,e),Xu(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[ed]||(t[ed]=!0,Xu("selectionchange",!1,t))}}function nd(e,t,n,r){switch(Nf(t)){case 2:var o=Sf;break;case 8:o=_f;break;default:o=Ef}n=o.bind(null,t,n,e),o=void 0,!Vt||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function rd(e,t,n,r,o){var i=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var s=r.tag;if(3===s||4===s){var l=r.stateNode.containerInfo;if(l===o)break;if(4===s)for(s=r.return;null!==s;){var c=s.tag;if((3===c||4===c)&&s.stateNode.containerInfo===o)return;s=s.return}for(;null!==l;){if(null===(s=Je(l)))return;if(5===(c=s.tag)||6===c||26===c||27===c){r=i=s;continue e}l=l.parentNode}}r=r.return}Bt(function(){var r=i,o=Ft(n),s=[];e:{var l=Er.get(e);if(void 0!==l){var c=on,u=e;switch(e){case"keypress":if(0===Gt(n))break e;case"keydown":case"keyup":c=wn;break;case"focusin":u="focus",c=dn;break;case"focusout":u="blur",c=dn;break;case"beforeblur":case"afterblur":c=dn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":c=cn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":c=un;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":c=xn;break;case br:case vr:case wr:c=fn;break;case _r:c=Sn;break;case"scroll":case"scrollend":c=sn;break;case"wheel":c=_n;break;case"copy":case"cut":case"paste":c=pn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":c=kn;break;case"toggle":case"beforetoggle":c=En}var d=!!(4&t),f=!d&&("scroll"===e||"scrollend"===e),p=d?null!==l?l+"Capture":null:l;d=[];for(var h,m=r;null!==m;){var g=m;if(h=g.stateNode,5!==(g=g.tag)&&26!==g&&27!==g||null===h||null===p||null!=(g=$t(m,p))&&d.push(od(m,g,h)),f)break;m=m.return}0<d.length&&(l=new c(l,u,null,n,o),s.push({event:l,listeners:d}))}}if(!(7&t)){if(c="mouseout"===e||"pointerout"===e,(!(l="mouseover"===e||"pointerover"===e)||n===jt||!(u=n.relatedTarget||n.fromElement)||!Je(u)&&!u[qe])&&(c||l)&&(l=o.window===o?o:(l=o.ownerDocument)?l.defaultView||l.parentWindow:window,c?(c=r,null!==(u=(u=n.relatedTarget||n.toElement)?Je(u):null)&&(f=a(u),d=u.tag,u!==f||5!==d&&27!==d&&6!==d)&&(u=null)):(c=null,u=r),c!==u)){if(d=cn,g="onMouseLeave",p="onMouseEnter",m="mouse","pointerout"!==e&&"pointerover"!==e||(d=kn,g="onPointerLeave",p="onPointerEnter",m="pointer"),f=null==c?l:et(c),h=null==u?l:et(u),(l=new d(g,m+"leave",c,n,o)).target=f,l.relatedTarget=h,g=null,Je(o)===r&&((d=new d(p,m+"enter",u,n,o)).target=h,d.relatedTarget=f,g=d),f=g,c&&u)e:{for(d=ad,m=u,h=0,g=p=c;g;g=d(g))h++;g=0;for(var y=m;y;y=d(y))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||null!==m&&p===m.alternate){d=p;break e}p=d(p),m=d(m)}d=null}else d=null;null!==c&&sd(s,l,c,d,!1),null!==u&&null!==f&&sd(s,f,u,d,!0)}if("select"===(c=(l=r?et(r):window).nodeName&&l.nodeName.toLowerCase())||"input"===c&&"file"===l.type)var b=Hn;else if(Ln(l))if(Vn)b=Xn;else{b=Yn;var v=Gn}else!(c=l.nodeName)||"input"!==c.toLowerCase()||"checkbox"!==l.type&&"radio"!==l.type?r&&Tt(r.elementType)&&(b=Hn):b=Jn;switch(b&&(b=b(e,r))?Dn(s,b,n,o):(v&&v(e,l,r),"focusout"===e&&r&&"number"===l.type&&null!=r.memoizedProps.value&&xt(l,"number",l.value)),v=r?et(r):window,e){case"focusin":(Ln(v)||"true"===v.contentEditable)&&(lr=v,cr=r,ur=null);break;case"focusout":ur=cr=lr=null;break;case"mousedown":dr=!0;break;case"contextmenu":case"mouseup":case"dragend":dr=!1,fr(s,n,o);break;case"selectionchange":if(sr)break;case"keydown":case"keyup":fr(s,n,o)}var w;if(zn)e:{switch(e){case"compositionstart":var k="onCompositionStart";break e;case"compositionend":k="onCompositionEnd";break e;case"compositionupdate":k="onCompositionUpdate";break e}k=void 0}else jn?In(e,n)&&(k="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(k="onCompositionStart");k&&(Tn&&"ko"!==n.locale&&(jn||"onCompositionStart"!==k?"onCompositionEnd"===k&&jn&&(w=Kt()):(Zt="value"in(Wt=o)?Wt.value:Wt.textContent,jn=!0)),0<(v=id(r,k)).length&&(k=new hn(k,e,null,n,o),s.push({event:k,listeners:v}),w?k.data=w:null!==(w=Mn(n))&&(k.data=w))),(w=Nn?function(e,t){switch(e){case"compositionend":return Mn(t);case"keypress":return 32!==t.which?null:(Pn=!0,On);case"textInput":return(e=t.data)===On&&Pn?null:e;default:return null}}(e,n):function(e,t){if(jn)return"compositionend"===e||!zn&&In(e,t)?(e=Kt(),Qt=Zt=Wt=null,jn=!1,e):null;switch(e){case"paste":default: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 Tn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(k=id(r,"onBeforeInput")).length&&(v=new hn("onBeforeInput","beforeinput",null,n,o),s.push({event:v,listeners:k}),v.data=w)),function(e,t,n,r,o){if("submit"===t&&n&&n.stateNode===o){var i=qu((o[Ve]||null).action),a=r.submitter;a&&null!==(t=(t=a[Ve]||null)?qu(t.formAction):a.getAttribute("formAction"))&&(i=t,a=null);var s=new on("action","action",null,r,o);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(0!==Fu){var e=a?Wu(o,a):new FormData(o);rs(n,{pending:!0,data:e,method:o.method,action:i},null,e)}}else"function"==typeof i&&(s.preventDefault(),e=a?Wu(o,a):new FormData(o),rs(n,{pending:!0,data:e,method:o.method,action:i},i,e))},currentTarget:o}]})}}(s,e,r,n,o)}Yu(s,t)})}function od(e,t,n){return{instance:e,listener:t,currentTarget:n}}function id(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;if(5!==(o=o.tag)&&26!==o&&27!==o||null===i||(null!=(o=$t(e,n))&&r.unshift(od(e,o,i)),null!=(o=$t(e,t))&&r.push(od(e,o,i))),3===e.tag)return r;e=e.return}return[]}function ad(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag&&27!==e.tag);return e||null}function sd(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(s=s.tag,null!==l&&l===r)break;5!==s&&26!==s&&27!==s||null===c||(l=c,o?null!=(c=$t(n,i))&&a.unshift(od(n,c,l)):o||null!=(c=$t(n,i))&&a.push(od(n,c,l))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var ld=/\r\n?/g,cd=/\u0000|\uFFFD/g;function ud(e){return("string"==typeof e?e:""+e).replace(ld,"\n").replace(cd,"")}function dd(e,t){return t=ud(t),ud(e)===t}function fd(e,t,n,o,i,a){switch(n){case"children":"string"==typeof o?"body"===t||"textarea"===t&&""===o||Ct(e,o):("number"==typeof o||"bigint"==typeof o)&&"body"!==t&&Ct(e,""+o);break;case"className":dt(e,"class",o);break;case"tabIndex":dt(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":dt(e,n,o);break;case"style":Nt(e,o,a);break;case"data":if("object"!==t){dt(e,"data",o);break}case"src":case"href":if(""===o&&("a"!==t||"href"!==n)){e.removeAttribute(n);break}if(null==o||"function"==typeof o||"symbol"==typeof o||"boolean"==typeof o){e.removeAttribute(n);break}o=It(""+o),e.setAttribute(n,o);break;case"action":case"formAction":if("function"==typeof o){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}if("function"==typeof a&&("formAction"===n?("input"!==t&&fd(e,t,"name",i.name,i,null),fd(e,t,"formEncType",i.formEncType,i,null),fd(e,t,"formMethod",i.formMethod,i,null),fd(e,t,"formTarget",i.formTarget,i,null)):(fd(e,t,"encType",i.encType,i,null),fd(e,t,"method",i.method,i,null),fd(e,t,"target",i.target,i,null))),null==o||"symbol"==typeof o||"boolean"==typeof o){e.removeAttribute(n);break}o=It(""+o),e.setAttribute(n,o);break;case"onClick":null!=o&&(e.onclick=Mt);break;case"onScroll":null!=o&&Ju("scroll",e);break;case"onScrollEnd":null!=o&&Ju("scrollend",e);break;case"dangerouslySetInnerHTML":if(null!=o){if("object"!=typeof o||!("__html"in o))throw Error(r(61));if(null!=(n=o.__html)){if(null!=i.children)throw Error(r(60));e.innerHTML=n}}break;case"multiple":e.multiple=o&&"function"!=typeof o&&"symbol"!=typeof o;break;case"muted":e.muted=o&&"function"!=typeof o&&"symbol"!=typeof o;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":break;case"xlinkHref":if(null==o||"function"==typeof o||"boolean"==typeof o||"symbol"==typeof o){e.removeAttribute("xlink:href");break}n=It(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":null!=o&&"function"!=typeof o&&"symbol"!=typeof o?e.setAttribute(n,""+o):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&"function"!=typeof o&&"symbol"!=typeof o?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":!0===o?e.setAttribute(n,""):!1!==o&&null!=o&&"function"!=typeof o&&"symbol"!=typeof o?e.setAttribute(n,o):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&!isNaN(o)&&1<=o?e.setAttribute(n,o):e.removeAttribute(n);break;case"rowSpan":case"start":null==o||"function"==typeof o||"symbol"==typeof o||isNaN(o)?e.removeAttribute(n):e.setAttribute(n,o);break;case"popover":Ju("beforetoggle",e),Ju("toggle",e),ut(e,"popover",o);break;case"xlinkActuate":ft(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":ft(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":ft(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":ft(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":ft(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":ft(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":ft(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":ft(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":ft(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":ut(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])&&ut(e,n=Ot.get(n)||n,o)}}function pd(e,t,n,o,i,a){switch(n){case"style":Nt(e,o,a);break;case"dangerouslySetInnerHTML":if(null!=o){if("object"!=typeof o||!("__html"in o))throw Error(r(61));if(null!=(n=o.__html)){if(null!=i.children)throw Error(r(60));e.innerHTML=n}}break;case"children":"string"==typeof o?Ct(e,o):("number"==typeof o||"bigint"==typeof o)&&Ct(e,""+o);break;case"onScroll":null!=o&&Ju("scroll",e);break;case"onScrollEnd":null!=o&&Ju("scrollend",e);break;case"onClick":null!=o&&(e.onclick=Mt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:ot.hasOwnProperty(n)||("o"!==n[0]||"n"!==n[1]||(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),"function"==typeof(a=null!=(a=e[Ve]||null)?a[n]:null)&&e.removeEventListener(t,a,i),"function"!=typeof o)?n in e?e[n]=o:!0===o?e.setAttribute(n,""):ut(e,n,o):("function"!=typeof a&&null!==a&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,o,i)))}}function hd(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ju("error",e),Ju("load",e);var o,i=!1,a=!1;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(null!=s)switch(o){case"src":i=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:fd(e,t,o,s,n,null)}}return a&&fd(e,t,"srcSet",n.srcSet,n,null),void(i&&fd(e,t,"src",n.src,n,null));case"input":Ju("invalid",e);var l=o=s=a=null,c=null,u=null;for(i in n)if(n.hasOwnProperty(i)){var d=n[i];if(null!=d)switch(i){case"name":a=d;break;case"type":s=d;break;case"checked":c=d;break;case"defaultChecked":u=d;break;case"value":o=d;break;case"defaultValue":l=d;break;case"children":case"dangerouslySetInnerHTML":if(null!=d)throw Error(r(137,t));break;default:fd(e,t,i,d,n,null)}}return void kt(e,o,l,c,u,s,a,!1);case"select":for(a in Ju("invalid",e),i=s=o=null,n)if(n.hasOwnProperty(a)&&null!=(l=n[a]))switch(a){case"value":o=l;break;case"defaultValue":s=l;break;case"multiple":i=l;default:fd(e,t,a,l,n,null)}return t=o,n=s,e.multiple=!!i,void(null!=t?St(e,!!i,t,!1):null!=n&&St(e,!!i,n,!0));case"textarea":for(s in Ju("invalid",e),o=a=i=null,n)if(n.hasOwnProperty(s)&&null!=(l=n[s]))switch(s){case"value":i=l;break;case"defaultValue":a=l;break;case"children":o=l;break;case"dangerouslySetInnerHTML":if(null!=l)throw Error(r(91));break;default:fd(e,t,s,l,n,null)}return void Et(e,i,a,o);case"option":for(c in n)if(n.hasOwnProperty(c)&&null!=(i=n[c]))if("selected"===c)e.selected=i&&"function"!=typeof i&&"symbol"!=typeof i;else fd(e,t,c,i,n,null);return;case"dialog":Ju("beforetoggle",e),Ju("toggle",e),Ju("cancel",e),Ju("close",e);break;case"iframe":case"object":Ju("load",e);break;case"video":case"audio":for(i=0;i<Ku.length;i++)Ju(Ku[i],e);break;case"image":Ju("error",e),Ju("load",e);break;case"details":Ju("toggle",e);break;case"embed":case"source":case"link":Ju("error",e),Ju("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&null!=(i=n[u]))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:fd(e,t,u,i,n,null)}return;default:if(Tt(t)){for(d in n)n.hasOwnProperty(d)&&(void 0!==(i=n[d])&&pd(e,t,d,i,n,void 0));return}}for(l in n)n.hasOwnProperty(l)&&(null!=(i=n[l])&&fd(e,t,l,i,n,null))}function md(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}var gd=null,yd=null;function bd(e){return 9===e.nodeType?e:e.ownerDocument}function vd(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function wd(e,t){if(0===e)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return 1===e&&"foreignObject"===t?0:e}function kd(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"bigint"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var xd=null;var Sd="function"==typeof setTimeout?setTimeout:void 0,_d="function"==typeof clearTimeout?clearTimeout:void 0,Ed="function"==typeof Promise?Promise:void 0,Cd="function"==typeof queueMicrotask?queueMicrotask:void 0!==Ed?function(e){return Ed.resolve(null).then(e).catch(zd)}:Sd;function zd(e){setTimeout(function(){throw e})}function Ad(e){return"head"===e}function Nd(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)||"/&"===n){if(0===r)return e.removeChild(o),void Zf(t);r--}else if("$"===n||"$?"===n||"$~"===n||"$!"===n||"&"===n)r++;else if("html"===n)Ud(e.ownerDocument.documentElement);else if("head"===n){Ud(n=e.ownerDocument.head);for(var i=n.firstChild;i;){var a=i.nextSibling,s=i.nodeName;i[Ge]||"SCRIPT"===s||"STYLE"===s||"LINK"===s&&"stylesheet"===i.rel.toLowerCase()||n.removeChild(i),i=a}}else"body"===n&&Ud(e.ownerDocument.body);n=o}while(n);Zf(t)}function Td(e,t){var n=e;e=0;do{var r=n.nextSibling;if(1===n.nodeType?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",""===n.getAttribute("style")&&n.removeAttribute("style")):3===n.nodeType&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&8===r.nodeType)if("/$"===(n=r.data)){if(0===e)break;e--}else"$"!==n&&"$?"!==n&&"$~"!==n&&"$!"!==n||e++;n=r}while(n)}function Od(e){var t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Od(n),Ye(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function Pd(e,t){for(;8!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!t)return null;if(null===(e=jd(e.nextSibling)))return null}return e}function Id(e){return"$?"===e.data||"$~"===e.data}function Md(e){return"$!"===e.data||"$?"===e.data&&"loading"!==e.ownerDocument.readyState}function jd(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t||"$~"===t||"&"===t||"F!"===t||"F"===t)break;if("/$"===t||"/&"===t)return null}}return e}var Fd=null;function Ld(e){e=e.nextSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n||"/&"===n){if(0===t)return jd(e.nextSibling);t--}else"$"!==n&&"$!"!==n&&"$?"!==n&&"$~"!==n&&"&"!==n||t++}e=e.nextSibling}return null}function Dd(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n||"$~"===n||"&"===n){if(0===t)return e;t--}else"/$"!==n&&"/&"!==n||t++}e=e.previousSibling}return null}function Rd(e,t,n){switch(t=bd(n),e){case"html":if(!(e=t.documentElement))throw Error(r(452));return e;case"head":if(!(e=t.head))throw Error(r(453));return e;case"body":if(!(e=t.body))throw Error(r(454));return e;default:throw Error(r(451))}}function Ud(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ye(e)}var Bd=new Map,$d=new Set;function Hd(e){return"function"==typeof e.getRootNode?e.getRootNode():9===e.nodeType?e:e.ownerDocument}var Vd=L.d;L.d={f:function(){var e=Vd.f(),t=tu();return e||t},r:function(e){var t=Xe(e);null!==t&&5===t.tag&&"form"===t.type?is(t):Vd.r(e)},D:function(e){Vd.D(e),Wd("dns-prefetch",e,null)},C:function(e,t){Vd.C(e,t),Wd("preconnect",e,t)},L:function(e,t,n){Vd.L(e,t,n);var r=qd;if(r&&e&&t){var o='link[rel="preload"][as="'+vt(t)+'"]';"image"===t&&n&&n.imageSrcSet?(o+='[imagesrcset="'+vt(n.imageSrcSet)+'"]',"string"==typeof n.imageSizes&&(o+='[imagesizes="'+vt(n.imageSizes)+'"]')):o+='[href="'+vt(e)+'"]';var i=o;switch(t){case"style":i=Qd(e);break;case"script":i=Yd(e)}Bd.has(i)||(e=f({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),Bd.set(i,e),null!==r.querySelector(o)||"style"===t&&r.querySelector(Kd(i))||"script"===t&&r.querySelector(Jd(i))||(hd(t=r.createElement("link"),"link",e),nt(t),r.head.appendChild(t)))}},m:function(e,t){Vd.m(e,t);var n=qd;if(n&&e){var r=t&&"string"==typeof t.as?t.as:"script",o='link[rel="modulepreload"][as="'+vt(r)+'"][href="'+vt(e)+'"]',i=o;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Yd(e)}if(!Bd.has(i)&&(e=f({rel:"modulepreload",href:e},t),Bd.set(i,e),null===n.querySelector(o))){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Jd(i)))return}hd(r=n.createElement("link"),"link",e),nt(r),n.head.appendChild(r)}}},X:function(e,t){Vd.X(e,t);var n=qd;if(n&&e){var r=tt(n).hoistableScripts,o=Yd(e),i=r.get(o);i||((i=n.querySelector(Jd(o)))||(e=f({src:e,async:!0},t),(t=Bd.get(o))&&nf(e,t),nt(i=n.createElement("script")),hd(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(o,i))}},S:function(e,t,n){Vd.S(e,t,n);var r=qd;if(r&&e){var o=tt(r).hoistableStyles,i=Qd(e);t=t||"default";var a=o.get(i);if(!a){var s={loading:0,preload:null};if(a=r.querySelector(Kd(i)))s.loading=5;else{e=f({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Bd.get(i))&&tf(e,n);var l=a=r.createElement("link");nt(l),hd(l,"link",e),l._p=new Promise(function(e,t){l.onload=e,l.onerror=t}),l.addEventListener("load",function(){s.loading|=1}),l.addEventListener("error",function(){s.loading|=2}),s.loading|=4,ef(a,t,r)}a={type:"stylesheet",instance:a,count:1,state:s},o.set(i,a)}}},M:function(e,t){Vd.M(e,t);var n=qd;if(n&&e){var r=tt(n).hoistableScripts,o=Yd(e),i=r.get(o);i||((i=n.querySelector(Jd(o)))||(e=f({src:e,async:!0,type:"module"},t),(t=Bd.get(o))&&nf(e,t),nt(i=n.createElement("script")),hd(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(o,i))}}};var qd="undefined"==typeof document?null:document;function Wd(e,t,n){var r=qd;if(r&&"string"==typeof t&&t){var o=vt(t);o='link[rel="'+e+'"][href="'+o+'"]',"string"==typeof n&&(o+='[crossorigin="'+n+'"]'),$d.has(o)||($d.add(o),e={rel:e,crossOrigin:n,href:t},null===r.querySelector(o)&&(hd(t=r.createElement("link"),"link",e),nt(t),r.head.appendChild(t)))}}function Zd(e,t,n,o){var i,a,s,l,c=(c=Q.current)?Hd(c):null;if(!c)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return"string"==typeof n.precedence&&"string"==typeof n.href?(t=Qd(n.href),(o=(n=tt(c).hoistableStyles).get(t))||(o={type:"style",instance:null,count:0,state:null},n.set(t,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===n.rel&&"string"==typeof n.href&&"string"==typeof n.precedence){e=Qd(n.href);var u=tt(c).hoistableStyles,d=u.get(e);if(d||(c=c.ownerDocument||c,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,d),(u=c.querySelector(Kd(e)))&&!u._p&&(d.instance=u,d.state.loading=5),Bd.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Bd.set(e,n),u||(i=c,a=e,s=n,l=d.state,i.querySelector('link[rel="preload"][as="style"]['+a+"]")?l.loading=1:(a=i.createElement("link"),l.preload=a,a.addEventListener("load",function(){return l.loading|=1}),a.addEventListener("error",function(){return l.loading|=2}),hd(a,"link",s),nt(a),i.head.appendChild(a))))),t&&null===o)throw Error(r(528,""));return d}if(t&&null!==o)throw Error(r(529,""));return null;case"script":return t=n.async,"string"==typeof(n=n.src)&&t&&"function"!=typeof t&&"symbol"!=typeof t?(t=Yd(n),(o=(n=tt(c).hoistableScripts).get(t))||(o={type:"script",instance:null,count:0,state:null},n.set(t,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Qd(e){return'href="'+vt(e)+'"'}function Kd(e){return'link[rel="stylesheet"]['+e+"]"}function Gd(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Yd(e){return'[src="'+vt(e)+'"]'}function Jd(e){return"script[async]"+e}function Xd(e,t,n){if(t.count++,null===t.instance)switch(t.type){case"style":var o=e.querySelector('style[data-href~="'+vt(n.href)+'"]');if(o)return t.instance=o,nt(o),o;var i=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return nt(o=(e.ownerDocument||e).createElement("style")),hd(o,"style",i),ef(o,n.precedence,e),t.instance=o;case"stylesheet":i=Qd(n.href);var a=e.querySelector(Kd(i));if(a)return t.state.loading|=4,t.instance=a,nt(a),a;o=Gd(n),(i=Bd.get(i))&&tf(o,i),nt(a=(e.ownerDocument||e).createElement("link"));var s=a;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),hd(a,"link",o),t.state.loading|=4,ef(a,n.precedence,e),t.instance=a;case"script":return a=Yd(n.src),(i=e.querySelector(Jd(a)))?(t.instance=i,nt(i),i):(o=n,(i=Bd.get(a))&&nf(o=f({},n),i),nt(i=(e=e.ownerDocument||e).createElement("script")),hd(i,"link",o),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(r(443,t.type))}else"stylesheet"===t.type&&!(4&t.state.loading)&&(o=t.instance,t.state.loading|=4,ef(o,n.precedence,e));return t.instance}function ef(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=r.length?r[r.length-1]:null,i=o,a=0;a<r.length;a++){var s=r[a];if(s.dataset.precedence===t)i=s;else if(i!==o)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=9===n.nodeType?n.head:n).insertBefore(e,t.firstChild)}function tf(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.title&&(e.title=t.title)}function nf(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.integrity&&(e.integrity=t.integrity)}var rf=null;function of(e,t,n){if(null===rf){var r=new Map,o=rf=new Map;o.set(n,r)}else(r=(o=rf).get(n))||(r=new Map,o.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),o=0;o<n.length;o++){var i=n[o];if(!(i[Ge]||i[He]||"link"===e&&"stylesheet"===i.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==i.namespaceURI){var a=i.getAttribute(t)||"";a=e+a;var s=r.get(a);s?s.push(i):r.set(a,[i])}}return r}function af(e,t,n){(e=e.ownerDocument||e).head.insertBefore(n,"title"===t?e.querySelector("head > title"):null)}function sf(e){return!!("stylesheet"!==e.type||3&e.state.loading)}var lf=0;function cf(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages))if(this.stylesheets)df(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var uf=null;function df(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,uf=new Map,t.forEach(ff,e),uf=null,cf.call(e))}function ff(e,t){if(!(4&t.state.loading)){var n=uf.get(e);if(n)var r=n.get(null);else{n=new Map,uf.set(e,n);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<o.length;i++){var a=o[i];"LINK"!==a.nodeName&&"not all"===a.getAttribute("media")||(n.set(a.dataset.precedence,a),r=a)}r&&n.set(null,r)}a=(o=t.instance).getAttribute("data-precedence"),(i=n.get(a)||r)===r&&n.set(null,o),n.set(a,o),this.count++,r=cf.bind(this),o.addEventListener("load",r),o.addEventListener("error",r),i?i.parentNode.insertBefore(o,i.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(o,e.firstChild),t.state.loading|=4}}var pf={$$typeof:S,Provider:null,Consumer:null,_currentValue:D,_currentValue2:D,_threadCount:0};function hf(e,t,n,r,o,i,a,s,l){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ie(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ie(0),this.hiddenUpdates=Ie(null),this.identifierPrefix=r,this.onUncaughtError=o,this.onCaughtError=i,this.onRecoverableError=a,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function mf(e,t,n,r,o,i,a,s,l,c,u,d){return e=new hf(e,t,n,a,l,c,u,d,s),t=1,!0===i&&(t|=24),i=Ur(3,null,null,t),e.current=i,i.stateNode=e,(t=$o()).refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:r,isDehydrated:n,cache:t},vi(i),e}function gf(e){return e?e=Dr:Dr}function yf(e,t,n,r,o,i){o=gf(o),null===r.context?r.context=o:r.pendingContext=o,(r=ki(t)).payload={element:n},null!==(i=void 0===i?null:i)&&(r.callback=i),null!==(n=xi(e,r,t))&&(Gc(n,0,t),Si(n,e,t))}function bf(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function vf(e,t){bf(e,t),(e=e.alternate)&&bf(e,t)}function wf(e){if(13===e.tag||31===e.tag){var t=jr(e,67108864);null!==t&&Gc(t,0,67108864),vf(e,67108864)}}function kf(e){if(13===e.tag||31===e.tag){var t=Qc(),n=jr(e,t=De(t));null!==n&&Gc(n,0,t),vf(e,t)}}var xf=!0;function Sf(e,t,n,r){var o=F.T;F.T=null;var i=L.p;try{L.p=2,Ef(e,t,n,r)}finally{L.p=i,F.T=o}}function _f(e,t,n,r){var o=F.T;F.T=null;var i=L.p;try{L.p=8,Ef(e,t,n,r)}finally{L.p=i,F.T=o}}function Ef(e,t,n,r){if(xf){var o=Cf(r);if(null===o)rd(e,t,r,zf,n),Df(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return Of=Rf(Of,e,t,n,r,o),!0;case"dragenter":return Pf=Rf(Pf,e,t,n,r,o),!0;case"mouseover":return If=Rf(If,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Mf.set(i,Rf(Mf.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,jf.set(i,Rf(jf.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(Df(e,r),4&t&&-1<Lf.indexOf(e)){for(;null!==o;){var i=Xe(o);if(null!==i)switch(i.tag){case 3:if((i=i.stateNode).current.memoizedState.isDehydrated){var a=Ae(i.pendingLanes);if(0!==a){var s=i;for(s.pendingLanes|=2,s.entangledLanes|=2;a;){var l=1<<31-xe(a);s.entanglements[1]|=l,a&=~l}Lu(i),!(6&mc)&&(Fc=ue()+500,Du(0))}}break;case 31:case 13:null!==(s=jr(i,2))&&Gc(s,0,2),tu(),vf(i,2)}if(null===(i=Cf(r))&&rd(e,t,r,zf,n),i===o)break;o=i}null!==o&&r.stopPropagation()}else rd(e,t,r,null,n)}}function Cf(e){return Af(e=Ft(e))}var zf=null;function Af(e){if(zf=null,null!==(e=Je(e))){var t=a(e);if(null===t)e=null;else{var n=t.tag;if(13===n){if(null!==(e=s(t)))return e;e=null}else if(31===n){if(null!==(e=c(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return zf=e,null}function Nf(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(de()){case fe:return 2;case pe:return 8;case he:case me:return 32;case ge:return 268435456;default:return 32}default:return 32}}var Tf=!1,Of=null,Pf=null,If=null,Mf=new Map,jf=new Map,Ff=[],Lf="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".split(" ");function Df(e,t){switch(e){case"focusin":case"focusout":Of=null;break;case"dragenter":case"dragleave":Pf=null;break;case"mouseover":case"mouseout":If=null;break;case"pointerover":case"pointerout":Mf.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":jf.delete(t.pointerId)}}function Rf(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},null!==t&&(null!==(t=Xe(t))&&wf(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function Uf(e){var t=Je(e.target);if(null!==t){var n=a(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=s(n)))return e.blockedOn=t,void Be(e.priority,function(){kf(n)})}else if(31===t){if(null!==(t=c(n)))return e.blockedOn=t,void Be(e.priority,function(){kf(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Bf(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Cf(e.nativeEvent);if(null!==n)return null!==(t=Xe(n))&&wf(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);jt=r,n.target.dispatchEvent(r),jt=null,t.shift()}return!0}function $f(e,t,n){Bf(e)&&n.delete(t)}function Hf(){Tf=!1,null!==Of&&Bf(Of)&&(Of=null),null!==Pf&&Bf(Pf)&&(Pf=null),null!==If&&Bf(If)&&(If=null),Mf.forEach($f),jf.forEach($f)}function Vf(t,n){t.blockedOn===n&&(t.blockedOn=null,Tf||(Tf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Hf)))}var qf=null;function Wf(t){qf!==t&&(qf=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){qf===t&&(qf=null);for(var e=0;e<t.length;e+=3){var n=t[e],r=t[e+1],o=t[e+2];if("function"!=typeof r){if(null===Af(r||n))continue;break}var i=Xe(n);null!==i&&(t.splice(e,3),e-=3,rs(i,{pending:!0,data:o,method:n.method,action:r},r,o))}}))}function Zf(e){function t(t){return Vf(t,e)}null!==Of&&Vf(Of,e),null!==Pf&&Vf(Pf,e),null!==If&&Vf(If,e),Mf.forEach(t),jf.forEach(t);for(var n=0;n<Ff.length;n++){var r=Ff[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ff.length&&null===(n=Ff[0]).blockedOn;)Uf(n),null===n.blockedOn&&Ff.shift();if(null!=(n=(e.ownerDocument||e).$$reactFormReplay))for(r=0;r<n.length;r+=3){var o=n[r],i=n[r+1],a=o[Ve]||null;if("function"==typeof i)a||Wf(n);else if(a){var s=null;if(i&&i.hasAttribute("formAction")){if(o=i,a=i[Ve]||null)s=a.formAction;else if(null!==Af(o))continue}else s=a.action;"function"==typeof s?n[r+1]=s:(n.splice(r,3),r-=3),Wf(n)}}}function Qf(){function e(e){e.canIntercept&&"react-transition"===e.info&&e.intercept({handler:function(){return new Promise(function(e){return o=e})},focusReset:"manual",scroll:"manual"})}function t(){null!==o&&(o(),o=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&null!=e.url&&navigation.navigate(e.url,{state:e.getState(),info:"react-transition",history:"replace"})}}if("object"==typeof navigation){var r=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),null!==o&&(o(),o=null)}}}function Kf(e){this._internalRoot=e}function Gf(e){this._internalRoot=e}Gf.prototype.render=Kf.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(r(409));yf(t.current,Qc(),e,t,null,null)},Gf.prototype.unmount=Kf.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;yf(e.current,2,null,e,null,null),tu(),t[qe]=null}},Gf.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ue();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ff.length&&0!==t&&t<Ff[n].priority;n++);Ff.splice(n,0,e),0===n&&Uf(e)}};var Yf=t.version;if("19.2.3"!==Yf)throw Error(r(527,Yf,"19.2.3"));L.findDOMNode=function(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(r(188));throw e=Object.keys(e).join(","),Error(r(268,e))}return e=function(e){var t=e.alternate;if(!t){if(null===(t=a(e)))throw Error(r(188));return t!==e?null:e}for(var n=e,o=t;;){var i=n.return;if(null===i)break;var s=i.alternate;if(null===s){if(null!==(o=i.return)){n=o;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return u(i),e;if(s===o)return u(i),t;s=s.sibling}throw Error(r(188))}if(n.return!==o.return)n=i,o=s;else{for(var l=!1,c=i.child;c;){if(c===n){l=!0,n=i,o=s;break}if(c===o){l=!0,o=i,n=s;break}c=c.sibling}if(!l){for(c=s.child;c;){if(c===n){l=!0,n=s,o=i;break}if(c===o){l=!0,o=s,n=i;break}c=c.sibling}if(!l)throw Error(r(189))}}if(n.alternate!==o)throw Error(r(190))}if(3!==n.tag)throw Error(r(188));return n.stateNode.current===n?e:t}(t),e=null===(e=null!==e?d(e):null)?null:e.stateNode};var Jf={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:F,reconcilerVersion:"19.2.3"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Xf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xf.isDisabled&&Xf.supportsFiber)try{ve=Xf.inject(Jf),we=Xf}catch(ep){}}return i.createRoot=function(e,t){if(!o(e))throw Error(r(299));var n=!1,i="",a=Cs,s=zs,l=As;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(i=t.identifierPrefix),void 0!==t.onUncaughtError&&(a=t.onUncaughtError),void 0!==t.onCaughtError&&(s=t.onCaughtError),void 0!==t.onRecoverableError&&(l=t.onRecoverableError)),t=mf(e,1,!1,null,0,n,i,null,a,s,l,Qf),e[qe]=t.current,td(e),new Kf(t)},i.hydrateRoot=function(e,t,n){if(!o(e))throw Error(r(299));var i=!1,a="",s=Cs,l=zs,c=As,u=null;return null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onUncaughtError&&(s=n.onUncaughtError),void 0!==n.onCaughtError&&(l=n.onCaughtError),void 0!==n.onRecoverableError&&(c=n.onRecoverableError),void 0!==n.formState&&(u=n.formState)),(t=mf(e,1,!0,t,0,i,a,u,s,l,c,Qf)).context=gf(null),n=t.current,(a=ki(i=De(i=Qc()))).callback=null,xi(n,a,i),n=i,t.current.lanes=n,Me(t,n),Lu(t),e[qe]=t.current,td(e),new Gf(t)},i.version="19.2.3",i}var _=(b||(b=1,function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),o.exports=S()),o.exports),E=h();const C=t(E);var z,A,N={exports:{}},T={};var O=(A||(A=1,N.exports=function(){if(z)return T;z=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(t,n,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==n.key&&(o=""+n.key),"key"in n)for(var i in r={},n)"key"!==i&&(r[i]=n[i]);else r=n;return n=r.ref,{$$typeof:e,type:t,key:o,ref:void 0!==n?n:null,props:r}}return T.Fragment=t,T.jsx=n,T.jsxs=n,T}()),N.exports);const P={es:{online:"En línea",offline:"Desconectado",connecting:"Conectando...",con_amor_paseo_libre:"Con ❤️ por BotUyo",preview:"Vista previa",fotos:"Fotos",ubicacion:"Ubicación",input_placeholder:"Escribe un mensaje...",send:"Enviar",attach_photo:"Adjuntar foto",attach_location:"Compartir ubicación",recording:"Grabando...",rate_limit_exceeded:"Has enviado demasiados mensajes. Espera un momento.",connection_error:"Error de conexión",file_too_large:"Archivo demasiado grande",invalid_file:"Tipo de archivo no válido",extracted:{assistant:"Asistente",anterior:"Anterior",siguiente:"Siguiente",cerrar:"Cerrar",cerrar_chat:"Cerrar chat",abrir_chat:"Abrir chat",ver_ubicacion:"Ver ubicación"},accessibility:{closeChat:"Cerrar ventana de chat",closeChatHint:"Presiona Escape para cerrar",chatMessages:"Mensajes del chat",messageHistory:"Historial de mensajes",dialogDescription:"Ventana de chat con {{botName}}. Presiona Escape para cerrar. Usa Ctrl+Enter para enviar mensajes.",sendMessage:"Enviar mensaje",sendMessageHint:"Presiona Enter o Ctrl+Enter para enviar",typeMessage:"Escribe tu mensaje aquí",botMessage:"Mensaje del asistente",userMessage:"Tu mensaje",messageFrom:"Mensaje de {{sender}}",messageTime:"Enviado {{time}}",newMessage:"Nuevo mensaje recibido"}},en:{online:"Online",offline:"Offline",connecting:"Connecting...",con_amor_paseo_libre:"With ❤️ by BotUyo",preview:"Preview",fotos:"Photos",ubicacion:"Location",input_placeholder:"Type a message...",send:"Send",attach_photo:"Attach photo",attach_location:"Share location",recording:"Recording...",rate_limit_exceeded:"You have sent too many messages. Please wait.",connection_error:"Connection error",file_too_large:"File too large",invalid_file:"Invalid file type",extracted:{assistant:"Assistant",anterior:"Previous",siguiente:"Next",cerrar:"Close",cerrar_chat:"Close chat",abrir_chat:"Open chat",ver_ubicacion:"View location"},accessibility:{closeChat:"Close chat window",closeChatHint:"Press Escape to close",chatMessages:"Chat messages",messageHistory:"Message history",dialogDescription:"Chat window with {{botName}}. Press Escape to close. Use Ctrl+Enter to send messages.",sendMessage:"Send message",sendMessageHint:"Press Enter or Ctrl+Enter to send",typeMessage:"Type your message here",botMessage:"Assistant message",userMessage:"Your message",messageFrom:"Message from {{sender}}",messageTime:"Sent {{time}}",newMessage:"New message received"}},pt:{online:"Online",offline:"Desconectado",connecting:"Conectando...",con_amor_paseo_libre:"Com ❤️ por BotUyo",preview:"Visualizar",fotos:"Fotos",ubicacion:"Localização",input_placeholder:"Digite uma mensagem...",send:"Enviar",attach_photo:"Anexar foto",attach_location:"Compartilhar localização",recording:"Gravando...",rate_limit_exceeded:"Você enviou muitas mensagens. Aguarde um momento.",connection_error:"Erro de conexão",file_too_large:"Arquivo muito grande",invalid_file:"Tipo de arquivo inválido",extracted:{assistant:"Assistente",anterior:"Anterior",siguiente:"Próximo",cerrar:"Fechar",cerrar_chat:"Fechar chat",abrir_chat:"Abrir chat",ver_ubicacion:"Ver localização"},accessibility:{closeChat:"Fechar janela de chat",closeChatHint:"Pressione Escape para fechar",chatMessages:"Mensagens do chat",messageHistory:"Histórico de mensagens",dialogDescription:"Janela de chat com {{botName}}. Pressione Escape para fechar. Use Ctrl+Enter para enviar mensagens.",sendMessage:"Enviar mensagem",sendMessageHint:"Pressione Enter ou Ctrl+Enter para enviar",typeMessage:"Digite sua mensagem aqui",botMessage:"Mensagem do assistente",userMessage:"Sua mensagem",messageFrom:"Mensagem de {{sender}}",messageTime:"Enviado {{time}}",newMessage:"Nova mensagem recebida"}},fr:{online:"En ligne",offline:"Déconnecté",connecting:"Connexion...",con_amor_paseo_libre:"Avec ❤️ par BotUyo",preview:"Aperçu",fotos:"Photos",ubicacion:"Emplacement",input_placeholder:"Tapez un message...",send:"Envoyer",attach_photo:"Joindre une photo",attach_location:"Partager la localisation",recording:"Enregistrement...",rate_limit_exceeded:"Vous avez envoyé trop de messages. Veuillez patienter.",connection_error:"Erreur de connexion",file_too_large:"Fichier trop volumineux",invalid_file:"Type de fichier invalide",extracted:{assistant:"Assistant",anterior:"Précédent",siguiente:"Suivant",cerrar:"Fermer",cerrar_chat:"Fermer le chat",abrir_chat:"Ouvrir le chat",ver_ubicacion:"Voir l'emplacement"},accessibility:{closeChat:"Fermer la fenêtre de chat",closeChatHint:"Appuyez sur Échap pour fermer",chatMessages:"Messages du chat",messageHistory:"Historique des messages",dialogDescription:"Fenêtre de chat avec {{botName}}. Appuyez sur Échap pour fermer. Utilisez Ctrl+Entrée pour envoyer des messages.",sendMessage:"Envoyer un message",sendMessageHint:"Appuyez sur Entrée ou Ctrl+Entrée pour envoyer",typeMessage:"Tapez votre message ici",botMessage:"Message de l'assistant",userMessage:"Votre message",messageFrom:"Message de {{sender}}",messageTime:"Envoyé {{time}}",newMessage:"Nouveau message reçu"}}};function I(){if("undefined"==typeof navigator)return"es";const e=navigator.language.split("-")[0];return P[e]?e:"es"}const M=E.createContext(void 0),j="botuyo-chat-locale";function F({children:e,defaultLocale:t}){const[n,r]=E.useState(()=>{if(t)return t;if("undefined"!=typeof window){const e=localStorage.getItem(j);if(e)return e}return I()});return E.useEffect(()=>{if("undefined"==typeof window||t)return;const e=()=>{localStorage.getItem(j)||r(I())};return window.addEventListener("languagechange",e),()=>window.removeEventListener("languagechange",e)},[t]),O.jsx(M.Provider,{value:{locale:n,setLocale:e=>{["es","en","pt","fr"].includes(e)?(r(e),"undefined"!=typeof window&&localStorage.setItem(j,e)):console.warn(`[BotUyo] Locale "${e}" no es soportado. Manteniendo "${n}"`)}},children:e})}const L=E.lazy(()=>Promise.resolve().then(()=>Wg).then(e=>({default:e.ChatWidget})));class D{root=null;container=null;config=null;init(e){return this.config=e,this.render(),this}render(){if(!this.config)return void console.error("[BotUyoChat] No configuration provided");if(this.container||(this.container=document.createElement("div"),this.container.id="botuyo-chat-widget-root",this.container.style.position="fixed",this.container.style.zIndex="999999",document.body.appendChild(this.container)),this.config.theme?.cssVariables){const e=this.config.theme.cssVariables,t={background:e.background,foreground:e.foreground,card:e.card,cardForeground:e.cardForeground,primary:e.primary,primaryForeground:e.primaryForeground,muted:e.muted,mutedForeground:e.mutedForeground,border:e.border,destructive:e.destructive,radius:e.radius,spacing1:e.spacing1,spacing2:e.spacing2,spacing3:e.spacing3,spacing4:e.spacing4,spacing5:e.spacing5,spacing6:e.spacing6,spacing8:e.spacing8};Object.entries(t).forEach(([e,t])=>{void 0!==t&&this.container.style.setProperty(`--${e}`,t)})}this.root||(this.root=_.createRoot(this.container));const e={apiKey:this.config.apiKey,apiBaseUrl:this.config.apiBaseUrl,theme:{primaryColor:"#10b981",botName:"Asistente Virtual",position:"bottom-right",welcomeMessage:"¡Hola! 👋 ¿En qué puedo ayudarte?",inputPlaceholder:"Escribe tu mensaje...",borderRadius:"0.75rem",launcherBorderRadius:"50%",...this.config.theme},userContext:this.config.userContext,pageContext:this.config.pageContext,includeSEOMetadata:this.config.includeSEOMetadata??!1,onNavigate:this.config.onNavigate,onLogin:this.config.onLogin,onEvent:this.config.onEvent,onStateChange:this.config.onStateChange},t=C.createElement(E.Suspense,{fallback:C.createElement("div",{style:{position:"fixed",bottom:"24px",right:"24px",width:"60px",height:"60px",borderRadius:"50%",backgroundColor:e.theme?.primaryColor||"#10b981",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",cursor:"wait"}},C.createElement("div",{style:{width:"24px",height:"24px",border:"3px solid rgba(255, 255, 255, 0.3)",borderTopColor:"#fff",borderRadius:"50%",animation:"spin 1s linear infinite"}}))},C.createElement(L,e));this.root.render(C.createElement(F,{defaultLocale:this.config.theme?.defaultLocale,children:t})),console.log("[BotUyoChat] Widget initialized",e)}update(e){this.config?(this.config={...this.config,...e,theme:{...this.config.theme,...e.theme}},this.render()):console.error("[BotUyoChat] Widget not initialized")}destroy(){this.root&&(this.root.unmount(),this.root=null),this.container&&this.container.parentNode&&(this.container.parentNode.removeChild(this.container),this.container=null),this.config=null,console.log("[BotUyoChat] Widget destroyed")}open(){window.dispatchEvent(new CustomEvent("botuyo-chat:open"))}close(){window.dispatchEvent(new CustomEvent("botuyo-chat:close"))}sendMessage(e){window.dispatchEvent(new CustomEvent("botuyo-chat:send-message",{detail:{message:e}}))}getState(){return null}}const R=new D;function U(e){const{locale:t,setLocale:n}=function(){const e=E.useContext(M);if(void 0===e)throw new Error("useLanguage debe usarse dentro de un LanguageProvider");return e}();return{t:E.useCallback(n=>{const r=e?`${e}.${n}`:n,o=(i=P[t],(a=r).split(".").reduce((e,t)=>e?.[t],i)||a);var i,a;return o||n},[t,e]),setLocale:n,currentLocale:t}}window.BotUyoChat=R;const B=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),$=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)};var H={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"};const V=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1},q=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>E.createElement("svg",{ref:l,...H,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:B("lucide",o),...!i&&!V(s)&&{"aria-hidden":"true"},...s},[...a.map(([e,t])=>E.createElement(e,t)),...Array.isArray(i)?i:[i]])),W=(e,t)=>{const n=E.forwardRef(({className:n,...r},o)=>{return E.createElement(q,{ref:o,iconNode:t,className:B(`lucide-${i=$(e),i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...r});var i});return n.displayName=$(e),n},Z=W("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),Q=W("check-check",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]),K=W("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),G=W("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Y=W("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]),J=W("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),X=W("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]),ee=W("heart",[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]]),te=W("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]),ne=W("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),re=W("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]),oe=W("message-circle",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]),ie=W("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]),ae=W("pause",[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]]),se=W("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]),le=W("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),ce=W("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]),ue=W("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),de=W("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]),fe=W("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),pe=W("zoom-in",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);function he(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=he(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}const me=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ge="-",ye=[],be=e=>{const t=ke(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return we(e);const n=e.split(ge),r=""===n[0]&&n.length>1?1:0;return ve(n,r,t)},getConflictingClassGroupIds:(e,t)=>{if(t){const t=r[e],o=n[e];return t?o?((e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n})(o,t):t:o||ye}return n[e]||ye}}},ve=(e,t,n)=>{if(0===e.length-t)return n.classGroupId;const r=e[t],o=n.nextPart.get(r);if(o){const n=ve(e,t+1,o);if(n)return n}const i=n.validators;if(null===i)return;const a=0===t?e.join(ge):e.slice(t).join(ge),s=i.length;for(let l=0;l<s;l++){const e=i[l];if(e.validator(a))return e.classGroupId}},we=e=>-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?"arbitrary.."+r:void 0})(),ke=e=>{const{theme:t,classGroups:n}=e;return xe(n,t)},xe=(e,t)=>{const n=me();for(const r in e){const o=e[r];Se(o,n,r,t)}return n},Se=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const o=e[i];_e(o,t,n,r)}},_e=(e,t,n,r)=>{"string"!=typeof e?"function"!=typeof e?ze(e,t,n,r):Ce(e,t,n,r):Ee(e,t,n)},Ee=(e,t,n)=>{(""===e?t:Ae(t,e)).classGroupId=n},Ce=(e,t,n,r)=>{Ne(e)?Se(e(r),t,n,r):(null===t.validators&&(t.validators=[]),t.validators.push(((e,t)=>({classGroupId:e,validator:t}))(n,e)))},ze=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let a=0;a<i;a++){const[e,i]=o[a];Se(i,Ae(t,e),n,r)}},Ae=(e,t)=>{let n=e;const r=t.split(ge),o=r.length;for(let i=0;i<o;i++){const e=r[i];let t=n.nextPart.get(e);t||(t=me(),n.nextPart.set(e,t)),n=t}return n},Ne=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,Te=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(o,i)=>{n[o]=i,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];return void 0!==t?t:void 0!==(t=r[e])?(o(e,t),t):void 0},set(e,t){e in n?n[e]=t:o(e,t)}}},Oe=[],Pe=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Ie=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=e=>{const t=[];let n,r=0,o=0,i=0;const a=e.length;for(let u=0;u<a;u++){const a=e[u];if(0===r&&0===o){if(":"===a){t.push(e.slice(i,u)),i=u+1;continue}if("/"===a){n=u;continue}}"["===a?r++:"]"===a?r--:"("===a?o++:")"===a&&o--}const s=0===t.length?e:e.slice(i);let l=s,c=!1;s.endsWith("!")?(l=s.slice(0,-1),c=!0):s.startsWith("!")&&(l=s.slice(1),c=!0);return Pe(t,c,l,n&&n>i?n-i:void 0)};if(t){const e=t+":",n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Pe(Oe,!1,t,void 0,!0)}if(n){const e=r;r=t=>n({className:t,parseClassName:e})}return r},Me=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{const n=[];let r=[];for(let o=0;o<e.length;o++){const i=e[o],a="["===i[0],s=t.has(i);a||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(i)):r.push(i)}return r.length>0&&(r.sort(),n.push(...r)),n}},je=/\s+/,Fe=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Fe(e[r]))&&(n&&(n+=" "),n+=t);return n},Le=(e,...t)=>{let n,r,o,i;const a=e=>{const t=r(e);if(t)return t;const i=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(je);let l="";for(let c=s.length-1;c>=0;c-=1){const e=s[c],{isExternal:t,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(e);if(t){l=e+(l.length>0?" "+l:l);continue}let h=!!p,m=r(h?f.substring(0,p):f);if(!m){if(!h){l=e+(l.length>0?" "+l:l);continue}if(m=r(f),!m){l=e+(l.length>0?" "+l:l);continue}h=!1}const g=0===u.length?"":1===u.length?u[0]:i(u).join(":"),y=d?g+"!":g,b=y+m;if(a.indexOf(b)>-1)continue;a.push(b);const v=o(m,h);for(let n=0;n<v.length;++n){const e=v[n];a.push(y+e)}l=e+(l.length>0?" "+l:l)}return l})(e,n);return o(e,i),i};return i=s=>{const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:Te(e.cacheSize),parseClassName:Ie(e),sortModifiers:Me(e),...be(e)}))(l),r=n.cache.get,o=n.cache.set,i=a,a(s)},(...e)=>i(((...e)=>{let t,n,r=0,o="";for(;r<e.length;)(t=e[r++])&&(n=Fe(t))&&(o&&(o+=" "),o+=n);return o})(...e))},De=[],Re=e=>{const t=t=>t[e]||De;return t.isThemeGetter=!0,t},Ue=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Be=/^\((?:(\w[\w-]*):)?(.+)\)$/i,$e=/^\d+\/\d+$/,He=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ve=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,qe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,We=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ze=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Qe=e=>$e.test(e),Ke=e=>!!e&&!Number.isNaN(Number(e)),Ge=e=>!!e&&Number.isInteger(Number(e)),Ye=e=>e.endsWith("%")&&Ke(e.slice(0,-1)),Je=e=>He.test(e),Xe=()=>!0,et=e=>Ve.test(e)&&!qe.test(e),tt=()=>!1,nt=e=>We.test(e),rt=e=>Ze.test(e),ot=e=>!at(e)&&!ft(e),it=e=>vt(e,St,tt),at=e=>Ue.test(e),st=e=>vt(e,_t,et),lt=e=>vt(e,Et,Ke),ct=e=>vt(e,kt,tt),ut=e=>vt(e,xt,rt),dt=e=>vt(e,zt,nt),ft=e=>Be.test(e),pt=e=>wt(e,_t),ht=e=>wt(e,Ct),mt=e=>wt(e,kt),gt=e=>wt(e,St),yt=e=>wt(e,xt),bt=e=>wt(e,zt,!0),vt=(e,t,n)=>{const r=Ue.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},wt=(e,t,n=!1)=>{const r=Be.exec(e);return!!r&&(r[1]?t(r[1]):n)},kt=e=>"position"===e||"percentage"===e,xt=e=>"image"===e||"url"===e,St=e=>"length"===e||"size"===e||"bg-size"===e,_t=e=>"length"===e,Et=e=>"number"===e,Ct=e=>"family-name"===e,zt=e=>"shadow"===e,At=Le(()=>{const e=Re("color"),t=Re("font"),n=Re("text"),r=Re("font-weight"),o=Re("tracking"),i=Re("leading"),a=Re("breakpoint"),s=Re("container"),l=Re("spacing"),c=Re("radius"),u=Re("shadow"),d=Re("inset-shadow"),f=Re("text-shadow"),p=Re("drop-shadow"),h=Re("blur"),m=Re("perspective"),g=Re("aspect"),y=Re("ease"),b=Re("animate"),v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",ft,at],w=()=>[ft,at,l],k=()=>[Qe,"full","auto",...w()],x=()=>[Ge,"none","subgrid",ft,at],S=()=>["auto",{span:["full",Ge,ft,at]},Ge,ft,at],_=()=>[Ge,"auto",ft,at],E=()=>["auto","min","max","fr",ft,at],C=()=>["auto",...w()],z=()=>[Qe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],A=()=>[e,ft,at],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",mt,ct,{position:[ft,at]}],T=()=>["auto","cover","contain",gt,it,{size:[ft,at]}],O=()=>[Ye,pt,st],P=()=>["","none","full",c,ft,at],I=()=>["",Ke,pt,st],M=()=>[Ke,Ye,mt,ct],j=()=>["","none",h,ft,at],F=()=>["none",Ke,ft,at],L=()=>["none",Ke,ft,at],D=()=>[Ke,ft,at],R=()=>[Qe,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Je],breakpoint:[Je],color:[Xe],container:[Je],"drop-shadow":[Je],ease:["in","out","in-out"],font:[ot],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Je],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Je],shadow:[Je],spacing:["px",Ke],text:[Je],"text-shadow":[Je],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Qe,at,ft,g]}],container:["container"],columns:[{columns:[Ke,at,ft,s]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:k()}],"inset-x":[{"inset-x":k()}],"inset-y":[{"inset-y":k()}],start:[{start:k()}],end:[{end:k()}],top:[{top:k()}],right:[{right:k()}],bottom:[{bottom:k()}],left:[{left:k()}],visibility:["visible","invisible","collapse"],z:[{z:[Ge,"auto",ft,at]}],basis:[{basis:[Qe,"full","auto",s,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ke,Qe,"auto","initial","none",at]}],grow:[{grow:["",Ke,ft,at]}],shrink:[{shrink:["",Ke,ft,at]}],order:[{order:[Ge,"first","last","none",ft,at]}],"grid-cols":[{"grid-cols":x()}],"col-start-end":[{col:S()}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":x()}],"row-start-end":[{row:S()}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":E()}],"auto-rows":[{"auto-rows":E()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:C()}],mx:[{mx:C()}],my:[{my:C()}],ms:[{ms:C()}],me:[{me:C()}],mt:[{mt:C()}],mr:[{mr:C()}],mb:[{mb:C()}],ml:[{ml:C()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:z()}],w:[{w:[s,"screen",...z()]}],"min-w":[{"min-w":[s,"screen","none",...z()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...z()]}],h:[{h:["screen","lh",...z()]}],"min-h":[{"min-h":["screen","lh","none",...z()]}],"max-h":[{"max-h":["screen","lh",...z()]}],"font-size":[{text:["base",n,pt,st]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ft,lt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ye,at]}],"font-family":[{font:[ht,at,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ft,at]}],"line-clamp":[{"line-clamp":[Ke,"none",ft,lt]}],leading:[{leading:[i,...w()]}],"list-image":[{"list-image":["none",ft,at]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ft,at]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[Ke,"from-font","auto",ft,st]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[Ke,"auto",ft,at]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ft,at]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ft,at]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:N()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:T()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ge,ft,at],radial:["",ft,at],conic:[Ge,ft,at]},yt,ut]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:O()}],"gradient-via-pos":[{via:O()}],"gradient-to-pos":[{to:O()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border:I()}],"border-w-x":[{"border-x":I()}],"border-w-y":[{"border-y":I()}],"border-w-s":[{"border-s":I()}],"border-w-e":[{"border-e":I()}],"border-w-t":[{"border-t":I()}],"border-w-r":[{"border-r":I()}],"border-w-b":[{"border-b":I()}],"border-w-l":[{"border-l":I()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":I()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[Ke,ft,at]}],"outline-w":[{outline:["",Ke,pt,st]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",u,bt,dt]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",d,bt,dt]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[Ke,st]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",f,bt,dt]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[Ke,ft,at]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":M()}],"mask-image-linear-to-pos":[{"mask-linear-to":M()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":M()}],"mask-image-t-to-pos":[{"mask-t-to":M()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":M()}],"mask-image-r-to-pos":[{"mask-r-to":M()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":M()}],"mask-image-b-to-pos":[{"mask-b-to":M()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":M()}],"mask-image-l-to-pos":[{"mask-l-to":M()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":M()}],"mask-image-x-to-pos":[{"mask-x-to":M()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":M()}],"mask-image-y-to-pos":[{"mask-y-to":M()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[ft,at]}],"mask-image-radial-from-pos":[{"mask-radial-from":M()}],"mask-image-radial-to-pos":[{"mask-radial-to":M()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[Ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":M()}],"mask-image-conic-to-pos":[{"mask-conic-to":M()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:T()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ft,at]}],filter:[{filter:["","none",ft,at]}],blur:[{blur:j()}],brightness:[{brightness:[Ke,ft,at]}],contrast:[{contrast:[Ke,ft,at]}],"drop-shadow":[{"drop-shadow":["","none",p,bt,dt]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",Ke,ft,at]}],"hue-rotate":[{"hue-rotate":[Ke,ft,at]}],invert:[{invert:["",Ke,ft,at]}],saturate:[{saturate:[Ke,ft,at]}],sepia:[{sepia:["",Ke,ft,at]}],"backdrop-filter":[{"backdrop-filter":["","none",ft,at]}],"backdrop-blur":[{"backdrop-blur":j()}],"backdrop-brightness":[{"backdrop-brightness":[Ke,ft,at]}],"backdrop-contrast":[{"backdrop-contrast":[Ke,ft,at]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ke,ft,at]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ke,ft,at]}],"backdrop-invert":[{"backdrop-invert":["",Ke,ft,at]}],"backdrop-opacity":[{"backdrop-opacity":[Ke,ft,at]}],"backdrop-saturate":[{"backdrop-saturate":[Ke,ft,at]}],"backdrop-sepia":[{"backdrop-sepia":["",Ke,ft,at]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ft,at]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ke,"initial",ft,at]}],ease:[{ease:["linear","initial",y,ft,at]}],delay:[{delay:[Ke,ft,at]}],animate:[{animate:["none",b,ft,at]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ft,at]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:F()}],"rotate-x":[{"rotate-x":F()}],"rotate-y":[{"rotate-y":F()}],"rotate-z":[{"rotate-z":F()}],scale:[{scale:L()}],"scale-x":[{"scale-x":L()}],"scale-y":[{"scale-y":L()}],"scale-z":[{"scale-z":L()}],"scale-3d":["scale-3d"],skew:[{skew:D()}],"skew-x":[{"skew-x":D()}],"skew-y":[{"skew-y":D()}],transform:[{transform:[ft,at,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:R()}],"translate-x":[{"translate-x":R()}],"translate-y":[{"translate-y":R()}],"translate-z":[{"translate-z":R()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ft,at]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ft,at]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[Ke,pt,st,lt]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Nt(...e){return At(function(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=he(e))&&(r&&(r+=" "),r+=t);return r}(e))}const Tt={background:"0 0% 100%",foreground:"240 10% 3.9%",card:"0 0% 100%",cardForeground:"240 10% 3.9%",primary:"160 84% 39%",primaryForeground:"0 0% 100%",muted:"240 4.8% 95.9%",mutedForeground:"240 3.8% 46.1%",border:"240 5.9% 90%",destructive:"0 84.2% 60.2%",radius:"0.5rem",spacing1:"0.25rem",spacing2:"0.5rem",spacing3:"0.75rem",spacing4:"1rem",spacing5:"0.75rem",spacing6:"1.5rem",spacing8:"2rem"},Ot="hsl(160, 84%, 39%)",Pt="Asistente",It="",Mt="bottom-right",jt="¡Hola! ¿En qué puedo ayudarte?",Ft="Escribe un mensaje...";function Lt(e){return e.primaryColor||Ot}const Dt={enabled:!0,messageEntry:"spring",typingIndicator:"wave",buttonEffects:!0,smoothScroll:!0,speedMultiplier:1,staggerDelay:50,windowTransitions:!0,launcherPulse:!0},Rt={glassmorphism:!0,gradients:!0,softShadows:!0,glowEffects:!0,particles:!1,soundEffects:!1,hapticFeedback:!0,shimmerLoading:!0,hoverLift:!0},Ut=E.createContext(Dt),Bt=E.createContext(Rt);function $t({children:e,animations:t,effects:n}){const r=E.useMemo(()=>({...Dt,...t}),[t]),o=E.useMemo(()=>({...Rt,...n}),[n]);return O.jsx(Ut.Provider,{value:r,children:O.jsx(Bt.Provider,{value:o,children:e})})}function Ht(){return"undefined"!=typeof window&&!!window.DEBUG}const Vt=(e,...t)=>{Ht()&&console.warn(`[BotUyo] ${e}`,...t)},qt=(e,...t)=>{console.error(`[BotUyo] ${e}`,...t)},Wt=(e,...t)=>{Ht()&&console.debug(`[BotUyo] ${e}`,...t)},Zt=(e,...t)=>{Ht()&&console.info(`[BotUyo] ${e}`,...t)},Qt=`data:image/svg+xml,${encodeURIComponent('\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">\n <defs>\n <linearGradient id="bg" x1="0%" y1="0%" x2="100%" y2="100%">\n <stop offset="0%" style="stop-color:#10b981"/>\n <stop offset="100%" style="stop-color:#059669"/>\n </linearGradient>\n </defs>\n <circle cx="32" cy="32" r="32" fill="url(#bg)"/>\n <rect x="16" y="20" width="32" height="24" rx="4" fill="white"/>\n <circle cx="24" cy="30" r="3" fill="#10b981"/>\n <circle cx="40" cy="30" r="3" fill="#10b981"/>\n <rect x="22" y="36" width="20" height="3" rx="1.5" fill="#10b981"/>\n <rect x="28" y="12" width="8" height="8" rx="2" fill="white"/>\n</svg>\n')}`,Kt=function(){const e=8e3,t=Math.floor(1200),n=2*t,r=44+n,o=new ArrayBuffer(r),i=new DataView(o);Gt(i,0,"RIFF"),i.setUint32(4,r-8,!0),Gt(i,8,"WAVE"),Gt(i,12,"fmt "),i.setUint32(16,16,!0),i.setUint16(20,1,!0),i.setUint16(22,1,!0),i.setUint32(24,e,!0),i.setUint32(28,16e3,!0),i.setUint16(32,2,!0),i.setUint16(34,16,!0),Gt(i,36,"data"),i.setUint32(40,n,!0);for(let l=0;l<t;l++){const n=l/e,r=1-l/t,o=Math.sin(2*Math.PI*880*n)*r*.5*32767;i.setInt16(44+2*l,o,!0)}const a=new Uint8Array(o);let s="";for(let l=0;l<a.length;l++)s+=String.fromCharCode(a[l]);return`data:audio/wav;base64,${btoa(s)}`}();function Gt(e,t,n){for(let r=0;r<n.length;r++)e.setUint8(t+r,n.charCodeAt(r))}function Yt({isOpen:e,onClick:t,unreadCount:n=0,primaryColor:r,logoUrl:o,starterPrompt:i,position:a="bottom-right",emotion:s="default",avatars:l={},styles:c,promptPersistence:u="session",avatarScale:d=1}){const{t:f}=U("extracted"),p=Lt({primaryColor:r}),h=c?.launcher?.bg,m=E.useContext(Ut),{triggerHaptic:g,getGlowClass:y}=function(){const e=E.useContext(Bt);return{getGlassClass:()=>e.glassmorphism?"backdrop-blur-md bg-white/80 dark:bg-black/80":"",getShadowClass:()=>e.softShadows?"shadow-soft-xl":"shadow-md",getGlowClass:()=>e.glowEffects?"hover:shadow-primary/20":"",getHoverLiftClass:()=>e.hoverLift?"hover:-translate-y-1 hover:shadow-lg transition-all":"",getGradientClass:()=>e.gradients?"bg-gradient-to-br from-primary/10 to-transparent":"",getShimmerClass:()=>e.shimmerLoading?"animate-shimmer":"animate-pulse",triggerHaptic:()=>{e.hapticFeedback&&"vibrate"in navigator&&navigator.vibrate(10)},playSound:t=>{e.soundEffects&&console.log(`[Sound] ${t}`)},triggerParticles:t=>{e.particles&&console.log("[Particles] triggered on",t)}}}(),b=m.launcherPulse&&!1!==c?.launcher?.pulse,[v,w]=E.useState(!1),[k,x]=E.useState(!1),[S,_]=E.useState(!1),[C,z]=E.useState(!1),A="bottom-right"===a,N="chat_launcher_prompt_state",T=E.useMemo(()=>l[s]||l.default||o||Qt,[s,l,o]);E.useEffect(()=>{z(!1)},[T]),E.useEffect(()=>{const e=Object.values(l).filter(e=>!!e);o&&e.push(o),e.forEach(e=>{(new Image).src=e})},[l,o]),E.useEffect(()=>{"forever"===u&&"dismissed"===localStorage.getItem(N)&&_(!0)},[u]);const P=E.useCallback(()=>{x(!0),setTimeout(()=>w(!1),500),"always"!==u&&(_(!0),"forever"===u&&localStorage.setItem(N,"dismissed"))},[u]);E.useEffect(()=>{if("always"!==u&&S||!i||e)return void w(!1);const t=setTimeout(()=>{w(!0),x(!1)},2e3),n=setTimeout(()=>P(),12e3);return()=>{clearTimeout(t),clearTimeout(n)}},[i,e,S,u,P]);return O.jsxs("div",{className:Nt("flex items-center w-fit transition-all duration-500",A?"flex-row ml-auto":"flex-row-reverse mr-auto"),children:[O.jsx("div",{className:Nt("transition-all duration-700 ease-in-out flex items-center",v?Nt("opacity-100 translate-x-0 w-auto max-w-[350px]",A?"mr-4":"ml-4"):"opacity-0 translate-x-8 w-0 max-w-0 overflow-hidden"),children:O.jsxs("div",{className:Nt("relative px-5 py-3.5 shadow-soft-xl border flex items-center gap-3",c?.radius?.card||"rounded-[20px]",k&&"opacity-0 scale-95 transition-all duration-300",!v&&"hidden"),style:{width:"max-content",maxWidth:"280px",backgroundColor:"hsl(var(--background))",color:"hsl(var(--foreground))",borderColor:"hsl(var(--border))"},children:[O.jsx("span",{className:"text-sm font-semibold leading-tight tracking-tight whitespace-nowrap",children:i}),O.jsx("button",{onClick:e=>{e.stopPropagation(),P()},className:"text-muted-foreground hover:text-foreground transition-colors p-1 rounded-full hover:bg-muted shrink-0",children:O.jsx(fe,{className:"h-3.5 w-3.5 stroke-[2.5]"})}),O.jsx("div",{className:Nt("absolute top-1/2 -translate-y-1/2 w-0 h-0 border-[7px] border-transparent",A?"right-[-14px] border-l-background":"left-[-14px] border-r-background")}),O.jsx("div",{className:Nt("absolute top-1/2 -translate-y-1/2 w-0 h-0 border-[7px] border-transparent -z-10",A?"right-[-15px] border-l-border":"left-[-15px] border-r-border")})]})}),O.jsxs("div",{className:"relative flex items-center justify-center shrink-0",children:[!e&&b&&O.jsx("span",{className:"absolute inset-0 flex items-center justify-center",children:O.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full opacity-20",style:{backgroundColor:p}})}),O.jsxs("button",{type:"button",onClick:()=>{Wt("Launcher handleMainAction called, isOpen:",e),g(),_(!0),"forever"===u&&localStorage.setItem(N,"dismissed"),t()},className:Nt("relative z-10 h-14 w-14 sm:h-16 sm:w-16","flex items-center justify-center text-white transition-all duration-500","hover:scale-110 active:scale-95 shadow-soft-xl cursor-pointer",!e&&"hover:rotate-6",!e&&m.enabled&&"animate-glow-pulse",c?.radius?.button||"rounded-full",h,y()),style:{backgroundColor:p||"hsl(160, 84%, 39%)","--primary-glow":`${p}66`},"aria-label":e?"Cerrar chat":"Abrir chat",children:[O.jsxs("div",{className:"relative h-full w-full flex items-center justify-center overflow-hidden rounded-inherit",children:[O.jsx("div",{className:Nt("absolute inset-0 transition-all duration-500 flex items-center justify-center",e?"opacity-0 scale-50 rotate-90":"opacity-100 scale-100 rotate-0"),children:T&&!C?O.jsx("img",{src:T,alt:f("assistant"),className:"w-full h-full object-cover",style:{transform:`scale(${d})`},onError:()=>z(!0)},T):O.jsx(oe,{className:"h-7 w-7 sm:h-8 sm:w-8 fill-current"})}),O.jsx("div",{className:Nt("absolute inset-0 transition-all duration-500 flex items-center justify-center bg-black/5 dark:bg-white/10",e?"opacity-100 scale-100 rotate-0":"opacity-0 scale-50 -rotate-90"),children:O.jsx(fe,{className:"h-7 w-7 sm:h-8 sm:w-8 stroke-[2.5]"})})]}),!e&&n>0&&O.jsx("div",{className:"absolute -top-1 -right-1 z-20 flex h-6 w-6 items-center justify-center bg-destructive text-destructive-foreground rounded-full border-2 border-background text-[10px] font-black shadow-soft-md tabular-nums",children:n>9?"9+":n})]})]})]})}var Jt=x();function Xt(e,t,n){let r,o=n.initialDeps??[],i=!0;function a(){var a,s,l;let c;n.key&&(null==(a=n.debug)?void 0:a.call(n))&&(c=Date.now());const u=e();if(!(u.length!==o.length||u.some((e,t)=>o[t]!==e)))return r;let d;if(o=u,n.key&&(null==(s=n.debug)?void 0:s.call(n))&&(d=Date.now()),r=t(...u),n.key&&(null==(l=n.debug)?void 0:l.call(n))){const e=Math.round(100*(Date.now()-c))/100,t=Math.round(100*(Date.now()-d))/100,r=t/16,o=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${o(t,5)} /${o(e,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,null==n?void 0:n.key)}return!(null==n?void 0:n.onChange)||i&&n.skipInitialOnChange||n.onChange(r),i=!1,r}return a.updateDeps=e=>{o=e},a}function en(e,t){if(void 0===e)throw new Error("Unexpected undefined");return e}const tn=(e,t,n)=>{let r;return function(...o){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,o),n)}},nn=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},rn=e=>e,on=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let o=t;o<=n;o++)r.push(o);return r},an=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const o=e=>{const{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(o(nn(n)),!r.ResizeObserver)return()=>{};const i=new r.ResizeObserver(t=>{const r=()=>{const e=t[0];if(null==e?void 0:e.borderBoxSize){const t=e.borderBoxSize[0];if(t)return void o({width:t.inlineSize,height:t.blockSize})}o(nn(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},sn={passive:!0},ln="undefined"==typeof window||"onscrollend"in window,cn=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let o=0;const i=e.options.useScrollendEvent&&ln?()=>{}:tn(r,()=>{t(o,!1)},e.options.isScrollingResetDelay),a=r=>()=>{const{horizontal:a,isRtl:s}=e.options;o=a?n.scrollLeft*(s?-1:1):n.scrollTop,i(),t(o,r)},s=a(!0),l=a(!1);n.addEventListener("scroll",s,sn);const c=e.options.useScrollendEvent&&ln;return c&&n.addEventListener("scrollend",l,sn),()=>{n.removeEventListener("scroll",s),c&&n.removeEventListener("scrollend",l)}},un=(e,t,n)=>{if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e){return Math.round(e[n.options.horizontal?"inlineSize":"blockSize"])}}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},dn=(e,{adjustments:t=0,behavior:n},r)=>{var o,i;const a=e+t;null==(i=null==(o=r.scrollElement)?void 0:o.scrollTo)||i.call(o,{[r.options.horizontal?"left":"top"]:a,behavior:n})};class fn{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{const t=()=>{this._measureElement(e.target,e)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}):null);return{disconnect:()=>{var n;null==(n=t())||n.disconnect(),e=null},observe:e=>{var n;return null==(n=t())?void 0:n.observe(e,{box:"border-box"})},unobserve:e=>{var n;return null==(n=t())?void 0:n.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,n])=>{void 0===n&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:rn,rangeExtractor:on,onChange:()=>{},measureElement:un,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,n;null==(n=(t=this.options).onChange)||n.call(t,this,e)},this.maybeNotify=Xt(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{const n=new Map,r=new Map;for(let o=t-1;o>=0;o--){const t=e[o];if(n.has(t.lane))continue;const i=r.get(t.lane);if(null==i||t.end>i.end?r.set(t.lane,t):t.end<i.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=Xt(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(e,t,n,r,o,i)=>(void 0!==this.prevLanes&&this.prevLanes!==i&&(this.lanesChangedFlag=!0),this.prevLanes=i,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:o,lanes:i}),{key:!1}),this.getMeasurements=Xt(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:o,lanes:i},a)=>{if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(const u of this.laneAssignments.keys())u>=e&&this.laneAssignments.delete(u);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),0!==this.measurementsCache.length||this.lanesSettling||(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));const s=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);const l=this.measurementsCache.slice(0,s),c=new Array(i).fill(void 0);for(let u=0;u<s;u++){const e=l[u];e&&(c[e.lane]=u)}for(let u=s;u<e;u++){const e=r(u),o=this.laneAssignments.get(u);let i,s;if(void 0!==o&&this.options.lanes>1){i=o;const e=c[i],r=void 0!==e?l[e]:void 0;s=r?r.end+this.options.gap:t+n}else{const e=1===this.options.lanes?l[u-1]:this.getFurthestMeasurement(l,u);s=e?e.end+this.options.gap:t+n,i=e?e.lane:u%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(u,i)}const d=a.get(e),f="number"==typeof d?d:this.options.estimateSize(u),p=s+f;l[u]={index:u,start:s,size:f,end:p,key:e,lane:i},c[i]=u}return this.measurementsCache=l,l},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Xt(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>this.range=e.length>0&&t>0?function({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){const o=e.length-1,i=t=>e[t].start;if(e.length<=r)return{startIndex:0,endIndex:o};let a=pn(0,o,i,n),s=a;if(1===r)for(;s<o&&e[s].end<n+t;)s++;else if(r>1){const i=Array(r).fill(0);for(;s<o&&i.some(e=>e<n+t);){const t=e[s];i[t.lane]=t.end,s++}const l=Array(r).fill(n+t);for(;a>=0&&l.some(e=>e>=n);){const t=e[a];l[t.lane]=t.start,a--}a=Math.max(0,a-a%r),s=Math.min(o,s+(r-1-s%r))}return{startIndex:a,endIndex:s}}({measurements:e,outerSize:t,scrollOffset:n,lanes:r}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Xt(()=>{let e=null,t=null;const n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,o)=>null===r||null===o?[]:e({startIndex:r,endIndex:o,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{const n=this.indexFromElement(e),r=this.measurementsCache[n];if(!r)return;const o=r.key,i=this.elementsCache.get(o);i!==e&&(i&&this.observer.unobserve(i),this.observer.observe(e),this.elementsCache.set(o,e)),e.isConnected&&this.resizeItem(n,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{const n=this.measurementsCache[e];if(!n)return;const r=t-(this.itemSizeCache.get(n.key)??n.size);0!==r&&((void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(n,r,this):n.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,t)),this.notify(!1))},this.measureElement=e=>{e?this._measureElement(e,void 0):this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))})},this.getVirtualItems=Xt(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{const n=[];for(let r=0,o=e.length;r<o;r++){const o=t[e[r]];n.push(o)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements();if(0!==t.length)return en(t[pn(0,t.length-1,e=>en(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;const r=this.getSize(),o=this.getScrollOffset();"auto"===t&&(t=e>=o+r?"end":"start"),"center"===t?e+=(n-r)/2:"end"===t&&(e-=r);const i=this.getMaxScrollOffset();return Math.max(Math.min(i,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const n=this.measurementsCache[e];if(!n)return;const r=this.getSize(),o=this.getScrollOffset();if("auto"===t)if(n.end>=o+r-this.options.scrollPaddingEnd)t="end";else{if(!(n.start<=o+this.options.scrollPaddingStart))return[o,t];t="start"}if("end"===t&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];const i="end"===t?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,t,n.size),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(e,{align:t="start",behavior:n}={})=>{"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:n})},this.scrollToIndex=(e,{align:t="auto",behavior:n}={})=>{"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),e=Math.max(0,Math.min(e,this.options.count-1)),this.currentScrollToIndex=e;let r=0;const o=t=>{if(!this.targetWindow)return;const r=this.getOffsetForIndex(e,t);if(!r)return void console.warn("Failed to get offset for index:",e);const[o,a]=r;this._scrollToOffset(o,{adjustments:void 0,behavior:n}),this.targetWindow.requestAnimationFrame(()=>{const t=()=>{if(this.currentScrollToIndex!==e)return;const t=this.getScrollOffset(),n=this.getOffsetForIndex(e,a);var r,o;n?(r=n[0],o=t,Math.abs(r-o)<1.01||i(a)):console.warn("Failed to get offset for index:",e)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(t):t()})},i=t=>{this.targetWindow&&this.currentScrollToIndex===e&&(r++,r<10?this.targetWindow.requestAnimationFrame(()=>o(t)):console.warn(`Failed to scroll to index ${e} after 10 attempts.`))};o(t)},this.scrollBy=(e,{behavior:t}={})=>{"smooth"===t&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:t})},this.getTotalSize=()=>{var e;const t=this.getMeasurements();let n;if(0===t.length)n=this.options.paddingStart;else if(1===this.options.lanes)n=(null==(e=t[t.length-1])?void 0:e.end)??0;else{const e=Array(this.options.lanes).fill(null);let r=t.length-1;for(;r>=0&&e.some(e=>null===e);){const n=t[r];null===e[n.lane]&&(e[n.lane]=n.end),r--}n=Math.max(...e.filter(e=>null!==e))}return Math.max(n-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}}const pn=(e,t,n,r)=>{for(;e<=t;){const o=(e+t)/2|0,i=n(o);if(i<r)e=o+1;else{if(!(i>r))return o;t=o-1}}return e>0?e-1:0};const hn="undefined"!=typeof document?E.useLayoutEffect:E.useEffect;function mn(e){return function({useFlushSync:e=!0,...t}){const n=E.useReducer(()=>({}),{})[1],r={...t,onChange:(r,o)=>{var i;e&&o?Jt.flushSync(n):n(),null==(i=t.onChange)||i.call(t,r,o)}},[o]=E.useState(()=>new fn(r));return o.setOptions(r),hn(()=>o._didMount(),[]),hn(()=>o._willUpdate()),o}({observeElementRect:an,observeElementOffset:cn,scrollToFn:dn,...e})}function gn(){}function yn(){}const bn=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,vn=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wn={};function kn(e,t){return(wn.jsx?vn:bn).test(e)}const xn=/[ \t\n\f\r]/g;function Sn(e){return""===e.replace(xn,"")}class _n{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function En(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new _n(n,r,t)}function Cn(e){return e.toLowerCase()}_n.prototype.normal={},_n.prototype.property={},_n.prototype.space=void 0;class zn{constructor(e,t){this.attribute=t,this.property=e}}zn.prototype.attribute="",zn.prototype.booleanish=!1,zn.prototype.boolean=!1,zn.prototype.commaOrSpaceSeparated=!1,zn.prototype.commaSeparated=!1,zn.prototype.defined=!1,zn.prototype.mustUseProperty=!1,zn.prototype.number=!1,zn.prototype.overloadedBoolean=!1,zn.prototype.property="",zn.prototype.spaceSeparated=!1,zn.prototype.space=void 0;let An=0;const Nn=Fn(),Tn=Fn(),On=Fn(),Pn=Fn(),In=Fn(),Mn=Fn(),jn=Fn();function Fn(){return 2**++An}const Ln=Object.freeze(Object.defineProperty({__proto__:null,boolean:Nn,booleanish:Tn,commaOrSpaceSeparated:jn,commaSeparated:Mn,number:Pn,overloadedBoolean:On,spaceSeparated:In},Symbol.toStringTag,{value:"Module"})),Dn=Object.keys(Ln);class Rn extends zn{constructor(e,t,n,r){let o=-1;if(super(e,t),Un(this,"space",r),"number"==typeof n)for(;++o<Dn.length;){const e=Dn[o];Un(this,Dn[o],(n&Ln[e])===Ln[e])}}}function Un(e,t,n){n&&(e[t]=n)}function Bn(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const i=new Rn(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Cn(r)]=r,n[Cn(i.attribute)]=r}return new _n(t,n,e.space)}Rn.prototype.defined=!0;const $n=Bn({properties:{ariaActiveDescendant:null,ariaAtomic:Tn,ariaAutoComplete:null,ariaBusy:Tn,ariaChecked:Tn,ariaColCount:Pn,ariaColIndex:Pn,ariaColSpan:Pn,ariaControls:In,ariaCurrent:null,ariaDescribedBy:In,ariaDetails:null,ariaDisabled:Tn,ariaDropEffect:In,ariaErrorMessage:null,ariaExpanded:Tn,ariaFlowTo:In,ariaGrabbed:Tn,ariaHasPopup:null,ariaHidden:Tn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:In,ariaLevel:Pn,ariaLive:null,ariaModal:Tn,ariaMultiLine:Tn,ariaMultiSelectable:Tn,ariaOrientation:null,ariaOwns:In,ariaPlaceholder:null,ariaPosInSet:Pn,ariaPressed:Tn,ariaReadOnly:Tn,ariaRelevant:null,ariaRequired:Tn,ariaRoleDescription:In,ariaRowCount:Pn,ariaRowIndex:Pn,ariaRowSpan:Pn,ariaSelected:Tn,ariaSetSize:Pn,ariaSort:null,ariaValueMax:Pn,ariaValueMin:Pn,ariaValueNow:Pn,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function Hn(e,t){return t in e?e[t]:t}function Vn(e,t){return Hn(e,t.toLowerCase())}const qn=Bn({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Mn,acceptCharset:In,accessKey:In,action:null,allow:null,allowFullScreen:Nn,allowPaymentRequest:Nn,allowUserMedia:Nn,alt:null,as:null,async:Nn,autoCapitalize:null,autoComplete:In,autoFocus:Nn,autoPlay:Nn,blocking:In,capture:null,charSet:null,checked:Nn,cite:null,className:In,cols:Pn,colSpan:null,content:null,contentEditable:Tn,controls:Nn,controlsList:In,coords:Pn|Mn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Nn,defer:Nn,dir:null,dirName:null,disabled:Nn,download:On,draggable:Tn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Nn,formTarget:null,headers:In,height:Pn,hidden:On,high:Pn,href:null,hrefLang:null,htmlFor:In,httpEquiv:In,id:null,imageSizes:null,imageSrcSet:null,inert:Nn,inputMode:null,integrity:null,is:null,isMap:Nn,itemId:null,itemProp:In,itemRef:In,itemScope:Nn,itemType:In,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Nn,low:Pn,manifest:null,max:null,maxLength:Pn,media:null,method:null,min:null,minLength:Pn,multiple:Nn,muted:Nn,name:null,nonce:null,noModule:Nn,noValidate:Nn,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Nn,optimum:Pn,pattern:null,ping:In,placeholder:null,playsInline:Nn,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Nn,referrerPolicy:null,rel:In,required:Nn,reversed:Nn,rows:Pn,rowSpan:Pn,sandbox:In,scope:null,scoped:Nn,seamless:Nn,selected:Nn,shadowRootClonable:Nn,shadowRootDelegatesFocus:Nn,shadowRootMode:null,shape:null,size:Pn,sizes:null,slot:null,span:Pn,spellCheck:Tn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Pn,step:null,style:null,tabIndex:Pn,target:null,title:null,translate:null,type:null,typeMustMatch:Nn,useMap:null,value:Tn,width:Pn,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:In,axis:null,background:null,bgColor:null,border:Pn,borderColor:null,bottomMargin:Pn,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Nn,declare:Nn,event:null,face:null,frame:null,frameBorder:null,hSpace:Pn,leftMargin:Pn,link:null,longDesc:null,lowSrc:null,marginHeight:Pn,marginWidth:Pn,noResize:Nn,noHref:Nn,noShade:Nn,noWrap:Nn,object:null,profile:null,prompt:null,rev:null,rightMargin:Pn,rules:null,scheme:null,scrolling:Tn,standby:null,summary:null,text:null,topMargin:Pn,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Pn,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Nn,disableRemotePlayback:Nn,prefix:null,property:null,results:Pn,security:null,unselectable:null},space:"html",transform:Vn}),Wn=Bn({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:jn,accentHeight:Pn,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Pn,amplitude:Pn,arabicForm:null,ascent:Pn,attributeName:null,attributeType:null,azimuth:Pn,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Pn,by:null,calcMode:null,capHeight:Pn,className:In,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Pn,diffuseConstant:Pn,direction:null,display:null,dur:null,divisor:Pn,dominantBaseline:null,download:Nn,dx:null,dy:null,edgeMode:null,editable:null,elevation:Pn,enableBackground:null,end:null,event:null,exponent:Pn,externalResourcesRequired:null,fill:null,fillOpacity:Pn,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Mn,g2:Mn,glyphName:Mn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Pn,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Pn,horizOriginX:Pn,horizOriginY:Pn,id:null,ideographic:Pn,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Pn,k:Pn,k1:Pn,k2:Pn,k3:Pn,k4:Pn,kernelMatrix:jn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Pn,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Pn,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Pn,overlineThickness:Pn,paintOrder:null,panose1:null,path:null,pathLength:Pn,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:In,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Pn,pointsAtY:Pn,pointsAtZ:Pn,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:jn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:jn,rev:jn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:jn,requiredFeatures:jn,requiredFonts:jn,requiredFormats:jn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Pn,specularExponent:Pn,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Pn,strikethroughThickness:Pn,string:null,stroke:null,strokeDashArray:jn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Pn,strokeOpacity:Pn,strokeWidth:null,style:null,surfaceScale:Pn,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:jn,tabIndex:Pn,tableValues:null,target:null,targetX:Pn,targetY:Pn,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:jn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Pn,underlineThickness:Pn,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Pn,values:null,vAlphabetic:Pn,vMathematical:Pn,vectorEffect:null,vHanging:Pn,vIdeographic:Pn,version:null,vertAdvY:Pn,vertOriginX:Pn,vertOriginY:Pn,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Pn,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Hn}),Zn=Bn({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),Qn=Bn({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Vn}),Kn=Bn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),Gn={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Yn=/[A-Z]/g,Jn=/-[a-z]/g,Xn=/^data[-\w.:]+$/i;function er(e){return"-"+e.toLowerCase()}function tr(e){return e.charAt(1).toUpperCase()}const nr=En([$n,qn,Zn,Qn,Kn],"html"),rr=En([$n,Wn,Zn,Qn,Kn],"svg");var or,ir,ar,sr={};function lr(){if(ar)return sr;ar=1;var e=sr&&sr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(sr,"__esModule",{value:!0}),sr.default=function(e,n){let r=null;if(!e||"string"!=typeof e)return r;const o=(0,t.default)(e),i="function"==typeof n;return o.forEach(e=>{if("declaration"!==e.type)return;const{property:t,value:o}=e;i?n(t,o,e):o&&(r=r||{},r[t]=o)}),r};const t=e(function(){if(ir)return or;ir=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,l="";function c(e){return e?e.replace(s,l):l}return or=function(s,u){if("string"!=typeof s)throw new TypeError("First argument must be a string");if(!s)return[];u=u||{};var d=1,f=1;function p(e){var n=e.match(t);n&&(d+=n.length);var r=e.lastIndexOf("\n");f=~r?e.length-r:f+e.length}function h(){var e={line:d,column:f};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:f},this.source=u.source}function g(e){var t=new Error(u.source+":"+d+":"+f+": "+e);if(t.reason=e,t.filename=u.source,t.line=d,t.column=f,t.source=s,!u.silent)throw t}function y(e){var t=e.exec(s);if(t){var n=t[0];return p(n),s=s.slice(n.length),t}}function b(){y(n)}function v(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var e=h();if("/"==s.charAt(0)&&"*"==s.charAt(1)){for(var t=2;l!=s.charAt(t)&&("*"!=s.charAt(t)||"/"!=s.charAt(t+1));)++t;if(t+=2,l===s.charAt(t-1))return g("End of comment missing");var n=s.slice(2,t-2);return f+=2,p(n),s=s.slice(t),f+=2,e({type:"comment",comment:n})}}function k(){var t=h(),n=y(r);if(n){if(w(),!y(o))return g("property missing ':'");var s=y(i),u=t({type:"declaration",property:c(n[0].replace(e,l)),value:s?c(s[0].replace(e,l)):l});return y(a),u}}return m.prototype.content=s,b(),function(){var e,t=[];for(v(t);e=k();)!1!==e&&(t.push(e),v(t));return t}()}}());return sr}var cr,ur,dr,fr={};function pr(){if(cr)return fr;cr=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,i=function(e,t){return t.toUpperCase()},a=function(e,t){return"".concat(t,"-")};return fr.camelCase=function(s,l){return void 0===l&&(l={}),function(t){return!t||n.test(t)||e.test(t)}(s)?s:(s=s.toLowerCase(),(s=l.reactCompat?s.replace(o,a):s.replace(r,a)).replace(t,i))},fr}const hr=t(function(){if(dr)return ur;dr=1;var e=(ur&&ur.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(lr()),t=pr();function n(n,r){var o={};return n&&"string"==typeof n?((0,e.default)(n,function(e,n){e&&n&&(o[(0,t.camelCase)(e,r)]=n)}),o):o}return n.default=n,ur=n}()),mr=yr("end"),gr=yr("start");function yr(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function br(e){const t=gr(e),n=mr(e);if(t&&n)return{start:t,end:n}}function vr(e){return e&&"object"==typeof e?"position"in e||"type"in e?kr(e.position):"start"in e||"end"in e?kr(e):"line"in e||"column"in e?wr(e):"":""}function wr(e){return xr(e&&e.line)+":"+xr(e&&e.column)}function kr(e){return wr(e&&e.start)+"-"+wr(e&&e.end)}function xr(e){return e&&"number"==typeof e?e:1}class Sr extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",o={},i=!1;if(t&&(o="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!o.cause&&e&&(i=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?o.ruleId=n:(o.source=n.slice(0,e),o.ruleId=n.slice(e+1))}if(!o.place&&o.ancestors&&o.ancestors){const e=o.ancestors[o.ancestors.length-1];e&&(o.place=e.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=a?a.line:void 0,this.name=vr(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=i&&o.cause&&"string"==typeof o.cause.stack?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Sr.prototype.file="",Sr.prototype.name="",Sr.prototype.reason="",Sr.prototype.message="",Sr.prototype.stack="",Sr.prototype.column=void 0,Sr.prototype.line=void 0,Sr.prototype.ancestors=void 0,Sr.prototype.cause=void 0,Sr.prototype.fatal=void 0,Sr.prototype.place=void 0,Sr.prototype.ruleId=void 0,Sr.prototype.source=void 0;const _r={}.hasOwnProperty,Er=new Map,Cr=/[A-Z]/g,zr=new Set(["table","tbody","thead","tfoot","tr"]),Ar=new Set(["td","th"]),Nr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Tr(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,o,i){const a=Array.isArray(o.children),s=gr(n);return t(r,o,i,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,o,i){const a=Array.isArray(o.children)?n:t;return i?a(r,o,i):a(r,o)}}(0,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?rr:nr,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},i=Or(o,e,void 0);return i&&"string"!=typeof i?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function Or(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(o=rr,e.schema=o);e.ancestors.push(t);const i=Fr(e,t.tagName,!1),a=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&_r.call(t.properties,o)){const i=jr(e,o,t.properties[o]);if(i){const[o,a]=i;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof a&&Ar.has(t.tagName)?r=a:n[o]=a}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let s=Mr(e,t);zr.has(t.tagName)&&(s=s.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&Sn(t.value):Sn(t));var t}));return Pr(e,a,i,t),Ir(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Lr(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.name&&"html"===r.space&&(o=rr,e.schema=o);e.ancestors.push(t);const i=null===t.name?e.Fragment:Fr(e,t.name,!0),a=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];gn(t.type);const o=t.expression;gn(o.type);const i=o.properties[0];gn(i.type),Object.assign(n,e.evaluater.evaluateExpression(i.argument))}else Lr(e,t.position);else{const o=r.name;let i;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];gn(t.type),i=e.evaluater.evaluateExpression(t.expression)}else Lr(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(e,t),s=Mr(e,t);return Pr(e,a,i,t),Ir(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Lr(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return Ir(r,Mr(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function Pr(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ir(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Mr(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Er;for(;++r<t.children.length;){const i=t.children[r];let a;if(e.passKeys){const e="element"===i.type?i.tagName:"mdxJsxFlowElement"===i.type||"mdxJsxTextElement"===i.type?i.name:void 0;if(e){const t=o.get(e)||0;a=e+"-"+t,o.set(e,t+1)}}const s=Or(e,i,a);void 0!==s&&n.push(s)}return n}function jr(e,t,n){const r=function(e,t){const n=Cn(t);let r=t,o=zn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&Xn.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Jn,tr);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Jn.test(e)){let n=e.replace(Yn,er);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=Rn}return new o(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return hr(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const t=n,r=new Sr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:t,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Nr+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)_r.call(e,n)&&(t[Dr(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?Gn[r.property]||r.property:r.attribute,n]}}function Fr(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=kn(e[o])?{type:"Identifier",name:e[o]}:{type:"Literal",value:e[o]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(o&&"Literal"===t.type),optional:!1}:t}r=n}else r=kn(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return _r.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Lr(e)}function Lr(e,t){const n=new Sr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Nr+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Dr(e){let t=e.replace(Cr,Rr);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function Rr(e){return"-"+e.toLowerCase()}const Ur={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Br={};function $r(e,t){return Hr(e,"boolean"!=typeof Br.includeImageAlt||Br.includeImageAlt,"boolean"!=typeof Br.includeHtml||Br.includeHtml)}function Hr(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Vr(e.children,t,n)}return Array.isArray(e)?Vr(e,t,n):""}function Vr(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Hr(e[o],t,n);return r.join("")}const qr=document.createElement("i");function Wr(e){const t="&"+e+";";qr.innerHTML=t;const n=qr.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function Zr(e,t,n,r){const o=e.length;let i,a=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);a<r.length;)i=r.slice(a,a+1e4),i.unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function Qr(e,t){return e.length>0?(Zr(e,e.length,0,t),e):t}const Kr={}.hasOwnProperty;function Gr(e){const t={};let n=-1;for(;++n<e.length;)Yr(t,e[n]);return t}function Yr(e,t){let n;for(n in t){const r=(Kr.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){Kr.call(r,i)||(r[i]=[]);const e=o[i];Jr(r[i],Array.isArray(e)?e:e?[e]:[])}}}function Jr(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);Zr(e,0,0,r)}function Xr(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function eo(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const to=ho(/[A-Za-z]/),no=ho(/[\dA-Za-z]/),ro=ho(/[#-'*+\--9=?A-Z^-~]/);function oo(e){return null!==e&&(e<32||127===e)}const io=ho(/\d/),ao=ho(/[\dA-Fa-f]/),so=ho(/[!-/:-@[-`{-~]/);function lo(e){return null!==e&&e<-2}function co(e){return null!==e&&(e<0||32===e)}function uo(e){return-2===e||-1===e||32===e}const fo=ho(new RegExp("\\p{P}|\\p{S}","u")),po=ho(/\s/);function ho(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function mo(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(37===i&&no(e.charCodeAt(n+1))&&no(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const t=e.charCodeAt(n+1);i<56320&&t>56319&&t<57344?(a=String.fromCharCode(i,t),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function go(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){if(uo(r))return e.enter(n),a(r);return t(r)};function a(r){return uo(r)&&i++<o?(e.consume(r),a):(e.exit(n),t(r))}}const yo={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),go(e,t,"linePrefix")},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):lo(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const bo={tokenize:function(e){const t=this,n=[];let r,o,i,a=0;return s;function s(r){if(a<n.length){const o=n[a];return t.containerState=o[1],e.attempt(o[0].continuation,l,c)(r)}return c(r)}function l(e){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&b();const n=t.events.length;let o,i=n;for(;i--;)if("exit"===t.events[i][0]&&"chunkFlow"===t.events[i][1].type){o=t.events[i][1].end;break}y(a);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return Zr(t.events,i+1,0,t.events.slice(n)),t.events.length=s,c(e)}return s(e)}function c(o){if(a===n.length){if(!r)return f(o);if(r.currentConstruct&&r.currentConstruct.concrete)return h(o);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(vo,u,d)(o)}function u(e){return r&&b(),y(a),f(e)}function d(e){return t.parser.lazy[t.now().line]=a!==n.length,i=t.now().offset,h(e)}function f(n){return t.containerState={},e.attempt(vo,p,h)(n)}function p(e){return a++,n.push([t.currentConstruct,t.containerState]),f(e)}function h(n){return null===n?(r&&b(),y(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),y(0),void e.consume(n)):lo(n)?(e.consume(n),g(e.exit("chunkFlow")),a=0,t.interrupt=void 0,s):(e.consume(n),m)}function g(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<i&&(!r.events[e][1].end||r.events[e][1].end.offset>i))return;const n=t.events.length;let o,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(o){s=t.events[l][1].end;break}o=!0}for(y(a),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;Zr(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function y(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function b(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},vo={tokenize:function(e,t,n){return go(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function wo(e){return null===e||co(e)||po(e)?1:fo(e)?2:void 0}function ko(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const xo={name:"attention",resolveAll:function(e,t){let n,r,o,i,a,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[n][1].end},f={...e[u][1].start};So(d,-s),So(f,s),i={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:f},o={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:s>1?"strong":"emphasis",start:{...i.start},end:{...a.end}},e[n][1].end={...i.start},e[u][1].start={...a.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=Qr(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=Qr(l,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),l=Qr(l,ko(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=Qr(l,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=Qr(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,Zr(e,n-1,u-n+3,l),u=n+l.length-c-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=wo(r);let i;return function(t){return i=t,e.enter("attentionSequence"),a(t)};function a(s){if(s===i)return e.consume(s),a;const l=e.exit("attentionSequence"),c=wo(s),u=!c||2===c&&o||n.includes(s),d=!o||2===o&&c||n.includes(r);return l._open=Boolean(42===i?u:u&&(o||!d)),l._close=Boolean(42===i?d:d&&(c||!u)),t(s)}}};function So(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const _o={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(t){return to(t)?(e.consume(t),i):64===t?n(t):l(t)}function i(e){return 43===e||45===e||46===e||no(e)?(r=1,a(e)):l(e)}function a(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||no(t))&&r++<32?(e.consume(t),a):(r=0,l(t))}function s(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||oo(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):ro(t)?(e.consume(t),l):n(t)}function c(e){return no(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||no(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const Eo={partial:!0,tokenize:function(e,t,n){return function(t){return uo(t)?go(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||lo(e)?t(e):n(e)}}};const Co={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(uo(t))return go(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return o(t)};function o(r){return e.attempt(Co,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o}return n(t)};function o(n){return uo(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const zo={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return so(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const Ao={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,i,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),o=31,i=no,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=ao,c):(e.enter("characterReferenceValue"),o=7,i=io,c(t))}function c(s){if(59===s&&a){const o=e.exit("characterReferenceValue");return i!==no||Wr(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return i(s)&&a++<o?(e.consume(s),c):n(s)}}};const No={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},To={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return a;function a(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),uo(t)?go(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===i?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===i?(o++,e.consume(t),u):o>=s?(e.exit("codeFencedFenceSequence"),uo(t)?go(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||lo(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let i,a=0,s=0;return function(t){return function(t){const n=r.events[r.events.length-1];return a=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,i=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===i?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),uo(t)?go(e,c,"whitespace")(t):c(t))}function c(n){return null===n||lo(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(No,p,b)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||lo(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):uo(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),go(e,d,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),u)}function d(t){return null===t||lo(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),f(t))}function f(t){return null===t||lo(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===i?n(t):(e.consume(t),f)}function p(t){return e.attempt(o,b,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return a>0&&uo(t)?go(e,g,"linePrefix",a+1)(t):g(t)}function g(t){return null===t||lo(t)?e.check(No,p,b)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||lo(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function b(n){return e.exit("codeFenced"),t(n)}}};const Oo={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),go(e,o,"linePrefix",5)(t)};function o(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?i(e):n(e)}function i(t){return null===t?s(t):lo(t)?e.attempt(Po,i,s)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||lo(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),a)}function s(n){return e.exit("codeIndented"),t(n)}}},Po={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):lo(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):go(e,i,"linePrefix",5)(t)}function i(e){const i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(e):lo(e)?o(e):n(e)}}};const Io={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}t=o-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,o,i=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),a(t)};function a(t){return 96===t?(e.consume(t),i++,a):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(o=e.enter("codeTextSequence"),r=0,c(t)):lo(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||lo(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",l(n))}}};class Mo{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&jo(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),jo(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),jo(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);jo(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);jo(this.left,t.reverse())}}}function jo(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Fo(e){const t={};let n,r,o,i,a,s,l,c=-1;const u=new Mo(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=n[1]._tokenizer.events,o=0,o<s.length&&"lineEndingBlank"===s[o][1].type&&(o+=2),o<s.length&&"content"===s[o][1].type))for(;++o<s.length&&"content"!==s[o][1].type;)"chunkText"===s[o][1].type&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,Lo(u,c)),c=t[c],l=!0);else if(n[1]._container){for(o=c,r=void 0;o--;)if(i=u.get(o),"lineEnding"===i[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),i[1].type="lineEnding",r=o);else if("linePrefix"!==i[1].type&&"listItemIndent"!==i[1].type)break;r&&(n[1].end={...u.get(r)[1].start},a=u.slice(r,c),a.unshift(n),u.splice(r,c-r+1,a))}}return Zr(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function Lo(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const s=a.events,l=[],c={};let u,d,f=-1,p=n,h=0,m=0;const g=[m];for(;p;){for(;e.get(++o)[1]!==p;);i.push(o),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)"exit"===s[f][0]&&"enter"===s[f-1][0]&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(m=f+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){const t=s.slice(g[f],g[f+1]),n=i.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),f=-1;++f<l.length;)c[h+l[f][0]]=h+l[f][1],h+=l[f][1]-l[f][0]-1;return c}const Do={resolve:function(e){return Fo(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?o(t):lo(t)?e.check(Ro,i,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function i(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},Ro={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),go(e,o,"linePrefix")};function o(o){if(null===o||lo(o))return n(o);const i=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}};function Uo(e,t,n,r,o,i,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(o),e.enter(i),e.consume(t),e.exit(i),d;if(null===t||32===t||41===t||oo(t))return n(t);return e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(t)};function d(n){return 62===n?(e.enter(i),e.consume(n),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),f(n))}function f(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||lo(t)?n(t):(e.consume(t),92===t?p:f)}function p(t){return 60===t||62===t||92===t?(e.consume(t),f):f(t)}function h(o){return u||null!==o&&41!==o&&!co(o)?u<c&&40===o?(e.consume(o),u++,h):41===o?(e.consume(o),u--,h):null===o||32===o||40===o||oo(o)?n(o):(e.consume(o),92===o?m:h):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(o))}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function Bo(e,t,n,r,o,i){const a=this;let s,l=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(i),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):93===d?(e.exit(i),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):lo(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||lo(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!uo(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function $o(e,t,n,r,o,i){let a;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(o),e.consume(t),e.exit(o),a=40===t?41:t,s;return n(t)};function s(n){return n===a?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),l(n))}function l(t){return t===a?(e.exit(i),s(a)):null===t?n(t):lo(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),go(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===a||null===t||lo(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===a||92===t?(e.consume(t),c):c(t)}}function Ho(e,t){let n;return function r(o){if(lo(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if(uo(o))return go(e,r,n?"linePrefix":"lineSuffix")(o);return t(o)}}const Vo={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return Bo.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=eo(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a):n(t)}function a(t){return co(t)?Ho(e,s)(t):s(t)}function s(t){return Uo(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(qo,c,c)(t)}function c(t){return uo(t)?go(e,u,"whitespace")(t):u(t)}function u(i){return null===i||lo(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},qo={partial:!0,tokenize:function(e,t,n){return function(t){return co(t)?Ho(e,r)(t):n(t)};function r(t){return $o(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return uo(t)?go(e,i,"whitespace")(t):i(t)}function i(e){return null===e||lo(e)?t(e):n(e)}}};const Wo={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return lo(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const Zo={name:"headingAtx",resolve:function(e,t){let n,r,o=e.length-2,i=3;"whitespace"===e[i][1].type&&(i+=2);o-2>i&&"whitespace"===e[o][1].type&&(o-=2);"atxHeadingSequence"===e[o][1].type&&(i===o-1||o-4>i&&"whitespace"===e[o-2][1].type)&&(o-=i+1===o?2:4);o>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[o][1].end},r={type:"chunkText",start:e[i][1].start,end:e[o][1].end,contentType:"text"},Zr(e,i,o-i+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),o(t)}(t)};function o(t){return 35===t&&r++<6?(e.consume(t),o):null===t||co(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||lo(n)?(e.exit("atxHeading"),t(n)):uo(n)?go(e,i,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),i(t))}function s(t){return null===t||35===t||co(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),s)}}};const Qo=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Ko=["pre","script","style","textarea"],Go={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let o,i,a,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),i=!0,p):63===s?(e.consume(s),o=3,r.interrupt?t:M):to(s)?(e.consume(s),a=String.fromCharCode(s),h):n(s)}function u(i){return 45===i?(e.consume(i),o=2,d):91===i?(e.consume(i),o=5,s=0,f):to(i)?(e.consume(i),o=4,r.interrupt?t:M):n(i)}function d(o){return 45===o?(e.consume(o),r.interrupt?t:M):n(o)}function f(o){const i="CDATA[";return o===i.charCodeAt(s++)?(e.consume(o),6===s?r.interrupt?t:C:f):n(o)}function p(t){return to(t)?(e.consume(t),a=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||co(s)){const l=47===s,c=a.toLowerCase();return l||i||!Ko.includes(c)?Qo.includes(a.toLowerCase())?(o=6,l?(e.consume(s),m):r.interrupt?t(s):C(s)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):i?g(s):y(s)):(o=1,r.interrupt?t(s):C(s))}return 45===s||no(s)?(e.consume(s),a+=String.fromCharCode(s),h):n(s)}function m(o){return 62===o?(e.consume(o),r.interrupt?t:C):n(o)}function g(t){return uo(t)?(e.consume(t),g):_(t)}function y(t){return 47===t?(e.consume(t),_):58===t||95===t||to(t)?(e.consume(t),b):uo(t)?(e.consume(t),y):_(t)}function b(t){return 45===t||46===t||58===t||95===t||no(t)?(e.consume(t),b):v(t)}function v(t){return 61===t?(e.consume(t),w):uo(t)?(e.consume(t),v):y(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,k):uo(t)?(e.consume(t),w):x(t)}function k(t){return t===l?(e.consume(t),l=null,S):null===t||lo(t)?n(t):(e.consume(t),k)}function x(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||co(t)?v(t):(e.consume(t),x)}function S(e){return 47===e||62===e||uo(e)?y(e):n(e)}function _(t){return 62===t?(e.consume(t),E):n(t)}function E(t){return null===t||lo(t)?C(t):uo(t)?(e.consume(t),E):n(t)}function C(t){return 45===t&&2===o?(e.consume(t),T):60===t&&1===o?(e.consume(t),O):62===t&&4===o?(e.consume(t),j):63===t&&3===o?(e.consume(t),M):93===t&&5===o?(e.consume(t),I):!lo(t)||6!==o&&7!==o?null===t||lo(t)?(e.exit("htmlFlowData"),z(t)):(e.consume(t),C):(e.exit("htmlFlowData"),e.check(Yo,F,z)(t))}function z(t){return e.check(Jo,A,F)(t)}function A(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),N}function N(t){return null===t||lo(t)?z(t):(e.enter("htmlFlowData"),C(t))}function T(t){return 45===t?(e.consume(t),M):C(t)}function O(t){return 47===t?(e.consume(t),a="",P):C(t)}function P(t){if(62===t){const n=a.toLowerCase();return Ko.includes(n)?(e.consume(t),j):C(t)}return to(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),P):C(t)}function I(t){return 93===t?(e.consume(t),M):C(t)}function M(t){return 62===t?(e.consume(t),j):45===t&&2===o?(e.consume(t),M):C(t)}function j(t){return null===t||lo(t)?(e.exit("htmlFlowData"),F(t)):(e.consume(t),j)}function F(n){return e.exit("htmlFlow"),t(n)}}},Yo={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Eo,t,n)}}},Jo={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(lo(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o;return n(t)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const Xo={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,i,a;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),w):63===t?(e.consume(t),b):to(t)?(e.consume(t),S):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),i=0,p):to(t)?(e.consume(t),y):n(t)}function c(t){return 45===t?(e.consume(t),f):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):lo(t)?(a=u,P(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),f):u(t)}function f(e){return 62===e?O(e):45===e?d(e):u(e)}function p(t){const r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),6===i?h:p):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):lo(t)?(a=h,P(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?O(t):93===t?(e.consume(t),g):h(t)}function y(t){return null===t||62===t?O(t):lo(t)?(a=y,P(t)):(e.consume(t),y)}function b(t){return null===t?n(t):63===t?(e.consume(t),v):lo(t)?(a=b,P(t)):(e.consume(t),b)}function v(e){return 62===e?O(e):b(e)}function w(t){return to(t)?(e.consume(t),k):n(t)}function k(t){return 45===t||no(t)?(e.consume(t),k):x(t)}function x(t){return lo(t)?(a=x,P(t)):uo(t)?(e.consume(t),x):O(t)}function S(t){return 45===t||no(t)?(e.consume(t),S):47===t||62===t||co(t)?_(t):n(t)}function _(t){return 47===t?(e.consume(t),O):58===t||95===t||to(t)?(e.consume(t),E):lo(t)?(a=_,P(t)):uo(t)?(e.consume(t),_):O(t)}function E(t){return 45===t||46===t||58===t||95===t||no(t)?(e.consume(t),E):C(t)}function C(t){return 61===t?(e.consume(t),z):lo(t)?(a=C,P(t)):uo(t)?(e.consume(t),C):_(t)}function z(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,A):lo(t)?(a=z,P(t)):uo(t)?(e.consume(t),z):(e.consume(t),N)}function A(t){return t===o?(e.consume(t),o=void 0,T):null===t?n(t):lo(t)?(a=A,P(t)):(e.consume(t),A)}function N(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||co(t)?_(t):(e.consume(t),N)}function T(e){return 47===e||62===e||co(e)?_(e):n(e)}function O(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function P(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),I}function I(t){return uo(t)?go(e,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):M(t)}function M(t){return e.enter("htmlTextData"),a(t)}}};const ei={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&Zr(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,o,i,a=e.length,s=0;for(;a--;)if(n=e[a][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[a][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[a][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=a,"labelLink"!==n.type)){s=2;break}}else"labelEnd"===n.type&&(o=a);const l={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",l,t],["enter",c,t]],i=Qr(i,e.slice(r+1,r+s+3)),i=Qr(i,[["enter",u,t]]),i=Qr(i,ko(t.parser.constructs.insideSpan.null,e.slice(r+s+4,o-3),t)),i=Qr(i,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),i=Qr(i,e.slice(o+1)),i=Qr(i,[["exit",l,t]]),Zr(e,r,e.length,i),e},tokenize:function(e,t,n){const r=this;let o,i,a=r.events.length;for(;a--;)if(("labelImage"===r.events[a][1].type||"labelLink"===r.events[a][1].type)&&!r.events[a][1]._balanced){o=r.events[a][1];break}return function(t){if(!o)return n(t);if(o._inactive)return u(t);return i=r.parser.defined.includes(eo(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(t){return 40===t?e.attempt(ti,c,i?c:u)(t):91===t?e.attempt(ni,c,i?l:u)(t):i?c(t):u(t)}function l(t){return e.attempt(ri,c,u)(t)}function c(e){return t(e)}function u(e){return o._balanced=!0,n(e)}}},ti={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return co(t)?Ho(e,o)(t):o(t)}function o(t){return 41===t?c(t):Uo(e,i,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return co(t)?Ho(e,s)(t):c(t)}function a(e){return n(e)}function s(t){return 34===t||39===t||40===t?$o(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return co(t)?Ho(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},ni={tokenize:function(e,t,n){const r=this;return function(t){return Bo.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(eo(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},ri={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const oi={name:"labelStartImage",resolveAll:ei.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const ii={name:"labelStartLink",resolveAll:ei.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const ai={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),go(e,t,"linePrefix")}}};const si={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,i(e)}(t)};function i(i){return i===r?(e.enter("thematicBreakSequence"),a(i)):o>=3&&(null===i||lo(i))?(e.exit("thematicBreak"),t(i)):n(i)}function a(t){return t===r?(e.consume(t),o++,a):(e.exit("thematicBreakSequence"),uo(t)?go(e,i,"whitespace")(t):i(t))}}};const li={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Eo,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,go(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){if(r.containerState.furtherBlankLines||!uo(n))return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n);return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ui,t,o)(n)});function o(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,go(e,e.attempt(li,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,a=0;return function(t){const o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:io(t)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(si,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return io(t)&&++a<10?(e.consume(t),s):(!r.interrupt||a<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(Eo,r.interrupt?n:c,e.attempt(ci,d,u))}function c(e){return r.containerState.initialBlankLine=!0,i++,d(e)}function u(t){return uo(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},ci={partial:!0,tokenize:function(e,t,n){const r=this;return go(e,function(e){const o=r.events[r.events.length-1];return!uo(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},ui={partial:!0,tokenize:function(e,t,n){const r=this;return go(e,function(e){const o=r.events[r.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}};const di={name:"setextUnderline",resolveTo:function(e,t){let n,r,o,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){n=i;break}"paragraph"===e[i][1].type&&(r=i)}else"content"===e[i][1].type&&e.splice(i,1),o||"definition"!==e[i][1].type||(o=i);const a={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",a,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=a;return e.push(["exit",a,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(t){let a,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){a="paragraph"===r.events[s][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||a))return e.enter("setextHeadingLine"),o=t,function(t){return e.enter("setextHeadingLineSequence"),i(t)}(t);return n(t)};function i(t){return t===o?(e.consume(t),i):(e.exit("setextHeadingLineSequence"),uo(t)?go(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||lo(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const fi={tokenize:function(e){const t=this,n=e.attempt(Eo,function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n},e.attempt(this.parser.constructs.flowInitial,r,go(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Do,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const pi={resolveAll:yi()},hi=gi("string"),mi=gi("text");function gi(e){return{resolveAll:yi("text"===e?bi:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,a);return i;function i(e){return l(e)?o(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),o(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function yi(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):t[o]&&"data"===t[o][1].type||(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function bi(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],o=t.sliceStream(r);let i,a=o.length,s=-1,l=0;for(;a--;){const e=o[a];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)i=!0,l++;else if(-1!==e){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const o={type:n===e.length||i||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...o.start},r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}const vi={42:li,43:li,45:li,48:li,49:li,50:li,51:li,52:li,53:li,54:li,55:li,56:li,57:li,62:Co},wi={91:Vo},ki={[-2]:Oo,[-1]:Oo,32:Oo},xi={35:Zo,42:si,45:[di,si],60:Go,61:di,95:si,96:To,126:To},Si={38:Ao,92:zo},_i={[-5]:ai,[-4]:ai,[-3]:ai,33:oi,38:Ao,42:xo,60:[_o,Xo],91:ii,92:[Wo,zo],93:ei,95:xo,96:Io},Ei={null:[xo,pi]},Ci=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:wi,disable:{null:[]},document:vi,flow:xi,flowInitial:ki,insideSpan:Ei,string:Si,text:_i},Symbol.toStringTag,{value:"Module"}));function zi(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},i=[];let a=[],s=[];const l={attempt:g(function(e,t){y(e,t.from)}),check:g(m),consume:function(e){lo(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,b()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++));c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=f(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=f(),c.events.push(["exit",t,c]),t},interrupt:g(m,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){o[e.line]=e.column,b()},events:[],now:f,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let a;if("string"==typeof i)a=i;else switch(i){case-5:a="\r";break;case-4:a="\n";break;case-3:a="\r\n";break;case-2:a=t?" ":"\t";break;case-1:if(!t&&o)continue;a=" ";break;default:a=String.fromCharCode(i)}o=-2===i,r.push(a)}return r.join("")}(d(e),t)},sliceStream:d,write:function(e){if(a=Qr(a,e),p(),null!==a[a.length-1])return[];return y(t,0),c.events=ko(i,c.events,c),c.events}};let u=t.tokenize.call(c,l);return t.resolveAll&&i.push(t),c;function d(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const e=a[0];"string"==typeof e?a[0]=e.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}(a,e)}function f(){const{_bufferIndex:e,_index:t,line:n,column:o,offset:i}=r;return{_bufferIndex:e,_index:t,line:n,column:o,offset:i}}function p(){let e;for(;r._index<a.length;){const t=a[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)h(t.charCodeAt(r._bufferIndex));else h(t)}}function h(e){u=u(e)}function m(e,t){t.restore()}function g(e,t){return function(n,o,i){let a,u,d,p;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return h([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function h(e){return a=e,u=0,0===e.length?i:m(e[u])}function m(e){return function(n){p=function(){const e=f(),t=c.previous,n=c.currentConstruct,o=c.events.length,i=Array.from(s);return{from:o,restore:a};function a(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=o,s=i,b()}}(),d=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return y();return e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,g,y)(n)}}function g(t){return e(d,p),o}function y(e){return p.restore(),++u<a.length?m(a[u]):i}}}function y(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&Zr(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function b(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const Ai=/[\0\t\n\r]/g;const Ni=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ti(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return Xr(n.slice(t?2:1),t?16:10)}return Wr(n)||e}const Oi={}.hasOwnProperty;function Pi(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(te),autolinkProtocol:E,autolinkEmail:E,atxHeading:i(Y),blockQuote:i(W),characterEscape:E,characterReference:E,codeFenced:i(Z),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(Z,a),codeText:i(Q,a),codeTextData:E,data:E,codeFlowValue:E,definition:i(K),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(G),hardBreakEscape:i(J),hardBreakTrailing:i(J),htmlFlow:i(X,a),htmlFlowData:E,htmlText:i(X,a),htmlTextData:E,image:i(ee),label:a,link:i(te),listItem:i(re),listItemValue:f,listOrdered:i(ne,d),listUnordered:i(ne),paragraph:i(oe),reference:R,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(Y),strong:i(ie),thematicBreak:i(se)},exit:{atxHeading:l(),atxHeadingSequence:k,autolink:l(),autolinkEmail:q,autolinkProtocol:V,blockQuote:l(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:B,characterReferenceMarkerNumeric:B,characterReferenceValue:$,characterReference:H,codeFenced:l(g),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:C,codeIndented:l(y),codeText:l(O),codeTextData:C,data:C,definition:l(),definitionDestinationString:w,definitionLabelString:b,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(A),hardBreakTrailing:l(A),htmlFlow:l(N),htmlFlowData:C,htmlText:l(T),htmlTextData:C,image:l(I),label:j,labelText:M,lineEnding:z,link:l(P),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:U,resourceDestinationString:F,resourceTitleString:L,resource:D,setextHeading:l(_),setextHeadingLineSequence:S,setextHeadingText:x,strong:l(),thematicBreak:l()}};Mi(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const i={stack:[r],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:u,data:n},l=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])l.push(d);else{d=o(e,l.pop(),d)}for(d=-1;++d<e.length;){const n=t[e[d][0]];Oi.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},i),e[d][1])}if(i.tokenStack.length>0){const e=i.tokenStack[i.tokenStack.length-1];(e[1]||Fi).call(i,void 0,e[0])}for(r.position={start:Ii(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Ii(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function o(e,t,n){let r,o,i,a,s=t-1,l=-1,c=!1;for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,a=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||a||l||i||(i=s),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let a=s;for(o=void 0;a--;){const t=e[a];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",o=a}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}i&&(!o||i<o)&&(r._spread=!0),r.end=Object.assign({},o?e[o][1].start:t[1].end),e.splice(o||s,0,["exit",r,t[2]]),s++,n++}if("listItemPrefix"===t[1].type){const o={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=o,e.splice(s,0,["enter",o,t[2]]),s++,n++,i=void 0,a=!0}}}return e[t][1]._spread=c,n}function i(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Ii(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+vr({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||Fi).call(this,e,r[0])}n.position.end=Ii(e.end)}function u(){return $r(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function h(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function b(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=eo(this.sliceSerialize(e)).toLowerCase()}function v(){const e=this.resume();this.stack[this.stack.length-1].title=e}function w(){const e=this.resume();this.stack[this.stack.length-1].url=e}function k(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function x(){this.data.setextHeadingSlurpLineEnding=!0}function S(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=ae(),n.position={start:Ii(e.start),end:void 0},t.push(n)),this.stack.push(n)}function C(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Ii(e.end)}function z(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=Ii(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),C.call(this,e))}function A(){this.data.atHardBreak=!0}function N(){const e=this.resume();this.stack[this.stack.length-1].value=e}function T(){const e=this.resume();this.stack[this.stack.length-1].value=e}function O(){const e=this.resume();this.stack[this.stack.length-1].value=e}function P(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function I(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(Ni,Ti)}(t),n.identifier=eo(t).toLowerCase()}function j(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function F(){const e=this.resume();this.stack[this.stack.length-1].url=e}function L(){const e=this.resume();this.stack[this.stack.length-1].title=e}function D(){this.data.inReference=void 0}function R(){this.data.referenceType="collapsed"}function U(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=eo(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function B(e){this.data.characterReferenceType=e.type}function $(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=Xr(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=Wr(t)}this.stack[this.stack.length-1].value+=r}function H(e){this.stack.pop().position.end=Ii(e.end)}function V(e){C.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function q(e){C.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function W(){return{type:"blockquote",children:[]}}function Z(){return{type:"code",lang:null,meta:null,value:""}}function Q(){return{type:"inlineCode",value:""}}function K(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function G(){return{type:"emphasis",children:[]}}function Y(){return{type:"heading",depth:0,children:[]}}function J(){return{type:"break"}}function X(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function ie(){return{type:"strong",children:[]}}function ae(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}(n)(function(e){for(;!Fo(e););return e}(function(e){const t={constructs:Gr([Ci,...(e||{}).extensions||[]]),content:n(yo),defined:[],document:n(bo),flow:n(fi),lazy:{},string:n(hi),text:n(mi)};return t;function n(e){return function(n){return zi(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,i,a){const s=[];let l,c,u,d,f;for(o=n+("string"==typeof o?o.toString():new TextDecoder(i||void 0).decode(o)),u=0,n="",r&&(65279===o.charCodeAt(0)&&u++,r=void 0);u<o.length;){if(Ai.lastIndex=u,l=Ai.exec(o),d=l&&void 0!==l.index?l.index:o.length,f=o.charCodeAt(d),!l){n=o.slice(u);break}if(10===f&&u===d&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),u<d&&(s.push(o.slice(u,d)),t+=d-u),f){case 0:s.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),s.push(-2);t++<c;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return a&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function Ii(e){return{line:e.line,column:e.column,offset:e.offset}}function Mi(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Mi(e,r):ji(e,r)}}function ji(e,t){let n;for(n in t)if(Oi.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Fi(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+vr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+vr({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+vr({start:t.start,end:t.end})+") is still open")}function Li(e){const t=this;t.parser=function(n){return Pi(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Di(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&"text"===i.type?i.value="["+i.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&"text"===a.type?a.value+=r:o.push({type:"text",value:r}),o}function Ri(e){const t=e.spread;return null==t?e.children.length>1:t}function Ui(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(Bi(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(Bi(t.slice(o),o>0,!1)),i.join("")}function Bi(e,t,n){let r=0,o=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(o-1);for(;9===t||32===t;)o--,t=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const $i={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=mo(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Di(e,t);const o={src:mo(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){const n={src:mo(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Di(e,t);const o={href:mo(r.url||"")};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){const n={href:mo(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),o=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Ri(n[r])}return t}(n):Ri(t),i={},a=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(o||0!==s||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?a.push(e):a.push(...e.children)}const l=r[r.length-1];l&&(o||"element"!==l.type||"p"!==l.tagName)&&a.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let o=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++o<r.length;){const e=r[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),o.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},i=gr(t.children[1]),a=mr(t.children[t.children.length-1]);i&&a&&(r.position={start:i,end:a}),o.push(r)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,o=0===(r?r.indexOf(t):1)?"th":"td",i=n&&"table"===n.type?n.align:void 0,a=i?i.length:t.children.length;let s=-1;const l=[];for(;++s<a;){const n=t.children[s],r={},a=i?i[s]:void 0;a&&(r.align=a);let c={type:"element",tagName:o,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:Ui(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:Hi,yaml:Hi,definition:Hi,footnoteDefinition:Hi};function Hi(){}const Vi="object"==typeof self?self:globalThis,qi=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);const[i,a]=t[o];switch(i){case 0:case-1:return n(a,o);case 1:{const e=n([],o);for(const t of a)e.push(r(t));return e}case 2:{const e=n({},o);for(const[t,n]of a)e[r(t)]=r(n);return e}case 3:return n(new Date(a),o);case 4:{const{source:e,flags:t}=a;return n(new RegExp(e,t),o)}case 5:{const e=n(new Map,o);for(const[t,n]of a)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,o);for(const t of a)e.add(r(t));return e}case 7:{const{name:e,message:t}=a;return n(new Vi[e](t),o)}case 8:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:e}=new Uint8Array(a);return n(new DataView(e),a)}}return n(new Vi[i](a),o)};return r})(new Map,e)(0),Wi="",{toString:Zi}={},{keys:Qi}=Object,Ki=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=Zi.call(e).slice(8,-1);switch(n){case"Array":return[1,Wi];case"Object":return[2,Wi];case"Date":return[3,Wi];case"RegExp":return[4,Wi];case"Map":return[5,Wi];case"Set":return[6,Wi];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},Gi=([e,t])=>0===e&&("function"===t||"symbol"===t),Yi=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const o=(e,t)=>{const o=r.push(e)-1;return n.set(t,o),o},i=r=>{if(n.has(r))return n.get(r);let[a,s]=Ki(r);switch(a){case 0:{let t=r;switch(s){case"bigint":a=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);t=null;break;case"undefined":return o([-1],r)}return o([a,t],r)}case 1:{if(s){let e=r;return"DataView"===s?e=new Uint8Array(r.buffer):"ArrayBuffer"===s&&(e=new Uint8Array(r)),o([s,[...e]],r)}const e=[],t=o([a,e],r);for(const n of r)e.push(i(n));return t}case 2:{if(s)switch(s){case"BigInt":return o([s,r.toString()],r);case"Boolean":case"Number":case"String":return o([s,r.valueOf()],r)}if(t&&"toJSON"in r)return i(r.toJSON());const n=[],l=o([a,n],r);for(const t of Qi(r))!e&&Gi(Ki(r[t]))||n.push([i(t),i(r[t])]);return l}case 3:return o([a,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return o([a,{source:e,flags:t}],r)}case 5:{const t=[],n=o([a,t],r);for(const[o,a]of r)(e||!Gi(Ki(o))&&!Gi(Ki(a)))&&t.push([i(o),i(a)]);return n}case 6:{const t=[],n=o([a,t],r);for(const o of r)!e&&Gi(Ki(o))||t.push(i(o));return n}}const{message:l}=r;return o([a,{name:s,message:l}],r)};return i})(!(t||n),!!t,new Map,r)(e),r},Ji="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?qi(Yi(e,t)):structuredClone(e):(e,t)=>qi(Yi(e,t));function Xi(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function ea(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const ta=function(e){if(null==e)return ra;if("function"==typeof e)return na(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ta(e[n]);return na(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return na(n);function n(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}}(e);if("string"==typeof e)return function(e){return na(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function na(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function ra(){return!0}const oa=[],ia=!0,aa=!1;function sa(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=ta(o),a=r?-1:1;!function e(o,s,l){const c=o&&"object"==typeof o?o:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,f=oa;if((!t||i(o,s,l[l.length-1]||void 0))&&(f=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[ia,e];return null==e?oa:[e]}(n(o,l)),f[0]===aa))return f;if("children"in o&&o.children){const t=o;if(t.children&&"skip"!==f[0])for(u=(r?t.children.length:-1)+a,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),c[0]===aa)return c;u="number"==typeof c[1]?c[1]:u+a}}return f}}(e,void 0,[])()}function la(e,t,n,r){let o,i,a;"function"==typeof t&&"function"!=typeof n?(i=void 0,a=t,o=n):(i=t,a=n,o=r),sa(e,i,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return a(e,r,n)},o)}const ca={}.hasOwnProperty,ua={};function da(e,t){e.position&&(t.position=br(e))}function fa(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,o=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&o&&Object.assign(n.properties,Ji(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function pa(e,t){const n=t.data||{},r=!("value"in t)||ca.call(n,"hProperties")||ca.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function ha(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function ma(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function ga(e,t){const n=function(e,t){const n=t||ua,r=new Map,o=new Map,i=new Map,a={...$i,...n.handlers},s={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const o=s.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=ma(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=ma(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:fa,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:function(e,t){const n=e.type,r=s.handlers[n];if(ca.call(s.handlers,n)&&r)return r(s,e,t);if(s.options.passThrough&&s.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=Ji(n);return r.children=s.all(e),r}return Ji(e)}return(s.options.unknownHandler||pa)(s,e,t)},options:n,patch:da,wrap:ha};return la(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:o,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),s}(e,t),r=n.one(e,void 0),o=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Xi,r=e.options.footnoteBackLabel||ea,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[l]);if(!o)continue;const i=e.all(o),a=String(o.identifier).toUpperCase(),c=mo(a.toLowerCase());let u=0;const d=[],f=e.footnoteCounts.get(a);for(;void 0!==f&&++u<=f;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const p=i[i.length-1];if(p&&"element"===p.type&&"p"===p.tagName){const e=p.children[p.children.length-1];e&&"text"===e.type?e.value+=" ":p.children.push({type:"text",value:" "}),p.children.push(...d)}else i.push(...d);const h={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(i,!0)};e.patch(o,h),s.push(h)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Ji(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:"\n"},o),i}function ya(e,t){return e&&"run"in e?async function(n,r){const o=ga(n,{file:r,...t});await e.run(o,r)}:function(n,r){return ga(n,{file:r,...e||t})}}function ba(e){if(e)throw e}var va,wa;var ka=function(){if(wa)return va;wa=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),i=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!i)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return va=function e(){var t,n,r,l,c,u,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(h&&l&&(i(l)||(c=o(l)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},a(d,{name:n,newValue:e(h,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},va}();const xa=t(ka);function Sa(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function _a(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function o(i,...a){const s=e[++n];let l=-1;if(i)r(i);else{for(;++l<t.length;)null!==a[l]&&void 0!==a[l]||(a[l]=t[l]);t=a,s?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let s;r&&t.push(o);try{s=e.apply(this,t)}catch(i){if(r&&n)throw i;return o(i)}r||(s&&s.then&&"function"==typeof s.then?s.then(a,o):s instanceof Error?o(s):a(s))}function o(e,...r){n||(n=!0,t(e,...r))}function a(e){o(null,e)}}(s,o)(...a):r(null,...a)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const Ea={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Ca(e);let n,r=0,o=-1,i=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else o<0&&(n=!0,o=i+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let a=-1,s=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else a<0&&(n=!0,a=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(o=i):(s=-1,o=a));r===o?o=a:o<0&&(o=e.length);return e.slice(r,o)},dirname:function(e){if(Ca(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){Ca(e);let t,n=e.length,r=-1,o=0,i=-1,a=0;for(;n--;){const s=e.codePointAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?i<0?i=n:1!==a&&(a=1):i>-1&&(a=-1);else if(t){o=n+1;break}}if(i<0||r<0||0===a||1===a&&i===r-1&&i===o+1)return"";return e.slice(i,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)Ca(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){Ca(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",i=0,a=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(a===l-1||1===s);else if(a!==l-1&&2===s){if(o.length<2||2!==i||46!==o.codePointAt(o.length-1)||46!==o.codePointAt(o.length-2))if(o.length>2){if(r=o.lastIndexOf("/"),r!==o.length-1){r<0?(o="",i=0):(o=o.slice(0,r),i=o.length-1-o.lastIndexOf("/")),a=l,s=0;continue}}else if(o.length>0){o="",i=0,a=l,s=0;continue}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(a+1,l):o=e.slice(a+1,l),i=l-a-1;a=l,s=0}else 46===n&&s>-1?s++:s=-1}return o}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function Ca(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const za={cwd:function(){return"/"}};function Aa(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function Na(e){if("string"==typeof e)e=new URL(e);else if(!Aa(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const Ta=["history","path","basename","stem","extname","dirname"];class Oa{constructor(e){let t;t=e?Aa(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":za.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<Ta.length;){const e=Ta[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)Ta.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?Ea.basename(this.path):void 0}set basename(e){Ia(e,"basename"),Pa(e,"basename"),this.path=Ea.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?Ea.dirname(this.path):void 0}set dirname(e){Ma(this.basename,"dirname"),this.path=Ea.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?Ea.extname(this.path):void 0}set extname(e){if(Pa(e,"extname"),Ma(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ea.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Aa(e)&&(e=Na(e)),Ia(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?Ea.basename(this.path,this.extname):void 0}set stem(e){Ia(e,"stem"),Pa(e,"stem"),this.path=Ea.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new Sr(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function Pa(e,t){if(e&&e.includes(Ea.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ea.sep+"`")}function Ia(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ma(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const ja=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},Fa={}.hasOwnProperty;class La extends ja{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=_a()}copy(){const e=new La;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(xa(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(Ba("data",this.frozen),this.namespace[e]=t,this):Fa.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Ba("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=Va(e),n=this.parser||this.Parser;return Ra("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),Ra("process",this.parser||this.Parser),Ua("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=Va(e),a=n.parse(i);function s(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(a,i,function(e,t,r){if(e||!t||!r)return s(e);const o=t,i=n.stringify(o,r);var a;"string"==typeof(a=i)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(a)?r.value=i:r.result=i,s(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),Ra("processSync",this.parser||this.Parser),Ua("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,ba(e),t=r}),Ha("processSync","process",n),t}run(e,t,n){$a(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?o(void 0,n):new Promise(o);function o(o,i){const a=Va(t);r.run(e,a,function(t,r,a){const s=r||e;t?i(t):o?o(s):n(void 0,s,a)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){ba(e),n=t,r=!0}),Ha("runSync","run",r),n}stringify(e,t){this.freeze();const n=Va(t),r=this.compiler||this.Compiler;return Ua("stringify",r),$a(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(Ba("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?a(e):i(e)}return this;function o(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;s(t,n)}else i(e)}}function i(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(e.plugins),e.settings&&(r.settings=xa(!0,r.settings,e.settings))}function a(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){o(e[t])}}}function s(e,t){let r=-1,o=-1;for(;++r<n.length;)if(n[r][0]===e){o=r;break}if(-1===o)n.push([e,...t]);else if(t.length>0){let[r,...i]=t;const a=n[o][1];Sa(a)&&Sa(r)&&(r=xa(!0,a,r)),n[o]=[e,r,...i]}}}}const Da=(new La).freeze();function Ra(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function Ua(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ba(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function $a(e){if(!Sa(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function Ha(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Va(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new Oa(e)}const qa=[],Wa={allowDangerousHtml:!0},Za=/^(https?|ircs?|mailto|xmpp)$/i,Qa=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Ka(e){const t=function(e){const t=e.rehypePlugins||qa,n=e.remarkPlugins||qa,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Wa}:Wa,o=Da().use(Li).use(n).use(ya,r).use(t);return o}(e),n=function(e){const t=e.children||"",n=new Oa;"string"==typeof t&&(n.value=t);return n}(e);return function(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,i=t.disallowedElements,a=t.skipHtml,s=t.unwrapDisallowed,l=t.urlTransform||Ga;for(const u of Qa)Object.hasOwn(t,u.from)&&yn((u.from,u.to&&u.to,u.id));return la(e,c),Tr(e,{Fragment:O.Fragment,components:o,ignoreInvalidStyle:!0,jsx:O.jsx,jsxs:O.jsxs,passKeys:!0,passNode:!0});function c(e,t,o){if("raw"===e.type&&o&&"number"==typeof t)return a?o.children.splice(t,1):o.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in Ur)if(Object.hasOwn(Ur,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=Ur[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=l(String(n||""),t,e))}}if("element"===e.type){let a=n?!n.includes(e.tagName):!!i&&i.includes(e.tagName);if(!a&&r&&"number"==typeof t&&(a=!r(e,t,o)),a&&o&&"number"==typeof t)return s&&e.children?o.children.splice(t,1,...e.children):o.children.splice(t,1),t}}}(t.runSync(t.parse(n),n),e)}function Ga(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return-1===t||-1!==o&&t>o||-1!==n&&t>n||-1!==r&&t>r||Za.test(e.slice(0,t))?e:""}function Ya(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;-1!==o;)r++,o=n.indexOf(t,o+t.length);return r}function Ja(e,t,n){const r=ta((n||{}).ignore||[]),o=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([Xa(e[0]),es(e[1])])}return t}(t);let i=-1;for(;++i<o.length;)sa(e,"text",a);function a(e,t){let n,a=-1;for(;++a<t.length;){const e=t[a],o=n?n.children:void 0;if(r(e,o?o.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=o[i][0],a=o[i][1];let s=0;const l=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){const n=d.index,o={index:d.index,input:d.input,stack:[...t,e]};let i=a(...d,o);if("string"==typeof i&&(i=i.length>0?{type:"text",value:i}:void 0),!1===i?r.lastIndex=n+1:(s!==n&&u.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(i)?u.push(...i):i&&u.push(i),s=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...u)):u=[e];return l+u.length}(e,t)}}function Xa(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function es(e){return"function"==typeof e?e:function(){return e}}const ts="phrasing",ns=["autolink","link","image","label"];function rs(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function os(e){this.config.enter.autolinkProtocol.call(this,e)}function is(e){this.config.exit.autolinkProtocol.call(this,e)}function as(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function ss(e){this.config.exit.autolinkEmail.call(this,e)}function ls(e){this.exit(e)}function cs(e){Ja(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,us],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),ds]],{ignore:["link","linkReference"]})}function us(e,t,n,r,o){let i="";if(!fs(o))return!1;if(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(n))return!1;const a=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=Ya(e,"(");let i=Ya(e,")");for(;-1!==r&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function ds(e,t,n,r){return!(!fs(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function fs(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||po(n)||fo(n))&&(!t||47!==n)}function ps(){this.buffer()}function hs(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ms(){this.buffer()}function gs(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ys(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=eo(this.sliceSerialize(e)).toLowerCase(),n.label=t}function bs(e){this.exit(e)}function vs(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=eo(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ws(e){this.exit(e)}function ks(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),s(),a(),i+=o.move("]"),i}function xs(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,o){const i=r.createTracker(o);let a=i.move("[^");const s=r.enter("footnoteDefinition"),l=r.enter("label");a+=i.move(r.safe(r.associationId(e),{before:a,after:"]"})),l(),a+=i.move("]:"),e.children&&e.children.length>0&&(i.shift(4),a+=i.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,i.current()),t?_s:Ss)));return s(),a},footnoteReference:ks},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function Ss(e,t,n){return 0===t?e:_s(e,t,n)}function _s(e,t,n){return(n?"":" ")+e}ks.peek=function(){return"["};const Es=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function Cs(e){this.enter({type:"delete",children:[]},e)}function zs(e){this.exit(e)}function As(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),i(),a}function Ns(e){return e.length}function Ts(e){return null==e?"":String(e)}function Os(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function Ps(e,t,n){return">"+(n?"":" ")+e}function Is(e,t){return Ms(e,t.inConstruct,!0)&&!Ms(e,t.notInConstruct,!1)}function Ms(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function js(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if("\n"===n.unsafe[o].character&&Is(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return"\\\n"}function Fs(e,t,n){return(n?"":" ")+e}function Ls(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Ds(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Rs(e,t,n){const r=wo(e),o=wo(t);return void 0===r?void 0===o?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function Us(e,t,n,r){const o=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),i=n.enter("emphasis"),a=n.createTracker(r),s=a.move(o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const c=l.charCodeAt(0),u=Rs(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=Ds(c)+l.slice(1));const d=l.charCodeAt(l.length-1),f=Rs(r.after.charCodeAt(0),d,o);f.inside&&(l=l.slice(0,-1)+Ds(d));const p=a.move(o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+l+p}function Bs(e){return e.value||""}function $s(e,t,n,r){const o=Ls(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),c+=l.move(")"),a(),c}function Hs(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),"full"!==o&&c&&c===d?"shortcut"===o?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Vs(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const e=n.unsafe[i],t=n.compilePattern(e);let o;if(e.atBreak)for(;o=t.exec(r);){let e=o.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(o.index+1)}}return o+r+o}function qs(e,t){const n=$r(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function Ws(e,t,n,r){const o=Ls(n),i='"'===o?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(qs(e,n)){const t=n.stack;n.stack=[],s=n.enter("autolink");let r=a.move("<");return r+=a.move(n.containerPhrasing(e,{before:r,after:">",...a.current()})),r+=a.move(">"),s(),n.stack=t,r}s=n.enter("link"),l=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${i}`),c+=a.move(" "+o),c+=a.move(n.safe(e.title,{before:c,after:o,...a.current()})),c+=a.move(o),l()),c+=a.move(")"),s(),c}function Zs(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),"full"!==o&&c&&c===d?"shortcut"===o?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Qs(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Ks(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}As.peek=function(){return"~"},Us.peek=function(e,t,n){return n.options.emphasis||"*"},Bs.peek=function(){return"<"},$s.peek=function(){return"!"},Hs.peek=function(){return"!"},Vs.peek=function(){return"`"},Ws.peek=function(e,t,n){return qs(e,n)?"<":"["},Zs.peek=function(){return"["};const Gs=ta(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Ys(e,t,n,r){const o=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),i=n.enter("strong"),a=n.createTracker(r),s=a.move(o+o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const c=l.charCodeAt(0),u=Rs(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=Ds(c)+l.slice(1));const d=l.charCodeAt(l.length-1),f=Rs(r.after.charCodeAt(0),d,o);f.inside&&(l=l.slice(0,-1)+Ds(d));const p=a.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+l+p}Ys.peek=function(e,t,n){return n.options.strong||"*"};const Js={blockquote:function(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const a=n.indentLines(n.containerFlow(e,i.current()),Ps);return o(),a},break:js,code:function(e,t,n,r){const o=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),i=e.value||"",a="`"===o?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(i,Fs);return e(),t}const s=n.createTracker(r),l=o.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,a=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===o?++i>a&&(a=i):i=1,o=r+t.length,r=n.indexOf(t,o);return a}(i,o)+1,3)),c=n.enter("codeFenced");let u=s.move(l);if(e.lang){const t=n.enter(`codeFencedLang${a}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${a}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...s.current()})),t()}return u+=s.move("\n"),i&&(u+=s.move(i+"\n")),u+=s.move(l),c(),u},definition:function(e,t,n,r){const o=Ls(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),a(),c},emphasis:Us,hardBreak:js,heading:function(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(function(e,t){let n=!1;return la(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,aa}),Boolean((!e.depth||e.depth<3)&&$r(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),a=n.containerPhrasing(e,{...i.current(),before:"\n",after:"\n"});return r(),t(),a+"\n"+(1===o?"=":"-").repeat(a.length-(Math.max(a.lastIndexOf("\r"),a.lastIndexOf("\n"))+1))}const a="#".repeat(o),s=n.enter("headingAtx"),l=n.enter("phrasing");i.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...i.current()});return/^[\t ]/.test(c)&&(c=Ds(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),s(),c},html:Bs,image:$s,imageReference:Hs,inlineCode:Vs,link:Ws,linkReference:Zs,list:function(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let a=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):Qs(n);const s=e.ordered?"."===a?")":".":function(e){const t=Qs(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let l=!(!t||!n.bulletLastUsed)&&a===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==a&&"-"!==a||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),Ks(n)===a&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,o(),c},listItem:function(e,t,n,r){const o=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let i=n.bulletCurrent||Qs(n);t&&"list"===t.type&&t.ordered&&(i=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+i);let a=i.length+1;("tab"===o||"mixed"===o&&(t&&"list"===t.type&&t.spread||e.spread))&&(a=4*Math.ceil(a/4));const s=n.createTracker(r);s.move(i+" ".repeat(a-i.length)),s.shift(a);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),function(e,t,n){if(t)return(n?"":" ".repeat(a))+e;return(n?i:i+" ".repeat(a-i.length))+e});return l(),c},paragraph:function(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),o(),a},root:function(e,t,n,r){return(e.children.some(function(e){return Gs(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:Ys,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(Ks(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function Xs(e){const t=e._align;this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function el(e){this.exit(e),this.data.inTable=void 0}function tl(e){this.enter({type:"tableRow",children:[]},e)}function nl(e){this.exit(e)}function rl(e){this.enter({type:"tableCell",children:[]},e)}function ol(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,il));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function il(e,t){return"|"===t?t:e}function al(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=Js.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return s(function(e,t,n){const r=e.children;let o=-1;const i=[],a=t.enter("table");for(;++o<r.length;)i[o]=l(r[o],t,n);return a(),i}(e,n,r),e.align)},tableCell:a,tableRow:function(e,t,n,r){const o=s([l(e,n,r)]);return o.slice(0,o.indexOf("\n"))}}};function a(e,t,n,r){const o=n.enter("tableCell"),a=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:i,after:i});return a(),o(),s}function s(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||Ns,i=[],a=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const t=[],r=[];let i=-1;for(e[u].length>c&&(c=e[u].length);++i<e[u].length;){const a=Ts(e[u][i]);if(!1!==n.alignDelimiters){const e=o(a);r[i]=e,(void 0===l[i]||e>l[i])&&(l[i]=e)}t.push(a)}a[u]=t,s[u]=r}let d=-1;if("object"==typeof r&&"length"in r)for(;++d<c;)i[d]=Os(r[d]);else{const e=Os(r);for(;++d<c;)i[d]=e}d=-1;const f=[],p=[];for(;++d<c;){const e=i[d];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let o=!1===n.alignDelimiters?1:Math.max(1,l[d]-t.length-r.length);const a=t+"-".repeat(o)+r;!1!==n.alignDelimiters&&(o=t.length+o+r.length,o>l[d]&&(l[d]=o),p[d]=o),f[d]=a}a.splice(1,0,f),s.splice(1,0,p),u=-1;const h=[];for(;++u<a.length;){const e=a[u],t=s[u];d=-1;const r=[];for(;++d<c;){const o=e[d]||"";let a="",s="";if(!1!==n.alignDelimiters){const e=l[d]-(t[d]||0),n=i[d];114===n?a=" ".repeat(e):99===n?e%2?(a=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(a=" ".repeat(e/2),s=a):s=" ".repeat(e)}!1===n.delimiterStart||d||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===o||!1===n.delimiterStart&&!d||r.push(" "),!1!==n.alignDelimiters&&r.push(a),r.push(o),!1!==n.alignDelimiters&&r.push(s),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&d===c-1||r.push("|")}h.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return h.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:o})}function l(e,t,n){const r=e.children;let o=-1;const i=[],s=t.enter("tableRow");for(;++o<r.length;)i[o]=a(r[o],0,t,n);return s(),i}}function sl(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function ll(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let o,i=-1;for(;++i<r.length;){const e=r[i];if("paragraph"===e.type){o=e;break}}o===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function cl(e,t,n,r){const o=e.children[0],i="boolean"==typeof e.checked&&o&&"paragraph"===o.type,a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(a);let l=Js.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+a})),l}const ul={tokenize:function(e,t,n){let r=0;return function t(i){if((87===i||119===i)&&r<3)return r++,e.consume(i),t;if(46===i&&3===r)return e.consume(i),o;return n(i)};function o(e){return null===e?n(e):t(e)}},partial:!0},dl={tokenize:function(e,t,n){let r,o,i;return a;function a(t){return 46===t||95===t?e.check(pl,l,s)(t):null===t||co(t)||po(t)||45!==t&&fo(t)?l(t):(i=!0,e.consume(t),a)}function s(t){return 95===t?r=!0:(o=r,r=void 0),e.consume(t),a}function l(e){return o||r||!i?n(e):t(e)}},partial:!0},fl={tokenize:function(e,t){let n=0,r=0;return o;function o(a){return 40===a?(n++,e.consume(a),o):41===a&&r<n?i(a):33===a||34===a||38===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||60===a||63===a||93===a||95===a||126===a?e.check(pl,t,i)(a):null===a||co(a)||po(a)?t(a):(e.consume(a),o)}function i(t){return 41===t&&r++,e.consume(t),o}},partial:!0},pl={tokenize:function(e,t,n){return r;function r(a){return 33===a||34===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||63===a||95===a||126===a?(e.consume(a),r):38===a?(e.consume(a),i):93===a?(e.consume(a),o):60===a||null===a||co(a)||po(a)?t(a):n(a)}function o(e){return null===e||40===e||91===e||co(e)||po(e)?t(e):r(e)}function i(e){return to(e)?a(e):n(e)}function a(t){return 59===t?(e.consume(t),r):to(t)?(e.consume(t),a):n(t)}},partial:!0},hl={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return no(e)?n(e):t(e)}},partial:!0},ml={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!wl.call(r,r.previous)||_l(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(ul,e.attempt(dl,e.attempt(fl,o),n),n)(t)};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:wl},gl={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let o="",i=!1;return function(t){if((72===t||104===t)&&kl.call(r,r.previous)&&!_l(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),a;return n(t)};function a(t){if(to(t)&&o.length<5)return o+=String.fromCodePoint(t),e.consume(t),a;if(58===t){const n=o.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),i?l:(i=!0,s)):n(t)}function l(t){return null===t||oo(t)||co(t)||po(t)||fo(t)?n(t):e.attempt(dl,e.attempt(fl,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:kl},yl={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let o,i;return function(t){if(!Sl(t)||!xl.call(r,r.previous)||_l(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)};function a(t){return Sl(t)?(e.consume(t),a):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(hl,c,l)(t):45===t||95===t||no(t)?(i=!0,e.consume(t),s):c(t)}function l(t){return e.consume(t),o=!0,s}function c(a){return i&&o&&to(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):n(a)}},previous:xl},bl={};let vl=48;for(;vl<123;)bl[vl]=yl,vl++,58===vl?vl=65:91===vl&&(vl=97);function wl(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||co(e)}function kl(e){return!to(e)}function xl(e){return!(47===e||Sl(e))}function Sl(e){return 43===e||45===e||46===e||95===e||no(e)}function _l(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}bl[43]=yl,bl[45]=yl,bl[46]=yl,bl[95]=yl,bl[72]=[yl,gl],bl[104]=[yl,gl],bl[87]=[yl,ml],bl[119]=[yl,ml];const El={tokenize:function(e,t,n){const r=this;return go(e,function(e){const o=r.events[r.events.length-1];return o&&"gfmFootnoteDefinitionIndent"===o[1].type&&4===o[2].sliceSerialize(o[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function Cl(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const e=r.events[o][1];if("labelImage"===e.type){a=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(o){if(!a||!a._balanced)return n(o);const s=eo(r.sliceSerialize({start:a.end,end:r.now()}));if(94!==s.codePointAt(0)||!i.includes(s.slice(1)))return n(o);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)}}function zl(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function Al(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(a>999||93===s&&!i||null===s||91===s||co(s))return n(s);if(93===s){e.exit("chunkString");const i=e.exit("gfmFootnoteCallString");return o.includes(eo(r.sliceSerialize(i)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return co(s)||(i=!0),a++,e.consume(s),92===s?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),a++,l):l(t)}}function Nl(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(s>999||93===t&&!a||null===t||91===t||co(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return i=eo(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return co(t)||(a=!0),s++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(i)||o.push(i),go(e,f,"gfmFootnoteDefinitionWhitespace")):n(t)}function f(e){return t(e)}}function Tl(e,t,n){return e.check(Eo,t,e.attempt(El,t,n))}function Ol(e){e.exit("gfmFootnoteDefinition")}function Pl(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const o=this.previous,i=this.events;let a=0;return function(t){if(126===o&&"characterEscape"!==i[i.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(i){const l=wo(o);if(126===i)return a>1?r(i):(e.consume(i),a++,s);if(a<2&&!t)return r(i);const c=e.exit("strikethroughSequenceTemporary"),u=wo(i);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(i)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const o={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},i={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},a=[["enter",o,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",i,t]],s=t.parser.constructs.insideSpan.null;s&&Zr(a,a.length,0,ko(s,e.slice(r+1,n),t)),Zr(a,a.length,0,[["exit",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",o,t]]),Zr(e,r-1,n-r+3,a),n=r+a.length-2;break}}n=-1;for(;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class Il{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let o=0;if(0===n&&0===r.length)return;for(;o<e.map.length;){if(e.map[o][0]===t)return e.map[o][1]+=n,void e.map[o][2].push(...r);o+=1}e.map.push([t,n,r])}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0}}function Ml(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if("enter"===o[0])"tableContent"===o[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===o[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===o[1].type)break}else"enter"===o[0]&&"tableDelimiterRow"===o[1].type&&(n=!0);t+=1}return r}function jl(e,t,n){const r=this;let o,i=0,a=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const o=t>-1?r.events[t][1].type:null,i="tableHead"===o||"tableRow"===o?w:s;if(i===w&&r.parser.lazy[r.now().line])return n(e);return i(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return l(e);return o=!0,a+=1,l(e)}(t)}function l(t){return null===t?n(t):lo(t)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):uo(t)?go(e,l,"whitespace")(t):(a+=1,o&&(o=!1,i+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),o=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||co(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),o=!1,uo(t)?go(e,f,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):f(t))}function f(t){return 45===t||58===t?h(t):124===t?(o=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),p):v(t)}function p(t){return uo(t)?go(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(a+=1,m(t)):null===t||lo(t)?b(t):v(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):v(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(t))}function y(t){return uo(t)?go(e,b,"whitespace")(t):b(t)}function b(n){return 124===n?f(n):(null===n||lo(n))&&o&&i===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):v(n)}function v(e){return n(e)}function w(t){return e.enter("tableRow"),k(t)}function k(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),k):null===n||lo(n)?(e.exit("tableRow"),t(n)):uo(n)?go(e,k,"whitespace")(n):(e.enter("data"),x(n))}function x(t){return null===t||124===t||co(t)?(e.exit("data"),k(t)):(e.consume(t),92===t?S:x)}function S(t){return 92===t||124===t?(e.consume(t),x):x(t)}}function Fl(e,t){let n,r,o,i=-1,a=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const f=new Il;for(;++i<e.length;){const p=e[i],h=p[1];"enter"===p[0]?"tableHead"===h.type?(u=!1,0!==d&&(Dl(f,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(i,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(a=!0,o=void 0,l=[0,0,0,0],c=[0,i+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(i,0,[["enter",r,t]])),s="tableDelimiterRow"===h.type?2:r?3:1):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type?"tableCellDivider"===h.type&&(a?a=!1:(0!==l[1]&&(c[0]=c[1],o=Ll(f,t,l,s,void 0,o)),l=c,c=[l[1],i,0,0])):(a=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],o=Ll(f,t,l,s,void 0,o),l=[0,0,0,0]),c[2]=i)):"tableHead"===h.type?(u=!0,d=i):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=i,0!==l[1]?(c[0]=c[1],o=Ll(f,t,l,s,i,o)):0!==c[1]&&(o=Ll(f,t,c,s,i,o)),s=0):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=i)}for(0!==d&&Dl(f,t,d,n,r),f.consume(t.events),i=-1;++i<t.events.length;){const e=t.events[i];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=Ml(t.events,i))}return e}function Ll(e,t,n,r,o,i){const a=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(i.end=Object.assign({},Rl(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const s=Rl(t.events,n[1]);if(i={type:a,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",i,t]]),0!==n[2]){const o=Rl(t.events,n[2]),i=Rl(t.events,n[3]),a={type:"tableContent",start:Object.assign({},o),end:Object.assign({},i)};if(e.add(n[2],0,[["enter",a,t]]),2!==r){const r=t.events[n[2]],o=t.events[n[3]];if(r[1].end=Object.assign({},o[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",a,t]])}return void 0!==o&&(i.end=Object.assign({},Rl(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function Dl(e,t,n,r,o){const i=[],a=Rl(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function Rl(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const Ul={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),o};function o(t){return co(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),i):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),i):n(t)}function i(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(t)}function a(r){return lo(r)?t(r):uo(r)?e.check({tokenize:Bl},t,n)(r):n(r)}}};function Bl(e,t,n){return go(e,function(e){return null===e?n(e):t(e)},"whitespace")}const $l={};function Hl(e){const t=e||$l,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return Gr([{text:bl},{document:{91:{name:"gfmFootnoteDefinition",tokenize:Nl,continuation:{tokenize:Tl},exit:Ol}},text:{91:{name:"gfmFootnoteCall",tokenize:Al},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Cl,resolveTo:zl}}},Pl(e),{flow:{null:{name:"table",tokenize:jl,resolveAll:Fl}}},{text:{91:Ul}}])}(t)),o.push([{transforms:[cs],enter:{literalAutolink:rs,literalAutolinkEmail:os,literalAutolinkHttp:os,literalAutolinkWww:os},exit:{literalAutolink:ls,literalAutolinkEmail:ss,literalAutolinkHttp:is,literalAutolinkWww:as}},{enter:{gfmFootnoteCallString:ps,gfmFootnoteCall:hs,gfmFootnoteDefinitionLabelString:ms,gfmFootnoteDefinition:gs},exit:{gfmFootnoteCallString:ys,gfmFootnoteCall:bs,gfmFootnoteDefinitionLabelString:vs,gfmFootnoteDefinition:ws}},{canContainEols:["delete"],enter:{strikethrough:Cs},exit:{strikethrough:zs}},{enter:{table:Xs,tableData:rl,tableHeader:rl,tableRow:tl},exit:{codeText:ol,table:el,tableData:nl,tableHeader:nl,tableRow:nl}},{exit:{taskListCheckValueChecked:sl,taskListCheckValueUnchecked:sl,paragraph:ll}}]),i.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ts,notInConstruct:ns},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ts,notInConstruct:ns},{character:":",before:"[ps]",after:"\\/",inConstruct:ts,notInConstruct:ns}]},xs(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Es}],handlers:{delete:As}},al(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:cl}}]}}(t))}const Vl=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],ql={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Vl,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Vl],h2:[["className","sr-only"]],img:[...Vl,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Vl,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Vl],table:[...Vl],ul:[...Vl,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},Wl={}.hasOwnProperty;function Zl(e,t){if(t&&"object"==typeof t){const n=t;switch("string"==typeof n.type?n.type:""){case"comment":return function(e,t){if(e.schema.allowComments){const e="string"==typeof t.value?t.value:"",n=e.indexOf("--\x3e"),r={type:"comment",value:n<0?e:e.slice(0,n)};return Yl(r,t),r}}(e,n);case"doctype":return function(e,t){if(e.schema.allowDoctypes){const e={type:"doctype"};return Yl(e,t),e}}(e,n);case"element":return function(e,t){const n="string"==typeof t.tagName?t.tagName:"";e.stack.push(n);const r=Ql(e,t.children),o=function(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,i=r&&Wl.call(r,n)?r[n]:void 0,a=r&&Wl.call(r,"*")?r["*"]:void 0,s=t&&"object"==typeof t?t:{},l={};let c;for(c in s)if(Wl.call(s,c)){const t=s[c];let n=Kl(e,Jl(i,c),c,t);null==n&&(n=Kl(e,Jl(a,c),c,t)),null!=n&&(l[c]=n)}if(o&&Wl.call(o,n)){const e=o[n];for(c in e)Wl.call(e,c)&&!Wl.call(l,c)&&(l[c]=e[c])}return l}(e,t.properties);e.stack.pop();let i=!1;if(n&&"*"!==n&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(i=!0,e.schema.ancestors&&Wl.call(e.schema.ancestors,n))){const t=e.schema.ancestors[n];let r=-1;for(i=!1;++r<t.length;)e.stack.includes(t[r])&&(i=!0)}if(!i)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const a={type:"element",tagName:n,properties:o,children:r};return Yl(a,t),a}(e,n);case"root":return function(e,t){const n=Ql(e,t.children),r={type:"root",children:n};return Yl(r,t),r}(e,n);case"text":return function(e,t){const n="string"==typeof t.value?t.value:"",r={type:"text",value:n};return Yl(r,t),r}(0,n)}}}function Ql(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const t=Zl(e,r[o]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function Kl(e,t,n,r){return t?Array.isArray(r)?function(e,t,n,r){let o=-1;const i=[];for(;++o<r.length;){const a=Gl(e,t,n,r[o]);"number"!=typeof a&&"string"!=typeof a||i.push(a)}return i}(e,t,n,r):Gl(e,t,n,r):void 0}function Gl(e,t,n,r){if(("boolean"==typeof r||"number"==typeof r||"string"==typeof r)&&function(e,t,n){const r=e.schema.protocols&&Wl.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||0===r.length)return!0;const o=String(n),i=o.indexOf(":"),a=o.indexOf("?"),s=o.indexOf("#"),l=o.indexOf("/");if(i<0||l>-1&&i>l||a>-1&&i>a||s>-1&&i>s)return!0;let c=-1;for(;++c<r.length;){const e=r[c];if(i===e.length&&o.slice(0,e.length)===e)return!0}return!1}(e,n,r)){if("object"==typeof t&&t.length>1){let e=!1,n=0;for(;++n<t.length;){const o=t[n];if(o&&"object"==typeof o&&"flags"in o){if(o.test(String(r))){e=!0;break}}else if(o===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function Yl(e,t){const n=br(t);t.data&&(e.data=Ji(t.data)),n&&(e.position=n)}function Jl(e,t){let n,r=-1;if(e)for(;++r<e.length;){const o=e[r],i="string"==typeof o?o:o[0];if(i===t)return o;"data*"===i&&(n=o)}if(t.length>4&&"data"===t.slice(0,4).toLowerCase())return n}function Xl(e){return function(t){const n=function(e,t){let n={type:"root",children:[]};const r=Zl({schema:t?{...ql,...t}:ql,stack:[]},e);return r&&(Array.isArray(r)?1===r.length?n=r[0]:n.children=r:n=r),n}(t,e);return n}}const ec=E.lazy(()=>Promise.resolve().then(()=>Qg).then(e=>({default:e.AudioPlayer}))),tc=E.lazy(()=>Promise.resolve().then(()=>Yg).then(e=>({default:e.Gallery}))),nc=E.memo(function({message:e,primaryColor:t,botAvatar:n,botName:r="Mar",avatars:o,isFirst:i=!0,isLast:a=!0,index:s=0}){const{t:l}=U("extracted"),c="user"===e.sender,u="system"===e.type||"system"===e.sender,d=!c&&!u,f=Lt({primaryColor:t}),p=function(){const e=E.useContext(Ut);return e.enabled&&"none"!==e.messageEntry?{slide:"animate-message-slide",fade:"animate-message-fade",scale:"animate-message-scale",spring:"animate-message-spring"}[e.messageEntry]||"animate-message-spring":""}(),h=E.useMemo(()=>{if(c)return null;if("text"===e.type){const t=e;if(t.emotion&&o?.[t.emotion])return o[t.emotion]}return n},[e,o,n,c]),m=({href:e,children:t})=>{if(!e)return null;const n=String(t).toLowerCase(),r=n.includes("reservar")||n.includes("ver")||n.includes("pagar");return e.includes("maps.google")||e.includes("goo.gl")?O.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"block my-2 no-underline group",children:O.jsxs("span",{className:"flex items-center gap-3 p-3 border rounded-xl shadow-sm group-hover:border-primary/30 transition-all",style:{backgroundColor:"hsl(var(--card))",borderColor:"hsl(var(--border))"},children:[O.jsx("span",{className:"flex-shrink-0 p-2 rounded-full",style:{backgroundColor:`${f}1a`,color:f},children:O.jsx(re,{size:16,strokeWidth:2.5})}),O.jsx("span",{className:"flex flex-col min-w-0 flex-1 text-[11px] font-bold text-foreground leading-tight uppercase tracking-tight",children:l("ver_ubicacion")}),O.jsx(J,{size:12,className:"text-muted-foreground/40 group-hover:text-primary"})]})}):r?O.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center gap-2 px-5 py-2.5 mt-2 text-[11px] font-black w-full sm:w-auto rounded-xl shadow-md uppercase tracking-widest transition-transform active:scale-95 text-white",style:{backgroundColor:f},children:[t," ",O.jsx(Z,{size:14})]}):O.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"font-bold underline decoration-primary/30 hover:decoration-primary transition-all",style:{color:c?"inherit":f},children:t})},g=({src:e,alt:t})=>e?O.jsx(E.Suspense,{fallback:O.jsx("div",{className:"my-3 animate-pulse",children:O.jsx("div",{className:"w-full h-48 bg-muted rounded-xl"})}),children:O.jsx(tc,{images:[{src:e,alt:t}],radius:"rounded-xl"})}):null;return u?O.jsx("div",{className:"flex justify-center my-4 animate-in fade-in zoom-in-95 w-full",children:O.jsx("span",{className:"px-3 py-1 border rounded-full text-[9px] font-black uppercase tracking-widest",style:{backgroundColor:"hsl(var(--muted))",borderColor:"hsl(var(--border))",color:"hsl(var(--muted-foreground))"},children:e.content})}):O.jsxs("div",{className:Nt("flex w-full mb-0.5 group",p,c?"justify-end":"justify-start gap-3",i&&"mt-3",a&&"mb-3"),style:{animationDelay:50*s+"ms"},children:[!c&&O.jsx("div",{className:"w-9 shrink-0 flex flex-col justify-end pb-1",children:a?O.jsx("div",{className:"h-9 w-9 rounded-full overflow-hidden border shadow-sm",style:{borderColor:"hsl(var(--border))",backgroundColor:"hsl(var(--background))"},children:h?O.jsx("img",{src:h,alt:r,className:"h-full w-full object-cover"}):O.jsx("div",{className:"h-full w-full flex items-center justify-center text-white text-[10px] font-black uppercase",style:{backgroundColor:f},children:r.charAt(0)})}):O.jsx("div",{className:"w-9"})}),O.jsxs("div",{className:Nt("max-w-[85%] shadow-sm transition-all duration-300 relative",c?"text-primary-foreground":"border",c?Nt("rounded-[18px]",i&&"rounded-tr-[4px]",!a&&"rounded-br-[4px]",!i&&!a&&"rounded-r-[4px]"):Nt("rounded-[18px]",i&&"rounded-tl-[4px]",!a&&"rounded-bl-[4px]",!i&&!a&&"rounded-l-[4px]")),style:c?{padding:"var(--spacing-4) var(--spacing-5)",backgroundColor:f,boxShadow:a?`0 8px 20px -6px ${f}33`:"none"}:{padding:"var(--spacing-4) var(--spacing-5)",backgroundColor:"hsl(var(--card))",borderColor:"hsl(var(--border) / 0.6)",color:"hsl(var(--foreground))"},children:[(()=>{switch(e.type){case"audio":return O.jsx(E.Suspense,{fallback:O.jsxs("div",{className:"flex items-center gap-3 py-1 min-w-[200px] animate-pulse",children:[O.jsx("div",{className:"w-8 h-8 rounded-full bg-muted"}),O.jsx("div",{className:"flex-1 space-y-1",children:O.jsx("div",{className:"h-1 w-full bg-muted rounded-full"})})]}),children:O.jsx(ec,{url:e.content,isBot:d,primaryColor:t})});case"image":{const t=e;return O.jsx(E.Suspense,{fallback:O.jsx("div",{className:"my-3 animate-pulse",children:O.jsx("div",{className:"w-full h-48 bg-muted rounded-xl"})}),children:O.jsx(tc,{images:[{src:t.imageUrl||t.content,alt:t.altText||"Imagen"}],radius:"rounded-xl"})})}case"location":{const t=e;return O.jsx(m,{href:`https://www.google.com/maps/search/?api=1&query=${t.latitude},${t.longitude}`,children:"Ver ubicación"})}case"file":{const t=e,n=t.fileName?.split(".").pop()?.toLowerCase()||"",r=t.fileSize?`${(t.fileSize/1024/1024).toFixed(2)} MB`:"";return O.jsxs("a",{href:t.fileUrl,download:t.fileName,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 p-3 border rounded-xl transition-all hover:scale-[1.02] group",style:{backgroundColor:c?"rgba(255,255,255,0.1)":"hsl(var(--muted))",borderColor:c?"rgba(255,255,255,0.2)":"hsl(var(--border))"},children:[O.jsx("div",{className:"flex items-center justify-center w-10 h-10 rounded-lg shrink-0",style:{backgroundColor:c?"rgba(255,255,255,0.2)":`${f}1a`,color:c?"white":f},children:O.jsx(X,{size:20,strokeWidth:2.5})}),O.jsxs("div",{className:"flex-1 min-w-0",children:[O.jsx("p",{className:"text-sm font-bold truncate",children:t.fileName}),r&&O.jsxs("p",{className:"text-xs opacity-60 mt-0.5",children:[n?.toUpperCase()," • ",r]})]}),O.jsx(Y,{size:18,className:"shrink-0 opacity-60 group-hover:opacity-100 transition-opacity"})]})}default:return O.jsx("div",{className:Nt("prose prose-sm max-w-none break-words leading-relaxed dark:prose-invert",c?"text-primary-foreground prose-p:text-white":"text-foreground"),children:O.jsx(Ka,{remarkPlugins:[Hl],rehypePlugins:[[Xl,{tagNames:["p","a","img","strong","em","ul","ol","li","br","span"],attributes:{a:["href","target","rel"],img:["src","alt"],span:["className"]},protocols:{a:{href:["http","https","mailto","tel"]},img:{src:["http","https","data"]}}}]],components:{a:m,img:g,p:({children:e})=>O.jsx("p",{className:"mb-0 last:mb-0",children:e})},children:e.content||""})})}})(),a&&O.jsxs("div",{className:Nt("flex items-center gap-1 mt-1.5 opacity-50 select-none text-[9px]",c?"justify-end":"justify-start"),children:[O.jsx("span",{className:"font-bold tabular-nums uppercase tracking-tighter",children:(e=>{const t=new Date(e);return isNaN(t.getTime())?"":t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1})})(e.timestamp)}),c&&O.jsx(Q,{className:"h-2.5 w-2.5"})]})]})]})},(e,t)=>e.message.id===t.message.id&&(e.message.timestamp===t.message.timestamp&&(e.primaryColor===t.primaryColor&&(e.botAvatar===t.botAvatar&&(e.botName===t.botName&&(e.isFirst===t.isFirst&&(e.isLast===t.isLast&&JSON.stringify(e.styles)===JSON.stringify(t.styles)))))))),rc=E.memo(function(){return O.jsx("div",{className:Nt("flex items-center self-start animate-in fade-in duration-200","max-w-[85%] sm:max-w-[75%]"),children:O.jsx("div",{className:"border rounded-[18px] rounded-tl-[4px] px-4 py-3 shadow-soft-sm",style:{backgroundColor:"hsl(var(--card))",borderColor:"hsl(var(--border))"},children:O.jsx("div",{className:"flex items-center gap-1.5",children:[0,1,2].map(e=>O.jsx("span",{className:"h-1.5 w-1.5 rounded-full animate-bounce",style:{backgroundColor:"hsl(var(--primary) / 0.4)",animationDelay:150*e+"ms",animationDuration:"800ms"}},e))})})})});function oc(e,t){const n=e.getTime()-t.getTime();return Math.floor(n/1e3/60)}function ic(e){return new Intl.DateTimeFormat("es-ES",{hour:"2-digit",minute:"2-digit"}).format(e)}function ac(e){return function(e){const t=new Date;return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}(e)?`Hoy, ${ic(e)}`:function(e){const t=new Date;return t.setDate(t.getDate()-1),e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}(e)?`Ayer, ${ic(e)}`:function(e){return new Intl.DateTimeFormat("es-ES",{day:"numeric",month:"long",hour:"2-digit",minute:"2-digit"}).format(e)}(e)}const sc=E.memo(function({messages:e,isTyping:t,welcomeMessage:n="¡Hola! ¿En qué puedo ayudarte?",primaryColor:r,logoUrl:o,botName:i="Mar",bubbleStyles:a,avatars:s}){const l=E.useRef(null),c=E.useRef(null),[u,d]=E.useState(!1),[f,p]=E.useState(!1),h=Lt({primaryColor:r}),m=e.length>100,g=mn({count:e.length,getScrollElement:()=>c.current,estimateSize:()=>80,overscan:5,enabled:m});E.useEffect(()=>{d(!0)},[]),E.useEffect(()=>{if(u&&(e.length>0||t)){const t=setTimeout(()=>{m?g.scrollToIndex(e.length-1,{align:"end",behavior:e.length<=1?"auto":"smooth"}):l.current?.scrollIntoView({behavior:e.length<=1?"auto":"smooth",block:"end"})},100);return()=>clearTimeout(t)}},[e.length,t,u,m,g]);const y=e=>{const t=new Date(e);return isNaN(t.getTime())?"":ac(t)};return u?m?O.jsxs("div",{ref:c,className:"flex-1 overflow-y-auto scroll-smooth bg-background/50 scrollbar-none",style:{padding:"var(--spacing-5)"},children:[O.jsx("div",{style:{height:`${g.getTotalSize()}px`,width:"100%",position:"relative"},children:g.getVirtualItems().map(t=>{const n=e[t.index],l=t.index,c=e[l-1],u=e[l+1],d=c&&oc(new Date(n.timestamp),new Date(c.timestamp))>15,f=c&&c.sender===n.sender&&oc(new Date(n.timestamp),new Date(c.timestamp))<5&&!d,p=u&&u.sender===n.sender&&oc(new Date(u.timestamp),new Date(n.timestamp))<5;return O.jsxs("div",{style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${t.start}px)`},children:[d&&O.jsx("div",{className:"flex justify-center my-8 animate-in fade-in zoom-in-95",children:O.jsx("span",{className:"px-4 py-1.5 bg-muted/40 backdrop-blur-md rounded-full text-[10px] font-black text-muted-foreground uppercase tracking-[0.2em] border border-border/50 shadow-sm",children:y(n.timestamp)})}),O.jsx(nc,{message:n,primaryColor:r,botAvatar:o,botName:i,styles:a,avatars:s,isFirst:!f,isLast:!p})]},t.key)})}),t&&O.jsxs("div",{className:"flex items-end gap-3 mt-4 mb-2 animate-in fade-in slide-in-from-left-4 duration-500",children:[O.jsx("div",{className:"w-8 h-8 rounded-xl bg-muted/60 border border-border/50 flex items-center justify-center shrink-0 shadow-soft-sm",children:O.jsxs("div",{className:"flex gap-[2px]",children:[O.jsx("span",{className:"w-1 h-1 bg-primary/50 rounded-full animate-bounce [animation-delay:-0.3s]"}),O.jsx("span",{className:"w-1 h-1 bg-primary/50 rounded-full animate-bounce [animation-delay:-0.15s]"}),O.jsx("span",{className:"w-1 h-1 bg-primary/50 rounded-full animate-bounce"})]})}),O.jsx(rc,{})]})]}):O.jsxs("div",{ref:c,className:"flex-1 overflow-y-auto scroll-smooth p-4 bg-background/50 scrollbar-none",children:[O.jsxs("div",{className:"min-h-full flex flex-col justify-end",children:[0===e.length&&O.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center py-16 text-center animate-in fade-in zoom-in-95 duration-1000",children:[O.jsxs("div",{className:"relative h-24 w-24 mb-6",children:[O.jsx("div",{className:"absolute inset-0 bg-primary/20 rounded-full animate-pulse blur-2xl"}),O.jsx("div",{className:"relative h-full w-full rounded-[28px] border-2 border-primary/20 overflow-hidden bg-card shadow-soft-2xl transition-transform hover:scale-105 duration-500",children:f?O.jsx("div",{className:"h-full w-full flex items-center justify-center text-3xl",style:{backgroundColor:h},children:"👋"}):o?O.jsx("img",{src:o,className:"object-cover h-full w-full",alt:i,onError:()=>p(!0)}):O.jsx("div",{className:"h-full w-full flex items-center justify-center text-3xl",style:{backgroundColor:h},children:"👋"})})]}),O.jsxs("div",{className:"space-y-2",children:[O.jsx("h3",{className:"font-black text-xl text-foreground uppercase tracking-tighter italic",children:i}),O.jsxs("p",{className:"text-[12px] font-bold text-muted-foreground italic px-10 leading-relaxed opacity-60",children:['"',n,'"']})]})]}),O.jsx("div",{className:"flex flex-col",style:{gap:"var(--spacing-3)"},children:e.map((t,n)=>{const l=e[n-1],c=e[n+1],u=l&&oc(new Date(t.timestamp),new Date(l.timestamp))>15,d=l&&l.sender===t.sender&&oc(new Date(t.timestamp),new Date(l.timestamp))<5&&!u,f=c&&c.sender===t.sender&&oc(new Date(c.timestamp),new Date(t.timestamp))<5;return O.jsxs(C.Fragment,{children:[u&&O.jsx("div",{className:"flex justify-center my-8 animate-in fade-in zoom-in-95",children:O.jsx("span",{className:"px-4 py-1.5 bg-muted/40 backdrop-blur-md rounded-full text-[10px] font-black text-muted-foreground uppercase tracking-[0.2em] border border-border/50 shadow-sm",children:y(t.timestamp)})}),O.jsx(nc,{message:t,primaryColor:r,botAvatar:o,botName:i,styles:a,avatars:s,isFirst:!d,isLast:!f})]},t.id||`msg-${n}`)})}),O.jsx("div",{ref:l,className:"h-6 shrink-0"})]}),t&&O.jsxs("div",{className:"flex items-end gap-3 mt-4 mb-2 animate-in fade-in slide-in-from-left-4 duration-500",children:[O.jsx("div",{className:"w-8 h-8 rounded-xl bg-muted/60 border border-border/50 flex items-center justify-center shrink-0 shadow-soft-sm",children:O.jsxs("div",{className:"flex gap-[2px]",children:[O.jsx("span",{className:"w-1 h-1 bg-primary/50 rounded-full animate-bounce [animation-delay:-0.3s]"}),O.jsx("span",{className:"w-1 h-1 bg-primary/50 rounded-full animate-bounce [animation-delay:-0.15s]"}),O.jsx("span",{className:"w-1 h-1 bg-primary/50 rounded-full animate-bounce"})]})}),O.jsx(rc,{})]})]}):O.jsx("div",{className:"flex-1 bg-background"})},(e,t)=>{if(e.messages.length!==t.messages.length)return!1;if(e.isTyping!==t.isTyping)return!1;if(e.primaryColor!==t.primaryColor)return!1;if(e.botName!==t.botName)return!1;if(e.logoUrl!==t.logoUrl)return!1;const n=e.messages[e.messages.length-1],r=t.messages[t.messages.length-1];return n?.id===r?.id}),lc={"image/jpeg":[255,216,255],"image/png":[137,80,78,71,13,10,26,10],"image/webp":[82,73,70,70],"image/gif":[71,73,70,56],"audio/mpeg":[255,251],"audio/wav":[82,73,70,70],"audio/webm":[26,69,223,163],"audio/ogg":[79,103,103,83]};async function cc(e,t={}){const{maxSizeMB:n=10,allowedExtensions:r,checkMagicBytes:o=!0}=t;if(!function(e,t=10){const n=1024*t*1024;return e.size<=n}(e,n))return{valid:!1,error:`El archivo es demasiado grande. Máximo ${n}MB`};if(r&&!function(e,t){const n=e.name.split(".").pop()?.toLowerCase();return!!n&&t.includes(n)}(e,r))return{valid:!1,error:`Extensión no permitida. Solo: ${r.join(", ")}`};if(o){const t=await async function(e){try{const t=lc[e.type];if(!t)return!0;const n=await e.slice(0,12).arrayBuffer(),r=new Uint8Array(n);return t.every((e,t)=>r[t]===e)}catch(t){return console.error("File validation error:",t),!1}}(e);if(!t)return{valid:!1,error:"El archivo está corrupto o no es del tipo indicado"}}return{valid:!0}}const uc=1e3,dc={enableImages:!0,enableAudio:!0,enableFiles:!0,enableLocation:!0,allowedFileTypes:["jpg","jpeg","png","webp","gif","pdf","doc","docx","txt","zip"],maxFileSizeMB:10};function fc({isConnected:e,placeholder:t="Escribe un mensaje...",primaryColor:n,mediaConfig:r,onSendMessage:o,onSendAttachment:i,onSendLocation:a}){const{t:s}=U(),[l,c]=E.useState(""),[u,d]=E.useState(!1),[f,p]=E.useState(!1),[h,m]=E.useState(0),[g,y]=E.useState(null),[b,v]=E.useState(!1),[w,k]=E.useState(!1),x=E.useRef(null),S=E.useRef(null),_=E.useRef(null),C=E.useRef(null),z=E.useRef([]),A=E.useRef(null),N=Lt({primaryColor:n}),T=E.useMemo(()=>({...dc,...r}),[r]),P=E.useMemo(()=>T.enableImages||T.enableAudio||T.enableFiles||T.enableLocation,[T]),I=()=>{const t=l.trim();g?(i?.(g.file,g.type),y(null),c("")):t&&e&&(o(t),c("")),x.current&&(x.current.style.height="40px")},M=async e=>{const t=e.target.files?.[0];if(!t)return;d(!1);const n=await cc(t,{maxSizeMB:T.maxFileSizeMB||10,allowedExtensions:T.allowedFileTypes||["jpg","jpeg","png","webp","gif","pdf","doc","docx","txt","zip"],checkMagicBytes:!0});if(n.valid)if(t.type.startsWith("image/")&&T.enableImages){v(!0);try{const{default:e}=await Promise.resolve().then(()=>My),n={maxSizeMB:.8,maxWidthOrHeight:1200,useWebWorker:!0},r=await e(t,n);y({type:"image",file:r,previewUrl:URL.createObjectURL(r)})}catch(r){qt("Image compression failed:",r),y({type:"image",file:t,previewUrl:URL.createObjectURL(t)})}finally{v(!1)}}else y({type:"file",file:t,previewUrl:""});else alert(n.error||"Archivo no válido")},j=async e=>{if(C.current&&(e||(C.current.onstop=null),C.current.stop(),C.current.stream.getTracks().forEach(e=>e.stop())),A.current&&clearInterval(A.current),p(!1),m(0),e&&z.current.length>0){const e=new Blob(z.current,{type:"audio/webm"}),t=new File([e],`audio-${Date.now()}.webm`,{type:"audio/webm"}),n=await cc(t,{maxSizeMB:10});if(!n.valid)return qt("Audio validation failed:",n.error),alert(n.error),void(z.current=[]);i?.(t,"audio"),z.current=[]}};return O.jsxs("div",{className:"relative",children:[(g||b)&&O.jsx("div",{className:"absolute bottom-full left-0 mb-2 p-2 rounded-2xl border shadow-soft-2xl animate-in slide-in-from-bottom-2 z-50",style:{backgroundColor:"hsl(var(--card))",borderColor:"hsl(var(--border))"},children:O.jsx("div",{className:"relative w-16 h-16",children:b?O.jsx("div",{className:"w-full h-full flex flex-col items-center justify-center bg-muted rounded-xl",children:O.jsx(ne,{className:"animate-spin text-primary h-5 w-5"})}):"image"===g?.type?O.jsxs(O.Fragment,{children:[O.jsx("img",{src:g?.previewUrl,className:"w-full h-full object-cover rounded-xl border",alt:s("preview")}),O.jsx("button",{onClick:()=>y(null),className:"absolute -top-1.5 -right-1.5 bg-destructive text-white rounded-full p-1 shadow-md hover:scale-105",children:O.jsx(fe,{size:10,strokeWidth:3})})]}):O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:"w-full h-full flex flex-col items-center justify-center bg-muted rounded-xl border",children:[O.jsx(X,{className:"text-primary h-6 w-6"}),O.jsx("span",{className:"text-[8px] mt-1 font-bold truncate max-w-[60px]",children:g?.file.name})]}),O.jsx("button",{onClick:()=>y(null),className:"absolute -top-1.5 -right-1.5 bg-destructive text-white rounded-full p-1 shadow-md hover:scale-105",children:O.jsx(fe,{size:10,strokeWidth:3})})]})})}),O.jsx("input",{type:"file",accept:"image/*",className:"hidden",ref:_,onChange:M}),O.jsx("input",{type:"file",accept:T.allowedFileTypes?.map(e=>`.${e}`).join(","),className:"hidden",ref:S,onChange:M}),O.jsxs("div",{className:"flex items-center max-w-full",style:{gap:"var(--spacing-3)"},children:[P&&i&&O.jsxs("div",{className:"relative shrink-0",children:[u&&O.jsxs("div",{className:"absolute bottom-full left-0 flex flex-col animate-in fade-in slide-in-from-bottom-2 duration-300 z-[60]",style:{marginBottom:"var(--spacing-2)",gap:"var(--spacing-2)"},children:[T.enableImages&&O.jsxs("button",{onClick:()=>_.current?.click(),className:"flex items-center border shadow-soft-2xl rounded-2xl transition-colors text-[10px] font-black uppercase tracking-widest",style:{gap:"var(--spacing-3)",padding:"var(--spacing-3) var(--spacing-5)",backgroundColor:"hsl(var(--card))",borderColor:"hsl(var(--border))",color:"hsl(var(--card-foreground))"},children:[O.jsx(te,{size:18,className:"text-blue-500"})," ",s("fotos")]}),T.enableFiles&&O.jsxs("button",{onClick:()=>S.current?.click(),className:"flex items-center border shadow-soft-2xl rounded-2xl transition-colors text-[10px] font-black uppercase tracking-widest",style:{gap:"var(--spacing-3)",padding:"var(--spacing-3) var(--spacing-5)",backgroundColor:"hsl(var(--card))",borderColor:"hsl(var(--border))",color:"hsl(var(--card-foreground))"},children:[O.jsx(X,{size:18,className:"text-purple-500"})," Archivos"]}),T.enableLocation&&a&&O.jsxs("button",{onClick:()=>{k(!0),navigator.geolocation.getCurrentPosition(e=>{a?.({latitude:e.coords.latitude,longitude:e.coords.longitude}),k(!1),d(!1)},()=>k(!1))},className:"flex items-center border shadow-soft-2xl rounded-2xl transition-colors text-[10px] font-black uppercase tracking-widest",style:{gap:"var(--spacing-3)",padding:"var(--spacing-3) var(--spacing-5)",backgroundColor:"hsl(var(--card))",borderColor:"hsl(var(--border))",color:"hsl(var(--card-foreground))"},children:[w?O.jsx(ne,{size:18,className:"animate-spin"}):O.jsx(re,{size:18,className:"text-emerald-500"})," ",s("ubicacion")]})]}),O.jsx("button",{onClick:()=>d(!u),className:Nt("h-10 w-10 rounded-full flex items-center justify-center transition-all shadow-sm z-10",u?"bg-muted text-foreground rotate-45":"bg-muted/50 text-muted-foreground hover:bg-muted"),children:O.jsx(le,{size:22,strokeWidth:2.5})})]}),O.jsx("div",{className:Nt("flex-1 relative flex items-center min-w-0 rounded-[24px] border px-4 transition-all shadow-inner",f?"h-[44px]":"min-h-[40px] max-h-[120px]"),style:{backgroundColor:f?"hsl(var(--destructive) / 0.05)":"hsl(var(--muted))",borderColor:f?"hsl(var(--destructive))":"hsl(var(--border))"},children:f?O.jsxs("div",{className:"flex items-center w-full animate-in zoom-in-95",style:{gap:"var(--spacing-4)"},children:[O.jsx("button",{onClick:()=>j(!1),className:"text-destructive/50 hover:text-destructive",children:O.jsx(de,{size:18})}),O.jsxs("div",{className:"flex-1 flex items-center",style:{gap:"var(--spacing-2)"},children:[O.jsx("div",{className:"flex gap-[3px]",children:[1,2,3,4].map(e=>O.jsx("span",{className:"w-[3px] h-3 bg-destructive/60 rounded-full animate-pulse",style:{animationDelay:.15*e+"s"}},e))}),O.jsxs("span",{className:"text-destructive font-black text-[11px] tabular-nums",children:[Math.floor(h/60),":",(h%60).toString().padStart(2,"0")]})]}),O.jsx("button",{onClick:()=>j(!0),className:"w-7 h-7 rounded-full bg-destructive flex items-center justify-center text-white shadow-lg",children:O.jsx(ce,{size:12,fill:"currentColor"})})]}):O.jsxs("div",{className:"w-full relative flex items-center",children:[O.jsx("textarea",{ref:x,rows:1,value:l,onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||e.ctrlKey||e.metaKey?"Enter"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),I()):(e.preventDefault(),I())},onChange:e=>{const t=e.target.value.slice(0,uc);c(t),x.current&&(x.current.style.height="40px",x.current.style.height=`${Math.min(x.current.scrollHeight,120)}px`)},onFocus:()=>d(!1),placeholder:t,"aria-label":s("accessibility.typeMessage"),"aria-describedby":"send-message-hint","aria-invalid":l.length>uc,disabled:!e,className:"w-full bg-transparent text-sm py-2.5 outline-none resize-none overflow-hidden leading-tight pr-8 scrollbar-none disabled:opacity-50",style:{scrollbarWidth:"none",msOverflowStyle:"none",color:"hsl(var(--foreground))"}}),O.jsx("span",{id:"send-message-hint",className:"sr-only",children:s("accessibility.sendMessageHint")}),l.length>800&&O.jsx("span",{className:Nt("absolute right-0 text-[9px] font-bold tabular-nums",l.length>=uc?"text-destructive":"text-muted-foreground/40"),children:uc-l.length})]})}),!f&&O.jsx(O.Fragment,{children:l.trim()||g?O.jsx("button",{onClick:I,disabled:!e||b&&!!g,className:"h-10 w-10 rounded-full flex items-center justify-center transition-all active:scale-90 shadow-md shadow-primary/20 shrink-0 disabled:opacity-30 disabled:grayscale",style:{backgroundColor:N},children:O.jsx(ce,{size:18,className:"text-white ml-0.5 fill-current"})}):T.enableAudio&&i?O.jsx("button",{onClick:async()=>{if(e)try{const e=await navigator.mediaDevices.getUserMedia({audio:!0}),t=new MediaRecorder(e);C.current=t,z.current=[],t.ondataavailable=e=>z.current.push(e.data),t.onstop=()=>{const e=new File([new Blob(z.current)],"voice.webm",{type:"audio/webm"});i?.(e,"audio")},t.start(),p(!0),A.current=setInterval(()=>m(e=>e+1),1e3)}catch{alert("Micrófono denegado o no disponible")}},disabled:!e,className:"h-10 w-10 rounded-full flex items-center justify-center transition-all active:scale-90 shadow-md shadow-primary/20 shrink-0 disabled:opacity-30 disabled:grayscale",style:{backgroundColor:N},children:O.jsx(ie,{size:20,strokeWidth:2.5,className:"text-white"})}):O.jsx("button",{onClick:I,disabled:!e,className:"h-10 w-10 rounded-full flex items-center justify-center transition-all active:scale-90 shadow-md shadow-primary/20 shrink-0 disabled:opacity-30 disabled:grayscale",style:{backgroundColor:N},children:O.jsx(ce,{size:18,className:"text-white ml-0.5 fill-current"})})})]})]})}function pc(e,t){let n=0,r=null;return function(...o){const i=Date.now(),a=i-n,s=()=>{n=i,e(...o)};a>=t?(r&&(clearTimeout(r),r=null),s()):r||(r=setTimeout(()=>{s(),r=null},t-a))}}function hc(e=640){const[t,n]=E.useState(()=>"undefined"!=typeof window&&window.innerWidth<e);return E.useEffect(()=>{const t=pc(()=>{n(window.innerWidth<e)},250);return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[e]),t}const mc="24px";function gc({isOpen:e,isConnected:t,isTyping:n,messages:r,botName:o="Mar",logoUrl:i,welcomeMessage:a,inputPlaceholder:s,primaryColor:l,mediaConfig:c,onClose:u,onSendMessage:d,bubbleStyles:f,avatars:p,onSendAttachment:h,onSendLocation:m,theme:g}){const[y,b]=E.useState(!1),{t:v}=U(),w=hc(),k=Lt({primaryColor:l}),x=function({isOpen:e,height:t,bottom:n}){const r=hc(),[o,i]=E.useState({}),a=E.useCallback(()=>{if(r){const e=()=>{window.visualViewport?i({height:`${window.visualViewport.height}px`,width:"100%",top:`${window.visualViewport.offsetTop}px`,left:"0px",bottom:"auto",right:"auto",transform:"none"}):i({height:"100dvh",width:"100%",top:"0px",left:"0px"})};return e(),window.visualViewport?.addEventListener("resize",e),window.visualViewport?.addEventListener("scroll",e),()=>{window.visualViewport?.removeEventListener("resize",e),window.visualViewport?.removeEventListener("scroll",e)}}{const e=parseFloat(n||mc)||24,r=window.innerHeight-64-e;if(t){const e=parseFloat(t)||700,o=Math.min(e,r);i({height:`${o}px`,maxHeight:`${r}px`,bottom:n||mc})}else{const e=Math.min(700,Math.max(500,r));i({height:`${e}px`,maxHeight:`${r}px`,bottom:n||mc})}}},[r,t,n]);return E.useEffect(()=>{if(!e)return;const t=a();return window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a),t&&t()}},[e,a]),o}({isOpen:e,height:g?.height,bottom:g?.bottom}),S=function({enabled:e,returnFocusRef:t,onEscape:n}){const r=E.useRef(null),o=E.useRef(null);return E.useEffect(()=>{if(!e)return;o.current=document.activeElement;const i=t?.current,a=r.current;if(!a)return;const s=setTimeout(()=>{const e=a.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');e.length>0?e[0].focus():a.focus()},100),l=e=>{if(a)if("Escape"!==e.key){if("Tab"===e.key){const t=a.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(0===t.length)return;const n=t[0],r=t[t.length-1];e.shiftKey&&document.activeElement===n?(e.preventDefault(),r.focus()):e.shiftKey||document.activeElement!==r||(e.preventDefault(),n.focus())}}else n?.()};return document.addEventListener("keydown",l),()=>{clearTimeout(s),document.removeEventListener("keydown",l);const e=i||o.current;e&&"function"==typeof e.focus&&e.focus()}},[e,n,t]),r}({enabled:e,onEscape:u});if(E.useEffect(()=>{if(e)return w&&(document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.width="100%"),()=>{document.body.style.overflow="",document.body.style.position="",document.body.style.width=""}},[e,w]),!e)return null;const _="bottom-left"===g?.position;return O.jsxs(O.Fragment,{children:[O.jsx("div",{id:"chat-window-description",className:"sr-only",children:v("accessibility.dialogDescription")}),O.jsxs("div",{ref:S,role:"dialog","aria-modal":"true","aria-labelledby":"chat-window-title","aria-describedby":"chat-window-description",tabIndex:-1,className:Nt("flex flex-col overflow-hidden transition-all duration-500 ease-[cubic-bezier(0.16,1,0.3,1)]","text-foreground z-[9999]",!w&&["fixed",_?"left-6":"right-6","w-[350px] min-w-[350px] max-w-[350px]","rounded-[32px] border shadow-soft-2xl","animate-in fade-in zoom-in-95","slide-in-from-bottom-10"],w&&["fixed inset-0 w-full"]),style:{...x,backgroundColor:"hsl(var(--background))",borderColor:"hsl(var(--border))",color:"hsl(var(--foreground))"},children:[O.jsx("header",{className:"relative shrink-0 border-b z-20",style:{padding:"var(--spacing-5)",backgroundColor:"hsl(var(--background) / 0.9)",borderColor:"hsl(var(--border))",backdropFilter:"blur(24px)"},children:O.jsxs("div",{className:"flex items-center justify-between",children:[O.jsxs("div",{className:"flex items-center gap-3",children:[O.jsxs("div",{className:"relative",children:[O.jsx("div",{className:"h-10 w-10 rounded-2xl overflow-hidden bg-primary/10 border-2 border-background shadow-soft-sm",children:y?O.jsx("div",{className:"h-full w-full flex items-center justify-center bg-muted text-muted-foreground",children:O.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})})}):O.jsx("img",{src:i||Qt,alt:o,className:"h-full w-full object-cover",onError:()=>b(!0)})}),O.jsx("div",{className:Nt("absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 rounded-full border-2 border-background",t?"bg-emerald-500":"bg-amber-500 animate-pulse")})]}),O.jsxs("div",{className:"flex flex-col",children:[O.jsxs("div",{className:"flex items-center gap-1",children:[O.jsx("span",{id:"chat-window-title",className:"font-black text-xs uppercase tracking-tight text-foreground",children:o}),O.jsx(ue,{className:"h-3 w-3 text-primary fill-primary/10"})]}),O.jsxs("div",{id:"chat-window-description",className:"flex items-center gap-1.5 mt-0.5",children:[O.jsx("span",{className:"flex h-1 w-1 rounded-full bg-emerald-500"}),O.jsx("span",{className:"text-[9px] font-black text-muted-foreground uppercase tracking-[0.1em]",children:v(t?"online":"offline")})]})]})]}),O.jsx("button",{onClick:u,"aria-label":v("accessibility.closeChat"),title:"Esc",className:"h-8 w-8 flex items-center justify-center rounded-full bg-muted/60 hover:bg-muted text-foreground transition-all active:scale-90 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",children:O.jsx(fe,{className:"h-4 w-4","aria-hidden":"true"})})]})}),O.jsxs("main",{role:"region","aria-label":v("accessibility.chatMessages"),className:"flex-1 min-h-0 relative flex flex-col",style:{padding:"var(--spacing-5)",backgroundColor:"hsl(var(--muted))"},children:[O.jsx(sc,{messages:r,isTyping:n,welcomeMessage:a,primaryColor:l,logoUrl:i,botName:o,bubbleStyles:f,avatars:p}),O.jsx("div",{className:"absolute top-0 left-0 right-0 h-6 bg-gradient-to-b from-background/10 to-transparent pointer-events-none"})]}),O.jsxs("footer",{className:"border-t",style:{paddingTop:"var(--spacing-5)",paddingLeft:"var(--spacing-5)",paddingRight:"var(--spacing-5)",paddingBottom:w?"max(var(--spacing-3), env(safe-area-inset-bottom))":"var(--spacing-3)",backgroundColor:"hsl(var(--background))",borderColor:"hsl(var(--border))"},children:[O.jsx(fc,{isConnected:t,placeholder:s,primaryColor:k,mediaConfig:c,onSendMessage:d,onSendAttachment:h,onSendLocation:m}),O.jsxs("div",{className:"flex items-center justify-center gap-1 opacity-25 select-none",style:{marginTop:"var(--spacing-2)",paddingBottom:"var(--spacing-1)"},children:[O.jsx(ee,{className:"h-2 w-2 text-primary fill-primary"}),O.jsx("span",{className:"text-[7px] font-bold uppercase tracking-[0.2em]",children:v("con_amor_paseo_libre")})]})]})]})]})}class yc extends E.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){qt("ErrorBoundary caught error:",e,t),this.props.onError?.(e,t)}handleReset=()=>{this.setState({hasError:!1,error:null})};render(){return this.state.hasError?this.props.fallback?this.props.fallback:O.jsxs("div",{className:"flex flex-col items-center justify-center p-8 bg-background text-center",children:[O.jsx("div",{className:"text-6xl mb-4",children:"⚠️"}),O.jsx("h2",{className:"text-xl font-bold text-foreground mb-2",children:"Algo salió mal"}),O.jsx("p",{className:"text-sm text-muted-foreground mb-6 max-w-md",children:this.state.error?.message||"Ocurrió un error inesperado"}),O.jsx("button",{onClick:this.handleReset,className:"px-4 py-2 bg-primary text-primary-foreground rounded-lg font-medium hover:opacity-90 transition-opacity",children:"Intentar de nuevo"})]}):this.props.children}}const bc={bubble:"rounded-2xl",image:"rounded-xl",button:"rounded-xl",card:"rounded-2xl"},vc={bg:"bg-muted/50 dark:bg-muted/20",text:"text-foreground",border:"border-border/50"},wc={text:"text-primary-foreground"};function kc(e,t){const n=function(){const[e,t]=E.useState(()=>"undefined"!=typeof window&&(window.matchMedia("(prefers-contrast: high)").matches||window.matchMedia("(prefers-contrast: more)").matches));return E.useEffect(()=>{const e=window.matchMedia("(prefers-contrast: high)"),n=window.matchMedia("(prefers-contrast: more)"),r=e=>{t(e.matches)};return e.addEventListener("change",r),n.addEventListener("change",r),()=>{e.removeEventListener("change",r),n.removeEventListener("change",r)}},[]),e}(),r=E.useMemo(()=>{const r=function(e,t){const n={...Tt,...t?.cssVariables||{},...e?.cssVariables||{}};return{primaryColor:e?.primaryColor||t?.primaryColor||Ot,botName:e?.botName||t?.botName||Pt,logoUrl:e?.logoUrl||t?.logoUrl||It,position:e?.position||t?.position||Mt,welcomeMessage:e?.welcomeMessage||t?.welcomeMessage||jt,inputPlaceholder:e?.inputPlaceholder||t?.inputPlaceholder||Ft,cssVariables:n}}(e,t);return n?{...r,primaryColor:"#000000",cssVariables:{...r.cssVariables,background:"#FFFFFF",foreground:"#000000",card:"#FFFFFF",cardForeground:"#000000",primary:"#000000",primaryForeground:"#FFFFFF",muted:"#F5F5F5",mutedForeground:"#000000",border:"#000000"}}:r},[e,t,n]),o=E.useMemo(()=>({radius:{...bc,...e?.bubbleStyles?.radius},bot:{...vc,...e?.bubbleStyles?.bot},user:{...wc,...e?.bubbleStyles?.user},launcher:{...e?.bubbleStyles?.launcher},mapCard:{...e?.bubbleStyles?.mapCard}}),[e?.bubbleStyles]);return{mergedTheme:r,mergedStyles:o,getContainerStyle:(e,t,n)=>({"--chat-primary":r.primaryColor,zIndex:e?2147483647:9999,position:"fixed",top:t&&e?0:"auto",left:t&&e?0:"bottom-left"===n?"24px":"auto",right:t&&e?0:"bottom-right"!==n&&n?"auto":"24px",bottom:t&&e?0:"100px",width:t&&e?"100%":"auto",height:t&&e?"100%":"auto"})}}const xc=(e,t)=>t.some(t=>e instanceof t);let Sc,_c;const Ec=new WeakMap,Cc=new WeakMap,zc=new WeakMap;let Ac={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return Ec.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Pc(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function Nc(e){Ac=e(Ac)}function Tc(e){return(_c||(_c=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(Ic(this),t),Pc(this.request)}:function(...t){return Pc(e.apply(Ic(this),t))}}function Oc(e){return"function"==typeof e?Tc(e):(e instanceof IDBTransaction&&function(e){if(Ec.has(e))return;const t=new Promise((t,n)=>{const r=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",i),e.removeEventListener("abort",i)},o=()=>{t(),r()},i=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",o),e.addEventListener("error",i),e.addEventListener("abort",i)});Ec.set(e,t)}(e),xc(e,Sc||(Sc=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,Ac):e)}function Pc(e){if(e instanceof IDBRequest)return function(e){const t=new Promise((t,n)=>{const r=()=>{e.removeEventListener("success",o),e.removeEventListener("error",i)},o=()=>{t(Pc(e.result)),r()},i=()=>{n(e.error),r()};e.addEventListener("success",o),e.addEventListener("error",i)});return zc.set(t,e),t}(e);if(Cc.has(e))return Cc.get(e);const t=Oc(e);return t!==e&&(Cc.set(e,t),zc.set(t,e)),t}const Ic=e=>zc.get(e);const Mc=["get","getKey","getAll","getAllKeys","count"],jc=["put","add","delete","clear"],Fc=new Map;function Lc(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(Fc.get(t))return Fc.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=jc.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!o&&!Mc.includes(n))return;const i=async function(e,...t){const i=this.transaction(e,o?"readwrite":"readonly");let a=i.store;return r&&(a=a.index(t.shift())),(await Promise.all([a[n](...t),o&&i.done]))[0]};return Fc.set(t,i),i}Nc(e=>({...e,get:(t,n,r)=>Lc(t,n)||e.get(t,n,r),has:(t,n)=>!!Lc(t,n)||e.has(t,n)}));const Dc=["continue","continuePrimaryKey","advance"],Rc={},Uc=new WeakMap,Bc=new WeakMap,$c={get(e,t){if(!Dc.includes(t))return e[t];let n=Rc[t];return n||(n=Rc[t]=function(...e){Uc.set(this,Bc.get(this)[t](...e))}),n}};async function*Hc(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;const n=new Proxy(t,$c);for(Bc.set(n,t),zc.set(n,Ic(t));t;)yield n,t=await(Uc.get(n)||t.continue()),Uc.delete(n)}function Vc(e,t){return t===Symbol.asyncIterator&&xc(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&xc(e,[IDBIndex,IDBObjectStore])}Nc(e=>({...e,get:(t,n,r)=>Vc(t,n)?Hc:e.get(t,n,r),has:(t,n)=>Vc(t,n)||e.has(t,n)}));const qc=new class{db=null;DB_NAME="botuyo-chat";DB_VERSION=1;async init(){try{this.db=await function(e,t,{blocked:n,upgrade:r,blocking:o,terminated:i}={}){const a=indexedDB.open(e,t),s=Pc(a);return r&&a.addEventListener("upgradeneeded",e=>{r(Pc(a.result),e.oldVersion,e.newVersion,Pc(a.transaction),e)}),n&&a.addEventListener("blocked",e=>n(e.oldVersion,e.newVersion,e)),s.then(e=>{i&&e.addEventListener("close",()=>i()),o&&e.addEventListener("versionchange",e=>o(e.oldVersion,e.newVersion,e))}).catch(()=>{}),s}(this.DB_NAME,this.DB_VERSION,{upgrade(e){if(!e.objectStoreNames.contains("messages")){e.createObjectStore("messages",{keyPath:"id"}).createIndex("by-timestamp","timestamp")}e.objectStoreNames.contains("metadata")||e.createObjectStore("metadata")}}),Zt("IndexedDB initialized")}catch(e){throw qt("Failed to initialize IndexedDB:",e),e}}async saveMessage(e){this.db||await this.init();try{await this.db.put("messages",e)}catch(t){qt("Failed to save message:",t)}}async saveMessages(e){this.db||await this.init();try{const t=this.db.transaction("messages","readwrite");await Promise.all([...e.map(e=>t.store.put(e)),t.done])}catch(t){qt("Failed to save messages:",t)}}async getMessages(e=100){this.db||await this.init();try{return(await this.db.getAllFromIndex("messages","by-timestamp")).slice(-e)}catch(t){return qt("Failed to get messages:",t),[]}}async getMessage(e){this.db||await this.init();try{return await this.db.get("messages",e)}catch(t){return void qt("Failed to get message:",t)}}async deleteMessage(e){this.db||await this.init();try{await this.db.delete("messages",e)}catch(t){qt("Failed to delete message:",t)}}async clearMessages(){this.db||await this.init();try{await this.db.clear("messages"),Zt("Messages cleared from IndexedDB")}catch(e){qt("Failed to clear messages:",e)}}async setMetadata(e){this.db||await this.init();try{await this.db.put("metadata",e,"chat-metadata")}catch(t){qt("Failed to set metadata:",t)}}async getMetadata(){this.db||await this.init();try{return await this.db.get("metadata","chat-metadata")}catch(e){return qt("Failed to get metadata:",e),null}}async clearAll(){this.db||await this.init();try{await Promise.all([this.db.clear("messages"),this.db.clear("metadata")]),Zt("All data cleared from IndexedDB")}catch(e){qt("Failed to clear all data:",e)}}async migrateFromLocalStorage(){try{const e="botuyo_chat_v1",t=localStorage.getItem(e);if(!t)return;const n=JSON.parse(t);if(n.messages&&Array.isArray(n.messages)){const e=n.messages.map(e=>({...e,timestamp:new Date(e.timestamp)}));await this.saveMessages(e),Zt(`Migrated ${e.length} messages from localStorage`)}n.sessionId&&await this.setMetadata({sessionId:n.sessionId}),localStorage.removeItem(e),Zt("Migration from localStorage completed")}catch(e){qt("Failed to migrate from localStorage:",e)}}},Wc="botuyo_chat_v1",Zc={isOpen:!1,isConnected:!1,isTyping:!1,messages:[],error:null,sessionId:null};function Qc(e,t){switch(t.type){case"TOGGLE_WINDOW":return{...e,isOpen:!e.isOpen};case"OPEN_WINDOW":return{...e,isOpen:!0};case"CLOSE_WINDOW":return{...e,isOpen:!1};case"SET_CONNECTED":return{...e,isConnected:t.payload};case"SET_TYPING":return{...e,isTyping:t.payload};case"ADD_MESSAGE":{if(e.messages.some(e=>e.id===t.payload.id))return e;const n=[...e.messages,t.payload],r="bot"===t.payload.sender;return{...e,messages:n,isTyping:!r&&e.isTyping}}case"SET_MESSAGES":return{...e,messages:[...t.payload]};case"SET_ERROR":return{...e,error:t.payload};case"SET_SESSION_ID":return{...e,sessionId:t.payload};case"CLEAR_CHAT":return{...Zc,isOpen:e.isOpen};case"RESTORE_SESSION":return{...e,...t.payload,isConnected:!1,isTyping:!1,error:null};default:return e}}function Kc(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:a,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);const o=a.prototype,i=Object.keys(o);for(let e=0;e<i.length;e++){const t=i[e];t in n||(n[t]=o[t].bind(n))}}const o=n?.Parent??Object;class i extends o{}function a(e){var t;const o=n?.Parent?new i:this;r(o,e),(t=o._zod).deferred??(t.deferred=[]);for(const n of o._zod.deferred)n();return o}return Object.defineProperty(i,"name",{value:e}),Object.defineProperty(a,"init",{value:r}),Object.defineProperty(a,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}class Gc extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Yc extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const Jc={};function Xc(e){return Jc}function eu(e){const t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function tu(e,t){return"bigint"==typeof t?t.toString():t}function nu(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function ru(e){return null==e}function ou(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const iu=Symbol("evaluating");function au(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==iu)return void 0===r&&(r=iu,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function su(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function lu(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function cu(e){return JSON.stringify(e)}const uu="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function du(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const fu=nu(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function pu(e){if(!1===du(e))return!1;const t=e.constructor;if(void 0===t)return!0;if("function"!=typeof t)return!0;const n=t.prototype;return!1!==du(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function hu(e){return pu(e)?{...e}:Array.isArray(e)?[...e]:e}const mu=new Set(["string","number","symbol"]);function gu(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function yu(e,t,n){const r=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(r._zod.parent=e),r}function bu(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}const vu={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function wu(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function ku(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function xu(e){return"string"==typeof e?e:e?.message}function Su(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=xu(e.inst?._zod.def?.error?.(e))??xu(t?.error?.(e))??xu(n.customError?.(e))??xu(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function _u(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function Eu(...e){const[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}const Cu=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,tu,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},zu=Kc("$ZodError",Cu),Au=Kc("$ZodError",Cu,{Parent:Error});const Nu=e=>(t,n,r,o)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Gc;if(a.issues.length){const t=new(o?.Err??e)(a.issues.map(e=>Su(e,i,Xc())));throw uu(t,o?.callee),t}return a.value},Tu=e=>async(t,n,r,o)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){const t=new(o?.Err??e)(a.issues.map(e=>Su(e,i,Xc())));throw uu(t,o?.callee),t}return a.value},Ou=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new Gc;return i.issues.length?{success:!1,error:new(e??zu)(i.issues.map(e=>Su(e,o,Xc())))}:{success:!0,data:i.value}},Pu=Ou(Au),Iu=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(e=>Su(e,o,Xc())))}:{success:!0,data:i.value}},Mu=Iu(Au),ju=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Nu(e)(t,n,o)},Fu=e=>(t,n,r)=>Nu(e)(t,n,r),Lu=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Tu(e)(t,n,o)},Du=e=>async(t,n,r)=>Tu(e)(t,n,r),Ru=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ou(e)(t,n,o)},Uu=e=>(t,n,r)=>Ou(e)(t,n,r),Bu=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Iu(e)(t,n,o)},$u=e=>async(t,n,r)=>Iu(e)(t,n,r),Hu=/^[cC][^\s-]{8,}$/,Vu=/^[0-9a-z]+$/,qu=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Wu=/^[0-9a-vA-V]{20}$/,Zu=/^[A-Za-z0-9]{27}$/,Qu=/^[a-zA-Z0-9_-]{21}$/,Ku=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Gu=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Yu=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ju=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;const Xu=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ed=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,td=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,nd=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,rd=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,od=/^[A-Za-z0-9_-]*$/,id=/^\+[1-9]\d{6,14}$/,ad="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",sd=new RegExp(`^${ad}$`);function ld(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}const cd=/^-?\d+$/,ud=/^-?\d+(?:\.\d+)?$/,dd=/^[^A-Z]*$/,fd=/^[^a-z]*$/,pd=Kc("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),hd={number:"number",bigint:"bigint",object:"date"},md=Kc("$ZodCheckLessThan",(e,t)=>{pd.init(e,t);const n=hd[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),gd=Kc("$ZodCheckGreaterThan",(e,t)=>{pd.init(e,t);const n=hd[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),yd=Kc("$ZodCheckMultipleOf",(e,t)=>{pd.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===function(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let o=(r.split(".")[1]||"").length;if(0===o&&/\d?e-\d?/.test(r)){const e=r.match(/\d?e-(\d?)/);e?.[1]&&(o=Number.parseInt(e[1]))}const i=n>o?n:o;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),bd=Kc("$ZodCheckNumberFormat",(e,t)=>{pd.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,i]=vu[t.format];e._zod.onattach.push(e=>{const r=e._zod.bag;r.format=t.format,r.minimum=o,r.maximum=i,n&&(r.pattern=cd)}),e._zod.check=a=>{const s=a.value;if(n){if(!Number.isInteger(s))return void a.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}))}s<o&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),vd=Kc("$ZodCheckMaxLength",(e,t)=>{var n;pd.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!ru(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const r=n.value;if(r.length<=t.maximum)return;const o=_u(r);n.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),wd=Kc("$ZodCheckMinLength",(e,t)=>{var n;pd.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!ru(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const r=n.value;if(r.length>=t.minimum)return;const o=_u(r);n.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),kd=Kc("$ZodCheckLengthEquals",(e,t)=>{var n;pd.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!ru(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{const r=n.value,o=r.length;if(o===t.length)return;const i=_u(r),a=o>t.length;n.issues.push({origin:i,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),xd=Kc("$ZodCheckStringFormat",(e,t)=>{var n,r;pd.init(e,t),e._zod.onattach.push(e=>{const n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Sd=Kc("$ZodCheckRegex",(e,t)=>{xd.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),_d=Kc("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=dd),xd.init(e,t)}),Ed=Kc("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=fd),xd.init(e,t)}),Cd=Kc("$ZodCheckIncludes",(e,t)=>{pd.init(e,t);const n=gu(t.includes),r=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),zd=Kc("$ZodCheckStartsWith",(e,t)=>{pd.init(e,t);const n=new RegExp(`^${gu(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Ad=Kc("$ZodCheckEndsWith",(e,t)=>{pd.init(e,t);const n=new RegExp(`.*${gu(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Nd=Kc("$ZodCheckOverwrite",(e,t)=>{pd.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class Td{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e);for(const o of r)this.content.push(o)}compile(){const e=Function,t=this?.args;return new e(...t,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}}const Od={major:4,minor:3,patch:6},Pd=Kc("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Od;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const o of r)for(const t of o._zod.onattach)t(e);if(0===r.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(e,t,n)=>{let r,o=wu(e);for(const i of t){if(i._zod.def.when){if(!i._zod.def.when(e))continue}else if(o)continue;const t=e.issues.length,a=i._zod.check(e);if(a instanceof Promise&&!1===n?.async)throw new Gc;if(r||a instanceof Promise)r=(r??Promise.resolve()).then(async()=>{await a;e.issues.length!==t&&(o||(o=wu(e,t)))});else{if(e.issues.length===t)continue;o||(o=wu(e,t))}}return r?r.then(()=>e):e},n=(n,o,i)=>{if(wu(n))return n.aborted=!0,n;const a=t(o,r,i);if(a instanceof Promise){if(!1===i.async)throw new Gc;return a.then(t=>e._zod.parse(t,i))}return e._zod.parse(a,i)};e._zod.run=(o,i)=>{if(i.skipChecks)return e._zod.parse(o,i);if("backward"===i.direction){const t=e._zod.parse({value:o.value,issues:[]},{...i,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,o,i)):n(t,o,i)}const a=e._zod.parse(o,i);if(a instanceof Promise){if(!1===i.async)throw new Gc;return a.then(e=>t(e,r,i))}return t(a,r,i)}}au(e,"~standard",()=>({validate:t=>{try{const n=Pu(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return Mu(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),Id=Kc("$ZodString",(e,t)=>{var n;Pd.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(n=e._zod.bag,new RegExp(`^${n?`[\\s\\S]{${n?.minimum??0},${n?.maximum??""}}`:"[\\s\\S]*"}$`)),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch(o){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Md=Kc("$ZodStringFormat",(e,t)=>{xd.init(e,t),Id.init(e,t)}),jd=Kc("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Gu),Md.init(e,t)}),Fd=Kc("$ZodUUID",(e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Yu(e))}else t.pattern??(t.pattern=Yu());Md.init(e,t)}),Ld=Kc("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Ju),Md.init(e,t)}),Dd=Kc("$ZodURL",(e,t)=>{Md.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=new URL(r);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(t.normalize?n.value=o.href:n.value=r)}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Rd=Kc("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Md.init(e,t)}),Ud=Kc("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Qu),Md.init(e,t)}),Bd=Kc("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Hu),Md.init(e,t)}),$d=Kc("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Vu),Md.init(e,t)}),Hd=Kc("$ZodULID",(e,t)=>{t.pattern??(t.pattern=qu),Md.init(e,t)}),Vd=Kc("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Wu),Md.init(e,t)}),qd=Kc("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Zu),Md.init(e,t)}),Wd=Kc("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){const t=ld({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${ad}T(?:${r})$`)}(t)),Md.init(e,t)}),Zd=Kc("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=sd),Md.init(e,t)}),Qd=Kc("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=new RegExp(`^${ld(t)}$`)),Md.init(e,t)}),Kd=Kc("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Ku),Md.init(e,t)}),Gd=Kc("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Xu),Md.init(e,t),e._zod.bag.format="ipv4"}),Yd=Kc("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=ed),Md.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Jd=Kc("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=td),Md.init(e,t)}),Xd=Kc("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=nd),Md.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(2!==r.length)throw new Error;const[e,t]=r;if(!t)throw new Error;const n=Number(t);if(`${n}`!==t)throw new Error;if(n<0||n>128)throw new Error;new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function ef(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const tf=Kc("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=rd),Md.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{ef(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});const nf=Kc("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=od),Md.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{(function(e){if(!od.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return ef(t.padEnd(4*Math.ceil(t.length/4),"="))})(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),rf=Kc("$ZodE164",(e,t)=>{t.pattern??(t.pattern=id),Md.init(e,t)});const of=Kc("$ZodJWT",(e,t)=>{Md.init(e,t),e._zod.check=n=>{(function(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&"JWT"!==o?.typ||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),af=Kc("$ZodNumber",(e,t)=>{Pd.init(e,t),e._zod.pattern=e._zod.bag.pattern??ud,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch(a){}const o=n.value;if("number"==typeof o&&!Number.isNaN(o)&&Number.isFinite(o))return n;const i="number"==typeof o?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),n}}),sf=Kc("$ZodNumberFormat",(e,t)=>{bd.init(e,t),af.init(e,t)}),lf=Kc("$ZodAny",(e,t)=>{Pd.init(e,t),e._zod.parse=e=>e}),cf=Kc("$ZodUnknown",(e,t)=>{Pd.init(e,t),e._zod.parse=e=>e}),uf=Kc("$ZodNever",(e,t)=>{Pd.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function df(e,t,n){e.issues.length&&t.issues.push(...ku(n,e.issues)),t.value[n]=e.value}const ff=Kc("$ZodArray",(e,t)=>{Pd.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const i=[];for(let e=0;e<o.length;e++){const a=o[e],s=t.element._zod.run({value:a,issues:[]},r);s instanceof Promise?i.push(s.then(t=>df(t,n,e))):df(s,n,e)}return i.length?Promise.all(i).then(()=>n):n}});function pf(e,t,n,r,o){if(e.issues.length){if(o&&!(n in r))return;t.issues.push(...ku(n,e.issues))}void 0===e.value?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function hf(e){const t=Object.keys(e.shape);for(const o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);const n=(r=e.shape,Object.keys(r).filter(e=>"optional"===r[e]._zod.optin&&"optional"===r[e]._zod.optout));var r;return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function mf(e,t,n,r,o,i){const a=[],s=o.keySet,l=o.catchall._zod,c=l.def.type,u="optional"===l.optout;for(const d in t){if(s.has(d))continue;if("never"===c){a.push(d);continue}const o=l.run({value:t[d],issues:[]},r);o instanceof Promise?e.push(o.then(e=>pf(e,n,d,t,u))):pf(o,n,d,t,u)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const gf=Kc("$ZodObject",(e,t)=>{Pd.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!n?.get){const e=t.shape;Object.defineProperty(t,"shape",{get:()=>{const n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}const r=nu(()=>hf(t));au(e._zod,"propValues",()=>{const e=t.shape,n={};for(const t in e){const r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(const e of r.values)n[t].add(e)}}return n});const o=du,i=t.catchall;let a;e._zod.parse=(t,n)=>{a??(a=r.value);const s=t.value;if(!o(s))return t.issues.push({expected:"object",code:"invalid_type",input:s,inst:e}),t;t.value={};const l=[],c=a.shape;for(const e of a.keys){const r=c[e],o="optional"===r._zod.optout,i=r._zod.run({value:s[e],issues:[]},n);i instanceof Promise?l.push(i.then(n=>pf(n,t,e,s,o))):pf(i,t,e,s,o)}return i?mf(l,s,t,n,r.value,e):l.length?Promise.all(l).then(()=>t):t}}),yf=Kc("$ZodObjectJIT",(e,t)=>{gf.init(e,t);const n=e._zod.parse,r=nu(()=>hf(t));let o;const i=du,a=!Jc.jitless,s=a&&fu.value,l=t.catchall;let c;e._zod.parse=(u,d)=>{c??(c=r.value);const f=u.value;return i(f)?a&&s&&!1===d?.async&&!0!==d.jitless?(o||(o=(e=>{const t=new Td(["shape","payload","ctx"]),n=r.value,o=e=>{const t=cu(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const i=Object.create(null);let a=0;for(const r of n.keys)i[r]="key_"+a++;t.write("const newResult = {};");for(const r of n.keys){const n=i[r],a=cu(r),s=e[r],l="optional"===s?._zod?.optout;t.write(`const ${n} = ${o(r)};`),l?t.write(`\n if (${n}.issues.length) {\n if (${a} in input) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${a}, ...iss.path] : [${a}]\n })));\n }\n }\n \n if (${n}.value === undefined) {\n if (${a} in input) {\n newResult[${a}] = undefined;\n }\n } else {\n newResult[${a}] = ${n}.value;\n }\n \n `):t.write(`\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${a}, ...iss.path] : [${a}]\n })));\n }\n \n if (${n}.value === undefined) {\n if (${a} in input) {\n newResult[${a}] = undefined;\n }\n } else {\n newResult[${a}] = ${n}.value;\n }\n \n `)}t.write("payload.value = newResult;"),t.write("return payload;");const s=t.compile();return(t,n)=>s(e,t,n)})(t.shape)),u=o(u,d),l?mf([],f,u,d,c,e):u):n(u,d):(u.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),u)}});function bf(e,t,n,r){for(const i of e)if(0===i.issues.length)return t.value=i.value,t;const o=e.filter(e=>!wu(e));return 1===o.length?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Su(e,r,Xc())))}),t)}const vf=Kc("$ZodUnion",(e,t)=>{Pd.init(e,t),au(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),au(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),au(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),au(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){const e=t.options.map(e=>e._zod.pattern);return new RegExp(`^(${e.map(e=>ou(e.source)).join("|")})$`)}});const n=1===t.options.length,r=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(n)return r(o,i);let a=!1;const s=[];for(const e of t.options){const t=e._zod.run({value:o.value,issues:[]},i);if(t instanceof Promise)s.push(t),a=!0;else{if(0===t.issues.length)return t;s.push(t)}}return a?Promise.all(s).then(t=>bf(t,o,e,i)):bf(s,o,e,i)}}),wf=Kc("$ZodIntersection",(e,t)=>{Pd.init(e,t),e._zod.parse=(e,n)=>{const r=e.value,o=t.left._zod.run({value:r,issues:[]},n),i=t.right._zod.run({value:r,issues:[]},n);return o instanceof Promise||i instanceof Promise?Promise.all([o,i]).then(([t,n])=>xf(e,t,n)):xf(e,o,i)}});function kf(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(pu(e)&&pu(t)){const n=Object.keys(t),r=Object.keys(e).filter(e=>-1!==n.indexOf(e)),o={...e,...t};for(const i of r){const n=kf(e[i],t[i]);if(!n.valid)return{valid:!1,mergeErrorPath:[i,...n.mergeErrorPath]};o[i]=n.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=kf(e[r],t[r]);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function xf(e,t,n){const r=new Map;let o;for(const s of t.issues)if("unrecognized_keys"===s.code){o??(o=s);for(const e of s.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(s);for(const s of n.issues)if("unrecognized_keys"===s.code)for(const e of s.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(s);const i=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(i.length&&o&&e.issues.push({...o,keys:i}),wu(e))return e;const a=kf(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}const Sf=Kc("$ZodEnum",(e,t)=>{Pd.init(e,t);const n=eu(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(e=>mu.has(typeof e)).map(e=>"string"==typeof e?gu(e):e.toString()).join("|")})$`),e._zod.parse=(t,o)=>{const i=t.value;return r.has(i)||t.issues.push({code:"invalid_value",values:n,input:i,inst:e}),t}}),_f=Kc("$ZodTransform",(e,t)=>{Pd.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new Yc(e.constructor.name);const o=t.transform(n.value,n);if(r.async){return(o instanceof Promise?o:Promise.resolve(o)).then(e=>(n.value=e,n))}if(o instanceof Promise)throw new Gc;return n.value=o,n}});function Ef(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const Cf=Kc("$ZodOptional",(e,t)=>{Pd.init(e,t),e._zod.optin="optional",e._zod.optout="optional",au(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),au(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${ou(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>Ef(t,e.value)):Ef(r,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),zf=Kc("$ZodExactOptional",(e,t)=>{Cf.init(e,t),au(e._zod,"values",()=>t.innerType._zod.values),au(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Af=Kc("$ZodNullable",(e,t)=>{Pd.init(e,t),au(e._zod,"optin",()=>t.innerType._zod.optin),au(e._zod,"optout",()=>t.innerType._zod.optout),au(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${ou(e.source)}|null)$`):void 0}),au(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),Nf=Kc("$ZodDefault",(e,t)=>{Pd.init(e,t),e._zod.optin="optional",au(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Tf(e,t)):Tf(r,t)}});function Tf(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const Of=Kc("$ZodPrefault",(e,t)=>{Pd.init(e,t),e._zod.optin="optional",au(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Pf=Kc("$ZodNonOptional",(e,t)=>{Pd.init(e,t),au(e._zod,"values",()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(t=>If(t,e)):If(o,e)}});function If(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Mf=Kc("$ZodCatch",(e,t)=>{Pd.init(e,t),au(e._zod,"optin",()=>t.innerType._zod.optin),au(e._zod,"optout",()=>t.innerType._zod.optout),au(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Su(e,n,Xc()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Su(e,n,Xc()))},input:e.value}),e.issues=[]),e)}}),jf=Kc("$ZodPipe",(e,t)=>{Pd.init(e,t),au(e._zod,"values",()=>t.in._zod.values),au(e._zod,"optin",()=>t.in._zod.optin),au(e._zod,"optout",()=>t.out._zod.optout),au(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){const r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Ff(e,t.in,n)):Ff(r,t.in,n)}const r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Ff(e,t.out,n)):Ff(r,t.out,n)}});function Ff(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Lf=Kc("$ZodReadonly",(e,t)=>{Pd.init(e,t),au(e._zod,"propValues",()=>t.innerType._zod.propValues),au(e._zod,"values",()=>t.innerType._zod.values),au(e._zod,"optin",()=>t.innerType?._zod?.optin),au(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Df):Df(r)}});function Df(e){return e.value=Object.freeze(e.value),e}const Rf=Kc("$ZodCustom",(e,t)=>{pd.init(e,t),Pd.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(t=>Uf(t,n,r,e));Uf(o,n,r,e)}});function Uf(e,t,n,r){if(!e){const e={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Eu(e))}}var Bf;class $f{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];return this._map.set(e,n),n&&"object"==typeof n&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}(Bf=globalThis).__zod_globalRegistry??(Bf.__zod_globalRegistry=new $f);const Hf=globalThis.__zod_globalRegistry;function Vf(e,t){return new e({type:"string",...bu(t)})}function qf(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...bu(t)})}function Wf(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...bu(t)})}function Zf(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...bu(t)})}function Qf(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...bu(t)})}function Kf(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...bu(t)})}function Gf(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...bu(t)})}function Yf(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...bu(t)})}function Jf(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...bu(t)})}function Xf(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...bu(t)})}function ep(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...bu(t)})}function tp(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...bu(t)})}function np(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...bu(t)})}function rp(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...bu(t)})}function op(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...bu(t)})}function ip(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...bu(t)})}function ap(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...bu(t)})}function sp(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...bu(t)})}function lp(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...bu(t)})}function cp(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...bu(t)})}function up(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...bu(t)})}function dp(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...bu(t)})}function fp(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...bu(t)})}function pp(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...bu(t)})}function hp(e,t){return new e({type:"string",format:"date",check:"string_format",...bu(t)})}function mp(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...bu(t)})}function gp(e,t){return new e({type:"string",format:"duration",check:"string_format",...bu(t)})}function yp(e,t){return new e({type:"number",checks:[],...bu(t)})}function bp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...bu(t)})}function vp(e){return new e({type:"any"})}function wp(e){return new e({type:"unknown"})}function kp(e,t){return new e({type:"never",...bu(t)})}function xp(e,t){return new md({check:"less_than",...bu(t),value:e,inclusive:!1})}function Sp(e,t){return new md({check:"less_than",...bu(t),value:e,inclusive:!0})}function _p(e,t){return new gd({check:"greater_than",...bu(t),value:e,inclusive:!1})}function Ep(e,t){return new gd({check:"greater_than",...bu(t),value:e,inclusive:!0})}function Cp(e,t){return new yd({check:"multiple_of",...bu(t),value:e})}function zp(e,t){return new vd({check:"max_length",...bu(t),maximum:e})}function Ap(e,t){return new wd({check:"min_length",...bu(t),minimum:e})}function Np(e,t){return new kd({check:"length_equals",...bu(t),length:e})}function Tp(e,t){return new Sd({check:"string_format",format:"regex",...bu(t),pattern:e})}function Op(e){return new _d({check:"string_format",format:"lowercase",...bu(e)})}function Pp(e){return new Ed({check:"string_format",format:"uppercase",...bu(e)})}function Ip(e,t){return new Cd({check:"string_format",format:"includes",...bu(t),includes:e})}function Mp(e,t){return new zd({check:"string_format",format:"starts_with",...bu(t),prefix:e})}function jp(e,t){return new Ad({check:"string_format",format:"ends_with",...bu(t),suffix:e})}function Fp(e){return new Nd({check:"overwrite",tx:e})}function Lp(e){return Fp(t=>t.normalize(e))}function Dp(){return Fp(e=>e.trim())}function Rp(){return Fp(e=>e.toLowerCase())}function Up(){return Fp(e=>e.toUpperCase())}function Bp(){return Fp(e=>function(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}(e))}function $p(e,t,n){return new e({type:"array",element:t,...bu(n)})}function Hp(e,t,n){return new e({type:"custom",check:"custom",fn:t,...bu(n)})}function Vp(e){const t=qp(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(Eu(e,n.value,t._zod.def));else{const r=e;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),n.issues.push(Eu(r))}},e(n.value,n)));return t}function qp(e,t){const n=new pd({check:"custom",...bu(t)});return n._zod.check=e,n}function Wp(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Hf,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Zp(e,t,n={path:[],schemaPath:[]}){var r;const o=e._zod.def,i=t.seen.get(e);if(i){i.count++;return n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema}const a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);const s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{const r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,r);else{const n=a.schema,i=t.processors[o.type];if(!i)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);i(e,t,n,r)}const i=e._zod.parent;i&&(a.ref||(a.ref=i),Zp(i,t,r),t.seen.get(i).isParent=!0)}const l=t.metadataRegistry.get(e);l&&Object.assign(a.schema,l),"input"===t.io&&Gp(e)&&(delete a.schema.examples,delete a.schema.default),"input"===t.io&&a.schema._prefault&&((r=a.schema).default??(r.default=a.schema._prefault)),delete a.schema._prefault;return t.seen.get(e).schema}function Qp(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const i of e.seen.entries()){const t=e.metadataRegistry.get(i[0])?.id;if(t){const e=r.get(t);if(e&&e!==i[0])throw new Error(`Duplicate schema id "${t}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(t,i[0])}}const o=t=>{if(t[1].schema.$ref)return;const r=t[1],{ref:o,defId:i}=(t=>{const r="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){const n=e.external.registry.get(t[0])?.id,o=e.external.uri??(e=>e);if(n)return{ref:o(n)};const i=t[1].defId??t[1].schema.id??"schema"+e.counter++;return t[1].defId=i,{defId:i,ref:`${o("__shared")}#/${r}/${i}`}}if(t[1]===n)return{ref:"#"};const o=`#/${r}/`,i=t[1].schema.id??"__schema"+e.counter++;return{defId:i,ref:o+i}})(t);r.def={...r.schema},i&&(r.defId=i);const a=r.schema;for(const e in a)delete a[e];a.$ref=o};if("throw"===e.cycles)for(const i of e.seen.entries()){const e=i[1];if(e.cycle)throw new Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const i of e.seen.entries()){const n=i[1];if(t===i[0]){o(i);continue}if(e.external){const n=e.external.registry.get(i[0])?.id;if(t!==i[0]&&n){o(i);continue}}const r=e.metadataRegistry.get(i[0])?.id;r?o(i):(n.cycle||n.count>1&&"ref"===e.reused)&&o(i)}}function Kp(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=t=>{const n=e.seen.get(t);if(null===n.ref)return;const o=n.def??n.schema,i={...o},a=n.ref;if(n.ref=null,a){r(a);const n=e.seen.get(a),s=n.schema;!s.$ref||"draft-07"!==e.target&&"draft-04"!==e.target&&"openapi-3.0"!==e.target?Object.assign(o,s):(o.allOf=o.allOf??[],o.allOf.push(s)),Object.assign(o,i);if(t._zod.parent===a)for(const e in o)"$ref"!==e&&"allOf"!==e&&(e in i||delete o[e]);if(s.$ref&&n.def)for(const e in o)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(o[e])===JSON.stringify(n.def[e])&&delete o[e]}const s=t._zod.parent;if(s&&s!==a){r(s);const t=e.seen.get(s);if(t?.schema.$ref&&(o.$ref=t.schema.$ref,t.def))for(const e in o)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(o[e])===JSON.stringify(t.def[e])&&delete o[e]}e.override({zodSchema:t,jsonSchema:o,path:n.path??[]})};for(const s of[...e.seen.entries()].reverse())r(s[0]);const o={};if("draft-2020-12"===e.target?o.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?o.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const n=e.external.registry.get(t)?.id;if(!n)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(n)}Object.assign(o,n.def??n.schema);const i=e.external?.defs??{};for(const s of e.seen.entries()){const e=s[1];e.def&&e.defId&&(i[e.defId]=e.def)}e.external||Object.keys(i).length>0&&("draft-2020-12"===e.target?o.$defs=i:o.definitions=i);try{const n=JSON.parse(JSON.stringify(o));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:Yp(t,"input",e.processors),output:Yp(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(a){throw new Error("Error converting schema to JSON.")}}function Gp(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if("transform"===r.type)return!0;if("array"===r.type)return Gp(r.element,n);if("set"===r.type)return Gp(r.valueType,n);if("lazy"===r.type)return Gp(r.getter(),n);if("promise"===r.type||"optional"===r.type||"nonoptional"===r.type||"nullable"===r.type||"readonly"===r.type||"default"===r.type||"prefault"===r.type)return Gp(r.innerType,n);if("intersection"===r.type)return Gp(r.left,n)||Gp(r.right,n);if("record"===r.type||"map"===r.type)return Gp(r.keyType,n)||Gp(r.valueType,n);if("pipe"===r.type)return Gp(r.in,n)||Gp(r.out,n);if("object"===r.type){for(const e in r.shape)if(Gp(r.shape[e],n))return!0;return!1}if("union"===r.type){for(const e of r.options)if(Gp(e,n))return!0;return!1}if("tuple"===r.type){for(const e of r.items)if(Gp(e,n))return!0;return!(!r.rest||!Gp(r.rest,n))}return!1}const Yp=(e,t,n={})=>r=>{const{libraryOptions:o,target:i}=r??{},a=Wp({...o??{},target:i,io:t,processors:n});return Zp(e,a),Qp(a,e),Kp(a,e)},Jp={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Xp=(e,t,n,r)=>{const o=e._zod.def;Zp(o.innerType,t,r);t.seen.get(e).ref=o.innerType},eh=Kc("ZodISODateTime",(e,t)=>{Wd.init(e,t),kh.init(e,t)});const th=Kc("ZodISODate",(e,t)=>{Zd.init(e,t),kh.init(e,t)});const nh=Kc("ZodISOTime",(e,t)=>{Qd.init(e,t),kh.init(e,t)});const rh=Kc("ZodISODuration",(e,t)=>{Kd.init(e,t),kh.init(e,t)});const oh=Kc("ZodError",(e,t)=>{zu.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>function(e,t=e=>e.message){const n={_errors:[]},r=e=>{for(const o of e.issues)if("invalid_union"===o.code&&o.errors.length)o.errors.map(e=>r({issues:e}));else if("invalid_key"===o.code)r({issues:o.issues});else if("invalid_element"===o.code)r({issues:o.issues});else if(0===o.path.length)n._errors.push(t(o));else{let e=n,r=0;for(;r<o.path.length;){const n=o.path[r];r===o.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(o))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}(e,t)},flatten:{value:t=>function(e,t=e=>e.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,tu,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,tu,2)}},isEmpty:{get:()=>0===e.issues.length}})},{Parent:Error}),ih=Nu(oh),ah=Tu(oh),sh=Ou(oh),lh=Iu(oh),ch=ju(oh),uh=Fu(oh),dh=Lu(oh),fh=Du(oh),ph=Ru(oh),hh=Uu(oh),mh=Bu(oh),gh=$u(oh),yh=Kc("ZodType",(e,t)=>(Pd.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Yp(e,"input"),output:Yp(e,"output")}}),e.toJSONSchema=((e,t={})=>n=>{const r=Wp({...n,processors:t});return Zp(e,r),Qp(r,e),Kp(r,e)})(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(lu(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>yu(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>ih(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>sh(e,t,n),e.parseAsync=async(t,n)=>ah(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>lh(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>ch(e,t,n),e.decode=(t,n)=>uh(e,t,n),e.encodeAsync=async(t,n)=>dh(e,t,n),e.decodeAsync=async(t,n)=>fh(e,t,n),e.safeEncode=(t,n)=>ph(e,t,n),e.safeDecode=(t,n)=>hh(e,t,n),e.safeEncodeAsync=async(t,n)=>mh(e,t,n),e.safeDecodeAsync=async(t,n)=>gh(e,t,n),e.refine=(t,n)=>e.check(function(e,t={}){return Hp(hm,e,t)}(t,n)),e.superRefine=t=>e.check(Vp(t)),e.overwrite=t=>e.check(Fp(t)),e.optional=()=>rm(e),e.exactOptional=()=>new om({type:"optional",innerType:e}),e.nullable=()=>am(e),e.nullish=()=>rm(am(e)),e.nonoptional=t=>function(e,t){return new cm({type:"nonoptional",innerType:e,...bu(t)})}(e,t),e.array=()=>{return $p(Kh,e,t);var t},e.or=t=>{return new Yh({type:"union",options:[e,t],...bu(n)});var n},e.and=t=>new Jh({type:"intersection",left:e,right:t}),e.transform=t=>fm(e,new tm({type:"transform",transform:t})),e.default=t=>{return n=t,new sm({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():hu(n)}});var n},e.prefault=t=>{return n=t,new lm({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():hu(n)}});var n},e.catch=t=>{return new um({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:()=>n});var n},e.pipe=t=>fm(e,t),e.readonly=()=>new pm({type:"readonly",innerType:e}),e.describe=t=>{const n=e.clone();return Hf.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>Hf.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return Hf.get(e);const n=e.clone();return Hf.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),bh=Kc("_ZodString",(e,t)=>{Id.init(e,t),yh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=n;r.type="string";const{minimum:o,maximum:i,format:a,patterns:s,contentEncoding:l}=e._zod.bag;if("number"==typeof o&&(r.minLength=o),"number"==typeof i&&(r.maxLength=i),a&&(r.format=Jp[a]??a,""===r.format&&delete r.format,"time"===a&&delete r.format),l&&(r.contentEncoding=l),s&&s.size>0){const e=[...s];1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}})(e,t,n);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(Tp(...t)),e.includes=(...t)=>e.check(Ip(...t)),e.startsWith=(...t)=>e.check(Mp(...t)),e.endsWith=(...t)=>e.check(jp(...t)),e.min=(...t)=>e.check(Ap(...t)),e.max=(...t)=>e.check(zp(...t)),e.length=(...t)=>e.check(Np(...t)),e.nonempty=(...t)=>e.check(Ap(1,...t)),e.lowercase=t=>e.check(Op(t)),e.uppercase=t=>e.check(Pp(t)),e.trim=()=>e.check(Dp()),e.normalize=(...t)=>e.check(Lp(...t)),e.toLowerCase=()=>e.check(Rp()),e.toUpperCase=()=>e.check(Up()),e.slugify=()=>e.check(Bp())}),vh=Kc("ZodString",(e,t)=>{Id.init(e,t),bh.init(e,t),e.email=t=>e.check(qf(xh,t)),e.url=t=>e.check(Yf(Eh,t)),e.jwt=t=>e.check(fp(Uh,t)),e.emoji=t=>e.check(Jf(Ch,t)),e.guid=t=>e.check(Wf(Sh,t)),e.uuid=t=>e.check(Zf(_h,t)),e.uuidv4=t=>e.check(Qf(_h,t)),e.uuidv6=t=>e.check(Kf(_h,t)),e.uuidv7=t=>e.check(Gf(_h,t)),e.nanoid=t=>e.check(Xf(zh,t)),e.guid=t=>e.check(Wf(Sh,t)),e.cuid=t=>e.check(ep(Ah,t)),e.cuid2=t=>e.check(tp(Nh,t)),e.ulid=t=>e.check(np(Th,t)),e.base64=t=>e.check(cp(Lh,t)),e.base64url=t=>e.check(up(Dh,t)),e.xid=t=>e.check(rp(Oh,t)),e.ksuid=t=>e.check(op(Ph,t)),e.ipv4=t=>e.check(ip(Ih,t)),e.ipv6=t=>e.check(ap(Mh,t)),e.cidrv4=t=>e.check(sp(jh,t)),e.cidrv6=t=>e.check(lp(Fh,t)),e.e164=t=>e.check(dp(Rh,t)),e.datetime=t=>e.check(function(e){return pp(eh,e)}(t)),e.date=t=>e.check(function(e){return hp(th,e)}(t)),e.time=t=>e.check(function(e){return mp(nh,e)}(t)),e.duration=t=>e.check(function(e){return gp(rh,e)}(t))});function wh(e){return Vf(vh,e)}const kh=Kc("ZodStringFormat",(e,t)=>{Md.init(e,t),bh.init(e,t)}),xh=Kc("ZodEmail",(e,t)=>{Ld.init(e,t),kh.init(e,t)}),Sh=Kc("ZodGUID",(e,t)=>{jd.init(e,t),kh.init(e,t)}),_h=Kc("ZodUUID",(e,t)=>{Fd.init(e,t),kh.init(e,t)}),Eh=Kc("ZodURL",(e,t)=>{Dd.init(e,t),kh.init(e,t)}),Ch=Kc("ZodEmoji",(e,t)=>{Rd.init(e,t),kh.init(e,t)}),zh=Kc("ZodNanoID",(e,t)=>{Ud.init(e,t),kh.init(e,t)}),Ah=Kc("ZodCUID",(e,t)=>{Bd.init(e,t),kh.init(e,t)}),Nh=Kc("ZodCUID2",(e,t)=>{$d.init(e,t),kh.init(e,t)}),Th=Kc("ZodULID",(e,t)=>{Hd.init(e,t),kh.init(e,t)}),Oh=Kc("ZodXID",(e,t)=>{Vd.init(e,t),kh.init(e,t)}),Ph=Kc("ZodKSUID",(e,t)=>{qd.init(e,t),kh.init(e,t)}),Ih=Kc("ZodIPv4",(e,t)=>{Gd.init(e,t),kh.init(e,t)}),Mh=Kc("ZodIPv6",(e,t)=>{Yd.init(e,t),kh.init(e,t)}),jh=Kc("ZodCIDRv4",(e,t)=>{Jd.init(e,t),kh.init(e,t)}),Fh=Kc("ZodCIDRv6",(e,t)=>{Xd.init(e,t),kh.init(e,t)}),Lh=Kc("ZodBase64",(e,t)=>{tf.init(e,t),kh.init(e,t)}),Dh=Kc("ZodBase64URL",(e,t)=>{nf.init(e,t),kh.init(e,t)}),Rh=Kc("ZodE164",(e,t)=>{rf.init(e,t),kh.init(e,t)}),Uh=Kc("ZodJWT",(e,t)=>{of.init(e,t),kh.init(e,t)}),Bh=Kc("ZodNumber",(e,t)=>{af.init(e,t),yh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=n,{minimum:o,maximum:i,format:a,multipleOf:s,exclusiveMaximum:l,exclusiveMinimum:c}=e._zod.bag;"string"==typeof a&&a.includes("int")?r.type="integer":r.type="number","number"==typeof c&&("draft-04"===t.target||"openapi-3.0"===t.target?(r.minimum=c,r.exclusiveMinimum=!0):r.exclusiveMinimum=c),"number"==typeof o&&(r.minimum=o,"number"==typeof c&&"draft-04"!==t.target&&(c>=o?delete r.minimum:delete r.exclusiveMinimum)),"number"==typeof l&&("draft-04"===t.target||"openapi-3.0"===t.target?(r.maximum=l,r.exclusiveMaximum=!0):r.exclusiveMaximum=l),"number"==typeof i&&(r.maximum=i,"number"==typeof l&&"draft-04"!==t.target&&(l<=i?delete r.maximum:delete r.exclusiveMaximum)),"number"==typeof s&&(r.multipleOf=s)})(e,t,n),e.gt=(t,n)=>e.check(_p(t,n)),e.gte=(t,n)=>e.check(Ep(t,n)),e.min=(t,n)=>e.check(Ep(t,n)),e.lt=(t,n)=>e.check(xp(t,n)),e.lte=(t,n)=>e.check(Sp(t,n)),e.max=(t,n)=>e.check(Sp(t,n)),e.int=t=>e.check(Vh(t)),e.safe=t=>e.check(Vh(t)),e.positive=t=>e.check(_p(0,t)),e.nonnegative=t=>e.check(Ep(0,t)),e.negative=t=>e.check(xp(0,t)),e.nonpositive=t=>e.check(Sp(0,t)),e.multipleOf=(t,n)=>e.check(Cp(t,n)),e.step=(t,n)=>e.check(Cp(t,n)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function $h(e){return yp(Bh,e)}const Hh=Kc("ZodNumberFormat",(e,t)=>{sf.init(e,t),Bh.init(e,t)});function Vh(e){return bp(Hh,e)}const qh=Kc("ZodAny",(e,t)=>{lf.init(e,t),yh.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});const Wh=Kc("ZodUnknown",(e,t)=>{cf.init(e,t),yh.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function Zh(){return wp(Wh)}const Qh=Kc("ZodNever",(e,t)=>{uf.init(e,t),yh.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n)=>{n.not={}})(0,0,t)});const Kh=Kc("ZodArray",(e,t)=>{ff.init(e,t),yh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=n,i=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;"number"==typeof a&&(o.minItems=a),"number"==typeof s&&(o.maxItems=s),o.type="array",o.items=Zp(i.element,t,{...r,path:[...r.path,"items"]})})(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(Ap(t,n)),e.nonempty=t=>e.check(Ap(1,t)),e.max=(t,n)=>e.check(zp(t,n)),e.length=(t,n)=>e.check(Np(t,n)),e.unwrap=()=>e.element});const Gh=Kc("ZodObject",(e,t)=>{yf.init(e,t),yh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=n,i=e._zod.def;o.type="object",o.properties={};const a=i.shape;for(const c in a)o.properties[c]=Zp(a[c],t,{...r,path:[...r.path,"properties",c]});const s=new Set(Object.keys(a)),l=new Set([...s].filter(e=>{const n=i.shape[e]._zod;return"input"===t.io?void 0===n.optin:void 0===n.optout}));l.size>0&&(o.required=Array.from(l)),"never"===i.catchall?._zod.def.type?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=Zp(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(o.additionalProperties=!1)})(e,t,n,r),au(e,"shape",()=>t.shape),e.keyof=()=>em(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Zh()}),e.loose=()=>e.clone({...e._zod.def,catchall:Zh()}),e.strict=()=>{return e.clone({...e._zod.def,catchall:kp(Qh,t)});var t},e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>function(e,t){if(!pu(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const n=e._zod.def.shape;for(const e in t)if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const r=lu(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return su(this,"shape",n),n}});return yu(e,r)}(e,t),e.safeExtend=t=>function(e,t){if(!pu(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=lu(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return su(this,"shape",n),n}});return yu(e,n)}(e,t),e.merge=t=>function(e,t){const n=lu(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return su(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return yu(e,n)}(e,t),e.pick=t=>function(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");return yu(e,lu(e._zod.def,{get shape(){const e={};for(const r in t){if(!(r in n.shape))throw new Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return su(this,"shape",e),e},checks:[]}))}(e,t),e.omit=t=>function(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=lu(e._zod.def,{get shape(){const r={...e._zod.def.shape};for(const e in t){if(!(e in n.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return su(this,"shape",r),r},checks:[]});return yu(e,o)}(e,t),e.partial=(...t)=>function(e,t,n){const r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const o=lu(t._zod.def,{get shape(){const r=t._zod.def.shape,o={...r};if(n)for(const t in n){if(!(t in r))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(o[t]=e?new e({type:"optional",innerType:r[t]}):r[t])}else for(const t in r)o[t]=e?new e({type:"optional",innerType:r[t]}):r[t];return su(this,"shape",o),o},checks:[]});return yu(t,o)}(nm,e,t[0]),e.required=(...t)=>function(e,t,n){const r=lu(t._zod.def,{get shape(){const r=t._zod.def.shape,o={...r};if(n)for(const t in n){if(!(t in o))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(o[t]=new e({type:"nonoptional",innerType:r[t]}))}else for(const t in r)o[t]=new e({type:"nonoptional",innerType:r[t]});return su(this,"shape",o),o}});return yu(t,r)}(cm,e,t[0])});const Yh=Kc("ZodUnion",(e,t)=>{vf.init(e,t),yh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def,i=!1===o.inclusive,a=o.options.map((e,n)=>Zp(e,t,{...r,path:[...r.path,i?"oneOf":"anyOf",n]}));i?n.oneOf=a:n.anyOf=a})(e,t,n,r),e.options=t.options});const Jh=Kc("ZodIntersection",(e,t)=>{wf.init(e,t),yh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def,i=Zp(o.left,t,{...r,path:[...r.path,"allOf",0]}),a=Zp(o.right,t,{...r,path:[...r.path,"allOf",1]}),s=e=>"allOf"in e&&1===Object.keys(e).length,l=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];n.allOf=l})(e,t,n,r)});const Xh=Kc("ZodEnum",(e,t)=>{Sf.init(e,t),yh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=eu(e._zod.def.entries);r.every(e=>"number"==typeof e)&&(n.type="number"),r.every(e=>"string"==typeof e)&&(n.type="string"),n.enum=r})(e,0,n),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{const o={};for(const i of e){if(!n.has(i))throw new Error(`Key ${i} not found in enum`);o[i]=t.entries[i]}return new Xh({...t,checks:[],...bu(r),entries:o})},e.exclude=(e,r)=>{const o={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete o[t]}return new Xh({...t,checks:[],...bu(r),entries:o})}});function em(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new Xh({type:"enum",entries:n,...bu(t)})}const tm=Kc("ZodTransform",(e,t)=>{_f.init(e,t),yh.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t)=>{if("throw"===t.unrepresentable)throw new Error("Transforms cannot be represented in JSON Schema")})(0,e),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new Yc(e.constructor.name);n.addIssue=r=>{if("string"==typeof r)n.issues.push(Eu(r,n.value,t));else{const t=r;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),n.issues.push(Eu(t))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(e=>(n.value=e,n)):(n.value=o,n)}});const nm=Kc("ZodOptional",(e,t)=>{Cf.init(e,t),yh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xp(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});function rm(e){return new nm({type:"optional",innerType:e})}const om=Kc("ZodExactOptional",(e,t)=>{zf.init(e,t),yh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xp(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});const im=Kc("ZodNullable",(e,t)=>{Af.init(e,t),yh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def,i=Zp(o.innerType,t,r),a=t.seen.get(e);"openapi-3.0"===t.target?(a.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function am(e){return new im({type:"nullable",innerType:e})}const sm=Kc("ZodDefault",(e,t)=>{Nf.init(e,t),yh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;Zp(o.innerType,t,r),t.seen.get(e).ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});const lm=Kc("ZodPrefault",(e,t)=>{Of.init(e,t),yh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;Zp(o.innerType,t,r),t.seen.get(e).ref=o.innerType,"input"===t.io&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});const cm=Kc("ZodNonOptional",(e,t)=>{Pf.init(e,t),yh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;Zp(o.innerType,t,r),t.seen.get(e).ref=o.innerType})(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});const um=Kc("ZodCatch",(e,t)=>{Mf.init(e,t),yh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;let i;Zp(o.innerType,t,r),t.seen.get(e).ref=o.innerType;try{i=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=i})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});const dm=Kc("ZodPipe",(e,t)=>{jf.init(e,t),yh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def,i="input"===t.io?"transform"===o.in._zod.def.type?o.out:o.in:o.out;Zp(i,t,r),t.seen.get(e).ref=i})(e,t,0,r),e.in=t.in,e.out=t.out});function fm(e,t){return new dm({type:"pipe",in:e,out:t})}const pm=Kc("ZodReadonly",(e,t)=>{Lf.init(e,t),yh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;Zp(o.innerType,t,r),t.seen.get(e).ref=o.innerType,n.readOnly=!0})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});const hm=Kc("ZodCustom",(e,t)=>{Rf.init(e,t),yh.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t)=>{if("throw"===t.unrepresentable)throw new Error("Custom types cannot be represented in JSON Schema")})(0,e)});const mm=Object.create(null);mm.open="0",mm.close="1",mm.ping="2",mm.pong="3",mm.message="4",mm.upgrade="5",mm.noop="6";const gm=Object.create(null);Object.keys(mm).forEach(e=>{gm[mm[e]]=e});const ym={type:"error",data:"parser error"},bm="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),vm="function"==typeof ArrayBuffer,wm=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,km=({type:e,data:t},n,r)=>bm&&t instanceof Blob?n?r(t):xm(t,r):vm&&(t instanceof ArrayBuffer||wm(t))?n?r(t):xm(new Blob([t]),r):r(mm[e]+(t||"")),xm=(e,t)=>{const n=new FileReader;return n.onload=function(){const e=n.result.split(",")[1];t("b"+(e||""))},n.readAsDataURL(e)};function Sm(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let _m;const Em="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cm="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let Fy=0;Fy<64;Fy++)Cm[Em.charCodeAt(Fy)]=Fy;const zm="function"==typeof ArrayBuffer,Am=(e,t)=>{if("string"!=typeof e)return{type:"message",data:Tm(e,t)};const n=e.charAt(0);if("b"===n)return{type:"message",data:Nm(e.substring(1),t)};return gm[n]?e.length>1?{type:gm[n],data:e.substring(1)}:{type:gm[n]}:ym},Nm=(e,t)=>{if(zm){const n=(e=>{let t,n,r,o,i,a=.75*e.length,s=e.length,l=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);const c=new ArrayBuffer(a),u=new Uint8Array(c);for(t=0;t<s;t+=4)n=Cm[e.charCodeAt(t)],r=Cm[e.charCodeAt(t+1)],o=Cm[e.charCodeAt(t+2)],i=Cm[e.charCodeAt(t+3)],u[l++]=n<<2|r>>4,u[l++]=(15&r)<<4|o>>2,u[l++]=(3&o)<<6|63&i;return c})(e);return Tm(n,t)}return{base64:!0,data:e}},Tm=(e,t)=>"blob"===t?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,Om=String.fromCharCode(30);function Pm(){return new TransformStream({transform(e,t){!function(e,t){bm&&e.data instanceof Blob?e.data.arrayBuffer().then(Sm).then(t):vm&&(e.data instanceof ArrayBuffer||wm(e.data))?t(Sm(e.data)):km(e,!1,e=>{_m||(_m=new TextEncoder),t(_m.encode(e))})}(e,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const e=new DataView(o.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{o=new Uint8Array(9);const e=new DataView(o.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&"string"!=typeof e.data&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let Im;function Mm(e){return e.reduce((e,t)=>e+t.length,0)}function jm(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;o<t;o++)n[o]=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 Fm(e){if(e)return function(e){for(var t in Fm.prototype)e[t]=Fm.prototype[t];return e}(e)}Fm.prototype.on=Fm.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Fm.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Fm.prototype.off=Fm.prototype.removeListener=Fm.prototype.removeAllListeners=Fm.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},Fm.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){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t)}return this},Fm.prototype.emitReserved=Fm.prototype.emit,Fm.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Fm.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Lm="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),Dm="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function Rm(e,...t){return t.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{})}const Um=Dm.setTimeout,Bm=Dm.clearTimeout;function $m(e,t){t.useNativeTimers?(e.setTimeoutFn=Um.bind(Dm),e.clearTimeoutFn=Bm.bind(Dm)):(e.setTimeoutFn=Dm.setTimeout.bind(Dm),e.clearTimeoutFn=Dm.clearTimeout.bind(Dm))}function Hm(e){return"string"==typeof e?function(e){let t=0,n=0;for(let r=0,o=e.length;r<o;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}(e):Math.ceil(1.33*(e.byteLength||e.size))}function Vm(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class qm extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type="TransportError"}}class Wm extends Fm{constructor(e){super(),this.writable=!1,$m(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,n){return super.emitReserved("error",new qm(e,t,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=Am(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return-1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&443!==Number(this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){const t=function(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}(e);return t.length?"?"+t:""}}class Zm extends Wm{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once("pollComplete",function(){--e||t()})),this.writable||(e++,this.once("drain",function(){--e||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){((e,t)=>{const n=e.split(Om),r=[];for(let o=0;o<n.length;o++){const e=Am(n[o],t);if(r.push(e),"error"===e.type)break}return r})(e,this.socket.binaryType).forEach(e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)}),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){this.writable=!1,((e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((e,i)=>{km(e,!1,e=>{r[i]=e,++o===n&&t(r.join(Om))})})})(e,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=Vm()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}}let Qm=!1;try{Qm="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(jy){}const Km=Qm;function Gm(){}class Ym extends Zm{constructor(e){if(super(e),"undefined"!=typeof location){const t="https:"===location.protocol;let n=location.port;n||(n=t?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,t){const n=this.request({method:"POST",data:e});n.on("success",t),n.on("error",(e,t)=>{this.onError("xhr post error",e,t)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(e,t)=>{this.onError("xhr poll error",e,t)}),this.pollXhr=e}}class Jm extends Fm{constructor(e,t,n){super(),this.createRequest=e,$m(this,n),this._opts=n,this._method=n.method||"GET",this._uri=t,this._data=void 0!==n.data?n.data:null,this._create()}_create(){var e;const t=Rm(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(t);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let e in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&n.setRequestHeader(e,this._opts.extraHeaders[e])}}catch(iy){}if("POST"===this._method)try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(iy){}try{n.setRequestHeader("Accept","*/*")}catch(iy){}null===(e=this._opts.cookieJar)||void 0===e||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var e;3===n.readyState&&(null===(e=this._opts.cookieJar)||void 0===e||e.parseCookies(n.getResponseHeader("set-cookie"))),4===n.readyState&&(200===n.status||1223===n.status?this._onLoad():this.setTimeoutFn(()=>{this._onError("number"==typeof n.status?n.status:0)},0))},n.send(this._data)}catch(iy){return void this.setTimeoutFn(()=>{this._onError(iy)},0)}"undefined"!=typeof document&&(this._index=Jm.requestsCount++,Jm.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=Gm,e)try{this._xhr.abort()}catch(iy){}"undefined"!=typeof document&&delete Jm.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(Jm.requestsCount=0,Jm.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",Xm);else if("function"==typeof addEventListener){addEventListener("onpagehide"in Dm?"pagehide":"unload",Xm,!1)}function Xm(){for(let e in Jm.requests)Jm.requests.hasOwnProperty(e)&&Jm.requests[e].abort()}const eg=function(){const e=tg({xdomain:!1});return e&&null!==e.responseType}();function tg(e){const t=e.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!t||Km))return new XMLHttpRequest}catch(iy){}if(!t)try{return new(Dm[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(iy){}}const ng="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class rg extends Wm{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,n=ng?{}:Rm(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,n)}catch(jy){return this.emitReserved("error",jy)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t===e.length-1;km(n,this.supportsBinary,e=>{try{this.doWrite(n,e)}catch(iy){}r&&Lm(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=Vm()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const og=Dm.WebSocket||Dm.MozWebSocket;const ig={websocket:class extends rg{createSocket(e,t,n){return ng?new og(e,t,n):t?new og(e,t):new og(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends Wm{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(jy){return this.emitReserved("error",jy)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=function(e,t){Im||(Im=new TextDecoder);const n=[];let r=0,o=-1,i=!1;return new TransformStream({transform(a,s){for(n.push(a);;){if(0===r){if(Mm(n)<1)break;const e=jm(n,1);i=!(128&~e[0]),o=127&e[0],r=o<126?3:126===o?1:2}else if(1===r){if(Mm(n)<2)break;const e=jm(n,2);o=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),r=3}else if(2===r){if(Mm(n)<8)break;const e=jm(n,8),t=new DataView(e.buffer,e.byteOffset,e.length),i=t.getUint32(0);if(i>Math.pow(2,21)-1){s.enqueue(ym);break}o=i*Math.pow(2,32)+t.getUint32(4),r=3}else{if(Mm(n)<o)break;const e=jm(n,o);s.enqueue(Am(i?e:Im.decode(e),t)),r=0}if(0===o||o>e){s.enqueue(ym);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),r=Pm();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();const o=()=>{n.read().then(({done:e,value:t})=>{e||(this.onPacket(t),o())}).catch(e=>{})};o();const i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t===e.length-1;this._writer.write(n).then(()=>{r&&Lm(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;null===(e=this._transport)||void 0===e||e.close()}},polling:class extends Ym{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=eg&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Jm(tg,this.uri(),e)}}},ag=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,sg=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function lg(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");-1!=n&&-1!=r&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=ag.exec(e||""),i={},a=14;for(;a--;)i[sg[a]]=o[a]||"";return-1!=n&&-1!=r&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=function(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");"/"!=t.slice(0,1)&&0!==t.length||r.splice(0,1);"/"==t.slice(-1)&&r.splice(r.length-1,1);return r}(0,i.path),i.queryKey=function(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,r){t&&(n[t]=r)}),n}(0,i.query),i}const cg="function"==typeof addEventListener&&"function"==typeof removeEventListener,ug=[];cg&&addEventListener("offline",()=>{ug.forEach(e=>e())},!1);class dg extends Fm{constructor(e,t){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&"object"==typeof e&&(t=e,e=null),e){const n=lg(e);t.hostname=n.host,t.secure="https"===n.protocol||"wss"===n.protocol,t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=lg(t.host).host);$m(this,t),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{const t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),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},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let e=n[r].split("=");t[decodeURIComponent(e[0])]=decodeURIComponent(e[1])}return t}(this.opts.query)),cg&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},ug.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);const n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);const e=this.opts.rememberUpgrade&&dg.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";const t=this.createTransport(e);t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",e=>this._onClose("transport close",e))}onOpen(){this.readyState="open",dg.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const t=new Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){const n=this.writeBuffer[t].data;if(n&&(e+=Hm(n)),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,Lm(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,n){return this._sendPacket("message",e,t,n),this}send(e,t,n){return this._sendPacket("message",e,t,n),this}_sendPacket(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const o={type:e,data:t,options:n};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},n=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(e){if(dg.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),cg&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const e=ug.indexOf(this._offlineEventListener);-1!==e&&ug.splice(e,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}dg.protocol=4;class fg extends dg{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),n=!1;dg.priorWebsocketSuccess=!1;const r=()=>{n||(t.send([{type:"ping",data:"probe"}]),t.once("packet",e=>{if(!n)if("pong"===e.type&&"probe"===e.data){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;dg.priorWebsocketSuccess="websocket"===t.name,this.transport.pause(()=>{n||"closed"!==this.readyState&&(c(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const e=new Error("probe error");e.transport=t.name,this.emitReserved("upgradeError",e)}}))};function o(){n||(n=!0,c(),t.close(),t=null)}const i=e=>{const n=new Error("probe error: "+e);n.transport=t.name,o(),this.emitReserved("upgradeError",n)};function a(){i("transport closed")}function s(){i("socket closed")}function l(e){t&&e.name!==t.name&&o()}const c=()=>{t.removeListener("open",r),t.removeListener("error",i),t.removeListener("close",a),this.off("close",s),this.off("upgrading",l)};t.once("open",r),t.once("error",i),t.once("close",a),this.once("close",s),this.once("upgrading",l),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==e?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const t=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}}let pg=class extends fg{constructor(e,t={}){const n="object"==typeof e?e:t;(!n.transports||n.transports&&"string"==typeof n.transports[0])&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(e=>ig[e]).filter(e=>!!e)),super(e,n)}};const hg="function"==typeof ArrayBuffer,mg=Object.prototype.toString,gg="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===mg.call(Blob),yg="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===mg.call(File);function bg(e){return hg&&(e instanceof ArrayBuffer||(e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer)(e))||gg&&e instanceof Blob||yg&&e instanceof File}function vg(e,t){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(vg(e[t]))return!0;return!1}if(bg(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return vg(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&vg(e[n]))return!0;return!1}function wg(e){const t=[],n=e.data,r=e;return r.data=kg(n,t),r.attachments=t.length,{packet:r,buffers:t}}function kg(e,t){if(!e)return e;if(bg(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=kg(e[r],t);return n}if("object"==typeof e&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=kg(e[r],t));return n}return e}function xg(e,t){return e.data=Sg(e.data,t),delete e.attachments,e}function Sg(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Sg(e[n],t);else if("object"==typeof e)for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Sg(e[n],t));return e}const _g=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Eg,Cg;(Cg=Eg||(Eg={}))[Cg.CONNECT=0]="CONNECT",Cg[Cg.DISCONNECT=1]="DISCONNECT",Cg[Cg.EVENT=2]="EVENT",Cg[Cg.ACK=3]="ACK",Cg[Cg.CONNECT_ERROR=4]="CONNECT_ERROR",Cg[Cg.BINARY_EVENT=5]="BINARY_EVENT",Cg[Cg.BINARY_ACK=6]="BINARY_ACK";class zg extends Fm{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const n=t.type===Eg.BINARY_EVENT;n||t.type===Eg.BINARY_ACK?(t.type=n?Eg.EVENT:Eg.ACK,this.reconstructor=new Ag(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!bg(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const n={type:Number(e.charAt(0))};if(void 0===Eg[n.type])throw new Error("unknown packet type "+n.type);if(n.type===Eg.BINARY_EVENT||n.type===Eg.BINARY_ACK){const r=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const o=e.substring(r,t);if(o!=Number(o)||"-"!==e.charAt(t))throw new Error("Illegal attachments");n.attachments=Number(o)}if("/"===e.charAt(t+1)){const r=t+1;for(;++t;){if(","===e.charAt(t))break;if(t===e.length)break}n.nsp=e.substring(r,t)}else n.nsp="/";const r=e.charAt(t+1);if(""!==r&&Number(r)==r){const r=t+1;for(;++t;){const n=e.charAt(t);if(null==n||Number(n)!=n){--t;break}if(t===e.length)break}n.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(!zg.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(iy){return!1}}static isPayloadValid(e,t){switch(e){case Eg.CONNECT:return Tg(t);case Eg.DISCONNECT:return void 0===t;case Eg.CONNECT_ERROR:return"string"==typeof t||Tg(t);case Eg.EVENT:case Eg.BINARY_EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===_g.indexOf(t[0]));case Eg.ACK:case Eg.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Ag{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=xg(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Ng=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e};function Tg(e){return"[object Object]"===Object.prototype.toString.call(e)}const Og=Object.freeze(Object.defineProperty({__proto__:null,Decoder:zg,Encoder:class{constructor(e){this.replacer=e}encode(e){return e.type!==Eg.EVENT&&e.type!==Eg.ACK||!vg(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===Eg.EVENT?Eg.BINARY_EVENT:Eg.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}encodeAsString(e){let t=""+e.type;return e.type!==Eg.BINARY_EVENT&&e.type!==Eg.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=wg(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}},get PacketType(){return Eg},isPacketValid:function(e){return"string"==typeof e.nsp&&(void 0===(t=e.id)||Ng(t))&&function(e,t){switch(e){case Eg.CONNECT:return void 0===t||Tg(t);case Eg.DISCONNECT:return void 0===t;case Eg.EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===_g.indexOf(t[0]));case Eg.ACK:return Array.isArray(t);case Eg.CONNECT_ERROR:return"string"==typeof t||Tg(t);default:return!1}}(e.type,e.data);var t},protocol:5},Symbol.toStringTag,{value:"Module"}));function Pg(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Ig=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Mg extends Fm{constructor(e,t,n){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=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[Pg(e,"open",this.onopen.bind(this)),Pg(e,"packet",this.onpacket.bind(this)),Pg(e,"error",this.onerror.bind(this)),Pg(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var n,r,o;if(Ig.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const i={type:Eg.EVENT,data:t,options:{}};if(i.options.compress=!1!==this.flags.compress,"function"==typeof t[t.length-1]){const e=this.ids++,n=t.pop();this._registerAckCallback(e,n),i.id=e}const a=null===(r=null===(n=this.io.engine)||void 0===n?void 0:n.transport)||void 0===r?void 0:r.writable,s=this.connected&&!(null===(o=this.io.engine)||void 0===o?void 0:o._hasPingExpired());return this.flags.volatile&&!a||(s?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,t){var n;const r=null!==(n=this.flags.timeout)&&void 0!==n?n:this._opts.ackTimeout;if(void 0===r)return void(this.acks[e]=t);const o=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,new Error("operation has timed out"))},r),i=(...e)=>{this.io.clearTimeoutFn(o),t.apply(this,e)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...t){return new Promise((n,r)=>{const o=(e,t)=>e?r(e):n(t);o.withError=!0,t.push(o),this.emit(e,...t)})}_addToQueue(e){let t;"function"==typeof e[e.length-1]&&(t=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...r)=>{this._queue[0];return null!==e?n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)):(this._queue.shift(),t&&t(null,...r)),n.pending=!1,this._drainQueue()}),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||0===this._queue.length)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Eg.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){const t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Eg.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.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 Eg.EVENT:case Eg.BINARY_EVENT:this.onevent(e);break;case Eg.ACK:case Eg.BINARY_ACK:this.onack(e);break;case Eg.DISCONNECT:this.ondisconnect();break;case Eg.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){const t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let n=!1;return function(...r){n||(n=!0,t.packet({type:Eg.ACK,id:e,data:r}))}}onack(e){const t=this.acks[e.id];"function"==typeof t&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Eg.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const n of t)n.apply(this,e.data)}}}function jg(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}jg.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=1&Math.floor(10*t)?e+n:e-n}return 0|Math.min(e,this.max)},jg.prototype.reset=function(){this.attempts=0},jg.prototype.setMin=function(e){this.ms=e},jg.prototype.setMax=function(e){this.max=e},jg.prototype.setJitter=function(e){this.jitter=e};class Fg extends Fm{constructor(e,t){var n;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.opts=t,$m(this,t),this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(n=t.randomizationFactor)&&void 0!==n?n:.5),this.backoff=new jg({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this._readyState="closed",this.uri=e;const r=t.parser||Og;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==t.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new pg(this.uri,this.opts);const t=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=Pg(t,"open",function(){n.onopen(),e&&e()}),o=t=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",t),e?e(t):this.maybeReconnectOnOpen()},i=Pg(t,"error",o);if(!1!==this._timeout){const e=this._timeout,n=this.setTimeoutFn(()=>{r(),o(new Error("timeout")),t.close()},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}return this.subs.push(r),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(Pg(e,"ping",this.onping.bind(this)),Pg(e,"data",this.ondata.bind(this)),Pg(e,"error",this.onerror.bind(this)),Pg(e,"close",this.onclose.bind(this)),Pg(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(iy){this.onclose("parse error",iy)}}ondecoded(e){Lm(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new Mg(this,e,t),this.nsps[e]=n),n}_destroy(e){const t=Object.keys(this.nsps);for(const n of t){if(this.nsps[n].active)return}this._close()}_packet(e){const t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var n;this.cleanup(),null===(n=this.engine)||void 0===n||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open(t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):e.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const Lg={};function Dg(e,t){"object"==typeof e&&(t=e,e=void 0);const n=function(e,t="",n){let r=e;n=n||"undefined"!=typeof location&&location,null==e&&(e=n.protocol+"//"+n.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==n?n.protocol+"//"+e:"https://"+e),r=lg(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 o=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+t,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}(e,(t=t||{}).path||"/socket.io"),r=n.source,o=n.id,i=n.path,a=Lg[o]&&i in Lg[o].nsps;let s;return t.forceNew||t["force new connection"]||!1===t.multiplex||a?s=new Fg(r,t):(Lg[o]||(Lg[o]=new Fg(r,t)),s=Lg[o]),n.query&&!t.query&&(t.query=n.queryKey),s.socket(n.path,t)}Object.assign(Dg,{Manager:Fg,Socket:Mg,io:Dg,connect:Dg});const Rg="chat_device_id";function Ug(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}const Bg=function(e,t){const n={type:"object",shape:e??{},...bu(t)};return new Gh(n)}({id:wh().optional(),type:em(["text","image","audio","location","system"]).default("text"),content:wh().optional(),imageUrl:wh().url().optional(),audioUrl:wh().url().optional(),latitude:$h().optional(),longitude:$h().optional(),timestamp:wh().optional(),sender:em(["bot","user","system"]).optional(),emotion:vp(qh).optional()});function $g(e){const{apiKey:t,apiBaseUrl:n,pageContext:r,userContext:o}=e,i=E.useRef(e);E.useEffect(()=>{i.current=e},[e]);const a=E.useRef(null),[s,l]=E.useState(!1),[c,u]=E.useState(!1),d=E.useRef(function(){try{const e=localStorage.getItem(Rg);if(e)return e;const t=Ug();return localStorage.setItem(Rg,t),t}catch{return Vt("localStorage not available, using session-only device ID"),Ug()}}()),f=E.useRef(r);E.useEffect(()=>{f.current=r},[r]);const p=E.useCallback(e=>{const t=Bg.safeParse(e),n=t.success&&t.data.id?t.data.id:`msg-${Math.random().toString(36).slice(2,11)}`,r=t.success&&t.data.sender?t.data.sender:"bot",o=t.success&&t.data.timestamp?new Date(t.data.timestamp):new Date,i=t.success?t.data:{type:"text"};switch(i.type){case"image":return{id:n,type:"image",sender:r,timestamp:o,imageUrl:i.imageUrl||i.content||"",altText:"Imagen enviada"};case"audio":return{id:n,type:"audio",sender:r,timestamp:o,content:i.audioUrl||i.content||""};case"location":return{id:n,type:"location",sender:r,timestamp:o,latitude:Number(i.latitude||0),longitude:Number(i.longitude||0),name:i.content||"Ubicación compartida"};case"system":return{id:n,type:"system",sender:"system",timestamp:o,content:String(i.content||"")};default:return{id:n,type:"text",sender:r,timestamp:o,content:String(i.content||"Sin contenido"),emotion:i.emotion}}},[]),h=E.useCallback(()=>{if(!t||!n)return;if(a.current?.connected)return;l(!0);const e=Dg(n,{path:"/webchat",auth:{apiKey:t,deviceId:d.current,token:o?.token,metadata:o?.metadata},transports:["websocket"],reconnection:!0,reconnectionAttempts:5,reconnectionDelay:1e3,extraHeaders:{"bypass-tunnel-reminder":"true","X-Tunnel-Skip-Anti-Phishing-Page":"true"}});e.on("connect",()=>{l(!1),u(!0),i.current.onConnected(`temp-${Date.now()}`,void 0)}),e.on("disconnect",e=>{l(!1),u(!1),i.current.onDisconnected()}),e.on("connect_error",e=>{l(!1),i.current.onError(`Error de conexión: ${e.message}`)}),e.on("connection_ack",e=>{i.current.onConnected(e.sessionId,e.config)}),e.on("bot_message",e=>{try{i.current.onMessage(p(e))}catch(iy){qt("ChatSocket Error processing bot_message:",iy)}}),e.on("chat_history",e=>{e.messages&&Array.isArray(e.messages)&&e.messages.forEach(e=>{try{i.current.onMessage(p(e))}catch(iy){Wt("Error processing history message:",iy)}}),i.current.onEvent&&i.current.onEvent("history_loaded",e)}),e.on("bot_typing",e=>i.current.onTyping(e)),e.on("auth_success",e=>{i.current.onLogin&&i.current.onLogin(e),e.theme&&i.current.onThemeUpdate&&i.current.onThemeUpdate(e.theme)}),a.current=e},[t,n]),m=E.useCallback(()=>{a.current&&(a.current.disconnect(),a.current=null,u(!1))},[]),g=E.useRef(h);g.current=h,E.useEffect(()=>(g.current(),()=>{a.current&&(a.current.disconnect(),a.current=null)}),[]);const y=E.useRef([]),b=E.useRef([]),v=E.useCallback(()=>`msg_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,[]),w=E.useCallback(()=>{if(a.current?.connected)for(;y.current.length>0;){const e=y.current.shift();a.current.emit("user_message",e)}},[]);E.useEffect(()=>{c&&w()},[c,w]),E.useEffect(()=>{if(!c)return;const e=setInterval(()=>{const e=Date.now();b.current=b.current.filter(t=>e<t.nextRetryAt||(t.attempts>=t.maxAttempts?(i.current.onEvent?.("message_failed",{id:t.id,payload:t.payload}),qt("Message failed after max retries:",t.id),!1):!a.current?.connected||(a.current.emit("user_message",t.payload,e=>{e?.success&&i.current.onEvent?.("message_sent",{id:t.id})}),t.attempts++,t.nextRetryAt=e+1e3*Math.pow(2,t.attempts),t.attempts<t.maxAttempts)))},500);return()=>clearInterval(e)},[c]);const k=E.useCallback((e,t="text")=>{const n=v(),r={...f.current,currentUrl:"undefined"!=typeof window?window.location.href:void 0,sentAt:(new Date).toISOString(),deviceId:d.current},o={id:n,content:e.trim(),type:t,metadata:r};return a.current?.connected?(a.current.emit("user_message",o,e=>{!1!==e?.success&&e?i.current.onEvent?.("message_sent",{id:n}):(b.current.push({id:n,payload:o,attempts:0,maxAttempts:3,nextRetryAt:Date.now()+1e3}),i.current.onEvent?.("message_retry_queued",{id:n}))}),n):(y.current.push(o),i.current.onEvent?.("queued_message",{id:n,payload:o}),n)},[v]),x=E.useMemo(()=>pc(e=>{a.current?.emit("typing",e)},250),[]);return{isConnected:c,isConnecting:s,sendMessage:k,sendTyping:x,requestHistory:E.useCallback(()=>{a.current?.emit("request_history")},[]),reconnect:h,disconnect:m}}function Hg(e=!1){const t="undefined"!=typeof window?window.location.pathname:"",n=E.useMemo(()=>t,[t]),[r,o]=E.useState({});return E.useEffect(()=>{if(!e)return void o({});const t=setTimeout(()=>{const e=function(){if("undefined"==typeof window)return{};const e={};e.title=document.title,document.querySelectorAll("meta").forEach(t=>{const n=t.getAttribute("name"),r=t.getAttribute("property"),o=t.getAttribute("content");if(o){if(n)switch(n){case"description":e.description=o;break;case"keywords":e.keywords=o.split(",").map(e=>e.trim());break;case"author":e.author=o}if(r){if(r.startsWith("og:")){const t=r.replace("og:","og_");e[t]=o}if(r.startsWith("twitter:")){const t=r.replace("twitter:","twitter_");e[t]=o}}}});try{const t=document.querySelectorAll('script[type="application/ld+json"]');if(t.length>0){const n=[];t.forEach(e=>{try{const t=JSON.parse(e.textContent||"");n.push(t)}catch{}}),n.length>0&&(e.structuredData=n)}}catch{}return e}();o(e)},100);return()=>clearTimeout(t)},[n,e]),e&&Object.keys(r).length>0?r:void 0}class Vg{queue=[];endpoint;apiKey;flushInterval=null;isFlushing=!1;isDisabled=!1;MAX_QUEUE_SIZE=100;FLUSH_INTERVAL_MS=3e4;BATCH_SIZE=10;constructor(e,t){this.endpoint=e,this.apiKey=t,this.startAutoFlush()}startAutoFlush(){this.flushInterval=setInterval(()=>{!this.isDisabled&&this.queue.length>0&&this.flush()},this.FLUSH_INTERVAL_MS)}trackOpen(){this.track("chat_opened")}trackClose(){this.track("chat_closed")}trackMessageSent(e){this.track("message_sent",{type:e})}trackMessageReceived(e,t){this.track("message_received",{type:e,latency:t})}trackError(e,t){this.track("error",{error:e,context:t})}trackConnectionStatus(e){this.track("connection_status",{isConnected:e})}trackFeatureUsed(e){this.track("feature_used",{feature:e})}trackTypingStarted(){this.track("typing_started")}trackAttachmentSent(e,t){this.track("attachment_sent",{type:e,size:t})}track(e,t){this.isDisabled||(this.queue.push({event:e,properties:{...t,userAgent:"undefined"!=typeof navigator?navigator.userAgent:void 0,url:"undefined"!=typeof window?window.location.href:void 0},timestamp:Date.now()}),this.queue.length>=this.BATCH_SIZE&&this.flush(),this.queue.length>this.MAX_QUEUE_SIZE&&(this.queue=this.queue.slice(-this.MAX_QUEUE_SIZE),Vt("Analytics queue overflow, dropping old events")))}async flush(){if(this.isDisabled||0===this.queue.length||this.isFlushing)return;this.isFlushing=!0;const e=[...this.queue];this.queue=[];try{const t=await fetch(this.endpoint,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({events:e}),keepalive:!0});t.ok?Wt(`Analytics: Flushed ${e.length} events`):(this.isDisabled=!0,this.queue=[],Wt(`Analytics disabled: endpoint returned ${t.status}`))}catch(t){this.isDisabled=!0,this.queue=[],Wt("Analytics disabled due to network error")}finally{this.isFlushing=!1}}destroy(){this.flushInterval&&clearInterval(this.flushInterval),this.flush()}}E.createContext(null);function qg(e){const{apiKey:t,apiBaseUrl:n,pageContext:r,includeSEOMetadata:o=!1,theme:i,userContext:a,onLogin:s,onNavigate:l,onEvent:c,onStateChange:u,onThemeUpdate:d}=e,[f,p]=E.useState(0),h=E.useRef(0),{t:m}=U(),g=function(e,t,n=!0){const r=E.useRef(null);return E.useEffect(()=>{if(!n||!e||!t)return;const o=`${e}/analytics`;r.current=new Vg(o,t);const i=()=>r.current?.flush(),a=()=>{"hidden"===document.visibilityState&&r.current?.flush()};return window.addEventListener("beforeunload",i),window.addEventListener("visibilitychange",a),()=>{window.removeEventListener("beforeunload",i),window.removeEventListener("visibilitychange",a),r.current?.destroy()}},[e,t,n]),{trackOpen:E.useCallback(()=>{r.current?.trackOpen()},[]),trackClose:E.useCallback(()=>{r.current?.trackClose()},[]),trackMessageSent:E.useCallback(e=>{r.current?.trackMessageSent(e)},[]),trackMessageReceived:E.useCallback((e,t)=>{r.current?.trackMessageReceived(e,t)},[]),trackError:E.useCallback((e,t)=>{r.current?.trackError(e,t)},[]),trackConnectionStatus:E.useCallback(e=>{r.current?.trackConnectionStatus(e)},[]),trackFeatureUsed:E.useCallback(e=>{r.current?.trackFeatureUsed(e)},[])}}(n,t,!0),y=function({enabled:e=!0,soundEnabled:t=!0,desktopEnabled:n=!0,botName:r="Asistente",logoUrl:o,notificationSoundUrl:i}={}){const[a,s]=E.useState("default"),l=E.useRef(null),c=o||Qt,u=i||Kt;E.useEffect(()=>{t&&"undefined"!=typeof window&&(l.current=new Audio(u),l.current.volume=.3)},[t,u]),E.useEffect(()=>{"undefined"!=typeof window&&"Notification"in window&&s(Notification.permission)},[]);const d=E.useCallback(async()=>{if("undefined"==typeof window||!("Notification"in window))return Vt("Notifications API not available"),!1;try{const e=await Notification.requestPermission();return s(e),Zt("Notification permission:",e),"granted"===e}catch(e){return qt("Error requesting notification permission:",e),!1}},[]),f=E.useCallback(t=>{if(e&&n&&"granted"===a&&("undefined"==typeof document||!document.hasFocus()))try{const e=`Nuevo mensaje de ${r}`;let n="Mensaje recibido";"text"===t.type&&"content"in t?n=t.content?.slice(0,100)||"Mensaje recibido":"image"===t.type?n="📷 Imagen":"audio"===t.type?n="🎵 Audio":"location"===t.type&&(n="📍 Ubicación");const o=new Notification(e,{body:n,icon:c,tag:"chat-message",requireInteraction:!1,silent:!1});o.onclick=()=>{window.focus(),o.close()},setTimeout(()=>o.close(),5e3)}catch(o){qt("Error showing notification:",o)}},[e,n,a,r,c]),p=E.useCallback(()=>{if(e&&t&&("undefined"==typeof document||!document.hasFocus()))try{l.current?.play().catch(e=>{Wt("Audio playback blocked:",e)})}catch(n){qt("Error playing sound:",n)}},[e,t]),h=E.useCallback(e=>{f(e),p()},[f,p]);return{permission:a,requestPermission:d,notify:f,playSound:p,notifyWithSound:h}}({enabled:!0,soundEnabled:!0,desktopEnabled:!0,botName:i?.botName||"Asistente",logoUrl:i?.logoUrl}),b=function(e=10,t=6e4){const n=E.useRef([]);return{isAllowed:E.useCallback(()=>{const r=Date.now();return n.current=n.current.filter(e=>r-e<t),!(n.current.length>=e||(n.current.push(r),0))},[e,t]),getRemainingAttempts:E.useCallback(()=>{const r=Date.now();return n.current=n.current.filter(e=>r-e<t),Math.max(0,e-n.current.length)},[e,t]),getTimeUntilReset:E.useCallback(()=>{if(0===n.current.length)return 0;const e=Date.now(),r=n.current[0],o=t-(e-r);return Math.max(0,o)},[t]),reset:E.useCallback(()=>{n.current=[]},[])}}(10,6e4),{state:v,actions:w}=function(){const[e,t]=E.useReducer(Qc,Zc),[n,r]=E.useState(!1);E.useEffect(()=>{"undefined"==typeof window||n||(async()=>{try{await qc.migrateFromLocalStorage();const e=await qc.getMessages(100),n=await qc.getMetadata();if(e.length>0||n){const r={messages:e.map(e=>({...e,timestamp:new Date(e.timestamp)})),sessionId:n?.sessionId||null,isOpen:n?.isOpen||!1};t({type:"RESTORE_SESSION",payload:r})}}catch(iy){Vt("Chat: Error rehydrating from IndexedDB",iy);try{const e=localStorage.getItem(Wc);if(e){const n=JSON.parse(e);n.messages&&(n.messages=n.messages.map(e=>({...e,timestamp:new Date(e.timestamp)}))),t({type:"RESTORE_SESSION",payload:n})}}catch(e){qt("Chat: Fallback rehydration failed",e)}}finally{r(!0)}})()},[n]),E.useEffect(()=>{if(!n)return;const t=setTimeout(async()=>{try{await qc.saveMessages(e.messages),await qc.setMetadata({isOpen:e.isOpen,sessionId:e.sessionId})}catch(iy){qt("Chat Persistence Error:",iy);try{const t={isOpen:e.isOpen,messages:e.messages,sessionId:e.sessionId};localStorage.setItem(Wc,JSON.stringify(t))}catch(t){qt("Chat: Fallback persistence failed",t)}}},500);return()=>clearTimeout(t)},[e.isOpen,e.messages,e.sessionId,n]);const o=E.useCallback(e=>{t({type:"ADD_MESSAGE",payload:e})},[]),i=E.useCallback(()=>t({type:"TOGGLE_WINDOW"}),[]),a=E.useCallback(()=>t({type:"OPEN_WINDOW"}),[]),s=E.useCallback(()=>t({type:"CLOSE_WINDOW"}),[]),l=E.useCallback(e=>t({type:"SET_CONNECTED",payload:e}),[]),c=E.useCallback(e=>t({type:"SET_TYPING",payload:e}),[]),u=E.useCallback(e=>t({type:"SET_MESSAGES",payload:e}),[]),d=E.useCallback(e=>t({type:"SET_ERROR",payload:e}),[]),f=E.useCallback(e=>t({type:"SET_SESSION_ID",payload:e}),[]),p=E.useCallback(()=>{localStorage.removeItem(Wc),t({type:"CLEAR_CHAT"})},[]),h=E.useCallback(()=>{t({type:"SET_MESSAGES",payload:[]})},[]);return{state:e,isHydrated:n,actions:{toggleWindow:i,openWindow:a,closeWindow:s,setConnected:l,setTyping:c,addMessage:o,setMessages:u,setError:d,setSessionId:f,clearChat:p,clearMessages:h}}}(),k=Hg(o),x=$g({apiKey:t,apiBaseUrl:n,pageContext:E.useMemo(()=>k?{...r||{},seo:{...k||{}}}:r,[r,k]),userContext:a,onMessage:E.useCallback(e=>{const t=Date.now(),n=h.current>0?t-h.current:void 0;h.current=t,w.addMessage(e),g.trackMessageReceived(e.type,n),v.isOpen||"bot"!==e.sender||(p(e=>e+1),y.notifyWithSound(e))},[w,v.isOpen,g,y]),onConnected:E.useCallback((e,t)=>{w.setConnected(!0),w.setSessionId(e),g.trackConnectionStatus(!0),t&&c&&c("backend_config",t)},[w,c,g]),onDisconnected:E.useCallback(()=>{w.setConnected(!1),g.trackConnectionStatus(!1)},[w,g]),onTyping:E.useCallback(e=>w.setTyping(e),[w]),onError:E.useCallback(e=>{w.setError(e),g.trackError(e)},[w,g]),onLogin:s,onNavigate:l,onEvent:c,onThemeUpdate:d}),S=E.useCallback(()=>{Wt("ChatWidget handleToggle called, current isOpen:",v.isOpen),v.isOpen?(w.closeWindow(),g.trackClose(),u?.(!1),Wt("ChatWidget Closing window")):(w.openWindow(),p(0),g.trackOpen(),u?.(!0),Wt("ChatWidget Opening window"))},[v.isOpen,w,u,g]),_=E.useCallback(e=>{if(!b.isAllowed()){const e=b.getTimeUntilReset(),t=Math.ceil(e/1e3);return void w.setError(m("rate_limit_exceeded")+` Espera ${t}s.`)}const t={id:`temp-${Date.now()}-${Math.random()}`,type:"text",sender:"user",timestamp:new Date,content:e};w.addMessage(t),g.trackMessageSent("text"),x.sendMessage(e,"text")},[w,x,b,g,m]),C=E.useCallback(async(e,t)=>{let n;n="audio"===t?{id:`temp-${Date.now()}-${Math.random()}`,type:"audio",sender:"user",timestamp:new Date,content:URL.createObjectURL(e)}:"image"===t?{id:`temp-${Date.now()}-${Math.random()}`,type:"image",sender:"user",timestamp:new Date,imageUrl:URL.createObjectURL(e)}:{id:`temp-${Date.now()}-${Math.random()}`,type:"text",sender:"user",timestamp:new Date,content:`📎 ${e.name}`},w.addMessage(n);const r=await(e=>new Promise((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>t(r.result),r.onerror=e=>n(e)}))(e);x.sendMessage(r,t)},[w,x]),z=E.useCallback(e=>{const t={id:`temp-${Date.now()}-${Math.random()}`,type:"location",sender:"user",timestamp:new Date,latitude:e.latitude,longitude:e.longitude,name:"Mi ubicación"};w.addMessage(t),x.sendMessage(JSON.stringify(e),"location")},[w,x]);E.useEffect(()=>{const e=()=>{v.isOpen||w.openWindow()},t=()=>{v.isOpen&&w.closeWindow()},n=()=>{v.isOpen?w.closeWindow():w.openWindow()},r=e=>{e.detail?.message&&_(e.detail.message)};return window.addEventListener("botuyo-chat:open",e),window.addEventListener("botuyo-chat:close",t),window.addEventListener("botuyo-chat:toggle",n),window.addEventListener("botuyo-chat:send-message",r),()=>{window.removeEventListener("botuyo-chat:open",e),window.removeEventListener("botuyo-chat:close",t),window.removeEventListener("botuyo-chat:toggle",n),window.removeEventListener("botuyo-chat:send-message",r)}},[v.isOpen,w,_]),E.useEffect(()=>()=>{},[_]);const A=E.useCallback(()=>{w.clearMessages(),Zt("Chat history cleared")},[w]);E.useEffect(()=>()=>{},[A]);const N=E.useMemo(()=>{if(v.isTyping)return"thinking";const e=[...v.messages].reverse().find(e=>"bot"===e.sender&&"text"===e.type);return"text"===e?.type&&e.emotion?e.emotion:"default"},[v.isTyping,v.messages]);return{state:v,actions:w,unreadCount:f,currentBotEmotion:N,isConnected:x.isConnected,handleToggle:S,handleSendText:_,handleSendAttachment:C,handleSendLocation:z}}const Wg=Object.freeze(Object.defineProperty({__proto__:null,ChatWidget:function(e){const{apiKey:t,apiBaseUrl:n,pageContext:r,includeSEOMetadata:o=!1,theme:i,mediaConfig:a,userContext:s,onLogin:l,onNavigate:c,onEvent:u,onStateChange:d}=e,f=E.useRef(null),p=hc();!function(e){const[t,n]=E.useState(!1);E.useEffect(()=>{let t=null;const r=()=>{if(!e.current)return;const t=!!e.current.parentElement?.closest(".dark"),r=!!document.getElementById("botuyo-chat-widget-root")?.classList.contains("dark"),o=document.getElementById("botuyo-chat-widget-root"),i=!!o?.parentElement?.closest(".dark"),a=document.documentElement.classList.contains("dark"),s=document.body.classList.contains("dark"),l=window.matchMedia("(prefers-color-scheme: dark)").matches,c=t||r||i||a||s||l;e.current&&(c?e.current.classList.add("dark"):e.current.classList.remove("dark")),n(c)};r();const o=window.matchMedia("(prefers-color-scheme: dark)"),i=()=>r();o.addEventListener("change",i);const a=new MutationObserver(()=>{r()}),s=document.getElementById("botuyo-chat-widget-root");s&&(a.observe(s,{attributes:!0,attributeFilter:["class"]}),s.parentElement&&(a.observe(s.parentElement,{attributes:!0,attributeFilter:["class"],childList:!0}),t=s.parentElement)),a.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),a.observe(document.body,{attributes:!0,attributeFilter:["class"]});let l=e.current?.parentElement;for(;l;)a.observe(l,{attributes:!0,attributeFilter:["class"]}),l=l.parentElement;const c=setInterval(()=>{const e=document.getElementById("botuyo-chat-widget-root");e&&e.parentElement!==t&&(t&&e.parentElement&&(a.observe(e.parentElement,{attributes:!0,attributeFilter:["class"],childList:!0}),t=e.parentElement),r())},100);return()=>{a.disconnect(),o.removeEventListener("change",i),clearInterval(c)}},[e])}(f);const[h,m]=E.useState(),{mergedTheme:g,mergedStyles:y,getContainerStyle:b}=kc(i,h),{state:v,actions:w,unreadCount:k,currentBotEmotion:x,isConnected:S,handleToggle:_,handleSendText:C,handleSendAttachment:z,handleSendLocation:A}=qg({apiKey:t,apiBaseUrl:n,pageContext:r,includeSEOMetadata:o,theme:i,userContext:s,onLogin:l,onNavigate:c,onEvent:u,onStateChange:d,onThemeUpdate:m}),N=E.useCallback(e=>{e.stopPropagation()},[]),T=b(v.isOpen,p,i?.position),P=E.useMemo(()=>{if(!g.cssVariables)return{};const e={},t=g.cssVariables;return t.background&&(e["--background"]=t.background),t.foreground&&(e["--foreground"]=t.foreground),t.card&&(e["--card"]=t.card),t.cardForeground&&(e["--card-foreground"]=t.cardForeground),t.primary&&(e["--primary"]=t.primary),t.primaryForeground&&(e["--primary-foreground"]=t.primaryForeground),t.muted&&(e["--muted"]=t.muted),t.mutedForeground&&(e["--muted-foreground"]=t.mutedForeground),t.border&&(e["--border"]=t.border),t.destructive&&(e["--destructive"]=t.destructive),t.radius&&(e["--radius"]=t.radius),t.spacing1&&(e["--spacing-1"]=t.spacing1),t.spacing2&&(e["--spacing-2"]=t.spacing2),t.spacing3&&(e["--spacing-3"]=t.spacing3),t.spacing4&&(e["--spacing-4"]=t.spacing4),t.spacing5&&(e["--spacing-5"]=t.spacing5),t.spacing6&&(e["--spacing-6"]=t.spacing6),t.spacing8&&(e["--spacing-8"]=t.spacing8),e},[g.cssVariables]);return O.jsx($t,{animations:i?.animations,effects:i?.effects,children:O.jsxs("div",{ref:f,id:"botuyo-chat-widget",className:Nt("botuyo-chat-widget flex flex-col",!p&&("bottom-left"===i?.position?"items-start":"items-end")),style:{...T,...P,pointerEvents:"auto",backgroundColor:"transparent"},"data-animations-disabled":!1===i?.animations?.enabled?"true":void 0,"data-effects-glassmorphism":!1===i?.effects?.glassmorphism?"false":void 0,"data-effects-shadows":!1===i?.effects?.softShadows?"false":void 0,children:[O.jsx("div",{className:Nt("transition-all duration-500 ease-in-out origin-bottom",v.isOpen?"opacity-100 scale-100 h-full w-full translate-y-0 pointer-events-auto":"opacity-0 scale-95 pointer-events-none translate-y-full h-0 w-0"),style:{pointerEvents:v.isOpen?"auto":"none"},onMouseDown:N,onTouchStart:N,children:O.jsx(yc,{children:O.jsx(gc,{isOpen:v.isOpen,isConnected:S,isTyping:v.isTyping,messages:v.messages,onClose:()=>w.closeWindow(),onSendMessage:C,onSendAttachment:z,onSendLocation:A,botName:i?.botName,logoUrl:i?.logoUrl,welcomeMessage:i?.welcomeMessage,inputPlaceholder:i?.inputPlaceholder,primaryColor:i?.primaryColor,position:i?.position,bubbleStyles:y,avatars:i?.avatars,mediaConfig:a,theme:g})})}),O.jsx("div",{className:Nt(v.isOpen?"hidden":"block",!p&&"mt-4"),style:{pointerEvents:"auto"},onMouseDown:N,onTouchStart:N,children:O.jsx(Yt,{isOpen:v.isOpen,onClick:_,unreadCount:k,position:i?.position||"bottom-right",primaryColor:i?.primaryColor,logoUrl:i?.logoUrl,starterPrompt:i?.starterPrompt,avatars:i?.avatars,emotion:x,styles:y,promptPersistence:i?.promptPersistence,avatarScale:i?.avatarScale})})]})})}},Symbol.toStringTag,{value:"Module"})),Zg=E.memo(function({url:e,isBot:t,primaryColor:n}){const[r,o]=E.useState(!1),[i,a]=E.useState(0),[s,l]=E.useState(0),[c,u]=E.useState(!0),d=E.useRef(null),f=E.useMemo(()=>Lt({primaryColor:n}),[n]);return O.jsxs("div",{className:Nt("flex items-center gap-3 py-1 min-w-[200px]",t?"text-foreground":"text-primary-foreground"),children:[O.jsx("audio",{ref:d,src:e,onLoadedMetadata:()=>{a(d.current?.duration||0),u(!1)},onTimeUpdate:()=>l(d.current?.currentTime||0),onEnded:()=>o(!1)}),O.jsx("button",{onClick:()=>{r?d.current?.pause():d.current?.play(),o(!r)},disabled:c,className:"w-8 h-8 rounded-full flex items-center justify-center shrink-0",style:{backgroundColor:t?f:"hsl(var(--card))",color:t?"white":f},children:c?O.jsx(ne,{className:"w-4 h-4 animate-spin"}):r?O.jsx(ae,{className:"w-4 h-4 fill-current"}):O.jsx(se,{className:"w-4 h-4 fill-current ml-0.5"})}),O.jsxs("div",{className:"flex-1 space-y-1",children:[O.jsx("div",{className:"relative h-1 w-full bg-current/20 rounded-full overflow-hidden",children:O.jsx("div",{className:"absolute h-full bg-current rounded-full",style:{width:`${s/i*100||0}%`}})}),O.jsxs("div",{className:"flex justify-between text-[9px] font-bold opacity-60",children:[O.jsxs("span",{children:[Math.floor(s/60),":",Math.floor(s%60).toString().padStart(2,"0")]}),O.jsxs("span",{children:[Math.floor(i/60),":",Math.floor(i%60).toString().padStart(2,"0")]})]})]})]})}),Qg=Object.freeze(Object.defineProperty({__proto__:null,AudioPlayer:Zg},Symbol.toStringTag,{value:"Module"})),Kg=E.memo(function({images:e,radius:t="rounded-lg"}){const{t:n}=U("extracted"),[r,o]=E.useState(0),[i,a]=E.useState(!1),s=()=>{o(t=>(t+1)%e.length)},l=()=>{o(t=>(t-1+e.length)%e.length)},c=e=>{o(e),a(!0)},[u,d]=E.useState(new Set),f=e=>{d(t=>new Set(t).add(e))};return 1===e.length?O.jsx("div",{className:"my-3 relative group",children:u.has(0)?O.jsxs("div",{className:Nt("w-full h-48 flex flex-col items-center justify-center","border bg-muted text-muted-foreground",t),style:{borderColor:"hsl(var(--border))"},children:[O.jsx("svg",{className:"w-12 h-12 mb-2 opacity-50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),O.jsx("span",{className:"text-sm",children:"Imagen no disponible"})]}):O.jsxs(O.Fragment,{children:[O.jsx("img",{src:e[0].src,alt:e[0].alt||"Imagen",className:Nt("w-full h-auto object-cover cursor-pointer transition-all duration-300","border shadow-soft-md hover:shadow-soft-lg hover:scale-[1.02]",t),style:{borderColor:"hsl(var(--border))"},loading:"lazy",onClick:()=>c(0),onError:()=>f(0)}),O.jsx("div",{className:"absolute top-2 right-2 bg-black/50 backdrop-blur-sm p-1.5 rounded-full opacity-0 group-hover:opacity-100 transition-opacity",children:O.jsx(pe,{size:16,className:"text-white"})})]})}):e.length<=3?O.jsxs("div",{className:Nt("my-3 grid gap-2",2===e.length?"grid-cols-2":"grid-cols-3"),children:[e.map((n,r)=>O.jsx("div",{className:"relative group overflow-hidden",children:u.has(r)?O.jsx("div",{className:Nt("w-full h-32 flex flex-col items-center justify-center","border bg-muted text-muted-foreground",t),children:O.jsx("svg",{className:"w-8 h-8 opacity-50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}):O.jsxs(O.Fragment,{children:[O.jsx("img",{src:n.src,alt:n.alt||`Imagen ${r+1}`,className:Nt("w-full h-32 object-cover cursor-pointer transition-all duration-300","border border-border shadow-soft-md hover:shadow-soft-lg hover:scale-110",t),loading:"lazy",onClick:()=>c(r),onError:()=>f(r)}),O.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/40 to-transparent opacity-0 group-hover:opacity-100 transition-opacity flex items-end justify-end p-2",children:O.jsxs("span",{className:"text-white text-xs font-bold bg-black/50 backdrop-blur-sm px-2 py-1 rounded-full",children:[r+1,"/",e.length]})})]})},r)),i&&O.jsx(Gg,{images:e,currentIndex:r,onClose:()=>a(!1),onNext:s,onPrev:l})]}):O.jsxs("div",{className:"my-3 space-y-2",children:[O.jsx("div",{className:"relative group",children:u.has(r)?O.jsxs("div",{className:Nt("w-full h-56 flex flex-col items-center justify-center","border bg-muted text-muted-foreground",t),style:{borderColor:"hsl(var(--border))"},children:[O.jsx("svg",{className:"w-12 h-12 mb-2 opacity-50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),O.jsx("span",{className:"text-sm",children:"Imagen no disponible"})]}):O.jsxs(O.Fragment,{children:[O.jsx("img",{src:e[r].src,alt:e[r].alt||`Imagen ${r+1}`,className:Nt("w-full h-56 object-cover cursor-pointer transition-all duration-300","border shadow-soft-md",t),style:{borderColor:"hsl(var(--border))"},loading:"lazy",onClick:()=>c(r),onError:()=>f(r)}),O.jsxs("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-black/20 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-between px-3",children:[O.jsx("button",{onClick:l,className:"p-2 rounded-full shadow-soft-lg transition-all hover:scale-110 active:scale-95",style:{backgroundColor:"hsl(var(--card) / 0.9)",color:"hsl(var(--foreground))"},"aria-label":n("anterior"),children:O.jsx(K,{size:20})}),O.jsx("button",{onClick:s,className:"p-2 rounded-full shadow-soft-lg transition-all hover:scale-110 active:scale-95",style:{backgroundColor:"hsl(var(--card) / 0.9)",color:"hsl(var(--foreground))"},"aria-label":n("siguiente"),children:O.jsx(G,{size:20})})]}),O.jsx("div",{className:"absolute top-3 right-3 bg-black/70 backdrop-blur-sm px-3 py-1 rounded-full",children:O.jsxs("span",{className:"text-white text-xs font-bold",children:[r+1," / ",e.length]})}),O.jsx("div",{className:"absolute bottom-3 right-3 bg-black/70 backdrop-blur-sm p-2 rounded-full opacity-0 group-hover:opacity-100 transition-opacity",children:O.jsx(pe,{size:16,className:"text-white"})})]})}),O.jsx("div",{className:"flex gap-2 overflow-x-auto pb-2 scrollbar-thin scrollbar-thumb-border scrollbar-track-transparent",children:e.map((e,n)=>O.jsx("button",{onClick:()=>o(n),className:Nt("flex-shrink-0 w-16 h-16 overflow-hidden transition-all duration-300 relative","border-2 hover:scale-110",t,r===n?"border-[hsl(210,90%,50%)] ring-2 ring-[hsl(210,90%,50%)]/30 scale-105":"border-border hover:border-[hsl(210,90%,70%)] opacity-70 hover:opacity-100"),children:u.has(n)?O.jsx("div",{className:"w-full h-full flex items-center justify-center bg-muted",children:O.jsx("svg",{className:"w-6 h-6 opacity-50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}):O.jsx("img",{src:e.src,alt:e.alt||`Thumbnail ${n+1}`,className:"w-full h-full object-cover",loading:"lazy",onError:()=>f(n)})},n))}),i&&O.jsx(Gg,{images:e,currentIndex:r,onClose:()=>a(!1),onNext:s,onPrev:l})]})});function Gg({images:e,currentIndex:t,onClose:n,onNext:r,onPrev:o}){const{t:i}=U("extracted");return O.jsxs("div",{className:"fixed inset-0 z-[100000] bg-black/95 backdrop-blur-sm flex items-center justify-center animate-in fade-in duration-200",onClick:n,children:[O.jsx("button",{onClick:n,className:"absolute top-4 right-4 bg-white/10 hover:bg-white/20 p-2 rounded-full transition-all hover:scale-110 active:scale-95 z-10","aria-label":i("cerrar"),children:O.jsx(fe,{size:24,className:"text-white"})}),O.jsx("div",{className:"absolute top-4 left-4 bg-white/10 backdrop-blur-sm px-4 py-2 rounded-full z-10",children:O.jsxs("span",{className:"text-white text-sm font-bold",children:[t+1," / ",e.length]})}),e.length>1&&O.jsxs(O.Fragment,{children:[O.jsx("button",{onClick:e=>{e.stopPropagation(),o()},className:"absolute left-4 bg-white/10 hover:bg-white/20 p-3 rounded-full transition-all hover:scale-110 active:scale-95 z-10","aria-label":"Anterior",children:O.jsx(K,{size:32,className:"text-white"})}),O.jsx("button",{onClick:e=>{e.stopPropagation(),r()},className:"absolute right-4 bg-white/10 hover:bg-white/20 p-3 rounded-full transition-all hover:scale-110 active:scale-95 z-10","aria-label":"Siguiente",children:O.jsx(G,{size:32,className:"text-white"})})]}),O.jsx("img",{src:e[t].src,alt:e[t].alt||`Imagen ${t+1}`,className:"max-w-[90%] max-h-[90vh] object-contain",onClick:e=>e.stopPropagation()})]})}const Yg=Object.freeze(Object.defineProperty({__proto__:null,Gallery:Kg},Symbol.toStringTag,{value:"Module"}));function Jg(e,t){return new Promise(function(n,r){let o;return Xg(e).then(function(e){try{return o=e,n(new Blob([t.slice(0,2),o,t.slice(2)],{type:"image/jpeg"}))}catch(i){return r(i)}},r)})}const Xg=e=>new Promise((t,n)=>{const r=new FileReader;r.addEventListener("load",({target:{result:e}})=>{const r=new DataView(e);let o=0;if(65496!==r.getUint16(o))return n("not a valid JPEG");for(o+=2;;){const i=r.getUint16(o);if(65498===i)break;const a=r.getUint16(o+2);if(65505===i&&1165519206===r.getUint32(o+4)){const i=o+10;let s;switch(r.getUint16(i)){case 18761:s=!0;break;case 19789:s=!1;break;default:return n("TIFF header contains invalid endian")}if(42!==r.getUint16(i+2,s))return n("TIFF header contains invalid version");const l=r.getUint32(i+4,s),c=i+l+2+12*r.getUint16(i+l,s);for(let e=i+l+2;e<c;e+=12)if(274==r.getUint16(e,s)){if(3!==r.getUint16(e+2,s))return n("Orientation data type is invalid");if(1!==r.getUint32(e+4,s))return n("Orientation data count is invalid");r.setUint16(e+8,1,s);break}return t(e.slice(o,o+2+a))}o+=2+a}return t(new Blob)}),r.readAsArrayBuffer(e)});var ey,ty,ny,ry={},oy={get exports(){return ry},set exports(e){ry=e}};ny={},oy.exports=ny,ny.parse=function(e,t){for(var n=ny.bin.readUshort,r=ny.bin.readUint,o=0,i={},a=new Uint8Array(e),s=a.length-4;101010256!=r(a,s);)s--;o=s,o+=4;var l=n(a,o+=4);n(a,o+=2);var c=r(a,o+=2),u=r(a,o+=4);o+=4,o=u;for(var d=0;d<l;d++){r(a,o),o+=4,o+=4,o+=4,r(a,o+=4),c=r(a,o+=4);var f=r(a,o+=4),p=n(a,o+=4),h=n(a,o+2),m=n(a,o+4);o+=6;var g=r(a,o+=8);o+=4,o+=p+h+m,ny._readLocal(a,g,i,c,f,t)}return i},ny._readLocal=function(e,t,n,r,o,i){var a=ny.bin.readUshort,s=ny.bin.readUint;s(e,t),a(e,t+=4),a(e,t+=2);var l=a(e,t+=2);s(e,t+=2),s(e,t+=4),t+=4;var c=a(e,t+=8),u=a(e,t+=2);t+=2;var d=ny.bin.readUTF8(e,t,c);if(t+=c,t+=u,i)n[d]={size:o,csize:r};else{var f=new Uint8Array(e.buffer,t);if(0==l)n[d]=new Uint8Array(f.buffer.slice(t,t+r));else{if(8!=l)throw"unknown compression method: "+l;var p=new Uint8Array(o);ny.inflateRaw(f,p),n[d]=p}}},ny.inflateRaw=function(e,t){return ny.F.inflate(e,t)},ny.inflate=function(e,t){return e[0],e[1],ny.inflateRaw(new Uint8Array(e.buffer,e.byteOffset+2,e.length-6),t)},ny.deflate=function(e,t){null==t&&(t={level:6});var n=0,r=new Uint8Array(50+Math.floor(1.1*e.length));r[n]=120,r[n+1]=156,n+=2,n=ny.F.deflateRaw(e,r,n,t.level);var o=ny.adler(e,0,e.length);return r[n+0]=o>>>24&255,r[n+1]=o>>>16&255,r[n+2]=o>>>8&255,r[n+3]=o>>>0&255,new Uint8Array(r.buffer,0,n+4)},ny.deflateRaw=function(e,t){null==t&&(t={level:6});var n=new Uint8Array(50+Math.floor(1.1*e.length)),r=ny.F.deflateRaw(e,n,r,t.level);return new Uint8Array(n.buffer,0,r)},ny.encode=function(e,t){null==t&&(t=!1);var n=0,r=ny.bin.writeUint,o=ny.bin.writeUshort,i={};for(var a in e){var s=!ny._noNeed(a)&&!t,l=e[a],c=ny.crc.crc(l,0,l.length);i[a]={cpr:s,usize:l.length,crc:c,file:s?ny.deflateRaw(l):l}}for(var a in i)n+=i[a].file.length+30+46+2*ny.bin.sizeUTF8(a);n+=22;var u=new Uint8Array(n),d=0,f=[];for(var a in i){var p=i[a];f.push(d),d=ny._writeHeader(u,d,a,p,0)}var h=0,m=d;for(var a in i)p=i[a],f.push(d),d=ny._writeHeader(u,d,a,p,1,f[h++]);var g=d-m;return r(u,d,101010256),d+=4,o(u,d+=4,h),o(u,d+=2,h),r(u,d+=2,g),r(u,d+=4,m),d+=4,d+=2,u.buffer},ny._noNeed=function(e){var t=e.split(".").pop().toLowerCase();return-1!="png,jpg,jpeg,zip".indexOf(t)},ny._writeHeader=function(e,t,n,r,o,i){var a=ny.bin.writeUint,s=ny.bin.writeUshort,l=r.file;return a(e,t,0==o?67324752:33639248),t+=4,1==o&&(t+=2),s(e,t,20),s(e,t+=2,0),s(e,t+=2,r.cpr?8:0),a(e,t+=2,0),a(e,t+=4,r.crc),a(e,t+=4,l.length),a(e,t+=4,r.usize),s(e,t+=4,ny.bin.sizeUTF8(n)),s(e,t+=2,0),t+=2,1==o&&(t+=2,t+=2,a(e,t+=6,i),t+=4),t+=ny.bin.writeUTF8(e,t,n),0==o&&(e.set(l,t),t+=l.length),t},ny.crc={table:function(){for(var e=new Uint32Array(256),t=0;t<256;t++){for(var n=t,r=0;r<8;r++)1&n?n=3988292384^n>>>1:n>>>=1;e[t]=n}return e}(),update:function(e,t,n,r){for(var o=0;o<r;o++)e=ny.crc.table[255&(e^t[n+o])]^e>>>8;return e},crc:function(e,t,n){return 4294967295^ny.crc.update(4294967295,e,t,n)}},ny.adler=function(e,t,n){for(var r=1,o=0,i=t,a=t+n;i<a;){for(var s=Math.min(i+5552,a);i<s;)o+=r+=e[i++];r%=65521,o%=65521}return o<<16|r},ny.bin={readUshort:function(e,t){return e[t]|e[t+1]<<8},writeUshort:function(e,t,n){e[t]=255&n,e[t+1]=n>>8&255},readUint:function(e,t){return 16777216*e[t+3]+(e[t+2]<<16|e[t+1]<<8|e[t])},writeUint:function(e,t,n){e[t]=255&n,e[t+1]=n>>8&255,e[t+2]=n>>16&255,e[t+3]=n>>24&255},readASCII:function(e,t,n){for(var r="",o=0;o<n;o++)r+=String.fromCharCode(e[t+o]);return r},writeASCII:function(e,t,n){for(var r=0;r<n.length;r++)e[t+r]=n.charCodeAt(r)},pad:function(e){return e.length<2?"0"+e:e},readUTF8:function(e,t,n){for(var r,o="",i=0;i<n;i++)o+="%"+ny.bin.pad(e[t+i].toString(16));try{r=decodeURIComponent(o)}catch(a){return ny.bin.readASCII(e,t,n)}return r},writeUTF8:function(e,t,n){for(var r=n.length,o=0,i=0;i<r;i++){var a=n.charCodeAt(i);if(4294967168&a)if(4294965248&a)if(4294901760&a){if(4292870144&a)throw"e";e[t+o]=240|a>>18,e[t+o+1]=128|a>>12&63,e[t+o+2]=128|a>>6&63,e[t+o+3]=128|63&a,o+=4}else e[t+o]=224|a>>12,e[t+o+1]=128|a>>6&63,e[t+o+2]=128|63&a,o+=3;else e[t+o]=192|a>>6,e[t+o+1]=128|63&a,o+=2;else e[t+o]=a,o++}return o},sizeUTF8:function(e){for(var t=e.length,n=0,r=0;r<t;r++){var o=e.charCodeAt(r);if(4294967168&o)if(4294965248&o)if(4294901760&o){if(4292870144&o)throw"e";n+=4}else n+=3;else n+=2;else n++}return n}},ny.F={},ny.F.deflateRaw=function(e,t,n,r){var o=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][r],i=ny.F.U,a=ny.F._goodIndex;ny.F._hash;var s=ny.F._putsE,l=0,c=n<<3,u=0,d=e.length;if(0==r){for(;l<d;)s(t,c,l+(S=Math.min(65535,d-l))==d?1:0),c=ny.F._copyExact(e,l,S,t,c+8),l+=S;return c>>>3}var f=i.lits,p=i.strt,h=i.prev,m=0,g=0,y=0,b=0,v=0,w=0;for(d>2&&(p[w=ny.F._hash(e,0)]=0),l=0;l<d;l++){if(v=w,l+1<d-2){w=ny.F._hash(e,l+1);var k=l+1&32767;h[k]=p[w],p[w]=k}if(u<=l){(m>14e3||g>26697)&&d-l>100&&(u<l&&(f[m]=l-u,m+=2,u=l),c=ny.F._writeBlock(l==d-1||u==d?1:0,f,m,b,e,y,l-y,t,c),m=g=b=0,y=l);var x=0;l<d-2&&(x=ny.F._bestMatch(e,l,h,v,Math.min(o[2],d-l),o[3]));var S=x>>>16,_=65535&x;if(0!=x){_=65535&x;var E=a(S=x>>>16,i.of0);i.lhst[257+E]++;var C=a(_,i.df0);i.dhst[C]++,b+=i.exb[E]+i.dxb[C],f[m]=S<<23|l-u,f[m+1]=_<<16|E<<8|C,m+=2,u=l+S}else i.lhst[e[l]]++;g++}}for(y==l&&0!=e.length||(u<l&&(f[m]=l-u,m+=2,u=l),c=ny.F._writeBlock(1,f,m,b,e,y,l-y,t,c),m=0,g=0,m=g=b=0,y=l);7&c;)c++;return c>>>3},ny.F._bestMatch=function(e,t,n,r,o,i){var a=32767&t,s=n[a],l=a-s+32768&32767;if(s==a||r!=ny.F._hash(e,t-l))return 0;for(var c=0,u=0,d=Math.min(32767,t);l<=d&&0!=--i&&s!=a;){if(0==c||e[t+c]==e[t+c-l]){var f=ny.F._howLong(e,t,l);if(f>c){if(u=l,(c=f)>=o)break;l+2<f&&(f=l+2);for(var p=0,h=0;h<f-2;h++){var m=t-l+h+32768&32767,g=m-n[m]+32768&32767;g>p&&(p=g,s=m)}}}l+=(a=s)-(s=n[a])+32768&32767}return c<<16|u},ny.F._howLong=function(e,t,n){if(e[t]!=e[t-n]||e[t+1]!=e[t+1-n]||e[t+2]!=e[t+2-n])return 0;var r=t,o=Math.min(e.length,t+258);for(t+=3;t<o&&e[t]==e[t-n];)t++;return t-r},ny.F._hash=function(e,t){return(e[t]<<8|e[t+1])+(e[t+2]<<4)&65535},ny.saved=0,ny.F._writeBlock=function(e,t,n,r,o,i,a,s,l){var c,u,d,f,p,h,m,g,y,b=ny.F.U,v=ny.F._putsF,w=ny.F._putsE;b.lhst[256]++,u=(c=ny.F.getTrees())[0],d=c[1],f=c[2],p=c[3],h=c[4],m=c[5],g=c[6],y=c[7];var k=32+(l+3&7?8-(l+3&7):0)+(a<<3),x=r+ny.F.contSize(b.fltree,b.lhst)+ny.F.contSize(b.fdtree,b.dhst),S=r+ny.F.contSize(b.ltree,b.lhst)+ny.F.contSize(b.dtree,b.dhst);S+=14+3*m+ny.F.contSize(b.itree,b.ihst)+(2*b.ihst[16]+3*b.ihst[17]+7*b.ihst[18]);for(var _=0;_<286;_++)b.lhst[_]=0;for(_=0;_<30;_++)b.dhst[_]=0;for(_=0;_<19;_++)b.ihst[_]=0;var E=k<x&&k<S?0:x<S?1:2;if(v(s,l,e),v(s,l+1,E),l+=3,0==E){for(;7&l;)l++;l=ny.F._copyExact(o,i,a,s,l)}else{var C,z;if(1==E&&(C=b.fltree,z=b.fdtree),2==E){ny.F.makeCodes(b.ltree,u),ny.F.revCodes(b.ltree,u),ny.F.makeCodes(b.dtree,d),ny.F.revCodes(b.dtree,d),ny.F.makeCodes(b.itree,f),ny.F.revCodes(b.itree,f),C=b.ltree,z=b.dtree,w(s,l,p-257),w(s,l+=5,h-1),w(s,l+=5,m-4),l+=4;for(var A=0;A<m;A++)w(s,l+3*A,b.itree[1+(b.ordr[A]<<1)]);l+=3*m,l=ny.F._codeTiny(g,b.itree,s,l),l=ny.F._codeTiny(y,b.itree,s,l)}for(var N=i,T=0;T<n;T+=2){for(var O=t[T],P=O>>>23,I=N+(8388607&O);N<I;)l=ny.F._writeLit(o[N++],C,s,l);if(0!=P){var M=t[T+1],j=M>>16,F=M>>8&255,L=255&M;w(s,l=ny.F._writeLit(257+F,C,s,l),P-b.of0[F]),l+=b.exb[F],v(s,l=ny.F._writeLit(L,z,s,l),j-b.df0[L]),l+=b.dxb[L],N+=P}}l=ny.F._writeLit(256,C,s,l)}return l},ny.F._copyExact=function(e,t,n,r,o){var i=o>>>3;return r[i]=n,r[i+1]=n>>>8,r[i+2]=255-r[i],r[i+3]=255-r[i+1],i+=4,r.set(new Uint8Array(e.buffer,t,n),i),o+(n+4<<3)},ny.F.getTrees=function(){for(var e=ny.F.U,t=ny.F._hufTree(e.lhst,e.ltree,15),n=ny.F._hufTree(e.dhst,e.dtree,15),r=[],o=ny.F._lenCodes(e.ltree,r),i=[],a=ny.F._lenCodes(e.dtree,i),s=0;s<r.length;s+=2)e.ihst[r[s]]++;for(s=0;s<i.length;s+=2)e.ihst[i[s]]++;for(var l=ny.F._hufTree(e.ihst,e.itree,7),c=19;c>4&&0==e.itree[1+(e.ordr[c-1]<<1)];)c--;return[t,n,l,o,a,c,r,i]},ny.F.getSecond=function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(e[n+1]);return t},ny.F.nonZero=function(e){for(var t="",n=0;n<e.length;n+=2)0!=e[n+1]&&(t+=(n>>1)+",");return t},ny.F.contSize=function(e,t){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[1+(r<<1)];return n},ny.F._codeTiny=function(e,t,n,r){for(var o=0;o<e.length;o+=2){var i=e[o],a=e[o+1];r=ny.F._writeLit(i,t,n,r);var s=16==i?2:17==i?3:7;i>15&&(ny.F._putsE(n,r,a,s),r+=s)}return r},ny.F._lenCodes=function(e,t){for(var n=e.length;2!=n&&0==e[n-1];)n-=2;for(var r=0;r<n;r+=2){var o=e[r+1],i=r+3<n?e[r+3]:-1,a=r+5<n?e[r+5]:-1,s=0==r?-1:e[r-1];if(0==o&&i==o&&a==o){for(var l=r+5;l+2<n&&e[l+2]==o;)l+=2;(c=Math.min(l+1-r>>>1,138))<11?t.push(17,c-3):t.push(18,c-11),r+=2*c-2}else if(o==s&&i==o&&a==o){for(l=r+5;l+2<n&&e[l+2]==o;)l+=2;var c=Math.min(l+1-r>>>1,6);t.push(16,c-3),r+=2*c-2}else t.push(o,0)}return n>>>1},ny.F._hufTree=function(e,t,n){var r=[],o=e.length,i=t.length,a=0;for(a=0;a<i;a+=2)t[a]=0,t[a+1]=0;for(a=0;a<o;a++)0!=e[a]&&r.push({lit:a,f:e[a]});var s=r.length,l=r.slice(0);if(0==s)return 0;if(1==s){var c=r[0].lit;return l=0==c?1:0,t[1+(c<<1)]=1,t[1+(l<<1)]=1,1}r.sort(function(e,t){return e.f-t.f});var u=r[0],d=r[1],f=0,p=1,h=2;for(r[0]={lit:-1,f:u.f+d.f,l:u,r:d,d:0};p!=s-1;)u=f!=p&&(h==s||r[f].f<r[h].f)?r[f++]:r[h++],d=f!=p&&(h==s||r[f].f<r[h].f)?r[f++]:r[h++],r[p++]={lit:-1,f:u.f+d.f,l:u,r:d};var m=ny.F.setDepth(r[p-1],0);for(m>n&&(ny.F.restrictDepth(l,n,m),m=n),a=0;a<s;a++)t[1+(l[a].lit<<1)]=l[a].d;return m},ny.F.setDepth=function(e,t){return-1!=e.lit?(e.d=t,t):Math.max(ny.F.setDepth(e.l,t+1),ny.F.setDepth(e.r,t+1))},ny.F.restrictDepth=function(e,t,n){var r=0,o=1<<n-t,i=0;for(e.sort(function(e,t){return t.d==e.d?e.f-t.f:t.d-e.d}),r=0;r<e.length&&e[r].d>t;r++){var a=e[r].d;e[r].d=t,i+=o-(1<<n-a)}for(i>>>=n-t;i>0;)(a=e[r].d)<t?(e[r].d++,i-=1<<t-a-1):r++;for(;r>=0;r--)e[r].d==t&&i<0&&(e[r].d--,i++);0!=i&&console.log("debt left")},ny.F._goodIndex=function(e,t){var n=0;return t[16|n]<=e&&(n|=16),t[8|n]<=e&&(n|=8),t[4|n]<=e&&(n|=4),t[2|n]<=e&&(n|=2),t[1|n]<=e&&(n|=1),n},ny.F._writeLit=function(e,t,n,r){return ny.F._putsF(n,r,t[e<<1]),r+t[1+(e<<1)]},ny.F.inflate=function(e,t){var n=Uint8Array;if(3==e[0]&&0==e[1])return t||new n(0);var r=ny.F,o=r._bitsF,i=r._bitsE,a=r._decodeTiny,s=r.makeCodes,l=r.codes2map,c=r._get17,u=r.U,d=null==t;d&&(t=new n(e.length>>>2<<3));for(var f,p,h=0,m=0,g=0,y=0,b=0,v=0,w=0,k=0,x=0;0==h;)if(h=o(e,x,1),m=o(e,x+1,2),x+=3,0!=m){if(d&&(t=ny.F._check(t,k+(1<<17))),1==m&&(f=u.flmap,p=u.fdmap,v=511,w=31),2==m){g=i(e,x,5)+257,y=i(e,x+5,5)+1,b=i(e,x+10,4)+4,x+=14;for(var S=0;S<38;S+=2)u.itree[S]=0,u.itree[S+1]=0;var _=1;for(S=0;S<b;S++){var E=i(e,x+3*S,3);u.itree[1+(u.ordr[S]<<1)]=E,E>_&&(_=E)}x+=3*b,s(u.itree,_),l(u.itree,_,u.imap),f=u.lmap,p=u.dmap,x=a(u.imap,(1<<_)-1,g+y,e,x,u.ttree);var C=r._copyOut(u.ttree,0,g,u.ltree);v=(1<<C)-1;var z=r._copyOut(u.ttree,g,y,u.dtree);w=(1<<z)-1,s(u.ltree,C),l(u.ltree,C,f),s(u.dtree,z),l(u.dtree,z,p)}for(;;){var A=f[c(e,x)&v];x+=15&A;var N=A>>>4;if(N>>>8==0)t[k++]=N;else{if(256==N)break;var T=k+N-254;if(N>264){var O=u.ldef[N-257];T=k+(O>>>3)+i(e,x,7&O),x+=7&O}var P=p[c(e,x)&w];x+=15&P;var I=P>>>4,M=u.ddef[I],j=(M>>>4)+o(e,x,15&M);for(x+=15&M,d&&(t=ny.F._check(t,k+(1<<17)));k<T;)t[k]=t[k++-j],t[k]=t[k++-j],t[k]=t[k++-j],t[k]=t[k++-j];k=T}}}else{7&x&&(x+=8-(7&x));var F=4+(x>>>3),L=e[F-4]|e[F-3]<<8;d&&(t=ny.F._check(t,k+L)),t.set(new n(e.buffer,e.byteOffset+F,L),k),x=F+L<<3,k+=L}return t.length==k?t:t.slice(0,k)},ny.F._check=function(e,t){var n=e.length;if(t<=n)return e;var r=new Uint8Array(Math.max(n<<1,t));return r.set(e,0),r},ny.F._decodeTiny=function(e,t,n,r,o,i){for(var a=ny.F._bitsE,s=ny.F._get17,l=0;l<n;){var c=e[s(r,o)&t];o+=15&c;var u=c>>>4;if(u<=15)i[l]=u,l++;else{var d=0,f=0;16==u?(f=3+a(r,o,2),o+=2,d=i[l-1]):17==u?(f=3+a(r,o,3),o+=3):18==u&&(f=11+a(r,o,7),o+=7);for(var p=l+f;l<p;)i[l]=d,l++}}return o},ny.F._copyOut=function(e,t,n,r){for(var o=0,i=0,a=r.length>>>1;i<n;){var s=e[i+t];r[i<<1]=0,r[1+(i<<1)]=s,s>o&&(o=s),i++}for(;i<a;)r[i<<1]=0,r[1+(i<<1)]=0,i++;return o},ny.F.makeCodes=function(e,t){for(var n,r,o,i,a=ny.F.U,s=e.length,l=a.bl_count,c=0;c<=t;c++)l[c]=0;for(c=1;c<s;c+=2)l[e[c]]++;var u=a.next_code;for(n=0,l[0]=0,r=1;r<=t;r++)n=n+l[r-1]<<1,u[r]=n;for(o=0;o<s;o+=2)0!=(i=e[o+1])&&(e[o]=u[i],u[i]++)},ny.F.codes2map=function(e,t,n){for(var r=e.length,o=ny.F.U.rev15,i=0;i<r;i+=2)if(0!=e[i+1])for(var a=i>>1,s=e[i+1],l=a<<4|s,c=t-s,u=e[i]<<c,d=u+(1<<c);u!=d;)n[o[u]>>>15-t]=l,u++},ny.F.revCodes=function(e,t){for(var n=ny.F.U.rev15,r=15-t,o=0;o<e.length;o+=2){var i=e[o]<<t-e[o+1];e[o]=n[i]>>>r}},ny.F._putsE=function(e,t,n){n<<=7&t;var r=t>>>3;e[r]|=n,e[r+1]|=n>>>8},ny.F._putsF=function(e,t,n){n<<=7&t;var r=t>>>3;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},ny.F._bitsE=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<n)-1},ny.F._bitsF=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<n)-1},ny.F._get17=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},ny.F._get25=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},ny.F.U=(ey=Uint16Array,ty=Uint32Array,{next_code:new ey(16),bl_count:new ey(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new ey(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new ty(32),flmap:new ey(512),fltree:[],fdmap:new ey(32),fdtree:[],lmap:new ey(32768),ltree:[],ttree:[],dmap:new ey(32768),dtree:[],imap:new ey(512),itree:[],rev15:new ey(32768),lhst:new ty(286),dhst:new ty(30),ihst:new ty(19),lits:new ty(15e3),strt:new ey(65536),prev:new ey(32768)}),function(){for(var e=ny.F.U,t=0;t<32768;t++){var n=t;n=(4278255360&(n=(4042322160&(n=(3435973836&(n=(2863311530&n)>>>1|(1431655765&n)<<1))>>>2|(858993459&n)<<2))>>>4|(252645135&n)<<4))>>>8|(16711935&n)<<8,e.rev15[t]=(n>>>16|n<<16)>>>17}function r(e,t,n){for(;0!=t--;)e.push(0,n)}for(t=0;t<32;t++)e.ldef[t]=e.of0[t]<<3|e.exb[t],e.ddef[t]=e.df0[t]<<4|e.dxb[t];r(e.fltree,144,8),r(e.fltree,112,9),r(e.fltree,24,7),r(e.fltree,8,8),ny.F.makeCodes(e.fltree,9),ny.F.codes2map(e.fltree,9,e.flmap),ny.F.revCodes(e.fltree,9),r(e.fdtree,32,5),ny.F.makeCodes(e.fdtree,5),ny.F.codes2map(e.fdtree,5,e.fdmap),ny.F.revCodes(e.fdtree,5),r(e.itree,19,0),r(e.ltree,286,0),r(e.dtree,30,0),r(e.ttree,320,0)}();var iy,ay=(iy={__proto__:null,default:ry},[ry].forEach(function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach(function(t){if("default"!==t&&!(t in iy)){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(iy,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}})}),Object.freeze(iy));const sy=function(){var e={nextZero(e,t){for(;0!=e[t];)t++;return t},readUshort:(e,t)=>e[t]<<8|e[t+1],writeUshort(e,t,n){e[t]=n>>8&255,e[t+1]=255&n},readUint:(e,t)=>16777216*e[t]+(e[t+1]<<16|e[t+2]<<8|e[t+3]),writeUint(e,t,n){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n},readASCII(e,t,n){let r="";for(let o=0;o<n;o++)r+=String.fromCharCode(e[t+o]);return r},writeASCII(e,t,n){for(let r=0;r<n.length;r++)e[t+r]=n.charCodeAt(r)},readBytes(e,t,n){const r=[];for(let o=0;o<n;o++)r.push(e[t+o]);return r},pad:e=>e.length<2?`0${e}`:e,readUTF8(t,n,r){let o,i="";for(let s=0;s<r;s++)i+=`%${e.pad(t[n+s].toString(16))}`;try{o=decodeURIComponent(i)}catch(a){return e.readASCII(t,n,r)}return o}};function t(t,n,r,o){const a=n*r,s=i(o),l=Math.ceil(n*s/8),c=new Uint8Array(4*a),u=new Uint32Array(c.buffer),{ctype:d}=o,{depth:f}=o,p=e.readUshort;if(6==d){const e=a<<2;if(8==f)for(var h=0;h<e;h+=4)c[h]=t[h],c[h+1]=t[h+1],c[h+2]=t[h+2],c[h+3]=t[h+3];if(16==f)for(h=0;h<e;h++)c[h]=t[h<<1]}else if(2==d){const e=o.tabs.tRNS;if(null==e){if(8==f)for(h=0;h<a;h++){var m=3*h;u[h]=255<<24|t[m+2]<<16|t[m+1]<<8|t[m]}if(16==f)for(h=0;h<a;h++)m=6*h,u[h]=255<<24|t[m+4]<<16|t[m+2]<<8|t[m]}else{var g=e[0];const n=e[1],r=e[2];if(8==f)for(h=0;h<a;h++){var y=h<<2;m=3*h,u[h]=255<<24|t[m+2]<<16|t[m+1]<<8|t[m],t[m]==g&&t[m+1]==n&&t[m+2]==r&&(c[y+3]=0)}if(16==f)for(h=0;h<a;h++)y=h<<2,m=6*h,u[h]=255<<24|t[m+4]<<16|t[m+2]<<8|t[m],p(t,m)==g&&p(t,m+2)==n&&p(t,m+4)==r&&(c[y+3]=0)}}else if(3==d){const e=o.tabs.PLTE,i=o.tabs.tRNS,s=i?i.length:0;if(1==f)for(var b=0;b<r;b++){var v=b*l,w=b*n;for(h=0;h<n;h++){y=w+h<<2;var k=3*(x=t[v+(h>>3)]>>7-(7&h)&1);c[y]=e[k],c[y+1]=e[k+1],c[y+2]=e[k+2],c[y+3]=x<s?i[x]:255}}if(2==f)for(b=0;b<r;b++)for(v=b*l,w=b*n,h=0;h<n;h++)y=w+h<<2,k=3*(x=t[v+(h>>2)]>>6-((3&h)<<1)&3),c[y]=e[k],c[y+1]=e[k+1],c[y+2]=e[k+2],c[y+3]=x<s?i[x]:255;if(4==f)for(b=0;b<r;b++)for(v=b*l,w=b*n,h=0;h<n;h++)y=w+h<<2,k=3*(x=t[v+(h>>1)]>>4-((1&h)<<2)&15),c[y]=e[k],c[y+1]=e[k+1],c[y+2]=e[k+2],c[y+3]=x<s?i[x]:255;if(8==f)for(h=0;h<a;h++){var x;y=h<<2,k=3*(x=t[h]),c[y]=e[k],c[y+1]=e[k+1],c[y+2]=e[k+2],c[y+3]=x<s?i[x]:255}}else if(4==d){if(8==f)for(h=0;h<a;h++){y=h<<2;var S=t[_=h<<1];c[y]=S,c[y+1]=S,c[y+2]=S,c[y+3]=t[_+1]}if(16==f)for(h=0;h<a;h++){var _;y=h<<2,S=t[_=h<<2],c[y]=S,c[y+1]=S,c[y+2]=S,c[y+3]=t[_+2]}}else if(0==d)for(g=o.tabs.tRNS?o.tabs.tRNS:-1,b=0;b<r;b++){const e=b*l,r=b*n;if(1==f)for(var E=0;E<n;E++){var C=(S=255*(t[e+(E>>>3)]>>>7-(7&E)&1))==255*g?0:255;u[r+E]=C<<24|S<<16|S<<8|S}else if(2==f)for(E=0;E<n;E++)C=(S=85*(t[e+(E>>>2)]>>>6-((3&E)<<1)&3))==85*g?0:255,u[r+E]=C<<24|S<<16|S<<8|S;else if(4==f)for(E=0;E<n;E++)C=(S=17*(t[e+(E>>>1)]>>>4-((1&E)<<2)&15))==17*g?0:255,u[r+E]=C<<24|S<<16|S<<8|S;else if(8==f)for(E=0;E<n;E++)C=(S=t[e+E])==g?0:255,u[r+E]=C<<24|S<<16|S<<8|S;else if(16==f)for(E=0;E<n;E++)S=t[e+(E<<1)],C=p(t,e+(E<<1))==g?0:255,u[r+E]=C<<24|S<<16|S<<8|S}return c}function n(e,t,n,s){const l=i(e),c=Math.ceil(n*l/8),u=new Uint8Array((c+1+e.interlace)*s);return t=e.tabs.CgBI?o(t,u):r(t,u),0==e.interlace?t=a(t,e,0,n,s):1==e.interlace&&(t=function(e,t){const n=t.width,r=t.height,o=i(t),s=o>>3,l=Math.ceil(n*o/8),c=new Uint8Array(r*l);let u=0;const d=[0,0,4,0,2,0,1],f=[0,4,0,2,0,1,0],p=[8,8,8,4,4,2,2],h=[8,8,4,4,2,2,1];let m=0;for(;m<7;){const i=p[m],y=h[m];let b=0,v=0,w=d[m];for(;w<r;)w+=i,v++;let k=f[m];for(;k<n;)k+=y,b++;const x=Math.ceil(b*o/8);a(e,t,u,b,v);let S=0,_=d[m];for(;_<r;){let t=f[m],r=u+S*x<<3;for(;t<n;){var g;if(1==o&&(g=(g=e[r>>3])>>7-(7&r)&1,c[_*l+(t>>3)]|=g<<7-(7&t)),2==o&&(g=(g=e[r>>3])>>6-(7&r)&3,c[_*l+(t>>2)]|=g<<6-((3&t)<<1)),4==o&&(g=(g=e[r>>3])>>4-(7&r)&15,c[_*l+(t>>1)]|=g<<4-((1&t)<<2)),o>=8){const n=_*l+t*s;for(let t=0;t<s;t++)c[n+t]=e[(r>>3)+t]}r+=o,t+=y}S++,_+=i}b*v!=0&&(u+=v*(1+x)),m+=1}return c}(t,e)),t}function r(e,t){return o(new Uint8Array(e.buffer,2,e.length-6),t)}var o=function(){const e={H:{}};return e.H.N=function(t,n){const r=Uint8Array;let o,i,a=0,s=0,l=0,c=0,u=0,d=0,f=0,p=0,h=0;if(3==t[0]&&0==t[1])return n||new r(0);const m=e.H,g=m.b,y=m.e,b=m.R,v=m.n,w=m.A,k=m.Z,x=m.m,S=null==n;for(S&&(n=new r(t.length>>>2<<5));0==a;)if(a=g(t,h,1),s=g(t,h+1,2),h+=3,0!=s){if(S&&(n=e.H.W(n,p+(1<<17))),1==s&&(o=x.J,i=x.h,d=511,f=31),2==s){l=y(t,h,5)+257,c=y(t,h+5,5)+1,u=y(t,h+10,4)+4,h+=14;let e=1;for(var _=0;_<38;_+=2)x.Q[_]=0,x.Q[_+1]=0;for(_=0;_<u;_++){const n=y(t,h+3*_,3);x.Q[1+(x.X[_]<<1)]=n,n>e&&(e=n)}h+=3*u,v(x.Q,e),w(x.Q,e,x.u),o=x.w,i=x.d,h=b(x.u,(1<<e)-1,l+c,t,h,x.v);const n=m.V(x.v,0,l,x.C);d=(1<<n)-1;const r=m.V(x.v,l,c,x.D);f=(1<<r)-1,v(x.C,n),w(x.C,n,o),v(x.D,r),w(x.D,r,i)}for(;;){const e=o[k(t,h)&d];h+=15&e;const r=e>>>4;if(r>>>8==0)n[p++]=r;else{if(256==r)break;{let e=p+r-254;if(r>264){const n=x.q[r-257];e=p+(n>>>3)+y(t,h,7&n),h+=7&n}const o=i[k(t,h)&f];h+=15&o;const a=o>>>4,s=x.c[a],l=(s>>>4)+g(t,h,15&s);for(h+=15&s;p<e;)n[p]=n[p++-l],n[p]=n[p++-l],n[p]=n[p++-l],n[p]=n[p++-l];p=e}}}}else{7&h&&(h+=8-(7&h));const o=4+(h>>>3),i=t[o-4]|t[o-3]<<8;S&&(n=e.H.W(n,p+i)),n.set(new r(t.buffer,t.byteOffset+o,i),p),h=o+i<<3,p+=i}return n.length==p?n:n.slice(0,p)},e.H.W=function(e,t){const n=e.length;if(t<=n)return e;const r=new Uint8Array(n<<1);return r.set(e,0),r},e.H.R=function(t,n,r,o,i,a){const s=e.H.e,l=e.H.Z;let c=0;for(;c<r;){const e=t[l(o,i)&n];i+=15&e;const r=e>>>4;if(r<=15)a[c]=r,c++;else{let e=0,t=0;16==r?(t=3+s(o,i,2),i+=2,e=a[c-1]):17==r?(t=3+s(o,i,3),i+=3):18==r&&(t=11+s(o,i,7),i+=7);const n=c+t;for(;c<n;)a[c]=e,c++}}return i},e.H.V=function(e,t,n,r){let o=0,i=0;const a=r.length>>>1;for(;i<n;){const n=e[i+t];r[i<<1]=0,r[1+(i<<1)]=n,n>o&&(o=n),i++}for(;i<a;)r[i<<1]=0,r[1+(i<<1)]=0,i++;return o},e.H.n=function(t,n){const r=e.H.m,o=t.length;let i,a,s,l;const c=r.j;for(var u=0;u<=n;u++)c[u]=0;for(u=1;u<o;u+=2)c[t[u]]++;const d=r.K;for(i=0,c[0]=0,a=1;a<=n;a++)i=i+c[a-1]<<1,d[a]=i;for(s=0;s<o;s+=2)l=t[s+1],0!=l&&(t[s]=d[l],d[l]++)},e.H.A=function(t,n,r){const o=t.length,i=e.H.m.r;for(let e=0;e<o;e+=2)if(0!=t[e+1]){const o=e>>1,a=t[e+1],s=o<<4|a,l=n-a;let c=t[e]<<l;const u=c+(1<<l);for(;c!=u;)r[i[c]>>>15-n]=s,c++}},e.H.l=function(t,n){const r=e.H.m.r,o=15-n;for(let e=0;e<t.length;e+=2){const i=t[e]<<n-t[e+1];t[e]=r[i]>>>o}},e.H.M=function(e,t,n){n<<=7&t;const r=t>>>3;e[r]|=n,e[r+1]|=n>>>8},e.H.I=function(e,t,n){n<<=7&t;const r=t>>>3;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},e.H.e=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<n)-1},e.H.b=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<n)-1},e.H.Z=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},e.H.i=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},e.H.m=function(){const e=Uint16Array,t=Uint32Array;return{K:new e(16),j:new e(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new e(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new t(32),J:new e(512),_:[],h:new e(32),$:[],w:new e(32768),C:[],v:[],d:new e(32768),D:[],u:new e(512),Q:[],r:new e(32768),s:new t(286),Y:new t(30),a:new t(19),t:new t(15e3),k:new e(65536),g:new e(32768)}}(),function(){const t=e.H.m;for(var n=0;n<32768;n++){let e=n;e=(2863311530&e)>>>1|(1431655765&e)<<1,e=(3435973836&e)>>>2|(858993459&e)<<2,e=(4042322160&e)>>>4|(252645135&e)<<4,e=(4278255360&e)>>>8|(16711935&e)<<8,t.r[n]=(e>>>16|e<<16)>>>17}function r(e,t,n){for(;0!=t--;)e.push(0,n)}for(n=0;n<32;n++)t.q[n]=t.S[n]<<3|t.T[n],t.c[n]=t.p[n]<<4|t.z[n];r(t._,144,8),r(t._,112,9),r(t._,24,7),r(t._,8,8),e.H.n(t._,9),e.H.A(t._,9,t.J),e.H.l(t._,9),r(t.$,32,5),e.H.n(t.$,5),e.H.A(t.$,5,t.h),e.H.l(t.$,5),r(t.Q,19,0),r(t.C,286,0),r(t.D,30,0),r(t.v,320,0)}(),e.H.N}();function i(e){return[1,null,3,1,2,null,4][e.ctype]*e.depth}function a(e,t,n,r,o){let a=i(t);const l=Math.ceil(r*a/8);let c,u;a=Math.ceil(a/8);let d=e[n],f=0;if(d>1&&(e[n]=[0,0,1][d-2]),3==d)for(f=a;f<l;f++)e[f+1]=e[f+1]+(e[f+1-a]>>>1)&255;for(let i=0;i<o;i++)if(c=n+i*l,u=c+i+1,d=e[u-1],f=0,0==d)for(;f<l;f++)e[c+f]=e[u+f];else if(1==d){for(;f<a;f++)e[c+f]=e[u+f];for(;f<l;f++)e[c+f]=e[u+f]+e[c+f-a]}else if(2==d)for(;f<l;f++)e[c+f]=e[u+f]+e[c+f-l];else if(3==d){for(;f<a;f++)e[c+f]=e[u+f]+(e[c+f-l]>>>1);for(;f<l;f++)e[c+f]=e[u+f]+(e[c+f-l]+e[c+f-a]>>>1)}else{for(;f<a;f++)e[c+f]=e[u+f]+s(0,e[c+f-l],0);for(;f<l;f++)e[c+f]=e[u+f]+s(e[c+f-a],e[c+f-l],e[c+f-a-l])}return e}function s(e,t,n){const r=e+t-n,o=r-e,i=r-t,a=r-n;return o*o<=i*i&&o*o<=a*a?e:i*i<=a*a?t:n}function l(t,n,r){r.width=e.readUint(t,n),n+=4,r.height=e.readUint(t,n),n+=4,r.depth=t[n],n++,r.ctype=t[n],n++,r.compress=t[n],n++,r.filter=t[n],n++,r.interlace=t[n],n++}function c(e,t,n,r,o,i,a,s,l){const c=Math.min(t,o),u=Math.min(n,i);let d=0,f=0;for(let k=0;k<u;k++)for(let n=0;n<c;n++)if(a>=0&&s>=0?(d=k*t+n<<2,f=(s+k)*o+a+n<<2):(d=(-s+k)*t-a+n<<2,f=k*o+n<<2),0==l)r[f]=e[d],r[f+1]=e[d+1],r[f+2]=e[d+2],r[f+3]=e[d+3];else if(1==l){var p=e[d+3]*(1/255),h=e[d]*p,m=e[d+1]*p,g=e[d+2]*p,y=r[f+3]*(1/255),b=r[f]*y,v=r[f+1]*y,w=r[f+2]*y;const t=1-p,n=p+y*t,o=0==n?0:1/n;r[f+3]=255*n,r[f+0]=(h+b*t)*o,r[f+1]=(m+v*t)*o,r[f+2]=(g+w*t)*o}else if(2==l)p=e[d+3],h=e[d],m=e[d+1],g=e[d+2],y=r[f+3],b=r[f],v=r[f+1],w=r[f+2],p==y&&h==b&&m==v&&g==w?(r[f]=0,r[f+1]=0,r[f+2]=0,r[f+3]=0):(r[f]=h,r[f+1]=m,r[f+2]=g,r[f+3]=p);else if(3==l){if(p=e[d+3],h=e[d],m=e[d+1],g=e[d+2],y=r[f+3],b=r[f],v=r[f+1],w=r[f+2],p==y&&h==b&&m==v&&g==w)continue;if(p<220&&y>20)return!1}return!0}return{decode:function(t){const i=new Uint8Array(t);let a=8;const s=e,c=s.readUshort,u=s.readUint,d={tabs:{},frames:[]},f=new Uint8Array(i.length);let p,h=0,m=0;const g=[137,80,78,71,13,10,26,10];for(var y=0;y<8;y++)if(i[y]!=g[y])throw"The input is not a PNG file!";for(;a<i.length;){const e=s.readUint(i,a);a+=4;const t=s.readASCII(i,a,4);if(a+=4,"IHDR"==t)l(i,a,d);else if("iCCP"==t){for(var b=a;0!=i[b];)b++;s.readASCII(i,a,b-a),i[b+1];const n=i.slice(b+2,a+e);let l=null;try{l=r(n)}catch(E){l=o(n)}d.tabs[t]=l}else if("CgBI"==t)d.tabs[t]=i.slice(a,a+4);else if("IDAT"==t){for(y=0;y<e;y++)f[h+y]=i[a+y];h+=e}else if("acTL"==t)d.tabs[t]={num_frames:u(i,a),num_plays:u(i,a+4)},p=new Uint8Array(i.length);else if("fcTL"==t){0!=m&&((_=d.frames[d.frames.length-1]).data=n(d,p.slice(0,m),_.rect.width,_.rect.height),m=0);const e={x:u(i,a+12),y:u(i,a+16),width:u(i,a+4),height:u(i,a+8)};let t=c(i,a+22);t=c(i,a+20)/(0==t?100:t);const r={rect:e,delay:Math.round(1e3*t),dispose:i[a+24],blend:i[a+25]};d.frames.push(r)}else if("fdAT"==t){for(y=0;y<e-4;y++)p[m+y]=i[a+y+4];m+=e-4}else if("pHYs"==t)d.tabs[t]=[s.readUint(i,a),s.readUint(i,a+4),i[a+8]];else if("cHRM"==t)for(d.tabs[t]=[],y=0;y<8;y++)d.tabs[t].push(s.readUint(i,a+4*y));else if("tEXt"==t||"zTXt"==t){null==d.tabs[t]&&(d.tabs[t]={});var v=s.nextZero(i,a),w=s.readASCII(i,a,v-a),k=a+e-v-1;if("tEXt"==t)S=s.readASCII(i,v+1,k);else{var x=r(i.slice(v+2,v+2+k));S=s.readUTF8(x,0,x.length)}d.tabs[t][w]=S}else if("iTXt"==t){null==d.tabs[t]&&(d.tabs[t]={}),v=0,b=a,v=s.nextZero(i,b),w=s.readASCII(i,b,v-b);const n=i[b=v+1];var S;i[b+1],b+=2,v=s.nextZero(i,b),s.readASCII(i,b,v-b),b=v+1,v=s.nextZero(i,b),s.readUTF8(i,b,v-b),k=e-((b=v+1)-a),0==n?S=s.readUTF8(i,b,k):(x=r(i.slice(b,b+k)),S=s.readUTF8(x,0,x.length)),d.tabs[t][w]=S}else if("PLTE"==t)d.tabs[t]=s.readBytes(i,a,e);else if("hIST"==t){const e=d.tabs.PLTE.length/3;for(d.tabs[t]=[],y=0;y<e;y++)d.tabs[t].push(c(i,a+2*y))}else if("tRNS"==t)3==d.ctype?d.tabs[t]=s.readBytes(i,a,e):0==d.ctype?d.tabs[t]=c(i,a):2==d.ctype&&(d.tabs[t]=[c(i,a),c(i,a+2),c(i,a+4)]);else if("gAMA"==t)d.tabs[t]=s.readUint(i,a)/1e5;else if("sRGB"==t)d.tabs[t]=i[a];else if("bKGD"==t)0==d.ctype||4==d.ctype?d.tabs[t]=[c(i,a)]:2==d.ctype||6==d.ctype?d.tabs[t]=[c(i,a),c(i,a+2),c(i,a+4)]:3==d.ctype&&(d.tabs[t]=i[a]);else if("IEND"==t)break;a+=e,s.readUint(i,a),a+=4}var _;return 0!=m&&((_=d.frames[d.frames.length-1]).data=n(d,p.slice(0,m),_.rect.width,_.rect.height)),d.data=n(d,f,d.width,d.height),delete d.compress,delete d.interlace,delete d.filter,d},toRGBA8:function(e){const n=e.width,r=e.height;if(null==e.tabs.acTL)return[t(e.data,n,r,e).buffer];const o=[];null==e.frames[0].data&&(e.frames[0].data=e.data);const i=n*r*4,a=new Uint8Array(i),s=new Uint8Array(i),l=new Uint8Array(i);for(let d=0;d<e.frames.length;d++){const f=e.frames[d],p=f.rect.x,h=f.rect.y,m=f.rect.width,g=f.rect.height,y=t(f.data,m,g,e);if(0!=d)for(var u=0;u<i;u++)l[u]=a[u];if(0==f.blend?c(y,m,g,a,n,r,p,h,0):1==f.blend&&c(y,m,g,a,n,r,p,h,1),o.push(a.buffer.slice(0)),0==f.dispose);else if(1==f.dispose)c(s,m,g,a,n,r,p,h,0);else if(2==f.dispose)for(u=0;u<i;u++)a[u]=l[u]}return o},_paeth:s,_copyTile:c,_bin:e}}();!function(){const{_copyTile:e}=sy,{_bin:t}=sy,n=sy._paeth;var r={table:function(){const e=new Uint32Array(256);for(let t=0;t<256;t++){let n=t;for(let e=0;e<8;e++)1&n?n=3988292384^n>>>1:n>>>=1;e[t]=n}return e}(),update(e,t,n,o){for(let i=0;i<o;i++)e=r.table[255&(e^t[n+i])]^e>>>8;return e},crc:(e,t,n)=>4294967295^r.update(4294967295,e,t,n)};function o(e,t,n,r){t[n]+=e[0]*r>>4,t[n+1]+=e[1]*r>>4,t[n+2]+=e[2]*r>>4,t[n+3]+=e[3]*r>>4}function i(e){return Math.max(0,Math.min(255,e))}function a(e,t){const n=e[0]-t[0],r=e[1]-t[1],o=e[2]-t[2],i=e[3]-t[3];return n*n+r*r+o*o+i*i}function s(e,t,n,r,s,l,c){null==c&&(c=1);const u=r.length,d=[];for(var f=0;f<u;f++){const e=r[f];d.push([e>>>0&255,e>>>8&255,e>>>16&255,e>>>24&255])}for(f=0;f<u;f++){let e=4294967295;for(var p=0,h=0;h<u;h++){var m=a(d[f],d[h]);h!=f&&m<e&&(e=m,p=h)}}const g=new Uint32Array(s.buffer),y=new Int16Array(t*n*4),b=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(f=0;f<b.length;f++)b[f]=255*((b[f]+.5)/16-.5);for(let w=0;w<n;w++)for(let s=0;s<t;s++){var v;f=4*(w*t+s),2!=c?v=[i(e[f]+y[f]),i(e[f+1]+y[f+1]),i(e[f+2]+y[f+2]),i(e[f+3]+y[f+3])]:(m=b[4*(3&w)+(3&s)],v=[i(e[f]+m),i(e[f+1]+m),i(e[f+2]+m),i(e[f+3]+m)]),p=0;let k=16777215;for(h=0;h<u;h++){const e=a(v,d[h]);e<k&&(k=e,p=h)}const x=d[p],S=[v[0]-x[0],v[1]-x[1],v[2]-x[2],v[3]-x[3]];1==c&&(s!=t-1&&o(S,y,f+4,7),w!=n-1&&(0!=s&&o(S,y,f+4*t-4,3),o(S,y,f+4*t,5),s!=t-1&&o(S,y,f+4*t+4,1))),l[f>>2]=p,g[f>>2]=r[p]}}function l(e,n,o,i,a){null==a&&(a={});const{crc:s}=r,l=t.writeUint,c=t.writeUshort,u=t.writeASCII;let d=8;const f=e.frames.length>1;let p,h=!1,m=33+(f?20:0);if(null!=a.sRGB&&(m+=13),null!=a.pHYs&&(m+=21),null!=a.iCCP&&(p=pako.deflate(a.iCCP),m+=21+p.length+4),3==e.ctype){for(var g=e.plte.length,y=0;y<g;y++)e.plte[y]>>>24!=255&&(h=!0);m+=8+3*g+4+(h?8+1*g+4:0)}for(var b=0;b<e.frames.length;b++)f&&(m+=38),m+=(x=e.frames[b]).cimg.length+12,0!=b&&(m+=4);m+=12;const v=new Uint8Array(m),w=[137,80,78,71,13,10,26,10];for(y=0;y<8;y++)v[y]=w[y];if(l(v,d,13),d+=4,u(v,d,"IHDR"),d+=4,l(v,d,n),d+=4,l(v,d,o),d+=4,v[d]=e.depth,d++,v[d]=e.ctype,d++,v[d]=0,d++,v[d]=0,d++,v[d]=0,d++,l(v,d,s(v,d-17,17)),d+=4,null!=a.sRGB&&(l(v,d,1),d+=4,u(v,d,"sRGB"),d+=4,v[d]=a.sRGB,d++,l(v,d,s(v,d-5,5)),d+=4),null!=a.iCCP){const e=13+p.length;l(v,d,e),d+=4,u(v,d,"iCCP"),d+=4,u(v,d,"ICC profile"),d+=11,d+=2,v.set(p,d),d+=p.length,l(v,d,s(v,d-(e+4),e+4)),d+=4}if(null!=a.pHYs&&(l(v,d,9),d+=4,u(v,d,"pHYs"),d+=4,l(v,d,a.pHYs[0]),d+=4,l(v,d,a.pHYs[1]),d+=4,v[d]=a.pHYs[2],d++,l(v,d,s(v,d-13,13)),d+=4),f&&(l(v,d,8),d+=4,u(v,d,"acTL"),d+=4,l(v,d,e.frames.length),d+=4,l(v,d,null!=a.loop?a.loop:0),d+=4,l(v,d,s(v,d-12,12)),d+=4),3==e.ctype){for(l(v,d,3*(g=e.plte.length)),d+=4,u(v,d,"PLTE"),d+=4,y=0;y<g;y++){const t=3*y,n=e.plte[y],r=255&n,o=n>>>8&255,i=n>>>16&255;v[d+t+0]=r,v[d+t+1]=o,v[d+t+2]=i}if(d+=3*g,l(v,d,s(v,d-3*g-4,3*g+4)),d+=4,h){for(l(v,d,g),d+=4,u(v,d,"tRNS"),d+=4,y=0;y<g;y++)v[d+y]=e.plte[y]>>>24&255;d+=g,l(v,d,s(v,d-g-4,g+4)),d+=4}}let k=0;for(b=0;b<e.frames.length;b++){var x=e.frames[b];f&&(l(v,d,26),d+=4,u(v,d,"fcTL"),d+=4,l(v,d,k++),d+=4,l(v,d,x.rect.width),d+=4,l(v,d,x.rect.height),d+=4,l(v,d,x.rect.x),d+=4,l(v,d,x.rect.y),d+=4,c(v,d,i[b]),d+=2,c(v,d,1e3),d+=2,v[d]=x.dispose,d++,v[d]=x.blend,d++,l(v,d,s(v,d-30,30)),d+=4);const t=x.cimg;l(v,d,(g=t.length)+(0==b?0:4)),d+=4;const n=d;u(v,d,0==b?"IDAT":"fdAT"),d+=4,0!=b&&(l(v,d,k++),d+=4),v.set(t,d),d+=g,l(v,d,s(v,n,d-n)),d+=4}return l(v,d,0),d+=4,u(v,d,"IEND"),d+=4,l(v,d,s(v,d-4,4)),d+=4,v.buffer}function c(e,t,n){for(let r=0;r<e.frames.length;r++){const o=e.frames[r];o.rect.width;const i=o.rect.height,a=new Uint8Array(i*o.bpl+i);o.cimg=p(o.img,i,o.bpp,o.bpl,a,t,n)}}function u(t,n,r,o,i){const a=i[0],l=i[1],c=i[2],u=i[3],p=i[4],h=i[5];let g=6,y=8,b=255;for(var v=0;v<t.length;v++){const e=new Uint8Array(t[v]);for(var w=e.length,k=0;k<w;k+=4)b&=e[k+3]}const x=255!=b,S=function(t,n,r,o,i,a){const s=[];for(var l=0;l<t.length;l++){const d=new Uint8Array(t[l]),p=new Uint32Array(d.buffer);var c;let m=0,g=0,y=n,b=r,v=o?1:0;if(0!=l){const w=a||o||1==l||0!=s[l-2].dispose?1:2;let k=0,x=1e9;for(let e=0;e<w;e++){var u=new Uint8Array(t[l-1-e]);const o=new Uint32Array(t[l-1-e]);let a=n,s=r,c=-1,d=-1;for(let e=0;e<r;e++)for(let t=0;t<n;t++)p[h=e*n+t]!=o[h]&&(t<a&&(a=t),t>c&&(c=t),e<s&&(s=e),e>d&&(d=e));-1==c&&(a=s=c=d=0),i&&(!(1&~a)&&a--,!(1&~s)&&s--);const f=(c-a+1)*(d-s+1);f<x&&(x=f,k=e,m=a,g=s,y=c-a+1,b=d-s+1)}u=new Uint8Array(t[l-1-k]),1==k&&(s[l-1].dispose=2),c=new Uint8Array(y*b*4),e(u,n,r,c,y,b,-m,-g,0),v=e(d,n,r,c,y,b,-m,-g,3)?1:0,1==v?f(d,n,r,c,{x:m,y:g,width:y,height:b}):e(d,n,r,c,y,b,-m,-g,0)}else c=d.slice(0);s.push({rect:{x:m,y:g,width:y,height:b},img:c,blend:v,dispose:0})}if(o)for(l=0;l<s.length;l++){if(1==(m=s[l]).blend)continue;const e=m.rect,o=s[l-1].rect,a=Math.min(e.x,o.x),c=Math.min(e.y,o.y),u={x:a,y:c,width:Math.max(e.x+e.width,o.x+o.width)-a,height:Math.max(e.y+e.height,o.y+o.height)-c};s[l-1].dispose=1,l-1!=0&&d(t,n,r,s,l-1,u,i),d(t,n,r,s,l,u,i)}let p=0;if(1!=t.length)for(var h=0;h<s.length;h++){var m;p+=(m=s[h]).rect.width*m.rect.height}return s}(t,n,r,a,l,c),_={},E=[],C=[];if(0!=o){const e=[];for(k=0;k<S.length;k++)e.push(S[k].img.buffer);const t=m(function(e){let t=0;for(var n=0;n<e.length;n++)t+=e[n].byteLength;const r=new Uint8Array(t);let o=0;for(n=0;n<e.length;n++){const t=new Uint8Array(e[n]),i=t.length;for(let e=0;e<i;e+=4){let n=t[e],i=t[e+1],a=t[e+2];const s=t[e+3];0==s&&(n=i=a=0),r[o+e]=n,r[o+e+1]=i,r[o+e+2]=a,r[o+e+3]=s}o+=i}return r.buffer}(e),o);for(k=0;k<t.plte.length;k++)E.push(t.plte[k].est.rgba);let n=0;for(k=0;k<S.length;k++){const e=(A=S[k]).img.length;var z=new Uint8Array(t.inds.buffer,n>>2,e>>2);C.push(z);const r=new Uint8Array(t.abuf,n,e);h&&s(A.img,A.rect.width,A.rect.height,E,r,z),A.img.set(r),n+=e}}else for(v=0;v<S.length;v++){var A=S[v];const e=new Uint32Array(A.img.buffer);var N=A.rect.width;for(w=e.length,z=new Uint8Array(w),C.push(z),k=0;k<w;k++){const t=e[k];if(0!=k&&t==e[k-1])z[k]=z[k-1];else if(k>N&&t==e[k-N])z[k]=z[k-N];else{let e=_[t];if(null==e&&(_[t]=e=E.length,E.push(t),E.length>=300))break;z[k]=e}}}const T=E.length;for(T<=256&&0==p&&(y=T<=2?1:T<=4?2:T<=16?4:8,y=Math.max(y,u)),v=0;v<S.length;v++){(A=S[v]).rect.x,A.rect.y,N=A.rect.width;const e=A.rect.height;let t=A.img;new Uint32Array(t.buffer);let n=4*N,r=4;if(T<=256&&0==p){n=Math.ceil(y*N/8);var O=new Uint8Array(n*e);const o=C[v];for(let t=0;t<e;t++){k=t*n;const e=t*N;if(8==y)for(var P=0;P<N;P++)O[k+P]=o[e+P];else if(4==y)for(P=0;P<N;P++)O[k+(P>>1)]|=o[e+P]<<4-4*(1&P);else if(2==y)for(P=0;P<N;P++)O[k+(P>>2)]|=o[e+P]<<6-2*(3&P);else if(1==y)for(P=0;P<N;P++)O[k+(P>>3)]|=o[e+P]<<7-1*(7&P)}t=O,g=3,r=1}else if(0==x&&1==S.length){O=new Uint8Array(N*e*3);const o=N*e;for(k=0;k<o;k++){const e=3*k,n=4*k;O[e]=t[n],O[e+1]=t[n+1],O[e+2]=t[n+2]}t=O,g=2,r=3,n=3*N}A.img=t,A.bpl=n,A.bpp=r}return{ctype:g,depth:y,plte:E,frames:S}}function d(t,n,r,o,i,a,s){const l=Uint8Array,c=Uint32Array,u=new l(t[i-1]),d=new c(t[i-1]),p=i+1<t.length?new l(t[i+1]):null,h=new l(t[i]),m=new c(h.buffer);let g=n,y=r,b=-1,v=-1;for(let e=0;e<a.height;e++)for(let t=0;t<a.width;t++){const r=a.x+t,s=a.y+e,l=s*n+r,c=m[l];0==c||0==o[i-1].dispose&&d[l]==c&&(null==p||0!=p[4*l+3])||(r<g&&(g=r),r>b&&(b=r),s<y&&(y=s),s>v&&(v=s))}-1==b&&(g=y=b=v=0),s&&(!(1&~g)&&g--,!(1&~y)&&y--),a={x:g,y:y,width:b-g+1,height:v-y+1};const w=o[i];w.rect=a,w.blend=1,w.img=new Uint8Array(a.width*a.height*4),0==o[i-1].dispose?(e(u,n,r,w.img,a.width,a.height,-a.x,-a.y,0),f(h,n,r,w.img,a)):e(h,n,r,w.img,a.width,a.height,-a.x,-a.y,0)}function f(t,n,r,o,i){e(t,n,r,o,i.width,i.height,-i.x,-i.y,2)}function p(e,t,n,r,o,i,a){const s=[];let l,c=[0,1,2,3,4];-1!=i?c=[i]:(t*r>5e5||1==n)&&(c=[0]),a&&(l={level:0});const u=ay;for(var d=0;d<c.length;d++){for(let i=0;i<t;i++)h(o,e,i,r,n,c[d]);s.push(u.deflate(o,l))}let f,p=1e9;for(d=0;d<s.length;d++)s[d].length<p&&(f=d,p=s[d].length);return s[f]}function h(e,t,r,o,i,a){const s=r*o;let l=s+r;if(e[l]=a,l++,0==a)if(o<500)for(var c=0;c<o;c++)e[l+c]=t[s+c];else e.set(new Uint8Array(t.buffer,s,o),l);else if(1==a){for(c=0;c<i;c++)e[l+c]=t[s+c];for(c=i;c<o;c++)e[l+c]=t[s+c]-t[s+c-i]+256&255}else if(0==r){for(c=0;c<i;c++)e[l+c]=t[s+c];if(2==a)for(c=i;c<o;c++)e[l+c]=t[s+c];if(3==a)for(c=i;c<o;c++)e[l+c]=t[s+c]-(t[s+c-i]>>1)+256&255;if(4==a)for(c=i;c<o;c++)e[l+c]=t[s+c]-n(t[s+c-i],0,0)+256&255}else{if(2==a)for(c=0;c<o;c++)e[l+c]=t[s+c]+256-t[s+c-o]&255;if(3==a){for(c=0;c<i;c++)e[l+c]=t[s+c]+256-(t[s+c-o]>>1)&255;for(c=i;c<o;c++)e[l+c]=t[s+c]+256-(t[s+c-o]+t[s+c-i]>>1)&255}if(4==a){for(c=0;c<i;c++)e[l+c]=t[s+c]+256-n(0,t[s+c-o],0)&255;for(c=i;c<o;c++)e[l+c]=t[s+c]+256-n(t[s+c-i],t[s+c-o],t[s+c-i-o])&255}}}function m(e,t){const n=new Uint8Array(e),r=n.slice(0),o=new Uint32Array(r.buffer),i=g(r,t),a=i[0],s=i[1],l=n.length,c=new Uint8Array(l>>2);let u;if(n.length<2e7)for(var d=0;d<l;d+=4)u=y(a,f=n[d]*(1/255),p=n[d+1]*(1/255),h=n[d+2]*(1/255),m=n[d+3]*(1/255)),c[d>>2]=u.ind,o[d>>2]=u.est.rgba;else for(d=0;d<l;d+=4){var f=n[d]*(1/255),p=n[d+1]*(1/255),h=n[d+2]*(1/255),m=n[d+3]*(1/255);for(u=a;u.left;)u=b(u.est,f,p,h,m)<=0?u.left:u.right;c[d>>2]=u.ind,o[d>>2]=u.est.rgba}return{abuf:r.buffer,inds:c,plte:s}}function g(e,t,n){null==n&&(n=1e-4);const r=new Uint32Array(e.buffer),o={i0:0,i1:e.length,bst:null,est:null,tdst:0,left:null,right:null};o.bst=k(e,o.i0,o.i1),o.est=x(o.bst);const i=[o];for(;i.length<t;){let t=0,o=0;for(var a=0;a<i.length;a++)i[a].est.L>t&&(t=i[a].est.L,o=a);if(t<n)break;const s=i[o],l=v(e,r,s.i0,s.i1,s.est.e,s.est.eMq255);if(s.i0>=l||s.i1<=l){s.est.L=0;continue}const c={i0:s.i0,i1:l,bst:null,est:null,tdst:0,left:null,right:null};c.bst=k(e,c.i0,c.i1),c.est=x(c.bst);const u={i0:l,i1:s.i1,bst:null,est:null,tdst:0,left:null,right:null};for(u.bst={R:[],m:[],N:s.bst.N-c.bst.N},a=0;a<16;a++)u.bst.R[a]=s.bst.R[a]-c.bst.R[a];for(a=0;a<4;a++)u.bst.m[a]=s.bst.m[a]-c.bst.m[a];u.est=x(u.bst),s.left=c,s.right=u,i[o]=c,i.push(u)}for(i.sort((e,t)=>t.bst.N-e.bst.N),a=0;a<i.length;a++)i[a].ind=a;return[o,i]}function y(e,t,n,r,o){if(null==e.left)return e.tdst=function(e,t,n,r,o){const i=t-e[0],a=n-e[1],s=r-e[2],l=o-e[3];return i*i+a*a+s*s+l*l}(e.est.q,t,n,r,o),e;const i=b(e.est,t,n,r,o);let a=e.left,s=e.right;i>0&&(a=e.right,s=e.left);const l=y(a,t,n,r,o);if(l.tdst<=i*i)return l;const c=y(s,t,n,r,o);return c.tdst<l.tdst?c:l}function b(e,t,n,r,o){const{e:i}=e;return i[0]*t+i[1]*n+i[2]*r+i[3]*o-e.eMq}function v(e,t,n,r,o,i){for(r-=4;n<r;){for(;w(e,n,o)<=i;)n+=4;for(;w(e,r,o)>i;)r-=4;if(n>=r)break;const a=t[n>>2];t[n>>2]=t[r>>2],t[r>>2]=a,n+=4,r-=4}for(;w(e,n,o)>i;)n-=4;return n+4}function w(e,t,n){return e[t]*n[0]+e[t+1]*n[1]+e[t+2]*n[2]+e[t+3]*n[3]}function k(e,t,n){const r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],o=[0,0,0,0],i=n-t>>2;for(let a=t;a<n;a+=4){const t=e[a]*(1/255),n=e[a+1]*(1/255),i=e[a+2]*(1/255),s=e[a+3]*(1/255);o[0]+=t,o[1]+=n,o[2]+=i,o[3]+=s,r[0]+=t*t,r[1]+=t*n,r[2]+=t*i,r[3]+=t*s,r[5]+=n*n,r[6]+=n*i,r[7]+=n*s,r[10]+=i*i,r[11]+=i*s,r[15]+=s*s}return r[4]=r[1],r[8]=r[2],r[9]=r[6],r[12]=r[3],r[13]=r[7],r[14]=r[11],{R:r,m:o,N:i}}function x(e){const{R:t}=e,{m:n}=e,{N:r}=e,o=n[0],i=n[1],a=n[2],s=n[3],l=0==r?0:1/r,c=[t[0]-o*o*l,t[1]-o*i*l,t[2]-o*a*l,t[3]-o*s*l,t[4]-i*o*l,t[5]-i*i*l,t[6]-i*a*l,t[7]-i*s*l,t[8]-a*o*l,t[9]-a*i*l,t[10]-a*a*l,t[11]-a*s*l,t[12]-s*o*l,t[13]-s*i*l,t[14]-s*a*l,t[15]-s*s*l],u=c,d=S;let f=[Math.random(),Math.random(),Math.random(),Math.random()],p=0,h=0;if(0!=r)for(let g=0;g<16&&(f=d.multVec(u,f),h=Math.sqrt(d.dot(f,f)),f=d.sml(1/h,f),!(0!=g&&Math.abs(h-p)<1e-9));g++)p=h;const m=[o*l,i*l,a*l,s*l];return{Cov:c,q:m,e:f,L:p,eMq255:d.dot(d.sml(255,m),f),eMq:d.dot(f,m),rgba:(Math.round(255*m[3])<<24|Math.round(255*m[2])<<16|Math.round(255*m[1])<<8|Math.round(255*m[0]))>>>0}}var S={multVec:(e,t)=>[e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],e[4]*t[0]+e[5]*t[1]+e[6]*t[2]+e[7]*t[3],e[8]*t[0]+e[9]*t[1]+e[10]*t[2]+e[11]*t[3],e[12]*t[0]+e[13]*t[1]+e[14]*t[2]+e[15]*t[3]],dot:(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],sml:(e,t)=>[e*t[0],e*t[1],e*t[2],e*t[3]]};sy.encode=function(e,t,n,r,o,i,a){null==r&&(r=0),null==a&&(a=!1);const s=u(e,t,n,r,[!1,!1,!1,0,a,!1]);return c(s,-1),l(s,t,n,o,i)},sy.encodeLL=function(e,t,n,r,o,i,a,s){const u={ctype:0+(1==r?0:2)+(0==o?0:4),depth:i,frames:[]},d=(r+o)*i,f=d*t;for(let l=0;l<e.length;l++)u.frames.push({rect:{x:0,y:0,width:t,height:n},img:new Uint8Array(e[l]),blend:0,dispose:1,bpp:Math.ceil(d/8),bpl:Math.ceil(f/8)});return c(u,0,!0),l(u,t,n,a,s)},sy.encode.compress=u,sy.encode.dither=s,sy.quantize=m,sy.quantize.getKDtree=g,sy.quantize.getNearest=y}();const ly={toArrayBuffer(e,t){const n=e.width,r=e.height,o=n<<2,i=e.getContext("2d").getImageData(0,0,n,r),a=new Uint32Array(i.data.buffer),s=(32*n+31)/32<<2,l=s*r,c=122+l,u=new ArrayBuffer(c),d=new DataView(u),f=1<<20;let p,h,m,g,y=f,b=0,v=0,w=0;function k(e){d.setUint16(v,e,!0),v+=2}function x(e){d.setUint32(v,e,!0),v+=4}function S(e){v+=e}k(19778),x(c),S(4),x(122),x(108),x(n),x(-r>>>0),k(1),k(32),x(3),x(l),x(2835),x(2835),S(8),x(16711680),x(65280),x(255),x(4278190080),x(1466527264),function e(){for(;b<r&&y>0;){for(g=122+b*s,p=0;p<o;)y--,h=a[w++],m=h>>>24,d.setUint32(g+p,h<<8|m),p+=4;b++}w<a.length?(y=f,setTimeout(e,ly._dly)):t(u)}()},toBlob(e,t){this.toArrayBuffer(e,e=>{t(new Blob([e],{type:"image/bmp"}))})},_dly:9};var cy={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},uy={[cy.CHROME]:16384,[cy.FIREFOX]:11180,[cy.DESKTOP_SAFARI]:16384,[cy.IE]:8192,[cy.IOS]:4096,[cy.ETC]:8192};const dy="undefined"!=typeof window,fy="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,py=dy&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),hy=(dy||fy)&&(py&&py.getOriginalSymbol(window,"File")||"undefined"!=typeof File&&File),my=(dy||fy)&&(py&&py.getOriginalSymbol(window,"FileReader")||"undefined"!=typeof FileReader&&FileReader);function gy(e,t,n=Date.now()){return new Promise(r=>{const o=e.split(","),i=o[0].match(/:(.*?);/)[1],a=globalThis.atob(o[1]);let s=a.length;const l=new Uint8Array(s);for(;s--;)l[s]=a.charCodeAt(s);const c=new Blob([l],{type:i});c.name=t,c.lastModified=n,r(c)})}function yy(e){return new Promise((t,n)=>{const r=new my;r.onload=()=>t(r.result),r.onerror=e=>n(e),r.readAsDataURL(e)})}function by(e){return new Promise((t,n)=>{const r=new Image;r.onload=()=>t(r),r.onerror=e=>n(e),r.src=e})}function vy(){if(void 0!==vy.cachedResult)return vy.cachedResult;let e=cy.ETC;const{userAgent:t}=navigator;return/Chrom(e|ium)/i.test(t)?e=cy.CHROME:/iP(ad|od|hone)/i.test(t)&&/WebKit/i.test(t)?e=cy.IOS:/Safari/i.test(t)?e=cy.DESKTOP_SAFARI:/Firefox/i.test(t)?e=cy.FIREFOX:(/MSIE/i.test(t)||1==!!document.documentMode)&&(e=cy.IE),vy.cachedResult=e,vy.cachedResult}function wy(e,t){const n=vy(),r=uy[n];let o=e,i=t,a=o*i;const s=o>i?i/o:o/i;for(;a>r*r;){const e=(r+o)/2,t=(r+i)/2;e<t?(i=t,o=t*s):(i=e*s,o=e),a=o*i}return{width:o,height:i}}function ky(e,t){let n,r;try{if(n=new OffscreenCanvas(e,t),r=n.getContext("2d"),null===r)throw new Error("getContext of OffscreenCanvas returns null")}catch(o){n=document.createElement("canvas"),r=n.getContext("2d")}return n.width=e,n.height=t,[n,r]}function xy(e,t){const{width:n,height:r}=wy(e.width,e.height),[o,i]=ky(n,r);return t&&/jpe?g/.test(t)&&(i.fillStyle="white",i.fillRect(0,0,o.width,o.height)),i.drawImage(e,0,0,o.width,o.height),o}function Sy(){return void 0!==Sy.cachedResult||(Sy.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"undefined"!=typeof document&&"ontouchend"in document),Sy.cachedResult}function _y(e,t={}){return new Promise(function(n,r){let o,i;var a=function(){try{return i=xy(o,t.fileType||e.type),n([o,i])}catch(a){return r(a)}},s=function(t){try{var n=function(e){try{throw e}catch(t){return r(t)}};try{let t;return yy(e).then(function(e){try{return t=e,by(t).then(function(e){try{return o=e,function(){try{return a()}catch(e){return r(e)}}()}catch(t){return n(t)}},n)}catch(i){return n(i)}},n)}catch(i){n(i)}}catch(i){return r(i)}};try{if(Sy()||[cy.DESKTOP_SAFARI,cy.MOBILE_SAFARI].includes(vy()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(e).then(function(e){try{return o=e,a()}catch(t){return s()}},s)}catch(l){s()}})}function Ey(e,t,n,r,o=1){return new Promise(function(i,a){let s;if("image/png"===t){let i,a,c;return i=e.getContext("2d"),({data:a}=i.getImageData(0,0,e.width,e.height)),c=sy.encode([a.buffer],e.width,e.height,4096*o),s=new Blob([c],{type:t}),s.name=n,s.lastModified=r,l.call(this)}{let i=function(){return l.call(this)};if("image/bmp"===t)return new Promise(t=>ly.toBlob(e,t)).then(function(e){try{return s=e,s.name=n,s.lastModified=r,i.call(this)}catch(t){return a(t)}}.bind(this),a);{let l=function(){return i.call(this)};if("function"==typeof OffscreenCanvas&&e instanceof OffscreenCanvas)return e.convertToBlob({type:t,quality:o}).then(function(e){try{return s=e,s.name=n,s.lastModified=r,l.call(this)}catch(t){return a(t)}}.bind(this),a);{let i;return i=e.toDataURL(t,o),gy(i,n,r).then(function(e){try{return s=e,l.call(this)}catch(t){return a(t)}}.bind(this),a)}}}function l(){return i(s)}})}function Cy(e){e.width=0,e.height=0}function zy(){return new Promise(function(e,t){let n,r,o,i;return void 0!==zy.cachedResult?e(zy.cachedResult):gy("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then(function(a){try{return n=a,_y(n).then(function(a){try{return r=a[1],Ey(r,n.type,n.name,n.lastModified).then(function(n){try{return o=n,Cy(r),_y(o).then(function(n){try{return i=n[0],zy.cachedResult=1===i.width&&2===i.height,e(zy.cachedResult)}catch(r){return t(r)}},t)}catch(a){return t(a)}},t)}catch(s){return t(s)}},t)}catch(s){return t(s)}},t)})}function Ay(e){return new Promise((t,n)=>{const r=new my;r.onload=e=>{const n=new DataView(e.target.result);if(65496!=n.getUint16(0,!1))return t(-2);const r=n.byteLength;let o=2;for(;o<r;){if(n.getUint16(o+2,!1)<=8)return t(-1);const e=n.getUint16(o,!1);if(o+=2,65505==e){if(1165519206!=n.getUint32(o+=2,!1))return t(-1);const e=18761==n.getUint16(o+=6,!1);o+=n.getUint32(o+4,e);const r=n.getUint16(o,e);o+=2;for(let i=0;i<r;i++)if(274==n.getUint16(o+12*i,e))return t(n.getUint16(o+12*i+8,e))}else{if(65280&~e)break;o+=n.getUint16(o,!1)}}return t(-1)},r.onerror=e=>n(e),r.readAsArrayBuffer(e)})}function Ny(e,t){const{width:n}=e,{height:r}=e,{maxWidthOrHeight:o}=t;let i,a=e;return isFinite(o)&&(n>o||r>o)&&([a,i]=ky(n,r),n>r?(a.width=o,a.height=r/n*o):(a.width=n/r*o,a.height=o),i.drawImage(e,0,0,a.width,a.height),Cy(e)),a}function Ty(e,t){const{width:n}=e,{height:r}=e,[o,i]=ky(n,r);switch(t>4&&t<9?(o.width=r,o.height=n):(o.width=n,o.height=r),t){case 2:i.transform(-1,0,0,1,n,0);break;case 3:i.transform(-1,0,0,-1,n,r);break;case 4:i.transform(1,0,0,-1,0,r);break;case 5:i.transform(0,1,1,0,0,0);break;case 6:i.transform(0,1,-1,0,r,0);break;case 7:i.transform(0,-1,-1,0,r,n);break;case 8:i.transform(0,-1,1,0,0,n)}return i.drawImage(e,0,0,n,r),Cy(e),o}function Oy(e,t,n=0){return new Promise(function(r,o){let i,a,s,l,c,u,d,f,p,h,m,g,y,b,v,w,k,x,S,_;function E(e=5){if(t.signal&&t.signal.aborted)throw t.signal.reason;i+=e,t.onProgress(Math.min(i,100))}function C(e){if(t.signal&&t.signal.aborted)throw t.signal.reason;i=Math.min(Math.max(e,i),100),t.onProgress(i)}return i=n,a=t.maxIteration||10,s=1024*t.maxSizeMB*1024,E(),_y(e,t).then(function(n){try{return[,l]=n,E(),c=Ny(l,t),E(),new Promise(function(n,r){var o;if(!(o=t.exifOrientation))return Ay(e).then(function(e){try{return o=e,i.call(this)}catch(t){return r(t)}}.bind(this),r);function i(){return n(o)}return i.call(this)}).then(function(n){try{return u=n,E(),zy().then(function(n){try{return d=n?c:Ty(c,u),E(),f=t.initialQuality||1,p=t.fileType||e.type,Ey(d,p,e.name,e.lastModified,f).then(function(n){try{{let u=function(){if(a--&&(v>s||v>y)){let t,n;return t=_?.95*S.width:S.width,n=_?.95*S.height:S.height,[k,x]=ky(t,n),x.drawImage(S,0,0,t,n),f*="image/png"===p?.85:.95,Ey(k,p,e.name,e.lastModified,f).then(function(e){try{return w=e,Cy(S),S=k,v=w.size,C(Math.min(99,Math.floor((b-v)/(b-s)*100))),u}catch(t){return o(t)}},o)}return[1]},z=function(){return Cy(S),Cy(k),Cy(c),Cy(d),Cy(l),C(100),r(w)};return h=n,E(),m=h.size>s,g=h.size>e.size,m||g?(y=e.size,b=h.size,v=b,S=d,_=!t.alwaysKeepResolution&&m,(i=function(e){for(;e;){if(e.then)return void e.then(i,o);try{if(e.pop){if(e.length)return e.pop()?z.call(this):e;e=u}else e=e.call(this)}catch(t){return o(t)}}}.bind(this))(u)):(C(100),r(h));var i}}catch(u){return o(u)}}.bind(this),o)}catch(i){return o(i)}}.bind(this),o)}catch(i){return o(i)}}.bind(this),o)}catch(i){return o(i)}}.bind(this),o)})}let Py;function Iy(e,t){return new Promise(function(n,r){let o,i,a,s,l,c;if(o={...t},a=0,({onProgress:s}=o),o.maxSizeMB=o.maxSizeMB||Number.POSITIVE_INFINITY,l="boolean"!=typeof o.useWebWorker||o.useWebWorker,delete o.useWebWorker,o.onProgress=e=>{a=e,"function"==typeof s&&s(a)},!(e instanceof Blob||e instanceof hy))return r(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return r(new Error("The file given is not an image"));if(c="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,!l||"function"!=typeof Worker||c)return Oy(e,o).then(function(e){try{return i=e,f.call(this)}catch(t){return r(t)}}.bind(this),r);var u=function(){try{return f.call(this)}catch(e){return r(e)}}.bind(this),d=function(t){try{return Oy(e,o).then(function(e){try{return i=e,u()}catch(t){return r(t)}},r)}catch(n){return r(n)}};try{return o.libURL=o.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",function(e,t){return new Promise((n,r)=>{Py||(Py=function(e){const t=[];return t.push(e),URL.createObjectURL(new Blob(t))}("\nlet scriptImported = false\nself.addEventListener('message', async (e) => {\n const { file, id, imageCompressionLibUrl, options } = e.data\n options.onProgress = (progress) => self.postMessage({ progress, id })\n try {\n if (!scriptImported) {\n // console.log('[worker] importScripts', imageCompressionLibUrl)\n self.importScripts(imageCompressionLibUrl)\n scriptImported = true\n }\n // console.log('[worker] self', self)\n const compressedFile = await imageCompression(file, options)\n self.postMessage({ file: compressedFile, id })\n } catch (e) {\n // console.error('[worker] error', e)\n self.postMessage({ error: e.message + '\\n' + e.stack, id })\n }\n})\n"));const o=new Worker(Py);o.addEventListener("message",function(e){if(t.signal&&t.signal.aborted)o.terminate();else if(void 0===e.data.progress){if(e.data.error)return r(new Error(e.data.error)),void o.terminate();n(e.data.file),o.terminate()}else t.onProgress(e.data.progress)}),o.addEventListener("error",r),t.signal&&t.signal.addEventListener("abort",()=>{r(t.signal.reason),o.terminate()}),o.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})})}(e,o).then(function(e){try{return i=e,u()}catch(t){return d()}},d)}catch(p){d()}function f(){try{i.name=e.name,i.lastModified=e.lastModified}catch(p){}try{o.preserveExif&&"image/jpeg"===e.type&&(!o.fileType||o.fileType&&o.fileType===e.type)&&(i=Jg(e,i))}catch(p){}return n(i)}})}Iy.getDataUrlFromFile=yy,Iy.getFilefromDataUrl=gy,Iy.loadImage=by,Iy.drawImageInCanvas=xy,Iy.drawFileInCanvas=_y,Iy.canvasToFile=Ey,Iy.getExifOrientation=Ay,Iy.handleMaxWidthOrHeight=Ny,Iy.followExifOrientation=Ty,Iy.cleanupCanvasMemory=Cy,Iy.isAutoOrientationInBrowser=zy,Iy.approximateBelowMaximumCanvasSizeOfBrowser=wy,Iy.copyExifWithoutOrientation=Jg,Iy.getBrowserName=vy,Iy.version="2.0.2";const My=Object.freeze(Object.defineProperty({__proto__:null,default:Iy},Symbol.toStringTag,{value:"Module"}));e.BotUyoChatWidget=D,e.default=R,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
2
|
+
//# sourceMappingURL=botuyo-chat.umd.js.map
|