@botuyo/chat-widget-standalone 1.0.20 → 1.0.21

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.
@@ -1,2 +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={},i={exports:{}},a={},s={exports:{}},l={};function c(){if(n)return l;n=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.iterator;var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function b(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||h}function y(){}function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||h}b.prototype.isReactComponent={},b.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=b.prototype;var w=v.prototype=new y;w.constructor=v,m(w,b.prototype),w.isPureReactComponent=!0;var x=Array.isArray,k=Object.prototype.hasOwnProperty,S={current:null},_={key:!0,ref:!0,__self:!0,__source:!0};function C(t,n,r){var o,i={},a=null,s=null;if(null!=n)for(o in void 0!==n.ref&&(s=n.ref),void 0!==n.key&&(a=""+n.key),n)k.call(n,o)&&!_.hasOwnProperty(o)&&(i[o]=n[o]);var l=arguments.length-2;if(1===l)i.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}if(t&&t.defaultProps)for(o in l=t.defaultProps)void 0===i[o]&&(i[o]=l[o]);return{$$typeof:e,type:t,key:a,ref:s,props:i,_owner:S.current}}function E(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var z=/\/+/g;function A(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function N(n,r,o,i,a){var s=typeof n;"undefined"!==s&&"boolean"!==s||(n=null);var l=!1;if(null===n)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(n.$$typeof){case e:case t:l=!0}}if(l)return a=a(l=n),n=""===i?"."+A(l,0):i,x(a)?(o="",null!=n&&(o=n.replace(z,"$&/")+"/"),N(a,r,o,"",function(e){return e})):null!=a&&(E(a)&&(a=function(t,n){return{$$typeof:e,type:t.type,key:n,ref:t.ref,props:t.props,_owner:t._owner}}(a,o+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(z,"$&/")+"/")+n)),r.push(a)),1;if(l=0,i=""===i?".":i+":",x(n))for(var c=0;c<n.length;c++){var u=i+A(s=n[c],c);l+=N(s,r,o,u,a)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=p&&e[p]||e["@@iterator"])?e:null}(n),"function"==typeof u)for(n=u.call(n),c=0;!(s=n.next()).done;)l+=N(s=s.value,r,o,u=i+A(s,c++),a);else if("object"===s)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 l}function T(e,t,n){if(null==e)return e;var r=[],o=0;return N(e,r,"","",function(e){return t.call(n,e,o++)}),r}function j(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={current:null},O={transition:null},M={ReactCurrentDispatcher:I,ReactCurrentBatchConfig:O,ReactCurrentOwner:S};function P(){throw Error("act(...) is not supported in production builds of React.")}return l.Children={map:T,forEach:function(e,t,n){T(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return T(e,function(){t++}),t},toArray:function(e){return T(e,function(e){return e})||[]},only:function(e){if(!E(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},l.Component=b,l.Fragment=r,l.Profiler=i,l.PureComponent=v,l.StrictMode=o,l.Suspense=u,l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M,l.act=P,l.cloneElement=function(t,n,r){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var o=m({},t.props),i=t.key,a=t.ref,s=t._owner;if(null!=n){if(void 0!==n.ref&&(a=n.ref,s=S.current),void 0!==n.key&&(i=""+n.key),t.type&&t.type.defaultProps)var l=t.type.defaultProps;for(c in n)k.call(n,c)&&!_.hasOwnProperty(c)&&(o[c]=void 0===n[c]&&void 0!==l?l[c]:n[c])}var c=arguments.length-2;if(1===c)o.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];o.children=l}return{$$typeof:e,type:t.type,key:i,ref:a,props:o,_owner:s}},l.createContext=function(e){return(e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},l.createElement=C,l.createFactory=function(e){var t=C.bind(null,e);return t.type=e,t},l.createRef=function(){return{current:null}},l.forwardRef=function(e){return{$$typeof:c,render:e}},l.isValidElement=E,l.lazy=function(e){return{$$typeof:f,_payload:{_status:-1,_result:e},_init:j}},l.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},l.startTransition=function(e){var t=O.transition;O.transition={};try{e()}finally{O.transition=t}},l.unstable_act=P,l.useCallback=function(e,t){return I.current.useCallback(e,t)},l.useContext=function(e){return I.current.useContext(e)},l.useDebugValue=function(){},l.useDeferredValue=function(e){return I.current.useDeferredValue(e)},l.useEffect=function(e,t){return I.current.useEffect(e,t)},l.useId=function(){return I.current.useId()},l.useImperativeHandle=function(e,t,n){return I.current.useImperativeHandle(e,t,n)},l.useInsertionEffect=function(e,t){return I.current.useInsertionEffect(e,t)},l.useLayoutEffect=function(e,t){return I.current.useLayoutEffect(e,t)},l.useMemo=function(e,t){return I.current.useMemo(e,t)},l.useReducer=function(e,t,n){return I.current.useReducer(e,t,n)},l.useRef=function(e){return I.current.useRef(e)},l.useState=function(e){return I.current.useState(e)},l.useSyncExternalStore=function(e,t,n){return I.current.useSyncExternalStore(e,t,n)},l.useTransition=function(){return I.current.useTransition()},l.version="18.3.1",l}function u(){return r||(r=1,s.exports=c()),s.exports}var d,f,p,h,m,g={exports:{}},b={};function y(){return f||(f=1,g.exports=(d||(d=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("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="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,y="undefined"!=typeof setImmediate?setImmediate:null;function v(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 w(e){if(m=!1,v(e),!h)if(null!==n(l))h=!0,I(x);else{var t=n(c);null!==t&&O(w,t.startTime-e)}}function x(t,o){h=!1,m&&(m=!1,b(C),C=-1),p=!0;var i=f;try{for(v(o),d=n(l);null!==d&&(!(d.expirationTime>o)||t&&!A());){var a=d.callback;if("function"==typeof a){d.callback=null,f=d.priorityLevel;var s=a(d.expirationTime<=o);o=e.unstable_now(),"function"==typeof s?d.callback=s:d===n(l)&&r(l),v(o)}else r(l);d=n(l)}if(null!==d)var u=!0;else{var g=n(c);null!==g&&O(w,g.startTime-o),u=!1}return u}finally{d=null,f=i,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k,S=!1,_=null,C=-1,E=5,z=-1;function A(){return!(e.unstable_now()-z<E)}function N(){if(null!==_){var t=e.unstable_now();z=t;var n=!0;try{n=_(!0,t)}finally{n?k():(S=!1,_=null)}}else S=!1}if("function"==typeof y)k=function(){y(N)};else if("undefined"!=typeof MessageChannel){var T=new MessageChannel,j=T.port2;T.port1.onmessage=N,k=function(){j.postMessage(null)}}else k=function(){g(N,0)};function I(e){_=e,S||(S=!0,k())}function O(t,n){C=g(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_continueExecution=function(){h||p||(h=!0,I(x))},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_getFirstCallbackNode=function(){return n(l)},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_pauseExecution=function(){},e.unstable_requestPaint=function(){},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(C),C=-1):m=!0,O(w,i-a))):(r.sortIndex=s,t(l,r),h||p||(h=!0,I(x))),r},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}}(b)),b)),g.exports}function v(){if(p)return a;p=1;var e=u(),t=y();function n(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function i(e,t){s(e,t),s(e+"Capture",t)}function s(e,t){for(o[e]=t,e=0;e<t.length;e++)r.add(t[e])}var l=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),c=Object.prototype.hasOwnProperty,d=/^[: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]*$/,f={},h={};function m(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){g[e]=new m(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];g[t]=new m(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){g[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){g[e]=new m(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){g[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){g[e]=new m(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){g[e]=new m(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){g[e]=new m(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){g[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)});var b=/[\-:]([a-z])/g;function v(e){return e[1].toUpperCase()}function w(e,t,n,r){var o=g.hasOwnProperty(t)?g[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!c.call(h,e)||!c.call(f,e)&&(d.test(e)?h[e]=!0:(f[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(b,v);g[t]=new m(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(b,v);g[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(b,v);g[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)}),g.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)});var x=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,k=Symbol.for("react.element"),S=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),z=Symbol.for("react.provider"),A=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),M=Symbol.for("react.offscreen"),P=Symbol.iterator;function F(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=P&&e[P]||e["@@iterator"])?e:null}var L,R=Object.assign;function D(e){if(void 0===L)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);L=t&&t[1]||""}return"\n"+L+e}var U=!1;function B(e,t){if(!e||U)return"";U=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&"string"==typeof c.stack){for(var o=c.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(1!==a||1!==s)do{if(a--,0>--s||o[a]!==i[s]){var l="\n"+o[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{U=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?D(e):""}function $(e){switch(e.tag){case 5:return D(e.type);case 16:return D("Lazy");case 13:return D("Suspense");case 19:return D("SuspenseList");case 0:case 2:case 15:return e=B(e.type,!1);case 11:return e=B(e.type.render,!1);case 1:return e=B(e.type,!0);default:return""}}function V(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case _:return"Fragment";case S:return"Portal";case E:return"Profiler";case C:return"StrictMode";case T:return"Suspense";case j:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case A:return(e.displayName||"Context")+".Consumer";case z:return(e._context.displayName||"Context")+".Provider";case N:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case I:return null!==(t=e.displayName||null)?t:V(e.type)||"Memo";case O:t=e._payload,e=e._init;try{return V(e(t))}catch(n){}}return null}function H(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return V(t);case 8:return t===C?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function W(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function q(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Z(e){e._valueTracker||(e._valueTracker=function(e){var t=q(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=q(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function K(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function J(e,t){var n=t.checked;return R({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Y(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=W(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function G(e,t){null!=(t=t.checked)&&w(e,"checked",t,!1)}function X(e,t){G(e,t);var n=W(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?te(e,t.type,n):t.hasOwnProperty("defaultValue")&&te(e,t.type,W(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function ee(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function te(e,t,n){"number"===t&&K(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ne=Array.isArray;function re(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=""+W(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 oe(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(n(91));return R({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var r=t.value;if(null==r){if(r=t.children,t=t.defaultValue,null!=r){if(null!=t)throw Error(n(92));if(ne(r)){if(1<r.length)throw Error(n(93));r=r[0]}t=r}null==t&&(t=""),r=t}e._wrapperState={initialValue:W(r)}}function ae(e,t){var n=W(t.value),r=W(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function se(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function le(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ce(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?le(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ue,de,fe=(de=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ue=ue||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ue.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return de(e,t)})}:de);function pe(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 he={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},me=["Webkit","ms","Moz","O"];function ge(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||he.hasOwnProperty(e)&&he[e]?(""+t).trim():t+"px"}function be(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=ge(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(he).forEach(function(e){me.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),he[t]=he[e]})});var ye=R({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ve(e,t){if(t){if(ye[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(n(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(n(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(n(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(n(62))}}function we(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;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 xe=null;function ke(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Se=null,_e=null,Ce=null;function Ee(e){if(e=xo(e)){if("function"!=typeof Se)throw Error(n(280));var t=e.stateNode;t&&(t=So(t),Se(e.stateNode,e.type,t))}}function ze(e){_e?Ce?Ce.push(e):Ce=[e]:_e=e}function Ae(){if(_e){var e=_e,t=Ce;if(Ce=_e=null,Ee(e),t)for(e=0;e<t.length;e++)Ee(t[e])}}function Ne(e,t){return e(t)}function Te(){}var je=!1;function Ie(e,t,n){if(je)return e(t,n);je=!0;try{return Ne(e,t,n)}finally{je=!1,(null!==_e||null!==Ce)&&(Te(),Ae())}}function Oe(e,t){var r=e.stateNode;if(null===r)return null;var o=So(r);if(null===o)return null;r=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(r&&"function"!=typeof r)throw Error(n(231,t,typeof r));return r}var Me=!1;if(l)try{var Pe={};Object.defineProperty(Pe,"passive",{get:function(){Me=!0}}),window.addEventListener("test",Pe,Pe),window.removeEventListener("test",Pe,Pe)}catch(de){Me=!1}function Fe(e,t,n,r,o,i,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var Le=!1,Re=null,De=!1,Ue=null,Be={onError:function(e){Le=!0,Re=e}};function $e(e,t,n,r,o,i,a,s,l){Le=!1,Re=null,Fe.apply(Be,arguments)}function Ve(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 He(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 We(e){if(Ve(e)!==e)throw Error(n(188))}function qe(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ve(e)))throw Error(n(188));return t!==e?null:e}for(var r=e,o=t;;){var i=r.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(o=i.return)){r=o;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===r)return We(i),e;if(a===o)return We(i),t;a=a.sibling}throw Error(n(188))}if(r.return!==o.return)r=i,o=a;else{for(var s=!1,l=i.child;l;){if(l===r){s=!0,r=i,o=a;break}if(l===o){s=!0,o=i,r=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===r){s=!0,r=a,o=i;break}if(l===o){s=!0,o=a,r=i;break}l=l.sibling}if(!s)throw Error(n(189))}}if(r.alternate!==o)throw Error(n(190))}if(3!==r.tag)throw Error(n(188));return r.stateNode.current===r?e:t}(e))?Ze(e):null}function Ze(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ze(e);if(null!==t)return t;e=e.sibling}return null}var Qe=t.unstable_scheduleCallback,Ke=t.unstable_cancelCallback,Je=t.unstable_shouldYield,Ye=t.unstable_requestPaint,Ge=t.unstable_now,Xe=t.unstable_getCurrentPriorityLevel,et=t.unstable_ImmediatePriority,tt=t.unstable_UserBlockingPriority,nt=t.unstable_NormalPriority,rt=t.unstable_LowPriority,ot=t.unstable_IdlePriority,it=null,at=null;var st=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(lt(e)/ct|0)|0},lt=Math.log,ct=Math.LN2;var ut=64,dt=4194304;function ft(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function pt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~o;0!==s?r=ft(s):0!==(i&=a)&&(r=ft(i))}else 0!==(a=n&~o)?r=ft(a):0!==i&&(r=ft(i));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&o)&&((o=r&-r)>=(i=t&-t)||16===o&&4194240&i))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-st(t)),r|=e[n],t&=~o;return r}function ht(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function mt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function gt(){var e=ut;return!(4194240&(ut<<=1))&&(ut=64),e}function bt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function yt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-st(t)]=n}function vt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-st(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var wt=0;function xt(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var kt,St,_t,Ct,Et,zt=!1,At=[],Nt=null,Tt=null,jt=null,It=new Map,Ot=new Map,Mt=[],Pt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ft(e,t){switch(e){case"focusin":case"focusout":Nt=null;break;case"dragenter":case"dragleave":Tt=null;break;case"mouseover":case"mouseout":jt=null;break;case"pointerover":case"pointerout":It.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ot.delete(t.pointerId)}}function Lt(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=xo(t))&&St(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function Rt(e){var t=wo(e.target);if(null!==t){var n=Ve(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=He(n)))return e.blockedOn=t,void Et(e.priority,function(){_t(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 Dt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Jt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=xo(n))&&St(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);xe=r,n.target.dispatchEvent(r),xe=null,t.shift()}return!0}function Ut(e,t,n){Dt(e)&&n.delete(t)}function Bt(){zt=!1,null!==Nt&&Dt(Nt)&&(Nt=null),null!==Tt&&Dt(Tt)&&(Tt=null),null!==jt&&Dt(jt)&&(jt=null),It.forEach(Ut),Ot.forEach(Ut)}function $t(e,n){e.blockedOn===n&&(e.blockedOn=null,zt||(zt=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Bt)))}function Vt(e){function t(t){return $t(t,e)}if(0<At.length){$t(At[0],e);for(var n=1;n<At.length;n++){var r=At[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Nt&&$t(Nt,e),null!==Tt&&$t(Tt,e),null!==jt&&$t(jt,e),It.forEach(t),Ot.forEach(t),n=0;n<Mt.length;n++)(r=Mt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Mt.length&&null===(n=Mt[0]).blockedOn;)Rt(n),null===n.blockedOn&&Mt.shift()}var Ht=x.ReactCurrentBatchConfig,Wt=!0;function qt(e,t,n,r){var o=wt,i=Ht.transition;Ht.transition=null;try{wt=1,Qt(e,t,n,r)}finally{wt=o,Ht.transition=i}}function Zt(e,t,n,r){var o=wt,i=Ht.transition;Ht.transition=null;try{wt=4,Qt(e,t,n,r)}finally{wt=o,Ht.transition=i}}function Qt(e,t,n,r){if(Wt){var o=Jt(e,t,n,r);if(null===o)Wr(e,t,r,Kt,n),Ft(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return Nt=Lt(Nt,e,t,n,r,o),!0;case"dragenter":return Tt=Lt(Tt,e,t,n,r,o),!0;case"mouseover":return jt=Lt(jt,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return It.set(i,Lt(It.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Ot.set(i,Lt(Ot.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(Ft(e,r),4&t&&-1<Pt.indexOf(e)){for(;null!==o;){var i=xo(o);if(null!==i&&kt(i),null===(i=Jt(e,t,n,r))&&Wr(e,t,r,Kt,n),i===o)break;o=i}null!==o&&r.stopPropagation()}else Wr(e,t,r,null,n)}}var Kt=null;function Jt(e,t,n,r){if(Kt=null,null!==(e=wo(e=ke(r))))if(null===(t=Ve(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=He(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 Kt=e,null}function Yt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Xe()){case et:return 1;case tt:return 4;case nt:case rt:return 16;case ot:return 536870912;default:return 16}default:return 16}}var Gt=null,Xt=null,en=null;function tn(){if(en)return en;var e,t,n=Xt,r=n.length,o="value"in Gt?Gt.value:Gt.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 en=o.slice(e,1<t?1-t:void 0)}function nn(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 rn(){return!0}function on(){return!1}function an(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)?rn:on,this.isPropagationStopped=on,this}return R(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=rn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=rn)},persist:function(){},isPersistent:rn}),t}var sn,ln,cn,un={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dn=an(un),fn=R({},un,{view:0,detail:0}),pn=an(fn),hn=R({},fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:En,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!==cn&&(cn&&"mousemove"===e.type?(sn=e.screenX-cn.screenX,ln=e.screenY-cn.screenY):ln=sn=0,cn=e),sn)},movementY:function(e){return"movementY"in e?e.movementY:ln}}),mn=an(hn),gn=an(R({},hn,{dataTransfer:0})),bn=an(R({},fn,{relatedTarget:0})),yn=an(R({},un,{animationName:0,elapsedTime:0,pseudoElement:0})),vn=R({},un,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),wn=an(vn),xn=an(R({},un,{data:0})),kn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},_n={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=_n[e])&&!!t[e]}function En(){return Cn}var zn=R({},fn,{key:function(e){if(e.key){var t=kn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=nn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Sn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:En,charCode:function(e){return"keypress"===e.type?nn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?nn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),An=an(zn),Nn=an(R({},hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Tn=an(R({},fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:En})),jn=an(R({},un,{propertyName:0,elapsedTime:0,pseudoElement:0})),In=R({},hn,{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}),On=an(In),Mn=[9,13,27,32],Pn=l&&"CompositionEvent"in window,Fn=null;l&&"documentMode"in document&&(Fn=document.documentMode);var Ln=l&&"TextEvent"in window&&!Fn,Rn=l&&(!Pn||Fn&&8<Fn&&11>=Fn),Dn=String.fromCharCode(32),Un=!1;function Bn(e,t){switch(e){case"keyup":return-1!==Mn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $n(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Vn=!1;var Hn={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 Wn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Hn[e.type]:"textarea"===t}function qn(e,t,n,r){ze(r),0<(t=Zr(t,"onChange")).length&&(n=new dn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Zn=null,Qn=null;function Kn(e){Dr(e,0)}function Jn(e){if(Q(ko(e)))return e}function Yn(e,t){if("change"===e)return t}var Gn=!1;if(l){var Xn;if(l){var er="oninput"in document;if(!er){var tr=document.createElement("div");tr.setAttribute("oninput","return;"),er="function"==typeof tr.oninput}Xn=er}else Xn=!1;Gn=Xn&&(!document.documentMode||9<document.documentMode)}function nr(){Zn&&(Zn.detachEvent("onpropertychange",rr),Qn=Zn=null)}function rr(e){if("value"===e.propertyName&&Jn(Qn)){var t=[];qn(t,Qn,e,ke(e)),Ie(Kn,t)}}function or(e,t,n){"focusin"===e?(nr(),Qn=n,(Zn=t).attachEvent("onpropertychange",rr)):"focusout"===e&&nr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Jn(Qn)}function ar(e,t){if("click"===e)return Jn(t)}function sr(e,t){if("input"===e||"change"===e)return Jn(t)}var lr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function cr(e,t){if(lr(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(!c.call(t,o)||!lr(e[o],t[o]))return!1}return!0}function ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function dr(e,t){var n,r=ur(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=ur(r)}}function fr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?fr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function pr(){for(var e=window,t=K();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=K((e=t.contentWindow).document)}return t}function hr(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)}function mr(e){var t=pr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&fr(n.ownerDocument.documentElement,n)){if(null!==r&&hr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=void 0===r.end?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=dr(n,i);var a=dr(n,r);o&&a&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var gr=l&&"documentMode"in document&&11>=document.documentMode,br=null,yr=null,vr=null,wr=!1;function xr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;wr||null==br||br!==K(r)||("selectionStart"in(r=br)&&hr(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},vr&&cr(vr,r)||(vr=r,0<(r=Zr(yr,"onSelect")).length&&(t=new dn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=br)))}function kr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Sr={animationend:kr("Animation","AnimationEnd"),animationiteration:kr("Animation","AnimationIteration"),animationstart:kr("Animation","AnimationStart"),transitionend:kr("Transition","TransitionEnd")},_r={},Cr={};function Er(e){if(_r[e])return _r[e];if(!Sr[e])return e;var t,n=Sr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Cr)return _r[e]=n[t];return e}l&&(Cr=document.createElement("div").style,"AnimationEvent"in window||(delete Sr.animationend.animation,delete Sr.animationiteration.animation,delete Sr.animationstart.animation),"TransitionEvent"in window||delete Sr.transitionend.transition);var zr=Er("animationend"),Ar=Er("animationiteration"),Nr=Er("animationstart"),Tr=Er("transitionend"),jr=new Map,Ir="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Or(e,t){jr.set(e,t),i(t,[e])}for(var Mr=0;Mr<Ir.length;Mr++){var Pr=Ir[Mr];Or(Pr.toLowerCase(),"on"+(Pr[0].toUpperCase()+Pr.slice(1)))}Or(zr,"onAnimationEnd"),Or(Ar,"onAnimationIteration"),Or(Nr,"onAnimationStart"),Or("dblclick","onDoubleClick"),Or("focusin","onFocus"),Or("focusout","onBlur"),Or(Tr,"onTransitionEnd"),s("onMouseEnter",["mouseout","mouseover"]),s("onMouseLeave",["mouseout","mouseover"]),s("onPointerEnter",["pointerout","pointerover"]),s("onPointerLeave",["pointerout","pointerover"]),i("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),i("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),i("onBeforeInput",["compositionend","keypress","textInput","paste"]),i("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fr="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(" "),Lr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Fr));function Rr(e,t,r){var o=e.type||"unknown-event";e.currentTarget=r,function(e,t,r,o,i,a,s,l,c){if($e.apply(this,arguments),Le){if(!Le)throw Error(n(198));var u=Re;Le=!1,Re=null,De||(De=!0,Ue=u)}}(o,t,void 0,e),e.currentTarget=null}function Dr(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;Rr(o,s,c),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;Rr(o,s,c),i=l}}}if(De)throw e=Ue,De=!1,Ue=null,e}function Ur(e,t){var n=t[bo];void 0===n&&(n=t[bo]=new Set);var r=e+"__bubble";n.has(r)||(Hr(t,e,2,!1),n.add(r))}function Br(e,t,n){var r=0;t&&(r|=4),Hr(n,e,r,t)}var $r="_reactListening"+Math.random().toString(36).slice(2);function Vr(e){if(!e[$r]){e[$r]=!0,r.forEach(function(t){"selectionchange"!==t&&(Lr.has(t)||Br(t,!1,e),Br(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[$r]||(t[$r]=!0,Br("selectionchange",!1,t))}}function Hr(e,t,n,r){switch(Yt(t)){case 1:var o=qt;break;case 4:o=Zt;break;default:o=Qt}n=o.bind(null,t,n,e),o=void 0,!Me||"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 Wr(e,t,n,r,o){var i=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===o||8===l.nodeType&&l.parentNode===o))return;a=a.return}for(;null!==s;){if(null===(a=wo(s)))return;if(5===(l=a.tag)||6===l){r=i=a;continue e}s=s.parentNode}}r=r.return}Ie(function(){var r=i,o=ke(n),a=[];e:{var s=jr.get(e);if(void 0!==s){var l=dn,c=e;switch(e){case"keypress":if(0===nn(n))break e;case"keydown":case"keyup":l=An;break;case"focusin":c="focus",l=bn;break;case"focusout":c="blur",l=bn;break;case"beforeblur":case"afterblur":l=bn;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":l=mn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=gn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Tn;break;case zr:case Ar:case Nr:l=yn;break;case Tr:l=jn;break;case"scroll":l=pn;break;case"wheel":l=On;break;case"copy":case"cut":case"paste":l=wn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Nn}var u=!!(4&t),d=!u&&"scroll"===e,f=u?null!==s?s+"Capture":null:s;u=[];for(var p,h=r;null!==h;){var m=(p=h).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==f&&(null!=(m=Oe(h,f))&&u.push(qr(h,m,p)))),d)break;h=h.return}0<u.length&&(s=new l(s,c,null,n,o),a.push({event:s,listeners:u}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===xe||!(c=n.relatedTarget||n.fromElement)||!wo(c)&&!c[go])&&(l||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?wo(c):null)&&(c!==(d=Ve(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=mn,m="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(u=Nn,m="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==l?s:ko(l),p=null==c?s:ko(c),(s=new u(m,h+"leave",l,n,o)).target=d,s.relatedTarget=p,m=null,wo(o)===r&&((u=new u(f,h+"enter",c,n,o)).target=p,u.relatedTarget=d,m=u),d=m,l&&c)e:{for(f=c,h=0,p=u=l;p;p=Qr(p))h++;for(p=0,m=f;m;m=Qr(m))p++;for(;0<h-p;)u=Qr(u),h--;for(;0<p-h;)f=Qr(f),p--;for(;h--;){if(u===f||null!==f&&u===f.alternate)break e;u=Qr(u),f=Qr(f)}u=null}else u=null;null!==l&&Kr(a,s,l,u,!1),null!==c&&null!==d&&Kr(a,d,c,u,!0)}if("select"===(l=(s=r?ko(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=Yn;else if(Wn(s))if(Gn)g=sr;else{g=ir;var b=or}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=ar);switch(g&&(g=g(e,r))?qn(a,g,n,o):(b&&b(e,s,r),"focusout"===e&&(b=s._wrapperState)&&b.controlled&&"number"===s.type&&te(s,"number",s.value)),b=r?ko(r):window,e){case"focusin":(Wn(b)||"true"===b.contentEditable)&&(br=b,yr=r,vr=null);break;case"focusout":vr=yr=br=null;break;case"mousedown":wr=!0;break;case"contextmenu":case"mouseup":case"dragend":wr=!1,xr(a,n,o);break;case"selectionchange":if(gr)break;case"keydown":case"keyup":xr(a,n,o)}var y;if(Pn)e:{switch(e){case"compositionstart":var v="onCompositionStart";break e;case"compositionend":v="onCompositionEnd";break e;case"compositionupdate":v="onCompositionUpdate";break e}v=void 0}else Vn?Bn(e,n)&&(v="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(v="onCompositionStart");v&&(Rn&&"ko"!==n.locale&&(Vn||"onCompositionStart"!==v?"onCompositionEnd"===v&&Vn&&(y=tn()):(Xt="value"in(Gt=o)?Gt.value:Gt.textContent,Vn=!0)),0<(b=Zr(r,v)).length&&(v=new xn(v,e,null,n,o),a.push({event:v,listeners:b}),y?v.data=y:null!==(y=$n(n))&&(v.data=y))),(y=Ln?function(e,t){switch(e){case"compositionend":return $n(t);case"keypress":return 32!==t.which?null:(Un=!0,Dn);case"textInput":return(e=t.data)===Dn&&Un?null:e;default:return null}}(e,n):function(e,t){if(Vn)return"compositionend"===e||!Pn&&Bn(e,t)?(e=tn(),en=Xt=Gt=null,Vn=!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 Rn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Zr(r,"onBeforeInput")).length&&(o=new xn("onBeforeInput","beforeinput",null,n,o),a.push({event:o,listeners:r}),o.data=y))}Dr(a,t)})}function qr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Zr(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=Oe(e,n))&&r.unshift(qr(e,i,o)),null!=(i=Oe(e,t))&&r.push(qr(e,i,o))),e=e.return}return r}function Qr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Kr(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(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,o?null!=(l=Oe(n,i))&&a.unshift(qr(n,l,s)):o||null!=(l=Oe(n,i))&&a.push(qr(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Jr=/\r\n?/g,Yr=/\u0000|\uFFFD/g;function Gr(e){return("string"==typeof e?e:""+e).replace(Jr,"\n").replace(Yr,"")}function Xr(e,t,r){if(t=Gr(t),Gr(e)!==t&&r)throw Error(n(425))}function eo(){}var to=null,no=null;function ro(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var oo="function"==typeof setTimeout?setTimeout:void 0,io="function"==typeof clearTimeout?clearTimeout:void 0,ao="function"==typeof Promise?Promise:void 0,so="function"==typeof queueMicrotask?queueMicrotask:void 0!==ao?function(e){return ao.resolve(null).then(e).catch(lo)}:oo;function lo(e){setTimeout(function(){throw e})}function co(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void Vt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);Vt(t)}function uo(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)break;if("/$"===t)return null}}return e}function fo(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var po=Math.random().toString(36).slice(2),ho="__reactFiber$"+po,mo="__reactProps$"+po,go="__reactContainer$"+po,bo="__reactEvents$"+po,yo="__reactListeners$"+po,vo="__reactHandles$"+po;function wo(e){var t=e[ho];if(t)return t;for(var n=e.parentNode;n;){if(t=n[go]||n[ho]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=fo(e);null!==e;){if(n=e[ho])return n;e=fo(e)}return t}n=(e=n).parentNode}return null}function xo(e){return!(e=e[ho]||e[go])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ko(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(n(33))}function So(e){return e[mo]||null}var _o=[],Co=-1;function Eo(e){return{current:e}}function zo(e){0>Co||(e.current=_o[Co],_o[Co]=null,Co--)}function Ao(e,t){Co++,_o[Co]=e.current,e.current=t}var No={},To=Eo(No),jo=Eo(!1),Io=No;function Oo(e,t){var n=e.type.contextTypes;if(!n)return No;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Mo(e){return null!=(e=e.childContextTypes)}function Po(){zo(jo),zo(To)}function Fo(e,t,r){if(To.current!==No)throw Error(n(168));Ao(To,t),Ao(jo,r)}function Lo(e,t,r){var o=e.stateNode;if(t=t.childContextTypes,"function"!=typeof o.getChildContext)return r;for(var i in o=o.getChildContext())if(!(i in t))throw Error(n(108,H(e)||"Unknown",i));return R({},r,o)}function Ro(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||No,Io=To.current,Ao(To,e),Ao(jo,jo.current),!0}function Do(e,t,r){var o=e.stateNode;if(!o)throw Error(n(169));r?(e=Lo(e,t,Io),o.__reactInternalMemoizedMergedChildContext=e,zo(jo),zo(To),Ao(To,e)):zo(jo),Ao(jo,r)}var Uo=null,Bo=!1,$o=!1;function Vo(e){null===Uo?Uo=[e]:Uo.push(e)}function Ho(){if(!$o&&null!==Uo){$o=!0;var e=0,t=wt;try{var n=Uo;for(wt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Uo=null,Bo=!1}catch(wb){throw null!==Uo&&(Uo=Uo.slice(e+1)),Qe(et,Ho),wb}finally{wt=t,$o=!1}}return null}var Wo=[],qo=0,Zo=null,Qo=0,Ko=[],Jo=0,Yo=null,Go=1,Xo="";function ei(e,t){Wo[qo++]=Qo,Wo[qo++]=Zo,Zo=e,Qo=t}function ti(e,t,n){Ko[Jo++]=Go,Ko[Jo++]=Xo,Ko[Jo++]=Yo,Yo=e;var r=Go;e=Xo;var o=32-st(r)-1;r&=~(1<<o),n+=1;var i=32-st(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,Go=1<<32-st(t)+o|n<<o|r,Xo=i+e}else Go=1<<i|n<<o|r,Xo=e}function ni(e){null!==e.return&&(ei(e,1),ti(e,1,0))}function ri(e){for(;e===Zo;)Zo=Wo[--qo],Wo[qo]=null,Qo=Wo[--qo],Wo[qo]=null;for(;e===Yo;)Yo=Ko[--Jo],Ko[Jo]=null,Xo=Ko[--Jo],Ko[Jo]=null,Go=Ko[--Jo],Ko[Jo]=null}var oi=null,ii=null,ai=!1,si=null;function li(e,t){var n=Ic(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function ci(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,oi=e,ii=uo(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,oi=e,ii=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Yo?{id:Go,overflow:Xo}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Ic(18,null,null,0)).stateNode=t,n.return=e,e.child=n,oi=e,ii=null,!0);default:return!1}}function ui(e){return!(!(1&e.mode)||128&e.flags)}function di(e){if(ai){var t=ii;if(t){var r=t;if(!ci(e,t)){if(ui(e))throw Error(n(418));t=uo(r.nextSibling);var o=oi;t&&ci(e,t)?li(o,r):(e.flags=-4097&e.flags|2,ai=!1,oi=e)}}else{if(ui(e))throw Error(n(418));e.flags=-4097&e.flags|2,ai=!1,oi=e}}}function fi(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;oi=e}function pi(e){if(e!==oi)return!1;if(!ai)return fi(e),ai=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ro(e.type,e.memoizedProps)),t&&(t=ii)){if(ui(e))throw hi(),Error(n(418));for(;t;)li(e,t),t=uo(t.nextSibling)}if(fi(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(n(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var r=e.data;if("/$"===r){if(0===t){ii=uo(e.nextSibling);break e}t--}else"$"!==r&&"$!"!==r&&"$?"!==r||t++}e=e.nextSibling}ii=null}}else ii=oi?uo(e.stateNode.nextSibling):null;return!0}function hi(){for(var e=ii;e;)e=uo(e.nextSibling)}function mi(){ii=oi=null,ai=!1}function gi(e){null===si?si=[e]:si.push(e)}var bi=x.ReactCurrentBatchConfig;function yi(e,t,r){if(null!==(e=r.ref)&&"function"!=typeof e&&"object"!=typeof e){if(r._owner){if(r=r._owner){if(1!==r.tag)throw Error(n(309));var o=r.stateNode}if(!o)throw Error(n(147,e));var i=o,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:((t=function(e){var t=i.refs;null===e?delete t[a]:t[a]=e})._stringRef=a,t)}if("string"!=typeof e)throw Error(n(284));if(!r._owner)throw Error(n(290,e))}return e}function vi(e,t){throw e=Object.prototype.toString.call(t),Error(n(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function wi(e){return(0,e._init)(e._payload)}function xi(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function r(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function o(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Mc(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|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Rc(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===_?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===O&&wi(o)===t.type)?((r=i(t,n.props)).ref=yi(e,t,n),r.return=e,r):((r=Pc(n.type,n.key,n.props,null,e.mode,r)).ref=yi(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Dc(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=Fc(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)return(t=Rc(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case k:return(n=Pc(t.type,t.key,t.props,null,e.mode,n)).ref=yi(e,null,t),n.return=e,n;case S:return(t=Dc(t,e.mode,n)).return=e,t;case O:return f(e,(0,t._init)(t._payload),n)}if(ne(t)||F(t))return(t=Fc(t,e.mode,n,null)).return=e,t;vi(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)return null!==o?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case k:return n.key===o?c(e,t,n,r):null;case S:return n.key===o?u(e,t,n,r):null;case O:return p(e,t,(o=n._init)(n._payload),r)}if(ne(n)||F(n))return null!==o?null:d(e,t,n,r,null);vi(e,n)}return null}function h(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case k:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o);case S:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o);case O:return h(e,t,n,(0,r._init)(r._payload),o)}if(ne(r)||F(r))return d(t,e=e.get(n)||null,r,o,null);vi(t,r)}return null}return function l(c,u,d,m){if("object"==typeof d&&null!==d&&d.type===_&&null===d.key&&(d=d.props.children),"object"==typeof d&&null!==d){switch(d.$$typeof){case k:e:{for(var g=d.key,b=u;null!==b;){if(b.key===g){if((g=d.type)===_){if(7===b.tag){r(c,b.sibling),(u=i(b,d.props.children)).return=c,c=u;break e}}else if(b.elementType===g||"object"==typeof g&&null!==g&&g.$$typeof===O&&wi(g)===b.type){r(c,b.sibling),(u=i(b,d.props)).ref=yi(c,b,d),u.return=c,c=u;break e}r(c,b);break}t(c,b),b=b.sibling}d.type===_?((u=Fc(d.props.children,c.mode,m,d.key)).return=c,c=u):((m=Pc(d.type,d.key,d.props,null,c.mode,m)).ref=yi(c,u,d),m.return=c,c=m)}return s(c);case S:e:{for(b=d.key;null!==u;){if(u.key===b){if(4===u.tag&&u.stateNode.containerInfo===d.containerInfo&&u.stateNode.implementation===d.implementation){r(c,u.sibling),(u=i(u,d.children||[])).return=c,c=u;break e}r(c,u);break}t(c,u),u=u.sibling}(u=Dc(d,c.mode,m)).return=c,c=u}return s(c);case O:return l(c,u,(b=d._init)(d._payload),m)}if(ne(d))return function(n,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 b=p(n,d,s[m],l);if(null===b){null===d&&(d=g);break}e&&d&&null===b.alternate&&t(n,d),i=a(b,i,m),null===u?c=b:u.sibling=b,u=b,d=g}if(m===s.length)return r(n,d),ai&&ei(n,m),c;if(null===d){for(;m<s.length;m++)null!==(d=f(n,s[m],l))&&(i=a(d,i,m),null===u?c=d:u.sibling=d,u=d);return ai&&ei(n,m),c}for(d=o(n,d);m<s.length;m++)null!==(g=h(d,n,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(n,e)}),ai&&ei(n,m),c}(c,u,d,m);if(F(d))return function(i,s,l,c){var u=F(l);if("function"!=typeof u)throw Error(n(150));if(null==(l=u.call(l)))throw Error(n(151));for(var d=u=null,m=s,g=s=0,b=null,y=l.next();null!==m&&!y.done;g++,y=l.next()){m.index>g?(b=m,m=null):b=m.sibling;var v=p(i,m,y.value,c);if(null===v){null===m&&(m=b);break}e&&m&&null===v.alternate&&t(i,m),s=a(v,s,g),null===d?u=v:d.sibling=v,d=v,m=b}if(y.done)return r(i,m),ai&&ei(i,g),u;if(null===m){for(;!y.done;g++,y=l.next())null!==(y=f(i,y.value,c))&&(s=a(y,s,g),null===d?u=y:d.sibling=y,d=y);return ai&&ei(i,g),u}for(m=o(i,m);!y.done;g++,y=l.next())null!==(y=h(m,i,g,y.value,c))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),s=a(y,s,g),null===d?u=y:d.sibling=y,d=y);return e&&m.forEach(function(e){return t(i,e)}),ai&&ei(i,g),u}(c,u,d,m);vi(c,d)}return"string"==typeof d&&""!==d||"number"==typeof d?(d=""+d,null!==u&&6===u.tag?(r(c,u.sibling),(u=i(u,d)).return=c,c=u):(r(c,u),(u=Rc(d,c.mode,m)).return=c,c=u),s(c)):r(c,u)}}var ki=xi(!0),Si=xi(!1),_i=Eo(null),Ci=null,Ei=null,zi=null;function Ai(){zi=Ei=Ci=null}function Ni(e){var t=_i.current;zo(_i),e._currentValue=t}function Ti(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 ji(e,t){Ci=e,zi=Ei=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(ws=!0),e.firstContext=null)}function Ii(e){var t=e._currentValue;if(zi!==e)if(e={context:e,memoizedValue:t,next:null},null===Ei){if(null===Ci)throw Error(n(308));Ei=e,Ci.dependencies={lanes:0,firstContext:e}}else Ei=Ei.next=e;return t}var Oi=null;function Mi(e){null===Oi?Oi=[e]:Oi.push(e)}function Pi(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,Mi(t)):(n.next=o.next,o.next=n),t.interleaved=n,Fi(e,r)}function Fi(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Li=!1;function Ri(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Di(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ui(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Bi(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&Nl){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Fi(e,n)}return null===(o=r.interleaved)?(t.next=t,Mi(r)):(t.next=o.next,o.next=t),r.interleaved=t,Fi(e,n)}function $i(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,vt(e,n)}}function Vi(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={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,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,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Hi(e,t,n,r){var o=e.updateQueue;Li=!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 f=s.lane,p=s.eventTime;if((r&f)===f){null!==u&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,m=s;switch(f=t,p=n,m.tag){case 1:if("function"==typeof(h=m.payload)){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(f="function"==typeof(h=m.payload)?h.call(p,d,f):h))break e;d=R({},d,f);break e;case 2:Li=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(f=o.effects)?o.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=p,l=d):u=u.next=p,a|=f;if(null===(s=s.next)){if(null===(s=o.shared.pending))break;s=(f=s).next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}if(null===u&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,null!==(t=o.shared.interleaved)){o=t;do{a|=o.lane,o=o.next}while(o!==t)}else null===i&&(o.shared.lanes=0);Ll|=a,e.lanes=a,e.memoizedState=d}}function Wi(e,t,r){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var o=e[t],i=o.callback;if(null!==i){if(o.callback=null,o=r,"function"!=typeof i)throw Error(n(191,i));i.call(o)}}}var qi={},Zi=Eo(qi),Qi=Eo(qi),Ki=Eo(qi);function Ji(e){if(e===qi)throw Error(n(174));return e}function Yi(e,t){switch(Ao(Ki,t),Ao(Qi,e),Ao(Zi,qi),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ce(null,"");break;default:t=ce(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}zo(Zi),Ao(Zi,t)}function Gi(){zo(Zi),zo(Qi),zo(Ki)}function Xi(e){Ji(Ki.current);var t=Ji(Zi.current),n=ce(t,e.type);t!==n&&(Ao(Qi,e),Ao(Zi,n))}function ea(e){Qi.current===e&&(zo(Zi),zo(Qi))}var ta=Eo(0);function na(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}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 ra=[];function oa(){for(var e=0;e<ra.length;e++)ra[e]._workInProgressVersionPrimary=null;ra.length=0}var ia=x.ReactCurrentDispatcher,aa=x.ReactCurrentBatchConfig,sa=0,la=null,ca=null,ua=null,da=!1,fa=!1,pa=0,ha=0;function ma(){throw Error(n(321))}function ga(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!lr(e[n],t[n]))return!1;return!0}function ba(e,t,r,o,i,a){if(sa=a,la=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ia.current=null===e||null===e.memoizedState?es:ts,e=r(o,i),fa){a=0;do{if(fa=!1,pa=0,25<=a)throw Error(n(301));a+=1,ua=ca=null,t.updateQueue=null,ia.current=ns,e=r(o,i)}while(fa)}if(ia.current=Xa,t=null!==ca&&null!==ca.next,sa=0,ua=ca=la=null,da=!1,t)throw Error(n(300));return e}function ya(){var e=0!==pa;return pa=0,e}function va(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ua?la.memoizedState=ua=e:ua=ua.next=e,ua}function wa(){if(null===ca){var e=la.alternate;e=null!==e?e.memoizedState:null}else e=ca.next;var t=null===ua?la.memoizedState:ua.next;if(null!==t)ua=t,ca=e;else{if(null===e)throw Error(n(310));e={memoizedState:(ca=e).memoizedState,baseState:ca.baseState,baseQueue:ca.baseQueue,queue:ca.queue,next:null},null===ua?la.memoizedState=ua=e:ua=ua.next=e}return ua}function xa(e,t){return"function"==typeof t?t(e):t}function ka(e){var t=wa(),r=t.queue;if(null===r)throw Error(n(311));r.lastRenderedReducer=e;var o=ca,i=o.baseQueue,a=r.pending;if(null!==a){if(null!==i){var s=i.next;i.next=a.next,a.next=s}o.baseQueue=i=a,r.pending=null}if(null!==i){a=i.next,o=o.baseState;var l=s=null,c=null,u=a;do{var d=u.lane;if((sa&d)===d)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),o=u.hasEagerState?u.eagerState:e(o,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=f,s=o):c=c.next=f,la.lanes|=d,Ll|=d}u=u.next}while(null!==u&&u!==a);null===c?s=o:c.next=l,lr(o,t.memoizedState)||(ws=!0),t.memoizedState=o,t.baseState=s,t.baseQueue=c,r.lastRenderedState=o}if(null!==(e=r.interleaved)){i=e;do{a=i.lane,la.lanes|=a,Ll|=a,i=i.next}while(i!==e)}else null===i&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Sa(e){var t=wa(),r=t.queue;if(null===r)throw Error(n(311));r.lastRenderedReducer=e;var o=r.dispatch,i=r.pending,a=t.memoizedState;if(null!==i){r.pending=null;var s=i=i.next;do{a=e(a,s.action),s=s.next}while(s!==i);lr(a,t.memoizedState)||(ws=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),r.lastRenderedState=a}return[a,o]}function _a(){}function Ca(e,t){var r=la,o=wa(),i=t(),a=!lr(o.memoizedState,i);if(a&&(o.memoizedState=i,ws=!0),o=o.queue,La(Aa.bind(null,r,o,e),[e]),o.getSnapshot!==t||a||null!==ua&&1&ua.memoizedState.tag){if(r.flags|=2048,Ia(9,za.bind(null,r,o,i,t),void 0,null),null===Tl)throw Error(n(349));30&sa||Ea(r,t,i)}return i}function Ea(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=la.updateQueue)?(t={lastEffect:null,stores:null},la.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function za(e,t,n,r){t.value=n,t.getSnapshot=r,Na(t)&&Ta(e)}function Aa(e,t,n){return n(function(){Na(t)&&Ta(e)})}function Na(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!lr(e,n)}catch(r){return!0}}function Ta(e){var t=Fi(e,1);null!==t&&rc(t,e,1,-1)}function ja(e){var t=va();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:e},t.queue=e,e=e.dispatch=Ka.bind(null,la,e),[t.memoizedState,e]}function Ia(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=la.updateQueue)?(t={lastEffect:null,stores:null},la.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Oa(){return wa().memoizedState}function Ma(e,t,n,r){var o=va();la.flags|=e,o.memoizedState=Ia(1|t,n,void 0,void 0===r?null:r)}function Pa(e,t,n,r){var o=wa();r=void 0===r?null:r;var i=void 0;if(null!==ca){var a=ca.memoizedState;if(i=a.destroy,null!==r&&ga(r,a.deps))return void(o.memoizedState=Ia(t,n,i,r))}la.flags|=e,o.memoizedState=Ia(1|t,n,i,r)}function Fa(e,t){return Ma(8390656,8,e,t)}function La(e,t){return Pa(2048,8,e,t)}function Ra(e,t){return Pa(4,2,e,t)}function Da(e,t){return Pa(4,4,e,t)}function Ua(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ba(e,t,n){return n=null!=n?n.concat([e]):null,Pa(4,4,Ua.bind(null,t,e),n)}function $a(){}function Va(e,t){var n=wa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ga(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ha(e,t){var n=wa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ga(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Wa(e,t,n){return 21&sa?(lr(n,t)||(n=gt(),la.lanes|=n,Ll|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ws=!0),e.memoizedState=n)}function qa(e,t){var n=wt;wt=0!==n&&4>n?n:4,e(!0);var r=aa.transition;aa.transition={};try{e(!1),t()}finally{wt=n,aa.transition=r}}function Za(){return wa().memoizedState}function Qa(e,t,n){var r=nc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ja(e))Ya(t,n);else if(null!==(n=Pi(e,t,n,r))){rc(n,e,r,tc()),Ga(n,t,r)}}function Ka(e,t,n){var r=nc(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ja(e))Ya(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,lr(s,a)){var l=t.interleaved;return null===l?(o.next=o,Mi(t)):(o.next=l.next,l.next=o),void(t.interleaved=o)}}catch(c){}null!==(n=Pi(e,t,o,r))&&(rc(n,e,r,o=tc()),Ga(n,t,r))}}function Ja(e){var t=e.alternate;return e===la||null!==t&&t===la}function Ya(e,t){fa=da=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ga(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,vt(e,n)}}var Xa={readContext:Ii,useCallback:ma,useContext:ma,useEffect:ma,useImperativeHandle:ma,useInsertionEffect:ma,useLayoutEffect:ma,useMemo:ma,useReducer:ma,useRef:ma,useState:ma,useDebugValue:ma,useDeferredValue:ma,useTransition:ma,useMutableSource:ma,useSyncExternalStore:ma,useId:ma,unstable_isNewReconciler:!1},es={readContext:Ii,useCallback:function(e,t){return va().memoizedState=[e,void 0===t?null:t],e},useContext:Ii,useEffect:Fa,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Ma(4194308,4,Ua.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ma(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ma(4,2,e,t)},useMemo:function(e,t){var n=va();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=va();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Qa.bind(null,la,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},va().memoizedState=e},useState:ja,useDebugValue:$a,useDeferredValue:function(e){return va().memoizedState=e},useTransition:function(){var e=ja(!1),t=e[0];return e=qa.bind(null,e[1]),va().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var o=la,i=va();if(ai){if(void 0===r)throw Error(n(407));r=r()}else{if(r=t(),null===Tl)throw Error(n(349));30&sa||Ea(o,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,Fa(Aa.bind(null,o,a,e),[e]),o.flags|=2048,Ia(9,za.bind(null,o,a,r,t),void 0,null),r},useId:function(){var e=va(),t=Tl.identifierPrefix;if(ai){var n=Xo;t=":"+t+"R"+(n=(Go&~(1<<32-st(Go)-1)).toString(32)+n),0<(n=pa++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=ha++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ts={readContext:Ii,useCallback:Va,useContext:Ii,useEffect:La,useImperativeHandle:Ba,useInsertionEffect:Ra,useLayoutEffect:Da,useMemo:Ha,useReducer:ka,useRef:Oa,useState:function(){return ka(xa)},useDebugValue:$a,useDeferredValue:function(e){return Wa(wa(),ca.memoizedState,e)},useTransition:function(){return[ka(xa)[0],wa().memoizedState]},useMutableSource:_a,useSyncExternalStore:Ca,useId:Za,unstable_isNewReconciler:!1},ns={readContext:Ii,useCallback:Va,useContext:Ii,useEffect:La,useImperativeHandle:Ba,useInsertionEffect:Ra,useLayoutEffect:Da,useMemo:Ha,useReducer:Sa,useRef:Oa,useState:function(){return Sa(xa)},useDebugValue:$a,useDeferredValue:function(e){var t=wa();return null===ca?t.memoizedState=e:Wa(t,ca.memoizedState,e)},useTransition:function(){return[Sa(xa)[0],wa().memoizedState]},useMutableSource:_a,useSyncExternalStore:Ca,useId:Za,unstable_isNewReconciler:!1};function rs(e,t){if(e&&e.defaultProps){for(var n in t=R({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function os(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:R({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var is={isMounted:function(e){return!!(e=e._reactInternals)&&Ve(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=tc(),o=nc(e),i=Ui(r,o);i.payload=t,null!=n&&(i.callback=n),null!==(t=Bi(e,i,o))&&(rc(t,e,o,r),$i(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=tc(),o=nc(e),i=Ui(r,o);i.tag=1,i.payload=t,null!=n&&(i.callback=n),null!==(t=Bi(e,i,o))&&(rc(t,e,o,r),$i(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tc(),r=nc(e),o=Ui(n,r);o.tag=2,null!=t&&(o.callback=t),null!==(t=Bi(e,o,r))&&(rc(t,e,r,n),$i(t,e,r))}};function as(e,t,n,r,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!cr(n,r)||!cr(o,i))}function ss(e,t,n){var r=!1,o=No,i=t.contextType;return"object"==typeof i&&null!==i?i=Ii(i):(o=Mo(t)?Io:To.current,i=(r=null!=(r=t.contextTypes))?Oo(e,o):No),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=is,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function ls(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&&is.enqueueReplaceState(t,t.state,null)}function cs(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Ri(e);var i=t.contextType;"object"==typeof i&&null!==i?o.context=Ii(i):(i=Mo(t)?Io:To.current,o.context=Oo(e,i)),o.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(os(e,t,i,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&is.enqueueReplaceState(o,o.state,null),Hi(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4194308)}function us(e,t){try{var n="",r=t;do{n+=$(r),r=r.return}while(r);var o=n}catch(i){o="\nError generating stack: "+i.message+"\n"+i.stack}return{value:e,source:t,stack:o,digest:null}}function ds(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function fs(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var ps="function"==typeof WeakMap?WeakMap:Map;function hs(e,t,n){(n=Ui(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Wl||(Wl=!0,ql=r),fs(0,t)},n}function ms(e,t,n){(n=Ui(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){fs(0,t)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){fs(0,t),"function"!=typeof r&&(null===Zl?Zl=new Set([this]):Zl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function gs(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ps;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)||(o.add(n),e=Ec.bind(null,e,t,n),t.then(e,e))}function bs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ys(e,t,n,r,o){return 1&e.mode?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Ui(-1,1)).tag=2,Bi(n,t,1))),n.lanes|=1),e)}var vs=x.ReactCurrentOwner,ws=!1;function xs(e,t,n,r){t.child=null===e?Si(t,null,n,r):ki(t,e.child,n,r)}function ks(e,t,n,r,o){n=n.render;var i=t.ref;return ji(t,o),r=ba(e,t,n,r,i,o),n=ya(),null===e||ws?(ai&&n&&ni(t),t.flags|=1,xs(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ws(e,t,o))}function Ss(e,t,n,r,o){if(null===e){var i=n.type;return"function"!=typeof i||Oc(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Pc(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,_s(e,t,i,r,o))}if(i=e.child,0===(e.lanes&o)){var a=i.memoizedProps;if((n=null!==(n=n.compare)?n:cr)(a,r)&&e.ref===t.ref)return Ws(e,t,o)}return t.flags|=1,(e=Mc(i,r)).ref=t.ref,e.return=t,t.child=e}function _s(e,t,n,r,o){if(null!==e){var i=e.memoizedProps;if(cr(i,r)&&e.ref===t.ref){if(ws=!1,t.pendingProps=r=i,0===(e.lanes&o))return t.lanes=e.lanes,Ws(e,t,o);131072&e.flags&&(ws=!0)}}return zs(e,t,n,r,o)}function Cs(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ao(Ml,Ol),Ol|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==i?i.baseLanes:n,Ao(Ml,Ol),Ol|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ao(Ml,Ol),Ol|=n;else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,Ao(Ml,Ol),Ol|=r;return xs(e,t,o,n),t.child}function Es(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function zs(e,t,n,r,o){var i=Mo(n)?Io:To.current;return i=Oo(t,i),ji(t,o),n=ba(e,t,n,r,i,o),r=ya(),null===e||ws?(ai&&r&&ni(t),t.flags|=1,xs(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ws(e,t,o))}function As(e,t,n,r,o){if(Mo(n)){var i=!0;Ro(t)}else i=!1;if(ji(t,o),null===t.stateNode)Hs(e,t),ss(t,n,r),cs(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"==typeof c&&null!==c?c=Ii(c):c=Oo(t,c=Mo(n)?Io:To.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==c)&&ls(t,a,r,c),Li=!1;var f=t.memoizedState;a.state=f,Hi(t,r,a,o),l=t.memoizedState,s!==r||f!==l||jo.current||Li?("function"==typeof u&&(os(t,n,u,r),l=t.memoizedState),(s=Li||as(t,n,s,r,f,l,c))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Di(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:rs(t.type,s),a.props=c,d=t.pendingProps,f=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=Ii(l):l=Oo(t,l=Mo(n)?Io:To.current);var p=n.getDerivedStateFromProps;(u="function"==typeof p||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||f!==l)&&ls(t,a,r,l),Li=!1,f=t.memoizedState,a.state=f,Hi(t,r,a,o);var h=t.memoizedState;s!==d||f!==h||jo.current||Li?("function"==typeof p&&(os(t,n,p,r),h=t.memoizedState),(c=Li||as(t,n,c,r,f,h,l)||!1)?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=l,r=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Ns(e,t,n,r,i,o)}function Ns(e,t,n,r,o,i){Es(e,t);var a=!!(128&t.flags);if(!r&&!a)return o&&Do(t,n,!1),Ws(e,t,i);r=t.stateNode,vs.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=ki(t,e.child,null,i),t.child=ki(t,null,s,i)):xs(e,t,s,i),t.memoizedState=r.state,o&&Do(t,n,!0),t.child}function Ts(e){var t=e.stateNode;t.pendingContext?Fo(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Fo(0,t.context,!1),Yi(e,t.containerInfo)}function js(e,t,n,r,o){return mi(),gi(o),t.flags|=256,xs(e,t,n,r),t.child}var Is,Os,Ms,Ps,Fs={dehydrated:null,treeContext:null,retryLane:0};function Ls(e){return{baseLanes:e,cachePool:null,transitions:null}}function Rs(e,t,r){var o,i=t.pendingProps,a=ta.current,s=!1,l=!!(128&t.flags);if((o=l)||(o=(null===e||null!==e.memoizedState)&&!!(2&a)),o?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Ao(ta,1&a),null===e)return di(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=i.children,e=i.fallback,s?(i=t.mode,s=t.child,l={mode:"hidden",children:l},1&i||null===s?s=Lc(l,i,0,null):(s.childLanes=0,s.pendingProps=l),e=Fc(e,i,r,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Ls(r),t.memoizedState=Fs,e):Ds(t,l));if(null!==(a=e.memoizedState)&&null!==(o=a.dehydrated))return function(e,t,r,o,i,a,s){if(r)return 256&t.flags?(t.flags&=-257,Us(e,t,s,o=ds(Error(n(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=o.fallback,i=t.mode,o=Lc({mode:"visible",children:o.children},i,0,null),(a=Fc(a,i,s,null)).flags|=2,o.return=t,a.return=t,o.sibling=a,t.child=o,1&t.mode&&ki(t,e.child,null,s),t.child.memoizedState=Ls(s),t.memoizedState=Fs,a);if(!(1&t.mode))return Us(e,t,s,null);if("$!"===i.data){if(o=i.nextSibling&&i.nextSibling.dataset)var l=o.dgst;return o=l,Us(e,t,s,o=ds(a=Error(n(419)),o,void 0))}if(l=0!==(s&e.childLanes),ws||l){if(null!==(o=Tl)){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!==(i&(o.suspendedLanes|s))?0:i)&&i!==a.retryLane&&(a.retryLane=i,Fi(e,i),rc(o,e,i,-1))}return gc(),Us(e,t,s,o=ds(Error(n(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Ac.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,ii=uo(i.nextSibling),oi=t,ai=!0,si=null,null!==e&&(Ko[Jo++]=Go,Ko[Jo++]=Xo,Ko[Jo++]=Yo,Go=e.id,Xo=e.overflow,Yo=t),t=Ds(t,o.children),t.flags|=4096,t)}(e,t,l,i,o,a,r);if(s){s=i.fallback,l=t.mode,o=(a=e.child).sibling;var c={mode:"hidden",children:i.children};return 1&l||t.child===a?(i=Mc(a,c)).subtreeFlags=14680064&a.subtreeFlags:((i=t.child).childLanes=0,i.pendingProps=c,t.deletions=null),null!==o?s=Mc(o,s):(s=Fc(s,l,r,null)).flags|=2,s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,l=null===(l=e.child.memoizedState)?Ls(r):{baseLanes:l.baseLanes|r,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~r,t.memoizedState=Fs,i}return e=(s=e.child).sibling,i=Mc(s,{mode:"visible",children:i.children}),!(1&t.mode)&&(i.lanes=r),i.return=t,i.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=i,t.memoizedState=null,i}function Ds(e,t){return(t=Lc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Us(e,t,n,r){return null!==r&&gi(r),ki(t,e.child,null,n),(e=Ds(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Bs(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ti(e.return,t,n)}function $s(e,t,n,r,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Vs(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(xs(e,t,r.children,n),2&(r=ta.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Bs(e,n,t);else if(19===e.tag)Bs(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}r&=1}if(Ao(ta,r),1&t.mode)switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===na(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),$s(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===na(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}$s(t,!0,n,null,i);break;case"together":$s(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Hs(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ws(e,t,r){if(null!==e&&(t.dependencies=e.dependencies),Ll|=t.lanes,0===(r&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(n(153));if(null!==t.child){for(r=Mc(e=t.child,e.pendingProps),t.child=r,r.return=t;null!==e.sibling;)e=e.sibling,(r=r.sibling=Mc(e,e.pendingProps)).return=t;r.sibling=null}return t.child}function qs(e,t){if(!ai)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 Zs(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|=14680064&o.subtreeFlags,r|=14680064&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 Qs(e,t,r){var i=t.pendingProps;switch(ri(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zs(t),null;case 1:case 17:return Mo(t.type)&&Po(),Zs(t),null;case 3:return i=t.stateNode,Gi(),zo(jo),zo(To),oa(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),null!==e&&null!==e.child||(pi(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==si&&(sc(si),si=null))),Os(e,t),Zs(t),null;case 5:ea(t);var a=Ji(Ki.current);if(r=t.type,null!==e&&null!=t.stateNode)Ms(e,t,r,i,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(null===t.stateNode)throw Error(n(166));return Zs(t),null}if(e=Ji(Zi.current),pi(t)){i=t.stateNode,r=t.type;var s=t.memoizedProps;switch(i[ho]=t,i[mo]=s,e=!!(1&t.mode),r){case"dialog":Ur("cancel",i),Ur("close",i);break;case"iframe":case"object":case"embed":Ur("load",i);break;case"video":case"audio":for(a=0;a<Fr.length;a++)Ur(Fr[a],i);break;case"source":Ur("error",i);break;case"img":case"image":case"link":Ur("error",i),Ur("load",i);break;case"details":Ur("toggle",i);break;case"input":Y(i,s),Ur("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!s.multiple},Ur("invalid",i);break;case"textarea":ie(i,s),Ur("invalid",i)}for(var l in ve(r,s),a=null,s)if(s.hasOwnProperty(l)){var c=s[l];"children"===l?"string"==typeof c?i.textContent!==c&&(!0!==s.suppressHydrationWarning&&Xr(i.textContent,c,e),a=["children",c]):"number"==typeof c&&i.textContent!==""+c&&(!0!==s.suppressHydrationWarning&&Xr(i.textContent,c,e),a=["children",""+c]):o.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&Ur("scroll",i)}switch(r){case"input":Z(i),ee(i,s,!0);break;case"textarea":Z(i),se(i);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(i.onclick=eo)}i=a,t.updateQueue=i,null!==i&&(t.flags|=4)}else{l=9===a.nodeType?a:a.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=le(r)),"http://www.w3.org/1999/xhtml"===e?"script"===r?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof i.is?e=l.createElement(r,{is:i.is}):(e=l.createElement(r),"select"===r&&(l=e,i.multiple?l.multiple=!0:i.size&&(l.size=i.size))):e=l.createElementNS(e,r),e[ho]=t,e[mo]=i,Is(e,t,!1,!1),t.stateNode=e;e:{switch(l=we(r,i),r){case"dialog":Ur("cancel",e),Ur("close",e),a=i;break;case"iframe":case"object":case"embed":Ur("load",e),a=i;break;case"video":case"audio":for(a=0;a<Fr.length;a++)Ur(Fr[a],e);a=i;break;case"source":Ur("error",e),a=i;break;case"img":case"image":case"link":Ur("error",e),Ur("load",e),a=i;break;case"details":Ur("toggle",e),a=i;break;case"input":Y(e,i),a=J(e,i),Ur("invalid",e);break;case"option":default:a=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},a=R({},i,{value:void 0}),Ur("invalid",e);break;case"textarea":ie(e,i),a=oe(e,i),Ur("invalid",e)}for(s in ve(r,a),c=a)if(c.hasOwnProperty(s)){var u=c[s];"style"===s?be(e,u):"dangerouslySetInnerHTML"===s?null!=(u=u?u.__html:void 0)&&fe(e,u):"children"===s?"string"==typeof u?("textarea"!==r||""!==u)&&pe(e,u):"number"==typeof u&&pe(e,""+u):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(o.hasOwnProperty(s)?null!=u&&"onScroll"===s&&Ur("scroll",e):null!=u&&w(e,s,u,l))}switch(r){case"input":Z(e),ee(e,i,!1);break;case"textarea":Z(e),se(e);break;case"option":null!=i.value&&e.setAttribute("value",""+W(i.value));break;case"select":e.multiple=!!i.multiple,null!=(s=i.value)?re(e,!!i.multiple,s,!1):null!=i.defaultValue&&re(e,!!i.multiple,i.defaultValue,!0);break;default:"function"==typeof a.onClick&&(e.onclick=eo)}switch(r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Zs(t),null;case 6:if(e&&null!=t.stateNode)Ps(e,t,e.memoizedProps,i);else{if("string"!=typeof i&&null===t.stateNode)throw Error(n(166));if(r=Ji(Ki.current),Ji(Zi.current),pi(t)){if(i=t.stateNode,r=t.memoizedProps,i[ho]=t,(s=i.nodeValue!==r)&&null!==(e=oi))switch(e.tag){case 3:Xr(i.nodeValue,r,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Xr(i.nodeValue,r,!!(1&e.mode))}s&&(t.flags|=4)}else(i=(9===r.nodeType?r:r.ownerDocument).createTextNode(i))[ho]=t,t.stateNode=i}return Zs(t),null;case 13:if(zo(ta),i=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ai&&null!==ii&&1&t.mode&&!(128&t.flags))hi(),mi(),t.flags|=98560,s=!1;else if(s=pi(t),null!==i&&null!==i.dehydrated){if(null===e){if(!s)throw Error(n(318));if(!(s=null!==(s=t.memoizedState)?s.dehydrated:null))throw Error(n(317));s[ho]=t}else mi(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Zs(t),s=!1}else null!==si&&(sc(si),si=null),s=!0;if(!s)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=r,t):((i=null!==i)!==(null!==e&&null!==e.memoizedState)&&i&&(t.child.flags|=8192,1&t.mode&&(null===e||1&ta.current?0===Pl&&(Pl=3):gc())),null!==t.updateQueue&&(t.flags|=4),Zs(t),null);case 4:return Gi(),Os(e,t),null===e&&Vr(t.stateNode.containerInfo),Zs(t),null;case 10:return Ni(t.type._context),Zs(t),null;case 19:if(zo(ta),null===(s=t.memoizedState))return Zs(t),null;if(i=!!(128&t.flags),null===(l=s.rendering))if(i)qs(s,!1);else{if(0!==Pl||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(l=na(e))){for(t.flags|=128,qs(s,!1),null!==(i=l.updateQueue)&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=r,r=t.child;null!==r;)e=i,(s=r).flags&=14680066,null===(l=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,e=l.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Ao(ta,1&ta.current|2),t.child}e=e.sibling}null!==s.tail&&Ge()>Vl&&(t.flags|=128,i=!0,qs(s,!1),t.lanes=4194304)}else{if(!i)if(null!==(e=na(l))){if(t.flags|=128,i=!0,null!==(r=e.updateQueue)&&(t.updateQueue=r,t.flags|=4),qs(s,!0),null===s.tail&&"hidden"===s.tailMode&&!l.alternate&&!ai)return Zs(t),null}else 2*Ge()-s.renderingStartTime>Vl&&1073741824!==r&&(t.flags|=128,i=!0,qs(s,!1),t.lanes=4194304);s.isBackwards?(l.sibling=t.child,t.child=l):(null!==(r=s.last)?r.sibling=l:t.child=l,s.last=l)}return null!==s.tail?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ge(),t.sibling=null,r=ta.current,Ao(ta,i?1&r|2:1&r),t):(Zs(t),null);case 22:case 23:return fc(),i=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==i&&(t.flags|=8192),i&&1&t.mode?!!(1073741824&Ol)&&(Zs(t),6&t.subtreeFlags&&(t.flags|=8192)):Zs(t),null;case 24:case 25:return null}throw Error(n(156,t.tag))}function Ks(e,t){switch(ri(t),t.tag){case 1:return Mo(t.type)&&Po(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Gi(),zo(jo),zo(To),oa(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return ea(t),null;case 13:if(zo(ta),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(n(340));mi()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return zo(ta),null;case 4:return Gi(),null;case 10:return Ni(t.type._context),null;case 22:case 23:return fc(),null;default:return null}}Is=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Os=function(){},Ms=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ji(Zi.current);var a,s=null;switch(n){case"input":i=J(e,i),r=J(e,r),s=[];break;case"select":i=R({},i,{value:void 0}),r=R({},r,{value:void 0}),s=[];break;case"textarea":i=oe(e,i),r=oe(e,r),s=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=eo)}for(u in ve(n,r),n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&null!=i[u])if("style"===u){var l=i[u];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(o.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var c=r[u];if(l=null!=i?i[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(a in l)!l.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&l[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(s||(s=[]),s.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(s=s||[]).push(u,c)):"children"===u?"string"!=typeof c&&"number"!=typeof c||(s=s||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(o.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&Ur("scroll",e),s||l===c||(s=[])):(s=s||[]).push(u,c))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}},Ps=function(e,t,n,r){n!==r&&(t.flags|=4)};var Js=!1,Ys=!1,Gs="function"==typeof WeakSet?WeakSet:Set,Xs=null;function el(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(r){Cc(e,t,r)}else n.current=null}function tl(e,t,n){try{n()}catch(r){Cc(e,t,r)}}var nl=!1;function rl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,void 0!==i&&tl(t,n,i)}o=o.next}while(o!==r)}}function ol(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function il(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function al(e){var t=e.alternate;null!==t&&(e.alternate=null,al(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[ho],delete t[mo],delete t[bo],delete t[yo],delete t[vo])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function sl(e){return 5===e.tag||3===e.tag||4===e.tag}function ll(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||sl(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(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 cl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=eo));else if(4!==r&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}function ul(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&&null!==(e=e.child))for(ul(e,t,n),e=e.sibling;null!==e;)ul(e,t,n),e=e.sibling}var dl=null,fl=!1;function pl(e,t,n){for(n=n.child;null!==n;)hl(e,t,n),n=n.sibling}function hl(e,t,n){if(at&&"function"==typeof at.onCommitFiberUnmount)try{at.onCommitFiberUnmount(it,n)}catch(s){}switch(n.tag){case 5:Ys||el(n,t);case 6:var r=dl,o=fl;dl=null,pl(e,t,n),fl=o,null!==(dl=r)&&(fl?(e=dl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):dl.removeChild(n.stateNode));break;case 18:null!==dl&&(fl?(e=dl,n=n.stateNode,8===e.nodeType?co(e.parentNode,n):1===e.nodeType&&co(e,n),Vt(e)):co(dl,n.stateNode));break;case 4:r=dl,o=fl,dl=n.stateNode.containerInfo,fl=!0,pl(e,t,n),dl=r,fl=o;break;case 0:case 11:case 14:case 15:if(!Ys&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,void 0!==a&&(2&i||4&i)&&tl(n,t,a),o=o.next}while(o!==r)}pl(e,t,n);break;case 1:if(!Ys&&(el(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Cc(n,t,s)}pl(e,t,n);break;case 21:pl(e,t,n);break;case 22:1&n.mode?(Ys=(r=Ys)||null!==n.memoizedState,pl(e,t,n),Ys=r):pl(e,t,n);break;default:pl(e,t,n)}}function ml(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Gs),t.forEach(function(t){var r=Nc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function gl(e,t){var r=t.deletions;if(null!==r)for(var o=0;o<r.length;o++){var i=r[o];try{var a=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:dl=l.stateNode,fl=!1;break e;case 3:case 4:dl=l.stateNode.containerInfo,fl=!0;break e}l=l.return}if(null===dl)throw Error(n(160));hl(a,s,i),dl=null,fl=!1;var c=i.alternate;null!==c&&(c.return=null),i.return=null}catch(u){Cc(i,t,u)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)bl(t,e),t=t.sibling}function bl(e,t){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gl(t,e),yl(e),4&o){try{rl(3,e,e.return),ol(3,e)}catch(g){Cc(e,e.return,g)}try{rl(5,e,e.return)}catch(g){Cc(e,e.return,g)}}break;case 1:gl(t,e),yl(e),512&o&&null!==r&&el(r,r.return);break;case 5:if(gl(t,e),yl(e),512&o&&null!==r&&el(r,r.return),32&e.flags){var i=e.stateNode;try{pe(i,"")}catch(g){Cc(e,e.return,g)}}if(4&o&&null!=(i=e.stateNode)){var a=e.memoizedProps,s=null!==r?r.memoizedProps:a,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===a.type&&null!=a.name&&G(i,a),we(l,s);var u=we(l,a);for(s=0;s<c.length;s+=2){var d=c[s],f=c[s+1];"style"===d?be(i,f):"dangerouslySetInnerHTML"===d?fe(i,f):"children"===d?pe(i,f):w(i,d,f,u)}switch(l){case"input":X(i,a);break;case"textarea":ae(i,a);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var h=a.value;null!=h?re(i,!!a.multiple,h,!1):p!==!!a.multiple&&(null!=a.defaultValue?re(i,!!a.multiple,a.defaultValue,!0):re(i,!!a.multiple,a.multiple?[]:"",!1))}i[mo]=a}catch(g){Cc(e,e.return,g)}}break;case 6:if(gl(t,e),yl(e),4&o){if(null===e.stateNode)throw Error(n(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(g){Cc(e,e.return,g)}}break;case 3:if(gl(t,e),yl(e),4&o&&null!==r&&r.memoizedState.isDehydrated)try{Vt(t.containerInfo)}catch(g){Cc(e,e.return,g)}break;case 4:default:gl(t,e),yl(e);break;case 13:gl(t,e),yl(e),8192&(i=e.child).flags&&(a=null!==i.memoizedState,i.stateNode.isHidden=a,!a||null!==i.alternate&&null!==i.alternate.memoizedState||($l=Ge())),4&o&&ml(e);break;case 22:if(d=null!==r&&null!==r.memoizedState,1&e.mode?(Ys=(u=Ys)||d,gl(t,e),Ys=u):gl(t,e),yl(e),8192&o){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!d&&1&e.mode)for(Xs=e,d=e.child;null!==d;){for(f=Xs=d;null!==Xs;){switch(h=(p=Xs).child,p.tag){case 0:case 11:case 14:case 15:rl(4,p,p.return);break;case 1:el(p,p.return);var m=p.stateNode;if("function"==typeof m.componentWillUnmount){o=p,r=p.return;try{t=o,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){Cc(o,r,g)}}break;case 5:el(p,p.return);break;case 22:if(null!==p.memoizedState){kl(f);continue}}null!==h?(h.return=p,Xs=h):kl(f)}d=d.sibling}e:for(d=null,f=e;;){if(5===f.tag){if(null===d){d=f;try{i=f.stateNode,u?"function"==typeof(a=i.style).setProperty?a.setProperty("display","none","important"):a.display="none":(l=f.stateNode,s=null!=(c=f.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,l.style.display=ge("display",s))}catch(g){Cc(e,e.return,g)}}}else if(6===f.tag){if(null===d)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(g){Cc(e,e.return,g)}}else if((22!==f.tag&&23!==f.tag||null===f.memoizedState||f===e)&&null!==f.child){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;null===f.sibling;){if(null===f.return||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:gl(t,e),yl(e),4&o&&ml(e);case 21:}}function yl(e){var t=e.flags;if(2&t){try{e:{for(var r=e.return;null!==r;){if(sl(r)){var o=r;break e}r=r.return}throw Error(n(160))}switch(o.tag){case 5:var i=o.stateNode;32&o.flags&&(pe(i,""),o.flags&=-33),ul(e,ll(e),i);break;case 3:case 4:var a=o.stateNode.containerInfo;cl(e,ll(e),a);break;default:throw Error(n(161))}}catch(s){Cc(e,e.return,s)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function vl(e,t,n){Xs=e,wl(e)}function wl(e,t,n){for(var r=!!(1&e.mode);null!==Xs;){var o=Xs,i=o.child;if(22===o.tag&&r){var a=null!==o.memoizedState||Js;if(!a){var s=o.alternate,l=null!==s&&null!==s.memoizedState||Ys;s=Js;var c=Ys;if(Js=a,(Ys=l)&&!c)for(Xs=o;null!==Xs;)l=(a=Xs).child,22===a.tag&&null!==a.memoizedState?Sl(o):null!==l?(l.return=a,Xs=l):Sl(o);for(;null!==i;)Xs=i,wl(i),i=i.sibling;Xs=o,Js=s,Ys=c}xl(e)}else 8772&o.subtreeFlags&&null!==i?(i.return=o,Xs=i):xl(e)}}function xl(e){for(;null!==Xs;){var t=Xs;if(8772&t.flags){var r=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Ys||ol(5,t);break;case 1:var o=t.stateNode;if(4&t.flags&&!Ys)if(null===r)o.componentDidMount();else{var i=t.elementType===t.type?r.memoizedProps:rs(t.type,r.memoizedProps);o.componentDidUpdate(i,r.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Wi(t,a,o);break;case 3:var s=t.updateQueue;if(null!==s){if(r=null,null!==t.child)switch(t.child.tag){case 5:case 1:r=t.child.stateNode}Wi(t,s,r)}break;case 5:var l=t.stateNode;if(null===r&&4&t.flags){r=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var d=u.memoizedState;if(null!==d){var f=d.dehydrated;null!==f&&Vt(f)}}}break;default:throw Error(n(163))}Ys||512&t.flags&&il(t)}catch(mb){Cc(t,t.return,mb)}}if(t===e){Xs=null;break}if(null!==(r=t.sibling)){r.return=t.return,Xs=r;break}Xs=t.return}}function kl(e){for(;null!==Xs;){var t=Xs;if(t===e){Xs=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Xs=n;break}Xs=t.return}}function Sl(e){for(;null!==Xs;){var t=Xs;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ol(4,t)}catch(l){Cc(t,n,l)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(l){Cc(t,o,l)}}var i=t.return;try{il(t)}catch(l){Cc(t,i,l)}break;case 5:var a=t.return;try{il(t)}catch(l){Cc(t,a,l)}}}catch(l){Cc(t,t.return,l)}if(t===e){Xs=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Xs=s;break}Xs=t.return}}var _l,Cl=Math.ceil,El=x.ReactCurrentDispatcher,zl=x.ReactCurrentOwner,Al=x.ReactCurrentBatchConfig,Nl=0,Tl=null,jl=null,Il=0,Ol=0,Ml=Eo(0),Pl=0,Fl=null,Ll=0,Rl=0,Dl=0,Ul=null,Bl=null,$l=0,Vl=1/0,Hl=null,Wl=!1,ql=null,Zl=null,Ql=!1,Kl=null,Jl=0,Yl=0,Gl=null,Xl=-1,ec=0;function tc(){return 6&Nl?Ge():-1!==Xl?Xl:Xl=Ge()}function nc(e){return 1&e.mode?2&Nl&&0!==Il?Il&-Il:null!==bi.transition?(0===ec&&(ec=gt()),ec):0!==(e=wt)?e:e=void 0===(e=window.event)?16:Yt(e.type):1}function rc(e,t,r,o){if(50<Yl)throw Yl=0,Gl=null,Error(n(185));yt(e,r,o),2&Nl&&e===Tl||(e===Tl&&(!(2&Nl)&&(Rl|=r),4===Pl&&lc(e,Il)),oc(e,o),1===r&&0===Nl&&!(1&t.mode)&&(Vl=Ge()+500,Bo&&Ho()))}function oc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-st(i),s=1<<a,l=o[a];-1===l?0!==(s&n)&&0===(s&r)||(o[a]=ht(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}}(e,t);var r=pt(e,e===Tl?Il:0);if(0===r)null!==n&&Ke(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ke(n),1===t)0===e.tag?function(e){Bo=!0,Vo(e)}(cc.bind(null,e)):Vo(cc.bind(null,e)),so(function(){!(6&Nl)&&Ho()}),n=null;else{switch(xt(r)){case 1:n=et;break;case 4:n=tt;break;case 16:default:n=nt;break;case 536870912:n=ot}n=Tc(n,ic.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ic(e,t){if(Xl=-1,ec=0,6&Nl)throw Error(n(327));var r=e.callbackNode;if(Sc()&&e.callbackNode!==r)return null;var o=pt(e,e===Tl?Il:0);if(0===o)return null;if(30&o||0!==(o&e.expiredLanes)||t)t=bc(e,o);else{t=o;var i=Nl;Nl|=2;var a=mc();for(Tl===e&&Il===t||(Hl=null,Vl=Ge()+500,pc(e,t));;)try{vc();break}catch(l){hc(e,l)}Ai(),El.current=a,Nl=i,null!==jl?t=0:(Tl=null,Il=0,t=Pl)}if(0!==t){if(2===t&&(0!==(i=mt(e))&&(o=i,t=ac(e,i))),1===t)throw r=Fl,pc(e,0),lc(e,o),oc(e,Ge()),r;if(6===t)lc(e,o);else{if(i=e.current.alternate,!(30&o||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!lr(i(),o))return!1}catch(s){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}(i)||(t=bc(e,o),2===t&&(a=mt(e),0!==a&&(o=a,t=ac(e,a))),1!==t)))throw r=Fl,pc(e,0),lc(e,o),oc(e,Ge()),r;switch(e.finishedWork=i,e.finishedLanes=o,t){case 0:case 1:throw Error(n(345));case 2:case 5:kc(e,Bl,Hl);break;case 3:if(lc(e,o),(130023424&o)===o&&10<(t=$l+500-Ge())){if(0!==pt(e,0))break;if(((i=e.suspendedLanes)&o)!==o){tc(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=oo(kc.bind(null,e,Bl,Hl),t);break}kc(e,Bl,Hl);break;case 4:if(lc(e,o),(4194240&o)===o)break;for(t=e.eventTimes,i=-1;0<o;){var s=31-st(o);a=1<<s,(s=t[s])>i&&(i=s),o&=~a}if(o=i,10<(o=(120>(o=Ge()-o)?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*Cl(o/1960))-o)){e.timeoutHandle=oo(kc.bind(null,e,Bl,Hl),o);break}kc(e,Bl,Hl);break;default:throw Error(n(329))}}}return oc(e,Ge()),e.callbackNode===r?ic.bind(null,e):null}function ac(e,t){var n=Ul;return e.current.memoizedState.isDehydrated&&(pc(e,t).flags|=256),2!==(e=bc(e,t))&&(t=Bl,Bl=n,null!==t&&sc(t)),e}function sc(e){null===Bl?Bl=e:Bl.push.apply(Bl,e)}function lc(e,t){for(t&=~Dl,t&=~Rl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-st(t),r=1<<n;e[n]=-1,t&=~r}}function cc(e){if(6&Nl)throw Error(n(327));Sc();var t=pt(e,0);if(!(1&t))return oc(e,Ge()),null;var r=bc(e,t);if(0!==e.tag&&2===r){var o=mt(e);0!==o&&(t=o,r=ac(e,o))}if(1===r)throw r=Fl,pc(e,0),lc(e,t),oc(e,Ge()),r;if(6===r)throw Error(n(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,kc(e,Bl,Hl),oc(e,Ge()),null}function uc(e,t){var n=Nl;Nl|=1;try{return e(t)}finally{0===(Nl=n)&&(Vl=Ge()+500,Bo&&Ho())}}function dc(e){null!==Kl&&0===Kl.tag&&!(6&Nl)&&Sc();var t=Nl;Nl|=1;var n=Al.transition,r=wt;try{if(Al.transition=null,wt=1,e)return e()}finally{wt=r,Al.transition=n,!(6&(Nl=t))&&Ho()}}function fc(){Ol=Ml.current,zo(Ml)}function pc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,io(n)),null!==jl)for(n=jl.return;null!==n;){var r=n;switch(ri(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Po();break;case 3:Gi(),zo(jo),zo(To),oa();break;case 5:ea(r);break;case 4:Gi();break;case 13:case 19:zo(ta);break;case 10:Ni(r.type._context);break;case 22:case 23:fc()}n=n.return}if(Tl=e,jl=e=Mc(e.current,null),Il=Ol=t,Pl=0,Fl=null,Dl=Rl=Ll=0,Bl=Ul=null,null!==Oi){for(t=0;t<Oi.length;t++)if(null!==(r=(n=Oi[t]).interleaved)){n.interleaved=null;var o=r.next,i=n.pending;if(null!==i){var a=i.next;i.next=o,r.next=a}n.pending=r}Oi=null}return e}function hc(e,t){for(;;){var r=jl;try{if(Ai(),ia.current=Xa,da){for(var o=la.memoizedState;null!==o;){var i=o.queue;null!==i&&(i.pending=null),o=o.next}da=!1}if(sa=0,ua=ca=la=null,fa=!1,pa=0,zl.current=null,null===r||null===r.return){Pl=1,Fl=t,jl=null;break}e:{var a=e,s=r.return,l=r,c=t;if(t=Il,l.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var u=c,d=l,f=d.tag;if(!(1&d.mode||0!==f&&11!==f&&15!==f)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var h=bs(s);if(null!==h){h.flags&=-257,ys(h,s,l,0,t),1&h.mode&&gs(a,u,t),c=u;var m=(t=h).updateQueue;if(null===m){var g=new Set;g.add(c),t.updateQueue=g}else m.add(c);break e}if(!(1&t)){gs(a,u,t),gc();break e}c=Error(n(426))}else if(ai&&1&l.mode){var b=bs(s);if(null!==b){!(65536&b.flags)&&(b.flags|=256),ys(b,s,l,0,t),gi(us(c,l));break e}}a=c=us(c,l),4!==Pl&&(Pl=2),null===Ul?Ul=[a]:Ul.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Vi(a,hs(0,c,t));break e;case 1:l=c;var y=a.type,v=a.stateNode;if(!(128&a.flags||"function"!=typeof y.getDerivedStateFromError&&(null===v||"function"!=typeof v.componentDidCatch||null!==Zl&&Zl.has(v)))){a.flags|=65536,t&=-t,a.lanes|=t,Vi(a,ms(a,l,t));break e}}a=a.return}while(null!==a)}xc(r)}catch(w){t=w,jl===r&&null!==r&&(jl=r=r.return);continue}break}}function mc(){var e=El.current;return El.current=Xa,null===e?Xa:e}function gc(){0!==Pl&&3!==Pl&&2!==Pl||(Pl=4),null===Tl||!(268435455&Ll)&&!(268435455&Rl)||lc(Tl,Il)}function bc(e,t){var r=Nl;Nl|=2;var o=mc();for(Tl===e&&Il===t||(Hl=null,pc(e,t));;)try{yc();break}catch(wb){hc(e,wb)}if(Ai(),Nl=r,El.current=o,null!==jl)throw Error(n(261));return Tl=null,Il=0,Pl}function yc(){for(;null!==jl;)wc(jl)}function vc(){for(;null!==jl&&!Je();)wc(jl)}function wc(e){var t=_l(e.alternate,e,Ol);e.memoizedProps=e.pendingProps,null===t?xc(e):jl=t,zl.current=null}function xc(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Ks(n,t)))return n.flags&=32767,void(jl=n);if(null===e)return Pl=6,void(jl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Qs(n,t,Ol)))return void(jl=n);if(null!==(t=t.sibling))return void(jl=t);jl=t=e}while(null!==t);0===Pl&&(Pl=5)}function kc(e,t,r){var o=wt,i=Al.transition;try{Al.transition=null,wt=1,function(e,t,r,o){do{Sc()}while(null!==Kl);if(6&Nl)throw Error(n(327));r=e.finishedWork;var i=e.finishedLanes;if(null===r)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(n(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-st(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}(e,a),e===Tl&&(jl=Tl=null,Il=0),!(2064&r.subtreeFlags)&&!(2064&r.flags)||Ql||(Ql=!0,Tc(nt,function(){return Sc(),null})),a=!!(15990&r.flags),!!(15990&r.subtreeFlags)||a){a=Al.transition,Al.transition=null;var s=wt;wt=1;var l=Nl;Nl|=4,zl.current=null,function(e,t){if(to=Wt,hr(e=pr())){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{var o=(r=(r=e.ownerDocument)&&r.defaultView||window).getSelection&&r.getSelection();if(o&&0!==o.rangeCount){r=o.anchorNode;var i=o.anchorOffset,a=o.focusNode;o=o.focusOffset;try{r.nodeType,a.nodeType}catch(x){r=null;break e}var s=0,l=-1,c=-1,u=0,d=0,f=e,p=null;t:for(;;){for(var h;f!==r||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===r&&++u===i&&(l=s),p===a&&++d===o&&(c=s),null!==(h=f.nextSibling))break;p=(f=p).parentNode}f=h}r=-1===l||-1===c?null:{start:l,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(no={focusedElem:e,selectionRange:r},Wt=!1,Xs=t;null!==Xs;)if(e=(t=Xs).child,1028&t.subtreeFlags&&null!==e)e.return=t,Xs=e;else for(;null!==Xs;){t=Xs;try{var m=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var g=m.memoizedProps,b=m.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:rs(t.type,g),b);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var w=t.stateNode.containerInfo;1===w.nodeType?w.textContent="":9===w.nodeType&&w.documentElement&&w.removeChild(w.documentElement);break;default:throw Error(n(163))}}catch(x){Cc(t,t.return,x)}if(null!==(e=t.sibling)){e.return=t.return,Xs=e;break}Xs=t.return}m=nl,nl=!1}(e,r),bl(r,e),mr(no),Wt=!!to,no=to=null,e.current=r,vl(r),Ye(),Nl=l,wt=s,Al.transition=a}else e.current=r;if(Ql&&(Ql=!1,Kl=e,Jl=i),a=e.pendingLanes,0===a&&(Zl=null),function(e){if(at&&"function"==typeof at.onCommitFiberRoot)try{at.onCommitFiberRoot(it,e,void 0,!(128&~e.current.flags))}catch(t){}}(r.stateNode),oc(e,Ge()),null!==t)for(o=e.onRecoverableError,r=0;r<t.length;r++)i=t[r],o(i.value,{componentStack:i.stack,digest:i.digest});if(Wl)throw Wl=!1,e=ql,ql=null,e;!!(1&Jl)&&0!==e.tag&&Sc(),a=e.pendingLanes,1&a?e===Gl?Yl++:(Yl=0,Gl=e):Yl=0,Ho()}(e,t,r,o)}finally{Al.transition=i,wt=o}return null}function Sc(){if(null!==Kl){var e=xt(Jl),t=Al.transition,r=wt;try{if(Al.transition=null,wt=16>e?16:e,null===Kl)var o=!1;else{if(e=Kl,Kl=null,Jl=0,6&Nl)throw Error(n(331));var i=Nl;for(Nl|=4,Xs=e.current;null!==Xs;){var a=Xs,s=a.child;if(16&Xs.flags){var l=a.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for(Xs=u;null!==Xs;){var d=Xs;switch(d.tag){case 0:case 11:case 15:rl(8,d,a)}var f=d.child;if(null!==f)f.return=d,Xs=f;else for(;null!==Xs;){var p=(d=Xs).sibling,h=d.return;if(al(d),d===u){Xs=null;break}if(null!==p){p.return=h,Xs=p;break}Xs=h}}}var m=a.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var b=g.sibling;g.sibling=null,g=b}while(null!==g)}}Xs=a}}if(2064&a.subtreeFlags&&null!==s)s.return=a,Xs=s;else e:for(;null!==Xs;){if(2048&(a=Xs).flags)switch(a.tag){case 0:case 11:case 15:rl(9,a,a.return)}var y=a.sibling;if(null!==y){y.return=a.return,Xs=y;break e}Xs=a.return}}var v=e.current;for(Xs=v;null!==Xs;){var w=(s=Xs).child;if(2064&s.subtreeFlags&&null!==w)w.return=s,Xs=w;else e:for(s=v;null!==Xs;){if(2048&(l=Xs).flags)try{switch(l.tag){case 0:case 11:case 15:ol(9,l)}}catch(k){Cc(l,l.return,k)}if(l===s){Xs=null;break e}var x=l.sibling;if(null!==x){x.return=l.return,Xs=x;break e}Xs=l.return}}if(Nl=i,Ho(),at&&"function"==typeof at.onPostCommitFiberRoot)try{at.onPostCommitFiberRoot(it,e)}catch(k){}o=!0}return o}finally{wt=r,Al.transition=t}}return!1}function _c(e,t,n){e=Bi(e,t=hs(0,t=us(n,t),1),1),t=tc(),null!==e&&(yt(e,1,t),oc(e,t))}function Cc(e,t,n){if(3===e.tag)_c(e,e,n);else for(;null!==t;){if(3===t.tag){_c(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Zl||!Zl.has(r))){t=Bi(t,e=ms(t,e=us(n,e),1),1),e=tc(),null!==t&&(yt(t,1,e),oc(t,e));break}}t=t.return}}function Ec(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=tc(),e.pingedLanes|=e.suspendedLanes&n,Tl===e&&(Il&n)===n&&(4===Pl||3===Pl&&(130023424&Il)===Il&&500>Ge()-$l?pc(e,0):Dl|=n),oc(e,t)}function zc(e,t){0===t&&(1&e.mode?(t=dt,!(130023424&(dt<<=1))&&(dt=4194304)):t=1);var n=tc();null!==(e=Fi(e,t))&&(yt(e,t,n),oc(e,n))}function Ac(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),zc(e,n)}function Nc(e,t){var r=0;switch(e.tag){case 13:var o=e.stateNode,i=e.memoizedState;null!==i&&(r=i.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(n(314))}null!==o&&o.delete(t),zc(e,r)}function Tc(e,t){return Qe(e,t)}function jc(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ic(e,t,n,r){return new jc(e,t,n,r)}function Oc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Mc(e,t){var n=e.alternate;return null===n?((n=Ic(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=14680064&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}function Pc(e,t,r,o,i,a){var s=2;if(o=e,"function"==typeof e)Oc(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case _:return Fc(r.children,i,a,t);case C:s=8,i|=8;break;case E:return(e=Ic(12,r,t,2|i)).elementType=E,e.lanes=a,e;case T:return(e=Ic(13,r,t,i)).elementType=T,e.lanes=a,e;case j:return(e=Ic(19,r,t,i)).elementType=j,e.lanes=a,e;case M:return Lc(r,i,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case z:s=10;break e;case A:s=9;break e;case N:s=11;break e;case I:s=14;break e;case O:s=16,o=null;break e}throw Error(n(130,null==e?e:typeof e,""))}return(t=Ic(s,r,t,i)).elementType=e,t.type=o,t.lanes=a,t}function Fc(e,t,n,r){return(e=Ic(7,e,r,t)).lanes=n,e}function Lc(e,t,n,r){return(e=Ic(22,e,r,t)).elementType=M,e.lanes=n,e.stateNode={isHidden:!1},e}function Rc(e,t,n){return(e=Ic(6,e,null,t)).lanes=n,e}function Dc(e,t,n){return(t=Ic(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Uc(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=bt(0),this.expirationTimes=bt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bt(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Bc(e,t,n,r,o,i,a,s,l){return e=new Uc(e,t,n,s,l),1===t?(t=1,!0===i&&(t|=8)):t=0,i=Ic(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ri(i),e}function $c(e){if(!e)return No;e:{if(Ve(e=e._reactInternals)!==e||1!==e.tag)throw Error(n(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Mo(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(n(171))}if(1===e.tag){var r=e.type;if(Mo(r))return Lo(e,r,t)}return t}function Vc(e,t,n,r,o,i,a,s,l){return(e=Bc(n,r,!0,e,0,i,0,s,l)).context=$c(null),n=e.current,(i=Ui(r=tc(),o=nc(n))).callback=null!=t?t:null,Bi(n,i,o),e.current.lanes=o,yt(e,o,r),oc(e,r),e}function Hc(e,t,n,r){var o=t.current,i=tc(),a=nc(o);return n=$c(n),null===t.context?t.context=n:t.pendingContext=n,(t=Ui(i,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Bi(o,t,a))&&(rc(e,o,a,i),$i(e,o,a)),a}function Wc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function qc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Zc(e,t){qc(e,t),(e=e.alternate)&&qc(e,t)}_l=function(e,t,r){if(null!==e)if(e.memoizedProps!==t.pendingProps||jo.current)ws=!0;else{if(0===(e.lanes&r)&&!(128&t.flags))return ws=!1,function(e,t,n){switch(t.tag){case 3:Ts(t),mi();break;case 5:Xi(t);break;case 1:Mo(t.type)&&Ro(t);break;case 4:Yi(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Ao(_i,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Ao(ta,1&ta.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Rs(e,t,n):(Ao(ta,1&ta.current),null!==(e=Ws(e,t,n))?e.sibling:null);Ao(ta,1&ta.current);break;case 19:if(r=0!==(n&t.childLanes),128&e.flags){if(r)return Vs(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ao(ta,ta.current),r)break;return null;case 22:case 23:return t.lanes=0,Cs(e,t,n)}return Ws(e,t,n)}(e,t,r);ws=!!(131072&e.flags)}else ws=!1,ai&&1048576&t.flags&&ti(t,Qo,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;Hs(e,t),e=t.pendingProps;var i=Oo(t,To.current);ji(t,r),i=ba(null,t,o,e,i,r);var a=ya();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Mo(o)?(a=!0,Ro(t)):a=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Ri(t),i.updater=is,t.stateNode=i,i._reactInternals=t,cs(t,o,e,r),t=Ns(null,t,o,!0,a,r)):(t.tag=0,ai&&a&&ni(t),xs(null,t,i,r),t=t.child),t;case 16:o=t.elementType;e:{switch(Hs(e,t),e=t.pendingProps,o=(i=o._init)(o._payload),t.type=o,i=t.tag=function(e){if("function"==typeof e)return Oc(e)?1:0;if(null!=e){if((e=e.$$typeof)===N)return 11;if(e===I)return 14}return 2}(o),e=rs(o,e),i){case 0:t=zs(null,t,o,e,r);break e;case 1:t=As(null,t,o,e,r);break e;case 11:t=ks(null,t,o,e,r);break e;case 14:t=Ss(null,t,o,rs(o.type,e),r);break e}throw Error(n(306,o,""))}return t;case 0:return o=t.type,i=t.pendingProps,zs(e,t,o,i=t.elementType===o?i:rs(o,i),r);case 1:return o=t.type,i=t.pendingProps,As(e,t,o,i=t.elementType===o?i:rs(o,i),r);case 3:e:{if(Ts(t),null===e)throw Error(n(387));o=t.pendingProps,i=(a=t.memoizedState).element,Di(e,t),Hi(t,o,null,r);var s=t.memoizedState;if(o=s.element,a.isDehydrated){if(a={element:o,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=js(e,t,o,r,i=us(Error(n(423)),t));break e}if(o!==i){t=js(e,t,o,r,i=us(Error(n(424)),t));break e}for(ii=uo(t.stateNode.containerInfo.firstChild),oi=t,ai=!0,si=null,r=Si(t,null,o,r),t.child=r;r;)r.flags=-3&r.flags|4096,r=r.sibling}else{if(mi(),o===i){t=Ws(e,t,r);break e}xs(e,t,o,r)}t=t.child}return t;case 5:return Xi(t),null===e&&di(t),o=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,s=i.children,ro(o,i)?s=null:null!==a&&ro(o,a)&&(t.flags|=32),Es(e,t),xs(e,t,s,r),t.child;case 6:return null===e&&di(t),null;case 13:return Rs(e,t,r);case 4:return Yi(t,t.stateNode.containerInfo),o=t.pendingProps,null===e?t.child=ki(t,null,o,r):xs(e,t,o,r),t.child;case 11:return o=t.type,i=t.pendingProps,ks(e,t,o,i=t.elementType===o?i:rs(o,i),r);case 7:return xs(e,t,t.pendingProps,r),t.child;case 8:case 12:return xs(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(o=t.type._context,i=t.pendingProps,a=t.memoizedProps,s=i.value,Ao(_i,o._currentValue),o._currentValue=s,null!==a)if(lr(a.value,s)){if(a.children===i.children&&!jo.current){t=Ws(e,t,r);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var l=a.dependencies;if(null!==l){s=a.child;for(var c=l.firstContext;null!==c;){if(c.context===o){if(1===a.tag){(c=Ui(-1,r&-r)).tag=2;var u=a.updateQueue;if(null!==u){var d=(u=u.shared).pending;null===d?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}a.lanes|=r,null!==(c=a.alternate)&&(c.lanes|=r),Ti(a.return,r,t),l.lanes|=r;break}c=c.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(n(341));s.lanes|=r,null!==(l=s.alternate)&&(l.lanes|=r),Ti(s,r,t),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}xs(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,o=t.pendingProps.children,ji(t,r),o=o(i=Ii(i)),t.flags|=1,xs(e,t,o,r),t.child;case 14:return i=rs(o=t.type,t.pendingProps),Ss(e,t,o,i=rs(o.type,i),r);case 15:return _s(e,t,t.type,t.pendingProps,r);case 17:return o=t.type,i=t.pendingProps,i=t.elementType===o?i:rs(o,i),Hs(e,t),t.tag=1,Mo(o)?(e=!0,Ro(t)):e=!1,ji(t,r),ss(t,o,i),cs(t,o,i,r),Ns(null,t,o,!0,e,r);case 19:return Vs(e,t,r);case 22:return Cs(e,t,r)}throw Error(n(156,t.tag))};var Qc="function"==typeof reportError?reportError:function(e){console.error(e)};function Kc(e){this._internalRoot=e}function Jc(e){this._internalRoot=e}function Yc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Gc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Xc(){}function eu(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i;if("function"==typeof o){var s=o;o=function(){var e=Wc(a);s.call(e)}}Hc(t,a,e,o)}else a=function(e,t,n,r,o){if(o){if("function"==typeof r){var i=r;r=function(){var e=Wc(a);i.call(e)}}var a=Vc(t,r,e,0,null,!1,0,"",Xc);return e._reactRootContainer=a,e[go]=a.current,Vr(8===e.nodeType?e.parentNode:e),dc(),a}for(;o=e.lastChild;)e.removeChild(o);if("function"==typeof r){var s=r;r=function(){var e=Wc(l);s.call(e)}}var l=Bc(e,0,!1,null,0,!1,0,"",Xc);return e._reactRootContainer=l,e[go]=l.current,Vr(8===e.nodeType?e.parentNode:e),dc(function(){Hc(t,l,n,r)}),l}(n,t,e,o,r);return Wc(a)}Jc.prototype.render=Kc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(n(409));Hc(e,t,null,null)},Jc.prototype.unmount=Kc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;dc(function(){Hc(null,e,null,null)}),t[go]=null}},Jc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mt.length&&0!==t&&t<Mt[n].priority;n++);Mt.splice(n,0,e),0===n&&Rt(e)}},kt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ft(t.pendingLanes);0!==n&&(vt(t,1|n),oc(t,Ge()),!(6&Nl)&&(Vl=Ge()+500,Ho()))}break;case 13:dc(function(){var t=Fi(e,1);if(null!==t){var n=tc();rc(t,e,1,n)}}),Zc(e,1)}},St=function(e){if(13===e.tag){var t=Fi(e,134217728);if(null!==t)rc(t,e,134217728,tc());Zc(e,134217728)}},_t=function(e){if(13===e.tag){var t=nc(e),n=Fi(e,t);if(null!==n)rc(n,e,t,tc());Zc(e,t)}},Ct=function(){return wt},Et=function(e,t){var n=wt;try{return wt=e,t()}finally{wt=n}},Se=function(e,t,r){switch(t){case"input":if(X(e,r),t=r.name,"radio"===r.type&&null!=t){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var o=r[t];if(o!==e&&o.form===e.form){var i=So(o);if(!i)throw Error(n(90));Q(o),X(o,i)}}}break;case"textarea":ae(e,r);break;case"select":null!=(t=r.value)&&re(e,!!r.multiple,t,!1)}},Ne=uc,Te=dc;var tu={usingClientEntryPoint:!1,Events:[xo,ko,So,ze,Ae,uc]},nu={findFiberByHostInstance:wo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ru={bundleType:nu.bundleType,version:nu.version,rendererPackageName:nu.rendererPackageName,rendererConfig:nu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:x.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=qe(e))?null:e.stateNode},findFiberByHostInstance:nu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ou=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ou.isDisabled&&ou.supportsFiber)try{it=ou.inject(ru),at=ou}catch(de){}}return a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tu,a.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Yc(t))throw Error(n(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:S,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,r)},a.createRoot=function(e,t){if(!Yc(e))throw Error(n(299));var r=!1,o="",i=Qc;return null!=t&&(!0===t.unstable_strictMode&&(r=!0),void 0!==t.identifierPrefix&&(o=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Bc(e,1,!1,null,0,r,0,o,i),e[go]=t.current,Vr(8===e.nodeType?e.parentNode:e),new Kc(t)},a.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(n(188));throw e=Object.keys(e).join(","),Error(n(268,e))}return e=null===(e=qe(t))?null:e.stateNode},a.flushSync=function(e){return dc(e)},a.hydrate=function(e,t,r){if(!Gc(t))throw Error(n(200));return eu(null,e,t,!0,r)},a.hydrateRoot=function(e,t,r){if(!Yc(e))throw Error(n(405));var o=null!=r&&r.hydratedSources||null,i=!1,a="",s=Qc;if(null!=r&&(!0===r.unstable_strictMode&&(i=!0),void 0!==r.identifierPrefix&&(a=r.identifierPrefix),void 0!==r.onRecoverableError&&(s=r.onRecoverableError)),t=Vc(t,null,e,1,null!=r?r:null,i,0,a,s),e[go]=t.current,Vr(e),o)for(e=0;e<o.length;e++)i=(i=(r=o[e])._getVersion)(r._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[r,i]:t.mutableSourceEagerHydrationData.push(r,i);return new Jc(t)},a.render=function(e,t,r){if(!Gc(t))throw Error(n(200));return eu(null,e,t,!1,r)},a.unmountComponentAtNode=function(e){if(!Gc(e))throw Error(n(40));return!!e._reactRootContainer&&(dc(function(){eu(null,null,e,!1,function(){e._reactRootContainer=null,e[go]=null})}),!0)},a.unstable_batchedUpdates=uc,a.unstable_renderSubtreeIntoContainer=function(e,t,r,o){if(!Gc(r))throw Error(n(200));if(null==e||void 0===e._reactInternals)throw Error(n(38));return eu(e,t,r,!1,o)},a.version="18.3.1-next-f1338f8080-20240426",a}function w(){if(h)return i.exports;return h=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)}}(),i.exports=v(),i.exports}var x=function(){if(m)return o;m=1;var e=w();return o.createRoot=e.createRoot,o.hydrateRoot=e.hydrateRoot,o}(),k=u();const S=t(k);var _,C,E={exports:{}},z={};var A=(C||(C=1,E.exports=function(){if(_)return z;_=1;var e=u(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(e,n,a){var s,l={},c=null,u=null;for(s in void 0!==a&&(c=""+a),void 0!==n.key&&(c=""+n.key),void 0!==n.ref&&(u=n.ref),n)r.call(n,s)&&!i.hasOwnProperty(s)&&(l[s]=n[s]);if(e&&e.defaultProps)for(s in n=e.defaultProps)void 0===l[s]&&(l[s]=n[s]);return{$$typeof:t,type:e,key:c,ref:u,props:l,_owner:o.current}}return z.Fragment=n,z.jsx=a,z.jsxs=a,z}()),E.exports);const N={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 T(){if("undefined"==typeof navigator)return"es";const e=navigator.language.split("-")[0];return N[e]?e:"es"}const j=k.createContext(void 0),I="botuyo-chat-locale";function O({children:e,defaultLocale:t}){const[n,r]=k.useState(()=>{if(t)return t;if("undefined"!=typeof window){const e=localStorage.getItem(I);if(e)return e}return T()});return k.useEffect(()=>{if("undefined"==typeof window||t)return;const e=()=>{localStorage.getItem(I)||r(T())};return window.addEventListener("languagechange",e),()=>window.removeEventListener("languagechange",e)},[t]),A.jsx(j.Provider,{value:{locale:n,setLocale:e=>{["es","en","pt","fr"].includes(e)?(r(e),"undefined"!=typeof window&&localStorage.setItem(I,e)):console.warn(`[BotUyo] Locale "${e}" no es soportado. Manteniendo "${n}"`)}},children:e})}function M(){const e=k.useContext(j);if(void 0===e)throw new Error("useLanguage debe usarse dentro de un LanguageProvider");return e}function P(e){const{locale:t,setLocale:n}=M();return{t:k.useCallback(n=>{const r=e?`${e}.${n}`:n,o=(i=N[t],(a=r).split(".").reduce((e,t)=>e?.[t],i)||a);var i,a;return o||n},[t,e]),setLocale:n,currentLocale:t}}const F=(...e)=>e.filter((e,t,n)=>Boolean(e)&&n.indexOf(e)===t).join(" ");var L={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 R=k.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>k.createElement("svg",{ref:l,...L,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:F("lucide",o),...s},[...a.map(([e,t])=>k.createElement(e,t)),...Array.isArray(i)?i:[i]])),D=(e,t)=>{const n=k.forwardRef(({className:n,...r},o)=>{return k.createElement(R,{ref:o,iconNode:t,className:F(`lucide-${i=e,i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,n),...r});var i});return n.displayName=`${e}`,n},U=D("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),B=D("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]),$=D("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),V=D("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),H=D("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),W=D("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]),q=D("ExternalLink",[["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"}]]),Z=D("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]),Q=D("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]),K=D("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"}]]),J=D("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Y=D("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]),G=D("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]),X=D("MicOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2",key:"80xlxr"}],["path",{d:"M5 10v2a7 7 0 0 0 12 5",key:"p2k8kg"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]),ee=D("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]),te=D("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]),ne=D("PhoneOff",[["path",{d:"M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91",key:"z86iuo"}],["line",{x1:"22",x2:"2",y1:"2",y2:"22",key:"11kh81"}]]),re=D("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]),oe=D("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]),ie=D("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),ae=D("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]),se=D("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]),le=D("ShieldCheck",[["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"}]]),ce=D("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),ue=D("Volume2",[["polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5",key:"16drj5"}],["path",{d:"M15.54 8.46a5 5 0 0 1 0 7.07",key:"ltjumu"}],["path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14",key:"1kegas"}]]),de=D("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),fe=D("ZoomIn",[["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 pe(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=pe(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}const he=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),me="-",ge=[],be=e=>{const t=we(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return ve(e);const n=e.split(me),r=""===n[0]&&n.length>1?1:0;return ye(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||ge}return n[e]||ge}}},ye=(e,t,n)=>{if(0===e.length-t)return n.classGroupId;const r=e[t],o=n.nextPart.get(r);if(o){const n=ye(e,t+1,o);if(n)return n}const i=n.validators;if(null===i)return;const a=0===t?e.join(me):e.slice(t).join(me),s=i.length;for(let l=0;l<s;l++){const e=i[l];if(e.validator(a))return e.classGroupId}},ve=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})(),we=e=>{const{theme:t,classGroups:n}=e;return xe(n,t)},xe=(e,t)=>{const n=he();for(const r in e){const o=e[r];ke(o,n,r,t)}return n},ke=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const o=e[i];Se(o,t,n,r)}},Se=(e,t,n,r)=>{"string"!=typeof e?"function"!=typeof e?Ee(e,t,n,r):Ce(e,t,n,r):_e(e,t,n)},_e=(e,t,n)=>{(""===e?t:ze(t,e)).classGroupId=n},Ce=(e,t,n,r)=>{Ae(e)?ke(e(r),t,n,r):(null===t.validators&&(t.validators=[]),t.validators.push(((e,t)=>({classGroupId:e,validator:t}))(n,e)))},Ee=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let a=0;a<i;a++){const[e,i]=o[a];ke(i,ze(t,e),n,r)}},ze=(e,t)=>{let n=e;const r=t.split(me),o=r.length;for(let i=0;i<o;i++){const e=r[i];let t=n.nextPart.get(e);t||(t=he(),n.nextPart.set(e,t)),n=t}return n},Ae=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,Ne=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)}}},Te=[],je=(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 je(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)):je(Te,!1,t,void 0,!0)}if(n){const e=r;r=t=>n({className:t,parseClassName:e})}return r},Oe=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}},Me=/\s+/,Pe=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Pe(e[r]))&&(n&&(n+=" "),n+=t);return n},Fe=(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(Me);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(":"),b=d?g+"!":g,y=b+m;if(a.indexOf(y)>-1)continue;a.push(y);const v=o(m,h);for(let n=0;n<v.length;++n){const e=v[n];a.push(b+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:Ne(e.cacheSize),parseClassName:Ie(e),sortModifiers:Oe(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=Pe(t))&&(o&&(o+=" "),o+=n);return o})(...e))},Le=[],Re=e=>{const t=t=>t[e]||Le;return t.isThemeGetter=!0,t},De=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ue=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Be=/^\d+\/\d+$/,$e=/^(\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$/,He=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,We=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ze=e=>Be.test(e),Qe=e=>!!e&&!Number.isNaN(Number(e)),Ke=e=>!!e&&Number.isInteger(Number(e)),Je=e=>e.endsWith("%")&&Qe(e.slice(0,-1)),Ye=e=>$e.test(e),Ge=()=>!0,Xe=e=>Ve.test(e)&&!He.test(e),et=()=>!1,tt=e=>We.test(e),nt=e=>qe.test(e),rt=e=>!it(e)&&!dt(e),ot=e=>yt(e,kt,et),it=e=>De.test(e),at=e=>yt(e,St,Xe),st=e=>yt(e,_t,Qe),lt=e=>yt(e,wt,et),ct=e=>yt(e,xt,nt),ut=e=>yt(e,Et,tt),dt=e=>Ue.test(e),ft=e=>vt(e,St),pt=e=>vt(e,Ct),ht=e=>vt(e,wt),mt=e=>vt(e,kt),gt=e=>vt(e,xt),bt=e=>vt(e,Et,!0),yt=(e,t,n)=>{const r=De.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},vt=(e,t,n=!1)=>{const r=Ue.exec(e);return!!r&&(r[1]?t(r[1]):n)},wt=e=>"position"===e||"percentage"===e,xt=e=>"image"===e||"url"===e,kt=e=>"length"===e||"size"===e||"bg-size"===e,St=e=>"length"===e,_t=e=>"number"===e,Ct=e=>"family-name"===e,Et=e=>"shadow"===e,zt=Fe(()=>{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"),b=Re("ease"),y=Re("animate"),v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",dt,it],w=()=>[dt,it,l],x=()=>[Ze,"full","auto",...w()],k=()=>[Ke,"none","subgrid",dt,it],S=()=>["auto",{span:["full",Ke,dt,it]},Ke,dt,it],_=()=>[Ke,"auto",dt,it],C=()=>["auto","min","max","fr",dt,it],E=()=>["auto",...w()],z=()=>[Ze,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],A=()=>[e,dt,it],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",ht,lt,{position:[dt,it]}],T=()=>["auto","cover","contain",mt,ot,{size:[dt,it]}],j=()=>[Je,ft,at],I=()=>["","none","full",c,dt,it],O=()=>["",Qe,ft,at],M=()=>[Qe,Je,ht,lt],P=()=>["","none",h,dt,it],F=()=>["none",Qe,dt,it],L=()=>["none",Qe,dt,it],R=()=>[Qe,dt,it],D=()=>[Ze,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ye],breakpoint:[Ye],color:[Ge],container:[Ye],"drop-shadow":[Ye],ease:["in","out","in-out"],font:[rt],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ye],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ye],shadow:[Ye],spacing:["px",Qe],text:[Ye],"text-shadow":[Ye],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ze,it,dt,g]}],container:["container"],columns:[{columns:[Qe,it,dt,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:x()}],"inset-x":[{"inset-x":x()}],"inset-y":[{"inset-y":x()}],start:[{start:x()}],end:[{end:x()}],top:[{top:x()}],right:[{right:x()}],bottom:[{bottom:x()}],left:[{left:x()}],visibility:["visible","invisible","collapse"],z:[{z:[Ke,"auto",dt,it]}],basis:[{basis:[Ze,"full","auto",s,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Qe,Ze,"auto","initial","none",it]}],grow:[{grow:["",Qe,dt,it]}],shrink:[{shrink:["",Qe,dt,it]}],order:[{order:[Ke,"first","last","none",dt,it]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:S()}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":k()}],"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":C()}],"auto-rows":[{"auto-rows":C()}],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:E()}],mx:[{mx:E()}],my:[{my:E()}],ms:[{ms:E()}],me:[{me:E()}],mt:[{mt:E()}],mr:[{mr:E()}],mb:[{mb:E()}],ml:[{ml:E()}],"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,ft,at]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,dt,st]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Je,it]}],"font-family":[{font:[pt,it,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,dt,it]}],"line-clamp":[{"line-clamp":[Qe,"none",dt,st]}],leading:[{leading:[i,...w()]}],"list-image":[{"list-image":["none",dt,it]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",dt,it]}],"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:[Qe,"from-font","auto",dt,at]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[Qe,"auto",dt,it]}],"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",dt,it]}],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",dt,it]}],"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"]},Ke,dt,it],radial:["",dt,it],conic:[Ke,dt,it]},gt,ct]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:j()}],"gradient-via-pos":[{via:j()}],"gradient-to-pos":[{to:j()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:O()}],"border-w-x":[{"border-x":O()}],"border-w-y":[{"border-y":O()}],"border-w-s":[{"border-s":O()}],"border-w-e":[{"border-e":O()}],"border-w-t":[{"border-t":O()}],"border-w-r":[{"border-r":O()}],"border-w-b":[{"border-b":O()}],"border-w-l":[{"border-l":O()}],"divide-x":[{"divide-x":O()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":O()}],"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":[Qe,dt,it]}],"outline-w":[{outline:["",Qe,ft,at]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",u,bt,ut]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",d,bt,ut]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:O()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[Qe,at]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":O()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",f,bt,ut]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[Qe,dt,it]}],"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":[Qe]}],"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":[dt,it]}],"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":[Qe]}],"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",dt,it]}],filter:[{filter:["","none",dt,it]}],blur:[{blur:P()}],brightness:[{brightness:[Qe,dt,it]}],contrast:[{contrast:[Qe,dt,it]}],"drop-shadow":[{"drop-shadow":["","none",p,bt,ut]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",Qe,dt,it]}],"hue-rotate":[{"hue-rotate":[Qe,dt,it]}],invert:[{invert:["",Qe,dt,it]}],saturate:[{saturate:[Qe,dt,it]}],sepia:[{sepia:["",Qe,dt,it]}],"backdrop-filter":[{"backdrop-filter":["","none",dt,it]}],"backdrop-blur":[{"backdrop-blur":P()}],"backdrop-brightness":[{"backdrop-brightness":[Qe,dt,it]}],"backdrop-contrast":[{"backdrop-contrast":[Qe,dt,it]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Qe,dt,it]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Qe,dt,it]}],"backdrop-invert":[{"backdrop-invert":["",Qe,dt,it]}],"backdrop-opacity":[{"backdrop-opacity":[Qe,dt,it]}],"backdrop-saturate":[{"backdrop-saturate":[Qe,dt,it]}],"backdrop-sepia":[{"backdrop-sepia":["",Qe,dt,it]}],"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",dt,it]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Qe,"initial",dt,it]}],ease:[{ease:["linear","initial",b,dt,it]}],delay:[{delay:[Qe,dt,it]}],animate:[{animate:["none",y,dt,it]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,dt,it]}],"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:R()}],"skew-x":[{"skew-x":R()}],"skew-y":[{"skew-y":R()}],transform:[{transform:[dt,it,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:D()}],"translate-x":[{"translate-x":D()}],"translate-y":[{"translate-y":D()}],"translate-z":[{"translate-z":D()}],"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",dt,it]}],"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",dt,it]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[Qe,ft,at,st]}],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 At(...e){return zt(function(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=pe(e))&&(r&&(r+=" "),r+=t);return r}(e))}const Nt={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"},Tt="hsl(160, 84%, 39%)",jt="Asistente",It="",Ot="bottom-right",Mt="¡Hola! ¿En qué puedo ayudarte?",Pt="Escribe un mensaje...";function Ft(e){return e.primaryColor||Tt}const Lt={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},Dt=k.createContext(Lt),Ut=k.createContext(Rt);function Bt({children:e,animations:t,effects:n}){const r=k.useMemo(()=>({...Lt,...t}),[t]),o=k.useMemo(()=>({...Rt,...n}),[n]);return A.jsx(Dt.Provider,{value:r,children:A.jsx(Ut.Provider,{value:o,children:e})})}function $t(){return"undefined"!=typeof window&&!!window.DEBUG}const Vt=(e,...t)=>{$t()&&console.warn(`[BotUyo] ${e}`,...t)},Ht=(e,...t)=>{console.error(`[BotUyo] ${e}`,...t)},Wt=(e,...t)=>{$t()&&console.debug(`[BotUyo] ${e}`,...t)},qt=(e,...t)=>{$t()&&console.info(`[BotUyo] ${e}`,...t)},Zt=`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')}`,Qt=function(){const e=8e3,t=Math.floor(1200),n=2*t,r=44+n,o=new ArrayBuffer(r),i=new DataView(o);Kt(i,0,"RIFF"),i.setUint32(4,r-8,!0),Kt(i,8,"WAVE"),Kt(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),Kt(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 Kt(e,t,n){for(let r=0;r<n.length;r++)e.setUint8(t+r,n.charCodeAt(r))}function Jt({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,showPromptAvatar:f=!1}){const{t:p}=P("extracted"),h=Ft({primaryColor:r}),m=c?.launcher?.bg,g=k.useContext(Dt),{triggerHaptic:b,getGlowClass:y}=function(){const e=k.useContext(Ut);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)}}}(),v=g.launcherPulse&&!1!==c?.launcher?.pulse,[w,x]=k.useState(!1),[S,_]=k.useState(!1),[C,E]=k.useState(!1),[z,N]=k.useState(!1),T="bottom-right"===a,j="chat_launcher_prompt_state",I=k.useMemo(()=>l[s]||l.default||o||Zt,[s,l,o]);k.useEffect(()=>{N(!1)},[I]),k.useEffect(()=>{const e=Object.values(l).filter(e=>!!e);o&&e.push(o),e.forEach(e=>{(new Image).src=e})},[l,o]),k.useEffect(()=>{"forever"===u&&"dismissed"===localStorage.getItem(j)&&E(!0)},[u]);const O=k.useCallback(()=>{_(!0),setTimeout(()=>x(!1),500),"always"!==u&&(E(!0),"forever"===u&&localStorage.setItem(j,"dismissed"))},[u]);k.useEffect(()=>{if("always"!==u&&C||!i||e)return void x(!1);const t=setTimeout(()=>{x(!0),_(!1)},2e3),n=setTimeout(()=>O(),12e3);return()=>{clearTimeout(t),clearTimeout(n)}},[i,e,C,u,O]);const M=()=>{Wt("Launcher handleMainAction called, isOpen:",e),b(),E(!0),"forever"===u&&localStorage.setItem(j,"dismissed"),t()};return A.jsxs("div",{className:At("flex items-center w-fit transition-all duration-500",T?"flex-row ml-auto":"flex-row-reverse mr-auto"),children:[A.jsx("div",{className:At("transition-all duration-700 ease-in-out flex items-end",w?At("opacity-100 translate-x-0 w-auto max-w-[350px]",T?"mr-5":"ml-5"):At("opacity-0 w-0 max-w-0 overflow-hidden pointer-events-none",T?"translate-x-4":"-translate-x-4")),children:A.jsxs("div",{className:At("relative flex items-center gap-2.5 cursor-pointer",S&&"opacity-0 scale-95 transition-all duration-300",!w&&"hidden"),onClick:M,style:{width:"max-content"},children:[f&&A.jsx("div",{className:"shrink-0 overflow-hidden",style:{width:"36px",height:"36px",borderRadius:"50%",backgroundColor:h||"hsl(160,84%,39%)",boxShadow:`0 2px 8px ${h||"hsl(160,84%,39%)"}44`,display:"flex",alignItems:"center",justifyContent:"center"},children:I&&!z?A.jsx("img",{src:I,alt:"",style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:"50%"},onError:()=>N(!0)}):A.jsx(G,{style:{width:"18px",height:"18px",color:"white",fill:"white"}})}),A.jsx("div",{style:{position:"relative",maxWidth:"280px",padding:"10px 16px",borderRadius:"18px",backgroundColor:"hsl(var(--background) / 0.92)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",color:"hsl(var(--foreground))",boxShadow:"0 4px 20px -4px rgba(0,0,0,0.12), 0 0 0 1px hsl(var(--border) / 0.6)"},children:A.jsx("span",{style:{display:"block",fontSize:"13.5px",fontWeight:600,lineHeight:1.4,letterSpacing:"-0.01em",whiteSpace:"nowrap"},children:i})}),A.jsx("button",{onClick:e=>{e.stopPropagation(),O()},style:{position:"absolute",top:"-6px",right:"-6px",width:"20px",height:"20px",borderRadius:"50%",backgroundColor:"hsl(var(--background))",border:"1px solid hsl(var(--border))",boxShadow:"0 1px 4px rgba(0,0,0,0.1)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",color:"hsl(var(--muted-foreground))",padding:0,transition:"all 0.2s"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="hsl(var(--destructive))",e.currentTarget.style.color="white",e.currentTarget.style.borderColor="hsl(var(--destructive))"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="hsl(var(--background))",e.currentTarget.style.color="hsl(var(--muted-foreground))",e.currentTarget.style.borderColor="hsl(var(--border))"},"aria-label":"Cerrar",children:A.jsx(de,{className:"h-3 w-3",style:{strokeWidth:2.5}})})]})}),A.jsxs("div",{className:"relative flex items-center justify-center shrink-0",children:[!e&&v&&A.jsx("span",{className:"absolute inset-0 flex items-center justify-center",children:A.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full opacity-20",style:{backgroundColor:h}})}),A.jsxs("button",{type:"button",onClick:M,className:At("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&&g.enabled&&"animate-glow-pulse",c?.radius?.button||"rounded-full",m,y()),style:{backgroundColor:h||"hsl(160, 84%, 39%)","--primary-glow":`${h}66`},"aria-label":e?"Cerrar chat":"Abrir chat",children:[A.jsxs("div",{className:"relative h-full w-full flex items-center justify-center overflow-hidden rounded-inherit",children:[A.jsx("div",{className:At("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:I&&!z?A.jsx("img",{src:I,alt:p("assistant"),className:"w-full h-full object-cover",style:{transform:`scale(${d})`},onError:()=>N(!0)},I):A.jsx(G,{className:"h-7 w-7 sm:h-8 sm:w-8 fill-current"})}),A.jsx("div",{className:At("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:A.jsx(de,{className:"h-7 w-7 sm:h-8 sm:w-8 stroke-[2.5]"})})]}),!e&&n>0&&A.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 Yt=w();function Gt(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 Xt(e,t){if(void 0===e)throw new Error("Unexpected undefined");return e}const en=(e,t,n)=>{let r;return function(...o){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,o),n)}},tn=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},nn=e=>e,rn=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},on=(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(tn(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(tn(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},an={passive:!0},sn="undefined"==typeof window||"onscrollend"in window,ln=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let o=0;const i=e.options.useScrollendEvent&&sn?()=>{}:en(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,an);const c=e.options.useScrollendEvent&&sn;return c&&n.addEventListener("scrollend",l,an),()=>{n.removeEventListener("scroll",s),c&&n.removeEventListener("scrollend",l)}},cn=(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"]},un=(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 dn{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:nn,rangeExtractor:rn,onChange:()=>{},measureElement:cn,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=Gt(()=>(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=Gt(()=>[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=Gt(()=>[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=Gt(()=>[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=fn(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=Gt(()=>{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=Gt(()=>[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 Xt(t[fn(0,t.length-1,e=>Xt(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 fn=(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 pn="undefined"!=typeof document?k.useLayoutEffect:k.useEffect;function hn(e){return function({useFlushSync:e=!0,...t}){const n=k.useReducer(()=>({}),{})[1],r={...t,onChange:(r,o)=>{var i;e&&o?Yt.flushSync(n):n(),null==(i=t.onChange)||i.call(t,r,o)}},[o]=k.useState(()=>new dn(r));return o.setOptions(r),pn(()=>o._didMount(),[]),pn(()=>o._willUpdate()),o}({observeElementRect:on,observeElementOffset:ln,scrollToFn:un,...e})}function mn(){}function gn(){}const bn=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yn=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,vn={};function wn(e,t){return(vn.jsx?yn:bn).test(e)}const xn=/[ \t\n\f\r]/g;function kn(e){return""===e.replace(xn,"")}class Sn{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function _n(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Sn(n,r,t)}function Cn(e){return e.toLowerCase()}Sn.prototype.normal={},Sn.prototype.property={},Sn.prototype.space=void 0;class En{constructor(e,t){this.attribute=t,this.property=e}}En.prototype.attribute="",En.prototype.booleanish=!1,En.prototype.boolean=!1,En.prototype.commaOrSpaceSeparated=!1,En.prototype.commaSeparated=!1,En.prototype.defined=!1,En.prototype.mustUseProperty=!1,En.prototype.number=!1,En.prototype.overloadedBoolean=!1,En.prototype.property="",En.prototype.spaceSeparated=!1,En.prototype.space=void 0;let zn=0;const An=Pn(),Nn=Pn(),Tn=Pn(),jn=Pn(),In=Pn(),On=Pn(),Mn=Pn();function Pn(){return 2**++zn}const Fn=Object.freeze(Object.defineProperty({__proto__:null,boolean:An,booleanish:Nn,commaOrSpaceSeparated:Mn,commaSeparated:On,number:jn,overloadedBoolean:Tn,spaceSeparated:In},Symbol.toStringTag,{value:"Module"})),Ln=Object.keys(Fn);class Rn extends En{constructor(e,t,n,r){let o=-1;if(super(e,t),Dn(this,"space",r),"number"==typeof n)for(;++o<Ln.length;){const e=Ln[o];Dn(this,Ln[o],(n&Fn[e])===Fn[e])}}}function Dn(e,t,n){n&&(e[t]=n)}function Un(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 Sn(t,n,e.space)}Rn.prototype.defined=!0;const Bn=Un({properties:{ariaActiveDescendant:null,ariaAtomic:Nn,ariaAutoComplete:null,ariaBusy:Nn,ariaChecked:Nn,ariaColCount:jn,ariaColIndex:jn,ariaColSpan:jn,ariaControls:In,ariaCurrent:null,ariaDescribedBy:In,ariaDetails:null,ariaDisabled:Nn,ariaDropEffect:In,ariaErrorMessage:null,ariaExpanded:Nn,ariaFlowTo:In,ariaGrabbed:Nn,ariaHasPopup:null,ariaHidden:Nn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:In,ariaLevel:jn,ariaLive:null,ariaModal:Nn,ariaMultiLine:Nn,ariaMultiSelectable:Nn,ariaOrientation:null,ariaOwns:In,ariaPlaceholder:null,ariaPosInSet:jn,ariaPressed:Nn,ariaReadOnly:Nn,ariaRelevant:null,ariaRequired:Nn,ariaRoleDescription:In,ariaRowCount:jn,ariaRowIndex:jn,ariaRowSpan:jn,ariaSelected:Nn,ariaSetSize:jn,ariaSort:null,ariaValueMax:jn,ariaValueMin:jn,ariaValueNow:jn,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function $n(e,t){return t in e?e[t]:t}function Vn(e,t){return $n(e,t.toLowerCase())}const Hn=Un({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:On,acceptCharset:In,accessKey:In,action:null,allow:null,allowFullScreen:An,allowPaymentRequest:An,allowUserMedia:An,alt:null,as:null,async:An,autoCapitalize:null,autoComplete:In,autoFocus:An,autoPlay:An,blocking:In,capture:null,charSet:null,checked:An,cite:null,className:In,cols:jn,colSpan:null,content:null,contentEditable:Nn,controls:An,controlsList:In,coords:jn|On,crossOrigin:null,data:null,dateTime:null,decoding:null,default:An,defer:An,dir:null,dirName:null,disabled:An,download:Tn,draggable:Nn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:An,formTarget:null,headers:In,height:jn,hidden:Tn,high:jn,href:null,hrefLang:null,htmlFor:In,httpEquiv:In,id:null,imageSizes:null,imageSrcSet:null,inert:An,inputMode:null,integrity:null,is:null,isMap:An,itemId:null,itemProp:In,itemRef:In,itemScope:An,itemType:In,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:An,low:jn,manifest:null,max:null,maxLength:jn,media:null,method:null,min:null,minLength:jn,multiple:An,muted:An,name:null,nonce:null,noModule:An,noValidate:An,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:An,optimum:jn,pattern:null,ping:In,placeholder:null,playsInline:An,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:An,referrerPolicy:null,rel:In,required:An,reversed:An,rows:jn,rowSpan:jn,sandbox:In,scope:null,scoped:An,seamless:An,selected:An,shadowRootClonable:An,shadowRootDelegatesFocus:An,shadowRootMode:null,shape:null,size:jn,sizes:null,slot:null,span:jn,spellCheck:Nn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:jn,step:null,style:null,tabIndex:jn,target:null,title:null,translate:null,type:null,typeMustMatch:An,useMap:null,value:Nn,width:jn,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:In,axis:null,background:null,bgColor:null,border:jn,borderColor:null,bottomMargin:jn,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:An,declare:An,event:null,face:null,frame:null,frameBorder:null,hSpace:jn,leftMargin:jn,link:null,longDesc:null,lowSrc:null,marginHeight:jn,marginWidth:jn,noResize:An,noHref:An,noShade:An,noWrap:An,object:null,profile:null,prompt:null,rev:null,rightMargin:jn,rules:null,scheme:null,scrolling:Nn,standby:null,summary:null,text:null,topMargin:jn,valueType:null,version:null,vAlign:null,vLink:null,vSpace:jn,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:An,disableRemotePlayback:An,prefix:null,property:null,results:jn,security:null,unselectable:null},space:"html",transform:Vn}),Wn=Un({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:Mn,accentHeight:jn,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:jn,amplitude:jn,arabicForm:null,ascent:jn,attributeName:null,attributeType:null,azimuth:jn,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:jn,by:null,calcMode:null,capHeight:jn,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:jn,diffuseConstant:jn,direction:null,display:null,dur:null,divisor:jn,dominantBaseline:null,download:An,dx:null,dy:null,edgeMode:null,editable:null,elevation:jn,enableBackground:null,end:null,event:null,exponent:jn,externalResourcesRequired:null,fill:null,fillOpacity:jn,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:On,g2:On,glyphName:On,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:jn,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:jn,horizOriginX:jn,horizOriginY:jn,id:null,ideographic:jn,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:jn,k:jn,k1:jn,k2:jn,k3:jn,k4:jn,kernelMatrix:Mn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:jn,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:jn,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:jn,overlineThickness:jn,paintOrder:null,panose1:null,path:null,pathLength:jn,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:In,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:jn,pointsAtY:jn,pointsAtZ:jn,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Mn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Mn,rev:Mn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Mn,requiredFeatures:Mn,requiredFonts:Mn,requiredFormats:Mn,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:jn,specularExponent:jn,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:jn,strikethroughThickness:jn,string:null,stroke:null,strokeDashArray:Mn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:jn,strokeOpacity:jn,strokeWidth:null,style:null,surfaceScale:jn,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Mn,tabIndex:jn,tableValues:null,target:null,targetX:jn,targetY:jn,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Mn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:jn,underlineThickness:jn,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:jn,values:null,vAlphabetic:jn,vMathematical:jn,vectorEffect:null,vHanging:jn,vIdeographic:jn,version:null,vertAdvY:jn,vertOriginX:jn,vertOriginY:jn,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:jn,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:$n}),qn=Un({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()}),Zn=Un({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Vn}),Qn=Un({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),Kn={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"},Jn=/[A-Z]/g,Yn=/-[a-z]/g,Gn=/^data[-\w.:]+$/i;function Xn(e){return"-"+e.toLowerCase()}function er(e){return e.charAt(1).toUpperCase()}const tr=_n([Bn,Hn,qn,Zn,Qn],"html"),nr=_n([Bn,Wn,qn,Zn,Qn],"svg");var rr,or,ir,ar={};function sr(){if(ir)return ar;ir=1;var e=ar&&ar.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ar,"__esModule",{value:!0}),ar.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(or)return rr;or=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 rr=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),y(),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 b(e){var t=e.exec(s);if(t){var n=t[0];return p(n),s=s.slice(n.length),t}}function y(){b(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 x(){var t=h(),n=b(r);if(n){if(w(),!b(o))return g("property missing ':'");var s=b(i),u=t({type:"declaration",property:c(n[0].replace(e,l)),value:s?c(s[0].replace(e,l)):l});return b(a),u}}return m.prototype.content=s,y(),function(){var e,t=[];for(v(t);e=x();)!1!==e&&(t.push(e),v(t));return t}()}}());return ar}var lr,cr,ur,dr={};function fr(){if(lr)return dr;lr=1,Object.defineProperty(dr,"__esModule",{value:!0}),dr.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 dr.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))},dr}const pr=t(function(){if(ur)return cr;ur=1;var e=(cr&&cr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(sr()),t=fr();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,cr=n}()),hr=gr("end"),mr=gr("start");function gr(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=mr(e),n=hr(e);if(t&&n)return{start:t,end:n}}function yr(e){return e&&"object"==typeof e?"position"in e||"type"in e?wr(e.position):"start"in e||"end"in e?wr(e):"line"in e||"column"in e?vr(e):"":""}function vr(e){return xr(e&&e.line)+":"+xr(e&&e.column)}function wr(e){return vr(e&&e.start)+"-"+vr(e&&e.end)}function xr(e){return e&&"number"==typeof e?e:1}class kr 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=yr(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}}kr.prototype.file="",kr.prototype.name="",kr.prototype.reason="",kr.prototype.message="",kr.prototype.stack="",kr.prototype.column=void 0,kr.prototype.line=void 0,kr.prototype.ancestors=void 0,kr.prototype.cause=void 0,kr.prototype.fatal=void 0,kr.prototype.place=void 0,kr.prototype.ruleId=void 0,kr.prototype.source=void 0;const Sr={}.hasOwnProperty,_r=new Map,Cr=/[A-Z]/g,Er=new Set(["table","tbody","thead","tfoot","tr"]),zr=new Set(["td","th"]),Ar="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Nr(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=mr(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?nr:tr,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},i=Tr(o,e,void 0);return i&&"string"!=typeof i?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function Tr(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=nr,e.schema=o);e.ancestors.push(t);const i=Pr(e,t.tagName,!1),a=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&Sr.call(t.properties,o)){const i=Mr(e,o,t.properties[o]);if(i){const[o,a]=i;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof a&&zr.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=Or(e,t);Er.has(t.tagName)&&(s=s.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&kn(t.value):kn(t));var t}));return jr(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)}Fr(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=nr,e.schema=o);e.ancestors.push(t);const i=null===t.name?e.Fragment:Pr(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];mn(t.type);const o=t.expression;mn(o.type);const i=o.properties[0];mn(i.type),Object.assign(n,e.evaluater.evaluateExpression(i.argument))}else Fr(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];mn(t.type),i=e.evaluater.evaluateExpression(t.expression)}else Fr(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(e,t),s=Or(e,t);return jr(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);Fr(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return Ir(r,Or(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 jr(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 Or(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:_r;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=Tr(e,i,a);void 0!==s&&n.push(s)}return n}function Mr(e,t,n){const r=function(e,t){const n=Cn(t);let r=t,o=En;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&Gn.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Yn,er);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Yn.test(e)){let n=e.replace(Jn,Xn);"-"!==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 pr(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const t=n,r=new kr("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=Ar+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)Sr.call(e,n)&&(t[Lr(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?Kn[r.property]||r.property:r.attribute,n]}}function Pr(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=wn(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=wn(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 Sr.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Fr(e)}function Fr(e,t){const n=new kr("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=Ar+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Lr(e){let t=e.replace(Cr,Rr);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function Rr(e){return"-"+e.toLowerCase()}const Dr={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"]},Ur={};function Br(e,t){return $r(e,"boolean"!=typeof Ur.includeImageAlt||Ur.includeImageAlt,"boolean"!=typeof Ur.includeHtml||Ur.includeHtml)}function $r(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]=$r(e[o],t,n);return r.join("")}const Hr=document.createElement("i");function Wr(e){const t="&"+e+";";Hr.innerHTML=t;const n=Hr.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function qr(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 Zr(e,t){return e.length>0?(qr(e,e.length,0,t),e):t}const Qr={}.hasOwnProperty;function Kr(e){const t={};let n=-1;for(;++n<e.length;)Jr(t,e[n]);return t}function Jr(e,t){let n;for(n in t){const r=(Qr.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){Qr.call(r,i)||(r[i]=[]);const e=o[i];Yr(r[i],Array.isArray(e)?e:e?[e]:[])}}}function Yr(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);qr(e,0,0,r)}function Gr(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 Xr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const eo=po(/[A-Za-z]/),to=po(/[\dA-Za-z]/),no=po(/[#-'*+\--9=?A-Z^-~]/);function ro(e){return null!==e&&(e<32||127===e)}const oo=po(/\d/),io=po(/[\dA-Fa-f]/),ao=po(/[!-/:-@[-`{-~]/);function so(e){return null!==e&&e<-2}function lo(e){return null!==e&&(e<0||32===e)}function co(e){return-2===e||-1===e||32===e}const uo=po(new RegExp("\\p{P}|\\p{S}","u")),fo=po(/\s/);function po(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function ho(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(37===i&&to(e.charCodeAt(n+1))&&to(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 mo(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){if(co(r))return e.enter(n),a(r);return t(r)};function a(r){return co(r)&&i++<o?(e.consume(r),a):(e.exit(n),t(r))}}const go={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"),mo(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)):so(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&&y();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}b(a);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return qr(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(yo,u,d)(o)}function u(e){return r&&y(),b(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(yo,p,h)(n)}function p(e){return a++,n.push([t.currentConstruct,t.containerState]),f(e)}function h(n){return null===n?(r&&y(),b(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),b(0),void e.consume(n)):so(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(b(a),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;qr(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function b(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 y(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},yo={tokenize:function(e,t,n){return mo(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function vo(e){return null===e||lo(e)||fo(e)?1:uo(e)?2:void 0}function wo(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};ko(d,-s),ko(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=Zr(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=Zr(l,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),l=Zr(l,wo(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=Zr(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=Zr(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,qr(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=vo(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=vo(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 ko(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const So={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 eo(t)?(e.consume(t),i):64===t?n(t):l(t)}function i(e){return 43===e||45===e||46===e||to(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||to(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||ro(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):no(t)?(e.consume(t),l):n(t)}function c(e){return to(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||to(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const _o={partial:!0,tokenize:function(e,t,n){return function(t){return co(t)?mo(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||so(e)?t(e):n(e)}}};const Co={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(co(t))return mo(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 co(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const Eo={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 ao(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const zo={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=to,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=io,c):(e.enter("characterReferenceValue"),o=7,i=oo,c(t))}function c(s){if(59===s&&a){const o=e.exit("characterReferenceValue");return i!==to||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 Ao={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)}}},No={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"),co(t)?mo(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"),co(t)?mo(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||so(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"),co(t)?mo(e,c,"whitespace")(t):c(t))}function c(n){return null===n||so(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(Ao,p,y)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||so(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):co(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),mo(e,d,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),u)}function d(t){return null===t||so(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),f(t))}function f(t){return null===t||so(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,y,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return a>0&&co(t)?mo(e,g,"linePrefix",a+1)(t):g(t)}function g(t){return null===t||so(t)?e.check(Ao,p,y)(t):(e.enter("codeFlowValue"),b(t))}function b(t){return null===t||so(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),b)}function y(n){return e.exit("codeFenced"),t(n)}}};const To={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),mo(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):so(t)?e.attempt(jo,i,s)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||so(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),a)}function s(n){return e.exit("codeIndented"),t(n)}}},jo={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):so(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):mo(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):so(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)):so(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||so(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 Oo{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&&Mo(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),Mo(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Mo(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);Mo(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Mo(this.left,t.reverse())}}}function Mo(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 Po(e){const t={};let n,r,o,i,a,s,l,c=-1;const u=new Oo(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,Fo(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 qr(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function Fo(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 Lo={resolve:function(e){return Po(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):so(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"),mo(e,o,"linePrefix")};function o(o){if(null===o||so(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 Do(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||ro(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||so(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&&!lo(o)?u<c&&40===o?(e.consume(o),u++,h):41===o?(e.consume(o),u--,h):null===o||32===o||40===o||ro(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 Uo(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):so(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||so(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!co(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function Bo(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):so(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),mo(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===a||null===t||so(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 $o(e,t){let n;return function r(o){if(so(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if(co(o))return mo(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 Uo.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=Xr(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 lo(t)?$o(e,s)(t):s(t)}function s(t){return Do(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(Ho,c,c)(t)}function c(t){return co(t)?mo(e,u,"whitespace")(t):u(t)}function u(i){return null===i||so(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},Ho={partial:!0,tokenize:function(e,t,n){return function(t){return lo(t)?$o(e,r)(t):n(t)};function r(t){return Bo(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return co(t)?mo(e,i,"whitespace")(t):i(t)}function i(e){return null===e||so(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 so(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const qo={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"},qr(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||lo(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||so(n)?(e.exit("atxHeading"),t(n)):co(n)?mo(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||lo(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),s)}}};const Zo=["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"],Qo=["pre","script","style","textarea"],Ko={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):eo(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):eo(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:E:f):n(o)}function p(t){return eo(t)?(e.consume(t),a=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||lo(s)){const l=47===s,c=a.toLowerCase();return l||i||!Qo.includes(c)?Zo.includes(a.toLowerCase())?(o=6,l?(e.consume(s),m):r.interrupt?t(s):E(s)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):i?g(s):b(s)):(o=1,r.interrupt?t(s):E(s))}return 45===s||to(s)?(e.consume(s),a+=String.fromCharCode(s),h):n(s)}function m(o){return 62===o?(e.consume(o),r.interrupt?t:E):n(o)}function g(t){return co(t)?(e.consume(t),g):_(t)}function b(t){return 47===t?(e.consume(t),_):58===t||95===t||eo(t)?(e.consume(t),y):co(t)?(e.consume(t),b):_(t)}function y(t){return 45===t||46===t||58===t||95===t||to(t)?(e.consume(t),y):v(t)}function v(t){return 61===t?(e.consume(t),w):co(t)?(e.consume(t),v):b(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,x):co(t)?(e.consume(t),w):k(t)}function x(t){return t===l?(e.consume(t),l=null,S):null===t||so(t)?n(t):(e.consume(t),x)}function k(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||lo(t)?v(t):(e.consume(t),k)}function S(e){return 47===e||62===e||co(e)?b(e):n(e)}function _(t){return 62===t?(e.consume(t),C):n(t)}function C(t){return null===t||so(t)?E(t):co(t)?(e.consume(t),C):n(t)}function E(t){return 45===t&&2===o?(e.consume(t),T):60===t&&1===o?(e.consume(t),j):62===t&&4===o?(e.consume(t),P):63===t&&3===o?(e.consume(t),M):93===t&&5===o?(e.consume(t),O):!so(t)||6!==o&&7!==o?null===t||so(t)?(e.exit("htmlFlowData"),z(t)):(e.consume(t),E):(e.exit("htmlFlowData"),e.check(Jo,F,z)(t))}function z(t){return e.check(Yo,A,F)(t)}function A(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),N}function N(t){return null===t||so(t)?z(t):(e.enter("htmlFlowData"),E(t))}function T(t){return 45===t?(e.consume(t),M):E(t)}function j(t){return 47===t?(e.consume(t),a="",I):E(t)}function I(t){if(62===t){const n=a.toLowerCase();return Qo.includes(n)?(e.consume(t),P):E(t)}return eo(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),I):E(t)}function O(t){return 93===t?(e.consume(t),M):E(t)}function M(t){return 62===t?(e.consume(t),P):45===t&&2===o?(e.consume(t),M):E(t)}function P(t){return null===t||so(t)?(e.exit("htmlFlowData"),F(t)):(e.consume(t),P)}function F(n){return e.exit("htmlFlow"),t(n)}}},Jo={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(_o,t,n)}}},Yo={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(so(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 Go={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),y):eo(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):eo(t)?(e.consume(t),b):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):so(t)?(a=u,I(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),f):u(t)}function f(e){return 62===e?j(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):so(t)?(a=h,I(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?j(t):93===t?(e.consume(t),g):h(t)}function b(t){return null===t||62===t?j(t):so(t)?(a=b,I(t)):(e.consume(t),b)}function y(t){return null===t?n(t):63===t?(e.consume(t),v):so(t)?(a=y,I(t)):(e.consume(t),y)}function v(e){return 62===e?j(e):y(e)}function w(t){return eo(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||to(t)?(e.consume(t),x):k(t)}function k(t){return so(t)?(a=k,I(t)):co(t)?(e.consume(t),k):j(t)}function S(t){return 45===t||to(t)?(e.consume(t),S):47===t||62===t||lo(t)?_(t):n(t)}function _(t){return 47===t?(e.consume(t),j):58===t||95===t||eo(t)?(e.consume(t),C):so(t)?(a=_,I(t)):co(t)?(e.consume(t),_):j(t)}function C(t){return 45===t||46===t||58===t||95===t||to(t)?(e.consume(t),C):E(t)}function E(t){return 61===t?(e.consume(t),z):so(t)?(a=E,I(t)):co(t)?(e.consume(t),E):_(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):so(t)?(a=z,I(t)):co(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):so(t)?(a=A,I(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||lo(t)?_(t):(e.consume(t),N)}function T(e){return 47===e||62===e||lo(e)?_(e):n(e)}function j(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function I(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),O}function O(t){return co(t)?mo(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 Xo={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&&qr(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=Zr(i,e.slice(r+1,r+s+3)),i=Zr(i,[["enter",u,t]]),i=Zr(i,wo(t.parser.constructs.insideSpan.null,e.slice(r+s+4,o-3),t)),i=Zr(i,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),i=Zr(i,e.slice(o+1)),i=Zr(i,[["exit",l,t]]),qr(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(Xr(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(ei,c,i?c:u)(t):91===t?e.attempt(ti,c,i?l:u)(t):i?c(t):u(t)}function l(t){return e.attempt(ni,c,u)(t)}function c(e){return t(e)}function u(e){return o._balanced=!0,n(e)}}},ei={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 lo(t)?$o(e,o)(t):o(t)}function o(t){return 41===t?c(t):Do(e,i,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return lo(t)?$o(e,s)(t):c(t)}function a(e){return n(e)}function s(t){return 34===t||39===t||40===t?Bo(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return lo(t)?$o(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)}}},ti={tokenize:function(e,t,n){const r=this;return function(t){return Uo.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(Xr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},ni={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 ri={name:"labelStartImage",resolveAll:Xo.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 oi={name:"labelStartLink",resolveAll:Xo.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 ii={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),mo(e,t,"linePrefix")}}};const ai={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||so(i))?(e.exit("thematicBreak"),t(i)):n(i)}function a(t){return t===r?(e.consume(t),o++,a):(e.exit("thematicBreakSequence"),co(t)?mo(e,i,"whitespace")(t):i(t))}}};const si={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(_o,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,mo(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){if(r.containerState.furtherBlankLines||!co(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(ci,t,o)(n)});function o(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,mo(e,e.attempt(si,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:oo(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(ai,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 oo(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(_o,r.interrupt?n:c,e.attempt(li,d,u))}function c(e){return r.containerState.initialBlankLine=!0,i++,d(e)}function u(t){return co(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)}}},li={partial:!0,tokenize:function(e,t,n){const r=this;return mo(e,function(e){const o=r.events[r.events.length-1];return!co(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},ci={partial:!0,tokenize:function(e,t,n){const r=this;return mo(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 ui={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"),co(t)?mo(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||so(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const di={tokenize:function(e){const t=this,n=e.attempt(_o,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,mo(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Lo,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 fi={resolveAll:gi()},pi=mi("string"),hi=mi("text");function mi(e){return{resolveAll:gi("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 gi(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 yi={42:si,43:si,45:si,48:si,49:si,50:si,51:si,52:si,53:si,54:si,55:si,56:si,57:si,62:Co},vi={91:Vo},wi={[-2]:To,[-1]:To,32:To},xi={35:qo,42:ai,45:[ui,ai],60:Ko,61:ui,95:ai,96:No,126:No},ki={38:zo,92:Eo},Si={[-5]:ii,[-4]:ii,[-3]:ii,33:ri,38:zo,42:xo,60:[So,Go],91:oi,92:[Wo,Eo],93:Xo,95:xo,96:Io},_i={null:[xo,fi]},Ci=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:vi,disable:{null:[]},document:yi,flow:xi,flowInitial:wi,insideSpan:_i,string:ki,text:Si},Symbol.toStringTag,{value:"Module"}));function Ei(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){b(e,t.from)}),check:g(m),consume:function(e){so(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,y()):-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,y()},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=Zr(a,e),p(),null!==a[a.length-1])return[];return b(t,0),c.events=wo(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,y()}}(),d=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return b();return e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,g,b)(n)}}function g(t){return e(d,p),o}function b(e){return p.restore(),++u<a.length?m(a[u]):i}}}function b(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&qr(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function y(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const zi=/[\0\t\n\r]/g;const Ai=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ni(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return Gr(n.slice(t?2:1),t?16:10)}return Wr(n)||e}const Ti={}.hasOwnProperty;function ji(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:C,autolinkEmail:C,atxHeading:i(Y),blockQuote:i(q),characterEscape:C,characterReference:C,codeFenced:i(Z),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(Z,a),codeText:i(Q,a),codeTextData:C,data:C,codeFlowValue:C,definition:i(K),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(J),hardBreakEscape:i(G),hardBreakTrailing:i(G),htmlFlow:i(X,a),htmlFlowData:C,htmlText:i(X,a),htmlTextData:C,image:i(ee),label:a,link:i(te),listItem:i(re),listItemValue:f,listOrdered:i(ne,d),listUnordered:i(ne),paragraph:i(oe),reference:D,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(Y),strong:i(ie),thematicBreak:i(se)},exit:{atxHeading:l(),atxHeadingSequence:x,autolink:l(),autolinkEmail:W,autolinkProtocol:H,blockQuote:l(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:B,characterReferenceMarkerNumeric:B,characterReferenceValue:$,characterReference:V,codeFenced:l(g),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:E,codeIndented:l(b),codeText:l(j),codeTextData:E,data:E,definition:l(),definitionDestinationString:w,definitionLabelString:y,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(A),hardBreakTrailing:l(A),htmlFlow:l(N),htmlFlowData:E,htmlText:l(T),htmlTextData:E,image:l(O),label:P,labelText:M,lineEnding:z,link:l(I),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:U,resourceDestinationString:F,resourceTitleString:L,resource:R,setextHeading:l(_),setextHeadingLineSequence:S,setextHeadingText:k,strong:l(),thematicBreak:l()}};Oi(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]];Ti.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]||Pi).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+"` ("+yr({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]||Pi).call(this,e,r[0])}n.position.end=Ii(e.end)}function u(){return Br(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 b(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function y(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Xr(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 x(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function k(){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 C(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 E(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)&&(C.call(this,e),E.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 j(){const e=this.resume();this.stack[this.stack.length-1].value=e}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 O(){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(Ai,Ni)}(t),n.identifier=Xr(t).toLowerCase()}function P(){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 R(){this.data.inReference=void 0}function D(){this.data.referenceType="collapsed"}function U(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Xr(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=Gr(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=Wr(t)}this.stack[this.stack.length-1].value+=r}function V(e){this.stack.pop().position.end=Ii(e.end)}function H(e){E.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function W(e){E.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function q(){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 J(){return{type:"emphasis",children:[]}}function Y(){return{type:"heading",depth:0,children:[]}}function G(){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(;!Po(e););return e}(function(e){const t={constructs:Kr([Ci,...(e||{}).extensions||[]]),content:n(go),defined:[],document:n(bo),flow:n(di),lazy:{},string:n(pi),text:n(hi)};return t;function n(e){return function(n){return Ei(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(zi.lastIndex=u,l=zi.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 Oi(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Oi(e,r):Mi(e,r)}}function Mi(e,t){let n;for(n in t)if(Ti.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 Pi(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+yr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+yr({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+yr({start:t.start,end:t.end})+") is still open")}function Fi(e){const t=this;t.parser=function(n){return ji(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Li(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 Di(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(Ui(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(Ui(t.slice(o),o>0,!1)),i.join("")}function Ui(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 Bi={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=ho(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 Li(e,t);const o={src:ho(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:ho(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 Li(e,t);const o={href:ho(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:ho(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=mr(t.children[1]),a=hr(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:Di(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:$i,yaml:$i,definition:$i,footnoteDefinition:$i};function $i(){}const Vi="object"==typeof self?self:globalThis,Hi=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:qi}={},{keys:Zi}=Object,Qi=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=qi.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]},Ki=([e,t])=>0===e&&("function"===t||"symbol"===t),Ji=(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]=Qi(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 Zi(r))!e&&Ki(Qi(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||!Ki(Qi(o))&&!Ki(Qi(a)))&&t.push([i(o),i(a)]);return n}case 6:{const t=[],n=o([a,t],r);for(const o of r)!e&&Ki(Qi(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},Yi="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?Hi(Ji(e,t)):structuredClone(e):(e,t)=>Hi(Ji(e,t));function Gi(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 Xi(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const ea=function(e){if(null==e)return na;if("function"==typeof e)return ta(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ea(e[n]);return ta(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 ta(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 ta(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function ta(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 na(){return!0}const ra=[],oa=!0,ia=!1;function aa(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=ea(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=ra;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[oa,e];return null==e?ra:[e]}(n(o,l)),f[0]===ia))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]===ia)return c;u="number"==typeof c[1]?c[1]:u+a}}return f}}(e,void 0,[])()}function sa(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),aa(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 la={}.hasOwnProperty,ca={};function ua(e,t){e.position&&(t.position=br(e))}function da(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,Yi(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function fa(e,t){const n=t.data||{},r=!("value"in t)||la.call(n,"hProperties")||la.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 pa(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 ha(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function ma(e,t){const n=function(e,t){const n=t||ca,r=new Map,o=new Map,i=new Map,a={...Bi,...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=ha(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=ha(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:da,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:function(e,t){const n=e.type,r=s.handlers[n];if(la.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=Yi(n);return r.children=s.all(e),r}return Yi(e)}return(s.options.unknownHandler||fa)(s,e,t)},options:n,patch:ua,wrap:pa};return sa(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||Gi,r=e.options.footnoteBackLabel||Xi,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=ho(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:{...Yi(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 ga(e,t){return e&&"run"in e?async function(n,r){const o=ma(n,{file:r,...t});await e.run(o,r)}:function(n,r){return ma(n,{file:r,...e||t})}}function ba(e){if(e)throw e}var ya,va;var wa=function(){if(va)return ya;va=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 ya=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},ya}();const xa=t(wa);function ka(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 Sa(){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 _a={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 Ea={cwd:function(){return"/"}};function za(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function Aa(e){if("string"==typeof e)e=new URL(e);else if(!za(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 Na=["history","path","basename","stem","extname","dirname"];class Ta{constructor(e){let t;t=e?za(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?"":Ea.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<Na.length;){const e=Na[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)Na.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?_a.basename(this.path):void 0}set basename(e){Ia(e,"basename"),ja(e,"basename"),this.path=_a.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?_a.dirname(this.path):void 0}set dirname(e){Oa(this.basename,"dirname"),this.path=_a.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?_a.extname(this.path):void 0}set extname(e){if(ja(e,"extname"),Oa(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=_a.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){za(e)&&(e=Aa(e)),Ia(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?_a.basename(this.path,this.extname):void 0}set stem(e){Ia(e,"stem"),ja(e,"stem"),this.path=_a.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 kr(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 ja(e,t){if(e&&e.includes(_a.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+_a.sep+"`")}function Ia(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Oa(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const Ma=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},Pa={}.hasOwnProperty;class Fa extends Ma{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=Sa()}copy(){const e=new Fa;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?(Ua("data",this.frozen),this.namespace[e]=t,this):Pa.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Ua("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),Da("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),Da("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,ba(e),t=r}),$a("processSync","process",n),t}run(e,t,n){Ba(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}),$a("runSync","run",r),n}stringify(e,t){this.freeze();const n=Va(t),r=this.compiler||this.Compiler;return Da("stringify",r),Ba(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(Ua("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];ka(a)&&ka(r)&&(r=xa(!0,a,r)),n[o]=[e,r,...i]}}}}const La=(new Fa).freeze();function Ra(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function Da(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ua(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 Ba(e){if(!ka(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function $a(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 Ta(e)}const Ha=[],Wa={allowDangerousHtml:!0},qa=/^(https?|ircs?|mailto|xmpp)$/i,Za=[{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 Qa(e){const t=function(e){const t=e.rehypePlugins||Ha,n=e.remarkPlugins||Ha,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Wa}:Wa,o=La().use(Fi).use(n).use(ga,r).use(t);return o}(e),n=function(e){const t=e.children||"",n=new Ta;"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||Ka;for(const u of Za)Object.hasOwn(t,u.from)&&gn((u.from,u.to&&u.to,u.id));return sa(e,c),Nr(e,{Fragment:A.Fragment,components:o,ignoreInvalidStyle:!0,jsx:A.jsx,jsxs:A.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 Dr)if(Object.hasOwn(Dr,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=Dr[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 Ka(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||qa.test(e.slice(0,t))?e:""}function Ja(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 Ya(e,t,n){const r=ea((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([Ga(e[0]),Xa(e[1])])}return t}(t);let i=-1;for(;++i<o.length;)aa(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 Ga(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 Xa(e){return"function"==typeof e?e:function(){return e}}const es="phrasing",ts=["autolink","link","image","label"];function ns(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function rs(e){this.config.enter.autolinkProtocol.call(this,e)}function os(e){this.config.exit.autolinkProtocol.call(this,e)}function is(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 as(e){this.config.exit.autolinkEmail.call(this,e)}function ss(e){this.exit(e)}function ls(e){Ya(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,cs],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),us]],{ignore:["link","linkReference"]})}function cs(e,t,n,r,o){let i="";if(!ds(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=Ja(e,"(");let i=Ja(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 us(e,t,n,r){return!(!ds(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function ds(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||fo(n)||uo(n))&&(!t||47!==n)}function fs(){this.buffer()}function ps(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function hs(){this.buffer()}function ms(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function gs(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Xr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function bs(e){this.exit(e)}function ys(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Xr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function vs(e){this.exit(e)}function ws(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?Ss:ks)));return s(),a},footnoteReference:ws},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function ks(e,t,n){return 0===t?e:Ss(e,t,n)}function Ss(e,t,n){return(n?"":" ")+e}ws.peek=function(){return"["};const _s=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function Cs(e){this.enter({type:"delete",children:[]},e)}function Es(e){this.exit(e)}function zs(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 As(e){return e.length}function Ns(e){return null==e?"":String(e)}function Ts(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 js(e,t,n){return">"+(n?"":" ")+e}function Is(e,t){return Os(e,t.inConstruct,!0)&&!Os(e,t.notInConstruct,!1)}function Os(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 Ms(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 Ps(e,t,n){return(n?"":" ")+e}function Fs(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 Ls(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Rs(e,t,n){const r=vo(e),o=vo(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 Ds(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=Ls(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)+Ls(d));const p=a.move(o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+l+p}function Us(e){return e.value||""}function Bs(e,t,n,r){const o=Fs(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 $s(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 Hs(e,t){const n=Br(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=Fs(n),i='"'===o?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(Hs(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 qs(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 Zs(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 Qs(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}zs.peek=function(){return"~"},Ds.peek=function(e,t,n){return n.options.emphasis||"*"},Us.peek=function(){return"<"},Bs.peek=function(){return"!"},$s.peek=function(){return"!"},Vs.peek=function(){return"`"},Ws.peek=function(e,t,n){return Hs(e,n)?"<":"["},qs.peek=function(){return"["};const Ks=ea(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Js(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=Ls(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)+Ls(d));const p=a.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+l+p}Js.peek=function(e,t,n){return n.options.strong||"*"};const Ys={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()),js);return o(),a},break:Ms,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,Ps);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=Fs(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:Ds,hardBreak:Ms,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 sa(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,ia}),Boolean((!e.depth||e.depth<3)&&Br(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=Ls(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),s(),c},html:Us,image:Bs,imageReference:$s,inlineCode:Vs,link:Ws,linkReference:qs,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):Zs(n);const s=e.ordered?"."===a?")":".":function(e){const t=Zs(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),Qs(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||Zs(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 Ks(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:Js,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(Qs(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 Gs(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 Xs(e){this.exit(e),this.data.inTable=void 0}function el(e){this.enter({type:"tableRow",children:[]},e)}function tl(e){this.exit(e)}function nl(e){this.enter({type:"tableCell",children:[]},e)}function rl(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,ol));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function ol(e,t){return"|"===t?t:e}function il(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=Ys.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||As,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=Ns(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]=Ts(r[d]);else{const e=Ts(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 al(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function sl(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 ll(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=Ys.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+a})),l}const cl={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},ul={tokenize:function(e,t,n){let r,o,i;return a;function a(t){return 46===t||95===t?e.check(fl,l,s)(t):null===t||lo(t)||fo(t)||45!==t&&uo(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},dl={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(fl,t,i)(a):null===a||lo(a)||fo(a)?t(a):(e.consume(a),o)}function i(t){return 41===t&&r++,e.consume(t),o}},partial:!0},fl={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||lo(a)||fo(a)?t(a):n(a)}function o(e){return null===e||40===e||91===e||lo(e)||fo(e)?t(e):r(e)}function i(e){return eo(e)?a(e):n(e)}function a(t){return 59===t?(e.consume(t),r):eo(t)?(e.consume(t),a):n(t)}},partial:!0},pl={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return to(e)?n(e):t(e)}},partial:!0},hl={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!vl.call(r,r.previous)||Sl(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(cl,e.attempt(ul,e.attempt(dl,o),n),n)(t)};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:vl},ml={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let o="",i=!1;return function(t){if((72===t||104===t)&&wl.call(r,r.previous)&&!Sl(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),a;return n(t)};function a(t){if(eo(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||ro(t)||lo(t)||fo(t)||uo(t)?n(t):e.attempt(ul,e.attempt(dl,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:wl},gl={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let o,i;return function(t){if(!kl(t)||!xl.call(r,r.previous)||Sl(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)};function a(t){return kl(t)?(e.consume(t),a):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(pl,c,l)(t):45===t||95===t||to(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&&eo(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):n(a)}},previous:xl},bl={};let yl=48;for(;yl<123;)bl[yl]=gl,yl++,58===yl?yl=65:91===yl&&(yl=97);function vl(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||lo(e)}function wl(e){return!eo(e)}function xl(e){return!(47===e||kl(e))}function kl(e){return 43===e||45===e||46===e||95===e||to(e)}function Sl(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]=gl,bl[45]=gl,bl[46]=gl,bl[95]=gl,bl[72]=[gl,ml],bl[104]=[gl,ml],bl[87]=[gl,hl],bl[119]=[gl,hl];const _l={tokenize:function(e,t,n){const r=this;return mo(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=Xr(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 El(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 zl(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||lo(s))return n(s);if(93===s){e.exit("chunkString");const i=e.exit("gfmFootnoteCallString");return o.includes(Xr(r.sliceSerialize(i)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return lo(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 Al(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||lo(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return i=Xr(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return lo(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),mo(e,f,"gfmFootnoteDefinitionWhitespace")):n(t)}function f(e){return t(e)}}function Nl(e,t,n){return e.check(_o,t,e.attempt(_l,t,n))}function Tl(e){e.exit("gfmFootnoteDefinition")}function jl(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=vo(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=vo(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&&qr(a,a.length,0,wo(s,e.slice(r+1,n),t)),qr(a,a.length,0,[["exit",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",o,t]]),qr(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 Ol(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 Ml(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):so(t)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):co(t)?mo(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||lo(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,co(t)?mo(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 co(t)?mo(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||so(t)?y(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"),b):(e.exit("tableDelimiterFiller"),b(t))}function b(t){return co(t)?mo(e,y,"whitespace")(t):y(t)}function y(n){return 124===n?f(n):(null===n||so(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"),x(t)}function x(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),x):null===n||so(n)?(e.exit("tableRow"),t(n)):co(n)?mo(e,x,"whitespace")(n):(e.enter("data"),k(n))}function k(t){return null===t||124===t||lo(t)?(e.exit("data"),x(t)):(e.consume(t),92===t?S:k)}function S(t){return 92===t||124===t?(e.consume(t),k):k(t)}}function Pl(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&&(Ll(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=Fl(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=Fl(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=Fl(f,t,l,s,i,o)):0!==c[1]&&(o=Fl(f,t,c,s,i,o)),s=0):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=i)}for(0!==d&&Ll(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=Ol(t.events,i))}return e}function Fl(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 Ll(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 Dl={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 lo(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 so(r)?t(r):co(r)?e.check({tokenize:Ul},t,n)(r):n(r)}}};function Ul(e,t,n){return mo(e,function(e){return null===e?n(e):t(e)},"whitespace")}const Bl={};function $l(e){const t=e||Bl,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return Kr([{text:bl},{document:{91:{name:"gfmFootnoteDefinition",tokenize:Al,continuation:{tokenize:Nl},exit:Tl}},text:{91:{name:"gfmFootnoteCall",tokenize:zl},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Cl,resolveTo:El}}},jl(e),{flow:{null:{name:"table",tokenize:Ml,resolveAll:Pl}}},{text:{91:Dl}}])}(t)),o.push([{transforms:[ls],enter:{literalAutolink:ns,literalAutolinkEmail:rs,literalAutolinkHttp:rs,literalAutolinkWww:rs},exit:{literalAutolink:ss,literalAutolinkEmail:as,literalAutolinkHttp:os,literalAutolinkWww:is}},{enter:{gfmFootnoteCallString:fs,gfmFootnoteCall:ps,gfmFootnoteDefinitionLabelString:hs,gfmFootnoteDefinition:ms},exit:{gfmFootnoteCallString:gs,gfmFootnoteCall:bs,gfmFootnoteDefinitionLabelString:ys,gfmFootnoteDefinition:vs}},{canContainEols:["delete"],enter:{strikethrough:Cs},exit:{strikethrough:Es}},{enter:{table:Gs,tableData:nl,tableHeader:nl,tableRow:el},exit:{codeText:rl,table:Xs,tableData:tl,tableHeader:tl,tableRow:tl}},{exit:{taskListCheckValueChecked:al,taskListCheckValueUnchecked:al,paragraph:sl}}]),i.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:es,notInConstruct:ts},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:es,notInConstruct:ts},{character:":",before:"[ps]",after:"\\/",inConstruct:es,notInConstruct:ts}]},xs(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:_s}],handlers:{delete:zs}},il(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:ll}}]}}(t))}const Vl=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Hl={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 ql(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 Jl(r,t),r}}(e,n);case"doctype":return function(e,t){if(e.schema.allowDoctypes){const e={type:"doctype"};return Jl(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=Zl(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=Ql(e,Yl(i,c),c,t);null==n&&(n=Ql(e,Yl(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 Jl(a,t),a}(e,n);case"root":return function(e,t){const n=Zl(e,t.children),r={type:"root",children:n};return Jl(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 Jl(r,t),r}(0,n)}}}function Zl(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const t=ql(e,r[o]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function Ql(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=Kl(e,t,n,r[o]);"number"!=typeof a&&"string"!=typeof a||i.push(a)}return i}(e,t,n,r):Kl(e,t,n,r):void 0}function Kl(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 Jl(e,t){const n=br(t);t.data&&(e.data=Yi(t.data)),n&&(e.position=n)}function Yl(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 Gl(e){return function(t){const n=function(e,t){let n={type:"root",children:[]};const r=ql({schema:t?{...Hl,...t}:Hl,stack:[]},e);return r&&(Array.isArray(r)?1===r.length?n=r[0]:n.children=r:n=r),n}(t,e);return n}}const Xl=k.lazy(()=>Promise.resolve().then(()=>cb).then(e=>({default:e.AudioPlayer}))),ec=k.lazy(()=>Promise.resolve().then(()=>fb).then(e=>({default:e.Gallery}))),tc=k.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}=P("extracted"),c="user"===e.sender,u="system"===e.type||"system"===e.sender,d=!c&&!u,f=Ft({primaryColor:t}),p=function(){const e=k.useContext(Dt);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=k.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")?A.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"block my-2 no-underline group",children:A.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:[A.jsx("span",{className:"flex-shrink-0 p-2 rounded-full",style:{backgroundColor:`${f}1a`,color:f},children:A.jsx(Y,{size:16,strokeWidth:2.5})}),A.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")}),A.jsx(q,{size:12,className:"text-muted-foreground/40 group-hover:text-primary"})]})}):r?A.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," ",A.jsx(U,{size:14})]}):A.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?A.jsx(k.Suspense,{fallback:A.jsx("div",{className:"my-3 animate-pulse",children:A.jsx("div",{className:"w-full h-48 bg-muted rounded-xl"})}),children:A.jsx(ec,{images:[{src:e,alt:t}],radius:"rounded-xl"})}):null;return u?A.jsx("div",{className:"flex justify-center my-4 animate-in fade-in zoom-in-95 w-full",children:A.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})}):A.jsxs("div",{className:At("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&&A.jsx("div",{className:"w-9 shrink-0 flex flex-col justify-end pb-1",children:a?A.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?A.jsx("img",{src:h,alt:r,className:"h-full w-full object-cover"}):A.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)})}):A.jsx("div",{className:"w-9"})}),A.jsxs("div",{className:At("max-w-[85%] shadow-sm transition-all duration-300 relative",c?"text-primary-foreground":"border",c?At("rounded-[18px]",i&&"rounded-tr-[4px]",!a&&"rounded-br-[4px]",!i&&!a&&"rounded-r-[4px]"):At("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 A.jsx(k.Suspense,{fallback:A.jsxs("div",{className:"flex items-center gap-3 py-1 min-w-[200px] animate-pulse",children:[A.jsx("div",{className:"w-8 h-8 rounded-full bg-muted"}),A.jsx("div",{className:"flex-1 space-y-1",children:A.jsx("div",{className:"h-1 w-full bg-muted rounded-full"})})]}),children:A.jsx(Xl,{url:e.content,isBot:d,primaryColor:t})});case"image":{const t=e;return A.jsx(k.Suspense,{fallback:A.jsx("div",{className:"my-3 animate-pulse",children:A.jsx("div",{className:"w-full h-48 bg-muted rounded-xl"})}),children:A.jsx(ec,{images:[{src:t.imageUrl||t.content,alt:t.altText||"Imagen"}],radius:"rounded-xl"})})}case"location":{const t=e;return A.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 A.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:[A.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:A.jsx(Z,{size:20,strokeWidth:2.5})}),A.jsxs("div",{className:"flex-1 min-w-0",children:[A.jsx("p",{className:"text-sm font-bold truncate",children:t.fileName}),r&&A.jsxs("p",{className:"text-xs opacity-60 mt-0.5",children:[n?.toUpperCase()," • ",r]})]}),A.jsx(W,{size:18,className:"shrink-0 opacity-60 group-hover:opacity-100 transition-opacity"})]})}default:return A.jsx("div",{className:At("prose prose-sm max-w-none break-words leading-relaxed dark:prose-invert",c?"text-primary-foreground prose-p:text-white":"text-foreground"),children:A.jsx(Qa,{remarkPlugins:[$l],rehypePlugins:[[Gl,{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})=>A.jsx("p",{className:"mb-0 last:mb-0",children:e})},children:e.content||""})})}})(),a&&A.jsxs("div",{className:At("flex items-center gap-1 mt-1.5 opacity-50 select-none text-[9px]",c?"justify-end":"justify-start"),children:[A.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&&A.jsx(B,{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)))))))),nc=k.memo(function(){return A.jsx("div",{className:At("flex items-center self-start animate-in fade-in duration-200","max-w-[85%] sm:max-w-[75%]"),children:A.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:A.jsx("div",{className:"flex items-center gap-1.5",children:[0,1,2].map(e=>A.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 rc(e,t){const n=e.getTime()-t.getTime();return Math.floor(n/1e3/60)}function oc(e){return new Intl.DateTimeFormat("es-ES",{hour:"2-digit",minute:"2-digit"}).format(e)}function ic(e){return function(e){const t=new Date;return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}(e)?`Hoy, ${oc(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, ${oc(e)}`:function(e){return new Intl.DateTimeFormat("es-ES",{day:"numeric",month:"long",hour:"2-digit",minute:"2-digit"}).format(e)}(e)}const ac=k.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=k.useRef(null),c=k.useRef(null),[u,d]=k.useState(!1),[f,p]=k.useState(!1),h=Ft({primaryColor:r}),m=e.length>100,g=hn({count:e.length,getScrollElement:()=>c.current,estimateSize:()=>80,overscan:5,enabled:m});k.useEffect(()=>{d(!0)},[]),k.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 b=e=>{const t=new Date(e);return isNaN(t.getTime())?"":ic(t)};return u?m?A.jsxs("div",{ref:c,className:"flex-1 overflow-y-auto scroll-smooth bg-background/50 scrollbar-none",style:{padding:"var(--spacing-5)"},children:[A.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&&rc(new Date(n.timestamp),new Date(c.timestamp))>15,f=c&&c.sender===n.sender&&rc(new Date(n.timestamp),new Date(c.timestamp))<5&&!d,p=u&&u.sender===n.sender&&rc(new Date(u.timestamp),new Date(n.timestamp))<5;return A.jsxs("div",{style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${t.start}px)`},children:[d&&A.jsx("div",{className:"flex justify-center my-8 animate-in fade-in zoom-in-95",children:A.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:b(n.timestamp)})}),A.jsx(tc,{message:n,primaryColor:r,botAvatar:o,botName:i,styles:a,avatars:s,isFirst:!f,isLast:!p})]},t.key)})}),t&&A.jsxs("div",{className:"flex items-end gap-3 mt-4 mb-2 animate-in fade-in slide-in-from-left-4 duration-500",children:[A.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:A.jsxs("div",{className:"flex gap-[2px]",children:[A.jsx("span",{className:"w-1 h-1 bg-primary/50 rounded-full animate-bounce [animation-delay:-0.3s]"}),A.jsx("span",{className:"w-1 h-1 bg-primary/50 rounded-full animate-bounce [animation-delay:-0.15s]"}),A.jsx("span",{className:"w-1 h-1 bg-primary/50 rounded-full animate-bounce"})]})}),A.jsx(nc,{})]})]}):A.jsxs("div",{ref:c,className:"flex-1 overflow-y-auto scroll-smooth p-4 bg-background/50 scrollbar-none",children:[A.jsxs("div",{className:"min-h-full flex flex-col justify-end",children:[0===e.length&&A.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:[A.jsxs("div",{className:"relative h-24 w-24 mb-6",children:[A.jsx("div",{className:"absolute inset-0 bg-primary/20 rounded-full animate-pulse blur-2xl"}),A.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?A.jsx("div",{className:"h-full w-full flex items-center justify-center text-3xl",style:{backgroundColor:h},children:"👋"}):o?A.jsx("img",{src:o,className:"object-cover h-full w-full",alt:i,onError:()=>p(!0)}):A.jsx("div",{className:"h-full w-full flex items-center justify-center text-3xl",style:{backgroundColor:h},children:"👋"})})]}),A.jsxs("div",{className:"space-y-2",children:[A.jsx("h3",{className:"font-black text-xl text-foreground uppercase tracking-tighter italic",children:i}),A.jsxs("p",{className:"text-[12px] font-bold text-muted-foreground italic px-10 leading-relaxed opacity-60",children:['"',n,'"']})]})]}),A.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&&rc(new Date(t.timestamp),new Date(l.timestamp))>15,d=l&&l.sender===t.sender&&rc(new Date(t.timestamp),new Date(l.timestamp))<5&&!u,f=c&&c.sender===t.sender&&rc(new Date(c.timestamp),new Date(t.timestamp))<5;return A.jsxs(S.Fragment,{children:[u&&A.jsx("div",{className:"flex justify-center my-8 animate-in fade-in zoom-in-95",children:A.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:b(t.timestamp)})}),A.jsx(tc,{message:t,primaryColor:r,botAvatar:o,botName:i,styles:a,avatars:s,isFirst:!d,isLast:!f})]},t.id||`msg-${n}`)})}),A.jsx("div",{ref:l,className:"h-6 shrink-0"})]}),t&&A.jsxs("div",{className:"flex items-end gap-3 mt-4 mb-2 animate-in fade-in slide-in-from-left-4 duration-500",children:[A.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:A.jsxs("div",{className:"flex gap-[2px]",children:[A.jsx("span",{className:"w-1 h-1 bg-primary/50 rounded-full animate-bounce [animation-delay:-0.3s]"}),A.jsx("span",{className:"w-1 h-1 bg-primary/50 rounded-full animate-bounce [animation-delay:-0.15s]"}),A.jsx("span",{className:"w-1 h-1 bg-primary/50 rounded-full animate-bounce"})]})}),A.jsx(nc,{})]})]}):A.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}),sc={"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 lc(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=sc[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 cc=1e3,uc={enableImages:!0,enableAudio:!0,enableFiles:!0,enableLocation:!0,allowedFileTypes:["jpg","jpeg","png","webp","gif","pdf","doc","docx","txt","zip"],maxFileSizeMB:10};function dc({isConnected:e,placeholder:t="Escribe un mensaje...",primaryColor:n,mediaConfig:r,onSendMessage:o,onSendAttachment:i,onSendLocation:a,onVoiceCall:s}){const{t:l}=P(),[c,u]=k.useState(""),[d,f]=k.useState(!1),[p,h]=k.useState(!1),[m,g]=k.useState(0),[b,y]=k.useState(null),[v,w]=k.useState(!1),[x,S]=k.useState(!1),_=k.useRef(null),C=k.useRef(null),E=k.useRef(null),z=k.useRef(null),N=k.useRef([]),T=k.useRef(null),j=Ft({primaryColor:n}),I=k.useMemo(()=>({...uc,...r}),[r]),O=k.useMemo(()=>I.enableImages||I.enableAudio||I.enableFiles||I.enableLocation,[I]),M=()=>{const t=c.trim();b?(i?.(b.file,b.type),y(null),u("")):t&&e&&(o(t),u("")),_.current&&(_.current.style.height="40px")},F=async e=>{const t=e.target.files?.[0];if(!t)return;f(!1);const n=await lc(t,{maxSizeMB:I.maxFileSizeMB||10,allowedExtensions:I.allowedFileTypes||["jpg","jpeg","png","webp","gif","pdf","doc","docx","txt","zip"],checkMagicBytes:!0});if(n.valid)if(t.type.startsWith("image/")&&I.enableImages){w(!0);try{const{default:e}=await Promise.resolve().then(()=>Kb),n={maxSizeMB:.8,maxWidthOrHeight:1200,useWebWorker:!0},r=await e(t,n);y({type:"image",file:r,previewUrl:URL.createObjectURL(r)})}catch(r){Ht("Image compression failed:",r),y({type:"image",file:t,previewUrl:URL.createObjectURL(t)})}finally{w(!1)}}else y({type:"file",file:t,previewUrl:""});else alert(n.error||"Archivo no válido")},L=async e=>{if(z.current&&(e||(z.current.onstop=null),z.current.stop(),z.current.stream.getTracks().forEach(e=>e.stop())),T.current&&clearInterval(T.current),h(!1),g(0),e&&N.current.length>0){const e=new Blob(N.current,{type:"audio/webm"}),t=new File([e],`audio-${Date.now()}.webm`,{type:"audio/webm"}),n=await lc(t,{maxSizeMB:10});if(!n.valid)return Ht("Audio validation failed:",n.error),alert(n.error),void(N.current=[]);i?.(t,"audio"),N.current=[]}};return A.jsxs("div",{className:"relative",children:[(b||v)&&A.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:A.jsx("div",{className:"relative w-16 h-16",children:v?A.jsx("div",{className:"w-full h-full flex flex-col items-center justify-center bg-muted rounded-xl",children:A.jsx(J,{className:"animate-spin text-primary h-5 w-5"})}):"image"===b?.type?A.jsxs(A.Fragment,{children:[A.jsx("img",{src:b?.previewUrl,className:"w-full h-full object-cover rounded-xl border",alt:l("preview")}),A.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:A.jsx(de,{size:10,strokeWidth:3})})]}):A.jsxs(A.Fragment,{children:[A.jsxs("div",{className:"w-full h-full flex flex-col items-center justify-center bg-muted rounded-xl border",children:[A.jsx(Z,{className:"text-primary h-6 w-6"}),A.jsx("span",{className:"text-[8px] mt-1 font-bold truncate max-w-[60px]",children:b?.file.name})]}),A.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:A.jsx(de,{size:10,strokeWidth:3})})]})})}),A.jsx("input",{type:"file",accept:"image/*",className:"hidden",ref:E,onChange:F}),A.jsx("input",{type:"file",accept:I.allowedFileTypes?.map(e=>`.${e}`).join(","),className:"hidden",ref:C,onChange:F}),A.jsxs("div",{className:"flex items-center max-w-full",style:{gap:"var(--spacing-3)"},children:[O&&i&&A.jsxs("div",{className:"relative shrink-0",children:[d&&A.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:[I.enableImages&&A.jsxs("button",{onClick:()=>E.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:[A.jsx(K,{size:18,className:"text-blue-500"})," ",l("fotos")]}),I.enableFiles&&A.jsxs("button",{onClick:()=>C.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:[A.jsx(Z,{size:18,className:"text-purple-500"})," Archivos"]}),I.enableLocation&&a&&A.jsxs("button",{onClick:()=>{S(!0),navigator.geolocation.getCurrentPosition(e=>{a?.({latitude:e.coords.latitude,longitude:e.coords.longitude}),S(!1),f(!1)},()=>S(!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:[x?A.jsx(J,{size:18,className:"animate-spin"}):A.jsx(Y,{size:18,className:"text-emerald-500"})," ",l("ubicacion")]}),I.enableVoice&&s&&A.jsxs("button",{onClick:()=>{s?.(),f(!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:[A.jsx(re,{size:18,className:"text-amber-500"})," Llamar"]})]}),A.jsx("button",{onClick:()=>f(!d),className:At("h-10 w-10 rounded-full flex items-center justify-center transition-all shadow-sm z-10",d?"bg-muted text-foreground rotate-45":"bg-muted/50 text-muted-foreground hover:bg-muted"),children:A.jsx(ie,{size:22,strokeWidth:2.5})})]}),A.jsx("div",{className:At("flex-1 relative flex items-center min-w-0 rounded-[24px] border px-4 transition-all shadow-inner",p?"h-[44px]":"min-h-[40px] max-h-[120px]"),style:{backgroundColor:p?"hsl(var(--destructive) / 0.05)":"hsl(var(--muted))",borderColor:p?"hsl(var(--destructive))":"hsl(var(--border))"},children:p?A.jsxs("div",{className:"flex items-center w-full animate-in zoom-in-95",style:{gap:"var(--spacing-4)"},children:[A.jsx("button",{onClick:()=>L(!1),className:"text-destructive/50 hover:text-destructive",children:A.jsx(ce,{size:18})}),A.jsxs("div",{className:"flex-1 flex items-center",style:{gap:"var(--spacing-2)"},children:[A.jsx("div",{className:"flex gap-[3px]",children:[1,2,3,4].map(e=>A.jsx("span",{className:"w-[3px] h-3 bg-destructive/60 rounded-full animate-pulse",style:{animationDelay:.15*e+"s"}},e))}),A.jsxs("span",{className:"text-destructive font-black text-[11px] tabular-nums",children:[Math.floor(m/60),":",(m%60).toString().padStart(2,"0")]})]}),A.jsx("button",{onClick:()=>L(!0),className:"w-7 h-7 rounded-full bg-destructive flex items-center justify-center text-white shadow-lg",children:A.jsx(se,{size:12,fill:"currentColor"})})]}):A.jsxs("div",{className:"w-full relative flex items-center",children:[A.jsx("textarea",{ref:_,rows:1,value:c,onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||e.ctrlKey||e.metaKey?"Enter"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),M()):(e.preventDefault(),M())},onChange:e=>{const t=e.target.value.slice(0,cc);u(t),_.current&&(_.current.style.height="40px",_.current.style.height=`${Math.min(_.current.scrollHeight,120)}px`)},onFocus:()=>f(!1),placeholder:t,"aria-label":l("accessibility.typeMessage"),"aria-describedby":"send-message-hint","aria-invalid":c.length>cc,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))"}}),A.jsx("span",{id:"send-message-hint",className:"sr-only",children:l("accessibility.sendMessageHint")}),c.length>800&&A.jsx("span",{className:At("absolute right-0 text-[9px] font-bold tabular-nums",c.length>=cc?"text-destructive":"text-muted-foreground/40"),children:cc-c.length})]})}),!p&&A.jsx(A.Fragment,{children:c.trim()||b?A.jsx("button",{onClick:M,disabled:!e||v&&!!b,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:j},children:A.jsx(se,{size:18,className:"text-white ml-0.5 fill-current"})}):I.enableAudio&&i?A.jsx("button",{onClick:async()=>{if(e)try{const e=await navigator.mediaDevices.getUserMedia({audio:!0}),t=new MediaRecorder(e);z.current=t,N.current=[],t.ondataavailable=e=>N.current.push(e.data),t.onstop=()=>{const e=new File([new Blob(N.current)],"voice.webm",{type:"audio/webm"});i?.(e,"audio")},t.start(),h(!0),T.current=setInterval(()=>g(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:j},children:A.jsx(ee,{size:20,strokeWidth:2.5,className:"text-white"})}):A.jsx("button",{onClick:M,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:j},children:A.jsx(se,{size:18,className:"text-white ml-0.5 fill-current"})})})]})]})}function fc(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 pc(e=640){const[t,n]=k.useState(()=>"undefined"!=typeof window&&window.innerWidth<e);return k.useEffect(()=>{const t=fc(()=>{n(window.innerWidth<e)},250);return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[e]),t}const hc="24px";const mc={happy:"😊",wink:"😉",thinking:"🤔",sad:"😢",excited:"🤩",love:"❤️",laugh:"😄",surprised:"😲",angry:"😠",confused:"😕",sorry:"😔",default:"💬"},gc={idle:"Llamada de voz",connecting:"Conectando...",listening:"Escuchando...",thinking:"Pensando...",speaking:"Hablando..."};function bc({avatars:e,logoUrl:t,emotion:n,callState:r,audioLevel:o,config:i}){const a=e&&Object.keys(e).length>0,s=!!t,l=k.useMemo(()=>{if(!a&&!s)return null;if(a){return e[n||"default"]||e.default||t||Zt}return t||Zt},[a,s,e,n,t]),c="listening"===r||"speaking"===r,u="speaking"===r?i.speakingColor:"thinking"===r?i.thinkingColor:"listening"===r?i.listeningColor:"#ffffff20",d="speaking"===r?i.speakingScale:"thinking"===r?i.thinkingScale:1,f=i.orbSize;return l?A.jsxs("div",{className:"relative flex flex-col items-center gap-4",children:[A.jsxs("div",{className:At("relative rounded-full flex items-center justify-center","transition-all duration-500 ease-out"),style:{width:`${f}px`,height:`${f}px`,boxShadow:c?`0 0 0 4px ${u}40, 0 0 30px ${u}30, 0 0 60px ${u}15`:`0 0 0 2px ${u}20`,transform:`scale(${d})`},children:[A.jsx("img",{src:l,alt:"Bot avatar",className:At("h-full w-full rounded-full object-cover","transition-all duration-300","thinking"===r&&"opacity-80"),style:{boxShadow:"listening"===r?`0 0 0 2px ${i.listeningColor}80`:"speaking"===r?`0 0 0 2px ${i.speakingColor}80`:"none"}}),i.showEmotionLabel&&n&&A.jsxs("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 px-2 py-0.5 rounded-full bg-black/70 backdrop-blur-sm text-[10px] font-bold text-white whitespace-nowrap",children:[i.showEmojis&&(i.emotionEmojis[n]||"💬")," ",n]})]}),i.showWaveform&&A.jsx(yc,{isActive:c,audioLevel:o,color:u})]}):A.jsxs("div",{className:"relative flex flex-col items-center gap-6",children:[A.jsxs("div",{className:"relative",style:{width:`${f+48}px`,height:`${f+48}px`},children:[A.jsx("div",{className:"absolute inset-0 rounded-full",style:{border:`1.5px solid ${u}20`,animation:c?"spin 8s linear infinite":"none"}}),A.jsx("div",{className:"absolute rounded-full",style:{inset:"12px",border:`1px solid ${u}15`,animation:c?"spin 12s linear infinite reverse":"none"}}),A.jsx("div",{className:"absolute rounded-full flex items-center justify-center",style:{inset:"24px",background:`radial-gradient(circle at 35% 35%, ${u}40, ${u}10 60%, transparent 80%)`,boxShadow:c?`0 0 60px ${u}35, 0 0 120px ${u}15, inset 0 0 40px ${u}10`:`0 0 30px ${u}15`,transform:`scale(${d})`,transition:"all 0.5s cubic-bezier(0.4, 0, 0.2, 1)"},children:A.jsx("div",{className:"rounded-full",style:{width:.35*f+"px",height:.35*f+"px",background:`radial-gradient(circle, ${u}90, ${u}40)`,boxShadow:`0 0 20px ${u}60`,animation:c?"pulse 2s ease-in-out infinite":"none"}})}),c&&[0,1,2].map(e=>A.jsx("div",{className:"absolute rounded-full",style:{width:"4px",height:"4px",backgroundColor:u,opacity:.6,top:"50%",left:"50%",transform:`rotate(${120*e+Date.now()/20%360}deg) translateX(${(f+48)/2}px)`,animation:`spin ${6+2*e}s linear infinite`,boxShadow:`0 0 6px ${u}`}},e))]}),i.showWaveform&&A.jsx(yc,{isActive:c,audioLevel:o,color:u})]})}function yc({isActive:e,audioLevel:t,color:n}){return A.jsx("div",{className:"flex items-center gap-[3px] h-10",children:Array.from({length:12}).map((r,o)=>{const i=Math.abs(o-5.5)/5.5,a=e?Math.max(4,40*t*(1-.5*i)*(.5+.5*Math.sin(Date.now()/100+.8*o))):4;return A.jsx("div",{className:"rounded-full transition-all duration-100",style:{width:"3px",height:`${a}px`,backgroundColor:n,opacity:e?.7-.3*i:.2}},o)})})}function vc({isOpen:e,onClose:t,primaryColor:n="#10b981",getSocket:r,avatars:o,logoUrl:i,voiceConfig:a}){const s=k.useMemo(()=>function(e,t="#10b981"){return{backgroundColor:e?.backgroundColor??"#0a0a0a",listeningColor:e?.listeningColor??"#10b981",speakingColor:e?.speakingColor??t,thinkingColor:e?.thinkingColor??"#a855f7",showEmojis:e?.showEmojis??!0,showEmotionLabel:e?.showEmotionLabel??!0,showWaveform:e?.showWaveform??!0,showBadge:e?.showBadge??!1,badgeText:e?.badgeText??"",emotionEmojis:{...mc,...e?.emotionEmojis},statusLabels:{...gc,...e?.statusLabels},orbSize:e?.orbSize??128,speakingScale:e?.speakingScale??1.08,thinkingScale:e?.thinkingScale??.95}}(a,n),[a,n]),[l,c]=k.useState("idle"),[u,d]=k.useState(0),[f,p]=k.useState(!1),[h,m]=k.useState(0),[g,b]=k.useState(null),[y,v]=k.useState([]),w=k.useRef(null),x=k.useRef(null),S=k.useRef(null),_=k.useRef(null),C=k.useRef(null),E=k.useRef(0),z=k.useRef(!1),N=k.useRef(null),T=k.useRef(null),j=k.useRef(null),I=k.useRef([]),O=k.useRef(!1),M=k.useCallback(e=>`${Math.floor(e/60)}:${(e%60).toString().padStart(2,"0")}`,[]),P=k.useCallback(()=>{if(0===I.current.length)return O.current=!1,void c(e=>"speaking"===e?"listening":e);O.current=!0,c("speaking"),j.current&&"closed"!==j.current.state||(j.current=new AudioContext({sampleRate:24e3}));const e=j.current,t=I.current.shift(),n=e.createBuffer(1,t.length,24e3);n.getChannelData(0).set(t);const r=e.createBufferSource();r.buffer=n,r.connect(e.destination),r.onended=()=>P(),r.start()},[]),F=k.useRef({}),L=k.useCallback(()=>{const e=r?.();if(!e||z.current)return;const t=()=>{c("listening")},n=e=>{if(!e?.data)return;const t=function(e){const t=atob(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);const r=new Int16Array(n.buffer),o=new Float32Array(r.length);for(let i=0;i<r.length;i++)o[i]=r[i]/32768;return o}(e.data);I.current.push(t),O.current||P()},o=()=>{I.current.length=0,O.current=!1,c("listening")},i=()=>{},a=e=>{console.error("[VoiceCall] Voice error:",e)},s=e=>{e?.emotion&&(b(e.emotion),setTimeout(()=>b(t=>t===e.emotion?null:t),4e3))},l=e=>{e?.text&&v(t=>{if(t.length>0&&"user"===t[t.length-1].role){const n=[...t];return n[n.length-1]={...n[n.length-1],text:n[n.length-1].text+e.text},n}return[...t,{role:"user",text:e.text}]})},u=e=>{e?.text&&v(t=>{if(t.length>0&&"bot"===t[t.length-1].role){const n=[...t];return n[n.length-1]={...n[n.length-1],text:n[n.length-1].text+e.text},n}return[...t,{role:"bot",text:e.text}]})},d=()=>{c("thinking")};F.current={voiceReady:t,voiceAudioChunk:n,voiceInterrupted:o,voiceTurnComplete:i,voiceError:a,voiceEmotion:s,voiceUserTranscript:l,voiceModelTranscript:u,voiceModelThinking:d},e.on("voice_ready",t),e.on("voice_audio_chunk",n),e.on("voice_interrupted",o),e.on("voice_turn_complete",i),e.on("voice_error",a),e.on("voice_emotion",s),e.on("voice_user_transcript",l),e.on("voice_model_transcript",u),e.on("voice_model_thinking",d),z.current=!0},[r,P]),R=k.useCallback(()=>{const e=r?.();if(!e||!z.current)return;const t=F.current;t.voiceReady&&e.off("voice_ready",t.voiceReady),t.voiceAudioChunk&&e.off("voice_audio_chunk",t.voiceAudioChunk),t.voiceInterrupted&&e.off("voice_interrupted",t.voiceInterrupted),t.voiceTurnComplete&&e.off("voice_turn_complete",t.voiceTurnComplete),t.voiceError&&e.off("voice_error",t.voiceError),t.voiceEmotion&&e.off("voice_emotion",t.voiceEmotion),t.voiceUserTranscript&&e.off("voice_user_transcript",t.voiceUserTranscript),t.voiceModelTranscript&&e.off("voice_model_transcript",t.voiceModelTranscript),t.voiceModelThinking&&e.off("voice_model_thinking",t.voiceModelThinking),F.current={},z.current=!1},[r]),D=k.useCallback(async()=>{const e=r?.();if(!e)return;const t=await navigator.mediaDevices.getUserMedia({audio:{sampleRate:16e3,channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});S.current=t;const n=new AudioContext({sampleRate:16e3});_.current=n;const o=n.createMediaStreamSource(t),i=n.createAnalyser();if(i.fftSize=256,o.connect(i),x.current=i,!N.current){const e=new Blob(["\nclass VoicePCMProcessor extends AudioWorkletProcessor {\n constructor() {\n super();\n this.buffer = new Float32Array(1600); // 100ms at 16kHz\n this.bufferIndex = 0;\n }\n process(inputs) {\n const input = inputs[0]?.[0];\n if (!input) return true;\n for (let i = 0; i < input.length; i++) {\n this.buffer[this.bufferIndex++] = input[i];\n if (this.bufferIndex >= 1600) {\n // Convert Float32 → Int16 PCM\n const int16 = new Int16Array(1600);\n for (let j = 0; j < 1600; j++) {\n const s = Math.max(-1, Math.min(1, this.buffer[j]));\n int16[j] = s < 0 ? s * 0x8000 : s * 0x7FFF;\n }\n this.port.postMessage(int16.buffer, [int16.buffer]);\n this.buffer = new Float32Array(1600);\n this.bufferIndex = 0;\n }\n }\n return true;\n }\n}\nregisterProcessor('voice-pcm-processor', VoicePCMProcessor);\n"],{type:"application/javascript"});N.current=URL.createObjectURL(e)}await n.audioWorklet.addModule(N.current);const a=new AudioWorkletNode(n,"voice-pcm-processor");C.current=a,a.port.onmessage=t=>{if(e.connected&&!f){const n=function(e){const t=new Uint8Array(e);let n="";for(let r=0;r<t.byteLength;r++)n+=String.fromCharCode(t[r]);return btoa(n)}(t.data);e.emit("voice_audio_chunk",{data:n})}},o.connect(a);const s=()=>{if(!x.current)return;const e=new Uint8Array(x.current.frequencyBinCount);x.current.getByteFrequencyData(e);const t=e.reduce((e,t)=>e+t,0)/e.length;m(t/255),E.current=requestAnimationFrame(s)};s()},[r,f]),U=k.useCallback(()=>{cancelAnimationFrame(E.current),C.current?.disconnect(),C.current=null,S.current?.getTracks().forEach(e=>e.stop()),S.current=null,_.current?.close(),_.current=null,x.current=null,m(0)},[]),B=k.useCallback(async()=>{const e=r?.();if(e?.connected){c("connecting"),d(0),v([]),b(null),I.current=[],L();try{await D()}catch(t){return console.error("[VoiceCall] Mic error:",t),void c("idle")}e.emit("voice_start",{language:"es-AR",voice:"Kore"}),w.current=setInterval(()=>{d(e=>e+1)},1e3)}else console.error("[VoiceCall] Socket not connected")},[r,L,D]),$=k.useCallback(()=>{U(),I.current=[],O.current=!1,j.current?.close(),j.current=null,w.current&&(clearInterval(w.current),w.current=null);const e=r?.();e?.connected&&e.emit("voice_stop"),R(),c("idle"),m(0),d(0),p(!1),t()},[r,U,R,t]),V=k.useCallback(()=>{p(e=>!e)},[]);if(k.useEffect(()=>{e&&"idle"===l&&B()},[e]),k.useEffect(()=>()=>{U(),w.current&&clearInterval(w.current),R()},[]),!e)return null;const H="speaking"===l?s.speakingColor:"thinking"===l?s.thinkingColor:"listening"===l?s.listeningColor:n;return A.jsxs("div",{className:At("absolute inset-0 z-50 flex flex-col overflow-hidden","animate-in fade-in duration-300"),style:{backgroundColor:"#0a0a0f",borderRadius:"inherit"},children:[A.jsxs("div",{className:"absolute inset-0 pointer-events-none",style:{overflow:"hidden"},children:[A.jsx("div",{className:"absolute rounded-full",style:{width:"300px",height:"300px",top:"-80px",right:"-60px",background:`radial-gradient(circle, ${H}18 0%, transparent 70%)`,transition:"background 1.5s ease",filter:"blur(40px)"}}),A.jsx("div",{className:"absolute rounded-full",style:{width:"250px",height:"250px",bottom:"-40px",left:"-50px",background:`radial-gradient(circle, ${s.thinkingColor}12 0%, transparent 70%)`,filter:"blur(50px)"}}),A.jsx("div",{className:"absolute rounded-full",style:{width:"200px",height:"200px",top:"40%",left:"50%",transform:"translateX(-50%)",background:`radial-gradient(circle, ${H}10 0%, transparent 70%)`,transition:"background 1.5s ease",filter:"blur(60px)"}})]}),A.jsxs("div",{className:"relative flex items-center justify-between",style:{background:"rgba(255,255,255,0.03)",borderBottom:"1px solid rgba(255,255,255,0.06)",padding:"16px 24px",paddingTop:"20px"},children:[A.jsxs("div",{className:"flex items-center gap-3",children:[A.jsx("div",{className:"relative",children:A.jsx("div",{className:"h-2.5 w-2.5 rounded-full",style:{backgroundColor:H,boxShadow:`0 0 8px ${H}80`,animation:"idle"!==l?"pulse 2s ease-in-out infinite":"none"}})}),A.jsx("span",{style:{color:"rgba(255,255,255,0.8)",fontSize:"13px",fontWeight:500,letterSpacing:"-0.01em"},children:s.statusLabels[l]||l})]}),A.jsxs("div",{className:"flex items-center gap-3",children:[s.showEmotionLabel&&g&&A.jsxs("span",{style:{fontSize:"11px",padding:"2px 10px",borderRadius:"20px",background:`${H}15`,border:`1px solid ${H}25`,color:H,fontWeight:600},children:[s.showEmojis&&(s.emotionEmojis[g]||"💬")," ",g]}),A.jsx("span",{style:{fontSize:"13px",fontFamily:"ui-monospace, monospace",color:"rgba(255,255,255,0.4)",fontVariantNumeric:"tabular-nums"},children:M(u)})]})]}),s.showBadge&&s.badgeText&&A.jsx("div",{style:{display:"flex",justifyContent:"center",padding:"8px 0"},children:A.jsx("span",{style:{padding:"4px 14px",borderRadius:"20px",fontSize:"11px",fontWeight:700,background:`linear-gradient(135deg, ${n}, ${s.thinkingColor})`,color:"white"},children:s.badgeText})}),A.jsx("div",{className:"relative flex-1 overflow-y-auto px-5 py-4",style:{scrollbarWidth:"none"},children:0===y.length?A.jsx("div",{className:"flex flex-col items-center justify-center h-full gap-4",children:A.jsx(bc,{avatars:o,logoUrl:i,emotion:g,callState:l,audioLevel:h,config:s})}):A.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[y.map((e,t)=>{return A.jsx("div",{style:{maxWidth:"85%",padding:"10px 14px",borderRadius:"user"===e.role?"16px 16px 4px 16px":"16px 16px 16px 4px",fontSize:"13.5px",lineHeight:1.5,color:"white",marginLeft:"user"===e.role?"auto":"0",marginRight:"user"===e.role?"0":"auto",backgroundColor:"user"===e.role?"rgba(255,255,255,0.08)":`${n}25`,backdropFilter:"blur(8px)",border:"user"===e.role?"1px solid rgba(255,255,255,0.08)":`1px solid ${n}20`},dangerouslySetInnerHTML:{__html:(r=e.text,r.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>").replace(/\*([^*]+)\*/g,"<em>$1</em>").replace(/`([^`]+)`/g,'<code style="background:rgba(255,255,255,0.1);padding:0 4px;border-radius:3px">$1</code>').replace(/\n/g,"<br>"))}},t);var r}),A.jsx("div",{ref:T})]})}),A.jsx("div",{style:{textAlign:"center",paddingBottom:"12px"},children:A.jsx("span",{style:{display:"inline-flex",alignItems:"center",gap:"6px",padding:"4px 16px",borderRadius:"20px",fontSize:"11px",fontWeight:500,color:"rgba(255,255,255,0.35)",background:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.06)",letterSpacing:"0.02em"},children:f?A.jsxs(A.Fragment,{children:[A.jsx(X,{style:{width:"12px",height:"12px"}})," Micrófono silenciado"]}):"thinking"===l?"Procesando...":"speaking"===l?A.jsxs(A.Fragment,{children:[A.jsx(ue,{style:{width:"12px",height:"12px"}})," Respuesta de voz"]}):"Habla cuando quieras"})}),A.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"20px",paddingBottom:"28px",paddingTop:"8px"},children:[A.jsx("button",{onClick:V,style:{width:"52px",height:"52px",borderRadius:"50%",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s",backgroundColor:f?"rgba(239,68,68,0.15)":"rgba(255,255,255,0.08)",color:f?"#f87171":"rgba(255,255,255,0.7)",backdropFilter:"blur(12px)",border:"1px solid "+(f?"rgba(239,68,68,0.2)":"rgba(255,255,255,0.08)")},"aria-label":f?"Activar micrófono":"Silenciar micrófono",children:f?A.jsx(X,{style:{width:"22px",height:"22px"}}):A.jsx(ee,{style:{width:"22px",height:"22px"}})}),A.jsx("button",{onClick:$,style:{width:"64px",height:"64px",borderRadius:"50%",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#ef4444",color:"white",boxShadow:"0 4px 24px rgba(239,68,68,0.4), 0 0 0 4px rgba(239,68,68,0.1)",transition:"all 0.2s"},"aria-label":"Finalizar llamada",children:A.jsx(ne,{style:{width:"26px",height:"26px"}})}),A.jsx("div",{style:{width:"52px",height:"52px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"speaking"===l?`${s.listeningColor}15`:"rgba(255,255,255,0.08)",color:"speaking"===l?s.listeningColor:"rgba(255,255,255,0.5)",border:"1px solid "+("speaking"===l?`${s.listeningColor}25`:"rgba(255,255,255,0.08)"),transition:"all 0.3s"},children:A.jsx(ue,{style:{width:"22px",height:"22px"}})})]}),A.jsx("style",{children:"\n @keyframes spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n @keyframes pulse {\n 0%, 100% { opacity: 1; transform: scale(1); }\n 50% { opacity: 0.7; transform: scale(0.95); }\n }\n "})]})}function wc({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,getSocket:g,theme:b}){const[y,v]=k.useState(!1),[w,x]=k.useState(!1),{t:S}=P(),_=pc(),C=Ft({primaryColor:l}),E=function({isOpen:e,height:t,bottom:n}){const r=pc(),[o,i]=k.useState({}),a=k.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||hc)||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||hc})}else{const e=Math.min(700,Math.max(500,r));i({height:`${e}px`,maxHeight:`${r}px`,bottom:n||hc})}}},[r,t,n]);return k.useEffect(()=>{if(!e)return;const t=a();return window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a),t&&t()}},[e,a]),o}({isOpen:e,height:b?.height,bottom:b?.bottom}),z=function({enabled:e,returnFocusRef:t,onEscape:n}){const r=k.useRef(null),o=k.useRef(null);return k.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(k.useEffect(()=>{if(e)return _&&(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,_]),!e)return null;const N="bottom-left"===b?.position;return A.jsxs(A.Fragment,{children:[A.jsx("div",{id:"chat-window-description",className:"sr-only",children:S("accessibility.dialogDescription")}),A.jsxs("div",{ref:z,role:"dialog","aria-modal":"true","aria-labelledby":"chat-window-title","aria-describedby":"chat-window-description",tabIndex:-1,className:At("flex flex-col overflow-hidden transition-all duration-500 ease-[cubic-bezier(0.16,1,0.3,1)]","text-foreground z-[9999]",!_&&["fixed",N?"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"],_&&["fixed inset-0 w-full"]),style:{...E,backgroundColor:"hsl(var(--background))",borderColor:"hsl(var(--border))",color:"hsl(var(--foreground))"},children:[A.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:A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsxs("div",{className:"flex items-center gap-3",children:[A.jsxs("div",{className:"relative",children:[A.jsx("div",{className:"h-10 w-10 rounded-2xl overflow-hidden bg-primary/10 border-2 border-background shadow-soft-sm",children:y?A.jsx("div",{className:"h-full w-full flex items-center justify-center bg-muted text-muted-foreground",children:A.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.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"})})}):A.jsx("img",{src:i||Zt,alt:o,className:"h-full w-full object-cover",onError:()=>v(!0)})}),A.jsx("div",{className:At("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")})]}),A.jsxs("div",{className:"flex flex-col",children:[A.jsxs("div",{className:"flex items-center gap-1",children:[A.jsx("span",{id:"chat-window-title",className:"font-black text-xs uppercase tracking-tight text-foreground",children:o}),A.jsx(le,{className:"h-3 w-3 text-primary fill-primary/10"})]}),A.jsxs("div",{id:"chat-window-description",className:"flex items-center gap-1.5 mt-0.5",children:[A.jsx("span",{className:"flex h-1 w-1 rounded-full bg-emerald-500"}),A.jsx("span",{className:"text-[9px] font-black text-muted-foreground uppercase tracking-[0.1em]",children:S(t?"online":"offline")})]})]})]}),A.jsxs("div",{className:"flex items-center gap-2",children:[c?.enableVoice&&A.jsx("button",{onClick:()=>x(!0),"aria-label":"Iniciar llamada de voz",title:"Llamar",className:"h-8 w-8 flex items-center justify-center rounded-full bg-emerald-500/10 hover:bg-emerald-500/20 text-emerald-600 transition-all active:scale-90 focus:outline-none focus:ring-2 focus:ring-emerald-500 focus:ring-offset-2",children:A.jsx(re,{className:"h-4 w-4","aria-hidden":"true"})}),A.jsx("button",{onClick:u,"aria-label":S("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:A.jsx(de,{className:"h-4 w-4","aria-hidden":"true"})})]})]})}),A.jsxs("main",{role:"region","aria-label":S("accessibility.chatMessages"),className:"flex-1 min-h-0 relative flex flex-col",style:{padding:"var(--spacing-5)",backgroundColor:"hsl(var(--muted))"},children:[A.jsx(ac,{messages:r,isTyping:n,welcomeMessage:a,primaryColor:l,logoUrl:i,botName:o,bubbleStyles:f,avatars:p}),A.jsx("div",{className:"absolute top-0 left-0 right-0 h-6 bg-gradient-to-b from-background/10 to-transparent pointer-events-none"})]}),A.jsxs("footer",{className:"border-t",style:{paddingTop:"var(--spacing-5)",paddingLeft:"var(--spacing-5)",paddingRight:"var(--spacing-5)",paddingBottom:_?"max(var(--spacing-3), env(safe-area-inset-bottom))":"var(--spacing-3)",backgroundColor:"hsl(var(--background))",borderColor:"hsl(var(--border))"},children:[A.jsx(dc,{isConnected:t,placeholder:s,primaryColor:C,mediaConfig:c,onSendMessage:d,onSendAttachment:h,onSendLocation:m,onVoiceCall:c?.enableVoice?()=>x(!0):void 0}),A.jsxs("div",{className:"flex items-center justify-center gap-1 opacity-25 select-none",style:{marginTop:"var(--spacing-2)",paddingBottom:"var(--spacing-1)"},children:[A.jsx(Q,{className:"h-2 w-2 text-primary fill-primary"}),A.jsx("span",{className:"text-[7px] font-bold uppercase tracking-[0.2em]",children:S("con_amor_paseo_libre")})]})]}),A.jsx(vc,{isOpen:w,onClose:()=>x(!1),primaryColor:C,avatars:p,logoUrl:i,getSocket:g})]})]})}class xc extends k.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){Ht("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:A.jsxs("div",{className:"flex flex-col items-center justify-center p-8 bg-background text-center",children:[A.jsx("div",{className:"text-6xl mb-4",children:"⚠️"}),A.jsx("h2",{className:"text-xl font-bold text-foreground mb-2",children:"Algo salió mal"}),A.jsx("p",{className:"text-sm text-muted-foreground mb-6 max-w-md",children:this.state.error?.message||"Ocurrió un error inesperado"}),A.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 kc={bubble:"rounded-2xl",image:"rounded-xl",button:"rounded-xl",card:"rounded-2xl"},Sc={bg:"bg-muted/50 dark:bg-muted/20",text:"text-foreground",border:"border-border/50"},_c={text:"text-primary-foreground"};function Cc(e,t){const n=function(){const[e,t]=k.useState(()=>"undefined"!=typeof window&&(window.matchMedia("(prefers-contrast: high)").matches||window.matchMedia("(prefers-contrast: more)").matches));return k.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=k.useMemo(()=>{const r=function(e,t){const n={...Nt,...t?.cssVariables||{},...e?.cssVariables||{}};return{primaryColor:e?.primaryColor||t?.primaryColor||Tt,botName:e?.botName||t?.botName||jt,logoUrl:e?.logoUrl||t?.logoUrl||It,position:e?.position||t?.position||Ot,welcomeMessage:e?.welcomeMessage||t?.welcomeMessage||Mt,inputPlaceholder:e?.inputPlaceholder||t?.inputPlaceholder||Pt,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=k.useMemo(()=>({radius:{...kc,...e?.bubbleStyles?.radius},bot:{...Sc,...e?.bubbleStyles?.bot},user:{..._c,...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:"24px",width:t&&e?"100%":"auto",height:t&&e?"100%":"auto"})}}const Ec=(e,t)=>t.some(t=>e instanceof t);let zc,Ac;const Nc=new WeakMap,Tc=new WeakMap,jc=new WeakMap;let Ic={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return Nc.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Fc(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function Oc(e){Ic=e(Ic)}function Mc(e){return(Ac||(Ac=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(Lc(this),t),Fc(this.request)}:function(...t){return Fc(e.apply(Lc(this),t))}}function Pc(e){return"function"==typeof e?Mc(e):(e instanceof IDBTransaction&&function(e){if(Nc.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)});Nc.set(e,t)}(e),Ec(e,zc||(zc=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,Ic):e)}function Fc(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(Fc(e.result)),r()},i=()=>{n(e.error),r()};e.addEventListener("success",o),e.addEventListener("error",i)});return jc.set(t,e),t}(e);if(Tc.has(e))return Tc.get(e);const t=Pc(e);return t!==e&&(Tc.set(e,t),jc.set(t,e)),t}const Lc=e=>jc.get(e);const Rc=["get","getKey","getAll","getAllKeys","count"],Dc=["put","add","delete","clear"],Uc=new Map;function Bc(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(Uc.get(t))return Uc.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=Dc.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!o&&!Rc.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 Uc.set(t,i),i}Oc(e=>({...e,get:(t,n,r)=>Bc(t,n)||e.get(t,n,r),has:(t,n)=>!!Bc(t,n)||e.has(t,n)}));const $c=["continue","continuePrimaryKey","advance"],Vc={},Hc=new WeakMap,Wc=new WeakMap,qc={get(e,t){if(!$c.includes(t))return e[t];let n=Vc[t];return n||(n=Vc[t]=function(...e){Hc.set(this,Wc.get(this)[t](...e))}),n}};async function*Zc(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;const n=new Proxy(t,qc);for(Wc.set(n,t),jc.set(n,Lc(t));t;)yield n,t=await(Hc.get(n)||t.continue()),Hc.delete(n)}function Qc(e,t){return t===Symbol.asyncIterator&&Ec(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&Ec(e,[IDBIndex,IDBObjectStore])}Oc(e=>({...e,get:(t,n,r)=>Qc(t,n)?Zc:e.get(t,n,r),has:(t,n)=>Qc(t,n)||e.has(t,n)}));const Kc=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=Fc(a);return r&&a.addEventListener("upgradeneeded",e=>{r(Fc(a.result),e.oldVersion,e.newVersion,Fc(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")}}),qt("IndexedDB initialized")}catch(e){throw Ht("Failed to initialize IndexedDB:",e),e}}async saveMessage(e){this.db||await this.init();try{await this.db.put("messages",e)}catch(t){Ht("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){Ht("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 Ht("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 Ht("Failed to get message:",t)}}async deleteMessage(e){this.db||await this.init();try{await this.db.delete("messages",e)}catch(t){Ht("Failed to delete message:",t)}}async clearMessages(){this.db||await this.init();try{await this.db.clear("messages"),qt("Messages cleared from IndexedDB")}catch(e){Ht("Failed to clear messages:",e)}}async setMetadata(e){this.db||await this.init();try{await this.db.put("metadata",e,"chat-metadata")}catch(t){Ht("Failed to set metadata:",t)}}async getMetadata(){this.db||await this.init();try{return await this.db.get("metadata","chat-metadata")}catch(e){return Ht("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")]),qt("All data cleared from IndexedDB")}catch(e){Ht("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),qt(`Migrated ${e.length} messages from localStorage`)}n.sessionId&&await this.setMetadata({sessionId:n.sessionId}),localStorage.removeItem(e),qt("Migration from localStorage completed")}catch(e){Ht("Failed to migrate from localStorage:",e)}}},Jc="botuyo_chat_v1",Yc={isOpen:!1,isConnected:!1,isTyping:!1,messages:[],error:null,sessionId:null};function Gc(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{...Yc,isOpen:e.isOpen};case"RESTORE_SESSION":return{...e,...t.payload,isConnected:!1,isTyping:!1,error:null};default:return e}}function Xc(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 eu extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class tu extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const nu={};function ru(e){return nu}function ou(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 iu(e,t){return"bigint"==typeof t?t.toString():t}function au(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function su(e){return null==e}function lu(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const cu=Symbol("evaluating");function uu(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==cu)return void 0===r&&(r=cu,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function du(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function fu(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function pu(e){return JSON.stringify(e)}const hu="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function mu(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const gu=au(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function bu(e){if(!1===mu(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!==mu(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function yu(e){return bu(e)?{...e}:Array.isArray(e)?[...e]:e}const vu=new Set(["string","number","symbol"]);function wu(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function xu(e,t,n){const r=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(r._zod.parent=e),r}function ku(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 Su={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 _u(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 Cu(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Eu(e){return"string"==typeof e?e:e?.message}function zu(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=Eu(e.inst?._zod.def?.error?.(e))??Eu(t?.error?.(e))??Eu(n.customError?.(e))??Eu(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Au(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function Nu(...e){const[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}const Tu=(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,iu,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ju=Xc("$ZodError",Tu),Iu=Xc("$ZodError",Tu,{Parent:Error});const Ou=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 eu;if(a.issues.length){const t=new(o?.Err??e)(a.issues.map(e=>zu(e,i,ru())));throw hu(t,o?.callee),t}return a.value},Mu=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=>zu(e,i,ru())));throw hu(t,o?.callee),t}return a.value},Pu=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 eu;return i.issues.length?{success:!1,error:new(e??ju)(i.issues.map(e=>zu(e,o,ru())))}:{success:!0,data:i.value}},Fu=Pu(Iu),Lu=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=>zu(e,o,ru())))}:{success:!0,data:i.value}},Ru=Lu(Iu),Du=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 Mu(e)(t,n,o)},$u=e=>async(t,n,r)=>Mu(e)(t,n,r),Vu=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Pu(e)(t,n,o)},Hu=e=>(t,n,r)=>Pu(e)(t,n,r),Wu=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Lu(e)(t,n,o)},qu=e=>async(t,n,r)=>Lu(e)(t,n,r),Zu=/^[cC][^\s-]{8,}$/,Qu=/^[0-9a-z]+$/,Ku=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ju=/^[0-9a-vA-V]{20}$/,Yu=/^[A-Za-z0-9]{27}$/,Gu=/^[a-zA-Z0-9_-]{21}$/,Xu=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ed=/^([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})$/,td=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)$/,nd=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;const rd=/^(?:(?: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])$/,od=/^(([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}|:))$/,id=/^((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])$/,ad=/^(([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])$/,sd=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ld=/^[A-Za-z0-9_-]*$/,cd=/^\+[1-9]\d{6,14}$/,ud="(?:(?:\\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])))",dd=new RegExp(`^${ud}$`);function fd(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 pd=/^-?\d+$/,hd=/^-?\d+(?:\.\d+)?$/,md=/^[^A-Z]*$/,gd=/^[^a-z]*$/,bd=Xc("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),yd={number:"number",bigint:"bigint",object:"date"},vd=Xc("$ZodCheckLessThan",(e,t)=>{bd.init(e,t);const n=yd[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})}}),wd=Xc("$ZodCheckGreaterThan",(e,t)=>{bd.init(e,t);const n=yd[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})}}),xd=Xc("$ZodCheckMultipleOf",(e,t)=>{bd.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})}}),kd=Xc("$ZodCheckNumberFormat",(e,t)=>{bd.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,i]=Su[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=pd)}),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})}}),Sd=Xc("$ZodCheckMaxLength",(e,t)=>{var n;bd.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!su(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=Au(r);n.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),_d=Xc("$ZodCheckMinLength",(e,t)=>{var n;bd.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!su(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=Au(r);n.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Cd=Xc("$ZodCheckLengthEquals",(e,t)=>{var n;bd.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!su(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=Au(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})}}),Ed=Xc("$ZodCheckStringFormat",(e,t)=>{var n,r;bd.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=()=>{})}),zd=Xc("$ZodCheckRegex",(e,t)=>{Ed.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})}}),Ad=Xc("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=md),Ed.init(e,t)}),Nd=Xc("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=gd),Ed.init(e,t)}),Td=Xc("$ZodCheckIncludes",(e,t)=>{bd.init(e,t);const n=wu(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})}}),jd=Xc("$ZodCheckStartsWith",(e,t)=>{bd.init(e,t);const n=new RegExp(`^${wu(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})}}),Id=Xc("$ZodCheckEndsWith",(e,t)=>{bd.init(e,t);const n=new RegExp(`.*${wu(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})}}),Od=Xc("$ZodCheckOverwrite",(e,t)=>{bd.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class Md{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 Pd={major:4,minor:3,patch:6},Fd=Xc("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Pd;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=_u(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 eu;if(r||a instanceof Promise)r=(r??Promise.resolve()).then(async()=>{await a;e.issues.length!==t&&(o||(o=_u(e,t)))});else{if(e.issues.length===t)continue;o||(o=_u(e,t))}}return r?r.then(()=>e):e},n=(n,o,i)=>{if(_u(n))return n.aborted=!0,n;const a=t(o,r,i);if(a instanceof Promise){if(!1===i.async)throw new eu;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 eu;return a.then(e=>t(e,r,i))}return t(a,r,i)}}uu(e,"~standard",()=>({validate:t=>{try{const n=Fu(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return Ru(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),Ld=Xc("$ZodString",(e,t)=>{var n;Fd.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}}),Rd=Xc("$ZodStringFormat",(e,t)=>{Ed.init(e,t),Ld.init(e,t)}),Dd=Xc("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=ed),Rd.init(e,t)}),Ud=Xc("$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=td(e))}else t.pattern??(t.pattern=td());Rd.init(e,t)}),Bd=Xc("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=nd),Rd.init(e,t)}),$d=Xc("$ZodURL",(e,t)=>{Rd.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})}}}),Vd=Xc("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Rd.init(e,t)}),Hd=Xc("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Gu),Rd.init(e,t)}),Wd=Xc("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Zu),Rd.init(e,t)}),qd=Xc("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Qu),Rd.init(e,t)}),Zd=Xc("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Ku),Rd.init(e,t)}),Qd=Xc("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Ju),Rd.init(e,t)}),Kd=Xc("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Yu),Rd.init(e,t)}),Jd=Xc("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){const t=fd({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(`^${ud}T(?:${r})$`)}(t)),Rd.init(e,t)}),Yd=Xc("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=dd),Rd.init(e,t)}),Gd=Xc("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=new RegExp(`^${fd(t)}$`)),Rd.init(e,t)}),Xd=Xc("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Xu),Rd.init(e,t)}),ef=Xc("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=rd),Rd.init(e,t),e._zod.bag.format="ipv4"}),tf=Xc("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=od),Rd.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})}}}),nf=Xc("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=id),Rd.init(e,t)}),rf=Xc("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ad),Rd.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 of(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const af=Xc("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=sd),Rd.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{of(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});const sf=Xc("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ld),Rd.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{(function(e){if(!ld.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return of(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})}}),lf=Xc("$ZodE164",(e,t)=>{t.pattern??(t.pattern=cd),Rd.init(e,t)});const cf=Xc("$ZodJWT",(e,t)=>{Rd.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})}}),uf=Xc("$ZodNumber",(e,t)=>{Fd.init(e,t),e._zod.pattern=e._zod.bag.pattern??hd,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}}),df=Xc("$ZodNumberFormat",(e,t)=>{kd.init(e,t),uf.init(e,t)}),ff=Xc("$ZodAny",(e,t)=>{Fd.init(e,t),e._zod.parse=e=>e}),pf=Xc("$ZodUnknown",(e,t)=>{Fd.init(e,t),e._zod.parse=e=>e}),hf=Xc("$ZodNever",(e,t)=>{Fd.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function mf(e,t,n){e.issues.length&&t.issues.push(...Cu(n,e.issues)),t.value[n]=e.value}const gf=Xc("$ZodArray",(e,t)=>{Fd.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=>mf(t,n,e))):mf(s,n,e)}return i.length?Promise.all(i).then(()=>n):n}});function bf(e,t,n,r,o){if(e.issues.length){if(o&&!(n in r))return;t.issues.push(...Cu(n,e.issues))}void 0===e.value?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function yf(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 vf(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=>bf(e,n,d,t,u))):bf(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 wf=Xc("$ZodObject",(e,t)=>{Fd.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=au(()=>yf(t));uu(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=mu,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=>bf(n,t,e,s,o))):bf(i,t,e,s,o)}return i?vf(l,s,t,n,r.value,e):l.length?Promise.all(l).then(()=>t):t}}),xf=Xc("$ZodObjectJIT",(e,t)=>{wf.init(e,t);const n=e._zod.parse,r=au(()=>yf(t));let o;const i=mu,a=!nu.jitless,s=a&&gu.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 Md(["shape","payload","ctx"]),n=r.value,o=e=>{const t=pu(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=pu(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?vf([],f,u,d,c,e):u):n(u,d):(u.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),u)}});function kf(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=>!_u(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=>zu(e,r,ru())))}),t)}const Sf=Xc("$ZodUnion",(e,t)=>{Fd.init(e,t),uu(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),uu(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),uu(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),uu(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=>lu(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=>kf(t,o,e,i)):kf(s,o,e,i)}}),_f=Xc("$ZodIntersection",(e,t)=>{Fd.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])=>Ef(e,t,n)):Ef(e,o,i)}});function Cf(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(bu(e)&&bu(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=Cf(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=Cf(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 Ef(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}),_u(e))return e;const a=Cf(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 zf=Xc("$ZodEnum",(e,t)=>{Fd.init(e,t);const n=ou(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(e=>vu.has(typeof e)).map(e=>"string"==typeof e?wu(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}}),Af=Xc("$ZodTransform",(e,t)=>{Fd.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new tu(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 eu;return n.value=o,n}});function Nf(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const Tf=Xc("$ZodOptional",(e,t)=>{Fd.init(e,t),e._zod.optin="optional",e._zod.optout="optional",uu(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),uu(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${lu(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=>Nf(t,e.value)):Nf(r,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),jf=Xc("$ZodExactOptional",(e,t)=>{Tf.init(e,t),uu(e._zod,"values",()=>t.innerType._zod.values),uu(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),If=Xc("$ZodNullable",(e,t)=>{Fd.init(e,t),uu(e._zod,"optin",()=>t.innerType._zod.optin),uu(e._zod,"optout",()=>t.innerType._zod.optout),uu(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${lu(e.source)}|null)$`):void 0}),uu(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)}),Of=Xc("$ZodDefault",(e,t)=>{Fd.init(e,t),e._zod.optin="optional",uu(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=>Mf(e,t)):Mf(r,t)}});function Mf(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const Pf=Xc("$ZodPrefault",(e,t)=>{Fd.init(e,t),e._zod.optin="optional",uu(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))}),Ff=Xc("$ZodNonOptional",(e,t)=>{Fd.init(e,t),uu(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=>Lf(t,e)):Lf(o,e)}});function Lf(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 Rf=Xc("$ZodCatch",(e,t)=>{Fd.init(e,t),uu(e._zod,"optin",()=>t.innerType._zod.optin),uu(e._zod,"optout",()=>t.innerType._zod.optout),uu(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=>zu(e,n,ru()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>zu(e,n,ru()))},input:e.value}),e.issues=[]),e)}}),Df=Xc("$ZodPipe",(e,t)=>{Fd.init(e,t),uu(e._zod,"values",()=>t.in._zod.values),uu(e._zod,"optin",()=>t.in._zod.optin),uu(e._zod,"optout",()=>t.out._zod.optout),uu(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=>Uf(e,t.in,n)):Uf(r,t.in,n)}const r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Uf(e,t.out,n)):Uf(r,t.out,n)}});function Uf(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Bf=Xc("$ZodReadonly",(e,t)=>{Fd.init(e,t),uu(e._zod,"propValues",()=>t.innerType._zod.propValues),uu(e._zod,"values",()=>t.innerType._zod.values),uu(e._zod,"optin",()=>t.innerType?._zod?.optin),uu(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($f):$f(r)}});function $f(e){return e.value=Object.freeze(e.value),e}const Vf=Xc("$ZodCustom",(e,t)=>{bd.init(e,t),Fd.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=>Hf(t,n,r,e));Hf(o,n,r,e)}});function Hf(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(Nu(e))}}var Wf;class qf{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)}}(Wf=globalThis).__zod_globalRegistry??(Wf.__zod_globalRegistry=new qf);const Zf=globalThis.__zod_globalRegistry;function Qf(e,t){return new e({type:"string",...ku(t)})}function Kf(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ku(t)})}function Jf(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ku(t)})}function Yf(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ku(t)})}function Gf(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ku(t)})}function Xf(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ku(t)})}function ep(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ku(t)})}function tp(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ku(t)})}function np(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ku(t)})}function rp(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ku(t)})}function op(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ku(t)})}function ip(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ku(t)})}function ap(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ku(t)})}function sp(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ku(t)})}function lp(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ku(t)})}function cp(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ku(t)})}function up(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ku(t)})}function dp(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ku(t)})}function fp(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ku(t)})}function pp(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ku(t)})}function hp(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ku(t)})}function mp(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ku(t)})}function gp(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ku(t)})}function bp(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ku(t)})}function yp(e,t){return new e({type:"string",format:"date",check:"string_format",...ku(t)})}function vp(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ku(t)})}function wp(e,t){return new e({type:"string",format:"duration",check:"string_format",...ku(t)})}function xp(e,t){return new e({type:"number",checks:[],...ku(t)})}function kp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ku(t)})}function Sp(e){return new e({type:"any"})}function _p(e){return new e({type:"unknown"})}function Cp(e,t){return new e({type:"never",...ku(t)})}function Ep(e,t){return new vd({check:"less_than",...ku(t),value:e,inclusive:!1})}function zp(e,t){return new vd({check:"less_than",...ku(t),value:e,inclusive:!0})}function Ap(e,t){return new wd({check:"greater_than",...ku(t),value:e,inclusive:!1})}function Np(e,t){return new wd({check:"greater_than",...ku(t),value:e,inclusive:!0})}function Tp(e,t){return new xd({check:"multiple_of",...ku(t),value:e})}function jp(e,t){return new Sd({check:"max_length",...ku(t),maximum:e})}function Ip(e,t){return new _d({check:"min_length",...ku(t),minimum:e})}function Op(e,t){return new Cd({check:"length_equals",...ku(t),length:e})}function Mp(e,t){return new zd({check:"string_format",format:"regex",...ku(t),pattern:e})}function Pp(e){return new Ad({check:"string_format",format:"lowercase",...ku(e)})}function Fp(e){return new Nd({check:"string_format",format:"uppercase",...ku(e)})}function Lp(e,t){return new Td({check:"string_format",format:"includes",...ku(t),includes:e})}function Rp(e,t){return new jd({check:"string_format",format:"starts_with",...ku(t),prefix:e})}function Dp(e,t){return new Id({check:"string_format",format:"ends_with",...ku(t),suffix:e})}function Up(e){return new Od({check:"overwrite",tx:e})}function Bp(e){return Up(t=>t.normalize(e))}function $p(){return Up(e=>e.trim())}function Vp(){return Up(e=>e.toLowerCase())}function Hp(){return Up(e=>e.toUpperCase())}function Wp(){return Up(e=>function(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}(e))}function qp(e,t,n){return new e({type:"array",element:t,...ku(n)})}function Zp(e,t,n){return new e({type:"custom",check:"custom",fn:t,...ku(n)})}function Qp(e){const t=Kp(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(Nu(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(Nu(r))}},e(n.value,n)));return t}function Kp(e,t){const n=new bd({check:"custom",...ku(t)});return n._zod.check=e,n}function Jp(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??Zf,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 Yp(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),Yp(i,t,r),t.seen.get(i).isParent=!0)}const l=t.metadataRegistry.get(e);l&&Object.assign(a.schema,l),"input"===t.io&&eh(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 Gp(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 Xp(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:th(t,"input",e.processors),output:th(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(a){throw new Error("Error converting schema to JSON.")}}function eh(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 eh(r.element,n);if("set"===r.type)return eh(r.valueType,n);if("lazy"===r.type)return eh(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 eh(r.innerType,n);if("intersection"===r.type)return eh(r.left,n)||eh(r.right,n);if("record"===r.type||"map"===r.type)return eh(r.keyType,n)||eh(r.valueType,n);if("pipe"===r.type)return eh(r.in,n)||eh(r.out,n);if("object"===r.type){for(const e in r.shape)if(eh(r.shape[e],n))return!0;return!1}if("union"===r.type){for(const e of r.options)if(eh(e,n))return!0;return!1}if("tuple"===r.type){for(const e of r.items)if(eh(e,n))return!0;return!(!r.rest||!eh(r.rest,n))}return!1}const th=(e,t,n={})=>r=>{const{libraryOptions:o,target:i}=r??{},a=Jp({...o??{},target:i,io:t,processors:n});return Yp(e,a),Gp(a,e),Xp(a,e)},nh={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},rh=(e,t,n,r)=>{const o=e._zod.def;Yp(o.innerType,t,r);t.seen.get(e).ref=o.innerType},oh=Xc("ZodISODateTime",(e,t)=>{Jd.init(e,t),Ch.init(e,t)});const ih=Xc("ZodISODate",(e,t)=>{Yd.init(e,t),Ch.init(e,t)});const ah=Xc("ZodISOTime",(e,t)=>{Gd.init(e,t),Ch.init(e,t)});const sh=Xc("ZodISODuration",(e,t)=>{Xd.init(e,t),Ch.init(e,t)});const lh=Xc("ZodError",(e,t)=>{ju.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,iu,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,iu,2)}},isEmpty:{get:()=>0===e.issues.length}})},{Parent:Error}),ch=Ou(lh),uh=Mu(lh),dh=Pu(lh),fh=Lu(lh),ph=Du(lh),hh=Uu(lh),mh=Bu(lh),gh=$u(lh),bh=Vu(lh),yh=Hu(lh),vh=Wu(lh),wh=qu(lh),xh=Xc("ZodType",(e,t)=>(Fd.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:th(e,"input"),output:th(e,"output")}}),e.toJSONSchema=((e,t={})=>n=>{const r=Jp({...n,processors:t});return Yp(e,r),Gp(r,e),Xp(r,e)})(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(fu(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)=>xu(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>ch(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>dh(e,t,n),e.parseAsync=async(t,n)=>uh(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>fh(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>ph(e,t,n),e.decode=(t,n)=>hh(e,t,n),e.encodeAsync=async(t,n)=>mh(e,t,n),e.decodeAsync=async(t,n)=>gh(e,t,n),e.safeEncode=(t,n)=>bh(e,t,n),e.safeDecode=(t,n)=>yh(e,t,n),e.safeEncodeAsync=async(t,n)=>vh(e,t,n),e.safeDecodeAsync=async(t,n)=>wh(e,t,n),e.refine=(t,n)=>e.check(function(e,t={}){return Zp(ym,e,t)}(t,n)),e.superRefine=t=>e.check(Qp(t)),e.overwrite=t=>e.check(Up(t)),e.optional=()=>sm(e),e.exactOptional=()=>new lm({type:"optional",innerType:e}),e.nullable=()=>um(e),e.nullish=()=>sm(um(e)),e.nonoptional=t=>function(e,t){return new pm({type:"nonoptional",innerType:e,...ku(t)})}(e,t),e.array=()=>{return qp(Xh,e,t);var t},e.or=t=>{return new tm({type:"union",options:[e,t],...ku(n)});var n},e.and=t=>new nm({type:"intersection",left:e,right:t}),e.transform=t=>gm(e,new im({type:"transform",transform:t})),e.default=t=>{return n=t,new dm({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():yu(n)}});var n},e.prefault=t=>{return n=t,new fm({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():yu(n)}});var n},e.catch=t=>{return new hm({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:()=>n});var n},e.pipe=t=>gm(e,t),e.readonly=()=>new bm({type:"readonly",innerType:e}),e.describe=t=>{const n=e.clone();return Zf.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>Zf.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return Zf.get(e);const n=e.clone();return Zf.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),kh=Xc("_ZodString",(e,t)=>{Ld.init(e,t),xh.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=nh[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(Mp(...t)),e.includes=(...t)=>e.check(Lp(...t)),e.startsWith=(...t)=>e.check(Rp(...t)),e.endsWith=(...t)=>e.check(Dp(...t)),e.min=(...t)=>e.check(Ip(...t)),e.max=(...t)=>e.check(jp(...t)),e.length=(...t)=>e.check(Op(...t)),e.nonempty=(...t)=>e.check(Ip(1,...t)),e.lowercase=t=>e.check(Pp(t)),e.uppercase=t=>e.check(Fp(t)),e.trim=()=>e.check($p()),e.normalize=(...t)=>e.check(Bp(...t)),e.toLowerCase=()=>e.check(Vp()),e.toUpperCase=()=>e.check(Hp()),e.slugify=()=>e.check(Wp())}),Sh=Xc("ZodString",(e,t)=>{Ld.init(e,t),kh.init(e,t),e.email=t=>e.check(Kf(Eh,t)),e.url=t=>e.check(tp(Nh,t)),e.jwt=t=>e.check(gp(Hh,t)),e.emoji=t=>e.check(np(Th,t)),e.guid=t=>e.check(Jf(zh,t)),e.uuid=t=>e.check(Yf(Ah,t)),e.uuidv4=t=>e.check(Gf(Ah,t)),e.uuidv6=t=>e.check(Xf(Ah,t)),e.uuidv7=t=>e.check(ep(Ah,t)),e.nanoid=t=>e.check(rp(jh,t)),e.guid=t=>e.check(Jf(zh,t)),e.cuid=t=>e.check(op(Ih,t)),e.cuid2=t=>e.check(ip(Oh,t)),e.ulid=t=>e.check(ap(Mh,t)),e.base64=t=>e.check(pp(Bh,t)),e.base64url=t=>e.check(hp($h,t)),e.xid=t=>e.check(sp(Ph,t)),e.ksuid=t=>e.check(lp(Fh,t)),e.ipv4=t=>e.check(cp(Lh,t)),e.ipv6=t=>e.check(up(Rh,t)),e.cidrv4=t=>e.check(dp(Dh,t)),e.cidrv6=t=>e.check(fp(Uh,t)),e.e164=t=>e.check(mp(Vh,t)),e.datetime=t=>e.check(function(e){return bp(oh,e)}(t)),e.date=t=>e.check(function(e){return yp(ih,e)}(t)),e.time=t=>e.check(function(e){return vp(ah,e)}(t)),e.duration=t=>e.check(function(e){return wp(sh,e)}(t))});function _h(e){return Qf(Sh,e)}const Ch=Xc("ZodStringFormat",(e,t)=>{Rd.init(e,t),kh.init(e,t)}),Eh=Xc("ZodEmail",(e,t)=>{Bd.init(e,t),Ch.init(e,t)}),zh=Xc("ZodGUID",(e,t)=>{Dd.init(e,t),Ch.init(e,t)}),Ah=Xc("ZodUUID",(e,t)=>{Ud.init(e,t),Ch.init(e,t)}),Nh=Xc("ZodURL",(e,t)=>{$d.init(e,t),Ch.init(e,t)}),Th=Xc("ZodEmoji",(e,t)=>{Vd.init(e,t),Ch.init(e,t)}),jh=Xc("ZodNanoID",(e,t)=>{Hd.init(e,t),Ch.init(e,t)}),Ih=Xc("ZodCUID",(e,t)=>{Wd.init(e,t),Ch.init(e,t)}),Oh=Xc("ZodCUID2",(e,t)=>{qd.init(e,t),Ch.init(e,t)}),Mh=Xc("ZodULID",(e,t)=>{Zd.init(e,t),Ch.init(e,t)}),Ph=Xc("ZodXID",(e,t)=>{Qd.init(e,t),Ch.init(e,t)}),Fh=Xc("ZodKSUID",(e,t)=>{Kd.init(e,t),Ch.init(e,t)}),Lh=Xc("ZodIPv4",(e,t)=>{ef.init(e,t),Ch.init(e,t)}),Rh=Xc("ZodIPv6",(e,t)=>{tf.init(e,t),Ch.init(e,t)}),Dh=Xc("ZodCIDRv4",(e,t)=>{nf.init(e,t),Ch.init(e,t)}),Uh=Xc("ZodCIDRv6",(e,t)=>{rf.init(e,t),Ch.init(e,t)}),Bh=Xc("ZodBase64",(e,t)=>{af.init(e,t),Ch.init(e,t)}),$h=Xc("ZodBase64URL",(e,t)=>{sf.init(e,t),Ch.init(e,t)}),Vh=Xc("ZodE164",(e,t)=>{lf.init(e,t),Ch.init(e,t)}),Hh=Xc("ZodJWT",(e,t)=>{cf.init(e,t),Ch.init(e,t)}),Wh=Xc("ZodNumber",(e,t)=>{uf.init(e,t),xh.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(Ap(t,n)),e.gte=(t,n)=>e.check(Np(t,n)),e.min=(t,n)=>e.check(Np(t,n)),e.lt=(t,n)=>e.check(Ep(t,n)),e.lte=(t,n)=>e.check(zp(t,n)),e.max=(t,n)=>e.check(zp(t,n)),e.int=t=>e.check(Qh(t)),e.safe=t=>e.check(Qh(t)),e.positive=t=>e.check(Ap(0,t)),e.nonnegative=t=>e.check(Np(0,t)),e.negative=t=>e.check(Ep(0,t)),e.nonpositive=t=>e.check(zp(0,t)),e.multipleOf=(t,n)=>e.check(Tp(t,n)),e.step=(t,n)=>e.check(Tp(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 qh(e){return xp(Wh,e)}const Zh=Xc("ZodNumberFormat",(e,t)=>{df.init(e,t),Wh.init(e,t)});function Qh(e){return kp(Zh,e)}const Kh=Xc("ZodAny",(e,t)=>{ff.init(e,t),xh.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});const Jh=Xc("ZodUnknown",(e,t)=>{pf.init(e,t),xh.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function Yh(){return _p(Jh)}const Gh=Xc("ZodNever",(e,t)=>{hf.init(e,t),xh.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n)=>{n.not={}})(0,0,t)});const Xh=Xc("ZodArray",(e,t)=>{gf.init(e,t),xh.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=Yp(i.element,t,{...r,path:[...r.path,"items"]})})(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(Ip(t,n)),e.nonempty=t=>e.check(Ip(1,t)),e.max=(t,n)=>e.check(jp(t,n)),e.length=(t,n)=>e.check(Op(t,n)),e.unwrap=()=>e.element});const em=Xc("ZodObject",(e,t)=>{xf.init(e,t),xh.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]=Yp(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=Yp(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(o.additionalProperties=!1)})(e,t,n,r),uu(e,"shape",()=>t.shape),e.keyof=()=>om(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Yh()}),e.loose=()=>e.clone({...e._zod.def,catchall:Yh()}),e.strict=()=>{return e.clone({...e._zod.def,catchall:Cp(Gh,t)});var t},e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>function(e,t){if(!bu(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=fu(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return du(this,"shape",n),n}});return xu(e,r)}(e,t),e.safeExtend=t=>function(e,t){if(!bu(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=fu(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return du(this,"shape",n),n}});return xu(e,n)}(e,t),e.merge=t=>function(e,t){const n=fu(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return du(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return xu(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 xu(e,fu(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 du(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=fu(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 du(this,"shape",r),r},checks:[]});return xu(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=fu(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 du(this,"shape",o),o},checks:[]});return xu(t,o)}(am,e,t[0]),e.required=(...t)=>function(e,t,n){const r=fu(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 du(this,"shape",o),o}});return xu(t,r)}(pm,e,t[0])});const tm=Xc("ZodUnion",(e,t)=>{Sf.init(e,t),xh.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)=>Yp(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 nm=Xc("ZodIntersection",(e,t)=>{_f.init(e,t),xh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def,i=Yp(o.left,t,{...r,path:[...r.path,"allOf",0]}),a=Yp(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 rm=Xc("ZodEnum",(e,t)=>{zf.init(e,t),xh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=ou(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 rm({...t,checks:[],...ku(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 rm({...t,checks:[],...ku(r),entries:o})}});function om(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new rm({type:"enum",entries:n,...ku(t)})}const im=Xc("ZodTransform",(e,t)=>{Af.init(e,t),xh.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 tu(e.constructor.name);n.addIssue=r=>{if("string"==typeof r)n.issues.push(Nu(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(Nu(t))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(e=>(n.value=e,n)):(n.value=o,n)}});const am=Xc("ZodOptional",(e,t)=>{Tf.init(e,t),xh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rh(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});function sm(e){return new am({type:"optional",innerType:e})}const lm=Xc("ZodExactOptional",(e,t)=>{jf.init(e,t),xh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rh(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});const cm=Xc("ZodNullable",(e,t)=>{If.init(e,t),xh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def,i=Yp(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 um(e){return new cm({type:"nullable",innerType:e})}const dm=Xc("ZodDefault",(e,t)=>{Of.init(e,t),xh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;Yp(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 fm=Xc("ZodPrefault",(e,t)=>{Pf.init(e,t),xh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;Yp(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 pm=Xc("ZodNonOptional",(e,t)=>{Ff.init(e,t),xh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;Yp(o.innerType,t,r),t.seen.get(e).ref=o.innerType})(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});const hm=Xc("ZodCatch",(e,t)=>{Rf.init(e,t),xh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;let i;Yp(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 mm=Xc("ZodPipe",(e,t)=>{Df.init(e,t),xh.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;Yp(i,t,r),t.seen.get(e).ref=i})(e,t,0,r),e.in=t.in,e.out=t.out});function gm(e,t){return new mm({type:"pipe",in:e,out:t})}const bm=Xc("ZodReadonly",(e,t)=>{Bf.init(e,t),xh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;Yp(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 ym=Xc("ZodCustom",(e,t)=>{Vf.init(e,t),xh.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 vm=Object.create(null);vm.open="0",vm.close="1",vm.ping="2",vm.pong="3",vm.message="4",vm.upgrade="5",vm.noop="6";const wm=Object.create(null);Object.keys(vm).forEach(e=>{wm[vm[e]]=e});const xm={type:"error",data:"parser error"},km="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),Sm="function"==typeof ArrayBuffer,_m=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Cm=({type:e,data:t},n,r)=>km&&t instanceof Blob?n?r(t):Em(t,r):Sm&&(t instanceof ArrayBuffer||_m(t))?n?r(t):Em(new Blob([t]),r):r(vm[e]+(t||"")),Em=(e,t)=>{const n=new FileReader;return n.onload=function(){const e=n.result.split(",")[1];t("b"+(e||""))},n.readAsDataURL(e)};function zm(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Am;const Nm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Tm="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let Yb=0;Yb<64;Yb++)Tm[Nm.charCodeAt(Yb)]=Yb;const jm="function"==typeof ArrayBuffer,Im=(e,t)=>{if("string"!=typeof e)return{type:"message",data:Mm(e,t)};const n=e.charAt(0);if("b"===n)return{type:"message",data:Om(e.substring(1),t)};return wm[n]?e.length>1?{type:wm[n],data:e.substring(1)}:{type:wm[n]}:xm},Om=(e,t)=>{if(jm){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=Tm[e.charCodeAt(t)],r=Tm[e.charCodeAt(t+1)],o=Tm[e.charCodeAt(t+2)],i=Tm[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 Mm(n,t)}return{base64:!0,data:e}},Mm=(e,t)=>"blob"===t?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,Pm=String.fromCharCode(30);function Fm(){return new TransformStream({transform(e,t){!function(e,t){km&&e.data instanceof Blob?e.data.arrayBuffer().then(zm).then(t):Sm&&(e.data instanceof ArrayBuffer||_m(e.data))?t(zm(e.data)):Cm(e,!1,e=>{Am||(Am=new TextEncoder),t(Am.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 Lm;function Rm(e){return e.reduce((e,t)=>e+t.length,0)}function Dm(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 Um(e){if(e)return function(e){for(var t in Um.prototype)e[t]=Um.prototype[t];return e}(e)}Um.prototype.on=Um.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Um.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Um.prototype.off=Um.prototype.removeListener=Um.prototype.removeAllListeners=Um.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},Um.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},Um.prototype.emitReserved=Um.prototype.emit,Um.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Um.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Bm="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),$m="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function Vm(e,...t){return t.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{})}const Hm=$m.setTimeout,Wm=$m.clearTimeout;function qm(e,t){t.useNativeTimers?(e.setTimeoutFn=Hm.bind($m),e.clearTimeoutFn=Wm.bind($m)):(e.setTimeoutFn=$m.setTimeout.bind($m),e.clearTimeoutFn=$m.clearTimeout.bind($m))}function Zm(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 Qm(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class Km extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type="TransportError"}}class Jm extends Um{constructor(e){super(),this.writable=!1,qm(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 Km(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=Im(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 Ym extends Jm{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(Pm),r=[];for(let o=0;o<n.length;o++){const e=Im(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)=>{Cm(e,!1,e=>{r[i]=e,++o===n&&t(r.join(Pm))})})})(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]=Qm()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}}let Gm=!1;try{Gm="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(Jb){}const Xm=Gm;function eg(){}class tg extends Ym{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 ng extends Um{constructor(e,t,n){super(),this.createRequest=e,qm(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=Vm(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(wb){}if("POST"===this._method)try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(wb){}try{n.setRequestHeader("Accept","*/*")}catch(wb){}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(wb){return void this.setTimeoutFn(()=>{this._onError(wb)},0)}"undefined"!=typeof document&&(this._index=ng.requestsCount++,ng.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=eg,e)try{this._xhr.abort()}catch(wb){}"undefined"!=typeof document&&delete ng.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(ng.requestsCount=0,ng.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",rg);else if("function"==typeof addEventListener){addEventListener("onpagehide"in $m?"pagehide":"unload",rg,!1)}function rg(){for(let e in ng.requests)ng.requests.hasOwnProperty(e)&&ng.requests[e].abort()}const og=function(){const e=ig({xdomain:!1});return e&&null!==e.responseType}();function ig(e){const t=e.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!t||Xm))return new XMLHttpRequest}catch(wb){}if(!t)try{return new($m[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(wb){}}const ag="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class sg extends Jm{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,n=ag?{}:Vm(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(Jb){return this.emitReserved("error",Jb)}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;Cm(n,this.supportsBinary,e=>{try{this.doWrite(n,e)}catch(wb){}r&&Bm(()=>{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]=Qm()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const lg=$m.WebSocket||$m.MozWebSocket;const cg={websocket:class extends sg{createSocket(e,t,n){return ag?new lg(e,t,n):t?new lg(e,t):new lg(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends Jm{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(Jb){return this.emitReserved("error",Jb)}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){Lm||(Lm=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(Rm(n)<1)break;const e=Dm(n,1);i=!(128&~e[0]),o=127&e[0],r=o<126?3:126===o?1:2}else if(1===r){if(Rm(n)<2)break;const e=Dm(n,2);o=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),r=3}else if(2===r){if(Rm(n)<8)break;const e=Dm(n,8),t=new DataView(e.buffer,e.byteOffset,e.length),i=t.getUint32(0);if(i>Math.pow(2,21)-1){s.enqueue(xm);break}o=i*Math.pow(2,32)+t.getUint32(4),r=3}else{if(Rm(n)<o)break;const e=Dm(n,o);s.enqueue(Im(i?e:Lm.decode(e),t)),r=0}if(0===o||o>e){s.enqueue(xm);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),r=Fm();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&&Bm(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;null===(e=this._transport)||void 0===e||e.close()}},polling:class extends tg{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=og&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new ng(ig,this.uri(),e)}}},ug=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,dg=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function fg(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=ug.exec(e||""),i={},a=14;for(;a--;)i[dg[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 pg="function"==typeof addEventListener&&"function"==typeof removeEventListener,hg=[];pg&&addEventListener("offline",()=>{hg.forEach(e=>e())},!1);class mg extends Um{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=fg(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=fg(t.host).host);qm(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)),pg&&(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"})},hg.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&&mg.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",mg.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+=Zm(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,Bm(()=>{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(mg.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(),pg&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const e=hg.indexOf(this._offlineEventListener);-1!==e&&hg.splice(e,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}mg.protocol=4;class gg extends mg{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;mg.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;mg.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 bg=class extends gg{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=>cg[e]).filter(e=>!!e)),super(e,n)}};const yg="function"==typeof ArrayBuffer,vg=Object.prototype.toString,wg="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===vg.call(Blob),xg="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===vg.call(File);function kg(e){return yg&&(e instanceof ArrayBuffer||(e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer)(e))||wg&&e instanceof Blob||xg&&e instanceof File}function Sg(e,t){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(Sg(e[t]))return!0;return!1}if(kg(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return Sg(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Sg(e[n]))return!0;return!1}function _g(e){const t=[],n=e.data,r=e;return r.data=Cg(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Cg(e,t){if(!e)return e;if(kg(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]=Cg(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]=Cg(e[r],t));return n}return e}function Eg(e,t){return e.data=zg(e.data,t),delete e.attachments,e}function zg(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]=zg(e[n],t);else if("object"==typeof e)for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=zg(e[n],t));return e}const Ag=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Ng,Tg;(Tg=Ng||(Ng={}))[Tg.CONNECT=0]="CONNECT",Tg[Tg.DISCONNECT=1]="DISCONNECT",Tg[Tg.EVENT=2]="EVENT",Tg[Tg.ACK=3]="ACK",Tg[Tg.CONNECT_ERROR=4]="CONNECT_ERROR",Tg[Tg.BINARY_EVENT=5]="BINARY_EVENT",Tg[Tg.BINARY_ACK=6]="BINARY_ACK";class jg extends Um{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===Ng.BINARY_EVENT;n||t.type===Ng.BINARY_ACK?(t.type=n?Ng.EVENT:Ng.ACK,this.reconstructor=new Ig(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!kg(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===Ng[n.type])throw new Error("unknown packet type "+n.type);if(n.type===Ng.BINARY_EVENT||n.type===Ng.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(!jg.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(wb){return!1}}static isPayloadValid(e,t){switch(e){case Ng.CONNECT:return Mg(t);case Ng.DISCONNECT:return void 0===t;case Ng.CONNECT_ERROR:return"string"==typeof t||Mg(t);case Ng.EVENT:case Ng.BINARY_EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===Ag.indexOf(t[0]));case Ng.ACK:case Ng.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Ig{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=Eg(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Og=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e};function Mg(e){return"[object Object]"===Object.prototype.toString.call(e)}const Pg=Object.freeze(Object.defineProperty({__proto__:null,Decoder:jg,Encoder:class{constructor(e){this.replacer=e}encode(e){return e.type!==Ng.EVENT&&e.type!==Ng.ACK||!Sg(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===Ng.EVENT?Ng.BINARY_EVENT:Ng.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}encodeAsString(e){let t=""+e.type;return e.type!==Ng.BINARY_EVENT&&e.type!==Ng.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=_g(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}},get PacketType(){return Ng},isPacketValid:function(e){return"string"==typeof e.nsp&&(void 0===(t=e.id)||Og(t))&&function(e,t){switch(e){case Ng.CONNECT:return void 0===t||Mg(t);case Ng.DISCONNECT:return void 0===t;case Ng.EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===Ag.indexOf(t[0]));case Ng.ACK:return Array.isArray(t);case Ng.CONNECT_ERROR:return"string"==typeof t||Mg(t);default:return!1}}(e.type,e.data);var t},protocol:5},Symbol.toStringTag,{value:"Module"}));function Fg(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Lg=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Rg extends Um{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=[Fg(e,"open",this.onopen.bind(this)),Fg(e,"packet",this.onpacket.bind(this)),Fg(e,"error",this.onerror.bind(this)),Fg(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(Lg.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:Ng.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:Ng.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 Ng.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 Ng.EVENT:case Ng.BINARY_EVENT:this.onevent(e);break;case Ng.ACK:case Ng.BINARY_ACK:this.onack(e);break;case Ng.DISCONNECT:this.ondisconnect();break;case Ng.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:Ng.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:Ng.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 Dg(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}Dg.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)},Dg.prototype.reset=function(){this.attempts=0},Dg.prototype.setMin=function(e){this.ms=e},Dg.prototype.setMax=function(e){this.max=e},Dg.prototype.setJitter=function(e){this.jitter=e};class Ug extends Um{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,qm(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 Dg({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||Pg;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 bg(this.uri,this.opts);const t=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=Fg(t,"open",function(){n.onopen(),e&&e()}),o=t=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",t),e?e(t):this.maybeReconnectOnOpen()},i=Fg(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(Fg(e,"ping",this.onping.bind(this)),Fg(e,"data",this.ondata.bind(this)),Fg(e,"error",this.onerror.bind(this)),Fg(e,"close",this.onclose.bind(this)),Fg(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(wb){this.onclose("parse error",wb)}}ondecoded(e){Bm(()=>{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 Rg(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 Bg={};function $g(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=fg(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=Bg[o]&&i in Bg[o].nsps;let s;return t.forceNew||t["force new connection"]||!1===t.multiplex||a?s=new Ug(r,t):(Bg[o]||(Bg[o]=new Ug(r,t)),s=Bg[o]),n.query&&!t.query&&(t.query=n.queryKey),s.socket(n.path,t)}Object.assign($g,{Manager:Ug,Socket:Rg,io:$g,connect:$g});const Vg="chat_device_id";function Hg(){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 Wg=function(e,t){const n={type:"object",shape:e??{},...ku(t)};return new em(n)}({id:_h().optional(),type:om(["text","image","audio","location","system"]).default("text"),content:_h().optional(),imageUrl:_h().url().optional(),audioUrl:_h().url().optional(),latitude:qh().optional(),longitude:qh().optional(),timestamp:_h().optional(),sender:om(["bot","user","system"]).optional(),emotion:Sp(Kh).optional()});function qg(e){const{apiKey:t,apiBaseUrl:n,pageContext:r,userContext:o}=e,i=k.useRef(e);k.useEffect(()=>{i.current=e},[e]);const a=k.useRef(null),[s,l]=k.useState(!1),[c,u]=k.useState(!1),d=k.useRef(function(){try{const e=localStorage.getItem(Vg);if(e)return e;const t=Hg();return localStorage.setItem(Vg,t),t}catch{return Vt("localStorage not available, using session-only device ID"),Hg()}}()),f=k.useRef(r);k.useEffect(()=>{f.current=r},[r]);const p=k.useCallback(e=>{const t=Wg.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=k.useCallback(()=>{if(!t||!n)return;if(a.current?.connected)return;l(!0);const e=$g(`${n}/webchat`,{auth:{apiKey:t,deviceId:d.current,token:o?.token,metadata:o?.metadata},transports:["websocket","polling"],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(wb){Ht("ChatSocket Error processing bot_message:",wb)}}),e.on("chat_history",e=>{e.messages&&Array.isArray(e.messages)&&e.messages.forEach(e=>{try{i.current.onMessage(p(e))}catch(wb){Wt("Error processing history message:",wb)}}),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=k.useCallback(()=>{a.current&&(a.current.disconnect(),a.current=null,u(!1))},[]),g=k.useRef(h);g.current=h,k.useEffect(()=>(g.current(),()=>{a.current&&(a.current.disconnect(),a.current=null)}),[]);const b=k.useRef([]),y=k.useRef([]),v=k.useCallback(()=>`msg_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,[]),w=k.useCallback(()=>{if(a.current?.connected)for(;b.current.length>0;){const e=b.current.shift();a.current.emit("user_message",e)}},[]);k.useEffect(()=>{c&&w()},[c,w]),k.useEffect(()=>{if(!c)return;const e=setInterval(()=>{const e=Date.now();y.current=y.current.filter(t=>e<t.nextRetryAt||(t.attempts>=t.maxAttempts?(i.current.onEvent?.("message_failed",{id:t.id,payload:t.payload}),Ht("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 x=k.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}):(y.current.push({id:n,payload:o,attempts:0,maxAttempts:3,nextRetryAt:Date.now()+1e3}),i.current.onEvent?.("message_retry_queued",{id:n}))}),n):(b.current.push(o),i.current.onEvent?.("queued_message",{id:n,payload:o}),n)},[v]),S=k.useMemo(()=>fc(e=>{a.current?.emit("typing",e)},250),[]);return{isConnected:c,isConnecting:s,sendMessage:x,sendTyping:S,getSocket:k.useCallback(()=>a.current,[]),requestHistory:k.useCallback(()=>{a.current?.emit("request_history")},[]),reconnect:h,disconnect:m}}function Zg(e=!1){const t="undefined"!=typeof window?window.location.pathname:"",n=k.useMemo(()=>t,[t]),[r,o]=k.useState({});return k.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 Qg{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()}}let Kg=null,Jg=null;function Yg(e){Kg=e}function Gg(e){Jg=e}const Xg=k.createContext(null);const eb=e=>new Promise((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>t(r.result),r.onerror=e=>n(e)});function tb(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]=k.useState(0),h=k.useRef(0),{t:m}=P(),g=function(e,t,n=!0){const r=k.useRef(null);return k.useEffect(()=>{if(!n||!e||!t)return;const o=`${e}/analytics`;r.current=new Qg(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:k.useCallback(()=>{r.current?.trackOpen()},[]),trackClose:k.useCallback(()=>{r.current?.trackClose()},[]),trackMessageSent:k.useCallback(e=>{r.current?.trackMessageSent(e)},[]),trackMessageReceived:k.useCallback((e,t)=>{r.current?.trackMessageReceived(e,t)},[]),trackError:k.useCallback((e,t)=>{r.current?.trackError(e,t)},[]),trackConnectionStatus:k.useCallback(e=>{r.current?.trackConnectionStatus(e)},[]),trackFeatureUsed:k.useCallback(e=>{r.current?.trackFeatureUsed(e)},[])}}(n,t,!0),b=function({enabled:e=!0,soundEnabled:t=!0,desktopEnabled:n=!0,botName:r="Asistente",logoUrl:o,notificationSoundUrl:i}={}){const[a,s]=k.useState("default"),l=k.useRef(null),c=o||Zt,u=i||Qt;k.useEffect(()=>{t&&"undefined"!=typeof window&&(l.current=new Audio(u),l.current.volume=.3)},[t,u]),k.useEffect(()=>{"undefined"!=typeof window&&"Notification"in window&&s(Notification.permission)},[]);const d=k.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),qt("Notification permission:",e),"granted"===e}catch(e){return Ht("Error requesting notification permission:",e),!1}},[]),f=k.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){Ht("Error showing notification:",o)}},[e,n,a,r,c]),p=k.useCallback(()=>{if(e&&t&&("undefined"==typeof document||!document.hasFocus()))try{l.current?.play().catch(e=>{Wt("Audio playback blocked:",e)})}catch(n){Ht("Error playing sound:",n)}},[e,t]),h=k.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}),y=function(e=10,t=6e4){const n=k.useRef([]);return{isAllowed:k.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:k.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:k.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:k.useCallback(()=>{n.current=[]},[])}}(10,6e4),{state:v,actions:w}=function(){const[e,t]=k.useReducer(Gc,Yc),[n,r]=k.useState(!1);k.useEffect(()=>{"undefined"==typeof window||n||(async()=>{try{await Kc.migrateFromLocalStorage();const e=await Kc.getMessages(100),n=await Kc.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(wb){Vt("Chat: Error rehydrating from IndexedDB",wb);try{const e=localStorage.getItem(Jc);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){Ht("Chat: Fallback rehydration failed",e)}}finally{r(!0)}})()},[n]),k.useEffect(()=>{if(!n)return;const t=setTimeout(async()=>{try{await Kc.saveMessages(e.messages),await Kc.setMetadata({isOpen:e.isOpen,sessionId:e.sessionId})}catch(wb){Ht("Chat Persistence Error:",wb);try{const t={isOpen:e.isOpen,messages:e.messages,sessionId:e.sessionId};localStorage.setItem(Jc,JSON.stringify(t))}catch(t){Ht("Chat: Fallback persistence failed",t)}}},500);return()=>clearTimeout(t)},[e.isOpen,e.messages,e.sessionId,n]);const o=k.useCallback(e=>{t({type:"ADD_MESSAGE",payload:e})},[]),i=k.useCallback(()=>t({type:"TOGGLE_WINDOW"}),[]),a=k.useCallback(()=>t({type:"OPEN_WINDOW"}),[]),s=k.useCallback(()=>t({type:"CLOSE_WINDOW"}),[]),l=k.useCallback(e=>t({type:"SET_CONNECTED",payload:e}),[]),c=k.useCallback(e=>t({type:"SET_TYPING",payload:e}),[]),u=k.useCallback(e=>t({type:"SET_MESSAGES",payload:e}),[]),d=k.useCallback(e=>t({type:"SET_ERROR",payload:e}),[]),f=k.useCallback(e=>t({type:"SET_SESSION_ID",payload:e}),[]),p=k.useCallback(()=>{localStorage.removeItem(Jc),t({type:"CLEAR_CHAT"})},[]),h=k.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}}}(),x=Zg(o),S=qg({apiKey:t,apiBaseUrl:n,pageContext:k.useMemo(()=>x?{...r||{},seo:{...x||{}}}:r,[r,x]),userContext:a,onMessage:k.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),b.notifyWithSound(e))},[w,v.isOpen,g,b]),onConnected:k.useCallback((e,t)=>{w.setConnected(!0),w.setSessionId(e),g.trackConnectionStatus(!0),t&&c&&c("backend_config",t)},[w,c,g]),onDisconnected:k.useCallback(()=>{w.setConnected(!1),g.trackConnectionStatus(!1)},[w,g]),onTyping:k.useCallback(e=>w.setTyping(e),[w]),onError:k.useCallback(e=>{w.setError(e),g.trackError(e)},[w,g]),onLogin:s,onNavigate:l,onEvent:c,onThemeUpdate:d}),_=k.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]),C=k.useCallback(e=>{if(!y.isAllowed()){const e=y.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"),S.sendMessage(e,"text")},[w,S,y,g,m]),E=k.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 eb(e);S.sendMessage(r,t)},[w,S]),z=k.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),S.sendMessage(JSON.stringify(e),"location")},[w,S]);k.useEffect(()=>{const e=()=>{v.isOpen||w.openWindow()},t=()=>{v.isOpen&&w.closeWindow()},n=()=>{v.isOpen?w.closeWindow():w.openWindow()},r=e=>{e.detail?.message&&C(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,C]),k.useEffect(()=>(Yg(C),()=>Yg(null)),[C]);const A=k.useCallback(()=>{w.clearMessages(),qt("Chat history cleared")},[w]);k.useEffect(()=>(Gg(A),()=>Gg(null)),[A]);const N=k.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:S.isConnected,getSocket:S.getSocket,handleToggle:_,handleSendText:C,handleSendAttachment:E,handleSendLocation:z}}function nb(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=k.useRef(null),p=pc();!function(e){const[t,n]=k.useState(!1);k.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]=k.useState(),{mergedTheme:g,mergedStyles:b,getContainerStyle:y}=Cc(i,h),{state:v,actions:w,unreadCount:x,currentBotEmotion:S,isConnected:_,handleToggle:C,handleSendText:E,handleSendAttachment:z,handleSendLocation:N,getSocket:T}=tb({apiKey:t,apiBaseUrl:n,pageContext:r,includeSEOMetadata:o,theme:i,userContext:s,onLogin:l,onNavigate:c,onEvent:u,onStateChange:d,onThemeUpdate:m}),j=k.useCallback(e=>{e.stopPropagation()},[]),I=y(v.isOpen,p,i?.position),O=k.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 A.jsx(Bt,{animations:i?.animations,effects:i?.effects,children:A.jsxs("div",{ref:f,id:"botuyo-chat-widget",className:At("botuyo-chat-widget flex flex-col",!p&&("bottom-left"===i?.position?"items-start":"items-end")),style:{...I,...O,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:[A.jsx("div",{className:At("transition-all duration-400 ease-[cubic-bezier(0.34,1.56,0.64,1)]",p?"bottom-left"===i?.position?"origin-bottom-left":"origin-bottom-right":"origin-bottom",v.isOpen?"opacity-100 scale-100 h-full w-full translate-y-0 pointer-events-auto":"opacity-0 scale-[0.85] pointer-events-none translate-y-8 h-0 w-0"),style:{pointerEvents:v.isOpen?"auto":"none"},onMouseDown:j,onTouchStart:j,children:A.jsx(xc,{children:A.jsx(wc,{isOpen:v.isOpen,isConnected:_,isTyping:v.isTyping,messages:v.messages,onClose:()=>w.closeWindow(),onSendMessage:E,onSendAttachment:z,onSendLocation:N,botName:i?.botName,logoUrl:i?.logoUrl,welcomeMessage:i?.welcomeMessage,inputPlaceholder:i?.inputPlaceholder,primaryColor:i?.primaryColor,position:i?.position,bubbleStyles:b,avatars:i?.avatars,mediaConfig:a,theme:g,getSocket:T})})}),A.jsx("div",{className:At(v.isOpen?"hidden":"block",!p&&"mt-4"),style:{pointerEvents:"auto"},onMouseDown:j,onTouchStart:j,children:A.jsx(Jt,{isOpen:v.isOpen,onClick:C,unreadCount:x,position:i?.position||"bottom-right",primaryColor:i?.primaryColor,logoUrl:i?.logoUrl,starterPrompt:i?.starterPrompt,avatars:i?.avatars,emotion:S,styles:b,promptPersistence:i?.promptPersistence,avatarScale:i?.avatarScale,showPromptAvatar:i?.showPromptAvatar})})]})})}const rb=Object.freeze(Object.defineProperty({__proto__:null,ChatWidget:nb},Symbol.toStringTag,{value:"Module"}));function ob(){if("undefined"==typeof document)return;if(document.getElementById("botuyo-widget-styles"))return;const e=document.createElement("style");e.id="botuyo-widget-styles",e.textContent='@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-900:oklch(39.6% .141 25.723);--color-amber-500:oklch(76.9% .188 70.08);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-700:oklch(55.4% .135 66.442);--color-yellow-800:oklch(47.6% .114 61.907);--color-yellow-900:oklch(42.1% .095 57.708);--color-green-50:oklch(98.2% .018 155.826);--color-green-200:oklch(92.5% .084 155.995);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-green-900:oklch(39.3% .095 152.535);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-800:oklch(43.2% .095 166.913);--color-emerald-900:oklch(37.8% .077 168.94);--color-emerald-950:oklch(26.2% .051 172.552);--color-teal-500:oklch(70.4% .14 182.503);--color-teal-600:oklch(60% .118 184.704);--color-blue-50:oklch(97% .014 254.604);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-900:oklch(37.9% .146 265.522);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-md:28rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:1.33333;--text-sm:.875rem;--text-sm--line-height:1.42857;--text-base:1rem;--text-base--line-height:1.5;--text-lg:1.125rem;--text-lg--line-height:1.55556;--text-xl:1.25rem;--text-xl--line-height:1.4;--text-2xl:1.5rem;--text-2xl--line-height:1.33333;--text-3xl:1.875rem;--text-3xl--line-height:1.2;--text-4xl:2.25rem;--text-4xl--line-height:1.11111;--text-6xl:3.75rem;--text-6xl--line-height:1;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--shadow-lg:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0,0,.2,1)infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--animate-bounce:bounce 1s infinite;--blur-sm:8px;--blur-md:12px;--blur-2xl:40px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}::file-selector-button{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{border-width:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;white-space:nowrap;width:1px}.absolute,.sr-only{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing)*0)}.-top-1{top:calc(var(--spacing)*-1)}.-top-1\\.5{top:calc(var(--spacing)*-1.5)}.top-0{top:calc(var(--spacing)*0)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.top-3{top:calc(var(--spacing)*3)}.top-4{top:calc(var(--spacing)*4)}.-right-0\\.5{right:calc(var(--spacing)*-.5)}.-right-1{right:calc(var(--spacing)*-1)}.-right-1\\.5{right:calc(var(--spacing)*-1.5)}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-3{right:calc(var(--spacing)*3)}.right-4{right:calc(var(--spacing)*4)}.right-6{right:calc(var(--spacing)*6)}.-bottom-0\\.5{bottom:calc(var(--spacing)*-.5)}.-bottom-1{bottom:calc(var(--spacing)*-1)}.bottom-3{bottom:calc(var(--spacing)*3)}.bottom-4{bottom:calc(var(--spacing)*4)}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing)*0)}.left-1\\/2{left:50%}.left-4{left:calc(var(--spacing)*4)}.left-6{left:calc(var(--spacing)*6)}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\\[60\\]{z-index:60}.z-\\[9999\\]{z-index:9999}.z-\\[100000\\]{z-index:100000}.float-left{float:left}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-1{margin:calc(var(--spacing)*1)}.m-2{margin:calc(var(--spacing)*2)}.m-3{margin:calc(var(--spacing)*3)}.m-4{margin:calc(var(--spacing)*4)}.m-5{margin:calc(var(--spacing)*5)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-2{margin-inline:calc(var(--spacing)*2)}.mx-3{margin-inline:calc(var(--spacing)*3)}.mx-4{margin-inline:calc(var(--spacing)*4)}.mx-5{margin-inline:calc(var(--spacing)*5)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing)*1)}.my-2{margin-block:calc(var(--spacing)*2)}.my-3{margin-block:calc(var(--spacing)*3)}.my-4{margin-block:calc(var(--spacing)*4)}.my-5{margin-block:calc(var(--spacing)*5)}.my-8{margin-block:calc(var(--spacing)*8)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-5{margin-top:calc(var(--spacing)*5)}.mt-6{margin-top:calc(var(--spacing)*6)}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-3{margin-right:calc(var(--spacing)*3)}.mr-4{margin-right:calc(var(--spacing)*4)}.mr-5{margin-right:calc(var(--spacing)*5)}.mr-auto{margin-right:auto}.mb-0{margin-bottom:calc(var(--spacing)*0)}.mb-0\\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.mb-12{margin-bottom:calc(var(--spacing)*12)}.ml-0\\.5{margin-left:calc(var(--spacing)*.5)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-3{margin-left:calc(var(--spacing)*3)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-5{margin-left:calc(var(--spacing)*5)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-0{height:calc(var(--spacing)*0)}.h-1{height:calc(var(--spacing)*1)}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-14{height:calc(var(--spacing)*14)}.h-16{height:calc(var(--spacing)*16)}.h-20{height:calc(var(--spacing)*20)}.h-24{height:calc(var(--spacing)*24)}.h-32{height:calc(var(--spacing)*32)}.h-48{height:calc(var(--spacing)*48)}.h-56{height:calc(var(--spacing)*56)}.h-\\[44px\\]{height:44px}.h-auto{height:auto}.h-full{height:100%}.max-h-\\[90vh\\]{max-height:90vh}.max-h-\\[120px\\]{max-height:120px}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-\\[40px\\]{min-height:40px}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-0{width:calc(var(--spacing)*0)}.w-1{width:calc(var(--spacing)*1)}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-2\\.5{width:calc(var(--spacing)*2.5)}.w-3{width:calc(var(--spacing)*3)}.w-3\\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-14{width:calc(var(--spacing)*14)}.w-16{width:calc(var(--spacing)*16)}.w-20{width:calc(var(--spacing)*20)}.w-24{width:calc(var(--spacing)*24)}.w-\\[3px\\]{width:3px}.w-\\[350px\\]{width:350px}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.max-w-0{max-width:calc(var(--spacing)*0)}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\\[60px\\]{max-width:60px}.max-w-\\[85\\%\\]{max-width:85%}.max-w-\\[90\\%\\]{max-width:90%}.max-w-\\[350px\\]{max-width:350px}.max-w-full{max-width:100%}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[200px\\]{min-width:200px}.min-w-\\[350px\\]{min-width:350px}.flex-1{flex:1}.flex-shrink{flex-shrink:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.origin-bottom{transform-origin:bottom}.origin-bottom-left{transform-origin:0 100%}.origin-bottom-right{transform-origin:100% 100%}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.-translate-x-4{translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-4{--tw-translate-x:calc(var(--spacing)*-4)}.translate-x-0{--tw-translate-x:calc(var(--spacing)*0)}.translate-x-0,.translate-x-4{translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-4{--tw-translate-x:calc(var(--spacing)*4)}.-translate-y-1\\/2{--tw-translate-y:-50%}.-translate-y-1\\/2,.translate-y-0{translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing)*0)}.translate-y-8{--tw-translate-y:calc(var(--spacing)*8);translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-50{--tw-scale-x:50%;--tw-scale-y:50%;--tw-scale-z:50%}.scale-50,.scale-95{scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%}.scale-100,.scale-105{scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-105{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%}.scale-110{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-\\[0\\.85\\]{scale:.85}.-rotate-90{rotate:-90deg}.rotate-0{rotate:none}.rotate-45{rotate:45deg}.rotate-90{rotate:90deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-bounce{animation:var(--animate-bounce)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-wait{cursor:wait}.resize{resize:both}.resize-none{resize:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}.gap-8{gap:calc(var(--spacing)*8)}.gap-\\[2px\\]{gap:2px}.gap-\\[3px\\]{gap:3px}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-end:calc(var(--spacing)*1*(1 - var(--tw-space-y-reverse)));margin-block-start:calc(var(--spacing)*1*var(--tw-space-y-reverse))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-end:calc(var(--spacing)*2*(1 - var(--tw-space-y-reverse)));margin-block-start:calc(var(--spacing)*2*var(--tw-space-y-reverse))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-end:calc(var(--spacing)*3*(1 - var(--tw-space-y-reverse)));margin-block-start:calc(var(--spacing)*3*var(--tw-space-y-reverse))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-end:calc(var(--spacing)*4*(1 - var(--tw-space-y-reverse)));margin-block-start:calc(var(--spacing)*4*var(--tw-space-y-reverse))}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap}.overflow-hidden,.truncate{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.scroll-smooth{scroll-behavior:smooth}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\\[18px\\]{border-radius:18px}.rounded-\\[24px\\]{border-radius:24px}.rounded-\\[28px\\]{border-radius:28px}.rounded-\\[32px\\]{border-radius:32px}.rounded-full{border-radius:3.40282e+38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-none{border-radius:0}.rounded-xl{border-radius:var(--radius-xl)}.rounded-l-\\[4px\\]{border-bottom-left-radius:4px}.rounded-l-\\[4px\\],.rounded-tl-\\[4px\\]{border-top-left-radius:4px}.rounded-r-\\[4px\\]{border-bottom-right-radius:4px}.rounded-r-\\[4px\\],.rounded-tr-\\[4px\\]{border-top-right-radius:4px}.rounded-br-\\[4px\\]{border-bottom-right-radius:4px}.rounded-bl-\\[4px\\]{border-bottom-left-radius:4px}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-\\[hsl\\(210\\,90\\%\\,50\\%\\)\\]{border-color:#0d80f2}.border-blue-200{border-color:var(--color-blue-200)}.border-emerald-200{border-color:var(--color-emerald-200)}.border-gray-200{border-color:var(--color-gray-200)}.border-green-200{border-color:var(--color-green-200)}.border-red-200{border-color:var(--color-red-200)}.border-yellow-200{border-color:var(--color-yellow-200)}.border-yellow-300{border-color:var(--color-yellow-300)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\\/20{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\\/20{background-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}}.bg-black\\/5{background-color:#0000000d}@supports (color:color-mix(in lab,red,red)){.bg-black\\/5{background-color:color-mix(in oklab,var(--color-black)5%,transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-black\\/70{background-color:#000000b3}@supports (color:color-mix(in lab,red,red)){.bg-black\\/70{background-color:color-mix(in oklab,var(--color-black)70%,transparent)}}.bg-black\\/95{background-color:#000000f2}@supports (color:color-mix(in lab,red,red)){.bg-black\\/95{background-color:color-mix(in oklab,var(--color-black)95%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-500\\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/20{background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.bg-blue-600{background-color:var(--color-blue-600)}.bg-current,.bg-current\\/20{background-color:currentColor}@supports (color:color-mix(in lab,red,red)){.bg-current\\/20{background-color:color-mix(in oklab,currentcolor 20%,transparent)}}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\\/10{background-color:color-mix(in oklab,var(--color-emerald-500)10%,transparent)}}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-gray-500\\/20{background-color:#6a728233}@supports (color:color-mix(in lab,red,red)){.bg-gray-500\\/20{background-color:color-mix(in oklab,var(--color-gray-500)20%,transparent)}}.bg-green-50{background-color:var(--color-green-50)}.bg-green-500{background-color:var(--color-green-500)}.bg-green-500\\/10{background-color:#00c7581a}@supports (color:color-mix(in lab,red,red)){.bg-green-500\\/10{background-color:color-mix(in oklab,var(--color-green-500)10%,transparent)}}.bg-green-500\\/20{background-color:#00c75833}@supports (color:color-mix(in lab,red,red)){.bg-green-500\\/20{background-color:color-mix(in oklab,var(--color-green-500)20%,transparent)}}.bg-purple-500{background-color:var(--color-purple-500)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/10{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.bg-red-500\\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/20{background-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.bg-white\\/10{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.bg-white\\/80{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.bg-white\\/80{background-color:color-mix(in oklab,var(--color-white)80%,transparent)}}.bg-yellow-50{background-color:var(--color-yellow-50)}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab}.bg-gradient-to-b,.bg-gradient-to-br{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab}.bg-gradient-to-r{--tw-gradient-position:to right in oklab}.bg-gradient-to-r,.bg-gradient-to-t{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-t{--tw-gradient-position:to top in oklab}.from-black\\/40{--tw-gradient-from:#0006}@supports (color:color-mix(in lab,red,red)){.from-black\\/40{--tw-gradient-from:color-mix(in oklab,var(--color-black)40%,transparent)}}.from-black\\/40{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-black\\/60{--tw-gradient-from:#0009}@supports (color:color-mix(in lab,red,red)){.from-black\\/60{--tw-gradient-from:color-mix(in oklab,var(--color-black)60%,transparent)}}.from-black\\/60{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-blue-50{--tw-gradient-from:var(--color-blue-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-emerald-400{--tw-gradient-from:var(--color-emerald-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-emerald-500{--tw-gradient-from:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.via-transparent{--tw-gradient-via:transparent;--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-black\\/20{--tw-gradient-to:#0003}@supports (color:color-mix(in lab,red,red)){.to-black\\/20{--tw-gradient-to:color-mix(in oklab,var(--color-black)20%,transparent)}}.to-black\\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-green-50{--tw-gradient-to:var(--color-green-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-teal-500{--tw-gradient-to:var(--color-teal-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-teal-600{--tw-gradient-to:var(--color-teal-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.fill-current{fill:currentColor}.stroke-\\[2\\.5\\]{stroke-width:2.5px}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:calc(var(--spacing)*1)}.p-1\\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-10{padding-inline:calc(var(--spacing)*10)}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-5{padding-block:calc(var(--spacing)*5)}.py-12{padding-block:calc(var(--spacing)*12)}.py-16{padding-block:calc(var(--spacing)*16)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-5{padding-top:calc(var(--spacing)*5)}.pr-1{padding-right:calc(var(--spacing)*1)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-3{padding-right:calc(var(--spacing)*3)}.pr-4{padding-right:calc(var(--spacing)*4)}.pr-5{padding-right:calc(var(--spacing)*5)}.pr-8{padding-right:calc(var(--spacing)*8)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pb-5{padding-bottom:calc(var(--spacing)*5)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-2{padding-left:calc(var(--spacing)*2)}.pl-3{padding-left:calc(var(--spacing)*3)}.pl-4{padding-left:calc(var(--spacing)*4)}.pl-5{padding-left:calc(var(--spacing)*5)}.text-center{text-align:center}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[7px\\]{font-size:7px}.text-\\[8px\\]{font-size:8px}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[0\\.1em\\]{--tw-tracking:.1em;letter-spacing:.1em}.tracking-\\[0\\.2em\\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-tighter{--tw-tracking:var(--tracking-tighter);letter-spacing:var(--tracking-tighter)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.text-amber-500{color:var(--color-amber-500)}.text-blue-500{color:var(--color-blue-500)}.text-blue-700{color:var(--color-blue-700)}.text-blue-900{color:var(--color-blue-900)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-900{color:var(--color-emerald-900)}.text-gray-600{color:var(--color-gray-600)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-green-700{color:var(--color-green-700)}.text-green-900{color:var(--color-green-900)}.text-purple-500{color:var(--color-purple-500)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-900{color:var(--color-red-900)}.text-white{color:var(--color-white)}.text-yellow-700{color:var(--color-yellow-700)}.text-yellow-800{color:var(--color-yellow-800)}.text-yellow-900{color:var(--color-yellow-900)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-20{opacity:.2}.opacity-25{opacity:.25}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a)}.shadow,.shadow-inner{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a)}.shadow-lg,.shadow-md{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a)}.ring,.shadow-sm{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-\\[hsl\\(210\\,90\\%\\,50\\%\\)\\]\\/30{--tw-ring-color:oklab(60.6854% -.0507387 -.187037/.3)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px)}.blur,.blur-2xl{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.blur-2xl{--tw-blur:blur(var(--blur-2xl))}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md))}.backdrop-blur-md,.backdrop-blur-sm{-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm))}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-all{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-colors{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-opacity{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-transform{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-400{--tw-duration:.4s;transition-duration:.4s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-700{--tw-duration:.7s;transition-duration:.7s}.duration-1000{--tw-duration:1s;transition-duration:1s}.ease-\\[cubic-bezier\\(0\\.16\\,1\\,0\\.3\\,1\\)\\]{--tw-ease:cubic-bezier(.16,1,.3,1);transition-timing-function:cubic-bezier(.16,1,.3,1)}.ease-\\[cubic-bezier\\(0\\.34\\,1\\.56\\,0\\.64\\,1\\)\\]{--tw-ease:cubic-bezier(.34,1.56,.64,1);transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.\\[animation-delay\\:-0\\.3s\\]{animation-delay:-.3s}.\\[animation-delay\\:-0\\.15s\\]{animation-delay:-.15s}@media(hover:hover){.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.last\\:mb-0:last-child{margin-bottom:calc(var(--spacing)*0)}@media(hover:hover){.hover\\:-translate-y-1:hover{--tw-translate-y:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.hover\\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\\:scale-\\[1\\.02\\]:hover{scale:1.02}.hover\\:rotate-6:hover{rotate:6deg}.hover\\:border-\\[hsl\\(210\\,90\\%\\,70\\%\\)\\]:hover{border-color:#6eb3f7}.hover\\:bg-blue-600:hover{background-color:var(--color-blue-600)}.hover\\:bg-blue-700:hover{background-color:var(--color-blue-700)}.hover\\:bg-emerald-500\\/20:hover{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-emerald-500\\/20:hover{background-color:color-mix(in oklab,var(--color-emerald-500)20%,transparent)}}.hover\\:bg-gray-600:hover{background-color:var(--color-gray-600)}.hover\\:bg-green-600:hover{background-color:var(--color-green-600)}.hover\\:bg-purple-600:hover{background-color:var(--color-purple-600)}.hover\\:bg-red-500\\/30:hover{background-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-red-500\\/30:hover{background-color:color-mix(in oklab,var(--color-red-500)30%,transparent)}}.hover\\:bg-red-600:hover{background-color:var(--color-red-600)}.hover\\:bg-white\\/20:hover{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/20:hover{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-90:hover{opacity:.9}.hover\\:opacity-100:hover{opacity:1}.hover\\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\:underline:focus{text-decoration-line:underline}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-emerald-500:focus{--tw-ring-color:var(--color-emerald-500)}.focus\\:ring-red-500:focus{--tw-ring-color:var(--color-red-500)}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.active\\:scale-90:active{--tw-scale-x:90%;--tw-scale-y:90%;--tw-scale-z:90%;scale:var(--tw-scale-x)var(--tw-scale-y)}.active\\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.disabled\\:opacity-30:disabled{opacity:.3}.disabled\\:opacity-50:disabled{opacity:.5}.disabled\\:grayscale:disabled{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}@media(min-width:40rem){.sm\\:h-8{height:calc(var(--spacing)*8)}.sm\\:h-16{height:calc(var(--spacing)*16)}.sm\\:w-8{width:calc(var(--spacing)*8)}.sm\\:w-16{width:calc(var(--spacing)*16)}.sm\\:w-auto{width:auto}.sm\\:max-w-\\[75\\%\\]{max-width:75%}}@media(prefers-color-scheme:dark){.dark\\:border-emerald-800{border-color:var(--color-emerald-800)}.dark\\:bg-black\\/80{background-color:#000c}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-black\\/80{background-color:color-mix(in oklab,var(--color-black)80%,transparent)}}.dark\\:bg-emerald-950{background-color:var(--color-emerald-950)}.dark\\:bg-white\\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-white\\/10{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.dark\\:text-emerald-50{color:var(--color-emerald-50)}}}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}@media(prefers-contrast:high){:root{--border-width:2px;--focus-ring-width:3px;--focus-ring-color:hsl(var(--primary))}[role=button],[role=dialog],button,input,textarea{border-width:var(--border-width)!important}:focus-visible{outline:var(--focus-ring-width)solid var(--focus-ring-color)!important;outline-offset:2px!important}body{--foreground:0 0% 0%;--background:0 0% 100%;--muted-foreground:0 0% 20%}.dark{--foreground:0 0% 100%;--background:0 0% 0%;--muted-foreground:0 0% 80%}[class*=opacity-],[style*=opacity]{opacity:1!important}}@media(prefers-reduced-motion:reduce){*,:after,:before{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}.animate-pulse,[data-state=closed],[data-state=open]{animation:none!important}.scroll-smooth{scroll-behavior:auto!important}}:focus-visible{border-radius:var(--radius,.5rem);outline:2px solid hsl(var(--primary));outline-offset:2px}[role=button]:focus-visible,button:focus-visible{box-shadow:0 0 0 4px hsl(var(--primary)/.1);outline:2px solid hsl(var(--primary));outline-offset:2px}input:focus-visible,textarea:focus-visible{border-color:hsl(var(--primary));box-shadow:0 0 0 3px hsl(var(--primary)/.1);outline:2px solid hsl(var(--primary));outline-offset:0}body:has(:focus-visible) [tabindex]:not([tabindex="-1"]){position:relative}.skip-link{background:hsl(var(--primary));border-radius:0 0 4px;color:hsl(var(--primary-foreground));left:0;padding:8px;position:absolute;text-decoration:none;top:-40px;z-index:100000}.skip-link:focus{top:0}@media(prefers-color-scheme:dark)and (prefers-contrast:high){:root{--primary:48 96% 89%;--destructive:0 84% 60%;--success:142 76% 36%}}[data-state]:after{content:attr(data-state);clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}@media(min-resolution:192dpi){body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}}[data-tooltip]:focus:after,[data-tooltip]:hover:after{background:hsl(var(--popover));border-radius:4px;bottom:100%;color:hsl(var(--popover-foreground));content:attr(data-tooltip);font-size:12px;left:50%;padding:4px 8px;pointer-events:none;position:absolute;transform:translate(-50%);white-space:nowrap;z-index:1000}[aria-live=assertive],[aria-live=polite]{position:relative}@keyframes live-region-update{0%{opacity:.8}to{opacity:1}}[aria-live]:not([aria-atomic=false]):has(:new){animation:live-region-update .2s ease-in-out}.scrollbar-none{scrollbar-width:none;-ms-overflow-style:none}.scrollbar-none::-webkit-scrollbar{display:none;height:0;width:0}.scrollbar-thin{scrollbar-width:thin}.scrollbar-thin::-webkit-scrollbar{height:4px;width:4px}.scrollbar-thin::-webkit-scrollbar-track{background:0 0}.scrollbar-thin::-webkit-scrollbar-thumb{background:hsl(var(--border));border-radius:2px}.scrollbar-thin::-webkit-scrollbar-thumb:hover{background:hsl(var(--muted-foreground)/.5)}.hidden{display:none!important}.block{display:block!important}.flex{display:flex!important}.inline-flex{display:inline-flex!important}.grid{display:grid!important}.flex-row{flex-direction:row!important}.flex-col{flex-direction:column!important}.flex-1{flex:1!important}.flex-none{flex:none!important}.shrink-0{flex-shrink:0!important}.grow{flex-grow:1!important}.items-center{align-items:center!important}.items-start{align-items:flex-start!important}.items-end{align-items:flex-end!important}.justify-center{justify-content:center!important}.justify-between{justify-content:space-between!important}.justify-end{justify-content:flex-end!important}.relative{position:relative!important}.absolute{position:absolute!important}.fixed{position:fixed!important}.inset-0{inset:0!important}.w-full{width:100%!important}.h-full{height:100%!important}.w-fit{width:-moz-fit-content!important;width:fit-content!important}.w-auto{width:auto!important}.h-auto{height:auto!important}.h-0{height:0!important}.w-0{width:0!important}.h-6{height:1.5rem!important}.w-6{width:1.5rem!important}.h-7{height:1.75rem!important}.w-7{width:1.75rem!important}.h-8{height:2rem!important}.w-8{width:2rem!important}.h-14{height:3.5rem!important}.w-14{width:3.5rem!important}.min-h-0{min-height:0!important}.min-w-0{min-width:0!important}.overflow-hidden{overflow:hidden!important}.overflow-auto{overflow:auto!important}.overflow-y-auto{overflow-y:auto!important}.gap-1{gap:.25rem!important}.gap-2{gap:.5rem!important}.gap-3{gap:.75rem!important}.gap-4{gap:1rem!important}.p-1{padding:.25rem!important}.p-2{padding:.5rem!important}.p-3{padding:.75rem!important}.p-4{padding:1rem!important}.px-4{padding-left:1rem!important;padding-right:1rem!important}.py-2{padding-bottom:.5rem!important;padding-top:.5rem!important}.m-0{margin:0!important}.mt-2{margin-top:.5rem!important}.mt-4{margin-top:1rem!important}.mb-2{margin-bottom:.5rem!important}.ml-auto{margin-left:auto!important}.rounded{border-radius:.25rem!important}.rounded-lg{border-radius:.5rem!important}.rounded-xl{border-radius:.75rem!important}.rounded-2xl{border-radius:1rem!important}.rounded-full{border-radius:9999px!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.font-medium{font-weight:500!important}.font-semibold{font-weight:600!important}.font-bold{font-weight:700!important}.font-black{font-weight:900!important}.uppercase{text-transform:uppercase!important}.truncate{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.text-foreground{color:hsl(var(--foreground))!important}.text-muted-foreground{color:hsl(var(--muted-foreground))!important}.text-primary{color:hsl(var(--primary))!important}.text-primary-foreground{color:hsl(var(--primary-foreground))!important}.text-destructive{color:hsl(var(--destructive))!important}.text-white{color:#fff!important}.bg-background{background-color:hsl(var(--background))!important}.bg-muted{background-color:hsl(var(--muted))!important}.bg-primary{background-color:hsl(var(--primary))!important}.bg-card{background-color:hsl(var(--card))!important}.bg-transparent{background-color:#0000!important}.border{border-width:1px!important}.border-2{border-width:2px!important}.border-b{border-bottom-width:1px!important}.border-t{border-top-width:1px!important}.border-border{border-color:hsl(var(--border))!important}.shadow{box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a!important}.shadow-lg{box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a!important}.shadow-xl{box-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a!important}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.transition,.transition-all{transition-duration:.15s!important}.transition-all{transition-property:all!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.duration-300{transition-duration:.3s!important}.duration-500{transition-duration:.5s!important}.opacity-0{opacity:0!important}.opacity-100{opacity:1!important}.scale-95{transform:scale(.95)!important}.scale-100{transform:scale(1)!important}.translate-y-full{transform:translateY(100%)!important}.z-10{z-index:10!important}.z-20{z-index:20!important}.z-50{z-index:50!important}.pointer-events-none{pointer-events:none!important}.pointer-events-auto{pointer-events:auto!important}.cursor-pointer{cursor:pointer!important}.select-none{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}@keyframes spin{to{transform:rotate(1turn)}}#botuyo-chat-widget,#botuyo-chat-widget-root,:root{--background:0 0% 100%;--foreground:240 10% 3.9%;--card:0 0% 100%;--card-foreground:240 10% 3.9%;--popover:0 0% 100%;--popover-foreground:240 10% 3.9%;--primary:160 84% 39%;--primary-foreground:0 0% 100%;--muted:240 4.8% 95.9%;--muted-foreground:240 3.8% 46.1%;--accent:240 4.8% 95.9%;--accent-foreground:240 5.9% 10%;--destructive:0 84.2% 60.2%;--destructive-foreground:0 0% 98%;--border:240 5.9% 90%;--input:240 5.9% 90%;--ring:160 84% 39%;--radius:.5rem;--spacing1:.25rem;--spacing2:.5rem;--spacing3:.75rem;--spacing4:1rem;--spacing5:.75rem;--spacing6:1.5rem;--spacing8:2rem}#botuyo-chat-widget-root.dark,#botuyo-chat-widget.dark,.dark{--background:240 10% 3.9%;--foreground:0 0% 98%;--card:240 10% 3.9%;--card-foreground:0 0% 98%;--popover:240 10% 3.9%;--popover-foreground:0 0% 98%;--primary:160 84% 39%;--primary-foreground:0 0% 100%;--muted:240 3.7% 15.9%;--muted-foreground:240 5% 64.9%;--accent:240 3.7% 15.9%;--accent-foreground:0 0% 98%;--destructive:0 62.8% 30.6%;--destructive-foreground:0 0% 98%;--border:240 3.7% 15.9%;--input:240 3.7% 15.9%;--ring:160 84% 39%}#botuyo-chat-widget-root,#botuyo-chat-widget-root *{box-sizing:border-box;margin:0;padding:0}#botuyo-chat-widget-root{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:hsl(var(--foreground));font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;line-height:1.5}@keyframes slideInRight{0%{opacity:0;transform:translate(100%)}to{opacity:1;transform:translate(0)}}@keyframes slideOutRight{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(100%)}}@keyframes slideInUp{0%{opacity:0;transform:translateY(100%)}to{opacity:1;transform:translateY(0)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}#botuyo-chat-widget-root .chat-launcher{align-items:center;background-color:hsl(var(--primary));border-radius:50%;bottom:1.5rem;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;color:#fff;cursor:pointer;display:flex;height:60px;justify-content:center;position:fixed;right:1.5rem;transition:all .2s;width:60px;z-index:999999}#botuyo-chat-widget-root .chat-launcher:hover{box-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;transform:scale(1.05)}#botuyo-chat-widget-root .chat-launcher.position-bottom-left{left:1.5rem;right:auto}#botuyo-chat-widget-root .chat-launcher.position-top-right{bottom:auto;top:1.5rem}#botuyo-chat-widget-root .chat-launcher.position-top-left{inset:1.5rem auto auto 1.5rem}#botuyo-chat-widget-root .chat-window{animation:slideInRight .3s ease-out;background-color:hsl(var(--background));border-radius:1rem;bottom:6rem;box-shadow:0 25px 50px -12px #00000040;display:flex;flex-direction:column;height:600px;max-height:calc(100vh - 8rem);overflow:hidden;position:fixed;right:1.5rem;width:400px;z-index:999999}#botuyo-chat-widget-root .chat-window.closing{animation:slideOutRight .2s ease-in}@media(max-width:640px){#botuyo-chat-widget-root .chat-window{animation:slideInUp .3s ease-out;border-radius:0;height:100%;inset:0;max-height:100vh;width:100%}}#botuyo-chat-widget-root .message-bubble{word-wrap:break-word;border-radius:1rem;max-width:80%;padding:.75rem 1rem}#botuyo-chat-widget-root .message-bubble.user{background-color:hsl(var(--primary));color:hsl(var(--primary-foreground));margin-left:auto}#botuyo-chat-widget-root .message-bubble.bot{background-color:hsl(var(--muted));color:hsl(var(--foreground))}#botuyo-chat-widget-root .chat-messages::-webkit-scrollbar{width:6px}#botuyo-chat-widget-root .chat-messages::-webkit-scrollbar-track{background:0 0}#botuyo-chat-widget-root .chat-messages::-webkit-scrollbar-thumb{background:hsl(var(--muted));border-radius:3px}#botuyo-chat-widget-root .chat-messages::-webkit-scrollbar-thumb:hover{background:hsl(var(--muted-foreground))}#botuyo-chat-widget-root .chat-input{background-color:hsl(var(--background));border:1px solid hsl(var(--border));border-radius:.5rem;color:hsl(var(--foreground));outline:none;padding:.75rem;transition:border-color .2s;width:100%}#botuyo-chat-widget-root .chat-input:focus{border-color:hsl(var(--primary));box-shadow:0 0 0 3px hsl(var(--primary)/.1)}@media(max-width:640px){#botuyo-chat-widget-root .chat-launcher{bottom:1rem;height:56px;right:1rem;width:56px}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}',document.head.appendChild(e)}ob();const ib=k.lazy(()=>Promise.resolve().then(()=>rb).then(e=>({default:e.ChatWidget})));class ab{root=null;container=null;config=null;init(e){return ob(),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=x.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,mediaConfig:this.config.mediaConfig,onNavigate:this.config.onNavigate,onLogin:this.config.onLogin,onEvent:this.config.onEvent,onStateChange:this.config.onStateChange,onVoiceCall:this.config.onVoiceCall},t=S.createElement(k.Suspense,{fallback:S.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"}},S.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"}}))},S.createElement(ib,e));this.root.render(S.createElement(O,{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 sb=new ab;window.BotUyoChat=sb;const lb=k.memo(function({url:e,isBot:t,primaryColor:n}){const[r,o]=k.useState(!1),[i,a]=k.useState(0),[s,l]=k.useState(0),[c,u]=k.useState(!0),[d,f]=k.useState(null),p=k.useRef(null),h=k.useMemo(()=>Ft({primaryColor:n}),[n]),m=k.useCallback(()=>{d||(r?p.current?.pause():p.current?.play().catch(e=>{console.error("[AudioPlayer] Play error:",e),f("Error al reproducir")}),o(!r))},[r,d]),g=k.useCallback(()=>{a(p.current?.duration||0)},[]),b=k.useCallback(()=>{u(!1),f(null)},[]),y=k.useCallback(()=>{console.error("[AudioPlayer] Failed to load audio:",e),u(!1),f("No se pudo cargar")},[e]),v=k.useCallback(()=>{u(!0),f(null),p.current&&p.current.load()},[]);return A.jsxs("div",{className:At("flex items-center gap-3 py-1 min-w-[200px]",t?"text-foreground":"text-primary-foreground"),children:[A.jsx("audio",{ref:p,src:e,preload:"metadata",onLoadedMetadata:g,onCanPlayThrough:b,onTimeUpdate:()=>l(p.current?.currentTime||0),onEnded:()=>o(!1),onError:y}),d?A.jsx("button",{onClick:v,className:"w-8 h-8 rounded-full flex items-center justify-center shrink-0 bg-red-500/20 text-red-500 hover:bg-red-500/30 transition-colors",title:"Reintentar",children:A.jsx(ae,{className:"w-4 h-4"})}):A.jsx("button",{onClick:m,disabled:c,className:"w-8 h-8 rounded-full flex items-center justify-center shrink-0 transition-opacity",style:{backgroundColor:t?h:"hsl(var(--card))",color:t?"white":h,opacity:c?.6:1},children:c?A.jsx(J,{className:"w-4 h-4 animate-spin"}):r?A.jsx(te,{className:"w-4 h-4 fill-current"}):A.jsx(oe,{className:"w-4 h-4 fill-current ml-0.5"})}),A.jsx("div",{className:"flex-1 space-y-1",children:d?A.jsxs("div",{className:"flex items-center gap-1.5 text-red-500",children:[A.jsx(H,{className:"w-3 h-3"}),A.jsx("span",{className:"text-[9px] font-bold",children:d})]}):A.jsxs(A.Fragment,{children:[A.jsx("div",{className:"relative h-1 w-full bg-current/20 rounded-full overflow-hidden",children:A.jsx("div",{className:"absolute h-full bg-current rounded-full transition-all",style:{width:`${s/i*100||0}%`}})}),A.jsxs("div",{className:"flex justify-between text-[9px] font-bold opacity-60",children:[A.jsxs("span",{children:[Math.floor(s/60),":",Math.floor(s%60).toString().padStart(2,"0")]}),A.jsx("span",{children:c?"--:--":`${Math.floor(i/60)}:${Math.floor(i%60).toString().padStart(2,"0")}`})]})]})})]})}),cb=Object.freeze(Object.defineProperty({__proto__:null,AudioPlayer:lb},Symbol.toStringTag,{value:"Module"})),ub=k.memo(function({images:e,radius:t="rounded-lg"}){const{t:n}=P("extracted"),[r,o]=k.useState(0),[i,a]=k.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]=k.useState(new Set),f=e=>{d(t=>new Set(t).add(e))};return 1===e.length?A.jsx("div",{className:"my-3 relative group",children:u.has(0)?A.jsxs("div",{className:At("w-full h-48 flex flex-col items-center justify-center","border bg-muted text-muted-foreground",t),style:{borderColor:"hsl(var(--border))"},children:[A.jsx("svg",{className:"w-12 h-12 mb-2 opacity-50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.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"})}),A.jsx("span",{className:"text-sm",children:"Imagen no disponible"})]}):A.jsxs(A.Fragment,{children:[A.jsx("img",{src:e[0].src,alt:e[0].alt||"Imagen",className:At("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)}),A.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:A.jsx(fe,{size:16,className:"text-white"})})]})}):e.length<=3?A.jsxs("div",{className:At("my-3 grid gap-2",2===e.length?"grid-cols-2":"grid-cols-3"),children:[e.map((n,r)=>A.jsx("div",{className:"relative group overflow-hidden",children:u.has(r)?A.jsx("div",{className:At("w-full h-32 flex flex-col items-center justify-center","border bg-muted text-muted-foreground",t),children:A.jsx("svg",{className:"w-8 h-8 opacity-50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.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"})})}):A.jsxs(A.Fragment,{children:[A.jsx("img",{src:n.src,alt:n.alt||`Imagen ${r+1}`,className:At("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)}),A.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:A.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&&A.jsx(db,{images:e,currentIndex:r,onClose:()=>a(!1),onNext:s,onPrev:l})]}):A.jsxs("div",{className:"my-3 space-y-2",children:[A.jsx("div",{className:"relative group",children:u.has(r)?A.jsxs("div",{className:At("w-full h-56 flex flex-col items-center justify-center","border bg-muted text-muted-foreground",t),style:{borderColor:"hsl(var(--border))"},children:[A.jsx("svg",{className:"w-12 h-12 mb-2 opacity-50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.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"})}),A.jsx("span",{className:"text-sm",children:"Imagen no disponible"})]}):A.jsxs(A.Fragment,{children:[A.jsx("img",{src:e[r].src,alt:e[r].alt||`Imagen ${r+1}`,className:At("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)}),A.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:[A.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:A.jsx($,{size:20})}),A.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:A.jsx(V,{size:20})})]}),A.jsx("div",{className:"absolute top-3 right-3 bg-black/70 backdrop-blur-sm px-3 py-1 rounded-full",children:A.jsxs("span",{className:"text-white text-xs font-bold",children:[r+1," / ",e.length]})}),A.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:A.jsx(fe,{size:16,className:"text-white"})})]})}),A.jsx("div",{className:"flex gap-2 overflow-x-auto pb-2 scrollbar-thin scrollbar-thumb-border scrollbar-track-transparent",children:e.map((e,n)=>A.jsx("button",{onClick:()=>o(n),className:At("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)?A.jsx("div",{className:"w-full h-full flex items-center justify-center bg-muted",children:A.jsx("svg",{className:"w-6 h-6 opacity-50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.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"})})}):A.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&&A.jsx(db,{images:e,currentIndex:r,onClose:()=>a(!1),onNext:s,onPrev:l})]})});function db({images:e,currentIndex:t,onClose:n,onNext:r,onPrev:o}){const{t:i}=P("extracted");return A.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:[A.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:A.jsx(de,{size:24,className:"text-white"})}),A.jsx("div",{className:"absolute top-4 left-4 bg-white/10 backdrop-blur-sm px-4 py-2 rounded-full z-10",children:A.jsxs("span",{className:"text-white text-sm font-bold",children:[t+1," / ",e.length]})}),e.length>1&&A.jsxs(A.Fragment,{children:[A.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:A.jsx($,{size:32,className:"text-white"})}),A.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:A.jsx(V,{size:32,className:"text-white"})})]}),A.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 fb=Object.freeze(Object.defineProperty({__proto__:null,Gallery:ub},Symbol.toStringTag,{value:"Module"}));function pb(e,t){return new Promise(function(n,r){let o;return hb(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 hb=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 mb,gb,bb,yb={},vb={get exports(){return yb},set exports(e){yb=e}};bb={},vb.exports=bb,bb.parse=function(e,t){for(var n=bb.bin.readUshort,r=bb.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,bb._readLocal(a,g,i,c,f,t)}return i},bb._readLocal=function(e,t,n,r,o,i){var a=bb.bin.readUshort,s=bb.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=bb.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);bb.inflateRaw(f,p),n[d]=p}}},bb.inflateRaw=function(e,t){return bb.F.inflate(e,t)},bb.inflate=function(e,t){return e[0],e[1],bb.inflateRaw(new Uint8Array(e.buffer,e.byteOffset+2,e.length-6),t)},bb.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=bb.F.deflateRaw(e,r,n,t.level);var o=bb.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)},bb.deflateRaw=function(e,t){null==t&&(t={level:6});var n=new Uint8Array(50+Math.floor(1.1*e.length)),r=bb.F.deflateRaw(e,n,r,t.level);return new Uint8Array(n.buffer,0,r)},bb.encode=function(e,t){null==t&&(t=!1);var n=0,r=bb.bin.writeUint,o=bb.bin.writeUshort,i={};for(var a in e){var s=!bb._noNeed(a)&&!t,l=e[a],c=bb.crc.crc(l,0,l.length);i[a]={cpr:s,usize:l.length,crc:c,file:s?bb.deflateRaw(l):l}}for(var a in i)n+=i[a].file.length+30+46+2*bb.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=bb._writeHeader(u,d,a,p,0)}var h=0,m=d;for(var a in i)p=i[a],f.push(d),d=bb._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},bb._noNeed=function(e){var t=e.split(".").pop().toLowerCase();return-1!="png,jpg,jpeg,zip".indexOf(t)},bb._writeHeader=function(e,t,n,r,o,i){var a=bb.bin.writeUint,s=bb.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,bb.bin.sizeUTF8(n)),s(e,t+=2,0),t+=2,1==o&&(t+=2,t+=2,a(e,t+=6,i),t+=4),t+=bb.bin.writeUTF8(e,t,n),0==o&&(e.set(l,t),t+=l.length),t},bb.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=bb.crc.table[255&(e^t[n+o])]^e>>>8;return e},crc:function(e,t,n){return 4294967295^bb.crc.update(4294967295,e,t,n)}},bb.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},bb.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+="%"+bb.bin.pad(e[t+i].toString(16));try{r=decodeURIComponent(o)}catch(a){return bb.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}},bb.F={},bb.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=bb.F.U,a=bb.F._goodIndex;bb.F._hash;var s=bb.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=bb.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,b=0,y=0,v=0,w=0;for(d>2&&(p[w=bb.F._hash(e,0)]=0),l=0;l<d;l++){if(v=w,l+1<d-2){w=bb.F._hash(e,l+1);var x=l+1&32767;h[x]=p[w],p[w]=x}if(u<=l){(m>14e3||g>26697)&&d-l>100&&(u<l&&(f[m]=l-u,m+=2,u=l),c=bb.F._writeBlock(l==d-1||u==d?1:0,f,m,y,e,b,l-b,t,c),m=g=y=0,b=l);var k=0;l<d-2&&(k=bb.F._bestMatch(e,l,h,v,Math.min(o[2],d-l),o[3]));var S=k>>>16,_=65535&k;if(0!=k){_=65535&k;var C=a(S=k>>>16,i.of0);i.lhst[257+C]++;var E=a(_,i.df0);i.dhst[E]++,y+=i.exb[C]+i.dxb[E],f[m]=S<<23|l-u,f[m+1]=_<<16|C<<8|E,m+=2,u=l+S}else i.lhst[e[l]]++;g++}}for(b==l&&0!=e.length||(u<l&&(f[m]=l-u,m+=2,u=l),c=bb.F._writeBlock(1,f,m,y,e,b,l-b,t,c),m=0,g=0,m=g=y=0,b=l);7&c;)c++;return c>>>3},bb.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!=bb.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=bb.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},bb.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},bb.F._hash=function(e,t){return(e[t]<<8|e[t+1])+(e[t+2]<<4)&65535},bb.saved=0,bb.F._writeBlock=function(e,t,n,r,o,i,a,s,l){var c,u,d,f,p,h,m,g,b,y=bb.F.U,v=bb.F._putsF,w=bb.F._putsE;y.lhst[256]++,u=(c=bb.F.getTrees())[0],d=c[1],f=c[2],p=c[3],h=c[4],m=c[5],g=c[6],b=c[7];var x=32+(l+3&7?8-(l+3&7):0)+(a<<3),k=r+bb.F.contSize(y.fltree,y.lhst)+bb.F.contSize(y.fdtree,y.dhst),S=r+bb.F.contSize(y.ltree,y.lhst)+bb.F.contSize(y.dtree,y.dhst);S+=14+3*m+bb.F.contSize(y.itree,y.ihst)+(2*y.ihst[16]+3*y.ihst[17]+7*y.ihst[18]);for(var _=0;_<286;_++)y.lhst[_]=0;for(_=0;_<30;_++)y.dhst[_]=0;for(_=0;_<19;_++)y.ihst[_]=0;var C=x<k&&x<S?0:k<S?1:2;if(v(s,l,e),v(s,l+1,C),l+=3,0==C){for(;7&l;)l++;l=bb.F._copyExact(o,i,a,s,l)}else{var E,z;if(1==C&&(E=y.fltree,z=y.fdtree),2==C){bb.F.makeCodes(y.ltree,u),bb.F.revCodes(y.ltree,u),bb.F.makeCodes(y.dtree,d),bb.F.revCodes(y.dtree,d),bb.F.makeCodes(y.itree,f),bb.F.revCodes(y.itree,f),E=y.ltree,z=y.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,y.itree[1+(y.ordr[A]<<1)]);l+=3*m,l=bb.F._codeTiny(g,y.itree,s,l),l=bb.F._codeTiny(b,y.itree,s,l)}for(var N=i,T=0;T<n;T+=2){for(var j=t[T],I=j>>>23,O=N+(8388607&j);N<O;)l=bb.F._writeLit(o[N++],E,s,l);if(0!=I){var M=t[T+1],P=M>>16,F=M>>8&255,L=255&M;w(s,l=bb.F._writeLit(257+F,E,s,l),I-y.of0[F]),l+=y.exb[F],v(s,l=bb.F._writeLit(L,z,s,l),P-y.df0[L]),l+=y.dxb[L],N+=I}}l=bb.F._writeLit(256,E,s,l)}return l},bb.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)},bb.F.getTrees=function(){for(var e=bb.F.U,t=bb.F._hufTree(e.lhst,e.ltree,15),n=bb.F._hufTree(e.dhst,e.dtree,15),r=[],o=bb.F._lenCodes(e.ltree,r),i=[],a=bb.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=bb.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]},bb.F.getSecond=function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(e[n+1]);return t},bb.F.nonZero=function(e){for(var t="",n=0;n<e.length;n+=2)0!=e[n+1]&&(t+=(n>>1)+",");return t},bb.F.contSize=function(e,t){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[1+(r<<1)];return n},bb.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=bb.F._writeLit(i,t,n,r);var s=16==i?2:17==i?3:7;i>15&&(bb.F._putsE(n,r,a,s),r+=s)}return r},bb.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},bb.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=bb.F.setDepth(r[p-1],0);for(m>n&&(bb.F.restrictDepth(l,n,m),m=n),a=0;a<s;a++)t[1+(l[a].lit<<1)]=l[a].d;return m},bb.F.setDepth=function(e,t){return-1!=e.lit?(e.d=t,t):Math.max(bb.F.setDepth(e.l,t+1),bb.F.setDepth(e.r,t+1))},bb.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")},bb.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},bb.F._writeLit=function(e,t,n,r){return bb.F._putsF(n,r,t[e<<1]),r+t[1+(e<<1)]},bb.F.inflate=function(e,t){var n=Uint8Array;if(3==e[0]&&0==e[1])return t||new n(0);var r=bb.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,b=0,y=0,v=0,w=0,x=0,k=0;0==h;)if(h=o(e,k,1),m=o(e,k+1,2),k+=3,0!=m){if(d&&(t=bb.F._check(t,x+(1<<17))),1==m&&(f=u.flmap,p=u.fdmap,v=511,w=31),2==m){g=i(e,k,5)+257,b=i(e,k+5,5)+1,y=i(e,k+10,4)+4,k+=14;for(var S=0;S<38;S+=2)u.itree[S]=0,u.itree[S+1]=0;var _=1;for(S=0;S<y;S++){var C=i(e,k+3*S,3);u.itree[1+(u.ordr[S]<<1)]=C,C>_&&(_=C)}k+=3*y,s(u.itree,_),l(u.itree,_,u.imap),f=u.lmap,p=u.dmap,k=a(u.imap,(1<<_)-1,g+b,e,k,u.ttree);var E=r._copyOut(u.ttree,0,g,u.ltree);v=(1<<E)-1;var z=r._copyOut(u.ttree,g,b,u.dtree);w=(1<<z)-1,s(u.ltree,E),l(u.ltree,E,f),s(u.dtree,z),l(u.dtree,z,p)}for(;;){var A=f[c(e,k)&v];k+=15&A;var N=A>>>4;if(N>>>8==0)t[x++]=N;else{if(256==N)break;var T=x+N-254;if(N>264){var j=u.ldef[N-257];T=x+(j>>>3)+i(e,k,7&j),k+=7&j}var I=p[c(e,k)&w];k+=15&I;var O=I>>>4,M=u.ddef[O],P=(M>>>4)+o(e,k,15&M);for(k+=15&M,d&&(t=bb.F._check(t,x+(1<<17)));x<T;)t[x]=t[x++-P],t[x]=t[x++-P],t[x]=t[x++-P],t[x]=t[x++-P];x=T}}}else{7&k&&(k+=8-(7&k));var F=4+(k>>>3),L=e[F-4]|e[F-3]<<8;d&&(t=bb.F._check(t,x+L)),t.set(new n(e.buffer,e.byteOffset+F,L),x),k=F+L<<3,x+=L}return t.length==x?t:t.slice(0,x)},bb.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},bb.F._decodeTiny=function(e,t,n,r,o,i){for(var a=bb.F._bitsE,s=bb.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},bb.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},bb.F.makeCodes=function(e,t){for(var n,r,o,i,a=bb.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]++)},bb.F.codes2map=function(e,t,n){for(var r=e.length,o=bb.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++},bb.F.revCodes=function(e,t){for(var n=bb.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}},bb.F._putsE=function(e,t,n){n<<=7&t;var r=t>>>3;e[r]|=n,e[r+1]|=n>>>8},bb.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},bb.F._bitsE=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<n)-1},bb.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},bb.F._get17=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},bb.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)},bb.F.U=(mb=Uint16Array,gb=Uint32Array,{next_code:new mb(16),bl_count:new mb(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 mb(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 gb(32),flmap:new mb(512),fltree:[],fdmap:new mb(32),fdtree:[],lmap:new mb(32768),ltree:[],ttree:[],dmap:new mb(32768),dtree:[],imap:new mb(512),itree:[],rev15:new mb(32768),lhst:new gb(286),dhst:new gb(30),ihst:new gb(19),lits:new gb(15e3),strt:new mb(65536),prev:new mb(32768)}),function(){for(var e=bb.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),bb.F.makeCodes(e.fltree,9),bb.F.codes2map(e.fltree,9,e.flmap),bb.F.revCodes(e.fltree,9),r(e.fdtree,32,5),bb.F.makeCodes(e.fdtree,5),bb.F.codes2map(e.fdtree,5,e.fdmap),bb.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 wb,xb=(wb={__proto__:null,default:yb},[yb].forEach(function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach(function(t){if("default"!==t&&!(t in wb)){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(wb,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}})}),Object.freeze(wb));const kb=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 b=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[b+3]=0)}if(16==f)for(h=0;h<a;h++)b=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[b+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 y=0;y<r;y++){var v=y*l,w=y*n;for(h=0;h<n;h++){b=w+h<<2;var x=3*(k=t[v+(h>>3)]>>7-(7&h)&1);c[b]=e[x],c[b+1]=e[x+1],c[b+2]=e[x+2],c[b+3]=k<s?i[k]:255}}if(2==f)for(y=0;y<r;y++)for(v=y*l,w=y*n,h=0;h<n;h++)b=w+h<<2,x=3*(k=t[v+(h>>2)]>>6-((3&h)<<1)&3),c[b]=e[x],c[b+1]=e[x+1],c[b+2]=e[x+2],c[b+3]=k<s?i[k]:255;if(4==f)for(y=0;y<r;y++)for(v=y*l,w=y*n,h=0;h<n;h++)b=w+h<<2,x=3*(k=t[v+(h>>1)]>>4-((1&h)<<2)&15),c[b]=e[x],c[b+1]=e[x+1],c[b+2]=e[x+2],c[b+3]=k<s?i[k]:255;if(8==f)for(h=0;h<a;h++){var k;b=h<<2,x=3*(k=t[h]),c[b]=e[x],c[b+1]=e[x+1],c[b+2]=e[x+2],c[b+3]=k<s?i[k]:255}}else if(4==d){if(8==f)for(h=0;h<a;h++){b=h<<2;var S=t[_=h<<1];c[b]=S,c[b+1]=S,c[b+2]=S,c[b+3]=t[_+1]}if(16==f)for(h=0;h<a;h++){var _;b=h<<2,S=t[_=h<<2],c[b]=S,c[b+1]=S,c[b+2]=S,c[b+3]=t[_+2]}}else if(0==d)for(g=o.tabs.tRNS?o.tabs.tRNS:-1,y=0;y<r;y++){const e=y*l,r=y*n;if(1==f)for(var C=0;C<n;C++){var E=(S=255*(t[e+(C>>>3)]>>>7-(7&C)&1))==255*g?0:255;u[r+C]=E<<24|S<<16|S<<8|S}else if(2==f)for(C=0;C<n;C++)E=(S=85*(t[e+(C>>>2)]>>>6-((3&C)<<1)&3))==85*g?0:255,u[r+C]=E<<24|S<<16|S<<8|S;else if(4==f)for(C=0;C<n;C++)E=(S=17*(t[e+(C>>>1)]>>>4-((1&C)<<2)&15))==17*g?0:255,u[r+C]=E<<24|S<<16|S<<8|S;else if(8==f)for(C=0;C<n;C++)E=(S=t[e+C])==g?0:255,u[r+C]=E<<24|S<<16|S<<8|S;else if(16==f)for(C=0;C<n;C++)S=t[e+(C<<1)],E=p(t,e+(C<<1))==g?0:255,u[r+C]=E<<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],b=h[m];let y=0,v=0,w=d[m];for(;w<r;)w+=i,v++;let x=f[m];for(;x<n;)x+=b,y++;const k=Math.ceil(y*o/8);a(e,t,u,y,v);let S=0,_=d[m];for(;_<r;){let t=f[m],r=u+S*k<<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+=b}S++,_+=i}y*v!=0&&(u+=v*(1+k)),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,b=m.e,y=m.R,v=m.n,w=m.A,x=m.Z,k=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=k.J,i=k.h,d=511,f=31),2==s){l=b(t,h,5)+257,c=b(t,h+5,5)+1,u=b(t,h+10,4)+4,h+=14;let e=1;for(var _=0;_<38;_+=2)k.Q[_]=0,k.Q[_+1]=0;for(_=0;_<u;_++){const n=b(t,h+3*_,3);k.Q[1+(k.X[_]<<1)]=n,n>e&&(e=n)}h+=3*u,v(k.Q,e),w(k.Q,e,k.u),o=k.w,i=k.d,h=y(k.u,(1<<e)-1,l+c,t,h,k.v);const n=m.V(k.v,0,l,k.C);d=(1<<n)-1;const r=m.V(k.v,l,c,k.D);f=(1<<r)-1,v(k.C,n),w(k.C,n,o),v(k.D,r),w(k.D,r,i)}for(;;){const e=o[x(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=k.q[r-257];e=p+(n>>>3)+b(t,h,7&n),h+=7&n}const o=i[x(t,h)&f];h+=15&o;const a=o>>>4,s=k.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 x=0;x<u;x++)for(let n=0;n<c;n++)if(a>=0&&s>=0?(d=x*t+n<<2,f=(s+x)*o+a+n<<2):(d=(-s+x)*t-a+n<<2,f=x*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,b=r[f+3]*(1/255),y=r[f]*b,v=r[f+1]*b,w=r[f+2]*b;const t=1-p,n=p+b*t,o=0==n?0:1/n;r[f+3]=255*n,r[f+0]=(h+y*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],b=r[f+3],y=r[f],v=r[f+1],w=r[f+2],p==b&&h==y&&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],b=r[f+3],y=r[f],v=r[f+1],w=r[f+2],p==b&&h==y&&m==v&&g==w)continue;if(p<220&&b>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 b=0;b<8;b++)if(i[b]!=g[b])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 y=a;0!=i[y];)y++;s.readASCII(i,a,y-a),i[y+1];const n=i.slice(y+2,a+e);let l=null;try{l=r(n)}catch(C){l=o(n)}d.tabs[t]=l}else if("CgBI"==t)d.tabs[t]=i.slice(a,a+4);else if("IDAT"==t){for(b=0;b<e;b++)f[h+b]=i[a+b];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(b=0;b<e-4;b++)p[m+b]=i[a+b+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]=[],b=0;b<8;b++)d.tabs[t].push(s.readUint(i,a+4*b));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),x=a+e-v-1;if("tEXt"==t)S=s.readASCII(i,v+1,x);else{var k=r(i.slice(v+2,v+2+x));S=s.readUTF8(k,0,k.length)}d.tabs[t][w]=S}else if("iTXt"==t){null==d.tabs[t]&&(d.tabs[t]={}),v=0,y=a,v=s.nextZero(i,y),w=s.readASCII(i,y,v-y);const n=i[y=v+1];var S;i[y+1],y+=2,v=s.nextZero(i,y),s.readASCII(i,y,v-y),y=v+1,v=s.nextZero(i,y),s.readUTF8(i,y,v-y),x=e-((y=v+1)-a),0==n?S=s.readUTF8(i,y,x):(k=r(i.slice(y,y+x)),S=s.readUTF8(k,0,k.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]=[],b=0;b<e;b++)d.tabs[t].push(c(i,a+2*b))}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,b=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(b,m,g,a,n,r,p,h,0):1==f.blend&&c(b,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}=kb,{_bin:t}=kb,n=kb._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),b=new Int16Array(t*n*4),y=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(f=0;f<y.length;f++)y[f]=255*((y[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]+b[f]),i(e[f+1]+b[f+1]),i(e[f+2]+b[f+2]),i(e[f+3]+b[f+3])]:(m=y[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 x=16777215;for(h=0;h<u;h++){const e=a(v,d[h]);e<x&&(x=e,p=h)}const k=d[p],S=[v[0]-k[0],v[1]-k[1],v[2]-k[2],v[3]-k[3]];1==c&&(s!=t-1&&o(S,b,f+4,7),w!=n-1&&(0!=s&&o(S,b,f+4*t-4,3),o(S,b,f+4*t,5),s!=t-1&&o(S,b,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,b=0;b<g;b++)e.plte[b]>>>24!=255&&(h=!0);m+=8+3*g+4+(h?8+1*g+4:0)}for(var y=0;y<e.frames.length;y++)f&&(m+=38),m+=(k=e.frames[y]).cimg.length+12,0!=y&&(m+=4);m+=12;const v=new Uint8Array(m),w=[137,80,78,71,13,10,26,10];for(b=0;b<8;b++)v[b]=w[b];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,b=0;b<g;b++){const t=3*b,n=e.plte[b],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,b=0;b<g;b++)v[d+b]=e.plte[b]>>>24&255;d+=g,l(v,d,s(v,d-g-4,g+4)),d+=4}}let x=0;for(y=0;y<e.frames.length;y++){var k=e.frames[y];f&&(l(v,d,26),d+=4,u(v,d,"fcTL"),d+=4,l(v,d,x++),d+=4,l(v,d,k.rect.width),d+=4,l(v,d,k.rect.height),d+=4,l(v,d,k.rect.x),d+=4,l(v,d,k.rect.y),d+=4,c(v,d,i[y]),d+=2,c(v,d,1e3),d+=2,v[d]=k.dispose,d++,v[d]=k.blend,d++,l(v,d,s(v,d-30,30)),d+=4);const t=k.cimg;l(v,d,(g=t.length)+(0==y?0:4)),d+=4;const n=d;u(v,d,0==y?"IDAT":"fdAT"),d+=4,0!=y&&(l(v,d,x++),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,b=8,y=255;for(var v=0;v<t.length;v++){const e=new Uint8Array(t[v]);for(var w=e.length,x=0;x<w;x+=4)y&=e[x+3]}const k=255!=y,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,b=n,y=r,v=o?1:0;if(0!=l){const w=a||o||1==l||0!=s[l-2].dispose?1:2;let x=0,k=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<k&&(k=f,x=e,m=a,g=s,b=c-a+1,y=d-s+1)}u=new Uint8Array(t[l-1-x]),1==x&&(s[l-1].dispose=2),c=new Uint8Array(b*y*4),e(u,n,r,c,b,y,-m,-g,0),v=e(d,n,r,c,b,y,-m,-g,3)?1:0,1==v?f(d,n,r,c,{x:m,y:g,width:b,height:y}):e(d,n,r,c,b,y,-m,-g,0)}else c=d.slice(0);s.push({rect:{x:m,y:g,width:b,height:y},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),_={},C=[],E=[];if(0!=o){const e=[];for(x=0;x<S.length;x++)e.push(S[x].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(x=0;x<t.plte.length;x++)C.push(t.plte[x].est.rgba);let n=0;for(x=0;x<S.length;x++){const e=(A=S[x]).img.length;var z=new Uint8Array(t.inds.buffer,n>>2,e>>2);E.push(z);const r=new Uint8Array(t.abuf,n,e);h&&s(A.img,A.rect.width,A.rect.height,C,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),E.push(z),x=0;x<w;x++){const t=e[x];if(0!=x&&t==e[x-1])z[x]=z[x-1];else if(x>N&&t==e[x-N])z[x]=z[x-N];else{let e=_[t];if(null==e&&(_[t]=e=C.length,C.push(t),C.length>=300))break;z[x]=e}}}const T=C.length;for(T<=256&&0==p&&(b=T<=2?1:T<=4?2:T<=16?4:8,b=Math.max(b,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(b*N/8);var j=new Uint8Array(n*e);const o=E[v];for(let t=0;t<e;t++){x=t*n;const e=t*N;if(8==b)for(var I=0;I<N;I++)j[x+I]=o[e+I];else if(4==b)for(I=0;I<N;I++)j[x+(I>>1)]|=o[e+I]<<4-4*(1&I);else if(2==b)for(I=0;I<N;I++)j[x+(I>>2)]|=o[e+I]<<6-2*(3&I);else if(1==b)for(I=0;I<N;I++)j[x+(I>>3)]|=o[e+I]<<7-1*(7&I)}t=j,g=3,r=1}else if(0==k&&1==S.length){j=new Uint8Array(N*e*3);const o=N*e;for(x=0;x<o;x++){const e=3*x,n=4*x;j[e]=t[n],j[e+1]=t[n+1],j[e+2]=t[n+2]}t=j,g=2,r=3,n=3*N}A.img=t,A.bpl=n,A.bpp=r}return{ctype:g,depth:b,plte:C,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,b=r,y=-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>y&&(y=r),s<b&&(b=s),s>v&&(v=s))}-1==y&&(g=b=y=v=0),s&&(!(1&~g)&&g--,!(1&~b)&&b--),a={x:g,y:b,width:y-g+1,height:v-b+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=xb;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=b(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=y(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=x(e,o.i0,o.i1),o.est=k(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=x(e,c.i0,c.i1),c.est=k(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=k(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 b(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=y(e.est,t,n,r,o);let a=e.left,s=e.right;i>0&&(a=e.right,s=e.left);const l=b(a,t,n,r,o);if(l.tdst<=i*i)return l;const c=b(s,t,n,r,o);return c.tdst<l.tdst?c:l}function y(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 x(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 k(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]]};kb.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)},kb.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)},kb.encode.compress=u,kb.encode.dither=s,kb.quantize=m,kb.quantize.getKDtree=g,kb.quantize.getNearest=b}();const Sb={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,b=f,y=0,v=0,w=0;function x(e){d.setUint16(v,e,!0),v+=2}function k(e){d.setUint32(v,e,!0),v+=4}function S(e){v+=e}x(19778),k(c),S(4),k(122),k(108),k(n),k(-r>>>0),x(1),x(32),k(3),k(l),k(2835),k(2835),S(8),k(16711680),k(65280),k(255),k(4278190080),k(1466527264),function e(){for(;y<r&&b>0;){for(g=122+y*s,p=0;p<o;)b--,h=a[w++],m=h>>>24,d.setUint32(g+p,h<<8|m),p+=4;y++}w<a.length?(b=f,setTimeout(e,Sb._dly)):t(u)}()},toBlob(e,t){this.toArrayBuffer(e,e=>{t(new Blob([e],{type:"image/bmp"}))})},_dly:9};var _b={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},Cb={[_b.CHROME]:16384,[_b.FIREFOX]:11180,[_b.DESKTOP_SAFARI]:16384,[_b.IE]:8192,[_b.IOS]:4096,[_b.ETC]:8192};const Eb="undefined"!=typeof window,zb="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,Ab=Eb&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),Nb=(Eb||zb)&&(Ab&&Ab.getOriginalSymbol(window,"File")||"undefined"!=typeof File&&File),Tb=(Eb||zb)&&(Ab&&Ab.getOriginalSymbol(window,"FileReader")||"undefined"!=typeof FileReader&&FileReader);function jb(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 Ib(e){return new Promise((t,n)=>{const r=new Tb;r.onload=()=>t(r.result),r.onerror=e=>n(e),r.readAsDataURL(e)})}function Ob(e){return new Promise((t,n)=>{const r=new Image;r.onload=()=>t(r),r.onerror=e=>n(e),r.src=e})}function Mb(){if(void 0!==Mb.cachedResult)return Mb.cachedResult;let e=_b.ETC;const{userAgent:t}=navigator;return/Chrom(e|ium)/i.test(t)?e=_b.CHROME:/iP(ad|od|hone)/i.test(t)&&/WebKit/i.test(t)?e=_b.IOS:/Safari/i.test(t)?e=_b.DESKTOP_SAFARI:/Firefox/i.test(t)?e=_b.FIREFOX:(/MSIE/i.test(t)||1==!!document.documentMode)&&(e=_b.IE),Mb.cachedResult=e,Mb.cachedResult}function Pb(e,t){const n=Mb(),r=Cb[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 Fb(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 Lb(e,t){const{width:n,height:r}=Pb(e.width,e.height),[o,i]=Fb(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 Rb(){return void 0!==Rb.cachedResult||(Rb.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"undefined"!=typeof document&&"ontouchend"in document),Rb.cachedResult}function Db(e,t={}){return new Promise(function(n,r){let o,i;var a=function(){try{return i=Lb(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 Ib(e).then(function(e){try{return t=e,Ob(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(Rb()||[_b.DESKTOP_SAFARI,_b.MOBILE_SAFARI].includes(Mb()))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 Ub(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=kb.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=>Sb.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),jb(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 Bb(e){e.width=0,e.height=0}function $b(){return new Promise(function(e,t){let n,r,o,i;return void 0!==$b.cachedResult?e($b.cachedResult):jb("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then(function(a){try{return n=a,Db(n).then(function(a){try{return r=a[1],Ub(r,n.type,n.name,n.lastModified).then(function(n){try{return o=n,Bb(r),Db(o).then(function(n){try{return i=n[0],$b.cachedResult=1===i.width&&2===i.height,e($b.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 Vb(e){return new Promise((t,n)=>{const r=new Tb;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 Hb(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]=Fb(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),Bb(e)),a}function Wb(e,t){const{width:n}=e,{height:r}=e,[o,i]=Fb(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),Bb(e),o}function qb(e,t,n=0){return new Promise(function(r,o){let i,a,s,l,c,u,d,f,p,h,m,g,b,y,v,w,x,k,S,_;function C(e=5){if(t.signal&&t.signal.aborted)throw t.signal.reason;i+=e,t.onProgress(Math.min(i,100))}function E(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,C(),Db(e,t).then(function(n){try{return[,l]=n,C(),c=Hb(l,t),C(),new Promise(function(n,r){var o;if(!(o=t.exifOrientation))return Vb(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,C(),$b().then(function(n){try{return d=n?c:Wb(c,u),C(),f=t.initialQuality||1,p=t.fileType||e.type,Ub(d,p,e.name,e.lastModified,f).then(function(n){try{{let u=function(){if(a--&&(v>s||v>b)){let t,n;return t=_?.95*S.width:S.width,n=_?.95*S.height:S.height,[x,k]=Fb(t,n),k.drawImage(S,0,0,t,n),f*="image/png"===p?.85:.95,Ub(x,p,e.name,e.lastModified,f).then(function(e){try{return w=e,Bb(S),S=x,v=w.size,E(Math.min(99,Math.floor((y-v)/(y-s)*100))),u}catch(t){return o(t)}},o)}return[1]},z=function(){return Bb(S),Bb(x),Bb(c),Bb(d),Bb(l),E(100),r(w)};return h=n,C(),m=h.size>s,g=h.size>e.size,m||g?(b=e.size,y=h.size,v=y,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)):(E(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 Zb;function Qb(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 Nb))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 qb(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 qb(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)=>{Zb||(Zb=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(Zb);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=pb(e,i))}catch(p){}return n(i)}})}Qb.getDataUrlFromFile=Ib,Qb.getFilefromDataUrl=jb,Qb.loadImage=Ob,Qb.drawImageInCanvas=Lb,Qb.drawFileInCanvas=Db,Qb.canvasToFile=Ub,Qb.getExifOrientation=Vb,Qb.handleMaxWidthOrHeight=Hb,Qb.followExifOrientation=Wb,Qb.cleanupCanvasMemory=Bb,Qb.isAutoOrientationInBrowser=$b,Qb.approximateBelowMaximumCanvasSizeOfBrowser=Pb,Qb.copyExifWithoutOrientation=pb,Qb.getBrowserName=Mb,Qb.version="2.0.2";const Kb=Object.freeze(Object.defineProperty({__proto__:null,default:Qb},Symbol.toStringTag,{value:"Module"}));e.BotUyoChatWidget=ab,e.ChatWidget=nb,e.ChatWidgetProvider=function({children:e,defaultLocale:t,initialState:n,onStateChange:r,...o}){const[i,a]=k.useState(n?.isOpen??!1),[s,l]=k.useState(0),c=k.useCallback(()=>{a(!0),l(0),r?.(!0)},[r]),u=k.useCallback(()=>{a(!1),r?.(!1)},[r]),d=k.useCallback(()=>{a(e=>{const t=!e;return t&&l(0),r?.(t),t})},[r]),f=k.useCallback(e=>{Kg?(Kg(e),Wt("ChatWidgetProvider sendMessage:",e)):Vt("sendMessage called but no handler registered")},[]),p=k.useCallback(()=>{Jg?(Jg(),Wt("ChatWidgetProvider clearMessages called")):Vt("clearMessages called but no handler registered")},[]),h={isOpen:i,open:c,close:u,toggle:d,sendMessage:f,clearMessages:p,unreadCount:s},m=k.useCallback((e,t)=>{"message:received"!==e||i||l(e=>e+1),o.onEvent?.(e,t)},[i,o]);return A.jsx(O,{defaultLocale:t,children:A.jsxs(Xg.Provider,{value:h,children:[e,A.jsx(nb,{...o,onStateChange:e=>{a(e),e&&l(0),r?.(e)},onEvent:m})]})})},e.LanguageProvider=O,e.default=sb,e.useChatWidget=function(){const e=k.useContext(Xg);if(!e)throw new Error("useChatWidget must be used within a ChatWidgetProvider. Wrap your app with <ChatWidgetProvider>...</ChatWidgetProvider>");return e},e.useLanguage=M,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
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={},i={exports:{}},a={},s={exports:{}},l={};function c(){if(n)return l;n=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.iterator;var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function b(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||h}function y(){}function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||h}b.prototype.isReactComponent={},b.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=b.prototype;var w=v.prototype=new y;w.constructor=v,m(w,b.prototype),w.isPureReactComponent=!0;var x=Array.isArray,k=Object.prototype.hasOwnProperty,S={current:null},_={key:!0,ref:!0,__self:!0,__source:!0};function C(t,n,r){var o,i={},a=null,s=null;if(null!=n)for(o in void 0!==n.ref&&(s=n.ref),void 0!==n.key&&(a=""+n.key),n)k.call(n,o)&&!_.hasOwnProperty(o)&&(i[o]=n[o]);var l=arguments.length-2;if(1===l)i.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}if(t&&t.defaultProps)for(o in l=t.defaultProps)void 0===i[o]&&(i[o]=l[o]);return{$$typeof:e,type:t,key:a,ref:s,props:i,_owner:S.current}}function E(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var z=/\/+/g;function A(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function N(n,r,o,i,a){var s=typeof n;"undefined"!==s&&"boolean"!==s||(n=null);var l=!1;if(null===n)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(n.$$typeof){case e:case t:l=!0}}if(l)return a=a(l=n),n=""===i?"."+A(l,0):i,x(a)?(o="",null!=n&&(o=n.replace(z,"$&/")+"/"),N(a,r,o,"",function(e){return e})):null!=a&&(E(a)&&(a=function(t,n){return{$$typeof:e,type:t.type,key:n,ref:t.ref,props:t.props,_owner:t._owner}}(a,o+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(z,"$&/")+"/")+n)),r.push(a)),1;if(l=0,i=""===i?".":i+":",x(n))for(var c=0;c<n.length;c++){var u=i+A(s=n[c],c);l+=N(s,r,o,u,a)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=p&&e[p]||e["@@iterator"])?e:null}(n),"function"==typeof u)for(n=u.call(n),c=0;!(s=n.next()).done;)l+=N(s=s.value,r,o,u=i+A(s,c++),a);else if("object"===s)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 l}function T(e,t,n){if(null==e)return e;var r=[],o=0;return N(e,r,"","",function(e){return t.call(n,e,o++)}),r}function j(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={current:null},O={transition:null},M={ReactCurrentDispatcher:I,ReactCurrentBatchConfig:O,ReactCurrentOwner:S};function P(){throw Error("act(...) is not supported in production builds of React.")}return l.Children={map:T,forEach:function(e,t,n){T(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return T(e,function(){t++}),t},toArray:function(e){return T(e,function(e){return e})||[]},only:function(e){if(!E(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},l.Component=b,l.Fragment=r,l.Profiler=i,l.PureComponent=v,l.StrictMode=o,l.Suspense=u,l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M,l.act=P,l.cloneElement=function(t,n,r){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var o=m({},t.props),i=t.key,a=t.ref,s=t._owner;if(null!=n){if(void 0!==n.ref&&(a=n.ref,s=S.current),void 0!==n.key&&(i=""+n.key),t.type&&t.type.defaultProps)var l=t.type.defaultProps;for(c in n)k.call(n,c)&&!_.hasOwnProperty(c)&&(o[c]=void 0===n[c]&&void 0!==l?l[c]:n[c])}var c=arguments.length-2;if(1===c)o.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];o.children=l}return{$$typeof:e,type:t.type,key:i,ref:a,props:o,_owner:s}},l.createContext=function(e){return(e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},l.createElement=C,l.createFactory=function(e){var t=C.bind(null,e);return t.type=e,t},l.createRef=function(){return{current:null}},l.forwardRef=function(e){return{$$typeof:c,render:e}},l.isValidElement=E,l.lazy=function(e){return{$$typeof:f,_payload:{_status:-1,_result:e},_init:j}},l.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},l.startTransition=function(e){var t=O.transition;O.transition={};try{e()}finally{O.transition=t}},l.unstable_act=P,l.useCallback=function(e,t){return I.current.useCallback(e,t)},l.useContext=function(e){return I.current.useContext(e)},l.useDebugValue=function(){},l.useDeferredValue=function(e){return I.current.useDeferredValue(e)},l.useEffect=function(e,t){return I.current.useEffect(e,t)},l.useId=function(){return I.current.useId()},l.useImperativeHandle=function(e,t,n){return I.current.useImperativeHandle(e,t,n)},l.useInsertionEffect=function(e,t){return I.current.useInsertionEffect(e,t)},l.useLayoutEffect=function(e,t){return I.current.useLayoutEffect(e,t)},l.useMemo=function(e,t){return I.current.useMemo(e,t)},l.useReducer=function(e,t,n){return I.current.useReducer(e,t,n)},l.useRef=function(e){return I.current.useRef(e)},l.useState=function(e){return I.current.useState(e)},l.useSyncExternalStore=function(e,t,n){return I.current.useSyncExternalStore(e,t,n)},l.useTransition=function(){return I.current.useTransition()},l.version="18.3.1",l}function u(){return r||(r=1,s.exports=c()),s.exports}var d,f,p,h,m,g={exports:{}},b={};function y(){return f||(f=1,g.exports=(d||(d=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("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="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,y="undefined"!=typeof setImmediate?setImmediate:null;function v(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 w(e){if(m=!1,v(e),!h)if(null!==n(l))h=!0,I(x);else{var t=n(c);null!==t&&O(w,t.startTime-e)}}function x(t,o){h=!1,m&&(m=!1,b(C),C=-1),p=!0;var i=f;try{for(v(o),d=n(l);null!==d&&(!(d.expirationTime>o)||t&&!A());){var a=d.callback;if("function"==typeof a){d.callback=null,f=d.priorityLevel;var s=a(d.expirationTime<=o);o=e.unstable_now(),"function"==typeof s?d.callback=s:d===n(l)&&r(l),v(o)}else r(l);d=n(l)}if(null!==d)var u=!0;else{var g=n(c);null!==g&&O(w,g.startTime-o),u=!1}return u}finally{d=null,f=i,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k,S=!1,_=null,C=-1,E=5,z=-1;function A(){return!(e.unstable_now()-z<E)}function N(){if(null!==_){var t=e.unstable_now();z=t;var n=!0;try{n=_(!0,t)}finally{n?k():(S=!1,_=null)}}else S=!1}if("function"==typeof y)k=function(){y(N)};else if("undefined"!=typeof MessageChannel){var T=new MessageChannel,j=T.port2;T.port1.onmessage=N,k=function(){j.postMessage(null)}}else k=function(){g(N,0)};function I(e){_=e,S||(S=!0,k())}function O(t,n){C=g(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_continueExecution=function(){h||p||(h=!0,I(x))},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_getFirstCallbackNode=function(){return n(l)},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_pauseExecution=function(){},e.unstable_requestPaint=function(){},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(C),C=-1):m=!0,O(w,i-a))):(r.sortIndex=s,t(l,r),h||p||(h=!0,I(x))),r},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}}(b)),b)),g.exports}function v(){if(p)return a;p=1;var e=u(),t=y();function n(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function i(e,t){s(e,t),s(e+"Capture",t)}function s(e,t){for(o[e]=t,e=0;e<t.length;e++)r.add(t[e])}var l=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),c=Object.prototype.hasOwnProperty,d=/^[: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]*$/,f={},h={};function m(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){g[e]=new m(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];g[t]=new m(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){g[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){g[e]=new m(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){g[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){g[e]=new m(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){g[e]=new m(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){g[e]=new m(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){g[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)});var b=/[\-:]([a-z])/g;function v(e){return e[1].toUpperCase()}function w(e,t,n,r){var o=g.hasOwnProperty(t)?g[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!c.call(h,e)||!c.call(f,e)&&(d.test(e)?h[e]=!0:(f[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(b,v);g[t]=new m(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(b,v);g[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(b,v);g[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)}),g.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)});var x=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,k=Symbol.for("react.element"),S=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),z=Symbol.for("react.provider"),A=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),M=Symbol.for("react.offscreen"),P=Symbol.iterator;function F(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=P&&e[P]||e["@@iterator"])?e:null}var L,R=Object.assign;function D(e){if(void 0===L)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);L=t&&t[1]||""}return"\n"+L+e}var U=!1;function B(e,t){if(!e||U)return"";U=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&"string"==typeof c.stack){for(var o=c.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(1!==a||1!==s)do{if(a--,0>--s||o[a]!==i[s]){var l="\n"+o[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{U=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?D(e):""}function $(e){switch(e.tag){case 5:return D(e.type);case 16:return D("Lazy");case 13:return D("Suspense");case 19:return D("SuspenseList");case 0:case 2:case 15:return e=B(e.type,!1);case 11:return e=B(e.type.render,!1);case 1:return e=B(e.type,!0);default:return""}}function V(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case _:return"Fragment";case S:return"Portal";case E:return"Profiler";case C:return"StrictMode";case T:return"Suspense";case j:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case A:return(e.displayName||"Context")+".Consumer";case z:return(e._context.displayName||"Context")+".Provider";case N:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case I:return null!==(t=e.displayName||null)?t:V(e.type)||"Memo";case O:t=e._payload,e=e._init;try{return V(e(t))}catch(n){}}return null}function H(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return V(t);case 8:return t===C?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function W(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function q(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Z(e){e._valueTracker||(e._valueTracker=function(e){var t=q(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=q(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function K(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function J(e,t){var n=t.checked;return R({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Y(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=W(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function G(e,t){null!=(t=t.checked)&&w(e,"checked",t,!1)}function X(e,t){G(e,t);var n=W(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?te(e,t.type,n):t.hasOwnProperty("defaultValue")&&te(e,t.type,W(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function ee(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function te(e,t,n){"number"===t&&K(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ne=Array.isArray;function re(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=""+W(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 oe(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(n(91));return R({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var r=t.value;if(null==r){if(r=t.children,t=t.defaultValue,null!=r){if(null!=t)throw Error(n(92));if(ne(r)){if(1<r.length)throw Error(n(93));r=r[0]}t=r}null==t&&(t=""),r=t}e._wrapperState={initialValue:W(r)}}function ae(e,t){var n=W(t.value),r=W(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function se(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function le(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ce(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?le(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ue,de,fe=(de=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ue=ue||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ue.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return de(e,t)})}:de);function pe(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 he={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},me=["Webkit","ms","Moz","O"];function ge(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||he.hasOwnProperty(e)&&he[e]?(""+t).trim():t+"px"}function be(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=ge(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(he).forEach(function(e){me.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),he[t]=he[e]})});var ye=R({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ve(e,t){if(t){if(ye[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(n(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(n(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(n(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(n(62))}}function we(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;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 xe=null;function ke(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Se=null,_e=null,Ce=null;function Ee(e){if(e=xo(e)){if("function"!=typeof Se)throw Error(n(280));var t=e.stateNode;t&&(t=So(t),Se(e.stateNode,e.type,t))}}function ze(e){_e?Ce?Ce.push(e):Ce=[e]:_e=e}function Ae(){if(_e){var e=_e,t=Ce;if(Ce=_e=null,Ee(e),t)for(e=0;e<t.length;e++)Ee(t[e])}}function Ne(e,t){return e(t)}function Te(){}var je=!1;function Ie(e,t,n){if(je)return e(t,n);je=!0;try{return Ne(e,t,n)}finally{je=!1,(null!==_e||null!==Ce)&&(Te(),Ae())}}function Oe(e,t){var r=e.stateNode;if(null===r)return null;var o=So(r);if(null===o)return null;r=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(r&&"function"!=typeof r)throw Error(n(231,t,typeof r));return r}var Me=!1;if(l)try{var Pe={};Object.defineProperty(Pe,"passive",{get:function(){Me=!0}}),window.addEventListener("test",Pe,Pe),window.removeEventListener("test",Pe,Pe)}catch(de){Me=!1}function Fe(e,t,n,r,o,i,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var Le=!1,Re=null,De=!1,Ue=null,Be={onError:function(e){Le=!0,Re=e}};function $e(e,t,n,r,o,i,a,s,l){Le=!1,Re=null,Fe.apply(Be,arguments)}function Ve(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 He(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 We(e){if(Ve(e)!==e)throw Error(n(188))}function qe(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ve(e)))throw Error(n(188));return t!==e?null:e}for(var r=e,o=t;;){var i=r.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(o=i.return)){r=o;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===r)return We(i),e;if(a===o)return We(i),t;a=a.sibling}throw Error(n(188))}if(r.return!==o.return)r=i,o=a;else{for(var s=!1,l=i.child;l;){if(l===r){s=!0,r=i,o=a;break}if(l===o){s=!0,o=i,r=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===r){s=!0,r=a,o=i;break}if(l===o){s=!0,o=a,r=i;break}l=l.sibling}if(!s)throw Error(n(189))}}if(r.alternate!==o)throw Error(n(190))}if(3!==r.tag)throw Error(n(188));return r.stateNode.current===r?e:t}(e))?Ze(e):null}function Ze(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ze(e);if(null!==t)return t;e=e.sibling}return null}var Qe=t.unstable_scheduleCallback,Ke=t.unstable_cancelCallback,Je=t.unstable_shouldYield,Ye=t.unstable_requestPaint,Ge=t.unstable_now,Xe=t.unstable_getCurrentPriorityLevel,et=t.unstable_ImmediatePriority,tt=t.unstable_UserBlockingPriority,nt=t.unstable_NormalPriority,rt=t.unstable_LowPriority,ot=t.unstable_IdlePriority,it=null,at=null;var st=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(lt(e)/ct|0)|0},lt=Math.log,ct=Math.LN2;var ut=64,dt=4194304;function ft(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function pt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~o;0!==s?r=ft(s):0!==(i&=a)&&(r=ft(i))}else 0!==(a=n&~o)?r=ft(a):0!==i&&(r=ft(i));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&o)&&((o=r&-r)>=(i=t&-t)||16===o&&4194240&i))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-st(t)),r|=e[n],t&=~o;return r}function ht(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function mt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function gt(){var e=ut;return!(4194240&(ut<<=1))&&(ut=64),e}function bt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function yt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-st(t)]=n}function vt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-st(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var wt=0;function xt(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var kt,St,_t,Ct,Et,zt=!1,At=[],Nt=null,Tt=null,jt=null,It=new Map,Ot=new Map,Mt=[],Pt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ft(e,t){switch(e){case"focusin":case"focusout":Nt=null;break;case"dragenter":case"dragleave":Tt=null;break;case"mouseover":case"mouseout":jt=null;break;case"pointerover":case"pointerout":It.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ot.delete(t.pointerId)}}function Lt(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=xo(t))&&St(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function Rt(e){var t=wo(e.target);if(null!==t){var n=Ve(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=He(n)))return e.blockedOn=t,void Et(e.priority,function(){_t(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 Dt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Jt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=xo(n))&&St(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);xe=r,n.target.dispatchEvent(r),xe=null,t.shift()}return!0}function Ut(e,t,n){Dt(e)&&n.delete(t)}function Bt(){zt=!1,null!==Nt&&Dt(Nt)&&(Nt=null),null!==Tt&&Dt(Tt)&&(Tt=null),null!==jt&&Dt(jt)&&(jt=null),It.forEach(Ut),Ot.forEach(Ut)}function $t(e,n){e.blockedOn===n&&(e.blockedOn=null,zt||(zt=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Bt)))}function Vt(e){function t(t){return $t(t,e)}if(0<At.length){$t(At[0],e);for(var n=1;n<At.length;n++){var r=At[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Nt&&$t(Nt,e),null!==Tt&&$t(Tt,e),null!==jt&&$t(jt,e),It.forEach(t),Ot.forEach(t),n=0;n<Mt.length;n++)(r=Mt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Mt.length&&null===(n=Mt[0]).blockedOn;)Rt(n),null===n.blockedOn&&Mt.shift()}var Ht=x.ReactCurrentBatchConfig,Wt=!0;function qt(e,t,n,r){var o=wt,i=Ht.transition;Ht.transition=null;try{wt=1,Qt(e,t,n,r)}finally{wt=o,Ht.transition=i}}function Zt(e,t,n,r){var o=wt,i=Ht.transition;Ht.transition=null;try{wt=4,Qt(e,t,n,r)}finally{wt=o,Ht.transition=i}}function Qt(e,t,n,r){if(Wt){var o=Jt(e,t,n,r);if(null===o)Wr(e,t,r,Kt,n),Ft(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return Nt=Lt(Nt,e,t,n,r,o),!0;case"dragenter":return Tt=Lt(Tt,e,t,n,r,o),!0;case"mouseover":return jt=Lt(jt,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return It.set(i,Lt(It.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Ot.set(i,Lt(Ot.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(Ft(e,r),4&t&&-1<Pt.indexOf(e)){for(;null!==o;){var i=xo(o);if(null!==i&&kt(i),null===(i=Jt(e,t,n,r))&&Wr(e,t,r,Kt,n),i===o)break;o=i}null!==o&&r.stopPropagation()}else Wr(e,t,r,null,n)}}var Kt=null;function Jt(e,t,n,r){if(Kt=null,null!==(e=wo(e=ke(r))))if(null===(t=Ve(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=He(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 Kt=e,null}function Yt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Xe()){case et:return 1;case tt:return 4;case nt:case rt:return 16;case ot:return 536870912;default:return 16}default:return 16}}var Gt=null,Xt=null,en=null;function tn(){if(en)return en;var e,t,n=Xt,r=n.length,o="value"in Gt?Gt.value:Gt.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 en=o.slice(e,1<t?1-t:void 0)}function nn(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 rn(){return!0}function on(){return!1}function an(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)?rn:on,this.isPropagationStopped=on,this}return R(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=rn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=rn)},persist:function(){},isPersistent:rn}),t}var sn,ln,cn,un={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dn=an(un),fn=R({},un,{view:0,detail:0}),pn=an(fn),hn=R({},fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:En,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!==cn&&(cn&&"mousemove"===e.type?(sn=e.screenX-cn.screenX,ln=e.screenY-cn.screenY):ln=sn=0,cn=e),sn)},movementY:function(e){return"movementY"in e?e.movementY:ln}}),mn=an(hn),gn=an(R({},hn,{dataTransfer:0})),bn=an(R({},fn,{relatedTarget:0})),yn=an(R({},un,{animationName:0,elapsedTime:0,pseudoElement:0})),vn=R({},un,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),wn=an(vn),xn=an(R({},un,{data:0})),kn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},_n={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=_n[e])&&!!t[e]}function En(){return Cn}var zn=R({},fn,{key:function(e){if(e.key){var t=kn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=nn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Sn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:En,charCode:function(e){return"keypress"===e.type?nn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?nn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),An=an(zn),Nn=an(R({},hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Tn=an(R({},fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:En})),jn=an(R({},un,{propertyName:0,elapsedTime:0,pseudoElement:0})),In=R({},hn,{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}),On=an(In),Mn=[9,13,27,32],Pn=l&&"CompositionEvent"in window,Fn=null;l&&"documentMode"in document&&(Fn=document.documentMode);var Ln=l&&"TextEvent"in window&&!Fn,Rn=l&&(!Pn||Fn&&8<Fn&&11>=Fn),Dn=String.fromCharCode(32),Un=!1;function Bn(e,t){switch(e){case"keyup":return-1!==Mn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $n(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Vn=!1;var Hn={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 Wn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Hn[e.type]:"textarea"===t}function qn(e,t,n,r){ze(r),0<(t=Zr(t,"onChange")).length&&(n=new dn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Zn=null,Qn=null;function Kn(e){Dr(e,0)}function Jn(e){if(Q(ko(e)))return e}function Yn(e,t){if("change"===e)return t}var Gn=!1;if(l){var Xn;if(l){var er="oninput"in document;if(!er){var tr=document.createElement("div");tr.setAttribute("oninput","return;"),er="function"==typeof tr.oninput}Xn=er}else Xn=!1;Gn=Xn&&(!document.documentMode||9<document.documentMode)}function nr(){Zn&&(Zn.detachEvent("onpropertychange",rr),Qn=Zn=null)}function rr(e){if("value"===e.propertyName&&Jn(Qn)){var t=[];qn(t,Qn,e,ke(e)),Ie(Kn,t)}}function or(e,t,n){"focusin"===e?(nr(),Qn=n,(Zn=t).attachEvent("onpropertychange",rr)):"focusout"===e&&nr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Jn(Qn)}function ar(e,t){if("click"===e)return Jn(t)}function sr(e,t){if("input"===e||"change"===e)return Jn(t)}var lr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function cr(e,t){if(lr(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(!c.call(t,o)||!lr(e[o],t[o]))return!1}return!0}function ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function dr(e,t){var n,r=ur(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=ur(r)}}function fr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?fr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function pr(){for(var e=window,t=K();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=K((e=t.contentWindow).document)}return t}function hr(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)}function mr(e){var t=pr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&fr(n.ownerDocument.documentElement,n)){if(null!==r&&hr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=void 0===r.end?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=dr(n,i);var a=dr(n,r);o&&a&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var gr=l&&"documentMode"in document&&11>=document.documentMode,br=null,yr=null,vr=null,wr=!1;function xr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;wr||null==br||br!==K(r)||("selectionStart"in(r=br)&&hr(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},vr&&cr(vr,r)||(vr=r,0<(r=Zr(yr,"onSelect")).length&&(t=new dn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=br)))}function kr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Sr={animationend:kr("Animation","AnimationEnd"),animationiteration:kr("Animation","AnimationIteration"),animationstart:kr("Animation","AnimationStart"),transitionend:kr("Transition","TransitionEnd")},_r={},Cr={};function Er(e){if(_r[e])return _r[e];if(!Sr[e])return e;var t,n=Sr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Cr)return _r[e]=n[t];return e}l&&(Cr=document.createElement("div").style,"AnimationEvent"in window||(delete Sr.animationend.animation,delete Sr.animationiteration.animation,delete Sr.animationstart.animation),"TransitionEvent"in window||delete Sr.transitionend.transition);var zr=Er("animationend"),Ar=Er("animationiteration"),Nr=Er("animationstart"),Tr=Er("transitionend"),jr=new Map,Ir="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Or(e,t){jr.set(e,t),i(t,[e])}for(var Mr=0;Mr<Ir.length;Mr++){var Pr=Ir[Mr];Or(Pr.toLowerCase(),"on"+(Pr[0].toUpperCase()+Pr.slice(1)))}Or(zr,"onAnimationEnd"),Or(Ar,"onAnimationIteration"),Or(Nr,"onAnimationStart"),Or("dblclick","onDoubleClick"),Or("focusin","onFocus"),Or("focusout","onBlur"),Or(Tr,"onTransitionEnd"),s("onMouseEnter",["mouseout","mouseover"]),s("onMouseLeave",["mouseout","mouseover"]),s("onPointerEnter",["pointerout","pointerover"]),s("onPointerLeave",["pointerout","pointerover"]),i("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),i("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),i("onBeforeInput",["compositionend","keypress","textInput","paste"]),i("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fr="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(" "),Lr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Fr));function Rr(e,t,r){var o=e.type||"unknown-event";e.currentTarget=r,function(e,t,r,o,i,a,s,l,c){if($e.apply(this,arguments),Le){if(!Le)throw Error(n(198));var u=Re;Le=!1,Re=null,De||(De=!0,Ue=u)}}(o,t,void 0,e),e.currentTarget=null}function Dr(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;Rr(o,s,c),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;Rr(o,s,c),i=l}}}if(De)throw e=Ue,De=!1,Ue=null,e}function Ur(e,t){var n=t[bo];void 0===n&&(n=t[bo]=new Set);var r=e+"__bubble";n.has(r)||(Hr(t,e,2,!1),n.add(r))}function Br(e,t,n){var r=0;t&&(r|=4),Hr(n,e,r,t)}var $r="_reactListening"+Math.random().toString(36).slice(2);function Vr(e){if(!e[$r]){e[$r]=!0,r.forEach(function(t){"selectionchange"!==t&&(Lr.has(t)||Br(t,!1,e),Br(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[$r]||(t[$r]=!0,Br("selectionchange",!1,t))}}function Hr(e,t,n,r){switch(Yt(t)){case 1:var o=qt;break;case 4:o=Zt;break;default:o=Qt}n=o.bind(null,t,n,e),o=void 0,!Me||"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 Wr(e,t,n,r,o){var i=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===o||8===l.nodeType&&l.parentNode===o))return;a=a.return}for(;null!==s;){if(null===(a=wo(s)))return;if(5===(l=a.tag)||6===l){r=i=a;continue e}s=s.parentNode}}r=r.return}Ie(function(){var r=i,o=ke(n),a=[];e:{var s=jr.get(e);if(void 0!==s){var l=dn,c=e;switch(e){case"keypress":if(0===nn(n))break e;case"keydown":case"keyup":l=An;break;case"focusin":c="focus",l=bn;break;case"focusout":c="blur",l=bn;break;case"beforeblur":case"afterblur":l=bn;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":l=mn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=gn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Tn;break;case zr:case Ar:case Nr:l=yn;break;case Tr:l=jn;break;case"scroll":l=pn;break;case"wheel":l=On;break;case"copy":case"cut":case"paste":l=wn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Nn}var u=!!(4&t),d=!u&&"scroll"===e,f=u?null!==s?s+"Capture":null:s;u=[];for(var p,h=r;null!==h;){var m=(p=h).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==f&&(null!=(m=Oe(h,f))&&u.push(qr(h,m,p)))),d)break;h=h.return}0<u.length&&(s=new l(s,c,null,n,o),a.push({event:s,listeners:u}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===xe||!(c=n.relatedTarget||n.fromElement)||!wo(c)&&!c[go])&&(l||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?wo(c):null)&&(c!==(d=Ve(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=mn,m="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(u=Nn,m="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==l?s:ko(l),p=null==c?s:ko(c),(s=new u(m,h+"leave",l,n,o)).target=d,s.relatedTarget=p,m=null,wo(o)===r&&((u=new u(f,h+"enter",c,n,o)).target=p,u.relatedTarget=d,m=u),d=m,l&&c)e:{for(f=c,h=0,p=u=l;p;p=Qr(p))h++;for(p=0,m=f;m;m=Qr(m))p++;for(;0<h-p;)u=Qr(u),h--;for(;0<p-h;)f=Qr(f),p--;for(;h--;){if(u===f||null!==f&&u===f.alternate)break e;u=Qr(u),f=Qr(f)}u=null}else u=null;null!==l&&Kr(a,s,l,u,!1),null!==c&&null!==d&&Kr(a,d,c,u,!0)}if("select"===(l=(s=r?ko(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=Yn;else if(Wn(s))if(Gn)g=sr;else{g=ir;var b=or}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=ar);switch(g&&(g=g(e,r))?qn(a,g,n,o):(b&&b(e,s,r),"focusout"===e&&(b=s._wrapperState)&&b.controlled&&"number"===s.type&&te(s,"number",s.value)),b=r?ko(r):window,e){case"focusin":(Wn(b)||"true"===b.contentEditable)&&(br=b,yr=r,vr=null);break;case"focusout":vr=yr=br=null;break;case"mousedown":wr=!0;break;case"contextmenu":case"mouseup":case"dragend":wr=!1,xr(a,n,o);break;case"selectionchange":if(gr)break;case"keydown":case"keyup":xr(a,n,o)}var y;if(Pn)e:{switch(e){case"compositionstart":var v="onCompositionStart";break e;case"compositionend":v="onCompositionEnd";break e;case"compositionupdate":v="onCompositionUpdate";break e}v=void 0}else Vn?Bn(e,n)&&(v="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(v="onCompositionStart");v&&(Rn&&"ko"!==n.locale&&(Vn||"onCompositionStart"!==v?"onCompositionEnd"===v&&Vn&&(y=tn()):(Xt="value"in(Gt=o)?Gt.value:Gt.textContent,Vn=!0)),0<(b=Zr(r,v)).length&&(v=new xn(v,e,null,n,o),a.push({event:v,listeners:b}),y?v.data=y:null!==(y=$n(n))&&(v.data=y))),(y=Ln?function(e,t){switch(e){case"compositionend":return $n(t);case"keypress":return 32!==t.which?null:(Un=!0,Dn);case"textInput":return(e=t.data)===Dn&&Un?null:e;default:return null}}(e,n):function(e,t){if(Vn)return"compositionend"===e||!Pn&&Bn(e,t)?(e=tn(),en=Xt=Gt=null,Vn=!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 Rn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Zr(r,"onBeforeInput")).length&&(o=new xn("onBeforeInput","beforeinput",null,n,o),a.push({event:o,listeners:r}),o.data=y))}Dr(a,t)})}function qr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Zr(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=Oe(e,n))&&r.unshift(qr(e,i,o)),null!=(i=Oe(e,t))&&r.push(qr(e,i,o))),e=e.return}return r}function Qr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Kr(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(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,o?null!=(l=Oe(n,i))&&a.unshift(qr(n,l,s)):o||null!=(l=Oe(n,i))&&a.push(qr(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Jr=/\r\n?/g,Yr=/\u0000|\uFFFD/g;function Gr(e){return("string"==typeof e?e:""+e).replace(Jr,"\n").replace(Yr,"")}function Xr(e,t,r){if(t=Gr(t),Gr(e)!==t&&r)throw Error(n(425))}function eo(){}var to=null,no=null;function ro(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var oo="function"==typeof setTimeout?setTimeout:void 0,io="function"==typeof clearTimeout?clearTimeout:void 0,ao="function"==typeof Promise?Promise:void 0,so="function"==typeof queueMicrotask?queueMicrotask:void 0!==ao?function(e){return ao.resolve(null).then(e).catch(lo)}:oo;function lo(e){setTimeout(function(){throw e})}function co(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void Vt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);Vt(t)}function uo(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)break;if("/$"===t)return null}}return e}function fo(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var po=Math.random().toString(36).slice(2),ho="__reactFiber$"+po,mo="__reactProps$"+po,go="__reactContainer$"+po,bo="__reactEvents$"+po,yo="__reactListeners$"+po,vo="__reactHandles$"+po;function wo(e){var t=e[ho];if(t)return t;for(var n=e.parentNode;n;){if(t=n[go]||n[ho]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=fo(e);null!==e;){if(n=e[ho])return n;e=fo(e)}return t}n=(e=n).parentNode}return null}function xo(e){return!(e=e[ho]||e[go])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ko(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(n(33))}function So(e){return e[mo]||null}var _o=[],Co=-1;function Eo(e){return{current:e}}function zo(e){0>Co||(e.current=_o[Co],_o[Co]=null,Co--)}function Ao(e,t){Co++,_o[Co]=e.current,e.current=t}var No={},To=Eo(No),jo=Eo(!1),Io=No;function Oo(e,t){var n=e.type.contextTypes;if(!n)return No;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Mo(e){return null!=(e=e.childContextTypes)}function Po(){zo(jo),zo(To)}function Fo(e,t,r){if(To.current!==No)throw Error(n(168));Ao(To,t),Ao(jo,r)}function Lo(e,t,r){var o=e.stateNode;if(t=t.childContextTypes,"function"!=typeof o.getChildContext)return r;for(var i in o=o.getChildContext())if(!(i in t))throw Error(n(108,H(e)||"Unknown",i));return R({},r,o)}function Ro(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||No,Io=To.current,Ao(To,e),Ao(jo,jo.current),!0}function Do(e,t,r){var o=e.stateNode;if(!o)throw Error(n(169));r?(e=Lo(e,t,Io),o.__reactInternalMemoizedMergedChildContext=e,zo(jo),zo(To),Ao(To,e)):zo(jo),Ao(jo,r)}var Uo=null,Bo=!1,$o=!1;function Vo(e){null===Uo?Uo=[e]:Uo.push(e)}function Ho(){if(!$o&&null!==Uo){$o=!0;var e=0,t=wt;try{var n=Uo;for(wt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Uo=null,Bo=!1}catch(xb){throw null!==Uo&&(Uo=Uo.slice(e+1)),Qe(et,Ho),xb}finally{wt=t,$o=!1}}return null}var Wo=[],qo=0,Zo=null,Qo=0,Ko=[],Jo=0,Yo=null,Go=1,Xo="";function ei(e,t){Wo[qo++]=Qo,Wo[qo++]=Zo,Zo=e,Qo=t}function ti(e,t,n){Ko[Jo++]=Go,Ko[Jo++]=Xo,Ko[Jo++]=Yo,Yo=e;var r=Go;e=Xo;var o=32-st(r)-1;r&=~(1<<o),n+=1;var i=32-st(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,Go=1<<32-st(t)+o|n<<o|r,Xo=i+e}else Go=1<<i|n<<o|r,Xo=e}function ni(e){null!==e.return&&(ei(e,1),ti(e,1,0))}function ri(e){for(;e===Zo;)Zo=Wo[--qo],Wo[qo]=null,Qo=Wo[--qo],Wo[qo]=null;for(;e===Yo;)Yo=Ko[--Jo],Ko[Jo]=null,Xo=Ko[--Jo],Ko[Jo]=null,Go=Ko[--Jo],Ko[Jo]=null}var oi=null,ii=null,ai=!1,si=null;function li(e,t){var n=Ic(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function ci(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,oi=e,ii=uo(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,oi=e,ii=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Yo?{id:Go,overflow:Xo}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Ic(18,null,null,0)).stateNode=t,n.return=e,e.child=n,oi=e,ii=null,!0);default:return!1}}function ui(e){return!(!(1&e.mode)||128&e.flags)}function di(e){if(ai){var t=ii;if(t){var r=t;if(!ci(e,t)){if(ui(e))throw Error(n(418));t=uo(r.nextSibling);var o=oi;t&&ci(e,t)?li(o,r):(e.flags=-4097&e.flags|2,ai=!1,oi=e)}}else{if(ui(e))throw Error(n(418));e.flags=-4097&e.flags|2,ai=!1,oi=e}}}function fi(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;oi=e}function pi(e){if(e!==oi)return!1;if(!ai)return fi(e),ai=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ro(e.type,e.memoizedProps)),t&&(t=ii)){if(ui(e))throw hi(),Error(n(418));for(;t;)li(e,t),t=uo(t.nextSibling)}if(fi(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(n(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var r=e.data;if("/$"===r){if(0===t){ii=uo(e.nextSibling);break e}t--}else"$"!==r&&"$!"!==r&&"$?"!==r||t++}e=e.nextSibling}ii=null}}else ii=oi?uo(e.stateNode.nextSibling):null;return!0}function hi(){for(var e=ii;e;)e=uo(e.nextSibling)}function mi(){ii=oi=null,ai=!1}function gi(e){null===si?si=[e]:si.push(e)}var bi=x.ReactCurrentBatchConfig;function yi(e,t,r){if(null!==(e=r.ref)&&"function"!=typeof e&&"object"!=typeof e){if(r._owner){if(r=r._owner){if(1!==r.tag)throw Error(n(309));var o=r.stateNode}if(!o)throw Error(n(147,e));var i=o,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:((t=function(e){var t=i.refs;null===e?delete t[a]:t[a]=e})._stringRef=a,t)}if("string"!=typeof e)throw Error(n(284));if(!r._owner)throw Error(n(290,e))}return e}function vi(e,t){throw e=Object.prototype.toString.call(t),Error(n(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function wi(e){return(0,e._init)(e._payload)}function xi(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function r(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function o(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Mc(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|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Rc(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===_?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===O&&wi(o)===t.type)?((r=i(t,n.props)).ref=yi(e,t,n),r.return=e,r):((r=Pc(n.type,n.key,n.props,null,e.mode,r)).ref=yi(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Dc(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=Fc(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)return(t=Rc(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case k:return(n=Pc(t.type,t.key,t.props,null,e.mode,n)).ref=yi(e,null,t),n.return=e,n;case S:return(t=Dc(t,e.mode,n)).return=e,t;case O:return f(e,(0,t._init)(t._payload),n)}if(ne(t)||F(t))return(t=Fc(t,e.mode,n,null)).return=e,t;vi(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)return null!==o?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case k:return n.key===o?c(e,t,n,r):null;case S:return n.key===o?u(e,t,n,r):null;case O:return p(e,t,(o=n._init)(n._payload),r)}if(ne(n)||F(n))return null!==o?null:d(e,t,n,r,null);vi(e,n)}return null}function h(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case k:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o);case S:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o);case O:return h(e,t,n,(0,r._init)(r._payload),o)}if(ne(r)||F(r))return d(t,e=e.get(n)||null,r,o,null);vi(t,r)}return null}return function l(c,u,d,m){if("object"==typeof d&&null!==d&&d.type===_&&null===d.key&&(d=d.props.children),"object"==typeof d&&null!==d){switch(d.$$typeof){case k:e:{for(var g=d.key,b=u;null!==b;){if(b.key===g){if((g=d.type)===_){if(7===b.tag){r(c,b.sibling),(u=i(b,d.props.children)).return=c,c=u;break e}}else if(b.elementType===g||"object"==typeof g&&null!==g&&g.$$typeof===O&&wi(g)===b.type){r(c,b.sibling),(u=i(b,d.props)).ref=yi(c,b,d),u.return=c,c=u;break e}r(c,b);break}t(c,b),b=b.sibling}d.type===_?((u=Fc(d.props.children,c.mode,m,d.key)).return=c,c=u):((m=Pc(d.type,d.key,d.props,null,c.mode,m)).ref=yi(c,u,d),m.return=c,c=m)}return s(c);case S:e:{for(b=d.key;null!==u;){if(u.key===b){if(4===u.tag&&u.stateNode.containerInfo===d.containerInfo&&u.stateNode.implementation===d.implementation){r(c,u.sibling),(u=i(u,d.children||[])).return=c,c=u;break e}r(c,u);break}t(c,u),u=u.sibling}(u=Dc(d,c.mode,m)).return=c,c=u}return s(c);case O:return l(c,u,(b=d._init)(d._payload),m)}if(ne(d))return function(n,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 b=p(n,d,s[m],l);if(null===b){null===d&&(d=g);break}e&&d&&null===b.alternate&&t(n,d),i=a(b,i,m),null===u?c=b:u.sibling=b,u=b,d=g}if(m===s.length)return r(n,d),ai&&ei(n,m),c;if(null===d){for(;m<s.length;m++)null!==(d=f(n,s[m],l))&&(i=a(d,i,m),null===u?c=d:u.sibling=d,u=d);return ai&&ei(n,m),c}for(d=o(n,d);m<s.length;m++)null!==(g=h(d,n,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(n,e)}),ai&&ei(n,m),c}(c,u,d,m);if(F(d))return function(i,s,l,c){var u=F(l);if("function"!=typeof u)throw Error(n(150));if(null==(l=u.call(l)))throw Error(n(151));for(var d=u=null,m=s,g=s=0,b=null,y=l.next();null!==m&&!y.done;g++,y=l.next()){m.index>g?(b=m,m=null):b=m.sibling;var v=p(i,m,y.value,c);if(null===v){null===m&&(m=b);break}e&&m&&null===v.alternate&&t(i,m),s=a(v,s,g),null===d?u=v:d.sibling=v,d=v,m=b}if(y.done)return r(i,m),ai&&ei(i,g),u;if(null===m){for(;!y.done;g++,y=l.next())null!==(y=f(i,y.value,c))&&(s=a(y,s,g),null===d?u=y:d.sibling=y,d=y);return ai&&ei(i,g),u}for(m=o(i,m);!y.done;g++,y=l.next())null!==(y=h(m,i,g,y.value,c))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),s=a(y,s,g),null===d?u=y:d.sibling=y,d=y);return e&&m.forEach(function(e){return t(i,e)}),ai&&ei(i,g),u}(c,u,d,m);vi(c,d)}return"string"==typeof d&&""!==d||"number"==typeof d?(d=""+d,null!==u&&6===u.tag?(r(c,u.sibling),(u=i(u,d)).return=c,c=u):(r(c,u),(u=Rc(d,c.mode,m)).return=c,c=u),s(c)):r(c,u)}}var ki=xi(!0),Si=xi(!1),_i=Eo(null),Ci=null,Ei=null,zi=null;function Ai(){zi=Ei=Ci=null}function Ni(e){var t=_i.current;zo(_i),e._currentValue=t}function Ti(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 ji(e,t){Ci=e,zi=Ei=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(ws=!0),e.firstContext=null)}function Ii(e){var t=e._currentValue;if(zi!==e)if(e={context:e,memoizedValue:t,next:null},null===Ei){if(null===Ci)throw Error(n(308));Ei=e,Ci.dependencies={lanes:0,firstContext:e}}else Ei=Ei.next=e;return t}var Oi=null;function Mi(e){null===Oi?Oi=[e]:Oi.push(e)}function Pi(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,Mi(t)):(n.next=o.next,o.next=n),t.interleaved=n,Fi(e,r)}function Fi(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Li=!1;function Ri(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Di(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ui(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Bi(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&Nl){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Fi(e,n)}return null===(o=r.interleaved)?(t.next=t,Mi(r)):(t.next=o.next,o.next=t),r.interleaved=t,Fi(e,n)}function $i(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,vt(e,n)}}function Vi(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={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,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,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Hi(e,t,n,r){var o=e.updateQueue;Li=!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 f=s.lane,p=s.eventTime;if((r&f)===f){null!==u&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,m=s;switch(f=t,p=n,m.tag){case 1:if("function"==typeof(h=m.payload)){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(f="function"==typeof(h=m.payload)?h.call(p,d,f):h))break e;d=R({},d,f);break e;case 2:Li=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(f=o.effects)?o.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=p,l=d):u=u.next=p,a|=f;if(null===(s=s.next)){if(null===(s=o.shared.pending))break;s=(f=s).next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}if(null===u&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,null!==(t=o.shared.interleaved)){o=t;do{a|=o.lane,o=o.next}while(o!==t)}else null===i&&(o.shared.lanes=0);Ll|=a,e.lanes=a,e.memoizedState=d}}function Wi(e,t,r){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var o=e[t],i=o.callback;if(null!==i){if(o.callback=null,o=r,"function"!=typeof i)throw Error(n(191,i));i.call(o)}}}var qi={},Zi=Eo(qi),Qi=Eo(qi),Ki=Eo(qi);function Ji(e){if(e===qi)throw Error(n(174));return e}function Yi(e,t){switch(Ao(Ki,t),Ao(Qi,e),Ao(Zi,qi),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ce(null,"");break;default:t=ce(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}zo(Zi),Ao(Zi,t)}function Gi(){zo(Zi),zo(Qi),zo(Ki)}function Xi(e){Ji(Ki.current);var t=Ji(Zi.current),n=ce(t,e.type);t!==n&&(Ao(Qi,e),Ao(Zi,n))}function ea(e){Qi.current===e&&(zo(Zi),zo(Qi))}var ta=Eo(0);function na(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}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 ra=[];function oa(){for(var e=0;e<ra.length;e++)ra[e]._workInProgressVersionPrimary=null;ra.length=0}var ia=x.ReactCurrentDispatcher,aa=x.ReactCurrentBatchConfig,sa=0,la=null,ca=null,ua=null,da=!1,fa=!1,pa=0,ha=0;function ma(){throw Error(n(321))}function ga(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!lr(e[n],t[n]))return!1;return!0}function ba(e,t,r,o,i,a){if(sa=a,la=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ia.current=null===e||null===e.memoizedState?es:ts,e=r(o,i),fa){a=0;do{if(fa=!1,pa=0,25<=a)throw Error(n(301));a+=1,ua=ca=null,t.updateQueue=null,ia.current=ns,e=r(o,i)}while(fa)}if(ia.current=Xa,t=null!==ca&&null!==ca.next,sa=0,ua=ca=la=null,da=!1,t)throw Error(n(300));return e}function ya(){var e=0!==pa;return pa=0,e}function va(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ua?la.memoizedState=ua=e:ua=ua.next=e,ua}function wa(){if(null===ca){var e=la.alternate;e=null!==e?e.memoizedState:null}else e=ca.next;var t=null===ua?la.memoizedState:ua.next;if(null!==t)ua=t,ca=e;else{if(null===e)throw Error(n(310));e={memoizedState:(ca=e).memoizedState,baseState:ca.baseState,baseQueue:ca.baseQueue,queue:ca.queue,next:null},null===ua?la.memoizedState=ua=e:ua=ua.next=e}return ua}function xa(e,t){return"function"==typeof t?t(e):t}function ka(e){var t=wa(),r=t.queue;if(null===r)throw Error(n(311));r.lastRenderedReducer=e;var o=ca,i=o.baseQueue,a=r.pending;if(null!==a){if(null!==i){var s=i.next;i.next=a.next,a.next=s}o.baseQueue=i=a,r.pending=null}if(null!==i){a=i.next,o=o.baseState;var l=s=null,c=null,u=a;do{var d=u.lane;if((sa&d)===d)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),o=u.hasEagerState?u.eagerState:e(o,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=f,s=o):c=c.next=f,la.lanes|=d,Ll|=d}u=u.next}while(null!==u&&u!==a);null===c?s=o:c.next=l,lr(o,t.memoizedState)||(ws=!0),t.memoizedState=o,t.baseState=s,t.baseQueue=c,r.lastRenderedState=o}if(null!==(e=r.interleaved)){i=e;do{a=i.lane,la.lanes|=a,Ll|=a,i=i.next}while(i!==e)}else null===i&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Sa(e){var t=wa(),r=t.queue;if(null===r)throw Error(n(311));r.lastRenderedReducer=e;var o=r.dispatch,i=r.pending,a=t.memoizedState;if(null!==i){r.pending=null;var s=i=i.next;do{a=e(a,s.action),s=s.next}while(s!==i);lr(a,t.memoizedState)||(ws=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),r.lastRenderedState=a}return[a,o]}function _a(){}function Ca(e,t){var r=la,o=wa(),i=t(),a=!lr(o.memoizedState,i);if(a&&(o.memoizedState=i,ws=!0),o=o.queue,La(Aa.bind(null,r,o,e),[e]),o.getSnapshot!==t||a||null!==ua&&1&ua.memoizedState.tag){if(r.flags|=2048,Ia(9,za.bind(null,r,o,i,t),void 0,null),null===Tl)throw Error(n(349));30&sa||Ea(r,t,i)}return i}function Ea(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=la.updateQueue)?(t={lastEffect:null,stores:null},la.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function za(e,t,n,r){t.value=n,t.getSnapshot=r,Na(t)&&Ta(e)}function Aa(e,t,n){return n(function(){Na(t)&&Ta(e)})}function Na(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!lr(e,n)}catch(r){return!0}}function Ta(e){var t=Fi(e,1);null!==t&&rc(t,e,1,-1)}function ja(e){var t=va();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:e},t.queue=e,e=e.dispatch=Ka.bind(null,la,e),[t.memoizedState,e]}function Ia(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=la.updateQueue)?(t={lastEffect:null,stores:null},la.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Oa(){return wa().memoizedState}function Ma(e,t,n,r){var o=va();la.flags|=e,o.memoizedState=Ia(1|t,n,void 0,void 0===r?null:r)}function Pa(e,t,n,r){var o=wa();r=void 0===r?null:r;var i=void 0;if(null!==ca){var a=ca.memoizedState;if(i=a.destroy,null!==r&&ga(r,a.deps))return void(o.memoizedState=Ia(t,n,i,r))}la.flags|=e,o.memoizedState=Ia(1|t,n,i,r)}function Fa(e,t){return Ma(8390656,8,e,t)}function La(e,t){return Pa(2048,8,e,t)}function Ra(e,t){return Pa(4,2,e,t)}function Da(e,t){return Pa(4,4,e,t)}function Ua(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ba(e,t,n){return n=null!=n?n.concat([e]):null,Pa(4,4,Ua.bind(null,t,e),n)}function $a(){}function Va(e,t){var n=wa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ga(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ha(e,t){var n=wa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ga(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Wa(e,t,n){return 21&sa?(lr(n,t)||(n=gt(),la.lanes|=n,Ll|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ws=!0),e.memoizedState=n)}function qa(e,t){var n=wt;wt=0!==n&&4>n?n:4,e(!0);var r=aa.transition;aa.transition={};try{e(!1),t()}finally{wt=n,aa.transition=r}}function Za(){return wa().memoizedState}function Qa(e,t,n){var r=nc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ja(e))Ya(t,n);else if(null!==(n=Pi(e,t,n,r))){rc(n,e,r,tc()),Ga(n,t,r)}}function Ka(e,t,n){var r=nc(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ja(e))Ya(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,lr(s,a)){var l=t.interleaved;return null===l?(o.next=o,Mi(t)):(o.next=l.next,l.next=o),void(t.interleaved=o)}}catch(c){}null!==(n=Pi(e,t,o,r))&&(rc(n,e,r,o=tc()),Ga(n,t,r))}}function Ja(e){var t=e.alternate;return e===la||null!==t&&t===la}function Ya(e,t){fa=da=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ga(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,vt(e,n)}}var Xa={readContext:Ii,useCallback:ma,useContext:ma,useEffect:ma,useImperativeHandle:ma,useInsertionEffect:ma,useLayoutEffect:ma,useMemo:ma,useReducer:ma,useRef:ma,useState:ma,useDebugValue:ma,useDeferredValue:ma,useTransition:ma,useMutableSource:ma,useSyncExternalStore:ma,useId:ma,unstable_isNewReconciler:!1},es={readContext:Ii,useCallback:function(e,t){return va().memoizedState=[e,void 0===t?null:t],e},useContext:Ii,useEffect:Fa,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Ma(4194308,4,Ua.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ma(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ma(4,2,e,t)},useMemo:function(e,t){var n=va();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=va();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Qa.bind(null,la,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},va().memoizedState=e},useState:ja,useDebugValue:$a,useDeferredValue:function(e){return va().memoizedState=e},useTransition:function(){var e=ja(!1),t=e[0];return e=qa.bind(null,e[1]),va().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var o=la,i=va();if(ai){if(void 0===r)throw Error(n(407));r=r()}else{if(r=t(),null===Tl)throw Error(n(349));30&sa||Ea(o,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,Fa(Aa.bind(null,o,a,e),[e]),o.flags|=2048,Ia(9,za.bind(null,o,a,r,t),void 0,null),r},useId:function(){var e=va(),t=Tl.identifierPrefix;if(ai){var n=Xo;t=":"+t+"R"+(n=(Go&~(1<<32-st(Go)-1)).toString(32)+n),0<(n=pa++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=ha++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ts={readContext:Ii,useCallback:Va,useContext:Ii,useEffect:La,useImperativeHandle:Ba,useInsertionEffect:Ra,useLayoutEffect:Da,useMemo:Ha,useReducer:ka,useRef:Oa,useState:function(){return ka(xa)},useDebugValue:$a,useDeferredValue:function(e){return Wa(wa(),ca.memoizedState,e)},useTransition:function(){return[ka(xa)[0],wa().memoizedState]},useMutableSource:_a,useSyncExternalStore:Ca,useId:Za,unstable_isNewReconciler:!1},ns={readContext:Ii,useCallback:Va,useContext:Ii,useEffect:La,useImperativeHandle:Ba,useInsertionEffect:Ra,useLayoutEffect:Da,useMemo:Ha,useReducer:Sa,useRef:Oa,useState:function(){return Sa(xa)},useDebugValue:$a,useDeferredValue:function(e){var t=wa();return null===ca?t.memoizedState=e:Wa(t,ca.memoizedState,e)},useTransition:function(){return[Sa(xa)[0],wa().memoizedState]},useMutableSource:_a,useSyncExternalStore:Ca,useId:Za,unstable_isNewReconciler:!1};function rs(e,t){if(e&&e.defaultProps){for(var n in t=R({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function os(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:R({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var is={isMounted:function(e){return!!(e=e._reactInternals)&&Ve(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=tc(),o=nc(e),i=Ui(r,o);i.payload=t,null!=n&&(i.callback=n),null!==(t=Bi(e,i,o))&&(rc(t,e,o,r),$i(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=tc(),o=nc(e),i=Ui(r,o);i.tag=1,i.payload=t,null!=n&&(i.callback=n),null!==(t=Bi(e,i,o))&&(rc(t,e,o,r),$i(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tc(),r=nc(e),o=Ui(n,r);o.tag=2,null!=t&&(o.callback=t),null!==(t=Bi(e,o,r))&&(rc(t,e,r,n),$i(t,e,r))}};function as(e,t,n,r,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!cr(n,r)||!cr(o,i))}function ss(e,t,n){var r=!1,o=No,i=t.contextType;return"object"==typeof i&&null!==i?i=Ii(i):(o=Mo(t)?Io:To.current,i=(r=null!=(r=t.contextTypes))?Oo(e,o):No),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=is,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function ls(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&&is.enqueueReplaceState(t,t.state,null)}function cs(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Ri(e);var i=t.contextType;"object"==typeof i&&null!==i?o.context=Ii(i):(i=Mo(t)?Io:To.current,o.context=Oo(e,i)),o.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(os(e,t,i,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&is.enqueueReplaceState(o,o.state,null),Hi(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4194308)}function us(e,t){try{var n="",r=t;do{n+=$(r),r=r.return}while(r);var o=n}catch(i){o="\nError generating stack: "+i.message+"\n"+i.stack}return{value:e,source:t,stack:o,digest:null}}function ds(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function fs(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var ps="function"==typeof WeakMap?WeakMap:Map;function hs(e,t,n){(n=Ui(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Wl||(Wl=!0,ql=r),fs(0,t)},n}function ms(e,t,n){(n=Ui(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){fs(0,t)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){fs(0,t),"function"!=typeof r&&(null===Zl?Zl=new Set([this]):Zl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function gs(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ps;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)||(o.add(n),e=Ec.bind(null,e,t,n),t.then(e,e))}function bs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ys(e,t,n,r,o){return 1&e.mode?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Ui(-1,1)).tag=2,Bi(n,t,1))),n.lanes|=1),e)}var vs=x.ReactCurrentOwner,ws=!1;function xs(e,t,n,r){t.child=null===e?Si(t,null,n,r):ki(t,e.child,n,r)}function ks(e,t,n,r,o){n=n.render;var i=t.ref;return ji(t,o),r=ba(e,t,n,r,i,o),n=ya(),null===e||ws?(ai&&n&&ni(t),t.flags|=1,xs(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ws(e,t,o))}function Ss(e,t,n,r,o){if(null===e){var i=n.type;return"function"!=typeof i||Oc(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Pc(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,_s(e,t,i,r,o))}if(i=e.child,0===(e.lanes&o)){var a=i.memoizedProps;if((n=null!==(n=n.compare)?n:cr)(a,r)&&e.ref===t.ref)return Ws(e,t,o)}return t.flags|=1,(e=Mc(i,r)).ref=t.ref,e.return=t,t.child=e}function _s(e,t,n,r,o){if(null!==e){var i=e.memoizedProps;if(cr(i,r)&&e.ref===t.ref){if(ws=!1,t.pendingProps=r=i,0===(e.lanes&o))return t.lanes=e.lanes,Ws(e,t,o);131072&e.flags&&(ws=!0)}}return zs(e,t,n,r,o)}function Cs(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ao(Ml,Ol),Ol|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==i?i.baseLanes:n,Ao(Ml,Ol),Ol|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ao(Ml,Ol),Ol|=n;else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,Ao(Ml,Ol),Ol|=r;return xs(e,t,o,n),t.child}function Es(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function zs(e,t,n,r,o){var i=Mo(n)?Io:To.current;return i=Oo(t,i),ji(t,o),n=ba(e,t,n,r,i,o),r=ya(),null===e||ws?(ai&&r&&ni(t),t.flags|=1,xs(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ws(e,t,o))}function As(e,t,n,r,o){if(Mo(n)){var i=!0;Ro(t)}else i=!1;if(ji(t,o),null===t.stateNode)Hs(e,t),ss(t,n,r),cs(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"==typeof c&&null!==c?c=Ii(c):c=Oo(t,c=Mo(n)?Io:To.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==c)&&ls(t,a,r,c),Li=!1;var f=t.memoizedState;a.state=f,Hi(t,r,a,o),l=t.memoizedState,s!==r||f!==l||jo.current||Li?("function"==typeof u&&(os(t,n,u,r),l=t.memoizedState),(s=Li||as(t,n,s,r,f,l,c))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Di(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:rs(t.type,s),a.props=c,d=t.pendingProps,f=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=Ii(l):l=Oo(t,l=Mo(n)?Io:To.current);var p=n.getDerivedStateFromProps;(u="function"==typeof p||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||f!==l)&&ls(t,a,r,l),Li=!1,f=t.memoizedState,a.state=f,Hi(t,r,a,o);var h=t.memoizedState;s!==d||f!==h||jo.current||Li?("function"==typeof p&&(os(t,n,p,r),h=t.memoizedState),(c=Li||as(t,n,c,r,f,h,l)||!1)?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=l,r=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Ns(e,t,n,r,i,o)}function Ns(e,t,n,r,o,i){Es(e,t);var a=!!(128&t.flags);if(!r&&!a)return o&&Do(t,n,!1),Ws(e,t,i);r=t.stateNode,vs.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=ki(t,e.child,null,i),t.child=ki(t,null,s,i)):xs(e,t,s,i),t.memoizedState=r.state,o&&Do(t,n,!0),t.child}function Ts(e){var t=e.stateNode;t.pendingContext?Fo(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Fo(0,t.context,!1),Yi(e,t.containerInfo)}function js(e,t,n,r,o){return mi(),gi(o),t.flags|=256,xs(e,t,n,r),t.child}var Is,Os,Ms,Ps,Fs={dehydrated:null,treeContext:null,retryLane:0};function Ls(e){return{baseLanes:e,cachePool:null,transitions:null}}function Rs(e,t,r){var o,i=t.pendingProps,a=ta.current,s=!1,l=!!(128&t.flags);if((o=l)||(o=(null===e||null!==e.memoizedState)&&!!(2&a)),o?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Ao(ta,1&a),null===e)return di(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=i.children,e=i.fallback,s?(i=t.mode,s=t.child,l={mode:"hidden",children:l},1&i||null===s?s=Lc(l,i,0,null):(s.childLanes=0,s.pendingProps=l),e=Fc(e,i,r,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Ls(r),t.memoizedState=Fs,e):Ds(t,l));if(null!==(a=e.memoizedState)&&null!==(o=a.dehydrated))return function(e,t,r,o,i,a,s){if(r)return 256&t.flags?(t.flags&=-257,Us(e,t,s,o=ds(Error(n(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=o.fallback,i=t.mode,o=Lc({mode:"visible",children:o.children},i,0,null),(a=Fc(a,i,s,null)).flags|=2,o.return=t,a.return=t,o.sibling=a,t.child=o,1&t.mode&&ki(t,e.child,null,s),t.child.memoizedState=Ls(s),t.memoizedState=Fs,a);if(!(1&t.mode))return Us(e,t,s,null);if("$!"===i.data){if(o=i.nextSibling&&i.nextSibling.dataset)var l=o.dgst;return o=l,Us(e,t,s,o=ds(a=Error(n(419)),o,void 0))}if(l=0!==(s&e.childLanes),ws||l){if(null!==(o=Tl)){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!==(i&(o.suspendedLanes|s))?0:i)&&i!==a.retryLane&&(a.retryLane=i,Fi(e,i),rc(o,e,i,-1))}return gc(),Us(e,t,s,o=ds(Error(n(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Ac.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,ii=uo(i.nextSibling),oi=t,ai=!0,si=null,null!==e&&(Ko[Jo++]=Go,Ko[Jo++]=Xo,Ko[Jo++]=Yo,Go=e.id,Xo=e.overflow,Yo=t),t=Ds(t,o.children),t.flags|=4096,t)}(e,t,l,i,o,a,r);if(s){s=i.fallback,l=t.mode,o=(a=e.child).sibling;var c={mode:"hidden",children:i.children};return 1&l||t.child===a?(i=Mc(a,c)).subtreeFlags=14680064&a.subtreeFlags:((i=t.child).childLanes=0,i.pendingProps=c,t.deletions=null),null!==o?s=Mc(o,s):(s=Fc(s,l,r,null)).flags|=2,s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,l=null===(l=e.child.memoizedState)?Ls(r):{baseLanes:l.baseLanes|r,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~r,t.memoizedState=Fs,i}return e=(s=e.child).sibling,i=Mc(s,{mode:"visible",children:i.children}),!(1&t.mode)&&(i.lanes=r),i.return=t,i.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=i,t.memoizedState=null,i}function Ds(e,t){return(t=Lc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Us(e,t,n,r){return null!==r&&gi(r),ki(t,e.child,null,n),(e=Ds(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Bs(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ti(e.return,t,n)}function $s(e,t,n,r,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Vs(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(xs(e,t,r.children,n),2&(r=ta.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Bs(e,n,t);else if(19===e.tag)Bs(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}r&=1}if(Ao(ta,r),1&t.mode)switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===na(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),$s(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===na(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}$s(t,!0,n,null,i);break;case"together":$s(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Hs(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ws(e,t,r){if(null!==e&&(t.dependencies=e.dependencies),Ll|=t.lanes,0===(r&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(n(153));if(null!==t.child){for(r=Mc(e=t.child,e.pendingProps),t.child=r,r.return=t;null!==e.sibling;)e=e.sibling,(r=r.sibling=Mc(e,e.pendingProps)).return=t;r.sibling=null}return t.child}function qs(e,t){if(!ai)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 Zs(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|=14680064&o.subtreeFlags,r|=14680064&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 Qs(e,t,r){var i=t.pendingProps;switch(ri(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zs(t),null;case 1:case 17:return Mo(t.type)&&Po(),Zs(t),null;case 3:return i=t.stateNode,Gi(),zo(jo),zo(To),oa(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),null!==e&&null!==e.child||(pi(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==si&&(sc(si),si=null))),Os(e,t),Zs(t),null;case 5:ea(t);var a=Ji(Ki.current);if(r=t.type,null!==e&&null!=t.stateNode)Ms(e,t,r,i,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(null===t.stateNode)throw Error(n(166));return Zs(t),null}if(e=Ji(Zi.current),pi(t)){i=t.stateNode,r=t.type;var s=t.memoizedProps;switch(i[ho]=t,i[mo]=s,e=!!(1&t.mode),r){case"dialog":Ur("cancel",i),Ur("close",i);break;case"iframe":case"object":case"embed":Ur("load",i);break;case"video":case"audio":for(a=0;a<Fr.length;a++)Ur(Fr[a],i);break;case"source":Ur("error",i);break;case"img":case"image":case"link":Ur("error",i),Ur("load",i);break;case"details":Ur("toggle",i);break;case"input":Y(i,s),Ur("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!s.multiple},Ur("invalid",i);break;case"textarea":ie(i,s),Ur("invalid",i)}for(var l in ve(r,s),a=null,s)if(s.hasOwnProperty(l)){var c=s[l];"children"===l?"string"==typeof c?i.textContent!==c&&(!0!==s.suppressHydrationWarning&&Xr(i.textContent,c,e),a=["children",c]):"number"==typeof c&&i.textContent!==""+c&&(!0!==s.suppressHydrationWarning&&Xr(i.textContent,c,e),a=["children",""+c]):o.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&Ur("scroll",i)}switch(r){case"input":Z(i),ee(i,s,!0);break;case"textarea":Z(i),se(i);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(i.onclick=eo)}i=a,t.updateQueue=i,null!==i&&(t.flags|=4)}else{l=9===a.nodeType?a:a.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=le(r)),"http://www.w3.org/1999/xhtml"===e?"script"===r?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof i.is?e=l.createElement(r,{is:i.is}):(e=l.createElement(r),"select"===r&&(l=e,i.multiple?l.multiple=!0:i.size&&(l.size=i.size))):e=l.createElementNS(e,r),e[ho]=t,e[mo]=i,Is(e,t,!1,!1),t.stateNode=e;e:{switch(l=we(r,i),r){case"dialog":Ur("cancel",e),Ur("close",e),a=i;break;case"iframe":case"object":case"embed":Ur("load",e),a=i;break;case"video":case"audio":for(a=0;a<Fr.length;a++)Ur(Fr[a],e);a=i;break;case"source":Ur("error",e),a=i;break;case"img":case"image":case"link":Ur("error",e),Ur("load",e),a=i;break;case"details":Ur("toggle",e),a=i;break;case"input":Y(e,i),a=J(e,i),Ur("invalid",e);break;case"option":default:a=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},a=R({},i,{value:void 0}),Ur("invalid",e);break;case"textarea":ie(e,i),a=oe(e,i),Ur("invalid",e)}for(s in ve(r,a),c=a)if(c.hasOwnProperty(s)){var u=c[s];"style"===s?be(e,u):"dangerouslySetInnerHTML"===s?null!=(u=u?u.__html:void 0)&&fe(e,u):"children"===s?"string"==typeof u?("textarea"!==r||""!==u)&&pe(e,u):"number"==typeof u&&pe(e,""+u):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(o.hasOwnProperty(s)?null!=u&&"onScroll"===s&&Ur("scroll",e):null!=u&&w(e,s,u,l))}switch(r){case"input":Z(e),ee(e,i,!1);break;case"textarea":Z(e),se(e);break;case"option":null!=i.value&&e.setAttribute("value",""+W(i.value));break;case"select":e.multiple=!!i.multiple,null!=(s=i.value)?re(e,!!i.multiple,s,!1):null!=i.defaultValue&&re(e,!!i.multiple,i.defaultValue,!0);break;default:"function"==typeof a.onClick&&(e.onclick=eo)}switch(r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Zs(t),null;case 6:if(e&&null!=t.stateNode)Ps(e,t,e.memoizedProps,i);else{if("string"!=typeof i&&null===t.stateNode)throw Error(n(166));if(r=Ji(Ki.current),Ji(Zi.current),pi(t)){if(i=t.stateNode,r=t.memoizedProps,i[ho]=t,(s=i.nodeValue!==r)&&null!==(e=oi))switch(e.tag){case 3:Xr(i.nodeValue,r,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Xr(i.nodeValue,r,!!(1&e.mode))}s&&(t.flags|=4)}else(i=(9===r.nodeType?r:r.ownerDocument).createTextNode(i))[ho]=t,t.stateNode=i}return Zs(t),null;case 13:if(zo(ta),i=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ai&&null!==ii&&1&t.mode&&!(128&t.flags))hi(),mi(),t.flags|=98560,s=!1;else if(s=pi(t),null!==i&&null!==i.dehydrated){if(null===e){if(!s)throw Error(n(318));if(!(s=null!==(s=t.memoizedState)?s.dehydrated:null))throw Error(n(317));s[ho]=t}else mi(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Zs(t),s=!1}else null!==si&&(sc(si),si=null),s=!0;if(!s)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=r,t):((i=null!==i)!==(null!==e&&null!==e.memoizedState)&&i&&(t.child.flags|=8192,1&t.mode&&(null===e||1&ta.current?0===Pl&&(Pl=3):gc())),null!==t.updateQueue&&(t.flags|=4),Zs(t),null);case 4:return Gi(),Os(e,t),null===e&&Vr(t.stateNode.containerInfo),Zs(t),null;case 10:return Ni(t.type._context),Zs(t),null;case 19:if(zo(ta),null===(s=t.memoizedState))return Zs(t),null;if(i=!!(128&t.flags),null===(l=s.rendering))if(i)qs(s,!1);else{if(0!==Pl||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(l=na(e))){for(t.flags|=128,qs(s,!1),null!==(i=l.updateQueue)&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=r,r=t.child;null!==r;)e=i,(s=r).flags&=14680066,null===(l=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,e=l.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Ao(ta,1&ta.current|2),t.child}e=e.sibling}null!==s.tail&&Ge()>Vl&&(t.flags|=128,i=!0,qs(s,!1),t.lanes=4194304)}else{if(!i)if(null!==(e=na(l))){if(t.flags|=128,i=!0,null!==(r=e.updateQueue)&&(t.updateQueue=r,t.flags|=4),qs(s,!0),null===s.tail&&"hidden"===s.tailMode&&!l.alternate&&!ai)return Zs(t),null}else 2*Ge()-s.renderingStartTime>Vl&&1073741824!==r&&(t.flags|=128,i=!0,qs(s,!1),t.lanes=4194304);s.isBackwards?(l.sibling=t.child,t.child=l):(null!==(r=s.last)?r.sibling=l:t.child=l,s.last=l)}return null!==s.tail?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ge(),t.sibling=null,r=ta.current,Ao(ta,i?1&r|2:1&r),t):(Zs(t),null);case 22:case 23:return fc(),i=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==i&&(t.flags|=8192),i&&1&t.mode?!!(1073741824&Ol)&&(Zs(t),6&t.subtreeFlags&&(t.flags|=8192)):Zs(t),null;case 24:case 25:return null}throw Error(n(156,t.tag))}function Ks(e,t){switch(ri(t),t.tag){case 1:return Mo(t.type)&&Po(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Gi(),zo(jo),zo(To),oa(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return ea(t),null;case 13:if(zo(ta),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(n(340));mi()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return zo(ta),null;case 4:return Gi(),null;case 10:return Ni(t.type._context),null;case 22:case 23:return fc(),null;default:return null}}Is=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Os=function(){},Ms=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ji(Zi.current);var a,s=null;switch(n){case"input":i=J(e,i),r=J(e,r),s=[];break;case"select":i=R({},i,{value:void 0}),r=R({},r,{value:void 0}),s=[];break;case"textarea":i=oe(e,i),r=oe(e,r),s=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=eo)}for(u in ve(n,r),n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&null!=i[u])if("style"===u){var l=i[u];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(o.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var c=r[u];if(l=null!=i?i[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(a in l)!l.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&l[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(s||(s=[]),s.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(s=s||[]).push(u,c)):"children"===u?"string"!=typeof c&&"number"!=typeof c||(s=s||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(o.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&Ur("scroll",e),s||l===c||(s=[])):(s=s||[]).push(u,c))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}},Ps=function(e,t,n,r){n!==r&&(t.flags|=4)};var Js=!1,Ys=!1,Gs="function"==typeof WeakSet?WeakSet:Set,Xs=null;function el(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(r){Cc(e,t,r)}else n.current=null}function tl(e,t,n){try{n()}catch(r){Cc(e,t,r)}}var nl=!1;function rl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,void 0!==i&&tl(t,n,i)}o=o.next}while(o!==r)}}function ol(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function il(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function al(e){var t=e.alternate;null!==t&&(e.alternate=null,al(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[ho],delete t[mo],delete t[bo],delete t[yo],delete t[vo])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function sl(e){return 5===e.tag||3===e.tag||4===e.tag}function ll(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||sl(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(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 cl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=eo));else if(4!==r&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}function ul(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&&null!==(e=e.child))for(ul(e,t,n),e=e.sibling;null!==e;)ul(e,t,n),e=e.sibling}var dl=null,fl=!1;function pl(e,t,n){for(n=n.child;null!==n;)hl(e,t,n),n=n.sibling}function hl(e,t,n){if(at&&"function"==typeof at.onCommitFiberUnmount)try{at.onCommitFiberUnmount(it,n)}catch(s){}switch(n.tag){case 5:Ys||el(n,t);case 6:var r=dl,o=fl;dl=null,pl(e,t,n),fl=o,null!==(dl=r)&&(fl?(e=dl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):dl.removeChild(n.stateNode));break;case 18:null!==dl&&(fl?(e=dl,n=n.stateNode,8===e.nodeType?co(e.parentNode,n):1===e.nodeType&&co(e,n),Vt(e)):co(dl,n.stateNode));break;case 4:r=dl,o=fl,dl=n.stateNode.containerInfo,fl=!0,pl(e,t,n),dl=r,fl=o;break;case 0:case 11:case 14:case 15:if(!Ys&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,void 0!==a&&(2&i||4&i)&&tl(n,t,a),o=o.next}while(o!==r)}pl(e,t,n);break;case 1:if(!Ys&&(el(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Cc(n,t,s)}pl(e,t,n);break;case 21:pl(e,t,n);break;case 22:1&n.mode?(Ys=(r=Ys)||null!==n.memoizedState,pl(e,t,n),Ys=r):pl(e,t,n);break;default:pl(e,t,n)}}function ml(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Gs),t.forEach(function(t){var r=Nc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function gl(e,t){var r=t.deletions;if(null!==r)for(var o=0;o<r.length;o++){var i=r[o];try{var a=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:dl=l.stateNode,fl=!1;break e;case 3:case 4:dl=l.stateNode.containerInfo,fl=!0;break e}l=l.return}if(null===dl)throw Error(n(160));hl(a,s,i),dl=null,fl=!1;var c=i.alternate;null!==c&&(c.return=null),i.return=null}catch(u){Cc(i,t,u)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)bl(t,e),t=t.sibling}function bl(e,t){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gl(t,e),yl(e),4&o){try{rl(3,e,e.return),ol(3,e)}catch(g){Cc(e,e.return,g)}try{rl(5,e,e.return)}catch(g){Cc(e,e.return,g)}}break;case 1:gl(t,e),yl(e),512&o&&null!==r&&el(r,r.return);break;case 5:if(gl(t,e),yl(e),512&o&&null!==r&&el(r,r.return),32&e.flags){var i=e.stateNode;try{pe(i,"")}catch(g){Cc(e,e.return,g)}}if(4&o&&null!=(i=e.stateNode)){var a=e.memoizedProps,s=null!==r?r.memoizedProps:a,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===a.type&&null!=a.name&&G(i,a),we(l,s);var u=we(l,a);for(s=0;s<c.length;s+=2){var d=c[s],f=c[s+1];"style"===d?be(i,f):"dangerouslySetInnerHTML"===d?fe(i,f):"children"===d?pe(i,f):w(i,d,f,u)}switch(l){case"input":X(i,a);break;case"textarea":ae(i,a);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var h=a.value;null!=h?re(i,!!a.multiple,h,!1):p!==!!a.multiple&&(null!=a.defaultValue?re(i,!!a.multiple,a.defaultValue,!0):re(i,!!a.multiple,a.multiple?[]:"",!1))}i[mo]=a}catch(g){Cc(e,e.return,g)}}break;case 6:if(gl(t,e),yl(e),4&o){if(null===e.stateNode)throw Error(n(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(g){Cc(e,e.return,g)}}break;case 3:if(gl(t,e),yl(e),4&o&&null!==r&&r.memoizedState.isDehydrated)try{Vt(t.containerInfo)}catch(g){Cc(e,e.return,g)}break;case 4:default:gl(t,e),yl(e);break;case 13:gl(t,e),yl(e),8192&(i=e.child).flags&&(a=null!==i.memoizedState,i.stateNode.isHidden=a,!a||null!==i.alternate&&null!==i.alternate.memoizedState||($l=Ge())),4&o&&ml(e);break;case 22:if(d=null!==r&&null!==r.memoizedState,1&e.mode?(Ys=(u=Ys)||d,gl(t,e),Ys=u):gl(t,e),yl(e),8192&o){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!d&&1&e.mode)for(Xs=e,d=e.child;null!==d;){for(f=Xs=d;null!==Xs;){switch(h=(p=Xs).child,p.tag){case 0:case 11:case 14:case 15:rl(4,p,p.return);break;case 1:el(p,p.return);var m=p.stateNode;if("function"==typeof m.componentWillUnmount){o=p,r=p.return;try{t=o,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){Cc(o,r,g)}}break;case 5:el(p,p.return);break;case 22:if(null!==p.memoizedState){kl(f);continue}}null!==h?(h.return=p,Xs=h):kl(f)}d=d.sibling}e:for(d=null,f=e;;){if(5===f.tag){if(null===d){d=f;try{i=f.stateNode,u?"function"==typeof(a=i.style).setProperty?a.setProperty("display","none","important"):a.display="none":(l=f.stateNode,s=null!=(c=f.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,l.style.display=ge("display",s))}catch(g){Cc(e,e.return,g)}}}else if(6===f.tag){if(null===d)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(g){Cc(e,e.return,g)}}else if((22!==f.tag&&23!==f.tag||null===f.memoizedState||f===e)&&null!==f.child){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;null===f.sibling;){if(null===f.return||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:gl(t,e),yl(e),4&o&&ml(e);case 21:}}function yl(e){var t=e.flags;if(2&t){try{e:{for(var r=e.return;null!==r;){if(sl(r)){var o=r;break e}r=r.return}throw Error(n(160))}switch(o.tag){case 5:var i=o.stateNode;32&o.flags&&(pe(i,""),o.flags&=-33),ul(e,ll(e),i);break;case 3:case 4:var a=o.stateNode.containerInfo;cl(e,ll(e),a);break;default:throw Error(n(161))}}catch(s){Cc(e,e.return,s)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function vl(e,t,n){Xs=e,wl(e)}function wl(e,t,n){for(var r=!!(1&e.mode);null!==Xs;){var o=Xs,i=o.child;if(22===o.tag&&r){var a=null!==o.memoizedState||Js;if(!a){var s=o.alternate,l=null!==s&&null!==s.memoizedState||Ys;s=Js;var c=Ys;if(Js=a,(Ys=l)&&!c)for(Xs=o;null!==Xs;)l=(a=Xs).child,22===a.tag&&null!==a.memoizedState?Sl(o):null!==l?(l.return=a,Xs=l):Sl(o);for(;null!==i;)Xs=i,wl(i),i=i.sibling;Xs=o,Js=s,Ys=c}xl(e)}else 8772&o.subtreeFlags&&null!==i?(i.return=o,Xs=i):xl(e)}}function xl(e){for(;null!==Xs;){var t=Xs;if(8772&t.flags){var r=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Ys||ol(5,t);break;case 1:var o=t.stateNode;if(4&t.flags&&!Ys)if(null===r)o.componentDidMount();else{var i=t.elementType===t.type?r.memoizedProps:rs(t.type,r.memoizedProps);o.componentDidUpdate(i,r.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Wi(t,a,o);break;case 3:var s=t.updateQueue;if(null!==s){if(r=null,null!==t.child)switch(t.child.tag){case 5:case 1:r=t.child.stateNode}Wi(t,s,r)}break;case 5:var l=t.stateNode;if(null===r&&4&t.flags){r=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var d=u.memoizedState;if(null!==d){var f=d.dehydrated;null!==f&&Vt(f)}}}break;default:throw Error(n(163))}Ys||512&t.flags&&il(t)}catch(gb){Cc(t,t.return,gb)}}if(t===e){Xs=null;break}if(null!==(r=t.sibling)){r.return=t.return,Xs=r;break}Xs=t.return}}function kl(e){for(;null!==Xs;){var t=Xs;if(t===e){Xs=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Xs=n;break}Xs=t.return}}function Sl(e){for(;null!==Xs;){var t=Xs;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ol(4,t)}catch(l){Cc(t,n,l)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(l){Cc(t,o,l)}}var i=t.return;try{il(t)}catch(l){Cc(t,i,l)}break;case 5:var a=t.return;try{il(t)}catch(l){Cc(t,a,l)}}}catch(l){Cc(t,t.return,l)}if(t===e){Xs=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Xs=s;break}Xs=t.return}}var _l,Cl=Math.ceil,El=x.ReactCurrentDispatcher,zl=x.ReactCurrentOwner,Al=x.ReactCurrentBatchConfig,Nl=0,Tl=null,jl=null,Il=0,Ol=0,Ml=Eo(0),Pl=0,Fl=null,Ll=0,Rl=0,Dl=0,Ul=null,Bl=null,$l=0,Vl=1/0,Hl=null,Wl=!1,ql=null,Zl=null,Ql=!1,Kl=null,Jl=0,Yl=0,Gl=null,Xl=-1,ec=0;function tc(){return 6&Nl?Ge():-1!==Xl?Xl:Xl=Ge()}function nc(e){return 1&e.mode?2&Nl&&0!==Il?Il&-Il:null!==bi.transition?(0===ec&&(ec=gt()),ec):0!==(e=wt)?e:e=void 0===(e=window.event)?16:Yt(e.type):1}function rc(e,t,r,o){if(50<Yl)throw Yl=0,Gl=null,Error(n(185));yt(e,r,o),2&Nl&&e===Tl||(e===Tl&&(!(2&Nl)&&(Rl|=r),4===Pl&&lc(e,Il)),oc(e,o),1===r&&0===Nl&&!(1&t.mode)&&(Vl=Ge()+500,Bo&&Ho()))}function oc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-st(i),s=1<<a,l=o[a];-1===l?0!==(s&n)&&0===(s&r)||(o[a]=ht(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}}(e,t);var r=pt(e,e===Tl?Il:0);if(0===r)null!==n&&Ke(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ke(n),1===t)0===e.tag?function(e){Bo=!0,Vo(e)}(cc.bind(null,e)):Vo(cc.bind(null,e)),so(function(){!(6&Nl)&&Ho()}),n=null;else{switch(xt(r)){case 1:n=et;break;case 4:n=tt;break;case 16:default:n=nt;break;case 536870912:n=ot}n=Tc(n,ic.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ic(e,t){if(Xl=-1,ec=0,6&Nl)throw Error(n(327));var r=e.callbackNode;if(Sc()&&e.callbackNode!==r)return null;var o=pt(e,e===Tl?Il:0);if(0===o)return null;if(30&o||0!==(o&e.expiredLanes)||t)t=bc(e,o);else{t=o;var i=Nl;Nl|=2;var a=mc();for(Tl===e&&Il===t||(Hl=null,Vl=Ge()+500,pc(e,t));;)try{vc();break}catch(l){hc(e,l)}Ai(),El.current=a,Nl=i,null!==jl?t=0:(Tl=null,Il=0,t=Pl)}if(0!==t){if(2===t&&(0!==(i=mt(e))&&(o=i,t=ac(e,i))),1===t)throw r=Fl,pc(e,0),lc(e,o),oc(e,Ge()),r;if(6===t)lc(e,o);else{if(i=e.current.alternate,!(30&o||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!lr(i(),o))return!1}catch(s){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}(i)||(t=bc(e,o),2===t&&(a=mt(e),0!==a&&(o=a,t=ac(e,a))),1!==t)))throw r=Fl,pc(e,0),lc(e,o),oc(e,Ge()),r;switch(e.finishedWork=i,e.finishedLanes=o,t){case 0:case 1:throw Error(n(345));case 2:case 5:kc(e,Bl,Hl);break;case 3:if(lc(e,o),(130023424&o)===o&&10<(t=$l+500-Ge())){if(0!==pt(e,0))break;if(((i=e.suspendedLanes)&o)!==o){tc(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=oo(kc.bind(null,e,Bl,Hl),t);break}kc(e,Bl,Hl);break;case 4:if(lc(e,o),(4194240&o)===o)break;for(t=e.eventTimes,i=-1;0<o;){var s=31-st(o);a=1<<s,(s=t[s])>i&&(i=s),o&=~a}if(o=i,10<(o=(120>(o=Ge()-o)?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*Cl(o/1960))-o)){e.timeoutHandle=oo(kc.bind(null,e,Bl,Hl),o);break}kc(e,Bl,Hl);break;default:throw Error(n(329))}}}return oc(e,Ge()),e.callbackNode===r?ic.bind(null,e):null}function ac(e,t){var n=Ul;return e.current.memoizedState.isDehydrated&&(pc(e,t).flags|=256),2!==(e=bc(e,t))&&(t=Bl,Bl=n,null!==t&&sc(t)),e}function sc(e){null===Bl?Bl=e:Bl.push.apply(Bl,e)}function lc(e,t){for(t&=~Dl,t&=~Rl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-st(t),r=1<<n;e[n]=-1,t&=~r}}function cc(e){if(6&Nl)throw Error(n(327));Sc();var t=pt(e,0);if(!(1&t))return oc(e,Ge()),null;var r=bc(e,t);if(0!==e.tag&&2===r){var o=mt(e);0!==o&&(t=o,r=ac(e,o))}if(1===r)throw r=Fl,pc(e,0),lc(e,t),oc(e,Ge()),r;if(6===r)throw Error(n(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,kc(e,Bl,Hl),oc(e,Ge()),null}function uc(e,t){var n=Nl;Nl|=1;try{return e(t)}finally{0===(Nl=n)&&(Vl=Ge()+500,Bo&&Ho())}}function dc(e){null!==Kl&&0===Kl.tag&&!(6&Nl)&&Sc();var t=Nl;Nl|=1;var n=Al.transition,r=wt;try{if(Al.transition=null,wt=1,e)return e()}finally{wt=r,Al.transition=n,!(6&(Nl=t))&&Ho()}}function fc(){Ol=Ml.current,zo(Ml)}function pc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,io(n)),null!==jl)for(n=jl.return;null!==n;){var r=n;switch(ri(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Po();break;case 3:Gi(),zo(jo),zo(To),oa();break;case 5:ea(r);break;case 4:Gi();break;case 13:case 19:zo(ta);break;case 10:Ni(r.type._context);break;case 22:case 23:fc()}n=n.return}if(Tl=e,jl=e=Mc(e.current,null),Il=Ol=t,Pl=0,Fl=null,Dl=Rl=Ll=0,Bl=Ul=null,null!==Oi){for(t=0;t<Oi.length;t++)if(null!==(r=(n=Oi[t]).interleaved)){n.interleaved=null;var o=r.next,i=n.pending;if(null!==i){var a=i.next;i.next=o,r.next=a}n.pending=r}Oi=null}return e}function hc(e,t){for(;;){var r=jl;try{if(Ai(),ia.current=Xa,da){for(var o=la.memoizedState;null!==o;){var i=o.queue;null!==i&&(i.pending=null),o=o.next}da=!1}if(sa=0,ua=ca=la=null,fa=!1,pa=0,zl.current=null,null===r||null===r.return){Pl=1,Fl=t,jl=null;break}e:{var a=e,s=r.return,l=r,c=t;if(t=Il,l.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var u=c,d=l,f=d.tag;if(!(1&d.mode||0!==f&&11!==f&&15!==f)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var h=bs(s);if(null!==h){h.flags&=-257,ys(h,s,l,0,t),1&h.mode&&gs(a,u,t),c=u;var m=(t=h).updateQueue;if(null===m){var g=new Set;g.add(c),t.updateQueue=g}else m.add(c);break e}if(!(1&t)){gs(a,u,t),gc();break e}c=Error(n(426))}else if(ai&&1&l.mode){var b=bs(s);if(null!==b){!(65536&b.flags)&&(b.flags|=256),ys(b,s,l,0,t),gi(us(c,l));break e}}a=c=us(c,l),4!==Pl&&(Pl=2),null===Ul?Ul=[a]:Ul.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Vi(a,hs(0,c,t));break e;case 1:l=c;var y=a.type,v=a.stateNode;if(!(128&a.flags||"function"!=typeof y.getDerivedStateFromError&&(null===v||"function"!=typeof v.componentDidCatch||null!==Zl&&Zl.has(v)))){a.flags|=65536,t&=-t,a.lanes|=t,Vi(a,ms(a,l,t));break e}}a=a.return}while(null!==a)}xc(r)}catch(w){t=w,jl===r&&null!==r&&(jl=r=r.return);continue}break}}function mc(){var e=El.current;return El.current=Xa,null===e?Xa:e}function gc(){0!==Pl&&3!==Pl&&2!==Pl||(Pl=4),null===Tl||!(268435455&Ll)&&!(268435455&Rl)||lc(Tl,Il)}function bc(e,t){var r=Nl;Nl|=2;var o=mc();for(Tl===e&&Il===t||(Hl=null,pc(e,t));;)try{yc();break}catch(xb){hc(e,xb)}if(Ai(),Nl=r,El.current=o,null!==jl)throw Error(n(261));return Tl=null,Il=0,Pl}function yc(){for(;null!==jl;)wc(jl)}function vc(){for(;null!==jl&&!Je();)wc(jl)}function wc(e){var t=_l(e.alternate,e,Ol);e.memoizedProps=e.pendingProps,null===t?xc(e):jl=t,zl.current=null}function xc(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Ks(n,t)))return n.flags&=32767,void(jl=n);if(null===e)return Pl=6,void(jl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Qs(n,t,Ol)))return void(jl=n);if(null!==(t=t.sibling))return void(jl=t);jl=t=e}while(null!==t);0===Pl&&(Pl=5)}function kc(e,t,r){var o=wt,i=Al.transition;try{Al.transition=null,wt=1,function(e,t,r,o){do{Sc()}while(null!==Kl);if(6&Nl)throw Error(n(327));r=e.finishedWork;var i=e.finishedLanes;if(null===r)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(n(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-st(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}(e,a),e===Tl&&(jl=Tl=null,Il=0),!(2064&r.subtreeFlags)&&!(2064&r.flags)||Ql||(Ql=!0,Tc(nt,function(){return Sc(),null})),a=!!(15990&r.flags),!!(15990&r.subtreeFlags)||a){a=Al.transition,Al.transition=null;var s=wt;wt=1;var l=Nl;Nl|=4,zl.current=null,function(e,t){if(to=Wt,hr(e=pr())){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{var o=(r=(r=e.ownerDocument)&&r.defaultView||window).getSelection&&r.getSelection();if(o&&0!==o.rangeCount){r=o.anchorNode;var i=o.anchorOffset,a=o.focusNode;o=o.focusOffset;try{r.nodeType,a.nodeType}catch(x){r=null;break e}var s=0,l=-1,c=-1,u=0,d=0,f=e,p=null;t:for(;;){for(var h;f!==r||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===r&&++u===i&&(l=s),p===a&&++d===o&&(c=s),null!==(h=f.nextSibling))break;p=(f=p).parentNode}f=h}r=-1===l||-1===c?null:{start:l,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(no={focusedElem:e,selectionRange:r},Wt=!1,Xs=t;null!==Xs;)if(e=(t=Xs).child,1028&t.subtreeFlags&&null!==e)e.return=t,Xs=e;else for(;null!==Xs;){t=Xs;try{var m=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var g=m.memoizedProps,b=m.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:rs(t.type,g),b);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var w=t.stateNode.containerInfo;1===w.nodeType?w.textContent="":9===w.nodeType&&w.documentElement&&w.removeChild(w.documentElement);break;default:throw Error(n(163))}}catch(x){Cc(t,t.return,x)}if(null!==(e=t.sibling)){e.return=t.return,Xs=e;break}Xs=t.return}m=nl,nl=!1}(e,r),bl(r,e),mr(no),Wt=!!to,no=to=null,e.current=r,vl(r),Ye(),Nl=l,wt=s,Al.transition=a}else e.current=r;if(Ql&&(Ql=!1,Kl=e,Jl=i),a=e.pendingLanes,0===a&&(Zl=null),function(e){if(at&&"function"==typeof at.onCommitFiberRoot)try{at.onCommitFiberRoot(it,e,void 0,!(128&~e.current.flags))}catch(t){}}(r.stateNode),oc(e,Ge()),null!==t)for(o=e.onRecoverableError,r=0;r<t.length;r++)i=t[r],o(i.value,{componentStack:i.stack,digest:i.digest});if(Wl)throw Wl=!1,e=ql,ql=null,e;!!(1&Jl)&&0!==e.tag&&Sc(),a=e.pendingLanes,1&a?e===Gl?Yl++:(Yl=0,Gl=e):Yl=0,Ho()}(e,t,r,o)}finally{Al.transition=i,wt=o}return null}function Sc(){if(null!==Kl){var e=xt(Jl),t=Al.transition,r=wt;try{if(Al.transition=null,wt=16>e?16:e,null===Kl)var o=!1;else{if(e=Kl,Kl=null,Jl=0,6&Nl)throw Error(n(331));var i=Nl;for(Nl|=4,Xs=e.current;null!==Xs;){var a=Xs,s=a.child;if(16&Xs.flags){var l=a.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for(Xs=u;null!==Xs;){var d=Xs;switch(d.tag){case 0:case 11:case 15:rl(8,d,a)}var f=d.child;if(null!==f)f.return=d,Xs=f;else for(;null!==Xs;){var p=(d=Xs).sibling,h=d.return;if(al(d),d===u){Xs=null;break}if(null!==p){p.return=h,Xs=p;break}Xs=h}}}var m=a.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var b=g.sibling;g.sibling=null,g=b}while(null!==g)}}Xs=a}}if(2064&a.subtreeFlags&&null!==s)s.return=a,Xs=s;else e:for(;null!==Xs;){if(2048&(a=Xs).flags)switch(a.tag){case 0:case 11:case 15:rl(9,a,a.return)}var y=a.sibling;if(null!==y){y.return=a.return,Xs=y;break e}Xs=a.return}}var v=e.current;for(Xs=v;null!==Xs;){var w=(s=Xs).child;if(2064&s.subtreeFlags&&null!==w)w.return=s,Xs=w;else e:for(s=v;null!==Xs;){if(2048&(l=Xs).flags)try{switch(l.tag){case 0:case 11:case 15:ol(9,l)}}catch(k){Cc(l,l.return,k)}if(l===s){Xs=null;break e}var x=l.sibling;if(null!==x){x.return=l.return,Xs=x;break e}Xs=l.return}}if(Nl=i,Ho(),at&&"function"==typeof at.onPostCommitFiberRoot)try{at.onPostCommitFiberRoot(it,e)}catch(k){}o=!0}return o}finally{wt=r,Al.transition=t}}return!1}function _c(e,t,n){e=Bi(e,t=hs(0,t=us(n,t),1),1),t=tc(),null!==e&&(yt(e,1,t),oc(e,t))}function Cc(e,t,n){if(3===e.tag)_c(e,e,n);else for(;null!==t;){if(3===t.tag){_c(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Zl||!Zl.has(r))){t=Bi(t,e=ms(t,e=us(n,e),1),1),e=tc(),null!==t&&(yt(t,1,e),oc(t,e));break}}t=t.return}}function Ec(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=tc(),e.pingedLanes|=e.suspendedLanes&n,Tl===e&&(Il&n)===n&&(4===Pl||3===Pl&&(130023424&Il)===Il&&500>Ge()-$l?pc(e,0):Dl|=n),oc(e,t)}function zc(e,t){0===t&&(1&e.mode?(t=dt,!(130023424&(dt<<=1))&&(dt=4194304)):t=1);var n=tc();null!==(e=Fi(e,t))&&(yt(e,t,n),oc(e,n))}function Ac(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),zc(e,n)}function Nc(e,t){var r=0;switch(e.tag){case 13:var o=e.stateNode,i=e.memoizedState;null!==i&&(r=i.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(n(314))}null!==o&&o.delete(t),zc(e,r)}function Tc(e,t){return Qe(e,t)}function jc(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ic(e,t,n,r){return new jc(e,t,n,r)}function Oc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Mc(e,t){var n=e.alternate;return null===n?((n=Ic(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=14680064&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}function Pc(e,t,r,o,i,a){var s=2;if(o=e,"function"==typeof e)Oc(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case _:return Fc(r.children,i,a,t);case C:s=8,i|=8;break;case E:return(e=Ic(12,r,t,2|i)).elementType=E,e.lanes=a,e;case T:return(e=Ic(13,r,t,i)).elementType=T,e.lanes=a,e;case j:return(e=Ic(19,r,t,i)).elementType=j,e.lanes=a,e;case M:return Lc(r,i,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case z:s=10;break e;case A:s=9;break e;case N:s=11;break e;case I:s=14;break e;case O:s=16,o=null;break e}throw Error(n(130,null==e?e:typeof e,""))}return(t=Ic(s,r,t,i)).elementType=e,t.type=o,t.lanes=a,t}function Fc(e,t,n,r){return(e=Ic(7,e,r,t)).lanes=n,e}function Lc(e,t,n,r){return(e=Ic(22,e,r,t)).elementType=M,e.lanes=n,e.stateNode={isHidden:!1},e}function Rc(e,t,n){return(e=Ic(6,e,null,t)).lanes=n,e}function Dc(e,t,n){return(t=Ic(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Uc(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=bt(0),this.expirationTimes=bt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bt(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Bc(e,t,n,r,o,i,a,s,l){return e=new Uc(e,t,n,s,l),1===t?(t=1,!0===i&&(t|=8)):t=0,i=Ic(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ri(i),e}function $c(e){if(!e)return No;e:{if(Ve(e=e._reactInternals)!==e||1!==e.tag)throw Error(n(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Mo(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(n(171))}if(1===e.tag){var r=e.type;if(Mo(r))return Lo(e,r,t)}return t}function Vc(e,t,n,r,o,i,a,s,l){return(e=Bc(n,r,!0,e,0,i,0,s,l)).context=$c(null),n=e.current,(i=Ui(r=tc(),o=nc(n))).callback=null!=t?t:null,Bi(n,i,o),e.current.lanes=o,yt(e,o,r),oc(e,r),e}function Hc(e,t,n,r){var o=t.current,i=tc(),a=nc(o);return n=$c(n),null===t.context?t.context=n:t.pendingContext=n,(t=Ui(i,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Bi(o,t,a))&&(rc(e,o,a,i),$i(e,o,a)),a}function Wc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function qc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Zc(e,t){qc(e,t),(e=e.alternate)&&qc(e,t)}_l=function(e,t,r){if(null!==e)if(e.memoizedProps!==t.pendingProps||jo.current)ws=!0;else{if(0===(e.lanes&r)&&!(128&t.flags))return ws=!1,function(e,t,n){switch(t.tag){case 3:Ts(t),mi();break;case 5:Xi(t);break;case 1:Mo(t.type)&&Ro(t);break;case 4:Yi(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Ao(_i,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Ao(ta,1&ta.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Rs(e,t,n):(Ao(ta,1&ta.current),null!==(e=Ws(e,t,n))?e.sibling:null);Ao(ta,1&ta.current);break;case 19:if(r=0!==(n&t.childLanes),128&e.flags){if(r)return Vs(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ao(ta,ta.current),r)break;return null;case 22:case 23:return t.lanes=0,Cs(e,t,n)}return Ws(e,t,n)}(e,t,r);ws=!!(131072&e.flags)}else ws=!1,ai&&1048576&t.flags&&ti(t,Qo,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;Hs(e,t),e=t.pendingProps;var i=Oo(t,To.current);ji(t,r),i=ba(null,t,o,e,i,r);var a=ya();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Mo(o)?(a=!0,Ro(t)):a=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Ri(t),i.updater=is,t.stateNode=i,i._reactInternals=t,cs(t,o,e,r),t=Ns(null,t,o,!0,a,r)):(t.tag=0,ai&&a&&ni(t),xs(null,t,i,r),t=t.child),t;case 16:o=t.elementType;e:{switch(Hs(e,t),e=t.pendingProps,o=(i=o._init)(o._payload),t.type=o,i=t.tag=function(e){if("function"==typeof e)return Oc(e)?1:0;if(null!=e){if((e=e.$$typeof)===N)return 11;if(e===I)return 14}return 2}(o),e=rs(o,e),i){case 0:t=zs(null,t,o,e,r);break e;case 1:t=As(null,t,o,e,r);break e;case 11:t=ks(null,t,o,e,r);break e;case 14:t=Ss(null,t,o,rs(o.type,e),r);break e}throw Error(n(306,o,""))}return t;case 0:return o=t.type,i=t.pendingProps,zs(e,t,o,i=t.elementType===o?i:rs(o,i),r);case 1:return o=t.type,i=t.pendingProps,As(e,t,o,i=t.elementType===o?i:rs(o,i),r);case 3:e:{if(Ts(t),null===e)throw Error(n(387));o=t.pendingProps,i=(a=t.memoizedState).element,Di(e,t),Hi(t,o,null,r);var s=t.memoizedState;if(o=s.element,a.isDehydrated){if(a={element:o,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=js(e,t,o,r,i=us(Error(n(423)),t));break e}if(o!==i){t=js(e,t,o,r,i=us(Error(n(424)),t));break e}for(ii=uo(t.stateNode.containerInfo.firstChild),oi=t,ai=!0,si=null,r=Si(t,null,o,r),t.child=r;r;)r.flags=-3&r.flags|4096,r=r.sibling}else{if(mi(),o===i){t=Ws(e,t,r);break e}xs(e,t,o,r)}t=t.child}return t;case 5:return Xi(t),null===e&&di(t),o=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,s=i.children,ro(o,i)?s=null:null!==a&&ro(o,a)&&(t.flags|=32),Es(e,t),xs(e,t,s,r),t.child;case 6:return null===e&&di(t),null;case 13:return Rs(e,t,r);case 4:return Yi(t,t.stateNode.containerInfo),o=t.pendingProps,null===e?t.child=ki(t,null,o,r):xs(e,t,o,r),t.child;case 11:return o=t.type,i=t.pendingProps,ks(e,t,o,i=t.elementType===o?i:rs(o,i),r);case 7:return xs(e,t,t.pendingProps,r),t.child;case 8:case 12:return xs(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(o=t.type._context,i=t.pendingProps,a=t.memoizedProps,s=i.value,Ao(_i,o._currentValue),o._currentValue=s,null!==a)if(lr(a.value,s)){if(a.children===i.children&&!jo.current){t=Ws(e,t,r);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var l=a.dependencies;if(null!==l){s=a.child;for(var c=l.firstContext;null!==c;){if(c.context===o){if(1===a.tag){(c=Ui(-1,r&-r)).tag=2;var u=a.updateQueue;if(null!==u){var d=(u=u.shared).pending;null===d?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}a.lanes|=r,null!==(c=a.alternate)&&(c.lanes|=r),Ti(a.return,r,t),l.lanes|=r;break}c=c.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(n(341));s.lanes|=r,null!==(l=s.alternate)&&(l.lanes|=r),Ti(s,r,t),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}xs(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,o=t.pendingProps.children,ji(t,r),o=o(i=Ii(i)),t.flags|=1,xs(e,t,o,r),t.child;case 14:return i=rs(o=t.type,t.pendingProps),Ss(e,t,o,i=rs(o.type,i),r);case 15:return _s(e,t,t.type,t.pendingProps,r);case 17:return o=t.type,i=t.pendingProps,i=t.elementType===o?i:rs(o,i),Hs(e,t),t.tag=1,Mo(o)?(e=!0,Ro(t)):e=!1,ji(t,r),ss(t,o,i),cs(t,o,i,r),Ns(null,t,o,!0,e,r);case 19:return Vs(e,t,r);case 22:return Cs(e,t,r)}throw Error(n(156,t.tag))};var Qc="function"==typeof reportError?reportError:function(e){console.error(e)};function Kc(e){this._internalRoot=e}function Jc(e){this._internalRoot=e}function Yc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Gc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Xc(){}function eu(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i;if("function"==typeof o){var s=o;o=function(){var e=Wc(a);s.call(e)}}Hc(t,a,e,o)}else a=function(e,t,n,r,o){if(o){if("function"==typeof r){var i=r;r=function(){var e=Wc(a);i.call(e)}}var a=Vc(t,r,e,0,null,!1,0,"",Xc);return e._reactRootContainer=a,e[go]=a.current,Vr(8===e.nodeType?e.parentNode:e),dc(),a}for(;o=e.lastChild;)e.removeChild(o);if("function"==typeof r){var s=r;r=function(){var e=Wc(l);s.call(e)}}var l=Bc(e,0,!1,null,0,!1,0,"",Xc);return e._reactRootContainer=l,e[go]=l.current,Vr(8===e.nodeType?e.parentNode:e),dc(function(){Hc(t,l,n,r)}),l}(n,t,e,o,r);return Wc(a)}Jc.prototype.render=Kc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(n(409));Hc(e,t,null,null)},Jc.prototype.unmount=Kc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;dc(function(){Hc(null,e,null,null)}),t[go]=null}},Jc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mt.length&&0!==t&&t<Mt[n].priority;n++);Mt.splice(n,0,e),0===n&&Rt(e)}},kt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ft(t.pendingLanes);0!==n&&(vt(t,1|n),oc(t,Ge()),!(6&Nl)&&(Vl=Ge()+500,Ho()))}break;case 13:dc(function(){var t=Fi(e,1);if(null!==t){var n=tc();rc(t,e,1,n)}}),Zc(e,1)}},St=function(e){if(13===e.tag){var t=Fi(e,134217728);if(null!==t)rc(t,e,134217728,tc());Zc(e,134217728)}},_t=function(e){if(13===e.tag){var t=nc(e),n=Fi(e,t);if(null!==n)rc(n,e,t,tc());Zc(e,t)}},Ct=function(){return wt},Et=function(e,t){var n=wt;try{return wt=e,t()}finally{wt=n}},Se=function(e,t,r){switch(t){case"input":if(X(e,r),t=r.name,"radio"===r.type&&null!=t){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var o=r[t];if(o!==e&&o.form===e.form){var i=So(o);if(!i)throw Error(n(90));Q(o),X(o,i)}}}break;case"textarea":ae(e,r);break;case"select":null!=(t=r.value)&&re(e,!!r.multiple,t,!1)}},Ne=uc,Te=dc;var tu={usingClientEntryPoint:!1,Events:[xo,ko,So,ze,Ae,uc]},nu={findFiberByHostInstance:wo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ru={bundleType:nu.bundleType,version:nu.version,rendererPackageName:nu.rendererPackageName,rendererConfig:nu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:x.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=qe(e))?null:e.stateNode},findFiberByHostInstance:nu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ou=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ou.isDisabled&&ou.supportsFiber)try{it=ou.inject(ru),at=ou}catch(de){}}return a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tu,a.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Yc(t))throw Error(n(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:S,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,r)},a.createRoot=function(e,t){if(!Yc(e))throw Error(n(299));var r=!1,o="",i=Qc;return null!=t&&(!0===t.unstable_strictMode&&(r=!0),void 0!==t.identifierPrefix&&(o=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Bc(e,1,!1,null,0,r,0,o,i),e[go]=t.current,Vr(8===e.nodeType?e.parentNode:e),new Kc(t)},a.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(n(188));throw e=Object.keys(e).join(","),Error(n(268,e))}return e=null===(e=qe(t))?null:e.stateNode},a.flushSync=function(e){return dc(e)},a.hydrate=function(e,t,r){if(!Gc(t))throw Error(n(200));return eu(null,e,t,!0,r)},a.hydrateRoot=function(e,t,r){if(!Yc(e))throw Error(n(405));var o=null!=r&&r.hydratedSources||null,i=!1,a="",s=Qc;if(null!=r&&(!0===r.unstable_strictMode&&(i=!0),void 0!==r.identifierPrefix&&(a=r.identifierPrefix),void 0!==r.onRecoverableError&&(s=r.onRecoverableError)),t=Vc(t,null,e,1,null!=r?r:null,i,0,a,s),e[go]=t.current,Vr(e),o)for(e=0;e<o.length;e++)i=(i=(r=o[e])._getVersion)(r._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[r,i]:t.mutableSourceEagerHydrationData.push(r,i);return new Jc(t)},a.render=function(e,t,r){if(!Gc(t))throw Error(n(200));return eu(null,e,t,!1,r)},a.unmountComponentAtNode=function(e){if(!Gc(e))throw Error(n(40));return!!e._reactRootContainer&&(dc(function(){eu(null,null,e,!1,function(){e._reactRootContainer=null,e[go]=null})}),!0)},a.unstable_batchedUpdates=uc,a.unstable_renderSubtreeIntoContainer=function(e,t,r,o){if(!Gc(r))throw Error(n(200));if(null==e||void 0===e._reactInternals)throw Error(n(38));return eu(e,t,r,!1,o)},a.version="18.3.1-next-f1338f8080-20240426",a}function w(){if(h)return i.exports;return h=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)}}(),i.exports=v(),i.exports}var x=function(){if(m)return o;m=1;var e=w();return o.createRoot=e.createRoot,o.hydrateRoot=e.hydrateRoot,o}(),k=u();const S=t(k);var _,C,E={exports:{}},z={};var A=(C||(C=1,E.exports=function(){if(_)return z;_=1;var e=u(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(e,n,a){var s,l={},c=null,u=null;for(s in void 0!==a&&(c=""+a),void 0!==n.key&&(c=""+n.key),void 0!==n.ref&&(u=n.ref),n)r.call(n,s)&&!i.hasOwnProperty(s)&&(l[s]=n[s]);if(e&&e.defaultProps)for(s in n=e.defaultProps)void 0===l[s]&&(l[s]=n[s]);return{$$typeof:t,type:e,key:c,ref:u,props:l,_owner:o.current}}return z.Fragment=n,z.jsx=a,z.jsxs=a,z}()),E.exports);const N={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 T(){if("undefined"==typeof navigator)return"es";const e=navigator.language.split("-")[0];return N[e]?e:"es"}const j=k.createContext(void 0),I="botuyo-chat-locale";function O({children:e,defaultLocale:t}){const[n,r]=k.useState(()=>{if(t)return t;if("undefined"!=typeof window){const e=localStorage.getItem(I);if(e)return e}return T()});return k.useEffect(()=>{if("undefined"==typeof window||t)return;const e=()=>{localStorage.getItem(I)||r(T())};return window.addEventListener("languagechange",e),()=>window.removeEventListener("languagechange",e)},[t]),A.jsx(j.Provider,{value:{locale:n,setLocale:e=>{["es","en","pt","fr"].includes(e)?(r(e),"undefined"!=typeof window&&localStorage.setItem(I,e)):console.warn(`[BotUyo] Locale "${e}" no es soportado. Manteniendo "${n}"`)}},children:e})}function M(){const e=k.useContext(j);if(void 0===e)throw new Error("useLanguage debe usarse dentro de un LanguageProvider");return e}function P(e){const{locale:t,setLocale:n}=M();return{t:k.useCallback(n=>{const r=e?`${e}.${n}`:n,o=(i=N[t],(a=r).split(".").reduce((e,t)=>e?.[t],i)||a);var i,a;return o||n},[t,e]),setLocale:n,currentLocale:t}}const F=(...e)=>e.filter((e,t,n)=>Boolean(e)&&n.indexOf(e)===t).join(" ");var L={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 R=k.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>k.createElement("svg",{ref:l,...L,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:F("lucide",o),...s},[...a.map(([e,t])=>k.createElement(e,t)),...Array.isArray(i)?i:[i]])),D=(e,t)=>{const n=k.forwardRef(({className:n,...r},o)=>{return k.createElement(R,{ref:o,iconNode:t,className:F(`lucide-${i=e,i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,n),...r});var i});return n.displayName=`${e}`,n},U=D("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),B=D("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]),$=D("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),V=D("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),H=D("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),W=D("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]),q=D("ExternalLink",[["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"}]]),Z=D("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]),Q=D("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]),K=D("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"}]]),J=D("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Y=D("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]),G=D("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]),X=D("MicOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2",key:"80xlxr"}],["path",{d:"M5 10v2a7 7 0 0 0 12 5",key:"p2k8kg"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]),ee=D("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]),te=D("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]),ne=D("PhoneOff",[["path",{d:"M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91",key:"z86iuo"}],["line",{x1:"22",x2:"2",y1:"2",y2:"22",key:"11kh81"}]]),re=D("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]),oe=D("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]),ie=D("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),ae=D("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]),se=D("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]),le=D("ShieldCheck",[["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"}]]),ce=D("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),ue=D("Volume2",[["polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5",key:"16drj5"}],["path",{d:"M15.54 8.46a5 5 0 0 1 0 7.07",key:"ltjumu"}],["path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14",key:"1kegas"}]]),de=D("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),fe=D("ZoomIn",[["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 pe(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=pe(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}const he=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),me="-",ge=[],be=e=>{const t=we(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return ve(e);const n=e.split(me),r=""===n[0]&&n.length>1?1:0;return ye(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||ge}return n[e]||ge}}},ye=(e,t,n)=>{if(0===e.length-t)return n.classGroupId;const r=e[t],o=n.nextPart.get(r);if(o){const n=ye(e,t+1,o);if(n)return n}const i=n.validators;if(null===i)return;const a=0===t?e.join(me):e.slice(t).join(me),s=i.length;for(let l=0;l<s;l++){const e=i[l];if(e.validator(a))return e.classGroupId}},ve=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})(),we=e=>{const{theme:t,classGroups:n}=e;return xe(n,t)},xe=(e,t)=>{const n=he();for(const r in e){const o=e[r];ke(o,n,r,t)}return n},ke=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const o=e[i];Se(o,t,n,r)}},Se=(e,t,n,r)=>{"string"!=typeof e?"function"!=typeof e?Ee(e,t,n,r):Ce(e,t,n,r):_e(e,t,n)},_e=(e,t,n)=>{(""===e?t:ze(t,e)).classGroupId=n},Ce=(e,t,n,r)=>{Ae(e)?ke(e(r),t,n,r):(null===t.validators&&(t.validators=[]),t.validators.push(((e,t)=>({classGroupId:e,validator:t}))(n,e)))},Ee=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let a=0;a<i;a++){const[e,i]=o[a];ke(i,ze(t,e),n,r)}},ze=(e,t)=>{let n=e;const r=t.split(me),o=r.length;for(let i=0;i<o;i++){const e=r[i];let t=n.nextPart.get(e);t||(t=he(),n.nextPart.set(e,t)),n=t}return n},Ae=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,Ne=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)}}},Te=[],je=(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 je(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)):je(Te,!1,t,void 0,!0)}if(n){const e=r;r=t=>n({className:t,parseClassName:e})}return r},Oe=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}},Me=/\s+/,Pe=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Pe(e[r]))&&(n&&(n+=" "),n+=t);return n},Fe=(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(Me);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(":"),b=d?g+"!":g,y=b+m;if(a.indexOf(y)>-1)continue;a.push(y);const v=o(m,h);for(let n=0;n<v.length;++n){const e=v[n];a.push(b+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:Ne(e.cacheSize),parseClassName:Ie(e),sortModifiers:Oe(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=Pe(t))&&(o&&(o+=" "),o+=n);return o})(...e))},Le=[],Re=e=>{const t=t=>t[e]||Le;return t.isThemeGetter=!0,t},De=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ue=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Be=/^\d+\/\d+$/,$e=/^(\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$/,He=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,We=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ze=e=>Be.test(e),Qe=e=>!!e&&!Number.isNaN(Number(e)),Ke=e=>!!e&&Number.isInteger(Number(e)),Je=e=>e.endsWith("%")&&Qe(e.slice(0,-1)),Ye=e=>$e.test(e),Ge=()=>!0,Xe=e=>Ve.test(e)&&!He.test(e),et=()=>!1,tt=e=>We.test(e),nt=e=>qe.test(e),rt=e=>!it(e)&&!dt(e),ot=e=>yt(e,kt,et),it=e=>De.test(e),at=e=>yt(e,St,Xe),st=e=>yt(e,_t,Qe),lt=e=>yt(e,wt,et),ct=e=>yt(e,xt,nt),ut=e=>yt(e,Et,tt),dt=e=>Ue.test(e),ft=e=>vt(e,St),pt=e=>vt(e,Ct),ht=e=>vt(e,wt),mt=e=>vt(e,kt),gt=e=>vt(e,xt),bt=e=>vt(e,Et,!0),yt=(e,t,n)=>{const r=De.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},vt=(e,t,n=!1)=>{const r=Ue.exec(e);return!!r&&(r[1]?t(r[1]):n)},wt=e=>"position"===e||"percentage"===e,xt=e=>"image"===e||"url"===e,kt=e=>"length"===e||"size"===e||"bg-size"===e,St=e=>"length"===e,_t=e=>"number"===e,Ct=e=>"family-name"===e,Et=e=>"shadow"===e,zt=Fe(()=>{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"),b=Re("ease"),y=Re("animate"),v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",dt,it],w=()=>[dt,it,l],x=()=>[Ze,"full","auto",...w()],k=()=>[Ke,"none","subgrid",dt,it],S=()=>["auto",{span:["full",Ke,dt,it]},Ke,dt,it],_=()=>[Ke,"auto",dt,it],C=()=>["auto","min","max","fr",dt,it],E=()=>["auto",...w()],z=()=>[Ze,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],A=()=>[e,dt,it],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",ht,lt,{position:[dt,it]}],T=()=>["auto","cover","contain",mt,ot,{size:[dt,it]}],j=()=>[Je,ft,at],I=()=>["","none","full",c,dt,it],O=()=>["",Qe,ft,at],M=()=>[Qe,Je,ht,lt],P=()=>["","none",h,dt,it],F=()=>["none",Qe,dt,it],L=()=>["none",Qe,dt,it],R=()=>[Qe,dt,it],D=()=>[Ze,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ye],breakpoint:[Ye],color:[Ge],container:[Ye],"drop-shadow":[Ye],ease:["in","out","in-out"],font:[rt],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ye],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ye],shadow:[Ye],spacing:["px",Qe],text:[Ye],"text-shadow":[Ye],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ze,it,dt,g]}],container:["container"],columns:[{columns:[Qe,it,dt,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:x()}],"inset-x":[{"inset-x":x()}],"inset-y":[{"inset-y":x()}],start:[{start:x()}],end:[{end:x()}],top:[{top:x()}],right:[{right:x()}],bottom:[{bottom:x()}],left:[{left:x()}],visibility:["visible","invisible","collapse"],z:[{z:[Ke,"auto",dt,it]}],basis:[{basis:[Ze,"full","auto",s,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Qe,Ze,"auto","initial","none",it]}],grow:[{grow:["",Qe,dt,it]}],shrink:[{shrink:["",Qe,dt,it]}],order:[{order:[Ke,"first","last","none",dt,it]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:S()}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":k()}],"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":C()}],"auto-rows":[{"auto-rows":C()}],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:E()}],mx:[{mx:E()}],my:[{my:E()}],ms:[{ms:E()}],me:[{me:E()}],mt:[{mt:E()}],mr:[{mr:E()}],mb:[{mb:E()}],ml:[{ml:E()}],"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,ft,at]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,dt,st]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Je,it]}],"font-family":[{font:[pt,it,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,dt,it]}],"line-clamp":[{"line-clamp":[Qe,"none",dt,st]}],leading:[{leading:[i,...w()]}],"list-image":[{"list-image":["none",dt,it]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",dt,it]}],"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:[Qe,"from-font","auto",dt,at]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[Qe,"auto",dt,it]}],"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",dt,it]}],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",dt,it]}],"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"]},Ke,dt,it],radial:["",dt,it],conic:[Ke,dt,it]},gt,ct]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:j()}],"gradient-via-pos":[{via:j()}],"gradient-to-pos":[{to:j()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:O()}],"border-w-x":[{"border-x":O()}],"border-w-y":[{"border-y":O()}],"border-w-s":[{"border-s":O()}],"border-w-e":[{"border-e":O()}],"border-w-t":[{"border-t":O()}],"border-w-r":[{"border-r":O()}],"border-w-b":[{"border-b":O()}],"border-w-l":[{"border-l":O()}],"divide-x":[{"divide-x":O()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":O()}],"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":[Qe,dt,it]}],"outline-w":[{outline:["",Qe,ft,at]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",u,bt,ut]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",d,bt,ut]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:O()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[Qe,at]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":O()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",f,bt,ut]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[Qe,dt,it]}],"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":[Qe]}],"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":[dt,it]}],"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":[Qe]}],"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",dt,it]}],filter:[{filter:["","none",dt,it]}],blur:[{blur:P()}],brightness:[{brightness:[Qe,dt,it]}],contrast:[{contrast:[Qe,dt,it]}],"drop-shadow":[{"drop-shadow":["","none",p,bt,ut]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",Qe,dt,it]}],"hue-rotate":[{"hue-rotate":[Qe,dt,it]}],invert:[{invert:["",Qe,dt,it]}],saturate:[{saturate:[Qe,dt,it]}],sepia:[{sepia:["",Qe,dt,it]}],"backdrop-filter":[{"backdrop-filter":["","none",dt,it]}],"backdrop-blur":[{"backdrop-blur":P()}],"backdrop-brightness":[{"backdrop-brightness":[Qe,dt,it]}],"backdrop-contrast":[{"backdrop-contrast":[Qe,dt,it]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Qe,dt,it]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Qe,dt,it]}],"backdrop-invert":[{"backdrop-invert":["",Qe,dt,it]}],"backdrop-opacity":[{"backdrop-opacity":[Qe,dt,it]}],"backdrop-saturate":[{"backdrop-saturate":[Qe,dt,it]}],"backdrop-sepia":[{"backdrop-sepia":["",Qe,dt,it]}],"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",dt,it]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Qe,"initial",dt,it]}],ease:[{ease:["linear","initial",b,dt,it]}],delay:[{delay:[Qe,dt,it]}],animate:[{animate:["none",y,dt,it]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,dt,it]}],"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:R()}],"skew-x":[{"skew-x":R()}],"skew-y":[{"skew-y":R()}],transform:[{transform:[dt,it,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:D()}],"translate-x":[{"translate-x":D()}],"translate-y":[{"translate-y":D()}],"translate-z":[{"translate-z":D()}],"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",dt,it]}],"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",dt,it]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[Qe,ft,at,st]}],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 At(...e){return zt(function(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=pe(e))&&(r&&(r+=" "),r+=t);return r}(e))}const Nt={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"},Tt="hsl(160, 84%, 39%)",jt="Asistente",It="",Ot="bottom-right",Mt="¡Hola! ¿En qué puedo ayudarte?",Pt="Escribe un mensaje...";function Ft(e){return e.primaryColor||Tt}const Lt={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},Dt=k.createContext(Lt),Ut=k.createContext(Rt);function Bt({children:e,animations:t,effects:n}){const r=k.useMemo(()=>({...Lt,...t}),[t]),o=k.useMemo(()=>({...Rt,...n}),[n]);return A.jsx(Dt.Provider,{value:r,children:A.jsx(Ut.Provider,{value:o,children:e})})}function $t(){return"undefined"!=typeof window&&!!window.DEBUG}const Vt=(e,...t)=>{$t()&&console.warn(`[BotUyo] ${e}`,...t)},Ht=(e,...t)=>{console.error(`[BotUyo] ${e}`,...t)},Wt=(e,...t)=>{$t()&&console.debug(`[BotUyo] ${e}`,...t)},qt=(e,...t)=>{$t()&&console.info(`[BotUyo] ${e}`,...t)},Zt=`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')}`,Qt=function(){const e=8e3,t=Math.floor(1200),n=2*t,r=44+n,o=new ArrayBuffer(r),i=new DataView(o);Kt(i,0,"RIFF"),i.setUint32(4,r-8,!0),Kt(i,8,"WAVE"),Kt(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),Kt(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 Kt(e,t,n){for(let r=0;r<n.length;r++)e.setUint8(t+r,n.charCodeAt(r))}function Jt({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,showPromptAvatar:f=!1}){const{t:p}=P("extracted"),h=Ft({primaryColor:r}),m=c?.launcher?.bg,g=k.useContext(Dt),{triggerHaptic:b,getGlowClass:y}=function(){const e=k.useContext(Ut);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)}}}(),v=g.launcherPulse&&!1!==c?.launcher?.pulse,[w,x]=k.useState(!1),[S,_]=k.useState(!1),[C,E]=k.useState(!1),[z,N]=k.useState(!1),T="bottom-right"===a,j="chat_launcher_prompt_state",I=k.useMemo(()=>l[s]||l.default||o||Zt,[s,l,o]);k.useEffect(()=>{N(!1)},[I]),k.useEffect(()=>{const e=Object.values(l).filter(e=>!!e);o&&e.push(o),e.forEach(e=>{(new Image).src=e})},[l,o]),k.useEffect(()=>{"forever"===u&&"dismissed"===localStorage.getItem(j)&&E(!0)},[u]);const O=k.useCallback(()=>{_(!0),setTimeout(()=>x(!1),500),"always"!==u&&(E(!0),"forever"===u&&localStorage.setItem(j,"dismissed"))},[u]);k.useEffect(()=>{if("always"!==u&&C||!i||e)return void x(!1);const t=setTimeout(()=>{x(!0),_(!1)},2e3),n=setTimeout(()=>O(),12e3);return()=>{clearTimeout(t),clearTimeout(n)}},[i,e,C,u,O]);const M=()=>{Wt("Launcher handleMainAction called, isOpen:",e),b(),E(!0),"forever"===u&&localStorage.setItem(j,"dismissed"),t()};return A.jsxs("div",{className:At("flex items-center w-fit transition-all duration-500",T?"flex-row ml-auto":"flex-row-reverse mr-auto"),children:[A.jsx("div",{className:At("transition-all duration-700 ease-in-out flex items-end",w?At("opacity-100 translate-x-0 w-auto max-w-[350px]",T?"mr-5":"ml-5"):At("opacity-0 w-0 max-w-0 overflow-hidden pointer-events-none",T?"translate-x-4":"-translate-x-4")),children:A.jsxs("div",{className:At("relative flex items-center gap-2.5 cursor-pointer",S&&"opacity-0 scale-95 transition-all duration-300",!w&&"hidden"),onClick:M,style:{width:"max-content"},children:[f&&A.jsx("div",{className:"shrink-0 overflow-hidden",style:{width:"36px",height:"36px",borderRadius:"50%",backgroundColor:h||"hsl(160,84%,39%)",boxShadow:`0 2px 8px ${h||"hsl(160,84%,39%)"}44`,display:"flex",alignItems:"center",justifyContent:"center"},children:I&&!z?A.jsx("img",{src:I,alt:"",style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:"50%"},onError:()=>N(!0)}):A.jsx(G,{style:{width:"18px",height:"18px",color:"white",fill:"white"}})}),A.jsx("div",{style:{position:"relative",maxWidth:"280px",padding:"10px 16px",borderRadius:"18px",backgroundColor:"hsl(var(--background) / 0.92)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",color:"hsl(var(--foreground))",boxShadow:"0 4px 20px -4px rgba(0,0,0,0.12), 0 0 0 1px hsl(var(--border) / 0.6)"},children:A.jsx("span",{style:{display:"block",fontSize:"13.5px",fontWeight:600,lineHeight:1.4,letterSpacing:"-0.01em",whiteSpace:"nowrap"},children:i})}),A.jsx("button",{onClick:e=>{e.stopPropagation(),O()},style:{position:"absolute",top:"-6px",right:"-6px",width:"20px",height:"20px",borderRadius:"50%",backgroundColor:"hsl(var(--background))",border:"1px solid hsl(var(--border))",boxShadow:"0 1px 4px rgba(0,0,0,0.1)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",color:"hsl(var(--muted-foreground))",padding:0,transition:"all 0.2s"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="hsl(var(--destructive))",e.currentTarget.style.color="white",e.currentTarget.style.borderColor="hsl(var(--destructive))"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="hsl(var(--background))",e.currentTarget.style.color="hsl(var(--muted-foreground))",e.currentTarget.style.borderColor="hsl(var(--border))"},"aria-label":"Cerrar",children:A.jsx(de,{className:"h-3 w-3",style:{strokeWidth:2.5}})})]})}),A.jsxs("div",{className:"relative flex items-center justify-center shrink-0",children:[!e&&v&&A.jsx("span",{className:"absolute inset-0 flex items-center justify-center",children:A.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full opacity-20",style:{backgroundColor:h}})}),A.jsxs("button",{type:"button",onClick:M,className:At("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&&g.enabled&&"animate-glow-pulse",c?.radius?.button||"rounded-full",m,y()),style:{backgroundColor:h||"hsl(160, 84%, 39%)","--primary-glow":`${h}66`},"aria-label":e?"Cerrar chat":"Abrir chat",children:[A.jsxs("div",{className:"relative h-full w-full flex items-center justify-center overflow-hidden rounded-inherit",children:[A.jsx("div",{className:At("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:I&&!z?A.jsx("img",{src:I,alt:p("assistant"),className:"w-full h-full object-cover",style:{transform:`scale(${d})`},onError:()=>N(!0)},I):A.jsx(G,{className:"h-7 w-7 sm:h-8 sm:w-8 fill-current"})}),A.jsx("div",{className:At("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:A.jsx(de,{className:"h-7 w-7 sm:h-8 sm:w-8 stroke-[2.5]"})})]}),!e&&n>0&&A.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 Yt=w();function Gt(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 Xt(e,t){if(void 0===e)throw new Error("Unexpected undefined");return e}const en=(e,t,n)=>{let r;return function(...o){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,o),n)}},tn=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},nn=e=>e,rn=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},on=(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(tn(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(tn(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},an={passive:!0},sn="undefined"==typeof window||"onscrollend"in window,ln=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let o=0;const i=e.options.useScrollendEvent&&sn?()=>{}:en(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,an);const c=e.options.useScrollendEvent&&sn;return c&&n.addEventListener("scrollend",l,an),()=>{n.removeEventListener("scroll",s),c&&n.removeEventListener("scrollend",l)}},cn=(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"]},un=(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 dn{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:nn,rangeExtractor:rn,onChange:()=>{},measureElement:cn,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=Gt(()=>(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=Gt(()=>[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=Gt(()=>[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=Gt(()=>[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=fn(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=Gt(()=>{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=Gt(()=>[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 Xt(t[fn(0,t.length-1,e=>Xt(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 fn=(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 pn="undefined"!=typeof document?k.useLayoutEffect:k.useEffect;function hn(e){return function({useFlushSync:e=!0,...t}){const n=k.useReducer(()=>({}),{})[1],r={...t,onChange:(r,o)=>{var i;e&&o?Yt.flushSync(n):n(),null==(i=t.onChange)||i.call(t,r,o)}},[o]=k.useState(()=>new dn(r));return o.setOptions(r),pn(()=>o._didMount(),[]),pn(()=>o._willUpdate()),o}({observeElementRect:on,observeElementOffset:ln,scrollToFn:un,...e})}function mn(){}function gn(){}const bn=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yn=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,vn={};function wn(e,t){return(vn.jsx?yn:bn).test(e)}const xn=/[ \t\n\f\r]/g;function kn(e){return""===e.replace(xn,"")}class Sn{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function _n(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Sn(n,r,t)}function Cn(e){return e.toLowerCase()}Sn.prototype.normal={},Sn.prototype.property={},Sn.prototype.space=void 0;class En{constructor(e,t){this.attribute=t,this.property=e}}En.prototype.attribute="",En.prototype.booleanish=!1,En.prototype.boolean=!1,En.prototype.commaOrSpaceSeparated=!1,En.prototype.commaSeparated=!1,En.prototype.defined=!1,En.prototype.mustUseProperty=!1,En.prototype.number=!1,En.prototype.overloadedBoolean=!1,En.prototype.property="",En.prototype.spaceSeparated=!1,En.prototype.space=void 0;let zn=0;const An=Pn(),Nn=Pn(),Tn=Pn(),jn=Pn(),In=Pn(),On=Pn(),Mn=Pn();function Pn(){return 2**++zn}const Fn=Object.freeze(Object.defineProperty({__proto__:null,boolean:An,booleanish:Nn,commaOrSpaceSeparated:Mn,commaSeparated:On,number:jn,overloadedBoolean:Tn,spaceSeparated:In},Symbol.toStringTag,{value:"Module"})),Ln=Object.keys(Fn);class Rn extends En{constructor(e,t,n,r){let o=-1;if(super(e,t),Dn(this,"space",r),"number"==typeof n)for(;++o<Ln.length;){const e=Ln[o];Dn(this,Ln[o],(n&Fn[e])===Fn[e])}}}function Dn(e,t,n){n&&(e[t]=n)}function Un(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 Sn(t,n,e.space)}Rn.prototype.defined=!0;const Bn=Un({properties:{ariaActiveDescendant:null,ariaAtomic:Nn,ariaAutoComplete:null,ariaBusy:Nn,ariaChecked:Nn,ariaColCount:jn,ariaColIndex:jn,ariaColSpan:jn,ariaControls:In,ariaCurrent:null,ariaDescribedBy:In,ariaDetails:null,ariaDisabled:Nn,ariaDropEffect:In,ariaErrorMessage:null,ariaExpanded:Nn,ariaFlowTo:In,ariaGrabbed:Nn,ariaHasPopup:null,ariaHidden:Nn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:In,ariaLevel:jn,ariaLive:null,ariaModal:Nn,ariaMultiLine:Nn,ariaMultiSelectable:Nn,ariaOrientation:null,ariaOwns:In,ariaPlaceholder:null,ariaPosInSet:jn,ariaPressed:Nn,ariaReadOnly:Nn,ariaRelevant:null,ariaRequired:Nn,ariaRoleDescription:In,ariaRowCount:jn,ariaRowIndex:jn,ariaRowSpan:jn,ariaSelected:Nn,ariaSetSize:jn,ariaSort:null,ariaValueMax:jn,ariaValueMin:jn,ariaValueNow:jn,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function $n(e,t){return t in e?e[t]:t}function Vn(e,t){return $n(e,t.toLowerCase())}const Hn=Un({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:On,acceptCharset:In,accessKey:In,action:null,allow:null,allowFullScreen:An,allowPaymentRequest:An,allowUserMedia:An,alt:null,as:null,async:An,autoCapitalize:null,autoComplete:In,autoFocus:An,autoPlay:An,blocking:In,capture:null,charSet:null,checked:An,cite:null,className:In,cols:jn,colSpan:null,content:null,contentEditable:Nn,controls:An,controlsList:In,coords:jn|On,crossOrigin:null,data:null,dateTime:null,decoding:null,default:An,defer:An,dir:null,dirName:null,disabled:An,download:Tn,draggable:Nn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:An,formTarget:null,headers:In,height:jn,hidden:Tn,high:jn,href:null,hrefLang:null,htmlFor:In,httpEquiv:In,id:null,imageSizes:null,imageSrcSet:null,inert:An,inputMode:null,integrity:null,is:null,isMap:An,itemId:null,itemProp:In,itemRef:In,itemScope:An,itemType:In,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:An,low:jn,manifest:null,max:null,maxLength:jn,media:null,method:null,min:null,minLength:jn,multiple:An,muted:An,name:null,nonce:null,noModule:An,noValidate:An,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:An,optimum:jn,pattern:null,ping:In,placeholder:null,playsInline:An,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:An,referrerPolicy:null,rel:In,required:An,reversed:An,rows:jn,rowSpan:jn,sandbox:In,scope:null,scoped:An,seamless:An,selected:An,shadowRootClonable:An,shadowRootDelegatesFocus:An,shadowRootMode:null,shape:null,size:jn,sizes:null,slot:null,span:jn,spellCheck:Nn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:jn,step:null,style:null,tabIndex:jn,target:null,title:null,translate:null,type:null,typeMustMatch:An,useMap:null,value:Nn,width:jn,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:In,axis:null,background:null,bgColor:null,border:jn,borderColor:null,bottomMargin:jn,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:An,declare:An,event:null,face:null,frame:null,frameBorder:null,hSpace:jn,leftMargin:jn,link:null,longDesc:null,lowSrc:null,marginHeight:jn,marginWidth:jn,noResize:An,noHref:An,noShade:An,noWrap:An,object:null,profile:null,prompt:null,rev:null,rightMargin:jn,rules:null,scheme:null,scrolling:Nn,standby:null,summary:null,text:null,topMargin:jn,valueType:null,version:null,vAlign:null,vLink:null,vSpace:jn,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:An,disableRemotePlayback:An,prefix:null,property:null,results:jn,security:null,unselectable:null},space:"html",transform:Vn}),Wn=Un({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:Mn,accentHeight:jn,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:jn,amplitude:jn,arabicForm:null,ascent:jn,attributeName:null,attributeType:null,azimuth:jn,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:jn,by:null,calcMode:null,capHeight:jn,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:jn,diffuseConstant:jn,direction:null,display:null,dur:null,divisor:jn,dominantBaseline:null,download:An,dx:null,dy:null,edgeMode:null,editable:null,elevation:jn,enableBackground:null,end:null,event:null,exponent:jn,externalResourcesRequired:null,fill:null,fillOpacity:jn,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:On,g2:On,glyphName:On,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:jn,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:jn,horizOriginX:jn,horizOriginY:jn,id:null,ideographic:jn,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:jn,k:jn,k1:jn,k2:jn,k3:jn,k4:jn,kernelMatrix:Mn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:jn,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:jn,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:jn,overlineThickness:jn,paintOrder:null,panose1:null,path:null,pathLength:jn,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:In,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:jn,pointsAtY:jn,pointsAtZ:jn,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Mn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Mn,rev:Mn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Mn,requiredFeatures:Mn,requiredFonts:Mn,requiredFormats:Mn,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:jn,specularExponent:jn,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:jn,strikethroughThickness:jn,string:null,stroke:null,strokeDashArray:Mn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:jn,strokeOpacity:jn,strokeWidth:null,style:null,surfaceScale:jn,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Mn,tabIndex:jn,tableValues:null,target:null,targetX:jn,targetY:jn,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Mn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:jn,underlineThickness:jn,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:jn,values:null,vAlphabetic:jn,vMathematical:jn,vectorEffect:null,vHanging:jn,vIdeographic:jn,version:null,vertAdvY:jn,vertOriginX:jn,vertOriginY:jn,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:jn,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:$n}),qn=Un({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()}),Zn=Un({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Vn}),Qn=Un({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),Kn={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"},Jn=/[A-Z]/g,Yn=/-[a-z]/g,Gn=/^data[-\w.:]+$/i;function Xn(e){return"-"+e.toLowerCase()}function er(e){return e.charAt(1).toUpperCase()}const tr=_n([Bn,Hn,qn,Zn,Qn],"html"),nr=_n([Bn,Wn,qn,Zn,Qn],"svg");var rr,or,ir,ar={};function sr(){if(ir)return ar;ir=1;var e=ar&&ar.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ar,"__esModule",{value:!0}),ar.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(or)return rr;or=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 rr=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),y(),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 b(e){var t=e.exec(s);if(t){var n=t[0];return p(n),s=s.slice(n.length),t}}function y(){b(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 x(){var t=h(),n=b(r);if(n){if(w(),!b(o))return g("property missing ':'");var s=b(i),u=t({type:"declaration",property:c(n[0].replace(e,l)),value:s?c(s[0].replace(e,l)):l});return b(a),u}}return m.prototype.content=s,y(),function(){var e,t=[];for(v(t);e=x();)!1!==e&&(t.push(e),v(t));return t}()}}());return ar}var lr,cr,ur,dr={};function fr(){if(lr)return dr;lr=1,Object.defineProperty(dr,"__esModule",{value:!0}),dr.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 dr.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))},dr}const pr=t(function(){if(ur)return cr;ur=1;var e=(cr&&cr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(sr()),t=fr();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,cr=n}()),hr=gr("end"),mr=gr("start");function gr(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=mr(e),n=hr(e);if(t&&n)return{start:t,end:n}}function yr(e){return e&&"object"==typeof e?"position"in e||"type"in e?wr(e.position):"start"in e||"end"in e?wr(e):"line"in e||"column"in e?vr(e):"":""}function vr(e){return xr(e&&e.line)+":"+xr(e&&e.column)}function wr(e){return vr(e&&e.start)+"-"+vr(e&&e.end)}function xr(e){return e&&"number"==typeof e?e:1}class kr 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=yr(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}}kr.prototype.file="",kr.prototype.name="",kr.prototype.reason="",kr.prototype.message="",kr.prototype.stack="",kr.prototype.column=void 0,kr.prototype.line=void 0,kr.prototype.ancestors=void 0,kr.prototype.cause=void 0,kr.prototype.fatal=void 0,kr.prototype.place=void 0,kr.prototype.ruleId=void 0,kr.prototype.source=void 0;const Sr={}.hasOwnProperty,_r=new Map,Cr=/[A-Z]/g,Er=new Set(["table","tbody","thead","tfoot","tr"]),zr=new Set(["td","th"]),Ar="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Nr(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=mr(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?nr:tr,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},i=Tr(o,e,void 0);return i&&"string"!=typeof i?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function Tr(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=nr,e.schema=o);e.ancestors.push(t);const i=Pr(e,t.tagName,!1),a=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&Sr.call(t.properties,o)){const i=Mr(e,o,t.properties[o]);if(i){const[o,a]=i;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof a&&zr.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=Or(e,t);Er.has(t.tagName)&&(s=s.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&kn(t.value):kn(t));var t}));return jr(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)}Fr(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=nr,e.schema=o);e.ancestors.push(t);const i=null===t.name?e.Fragment:Pr(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];mn(t.type);const o=t.expression;mn(o.type);const i=o.properties[0];mn(i.type),Object.assign(n,e.evaluater.evaluateExpression(i.argument))}else Fr(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];mn(t.type),i=e.evaluater.evaluateExpression(t.expression)}else Fr(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(e,t),s=Or(e,t);return jr(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);Fr(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return Ir(r,Or(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 jr(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 Or(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:_r;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=Tr(e,i,a);void 0!==s&&n.push(s)}return n}function Mr(e,t,n){const r=function(e,t){const n=Cn(t);let r=t,o=En;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&Gn.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Yn,er);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Yn.test(e)){let n=e.replace(Jn,Xn);"-"!==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 pr(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const t=n,r=new kr("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=Ar+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)Sr.call(e,n)&&(t[Lr(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?Kn[r.property]||r.property:r.attribute,n]}}function Pr(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=wn(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=wn(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 Sr.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Fr(e)}function Fr(e,t){const n=new kr("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=Ar+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Lr(e){let t=e.replace(Cr,Rr);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function Rr(e){return"-"+e.toLowerCase()}const Dr={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"]},Ur={};function Br(e,t){return $r(e,"boolean"!=typeof Ur.includeImageAlt||Ur.includeImageAlt,"boolean"!=typeof Ur.includeHtml||Ur.includeHtml)}function $r(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]=$r(e[o],t,n);return r.join("")}const Hr=document.createElement("i");function Wr(e){const t="&"+e+";";Hr.innerHTML=t;const n=Hr.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function qr(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 Zr(e,t){return e.length>0?(qr(e,e.length,0,t),e):t}const Qr={}.hasOwnProperty;function Kr(e){const t={};let n=-1;for(;++n<e.length;)Jr(t,e[n]);return t}function Jr(e,t){let n;for(n in t){const r=(Qr.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){Qr.call(r,i)||(r[i]=[]);const e=o[i];Yr(r[i],Array.isArray(e)?e:e?[e]:[])}}}function Yr(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);qr(e,0,0,r)}function Gr(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 Xr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const eo=po(/[A-Za-z]/),to=po(/[\dA-Za-z]/),no=po(/[#-'*+\--9=?A-Z^-~]/);function ro(e){return null!==e&&(e<32||127===e)}const oo=po(/\d/),io=po(/[\dA-Fa-f]/),ao=po(/[!-/:-@[-`{-~]/);function so(e){return null!==e&&e<-2}function lo(e){return null!==e&&(e<0||32===e)}function co(e){return-2===e||-1===e||32===e}const uo=po(new RegExp("\\p{P}|\\p{S}","u")),fo=po(/\s/);function po(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function ho(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(37===i&&to(e.charCodeAt(n+1))&&to(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 mo(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){if(co(r))return e.enter(n),a(r);return t(r)};function a(r){return co(r)&&i++<o?(e.consume(r),a):(e.exit(n),t(r))}}const go={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"),mo(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)):so(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&&y();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}b(a);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return qr(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(yo,u,d)(o)}function u(e){return r&&y(),b(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(yo,p,h)(n)}function p(e){return a++,n.push([t.currentConstruct,t.containerState]),f(e)}function h(n){return null===n?(r&&y(),b(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),b(0),void e.consume(n)):so(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(b(a),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;qr(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function b(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 y(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},yo={tokenize:function(e,t,n){return mo(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function vo(e){return null===e||lo(e)||fo(e)?1:uo(e)?2:void 0}function wo(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};ko(d,-s),ko(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=Zr(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=Zr(l,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),l=Zr(l,wo(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=Zr(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=Zr(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,qr(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=vo(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=vo(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 ko(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const So={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 eo(t)?(e.consume(t),i):64===t?n(t):l(t)}function i(e){return 43===e||45===e||46===e||to(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||to(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||ro(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):no(t)?(e.consume(t),l):n(t)}function c(e){return to(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||to(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const _o={partial:!0,tokenize:function(e,t,n){return function(t){return co(t)?mo(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||so(e)?t(e):n(e)}}};const Co={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(co(t))return mo(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 co(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const Eo={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 ao(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const zo={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=to,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=io,c):(e.enter("characterReferenceValue"),o=7,i=oo,c(t))}function c(s){if(59===s&&a){const o=e.exit("characterReferenceValue");return i!==to||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 Ao={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)}}},No={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"),co(t)?mo(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"),co(t)?mo(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||so(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"),co(t)?mo(e,c,"whitespace")(t):c(t))}function c(n){return null===n||so(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(Ao,p,y)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||so(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):co(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),mo(e,d,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),u)}function d(t){return null===t||so(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),f(t))}function f(t){return null===t||so(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,y,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return a>0&&co(t)?mo(e,g,"linePrefix",a+1)(t):g(t)}function g(t){return null===t||so(t)?e.check(Ao,p,y)(t):(e.enter("codeFlowValue"),b(t))}function b(t){return null===t||so(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),b)}function y(n){return e.exit("codeFenced"),t(n)}}};const To={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),mo(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):so(t)?e.attempt(jo,i,s)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||so(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),a)}function s(n){return e.exit("codeIndented"),t(n)}}},jo={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):so(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):mo(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):so(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)):so(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||so(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 Oo{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&&Mo(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),Mo(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Mo(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);Mo(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Mo(this.left,t.reverse())}}}function Mo(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 Po(e){const t={};let n,r,o,i,a,s,l,c=-1;const u=new Oo(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,Fo(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 qr(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function Fo(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 Lo={resolve:function(e){return Po(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):so(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"),mo(e,o,"linePrefix")};function o(o){if(null===o||so(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 Do(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||ro(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||so(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&&!lo(o)?u<c&&40===o?(e.consume(o),u++,h):41===o?(e.consume(o),u--,h):null===o||32===o||40===o||ro(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 Uo(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):so(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||so(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!co(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function Bo(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):so(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),mo(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===a||null===t||so(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 $o(e,t){let n;return function r(o){if(so(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if(co(o))return mo(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 Uo.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=Xr(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 lo(t)?$o(e,s)(t):s(t)}function s(t){return Do(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(Ho,c,c)(t)}function c(t){return co(t)?mo(e,u,"whitespace")(t):u(t)}function u(i){return null===i||so(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},Ho={partial:!0,tokenize:function(e,t,n){return function(t){return lo(t)?$o(e,r)(t):n(t)};function r(t){return Bo(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return co(t)?mo(e,i,"whitespace")(t):i(t)}function i(e){return null===e||so(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 so(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const qo={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"},qr(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||lo(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||so(n)?(e.exit("atxHeading"),t(n)):co(n)?mo(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||lo(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),s)}}};const Zo=["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"],Qo=["pre","script","style","textarea"],Ko={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):eo(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):eo(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:E:f):n(o)}function p(t){return eo(t)?(e.consume(t),a=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||lo(s)){const l=47===s,c=a.toLowerCase();return l||i||!Qo.includes(c)?Zo.includes(a.toLowerCase())?(o=6,l?(e.consume(s),m):r.interrupt?t(s):E(s)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):i?g(s):b(s)):(o=1,r.interrupt?t(s):E(s))}return 45===s||to(s)?(e.consume(s),a+=String.fromCharCode(s),h):n(s)}function m(o){return 62===o?(e.consume(o),r.interrupt?t:E):n(o)}function g(t){return co(t)?(e.consume(t),g):_(t)}function b(t){return 47===t?(e.consume(t),_):58===t||95===t||eo(t)?(e.consume(t),y):co(t)?(e.consume(t),b):_(t)}function y(t){return 45===t||46===t||58===t||95===t||to(t)?(e.consume(t),y):v(t)}function v(t){return 61===t?(e.consume(t),w):co(t)?(e.consume(t),v):b(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,x):co(t)?(e.consume(t),w):k(t)}function x(t){return t===l?(e.consume(t),l=null,S):null===t||so(t)?n(t):(e.consume(t),x)}function k(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||lo(t)?v(t):(e.consume(t),k)}function S(e){return 47===e||62===e||co(e)?b(e):n(e)}function _(t){return 62===t?(e.consume(t),C):n(t)}function C(t){return null===t||so(t)?E(t):co(t)?(e.consume(t),C):n(t)}function E(t){return 45===t&&2===o?(e.consume(t),T):60===t&&1===o?(e.consume(t),j):62===t&&4===o?(e.consume(t),P):63===t&&3===o?(e.consume(t),M):93===t&&5===o?(e.consume(t),O):!so(t)||6!==o&&7!==o?null===t||so(t)?(e.exit("htmlFlowData"),z(t)):(e.consume(t),E):(e.exit("htmlFlowData"),e.check(Jo,F,z)(t))}function z(t){return e.check(Yo,A,F)(t)}function A(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),N}function N(t){return null===t||so(t)?z(t):(e.enter("htmlFlowData"),E(t))}function T(t){return 45===t?(e.consume(t),M):E(t)}function j(t){return 47===t?(e.consume(t),a="",I):E(t)}function I(t){if(62===t){const n=a.toLowerCase();return Qo.includes(n)?(e.consume(t),P):E(t)}return eo(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),I):E(t)}function O(t){return 93===t?(e.consume(t),M):E(t)}function M(t){return 62===t?(e.consume(t),P):45===t&&2===o?(e.consume(t),M):E(t)}function P(t){return null===t||so(t)?(e.exit("htmlFlowData"),F(t)):(e.consume(t),P)}function F(n){return e.exit("htmlFlow"),t(n)}}},Jo={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(_o,t,n)}}},Yo={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(so(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 Go={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),y):eo(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):eo(t)?(e.consume(t),b):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):so(t)?(a=u,I(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),f):u(t)}function f(e){return 62===e?j(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):so(t)?(a=h,I(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?j(t):93===t?(e.consume(t),g):h(t)}function b(t){return null===t||62===t?j(t):so(t)?(a=b,I(t)):(e.consume(t),b)}function y(t){return null===t?n(t):63===t?(e.consume(t),v):so(t)?(a=y,I(t)):(e.consume(t),y)}function v(e){return 62===e?j(e):y(e)}function w(t){return eo(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||to(t)?(e.consume(t),x):k(t)}function k(t){return so(t)?(a=k,I(t)):co(t)?(e.consume(t),k):j(t)}function S(t){return 45===t||to(t)?(e.consume(t),S):47===t||62===t||lo(t)?_(t):n(t)}function _(t){return 47===t?(e.consume(t),j):58===t||95===t||eo(t)?(e.consume(t),C):so(t)?(a=_,I(t)):co(t)?(e.consume(t),_):j(t)}function C(t){return 45===t||46===t||58===t||95===t||to(t)?(e.consume(t),C):E(t)}function E(t){return 61===t?(e.consume(t),z):so(t)?(a=E,I(t)):co(t)?(e.consume(t),E):_(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):so(t)?(a=z,I(t)):co(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):so(t)?(a=A,I(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||lo(t)?_(t):(e.consume(t),N)}function T(e){return 47===e||62===e||lo(e)?_(e):n(e)}function j(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function I(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),O}function O(t){return co(t)?mo(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 Xo={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&&qr(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=Zr(i,e.slice(r+1,r+s+3)),i=Zr(i,[["enter",u,t]]),i=Zr(i,wo(t.parser.constructs.insideSpan.null,e.slice(r+s+4,o-3),t)),i=Zr(i,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),i=Zr(i,e.slice(o+1)),i=Zr(i,[["exit",l,t]]),qr(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(Xr(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(ei,c,i?c:u)(t):91===t?e.attempt(ti,c,i?l:u)(t):i?c(t):u(t)}function l(t){return e.attempt(ni,c,u)(t)}function c(e){return t(e)}function u(e){return o._balanced=!0,n(e)}}},ei={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 lo(t)?$o(e,o)(t):o(t)}function o(t){return 41===t?c(t):Do(e,i,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return lo(t)?$o(e,s)(t):c(t)}function a(e){return n(e)}function s(t){return 34===t||39===t||40===t?Bo(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return lo(t)?$o(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)}}},ti={tokenize:function(e,t,n){const r=this;return function(t){return Uo.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(Xr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},ni={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 ri={name:"labelStartImage",resolveAll:Xo.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 oi={name:"labelStartLink",resolveAll:Xo.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 ii={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),mo(e,t,"linePrefix")}}};const ai={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||so(i))?(e.exit("thematicBreak"),t(i)):n(i)}function a(t){return t===r?(e.consume(t),o++,a):(e.exit("thematicBreakSequence"),co(t)?mo(e,i,"whitespace")(t):i(t))}}};const si={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(_o,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,mo(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){if(r.containerState.furtherBlankLines||!co(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(ci,t,o)(n)});function o(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,mo(e,e.attempt(si,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:oo(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(ai,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 oo(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(_o,r.interrupt?n:c,e.attempt(li,d,u))}function c(e){return r.containerState.initialBlankLine=!0,i++,d(e)}function u(t){return co(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)}}},li={partial:!0,tokenize:function(e,t,n){const r=this;return mo(e,function(e){const o=r.events[r.events.length-1];return!co(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},ci={partial:!0,tokenize:function(e,t,n){const r=this;return mo(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 ui={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"),co(t)?mo(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||so(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const di={tokenize:function(e){const t=this,n=e.attempt(_o,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,mo(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Lo,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 fi={resolveAll:gi()},pi=mi("string"),hi=mi("text");function mi(e){return{resolveAll:gi("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 gi(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 yi={42:si,43:si,45:si,48:si,49:si,50:si,51:si,52:si,53:si,54:si,55:si,56:si,57:si,62:Co},vi={91:Vo},wi={[-2]:To,[-1]:To,32:To},xi={35:qo,42:ai,45:[ui,ai],60:Ko,61:ui,95:ai,96:No,126:No},ki={38:zo,92:Eo},Si={[-5]:ii,[-4]:ii,[-3]:ii,33:ri,38:zo,42:xo,60:[So,Go],91:oi,92:[Wo,Eo],93:Xo,95:xo,96:Io},_i={null:[xo,fi]},Ci=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:vi,disable:{null:[]},document:yi,flow:xi,flowInitial:wi,insideSpan:_i,string:ki,text:Si},Symbol.toStringTag,{value:"Module"}));function Ei(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){b(e,t.from)}),check:g(m),consume:function(e){so(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,y()):-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,y()},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=Zr(a,e),p(),null!==a[a.length-1])return[];return b(t,0),c.events=wo(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,y()}}(),d=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return b();return e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,g,b)(n)}}function g(t){return e(d,p),o}function b(e){return p.restore(),++u<a.length?m(a[u]):i}}}function b(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&qr(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function y(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const zi=/[\0\t\n\r]/g;const Ai=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ni(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return Gr(n.slice(t?2:1),t?16:10)}return Wr(n)||e}const Ti={}.hasOwnProperty;function ji(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:C,autolinkEmail:C,atxHeading:i(Y),blockQuote:i(q),characterEscape:C,characterReference:C,codeFenced:i(Z),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(Z,a),codeText:i(Q,a),codeTextData:C,data:C,codeFlowValue:C,definition:i(K),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(J),hardBreakEscape:i(G),hardBreakTrailing:i(G),htmlFlow:i(X,a),htmlFlowData:C,htmlText:i(X,a),htmlTextData:C,image:i(ee),label:a,link:i(te),listItem:i(re),listItemValue:f,listOrdered:i(ne,d),listUnordered:i(ne),paragraph:i(oe),reference:D,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(Y),strong:i(ie),thematicBreak:i(se)},exit:{atxHeading:l(),atxHeadingSequence:x,autolink:l(),autolinkEmail:W,autolinkProtocol:H,blockQuote:l(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:B,characterReferenceMarkerNumeric:B,characterReferenceValue:$,characterReference:V,codeFenced:l(g),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:E,codeIndented:l(b),codeText:l(j),codeTextData:E,data:E,definition:l(),definitionDestinationString:w,definitionLabelString:y,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(A),hardBreakTrailing:l(A),htmlFlow:l(N),htmlFlowData:E,htmlText:l(T),htmlTextData:E,image:l(O),label:P,labelText:M,lineEnding:z,link:l(I),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:U,resourceDestinationString:F,resourceTitleString:L,resource:R,setextHeading:l(_),setextHeadingLineSequence:S,setextHeadingText:k,strong:l(),thematicBreak:l()}};Oi(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]];Ti.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]||Pi).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+"` ("+yr({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]||Pi).call(this,e,r[0])}n.position.end=Ii(e.end)}function u(){return Br(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 b(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function y(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Xr(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 x(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function k(){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 C(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 E(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)&&(C.call(this,e),E.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 j(){const e=this.resume();this.stack[this.stack.length-1].value=e}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 O(){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(Ai,Ni)}(t),n.identifier=Xr(t).toLowerCase()}function P(){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 R(){this.data.inReference=void 0}function D(){this.data.referenceType="collapsed"}function U(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Xr(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=Gr(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=Wr(t)}this.stack[this.stack.length-1].value+=r}function V(e){this.stack.pop().position.end=Ii(e.end)}function H(e){E.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function W(e){E.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function q(){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 J(){return{type:"emphasis",children:[]}}function Y(){return{type:"heading",depth:0,children:[]}}function G(){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(;!Po(e););return e}(function(e){const t={constructs:Kr([Ci,...(e||{}).extensions||[]]),content:n(go),defined:[],document:n(bo),flow:n(di),lazy:{},string:n(pi),text:n(hi)};return t;function n(e){return function(n){return Ei(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(zi.lastIndex=u,l=zi.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 Oi(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Oi(e,r):Mi(e,r)}}function Mi(e,t){let n;for(n in t)if(Ti.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 Pi(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+yr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+yr({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+yr({start:t.start,end:t.end})+") is still open")}function Fi(e){const t=this;t.parser=function(n){return ji(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Li(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 Di(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(Ui(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(Ui(t.slice(o),o>0,!1)),i.join("")}function Ui(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 Bi={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=ho(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 Li(e,t);const o={src:ho(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:ho(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 Li(e,t);const o={href:ho(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:ho(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=mr(t.children[1]),a=hr(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:Di(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:$i,yaml:$i,definition:$i,footnoteDefinition:$i};function $i(){}const Vi="object"==typeof self?self:globalThis,Hi=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:qi}={},{keys:Zi}=Object,Qi=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=qi.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]},Ki=([e,t])=>0===e&&("function"===t||"symbol"===t),Ji=(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]=Qi(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 Zi(r))!e&&Ki(Qi(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||!Ki(Qi(o))&&!Ki(Qi(a)))&&t.push([i(o),i(a)]);return n}case 6:{const t=[],n=o([a,t],r);for(const o of r)!e&&Ki(Qi(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},Yi="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?Hi(Ji(e,t)):structuredClone(e):(e,t)=>Hi(Ji(e,t));function Gi(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 Xi(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const ea=function(e){if(null==e)return na;if("function"==typeof e)return ta(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ea(e[n]);return ta(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 ta(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 ta(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function ta(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 na(){return!0}const ra=[],oa=!0,ia=!1;function aa(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=ea(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=ra;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[oa,e];return null==e?ra:[e]}(n(o,l)),f[0]===ia))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]===ia)return c;u="number"==typeof c[1]?c[1]:u+a}}return f}}(e,void 0,[])()}function sa(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),aa(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 la={}.hasOwnProperty,ca={};function ua(e,t){e.position&&(t.position=br(e))}function da(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,Yi(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function fa(e,t){const n=t.data||{},r=!("value"in t)||la.call(n,"hProperties")||la.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 pa(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 ha(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function ma(e,t){const n=function(e,t){const n=t||ca,r=new Map,o=new Map,i=new Map,a={...Bi,...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=ha(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=ha(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:da,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:function(e,t){const n=e.type,r=s.handlers[n];if(la.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=Yi(n);return r.children=s.all(e),r}return Yi(e)}return(s.options.unknownHandler||fa)(s,e,t)},options:n,patch:ua,wrap:pa};return sa(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||Gi,r=e.options.footnoteBackLabel||Xi,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=ho(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:{...Yi(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 ga(e,t){return e&&"run"in e?async function(n,r){const o=ma(n,{file:r,...t});await e.run(o,r)}:function(n,r){return ma(n,{file:r,...e||t})}}function ba(e){if(e)throw e}var ya,va;var wa=function(){if(va)return ya;va=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 ya=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},ya}();const xa=t(wa);function ka(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 Sa(){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 _a={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 Ea={cwd:function(){return"/"}};function za(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function Aa(e){if("string"==typeof e)e=new URL(e);else if(!za(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 Na=["history","path","basename","stem","extname","dirname"];class Ta{constructor(e){let t;t=e?za(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?"":Ea.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<Na.length;){const e=Na[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)Na.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?_a.basename(this.path):void 0}set basename(e){Ia(e,"basename"),ja(e,"basename"),this.path=_a.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?_a.dirname(this.path):void 0}set dirname(e){Oa(this.basename,"dirname"),this.path=_a.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?_a.extname(this.path):void 0}set extname(e){if(ja(e,"extname"),Oa(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=_a.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){za(e)&&(e=Aa(e)),Ia(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?_a.basename(this.path,this.extname):void 0}set stem(e){Ia(e,"stem"),ja(e,"stem"),this.path=_a.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 kr(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 ja(e,t){if(e&&e.includes(_a.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+_a.sep+"`")}function Ia(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Oa(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const Ma=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},Pa={}.hasOwnProperty;class Fa extends Ma{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=Sa()}copy(){const e=new Fa;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?(Ua("data",this.frozen),this.namespace[e]=t,this):Pa.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Ua("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),Da("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),Da("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,ba(e),t=r}),$a("processSync","process",n),t}run(e,t,n){Ba(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}),$a("runSync","run",r),n}stringify(e,t){this.freeze();const n=Va(t),r=this.compiler||this.Compiler;return Da("stringify",r),Ba(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(Ua("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];ka(a)&&ka(r)&&(r=xa(!0,a,r)),n[o]=[e,r,...i]}}}}const La=(new Fa).freeze();function Ra(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function Da(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ua(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 Ba(e){if(!ka(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function $a(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 Ta(e)}const Ha=[],Wa={allowDangerousHtml:!0},qa=/^(https?|ircs?|mailto|xmpp)$/i,Za=[{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 Qa(e){const t=function(e){const t=e.rehypePlugins||Ha,n=e.remarkPlugins||Ha,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Wa}:Wa,o=La().use(Fi).use(n).use(ga,r).use(t);return o}(e),n=function(e){const t=e.children||"",n=new Ta;"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||Ka;for(const u of Za)Object.hasOwn(t,u.from)&&gn((u.from,u.to&&u.to,u.id));return sa(e,c),Nr(e,{Fragment:A.Fragment,components:o,ignoreInvalidStyle:!0,jsx:A.jsx,jsxs:A.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 Dr)if(Object.hasOwn(Dr,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=Dr[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 Ka(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||qa.test(e.slice(0,t))?e:""}function Ja(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 Ya(e,t,n){const r=ea((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([Ga(e[0]),Xa(e[1])])}return t}(t);let i=-1;for(;++i<o.length;)aa(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 Ga(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 Xa(e){return"function"==typeof e?e:function(){return e}}const es="phrasing",ts=["autolink","link","image","label"];function ns(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function rs(e){this.config.enter.autolinkProtocol.call(this,e)}function os(e){this.config.exit.autolinkProtocol.call(this,e)}function is(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 as(e){this.config.exit.autolinkEmail.call(this,e)}function ss(e){this.exit(e)}function ls(e){Ya(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,cs],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),us]],{ignore:["link","linkReference"]})}function cs(e,t,n,r,o){let i="";if(!ds(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=Ja(e,"(");let i=Ja(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 us(e,t,n,r){return!(!ds(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function ds(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||fo(n)||uo(n))&&(!t||47!==n)}function fs(){this.buffer()}function ps(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function hs(){this.buffer()}function ms(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function gs(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Xr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function bs(e){this.exit(e)}function ys(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Xr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function vs(e){this.exit(e)}function ws(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?Ss:ks)));return s(),a},footnoteReference:ws},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function ks(e,t,n){return 0===t?e:Ss(e,t,n)}function Ss(e,t,n){return(n?"":" ")+e}ws.peek=function(){return"["};const _s=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function Cs(e){this.enter({type:"delete",children:[]},e)}function Es(e){this.exit(e)}function zs(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 As(e){return e.length}function Ns(e){return null==e?"":String(e)}function Ts(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 js(e,t,n){return">"+(n?"":" ")+e}function Is(e,t){return Os(e,t.inConstruct,!0)&&!Os(e,t.notInConstruct,!1)}function Os(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 Ms(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 Ps(e,t,n){return(n?"":" ")+e}function Fs(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 Ls(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Rs(e,t,n){const r=vo(e),o=vo(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 Ds(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=Ls(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)+Ls(d));const p=a.move(o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+l+p}function Us(e){return e.value||""}function Bs(e,t,n,r){const o=Fs(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 $s(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 Hs(e,t){const n=Br(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=Fs(n),i='"'===o?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(Hs(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 qs(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 Zs(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 Qs(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}zs.peek=function(){return"~"},Ds.peek=function(e,t,n){return n.options.emphasis||"*"},Us.peek=function(){return"<"},Bs.peek=function(){return"!"},$s.peek=function(){return"!"},Vs.peek=function(){return"`"},Ws.peek=function(e,t,n){return Hs(e,n)?"<":"["},qs.peek=function(){return"["};const Ks=ea(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Js(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=Ls(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)+Ls(d));const p=a.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+l+p}Js.peek=function(e,t,n){return n.options.strong||"*"};const Ys={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()),js);return o(),a},break:Ms,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,Ps);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=Fs(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:Ds,hardBreak:Ms,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 sa(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,ia}),Boolean((!e.depth||e.depth<3)&&Br(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=Ls(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),s(),c},html:Us,image:Bs,imageReference:$s,inlineCode:Vs,link:Ws,linkReference:qs,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):Zs(n);const s=e.ordered?"."===a?")":".":function(e){const t=Zs(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),Qs(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||Zs(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 Ks(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:Js,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(Qs(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 Gs(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 Xs(e){this.exit(e),this.data.inTable=void 0}function el(e){this.enter({type:"tableRow",children:[]},e)}function tl(e){this.exit(e)}function nl(e){this.enter({type:"tableCell",children:[]},e)}function rl(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,ol));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function ol(e,t){return"|"===t?t:e}function il(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=Ys.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||As,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=Ns(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]=Ts(r[d]);else{const e=Ts(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 al(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function sl(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 ll(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=Ys.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+a})),l}const cl={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},ul={tokenize:function(e,t,n){let r,o,i;return a;function a(t){return 46===t||95===t?e.check(fl,l,s)(t):null===t||lo(t)||fo(t)||45!==t&&uo(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},dl={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(fl,t,i)(a):null===a||lo(a)||fo(a)?t(a):(e.consume(a),o)}function i(t){return 41===t&&r++,e.consume(t),o}},partial:!0},fl={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||lo(a)||fo(a)?t(a):n(a)}function o(e){return null===e||40===e||91===e||lo(e)||fo(e)?t(e):r(e)}function i(e){return eo(e)?a(e):n(e)}function a(t){return 59===t?(e.consume(t),r):eo(t)?(e.consume(t),a):n(t)}},partial:!0},pl={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return to(e)?n(e):t(e)}},partial:!0},hl={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!vl.call(r,r.previous)||Sl(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(cl,e.attempt(ul,e.attempt(dl,o),n),n)(t)};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:vl},ml={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let o="",i=!1;return function(t){if((72===t||104===t)&&wl.call(r,r.previous)&&!Sl(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),a;return n(t)};function a(t){if(eo(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||ro(t)||lo(t)||fo(t)||uo(t)?n(t):e.attempt(ul,e.attempt(dl,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:wl},gl={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let o,i;return function(t){if(!kl(t)||!xl.call(r,r.previous)||Sl(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)};function a(t){return kl(t)?(e.consume(t),a):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(pl,c,l)(t):45===t||95===t||to(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&&eo(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):n(a)}},previous:xl},bl={};let yl=48;for(;yl<123;)bl[yl]=gl,yl++,58===yl?yl=65:91===yl&&(yl=97);function vl(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||lo(e)}function wl(e){return!eo(e)}function xl(e){return!(47===e||kl(e))}function kl(e){return 43===e||45===e||46===e||95===e||to(e)}function Sl(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]=gl,bl[45]=gl,bl[46]=gl,bl[95]=gl,bl[72]=[gl,ml],bl[104]=[gl,ml],bl[87]=[gl,hl],bl[119]=[gl,hl];const _l={tokenize:function(e,t,n){const r=this;return mo(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=Xr(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 El(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 zl(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||lo(s))return n(s);if(93===s){e.exit("chunkString");const i=e.exit("gfmFootnoteCallString");return o.includes(Xr(r.sliceSerialize(i)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return lo(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 Al(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||lo(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return i=Xr(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return lo(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),mo(e,f,"gfmFootnoteDefinitionWhitespace")):n(t)}function f(e){return t(e)}}function Nl(e,t,n){return e.check(_o,t,e.attempt(_l,t,n))}function Tl(e){e.exit("gfmFootnoteDefinition")}function jl(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=vo(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=vo(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&&qr(a,a.length,0,wo(s,e.slice(r+1,n),t)),qr(a,a.length,0,[["exit",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",o,t]]),qr(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 Ol(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 Ml(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):so(t)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):co(t)?mo(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||lo(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,co(t)?mo(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 co(t)?mo(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||so(t)?y(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"),b):(e.exit("tableDelimiterFiller"),b(t))}function b(t){return co(t)?mo(e,y,"whitespace")(t):y(t)}function y(n){return 124===n?f(n):(null===n||so(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"),x(t)}function x(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),x):null===n||so(n)?(e.exit("tableRow"),t(n)):co(n)?mo(e,x,"whitespace")(n):(e.enter("data"),k(n))}function k(t){return null===t||124===t||lo(t)?(e.exit("data"),x(t)):(e.consume(t),92===t?S:k)}function S(t){return 92===t||124===t?(e.consume(t),k):k(t)}}function Pl(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&&(Ll(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=Fl(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=Fl(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=Fl(f,t,l,s,i,o)):0!==c[1]&&(o=Fl(f,t,c,s,i,o)),s=0):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=i)}for(0!==d&&Ll(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=Ol(t.events,i))}return e}function Fl(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 Ll(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 Dl={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 lo(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 so(r)?t(r):co(r)?e.check({tokenize:Ul},t,n)(r):n(r)}}};function Ul(e,t,n){return mo(e,function(e){return null===e?n(e):t(e)},"whitespace")}const Bl={};function $l(e){const t=e||Bl,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return Kr([{text:bl},{document:{91:{name:"gfmFootnoteDefinition",tokenize:Al,continuation:{tokenize:Nl},exit:Tl}},text:{91:{name:"gfmFootnoteCall",tokenize:zl},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Cl,resolveTo:El}}},jl(e),{flow:{null:{name:"table",tokenize:Ml,resolveAll:Pl}}},{text:{91:Dl}}])}(t)),o.push([{transforms:[ls],enter:{literalAutolink:ns,literalAutolinkEmail:rs,literalAutolinkHttp:rs,literalAutolinkWww:rs},exit:{literalAutolink:ss,literalAutolinkEmail:as,literalAutolinkHttp:os,literalAutolinkWww:is}},{enter:{gfmFootnoteCallString:fs,gfmFootnoteCall:ps,gfmFootnoteDefinitionLabelString:hs,gfmFootnoteDefinition:ms},exit:{gfmFootnoteCallString:gs,gfmFootnoteCall:bs,gfmFootnoteDefinitionLabelString:ys,gfmFootnoteDefinition:vs}},{canContainEols:["delete"],enter:{strikethrough:Cs},exit:{strikethrough:Es}},{enter:{table:Gs,tableData:nl,tableHeader:nl,tableRow:el},exit:{codeText:rl,table:Xs,tableData:tl,tableHeader:tl,tableRow:tl}},{exit:{taskListCheckValueChecked:al,taskListCheckValueUnchecked:al,paragraph:sl}}]),i.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:es,notInConstruct:ts},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:es,notInConstruct:ts},{character:":",before:"[ps]",after:"\\/",inConstruct:es,notInConstruct:ts}]},xs(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:_s}],handlers:{delete:zs}},il(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:ll}}]}}(t))}const Vl=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Hl={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 ql(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 Jl(r,t),r}}(e,n);case"doctype":return function(e,t){if(e.schema.allowDoctypes){const e={type:"doctype"};return Jl(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=Zl(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=Ql(e,Yl(i,c),c,t);null==n&&(n=Ql(e,Yl(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 Jl(a,t),a}(e,n);case"root":return function(e,t){const n=Zl(e,t.children),r={type:"root",children:n};return Jl(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 Jl(r,t),r}(0,n)}}}function Zl(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const t=ql(e,r[o]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function Ql(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=Kl(e,t,n,r[o]);"number"!=typeof a&&"string"!=typeof a||i.push(a)}return i}(e,t,n,r):Kl(e,t,n,r):void 0}function Kl(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 Jl(e,t){const n=br(t);t.data&&(e.data=Yi(t.data)),n&&(e.position=n)}function Yl(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 Gl(e){return function(t){const n=function(e,t){let n={type:"root",children:[]};const r=ql({schema:t?{...Hl,...t}:Hl,stack:[]},e);return r&&(Array.isArray(r)?1===r.length?n=r[0]:n.children=r:n=r),n}(t,e);return n}}const Xl=k.lazy(()=>Promise.resolve().then(()=>ub).then(e=>({default:e.AudioPlayer}))),ec=k.lazy(()=>Promise.resolve().then(()=>pb).then(e=>({default:e.Gallery}))),tc=k.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}=P("extracted"),c="user"===e.sender,u="system"===e.type||"system"===e.sender,d=!c&&!u,f=Ft({primaryColor:t}),p=function(){const e=k.useContext(Dt);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=k.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")?A.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"block my-2 no-underline group",children:A.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:[A.jsx("span",{className:"flex-shrink-0 p-2 rounded-full",style:{backgroundColor:`${f}1a`,color:f},children:A.jsx(Y,{size:16,strokeWidth:2.5})}),A.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")}),A.jsx(q,{size:12,className:"text-muted-foreground/40 group-hover:text-primary"})]})}):r?A.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," ",A.jsx(U,{size:14})]}):A.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?A.jsx(k.Suspense,{fallback:A.jsx("div",{className:"my-3 animate-pulse",children:A.jsx("div",{className:"w-full h-48 bg-muted rounded-xl"})}),children:A.jsx(ec,{images:[{src:e,alt:t}],radius:"rounded-xl"})}):null;return u?A.jsx("div",{className:"flex justify-center my-4 animate-in fade-in zoom-in-95 w-full",children:A.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})}):A.jsxs("div",{className:At("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&&A.jsx("div",{className:"w-9 shrink-0 flex flex-col justify-end pb-1",children:a?A.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?A.jsx("img",{src:h,alt:r,className:"h-full w-full object-cover"}):A.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)})}):A.jsx("div",{className:"w-9"})}),A.jsxs("div",{className:At("max-w-[85%] shadow-sm transition-all duration-300 relative",c?"text-primary-foreground":"border",c?At("rounded-[18px]",i&&"rounded-tr-[4px]",!a&&"rounded-br-[4px]",!i&&!a&&"rounded-r-[4px]"):At("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 A.jsx(k.Suspense,{fallback:A.jsxs("div",{className:"flex items-center gap-3 py-1 min-w-[200px] animate-pulse",children:[A.jsx("div",{className:"w-8 h-8 rounded-full bg-muted"}),A.jsx("div",{className:"flex-1 space-y-1",children:A.jsx("div",{className:"h-1 w-full bg-muted rounded-full"})})]}),children:A.jsx(Xl,{url:e.content,isBot:d,primaryColor:t})});case"image":{const t=e;return A.jsx(k.Suspense,{fallback:A.jsx("div",{className:"my-3 animate-pulse",children:A.jsx("div",{className:"w-full h-48 bg-muted rounded-xl"})}),children:A.jsx(ec,{images:[{src:t.imageUrl||t.content,alt:t.altText||"Imagen"}],radius:"rounded-xl"})})}case"location":{const t=e;return A.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 A.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:[A.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:A.jsx(Z,{size:20,strokeWidth:2.5})}),A.jsxs("div",{className:"flex-1 min-w-0",children:[A.jsx("p",{className:"text-sm font-bold truncate",children:t.fileName}),r&&A.jsxs("p",{className:"text-xs opacity-60 mt-0.5",children:[n?.toUpperCase()," • ",r]})]}),A.jsx(W,{size:18,className:"shrink-0 opacity-60 group-hover:opacity-100 transition-opacity"})]})}default:return A.jsx("div",{className:At("prose prose-sm max-w-none break-words leading-relaxed dark:prose-invert",c?"text-primary-foreground prose-p:text-white":"text-foreground"),children:A.jsx(Qa,{remarkPlugins:[$l],rehypePlugins:[[Gl,{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})=>A.jsx("p",{className:"mb-0 last:mb-0",children:e})},children:e.content||""})})}})(),a&&A.jsxs("div",{className:At("flex items-center gap-1 mt-1.5 opacity-50 select-none text-[9px]",c?"justify-end":"justify-start"),children:[A.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&&A.jsx(B,{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)))))))),nc=k.memo(function(){return A.jsx("div",{className:At("flex items-center self-start animate-in fade-in duration-200","max-w-[85%] sm:max-w-[75%]"),children:A.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:A.jsx("div",{className:"flex items-center gap-1.5",children:[0,1,2].map(e=>A.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 rc(e,t){const n=e.getTime()-t.getTime();return Math.floor(n/1e3/60)}function oc(e){return new Intl.DateTimeFormat("es-ES",{hour:"2-digit",minute:"2-digit"}).format(e)}function ic(e){return function(e){const t=new Date;return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}(e)?`Hoy, ${oc(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, ${oc(e)}`:function(e){return new Intl.DateTimeFormat("es-ES",{day:"numeric",month:"long",hour:"2-digit",minute:"2-digit"}).format(e)}(e)}const ac=k.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=k.useRef(null),c=k.useRef(null),[u,d]=k.useState(!1),[f,p]=k.useState(!1),h=Ft({primaryColor:r}),m=e.length>100,g=hn({count:e.length,getScrollElement:()=>c.current,estimateSize:()=>80,overscan:5,enabled:m});k.useEffect(()=>{d(!0)},[]),k.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 b=e=>{const t=new Date(e);return isNaN(t.getTime())?"":ic(t)};return u?m?A.jsxs("div",{ref:c,className:"flex-1 overflow-y-auto scroll-smooth bg-background/50 scrollbar-none",style:{padding:"var(--spacing-5)"},children:[A.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&&rc(new Date(n.timestamp),new Date(c.timestamp))>15,f=c&&c.sender===n.sender&&rc(new Date(n.timestamp),new Date(c.timestamp))<5&&!d,p=u&&u.sender===n.sender&&rc(new Date(u.timestamp),new Date(n.timestamp))<5;return A.jsxs("div",{style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${t.start}px)`},children:[d&&A.jsx("div",{className:"flex justify-center my-8 animate-in fade-in zoom-in-95",children:A.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:b(n.timestamp)})}),A.jsx(tc,{message:n,primaryColor:r,botAvatar:o,botName:i,styles:a,avatars:s,isFirst:!f,isLast:!p})]},t.key)})}),t&&A.jsxs("div",{className:"flex items-end gap-3 mt-4 mb-2 animate-in fade-in slide-in-from-left-4 duration-500",children:[A.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:A.jsxs("div",{className:"flex gap-[2px]",children:[A.jsx("span",{className:"w-1 h-1 bg-primary/50 rounded-full animate-bounce [animation-delay:-0.3s]"}),A.jsx("span",{className:"w-1 h-1 bg-primary/50 rounded-full animate-bounce [animation-delay:-0.15s]"}),A.jsx("span",{className:"w-1 h-1 bg-primary/50 rounded-full animate-bounce"})]})}),A.jsx(nc,{})]})]}):A.jsxs("div",{ref:c,className:"flex-1 overflow-y-auto scroll-smooth p-4 bg-background/50 scrollbar-none",children:[A.jsxs("div",{className:"min-h-full flex flex-col justify-end",children:[0===e.length&&A.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:[A.jsxs("div",{className:"relative h-24 w-24 mb-6",children:[A.jsx("div",{className:"absolute inset-0 bg-primary/20 rounded-full animate-pulse blur-2xl"}),A.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?A.jsx("div",{className:"h-full w-full flex items-center justify-center text-3xl",style:{backgroundColor:h},children:"👋"}):o?A.jsx("img",{src:o,className:"object-cover h-full w-full",alt:i,onError:()=>p(!0)}):A.jsx("div",{className:"h-full w-full flex items-center justify-center text-3xl",style:{backgroundColor:h},children:"👋"})})]}),A.jsxs("div",{className:"space-y-2",children:[A.jsx("h3",{className:"font-black text-xl text-foreground uppercase tracking-tighter italic",children:i}),A.jsxs("p",{className:"text-[12px] font-bold text-muted-foreground italic px-10 leading-relaxed opacity-60",children:['"',n,'"']})]})]}),A.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&&rc(new Date(t.timestamp),new Date(l.timestamp))>15,d=l&&l.sender===t.sender&&rc(new Date(t.timestamp),new Date(l.timestamp))<5&&!u,f=c&&c.sender===t.sender&&rc(new Date(c.timestamp),new Date(t.timestamp))<5;return A.jsxs(S.Fragment,{children:[u&&A.jsx("div",{className:"flex justify-center my-8 animate-in fade-in zoom-in-95",children:A.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:b(t.timestamp)})}),A.jsx(tc,{message:t,primaryColor:r,botAvatar:o,botName:i,styles:a,avatars:s,isFirst:!d,isLast:!f})]},t.id||`msg-${n}`)})}),A.jsx("div",{ref:l,className:"h-6 shrink-0"})]}),t&&A.jsxs("div",{className:"flex items-end gap-3 mt-4 mb-2 animate-in fade-in slide-in-from-left-4 duration-500",children:[A.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:A.jsxs("div",{className:"flex gap-[2px]",children:[A.jsx("span",{className:"w-1 h-1 bg-primary/50 rounded-full animate-bounce [animation-delay:-0.3s]"}),A.jsx("span",{className:"w-1 h-1 bg-primary/50 rounded-full animate-bounce [animation-delay:-0.15s]"}),A.jsx("span",{className:"w-1 h-1 bg-primary/50 rounded-full animate-bounce"})]})}),A.jsx(nc,{})]})]}):A.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}),sc={"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 lc(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=sc[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 cc=1e3,uc={enableImages:!0,enableAudio:!0,enableFiles:!0,enableLocation:!0,allowedFileTypes:["jpg","jpeg","png","webp","gif","pdf","doc","docx","txt","zip"],maxFileSizeMB:10};function dc({isConnected:e,placeholder:t="Escribe un mensaje...",primaryColor:n,mediaConfig:r,onSendMessage:o,onSendAttachment:i,onSendLocation:a,onVoiceCall:s}){const{t:l}=P(),[c,u]=k.useState(""),[d,f]=k.useState(!1),[p,h]=k.useState(!1),[m,g]=k.useState(0),[b,y]=k.useState(null),[v,w]=k.useState(!1),[x,S]=k.useState(!1),_=k.useRef(null),C=k.useRef(null),E=k.useRef(null),z=k.useRef(null),N=k.useRef([]),T=k.useRef(null),j=Ft({primaryColor:n}),I=k.useMemo(()=>({...uc,...r}),[r]),O=k.useMemo(()=>I.enableImages||I.enableAudio||I.enableFiles||I.enableLocation,[I]),M=()=>{const t=c.trim();b?(i?.(b.file,b.type),y(null),u("")):t&&e&&(o(t),u("")),_.current&&(_.current.style.height="40px")},F=async e=>{const t=e.target.files?.[0];if(!t)return;f(!1);const n=await lc(t,{maxSizeMB:I.maxFileSizeMB||10,allowedExtensions:I.allowedFileTypes||["jpg","jpeg","png","webp","gif","pdf","doc","docx","txt","zip"],checkMagicBytes:!0});if(n.valid)if(t.type.startsWith("image/")&&I.enableImages){w(!0);try{const{default:e}=await Promise.resolve().then(()=>Jb),n={maxSizeMB:.8,maxWidthOrHeight:1200,useWebWorker:!0},r=await e(t,n);y({type:"image",file:r,previewUrl:URL.createObjectURL(r)})}catch(r){Ht("Image compression failed:",r),y({type:"image",file:t,previewUrl:URL.createObjectURL(t)})}finally{w(!1)}}else y({type:"file",file:t,previewUrl:""});else alert(n.error||"Archivo no válido")},L=async e=>{if(z.current&&(e||(z.current.onstop=null),z.current.stop(),z.current.stream.getTracks().forEach(e=>e.stop())),T.current&&clearInterval(T.current),h(!1),g(0),e&&N.current.length>0){const e=new Blob(N.current,{type:"audio/webm"}),t=new File([e],`audio-${Date.now()}.webm`,{type:"audio/webm"}),n=await lc(t,{maxSizeMB:10});if(!n.valid)return Ht("Audio validation failed:",n.error),alert(n.error),void(N.current=[]);i?.(t,"audio"),N.current=[]}};return A.jsxs("div",{className:"relative",children:[(b||v)&&A.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:A.jsx("div",{className:"relative w-16 h-16",children:v?A.jsx("div",{className:"w-full h-full flex flex-col items-center justify-center bg-muted rounded-xl",children:A.jsx(J,{className:"animate-spin text-primary h-5 w-5"})}):"image"===b?.type?A.jsxs(A.Fragment,{children:[A.jsx("img",{src:b?.previewUrl,className:"w-full h-full object-cover rounded-xl border",alt:l("preview")}),A.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:A.jsx(de,{size:10,strokeWidth:3})})]}):A.jsxs(A.Fragment,{children:[A.jsxs("div",{className:"w-full h-full flex flex-col items-center justify-center bg-muted rounded-xl border",children:[A.jsx(Z,{className:"text-primary h-6 w-6"}),A.jsx("span",{className:"text-[8px] mt-1 font-bold truncate max-w-[60px]",children:b?.file.name})]}),A.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:A.jsx(de,{size:10,strokeWidth:3})})]})})}),A.jsx("input",{type:"file",accept:"image/*",className:"hidden",ref:E,onChange:F}),A.jsx("input",{type:"file",accept:I.allowedFileTypes?.map(e=>`.${e}`).join(","),className:"hidden",ref:C,onChange:F}),A.jsxs("div",{className:"flex items-center max-w-full",style:{gap:"var(--spacing-3)"},children:[O&&i&&A.jsxs("div",{className:"relative shrink-0",children:[d&&A.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:[I.enableImages&&A.jsxs("button",{onClick:()=>E.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:[A.jsx(K,{size:18,className:"text-blue-500"})," ",l("fotos")]}),I.enableFiles&&A.jsxs("button",{onClick:()=>C.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:[A.jsx(Z,{size:18,className:"text-purple-500"})," Archivos"]}),I.enableLocation&&a&&A.jsxs("button",{onClick:()=>{S(!0),navigator.geolocation.getCurrentPosition(e=>{a?.({latitude:e.coords.latitude,longitude:e.coords.longitude}),S(!1),f(!1)},()=>S(!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:[x?A.jsx(J,{size:18,className:"animate-spin"}):A.jsx(Y,{size:18,className:"text-emerald-500"})," ",l("ubicacion")]}),I.enableVoice&&s&&A.jsxs("button",{onClick:()=>{s?.(),f(!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:[A.jsx(re,{size:18,className:"text-amber-500"})," Llamar"]})]}),A.jsx("button",{onClick:()=>f(!d),className:At("h-10 w-10 rounded-full flex items-center justify-center transition-all shadow-sm z-10",d?"bg-muted text-foreground rotate-45":"bg-muted/50 text-muted-foreground hover:bg-muted"),children:A.jsx(ie,{size:22,strokeWidth:2.5})})]}),A.jsx("div",{className:At("flex-1 relative flex items-center min-w-0 rounded-[24px] border px-4 transition-all shadow-inner",p?"h-[44px]":"min-h-[40px] max-h-[120px]"),style:{backgroundColor:p?"hsl(var(--destructive) / 0.05)":"hsl(var(--muted))",borderColor:p?"hsl(var(--destructive))":"hsl(var(--border))"},children:p?A.jsxs("div",{className:"flex items-center w-full animate-in zoom-in-95",style:{gap:"var(--spacing-4)"},children:[A.jsx("button",{onClick:()=>L(!1),className:"text-destructive/50 hover:text-destructive",children:A.jsx(ce,{size:18})}),A.jsxs("div",{className:"flex-1 flex items-center",style:{gap:"var(--spacing-2)"},children:[A.jsx("div",{className:"flex gap-[3px]",children:[1,2,3,4].map(e=>A.jsx("span",{className:"w-[3px] h-3 bg-destructive/60 rounded-full animate-pulse",style:{animationDelay:.15*e+"s"}},e))}),A.jsxs("span",{className:"text-destructive font-black text-[11px] tabular-nums",children:[Math.floor(m/60),":",(m%60).toString().padStart(2,"0")]})]}),A.jsx("button",{onClick:()=>L(!0),className:"w-7 h-7 rounded-full bg-destructive flex items-center justify-center text-white shadow-lg",children:A.jsx(se,{size:12,fill:"currentColor"})})]}):A.jsxs("div",{className:"w-full relative flex items-center",children:[A.jsx("textarea",{ref:_,rows:1,value:c,onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||e.ctrlKey||e.metaKey?"Enter"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),M()):(e.preventDefault(),M())},onChange:e=>{const t=e.target.value.slice(0,cc);u(t),_.current&&(_.current.style.height="40px",_.current.style.height=`${Math.min(_.current.scrollHeight,120)}px`)},onFocus:()=>f(!1),placeholder:t,"aria-label":l("accessibility.typeMessage"),"aria-describedby":"send-message-hint","aria-invalid":c.length>cc,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))"}}),A.jsx("span",{id:"send-message-hint",className:"sr-only",children:l("accessibility.sendMessageHint")}),c.length>800&&A.jsx("span",{className:At("absolute right-0 text-[9px] font-bold tabular-nums",c.length>=cc?"text-destructive":"text-muted-foreground/40"),children:cc-c.length})]})}),!p&&A.jsx(A.Fragment,{children:c.trim()||b?A.jsx("button",{onClick:M,disabled:!e||v&&!!b,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:j},children:A.jsx(se,{size:18,className:"text-white ml-0.5 fill-current"})}):I.enableAudio&&i?A.jsx("button",{onClick:async()=>{if(e)try{const e=await navigator.mediaDevices.getUserMedia({audio:!0}),t=new MediaRecorder(e);z.current=t,N.current=[],t.ondataavailable=e=>N.current.push(e.data),t.onstop=()=>{const e=new File([new Blob(N.current)],"voice.webm",{type:"audio/webm"});i?.(e,"audio")},t.start(),h(!0),T.current=setInterval(()=>g(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:j},children:A.jsx(ee,{size:20,strokeWidth:2.5,className:"text-white"})}):A.jsx("button",{onClick:M,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:j},children:A.jsx(se,{size:18,className:"text-white ml-0.5 fill-current"})})})]})]})}function fc(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 pc(e=640){const[t,n]=k.useState(()=>"undefined"!=typeof window&&window.innerWidth<e);return k.useEffect(()=>{const t=fc(()=>{n(window.innerWidth<e)},250);return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[e]),t}const hc="24px";const mc={happy:"😊",wink:"😉",thinking:"🤔",sad:"😢",excited:"🤩",love:"❤️",laugh:"😄",surprised:"😲",angry:"😠",confused:"😕",sorry:"😔",default:"💬"},gc={idle:"Llamada de voz",connecting:"Conectando...",listening:"Escuchando...",thinking:"Pensando...",speaking:"Hablando..."};const bc=24e3;function yc({avatars:e,logoUrl:t,emotion:n,callState:r,audioLevel:o,config:i}){const a=e&&Object.keys(e).length>0,s=!!t,l=k.useMemo(()=>{if(!a&&!s)return null;if(a){return e[n||"default"]||e.default||t||Zt}return t||Zt},[a,s,e,n,t]),c="listening"===r||"speaking"===r,u="speaking"===r?i.speakingColor:"thinking"===r?i.thinkingColor:"listening"===r?i.listeningColor:"#ffffff20",d="speaking"===r?i.speakingScale:"thinking"===r?i.thinkingScale:1,f=i.orbSize;return l?A.jsxs("div",{className:"relative flex flex-col items-center gap-4",children:[A.jsxs("div",{className:At("relative rounded-full flex items-center justify-center","transition-all duration-500 ease-out"),style:{width:`${f}px`,height:`${f}px`,boxShadow:c?`0 0 0 4px ${u}40, 0 0 30px ${u}30, 0 0 60px ${u}15`:`0 0 0 2px ${u}20`,transform:`scale(${d})`},children:[A.jsx("img",{src:l,alt:"Bot avatar",className:At("h-full w-full rounded-full object-cover","transition-all duration-300","thinking"===r&&"opacity-80"),style:{boxShadow:"listening"===r?`0 0 0 2px ${i.listeningColor}80`:"speaking"===r?`0 0 0 2px ${i.speakingColor}80`:"none"}}),i.showEmotionLabel&&n&&A.jsxs("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 px-2 py-0.5 rounded-full bg-black/70 backdrop-blur-sm text-[10px] font-bold text-white whitespace-nowrap",children:[i.showEmojis&&(i.emotionEmojis[n]||"💬")," ",n]})]}),i.showWaveform&&A.jsx(vc,{isActive:c,audioLevel:o,color:u})]}):A.jsxs("div",{className:"relative flex flex-col items-center gap-6",children:[A.jsxs("div",{className:"relative",style:{width:`${f+48}px`,height:`${f+48}px`},children:[A.jsx("div",{className:"absolute inset-0 rounded-full",style:{border:`1.5px solid ${u}20`,animation:c?"spin 8s linear infinite":"none"}}),A.jsx("div",{className:"absolute rounded-full",style:{inset:"12px",border:`1px solid ${u}15`,animation:c?"spin 12s linear infinite reverse":"none"}}),A.jsx("div",{className:"absolute rounded-full flex items-center justify-center",style:{inset:"24px",background:`radial-gradient(circle at 35% 35%, ${u}40, ${u}10 60%, transparent 80%)`,boxShadow:c?`0 0 60px ${u}35, 0 0 120px ${u}15, inset 0 0 40px ${u}10`:`0 0 30px ${u}15`,transform:`scale(${d})`,transition:"all 0.5s cubic-bezier(0.4, 0, 0.2, 1)"},children:A.jsx("div",{className:"rounded-full",style:{width:.35*f+"px",height:.35*f+"px",background:`radial-gradient(circle, ${u}90, ${u}40)`,boxShadow:`0 0 20px ${u}60`,animation:c?"pulse 2s ease-in-out infinite":"none"}})}),c&&[0,1,2].map(e=>A.jsx("div",{className:"absolute rounded-full",style:{width:"4px",height:"4px",backgroundColor:u,opacity:.6,top:"50%",left:"50%",transform:`rotate(${120*e+Date.now()/20%360}deg) translateX(${(f+48)/2}px)`,animation:`spin ${6+2*e}s linear infinite`,boxShadow:`0 0 6px ${u}`}},e))]}),i.showWaveform&&A.jsx(vc,{isActive:c,audioLevel:o,color:u})]})}function vc({isActive:e,audioLevel:t,color:n}){return A.jsx("div",{className:"flex items-center gap-[3px] h-10",children:Array.from({length:12}).map((r,o)=>{const i=Math.abs(o-5.5)/5.5,a=e?Math.max(4,40*t*(1-.5*i)*(.5+.5*Math.sin(Date.now()/100+.8*o))):4;return A.jsx("div",{className:"rounded-full transition-all duration-100",style:{width:"3px",height:`${a}px`,backgroundColor:n,opacity:e?.7-.3*i:.2}},o)})})}function wc({isOpen:e,onClose:t,primaryColor:n="#10b981",getSocket:r,avatars:o,logoUrl:i,voiceConfig:a,onAddMessage:s}){const l=k.useMemo(()=>function(e,t="#10b981"){return{backgroundColor:e?.backgroundColor??"#0a0a0a",listeningColor:e?.listeningColor??"#10b981",speakingColor:e?.speakingColor??t,thinkingColor:e?.thinkingColor??"#a855f7",showEmojis:e?.showEmojis??!0,showEmotionLabel:e?.showEmotionLabel??!0,showWaveform:e?.showWaveform??!0,showBadge:e?.showBadge??!1,badgeText:e?.badgeText??"",emotionEmojis:{...mc,...e?.emotionEmojis},statusLabels:{...gc,...e?.statusLabels},orbSize:e?.orbSize??128,speakingScale:e?.speakingScale??1.08,thinkingScale:e?.thinkingScale??.95}}(a,n),[a,n]),[c,u]=k.useState("idle"),[d,f]=k.useState(0),[p,h]=k.useState(!1),[m,g]=k.useState(0),[b,y]=k.useState(null),[v,w]=k.useState([]),x=k.useRef(null),S=k.useRef(null),_=k.useRef(null),C=k.useRef(null),E=k.useRef(null),z=k.useRef(0),N=k.useRef(!1),T=k.useRef(null),j=k.useRef(null),I=k.useRef(null),O=k.useRef([]),M=k.useRef(!1),P=k.useRef(0),F=k.useRef([]),L=k.useCallback(e=>`${Math.floor(e/60)}:${(e%60).toString().padStart(2,"0")}`,[]),R=k.useCallback(()=>{if(0===O.current.length)return;I.current&&"closed"!==I.current.state||(I.current=new AudioContext({sampleRate:bc}));const e=I.current;M.current=!0,u("speaking");const t=e.currentTime;for(P.current<t&&(P.current=t);O.current.length>0;){const t=O.current.shift(),n=e.createBuffer(1,t.length,bc);n.getChannelData(0).set(t);const r=e.createBufferSource();r.buffer=n,r.connect(e.destination),r.start(P.current),F.current.push(r),r.onended=()=>{F.current=F.current.filter(e=>e!==r),0===F.current.length&&0===O.current.length&&(M.current=!1,u(e=>"speaking"===e?"listening":e))},P.current+=t.length/bc}},[]),D=k.useRef({}),U=k.useCallback(()=>{const e=r?.();if(!e||N.current)return;const t=()=>{u("listening")},n=e=>{if(!e?.data)return;const t=function(e){const t=atob(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);const r=new Int16Array(n.buffer),o=new Float32Array(r.length);for(let i=0;i<r.length;i++)o[i]=r[i]/32768;return o}(e.data);O.current.push(t),R()},o=()=>{F.current.forEach(e=>{try{e.stop()}catch{}}),F.current=[],O.current.length=0,P.current=0,M.current=!1,u("listening")},i=()=>{},a=e=>{console.error("[VoiceCall] Voice error:",e)},s=e=>{e?.emotion&&(y(e.emotion),setTimeout(()=>y(t=>t===e.emotion?null:t),4e3))},l=e=>{e?.text&&w(t=>{if(t.length>0&&"user"===t[t.length-1].role){const n=[...t];return n[n.length-1]={...n[n.length-1],text:n[n.length-1].text+e.text},n}return[...t,{role:"user",text:e.text}]})},c=e=>{e?.text&&w(t=>{if(t.length>0&&"bot"===t[t.length-1].role){const n=[...t];return n[n.length-1]={...n[n.length-1],text:n[n.length-1].text+e.text},n}return[...t,{role:"bot",text:e.text}]})},d=()=>{u("thinking")};D.current={voiceReady:t,voiceAudioChunk:n,voiceInterrupted:o,voiceTurnComplete:i,voiceError:a,voiceEmotion:s,voiceUserTranscript:l,voiceModelTranscript:c,voiceModelThinking:d},e.on("voice_ready",t),e.on("voice_audio_chunk",n),e.on("voice_interrupted",o),e.on("voice_turn_complete",i),e.on("voice_error",a),e.on("voice_emotion",s),e.on("voice_user_transcript",l),e.on("voice_model_transcript",c),e.on("voice_model_thinking",d),N.current=!0},[r,R]),B=k.useCallback(()=>{const e=r?.();if(!e||!N.current)return;const t=D.current;t.voiceReady&&e.off("voice_ready",t.voiceReady),t.voiceAudioChunk&&e.off("voice_audio_chunk",t.voiceAudioChunk),t.voiceInterrupted&&e.off("voice_interrupted",t.voiceInterrupted),t.voiceTurnComplete&&e.off("voice_turn_complete",t.voiceTurnComplete),t.voiceError&&e.off("voice_error",t.voiceError),t.voiceEmotion&&e.off("voice_emotion",t.voiceEmotion),t.voiceUserTranscript&&e.off("voice_user_transcript",t.voiceUserTranscript),t.voiceModelTranscript&&e.off("voice_model_transcript",t.voiceModelTranscript),t.voiceModelThinking&&e.off("voice_model_thinking",t.voiceModelThinking),D.current={},N.current=!1},[r]),$=k.useCallback(async()=>{const e=r?.();if(!e)return;const t=await navigator.mediaDevices.getUserMedia({audio:{sampleRate:16e3,channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});_.current=t;const n=new AudioContext({sampleRate:16e3});C.current=n;const o=n.createMediaStreamSource(t),i=n.createAnalyser();if(i.fftSize=256,o.connect(i),S.current=i,!T.current){const e=new Blob(["\nclass VoicePCMProcessor extends AudioWorkletProcessor {\n constructor() {\n super();\n this.buffer = new Float32Array(1600); // 100ms at 16kHz\n this.bufferIndex = 0;\n }\n process(inputs) {\n const input = inputs[0]?.[0];\n if (!input) return true;\n for (let i = 0; i < input.length; i++) {\n this.buffer[this.bufferIndex++] = input[i];\n if (this.bufferIndex >= 1600) {\n // Convert Float32 → Int16 PCM\n const int16 = new Int16Array(1600);\n for (let j = 0; j < 1600; j++) {\n const s = Math.max(-1, Math.min(1, this.buffer[j]));\n int16[j] = s < 0 ? s * 0x8000 : s * 0x7FFF;\n }\n this.port.postMessage(int16.buffer, [int16.buffer]);\n this.buffer = new Float32Array(1600);\n this.bufferIndex = 0;\n }\n }\n return true;\n }\n}\nregisterProcessor('voice-pcm-processor', VoicePCMProcessor);\n"],{type:"application/javascript"});T.current=URL.createObjectURL(e)}await n.audioWorklet.addModule(T.current);const a=new AudioWorkletNode(n,"voice-pcm-processor");E.current=a,a.port.onmessage=t=>{if(e.connected&&!p){const n=function(e){const t=new Uint8Array(e);let n="";for(let r=0;r<t.byteLength;r++)n+=String.fromCharCode(t[r]);return btoa(n)}(t.data);e.emit("voice_audio_chunk",{data:n})}},o.connect(a);const s=()=>{if(!S.current)return;const e=new Uint8Array(S.current.frequencyBinCount);S.current.getByteFrequencyData(e);const t=e.reduce((e,t)=>e+t,0)/e.length;g(t/255),z.current=requestAnimationFrame(s)};s()},[r,p]),V=k.useCallback(()=>{cancelAnimationFrame(z.current),E.current?.disconnect(),E.current=null,_.current?.getTracks().forEach(e=>e.stop()),_.current=null,C.current?.close(),C.current=null,S.current=null,g(0)},[]),H=k.useCallback(async()=>{const e=r?.();if(e?.connected){u("connecting"),f(0),w([]),y(null),O.current=[],U();try{await $()}catch(t){return console.error("[VoiceCall] Mic error:",t),void u("idle")}e.emit("voice_start",{language:"es-AR",voice:"Kore"}),x.current=setInterval(()=>{f(e=>e+1)},1e3)}else console.error("[VoiceCall] Socket not connected")},[r,U,$]),W=k.useCallback(()=>{V(),F.current.forEach(e=>{try{e.stop()}catch{}}),F.current=[],O.current=[],P.current=0,M.current=!1,I.current?.close(),I.current=null,x.current&&(clearInterval(x.current),x.current=null);const e=r?.();e?.connected&&e.emit("voice_stop"),s&&v.length>0&&v.forEach(e=>{s({sender:"user"===e.role?"user":"bot",content:e.text})}),B(),u("idle"),g(0),f(0),h(!1),w([]),t()},[r,V,B,t,s,v]),q=k.useCallback(()=>{h(e=>!e)},[]);if(k.useEffect(()=>{e&&"idle"===c&&H()},[e]),k.useEffect(()=>()=>{V(),x.current&&clearInterval(x.current),B()},[]),!e)return null;const Z="speaking"===c?l.speakingColor:"thinking"===c?l.thinkingColor:"listening"===c?l.listeningColor:n;return A.jsxs("div",{className:At("absolute inset-0 z-50 flex flex-col overflow-hidden","animate-in fade-in duration-300"),style:{backgroundColor:"#0a0a0f",borderRadius:"inherit"},children:[A.jsxs("div",{className:"absolute inset-0 pointer-events-none",style:{overflow:"hidden"},children:[A.jsx("div",{className:"absolute rounded-full",style:{width:"300px",height:"300px",top:"-80px",right:"-60px",background:`radial-gradient(circle, ${Z}18 0%, transparent 70%)`,transition:"background 1.5s ease",filter:"blur(40px)"}}),A.jsx("div",{className:"absolute rounded-full",style:{width:"250px",height:"250px",bottom:"-40px",left:"-50px",background:`radial-gradient(circle, ${l.thinkingColor}12 0%, transparent 70%)`,filter:"blur(50px)"}}),A.jsx("div",{className:"absolute rounded-full",style:{width:"200px",height:"200px",top:"40%",left:"50%",transform:"translateX(-50%)",background:`radial-gradient(circle, ${Z}10 0%, transparent 70%)`,transition:"background 1.5s ease",filter:"blur(60px)"}})]}),A.jsxs("div",{className:"relative flex items-center justify-between",style:{background:"rgba(255,255,255,0.03)",borderBottom:"1px solid rgba(255,255,255,0.06)",padding:"16px 24px",paddingTop:"20px"},children:[A.jsxs("div",{className:"flex items-center gap-3",children:[A.jsx("div",{className:"relative",children:A.jsx("div",{className:"h-2.5 w-2.5 rounded-full",style:{backgroundColor:Z,boxShadow:`0 0 8px ${Z}80`,animation:"idle"!==c?"pulse 2s ease-in-out infinite":"none"}})}),A.jsx("span",{style:{color:"rgba(255,255,255,0.8)",fontSize:"13px",fontWeight:500,letterSpacing:"-0.01em"},children:l.statusLabels[c]||c})]}),A.jsxs("div",{className:"flex items-center gap-3",children:[l.showEmotionLabel&&b&&A.jsxs("span",{style:{fontSize:"11px",padding:"2px 10px",borderRadius:"20px",background:`${Z}15`,border:`1px solid ${Z}25`,color:Z,fontWeight:600},children:[l.showEmojis&&(l.emotionEmojis[b]||"💬")," ",b]}),A.jsx("span",{style:{fontSize:"13px",fontFamily:"ui-monospace, monospace",color:"rgba(255,255,255,0.4)",fontVariantNumeric:"tabular-nums"},children:L(d)})]})]}),l.showBadge&&l.badgeText&&A.jsx("div",{style:{display:"flex",justifyContent:"center",padding:"8px 0"},children:A.jsx("span",{style:{padding:"4px 14px",borderRadius:"20px",fontSize:"11px",fontWeight:700,background:`linear-gradient(135deg, ${n}, ${l.thinkingColor})`,color:"white"},children:l.badgeText})}),A.jsx("div",{className:"relative flex-1 overflow-y-auto px-5 py-4",style:{scrollbarWidth:"none"},children:0===v.length?A.jsx("div",{className:"flex flex-col items-center justify-center h-full gap-4",children:A.jsx(yc,{avatars:o,logoUrl:i,emotion:b,callState:c,audioLevel:m,config:l})}):A.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[v.map((e,t)=>{return A.jsx("div",{style:{maxWidth:"85%",padding:"10px 14px",borderRadius:"user"===e.role?"16px 16px 4px 16px":"16px 16px 16px 4px",fontSize:"13.5px",lineHeight:1.5,color:"white",marginLeft:"user"===e.role?"auto":"0",marginRight:"user"===e.role?"0":"auto",backgroundColor:"user"===e.role?"rgba(255,255,255,0.08)":`${n}25`,backdropFilter:"blur(8px)",border:"user"===e.role?"1px solid rgba(255,255,255,0.08)":`1px solid ${n}20`},dangerouslySetInnerHTML:{__html:(r=e.text,r.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>").replace(/\*([^*]+)\*/g,"<em>$1</em>").replace(/`([^`]+)`/g,'<code style="background:rgba(255,255,255,0.1);padding:0 4px;border-radius:3px">$1</code>').replace(/\n/g,"<br>"))}},t);var r}),A.jsx("div",{ref:j})]})}),A.jsx("div",{style:{textAlign:"center",paddingBottom:"12px"},children:A.jsx("span",{style:{display:"inline-flex",alignItems:"center",gap:"6px",padding:"4px 16px",borderRadius:"20px",fontSize:"11px",fontWeight:500,color:"rgba(255,255,255,0.35)",background:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.06)",letterSpacing:"0.02em"},children:p?A.jsxs(A.Fragment,{children:[A.jsx(X,{style:{width:"12px",height:"12px"}})," Micrófono silenciado"]}):"thinking"===c?"Procesando...":"speaking"===c?A.jsxs(A.Fragment,{children:[A.jsx(ue,{style:{width:"12px",height:"12px"}})," Respuesta de voz"]}):"Habla cuando quieras"})}),A.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"20px",paddingBottom:"28px",paddingTop:"8px"},children:[A.jsx("button",{onClick:q,style:{width:"52px",height:"52px",borderRadius:"50%",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s",backgroundColor:p?"rgba(239,68,68,0.15)":"rgba(255,255,255,0.08)",color:p?"#f87171":"rgba(255,255,255,0.7)",backdropFilter:"blur(12px)",border:"1px solid "+(p?"rgba(239,68,68,0.2)":"rgba(255,255,255,0.08)")},"aria-label":p?"Activar micrófono":"Silenciar micrófono",children:p?A.jsx(X,{style:{width:"22px",height:"22px"}}):A.jsx(ee,{style:{width:"22px",height:"22px"}})}),A.jsx("button",{onClick:W,style:{width:"64px",height:"64px",borderRadius:"50%",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#ef4444",color:"white",boxShadow:"0 4px 24px rgba(239,68,68,0.4), 0 0 0 4px rgba(239,68,68,0.1)",transition:"all 0.2s"},"aria-label":"Finalizar llamada",children:A.jsx(ne,{style:{width:"26px",height:"26px"}})}),A.jsx("div",{style:{width:"52px",height:"52px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"speaking"===c?`${l.listeningColor}15`:"rgba(255,255,255,0.08)",color:"speaking"===c?l.listeningColor:"rgba(255,255,255,0.5)",border:"1px solid "+("speaking"===c?`${l.listeningColor}25`:"rgba(255,255,255,0.08)"),transition:"all 0.3s"},children:A.jsx(ue,{style:{width:"22px",height:"22px"}})})]}),A.jsx("style",{children:"\n @keyframes spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n @keyframes pulse {\n 0%, 100% { opacity: 1; transform: scale(1); }\n 50% { opacity: 0.7; transform: scale(0.95); }\n }\n "})]})}function xc({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,getSocket:g,onAddVoiceMessage:b,theme:y}){const[v,w]=k.useState(!1),[x,S]=k.useState(!1),{t:_}=P(),C=pc(),E=Ft({primaryColor:l}),z=function({isOpen:e,height:t,bottom:n}){const r=pc(),[o,i]=k.useState({}),a=k.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||hc)||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||hc})}else{const e=Math.min(700,Math.max(500,r));i({height:`${e}px`,maxHeight:`${r}px`,bottom:n||hc})}}},[r,t,n]);return k.useEffect(()=>{if(!e)return;const t=a();return window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a),t&&t()}},[e,a]),o}({isOpen:e,height:y?.height,bottom:y?.bottom}),N=function({enabled:e,returnFocusRef:t,onEscape:n}){const r=k.useRef(null),o=k.useRef(null);return k.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(k.useEffect(()=>{if(e)return C&&(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,C]),!e)return null;const T="bottom-left"===y?.position;return A.jsxs(A.Fragment,{children:[A.jsx("div",{id:"chat-window-description",className:"sr-only",children:_("accessibility.dialogDescription")}),A.jsxs("div",{ref:N,role:"dialog","aria-modal":"true","aria-labelledby":"chat-window-title","aria-describedby":"chat-window-description",tabIndex:-1,className:At("flex flex-col overflow-hidden transition-all duration-500 ease-[cubic-bezier(0.16,1,0.3,1)]","text-foreground z-[9999]",!C&&["fixed",T?"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"],C&&["fixed inset-0 w-full"]),style:{...z,backgroundColor:"hsl(var(--background))",borderColor:"hsl(var(--border))",color:"hsl(var(--foreground))"},children:[A.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:A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsxs("div",{className:"flex items-center gap-3",children:[A.jsxs("div",{className:"relative",children:[A.jsx("div",{className:"h-10 w-10 rounded-2xl overflow-hidden bg-primary/10 border-2 border-background shadow-soft-sm",children:v?A.jsx("div",{className:"h-full w-full flex items-center justify-center bg-muted text-muted-foreground",children:A.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.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"})})}):A.jsx("img",{src:i||Zt,alt:o,className:"h-full w-full object-cover",onError:()=>w(!0)})}),A.jsx("div",{className:At("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")})]}),A.jsxs("div",{className:"flex flex-col",children:[A.jsxs("div",{className:"flex items-center gap-1",children:[A.jsx("span",{id:"chat-window-title",className:"font-black text-xs uppercase tracking-tight text-foreground",children:o}),A.jsx(le,{className:"h-3 w-3 text-primary fill-primary/10"})]}),A.jsxs("div",{id:"chat-window-description",className:"flex items-center gap-1.5 mt-0.5",children:[A.jsx("span",{className:"flex h-1 w-1 rounded-full bg-emerald-500"}),A.jsx("span",{className:"text-[9px] font-black text-muted-foreground uppercase tracking-[0.1em]",children:_(t?"online":"offline")})]})]})]}),A.jsxs("div",{className:"flex items-center gap-2",children:[c?.enableVoice&&A.jsx("button",{onClick:()=>S(!0),"aria-label":"Iniciar llamada de voz",title:"Llamar",className:"h-8 w-8 flex items-center justify-center rounded-full bg-emerald-500/10 hover:bg-emerald-500/20 text-emerald-600 transition-all active:scale-90 focus:outline-none focus:ring-2 focus:ring-emerald-500 focus:ring-offset-2",children:A.jsx(re,{className:"h-4 w-4","aria-hidden":"true"})}),A.jsx("button",{onClick:u,"aria-label":_("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:A.jsx(de,{className:"h-4 w-4","aria-hidden":"true"})})]})]})}),A.jsxs("main",{role:"region","aria-label":_("accessibility.chatMessages"),className:"flex-1 min-h-0 relative flex flex-col",style:{padding:"var(--spacing-5)",backgroundColor:"hsl(var(--muted))"},children:[A.jsx(ac,{messages:r,isTyping:n,welcomeMessage:a,primaryColor:l,logoUrl:i,botName:o,bubbleStyles:f,avatars:p}),A.jsx("div",{className:"absolute top-0 left-0 right-0 h-6 bg-gradient-to-b from-background/10 to-transparent pointer-events-none"})]}),A.jsxs("footer",{className:"border-t",style:{paddingTop:"var(--spacing-5)",paddingLeft:"var(--spacing-5)",paddingRight:"var(--spacing-5)",paddingBottom:C?"max(var(--spacing-3), env(safe-area-inset-bottom))":"var(--spacing-3)",backgroundColor:"hsl(var(--background))",borderColor:"hsl(var(--border))"},children:[A.jsx(dc,{isConnected:t,placeholder:s,primaryColor:E,mediaConfig:c,onSendMessage:d,onSendAttachment:h,onSendLocation:m,onVoiceCall:c?.enableVoice?()=>S(!0):void 0}),A.jsxs("div",{className:"flex items-center justify-center gap-1 opacity-25 select-none",style:{marginTop:"var(--spacing-2)",paddingBottom:"var(--spacing-1)"},children:[A.jsx(Q,{className:"h-2 w-2 text-primary fill-primary"}),A.jsx("span",{className:"text-[7px] font-bold uppercase tracking-[0.2em]",children:_("con_amor_paseo_libre")})]})]}),A.jsx(wc,{isOpen:x,onClose:()=>S(!1),primaryColor:E,avatars:p,logoUrl:i,getSocket:g,onAddMessage:b})]})]})}class kc extends k.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){Ht("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:A.jsxs("div",{className:"flex flex-col items-center justify-center p-8 bg-background text-center",children:[A.jsx("div",{className:"text-6xl mb-4",children:"⚠️"}),A.jsx("h2",{className:"text-xl font-bold text-foreground mb-2",children:"Algo salió mal"}),A.jsx("p",{className:"text-sm text-muted-foreground mb-6 max-w-md",children:this.state.error?.message||"Ocurrió un error inesperado"}),A.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 Sc={bubble:"rounded-2xl",image:"rounded-xl",button:"rounded-xl",card:"rounded-2xl"},_c={bg:"bg-muted/50 dark:bg-muted/20",text:"text-foreground",border:"border-border/50"},Cc={text:"text-primary-foreground"};function Ec(e,t){const n=function(){const[e,t]=k.useState(()=>"undefined"!=typeof window&&(window.matchMedia("(prefers-contrast: high)").matches||window.matchMedia("(prefers-contrast: more)").matches));return k.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=k.useMemo(()=>{const r=function(e,t){const n={...Nt,...t?.cssVariables||{},...e?.cssVariables||{}};return{primaryColor:e?.primaryColor||t?.primaryColor||Tt,botName:e?.botName||t?.botName||jt,logoUrl:e?.logoUrl||t?.logoUrl||It,position:e?.position||t?.position||Ot,welcomeMessage:e?.welcomeMessage||t?.welcomeMessage||Mt,inputPlaceholder:e?.inputPlaceholder||t?.inputPlaceholder||Pt,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=k.useMemo(()=>({radius:{...Sc,...e?.bubbleStyles?.radius},bot:{..._c,...e?.bubbleStyles?.bot},user:{...Cc,...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:"24px",width:t&&e?"100%":"auto",height:t&&e?"100%":"auto"})}}const zc=(e,t)=>t.some(t=>e instanceof t);let Ac,Nc;const Tc=new WeakMap,jc=new WeakMap,Ic=new WeakMap;let Oc={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return Tc.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Lc(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function Mc(e){Oc=e(Oc)}function Pc(e){return(Nc||(Nc=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(Rc(this),t),Lc(this.request)}:function(...t){return Lc(e.apply(Rc(this),t))}}function Fc(e){return"function"==typeof e?Pc(e):(e instanceof IDBTransaction&&function(e){if(Tc.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)});Tc.set(e,t)}(e),zc(e,Ac||(Ac=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,Oc):e)}function Lc(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(Lc(e.result)),r()},i=()=>{n(e.error),r()};e.addEventListener("success",o),e.addEventListener("error",i)});return Ic.set(t,e),t}(e);if(jc.has(e))return jc.get(e);const t=Fc(e);return t!==e&&(jc.set(e,t),Ic.set(t,e)),t}const Rc=e=>Ic.get(e);const Dc=["get","getKey","getAll","getAllKeys","count"],Uc=["put","add","delete","clear"],Bc=new Map;function $c(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(Bc.get(t))return Bc.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=Uc.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!o&&!Dc.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 Bc.set(t,i),i}Mc(e=>({...e,get:(t,n,r)=>$c(t,n)||e.get(t,n,r),has:(t,n)=>!!$c(t,n)||e.has(t,n)}));const Vc=["continue","continuePrimaryKey","advance"],Hc={},Wc=new WeakMap,qc=new WeakMap,Zc={get(e,t){if(!Vc.includes(t))return e[t];let n=Hc[t];return n||(n=Hc[t]=function(...e){Wc.set(this,qc.get(this)[t](...e))}),n}};async function*Qc(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;const n=new Proxy(t,Zc);for(qc.set(n,t),Ic.set(n,Rc(t));t;)yield n,t=await(Wc.get(n)||t.continue()),Wc.delete(n)}function Kc(e,t){return t===Symbol.asyncIterator&&zc(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&zc(e,[IDBIndex,IDBObjectStore])}Mc(e=>({...e,get:(t,n,r)=>Kc(t,n)?Qc:e.get(t,n,r),has:(t,n)=>Kc(t,n)||e.has(t,n)}));const Jc=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=Lc(a);return r&&a.addEventListener("upgradeneeded",e=>{r(Lc(a.result),e.oldVersion,e.newVersion,Lc(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")}}),qt("IndexedDB initialized")}catch(e){throw Ht("Failed to initialize IndexedDB:",e),e}}async saveMessage(e){this.db||await this.init();try{await this.db.put("messages",e)}catch(t){Ht("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){Ht("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 Ht("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 Ht("Failed to get message:",t)}}async deleteMessage(e){this.db||await this.init();try{await this.db.delete("messages",e)}catch(t){Ht("Failed to delete message:",t)}}async clearMessages(){this.db||await this.init();try{await this.db.clear("messages"),qt("Messages cleared from IndexedDB")}catch(e){Ht("Failed to clear messages:",e)}}async setMetadata(e){this.db||await this.init();try{await this.db.put("metadata",e,"chat-metadata")}catch(t){Ht("Failed to set metadata:",t)}}async getMetadata(){this.db||await this.init();try{return await this.db.get("metadata","chat-metadata")}catch(e){return Ht("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")]),qt("All data cleared from IndexedDB")}catch(e){Ht("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),qt(`Migrated ${e.length} messages from localStorage`)}n.sessionId&&await this.setMetadata({sessionId:n.sessionId}),localStorage.removeItem(e),qt("Migration from localStorage completed")}catch(e){Ht("Failed to migrate from localStorage:",e)}}},Yc="botuyo_chat_v1",Gc={isOpen:!1,isConnected:!1,isTyping:!1,messages:[],error:null,sessionId:null};function Xc(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{...Gc,isOpen:e.isOpen};case"RESTORE_SESSION":return{...e,...t.payload,isConnected:!1,isTyping:!1,error:null};default:return e}}function eu(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 tu extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class nu extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const ru={};function ou(e){return ru}function iu(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 au(e,t){return"bigint"==typeof t?t.toString():t}function su(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function lu(e){return null==e}function cu(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const uu=Symbol("evaluating");function du(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==uu)return void 0===r&&(r=uu,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function fu(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function pu(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function hu(e){return JSON.stringify(e)}const mu="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function gu(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const bu=su(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function yu(e){if(!1===gu(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!==gu(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function vu(e){return yu(e)?{...e}:Array.isArray(e)?[...e]:e}const wu=new Set(["string","number","symbol"]);function xu(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ku(e,t,n){const r=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(r._zod.parent=e),r}function Su(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 _u={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 Cu(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 Eu(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function zu(e){return"string"==typeof e?e:e?.message}function Au(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=zu(e.inst?._zod.def?.error?.(e))??zu(t?.error?.(e))??zu(n.customError?.(e))??zu(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Nu(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function Tu(...e){const[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}const ju=(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,au,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Iu=eu("$ZodError",ju),Ou=eu("$ZodError",ju,{Parent:Error});const Mu=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 tu;if(a.issues.length){const t=new(o?.Err??e)(a.issues.map(e=>Au(e,i,ou())));throw mu(t,o?.callee),t}return a.value},Pu=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=>Au(e,i,ou())));throw mu(t,o?.callee),t}return a.value},Fu=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 tu;return i.issues.length?{success:!1,error:new(e??Iu)(i.issues.map(e=>Au(e,o,ou())))}:{success:!0,data:i.value}},Lu=Fu(Ou),Ru=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=>Au(e,o,ou())))}:{success:!0,data:i.value}},Du=Ru(Ou),Uu=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Mu(e)(t,n,o)},Bu=e=>(t,n,r)=>Mu(e)(t,n,r),$u=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Pu(e)(t,n,o)},Vu=e=>async(t,n,r)=>Pu(e)(t,n,r),Hu=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Fu(e)(t,n,o)},Wu=e=>(t,n,r)=>Fu(e)(t,n,r),qu=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ru(e)(t,n,o)},Zu=e=>async(t,n,r)=>Ru(e)(t,n,r),Qu=/^[cC][^\s-]{8,}$/,Ku=/^[0-9a-z]+$/,Ju=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Yu=/^[0-9a-vA-V]{20}$/,Gu=/^[A-Za-z0-9]{27}$/,Xu=/^[a-zA-Z0-9_-]{21}$/,ed=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,td=/^([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})$/,nd=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)$/,rd=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;const od=/^(?:(?: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])$/,id=/^(([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}|:))$/,ad=/^((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])$/,sd=/^(([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])$/,ld=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,cd=/^[A-Za-z0-9_-]*$/,ud=/^\+[1-9]\d{6,14}$/,dd="(?:(?:\\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])))",fd=new RegExp(`^${dd}$`);function pd(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 hd=/^-?\d+$/,md=/^-?\d+(?:\.\d+)?$/,gd=/^[^A-Z]*$/,bd=/^[^a-z]*$/,yd=eu("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),vd={number:"number",bigint:"bigint",object:"date"},wd=eu("$ZodCheckLessThan",(e,t)=>{yd.init(e,t);const n=vd[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})}}),xd=eu("$ZodCheckGreaterThan",(e,t)=>{yd.init(e,t);const n=vd[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})}}),kd=eu("$ZodCheckMultipleOf",(e,t)=>{yd.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})}}),Sd=eu("$ZodCheckNumberFormat",(e,t)=>{yd.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,i]=_u[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=hd)}),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})}}),_d=eu("$ZodCheckMaxLength",(e,t)=>{var n;yd.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!lu(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=Nu(r);n.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Cd=eu("$ZodCheckMinLength",(e,t)=>{var n;yd.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!lu(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=Nu(r);n.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ed=eu("$ZodCheckLengthEquals",(e,t)=>{var n;yd.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!lu(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=Nu(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})}}),zd=eu("$ZodCheckStringFormat",(e,t)=>{var n,r;yd.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=()=>{})}),Ad=eu("$ZodCheckRegex",(e,t)=>{zd.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})}}),Nd=eu("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=gd),zd.init(e,t)}),Td=eu("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=bd),zd.init(e,t)}),jd=eu("$ZodCheckIncludes",(e,t)=>{yd.init(e,t);const n=xu(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})}}),Id=eu("$ZodCheckStartsWith",(e,t)=>{yd.init(e,t);const n=new RegExp(`^${xu(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})}}),Od=eu("$ZodCheckEndsWith",(e,t)=>{yd.init(e,t);const n=new RegExp(`.*${xu(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})}}),Md=eu("$ZodCheckOverwrite",(e,t)=>{yd.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class Pd{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 Fd={major:4,minor:3,patch:6},Ld=eu("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Fd;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=Cu(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 tu;if(r||a instanceof Promise)r=(r??Promise.resolve()).then(async()=>{await a;e.issues.length!==t&&(o||(o=Cu(e,t)))});else{if(e.issues.length===t)continue;o||(o=Cu(e,t))}}return r?r.then(()=>e):e},n=(n,o,i)=>{if(Cu(n))return n.aborted=!0,n;const a=t(o,r,i);if(a instanceof Promise){if(!1===i.async)throw new tu;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 tu;return a.then(e=>t(e,r,i))}return t(a,r,i)}}du(e,"~standard",()=>({validate:t=>{try{const n=Lu(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return Du(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),Rd=eu("$ZodString",(e,t)=>{var n;Ld.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}}),Dd=eu("$ZodStringFormat",(e,t)=>{zd.init(e,t),Rd.init(e,t)}),Ud=eu("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=td),Dd.init(e,t)}),Bd=eu("$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=nd(e))}else t.pattern??(t.pattern=nd());Dd.init(e,t)}),$d=eu("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=rd),Dd.init(e,t)}),Vd=eu("$ZodURL",(e,t)=>{Dd.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})}}}),Hd=eu("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Dd.init(e,t)}),Wd=eu("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Xu),Dd.init(e,t)}),qd=eu("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Qu),Dd.init(e,t)}),Zd=eu("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ku),Dd.init(e,t)}),Qd=eu("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Ju),Dd.init(e,t)}),Kd=eu("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Yu),Dd.init(e,t)}),Jd=eu("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Gu),Dd.init(e,t)}),Yd=eu("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){const t=pd({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(`^${dd}T(?:${r})$`)}(t)),Dd.init(e,t)}),Gd=eu("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=fd),Dd.init(e,t)}),Xd=eu("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=new RegExp(`^${pd(t)}$`)),Dd.init(e,t)}),ef=eu("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=ed),Dd.init(e,t)}),tf=eu("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=od),Dd.init(e,t),e._zod.bag.format="ipv4"}),nf=eu("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=id),Dd.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})}}}),rf=eu("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=ad),Dd.init(e,t)}),of=eu("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=sd),Dd.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 af(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const sf=eu("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=ld),Dd.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{af(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});const lf=eu("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=cd),Dd.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{(function(e){if(!cd.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return af(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})}}),cf=eu("$ZodE164",(e,t)=>{t.pattern??(t.pattern=ud),Dd.init(e,t)});const uf=eu("$ZodJWT",(e,t)=>{Dd.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})}}),df=eu("$ZodNumber",(e,t)=>{Ld.init(e,t),e._zod.pattern=e._zod.bag.pattern??md,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}}),ff=eu("$ZodNumberFormat",(e,t)=>{Sd.init(e,t),df.init(e,t)}),pf=eu("$ZodAny",(e,t)=>{Ld.init(e,t),e._zod.parse=e=>e}),hf=eu("$ZodUnknown",(e,t)=>{Ld.init(e,t),e._zod.parse=e=>e}),mf=eu("$ZodNever",(e,t)=>{Ld.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function gf(e,t,n){e.issues.length&&t.issues.push(...Eu(n,e.issues)),t.value[n]=e.value}const bf=eu("$ZodArray",(e,t)=>{Ld.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=>gf(t,n,e))):gf(s,n,e)}return i.length?Promise.all(i).then(()=>n):n}});function yf(e,t,n,r,o){if(e.issues.length){if(o&&!(n in r))return;t.issues.push(...Eu(n,e.issues))}void 0===e.value?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function vf(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 wf(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=>yf(e,n,d,t,u))):yf(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 xf=eu("$ZodObject",(e,t)=>{Ld.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=su(()=>vf(t));du(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=gu,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=>yf(n,t,e,s,o))):yf(i,t,e,s,o)}return i?wf(l,s,t,n,r.value,e):l.length?Promise.all(l).then(()=>t):t}}),kf=eu("$ZodObjectJIT",(e,t)=>{xf.init(e,t);const n=e._zod.parse,r=su(()=>vf(t));let o;const i=gu,a=!ru.jitless,s=a&&bu.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 Pd(["shape","payload","ctx"]),n=r.value,o=e=>{const t=hu(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=hu(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?wf([],f,u,d,c,e):u):n(u,d):(u.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),u)}});function Sf(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=>!Cu(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=>Au(e,r,ou())))}),t)}const _f=eu("$ZodUnion",(e,t)=>{Ld.init(e,t),du(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),du(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),du(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),du(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=>cu(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=>Sf(t,o,e,i)):Sf(s,o,e,i)}}),Cf=eu("$ZodIntersection",(e,t)=>{Ld.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])=>zf(e,t,n)):zf(e,o,i)}});function Ef(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(yu(e)&&yu(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=Ef(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=Ef(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 zf(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}),Cu(e))return e;const a=Ef(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 Af=eu("$ZodEnum",(e,t)=>{Ld.init(e,t);const n=iu(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(e=>wu.has(typeof e)).map(e=>"string"==typeof e?xu(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}}),Nf=eu("$ZodTransform",(e,t)=>{Ld.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new nu(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 tu;return n.value=o,n}});function Tf(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const jf=eu("$ZodOptional",(e,t)=>{Ld.init(e,t),e._zod.optin="optional",e._zod.optout="optional",du(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),du(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${cu(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=>Tf(t,e.value)):Tf(r,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),If=eu("$ZodExactOptional",(e,t)=>{jf.init(e,t),du(e._zod,"values",()=>t.innerType._zod.values),du(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Of=eu("$ZodNullable",(e,t)=>{Ld.init(e,t),du(e._zod,"optin",()=>t.innerType._zod.optin),du(e._zod,"optout",()=>t.innerType._zod.optout),du(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${cu(e.source)}|null)$`):void 0}),du(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)}),Mf=eu("$ZodDefault",(e,t)=>{Ld.init(e,t),e._zod.optin="optional",du(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=>Pf(e,t)):Pf(r,t)}});function Pf(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const Ff=eu("$ZodPrefault",(e,t)=>{Ld.init(e,t),e._zod.optin="optional",du(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))}),Lf=eu("$ZodNonOptional",(e,t)=>{Ld.init(e,t),du(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=>Rf(t,e)):Rf(o,e)}});function Rf(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 Df=eu("$ZodCatch",(e,t)=>{Ld.init(e,t),du(e._zod,"optin",()=>t.innerType._zod.optin),du(e._zod,"optout",()=>t.innerType._zod.optout),du(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=>Au(e,n,ou()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Au(e,n,ou()))},input:e.value}),e.issues=[]),e)}}),Uf=eu("$ZodPipe",(e,t)=>{Ld.init(e,t),du(e._zod,"values",()=>t.in._zod.values),du(e._zod,"optin",()=>t.in._zod.optin),du(e._zod,"optout",()=>t.out._zod.optout),du(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=>Bf(e,t.in,n)):Bf(r,t.in,n)}const r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Bf(e,t.out,n)):Bf(r,t.out,n)}});function Bf(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const $f=eu("$ZodReadonly",(e,t)=>{Ld.init(e,t),du(e._zod,"propValues",()=>t.innerType._zod.propValues),du(e._zod,"values",()=>t.innerType._zod.values),du(e._zod,"optin",()=>t.innerType?._zod?.optin),du(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(Vf):Vf(r)}});function Vf(e){return e.value=Object.freeze(e.value),e}const Hf=eu("$ZodCustom",(e,t)=>{yd.init(e,t),Ld.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=>Wf(t,n,r,e));Wf(o,n,r,e)}});function Wf(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(Tu(e))}}var qf;class Zf{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)}}(qf=globalThis).__zod_globalRegistry??(qf.__zod_globalRegistry=new Zf);const Qf=globalThis.__zod_globalRegistry;function Kf(e,t){return new e({type:"string",...Su(t)})}function Jf(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Su(t)})}function Yf(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Su(t)})}function Gf(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Su(t)})}function Xf(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Su(t)})}function ep(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Su(t)})}function tp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Su(t)})}function np(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Su(t)})}function rp(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Su(t)})}function op(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Su(t)})}function ip(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Su(t)})}function ap(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Su(t)})}function sp(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Su(t)})}function lp(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Su(t)})}function cp(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Su(t)})}function up(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Su(t)})}function dp(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Su(t)})}function fp(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Su(t)})}function pp(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Su(t)})}function hp(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Su(t)})}function mp(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Su(t)})}function gp(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Su(t)})}function bp(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Su(t)})}function yp(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Su(t)})}function vp(e,t){return new e({type:"string",format:"date",check:"string_format",...Su(t)})}function wp(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Su(t)})}function xp(e,t){return new e({type:"string",format:"duration",check:"string_format",...Su(t)})}function kp(e,t){return new e({type:"number",checks:[],...Su(t)})}function Sp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Su(t)})}function _p(e){return new e({type:"any"})}function Cp(e){return new e({type:"unknown"})}function Ep(e,t){return new e({type:"never",...Su(t)})}function zp(e,t){return new wd({check:"less_than",...Su(t),value:e,inclusive:!1})}function Ap(e,t){return new wd({check:"less_than",...Su(t),value:e,inclusive:!0})}function Np(e,t){return new xd({check:"greater_than",...Su(t),value:e,inclusive:!1})}function Tp(e,t){return new xd({check:"greater_than",...Su(t),value:e,inclusive:!0})}function jp(e,t){return new kd({check:"multiple_of",...Su(t),value:e})}function Ip(e,t){return new _d({check:"max_length",...Su(t),maximum:e})}function Op(e,t){return new Cd({check:"min_length",...Su(t),minimum:e})}function Mp(e,t){return new Ed({check:"length_equals",...Su(t),length:e})}function Pp(e,t){return new Ad({check:"string_format",format:"regex",...Su(t),pattern:e})}function Fp(e){return new Nd({check:"string_format",format:"lowercase",...Su(e)})}function Lp(e){return new Td({check:"string_format",format:"uppercase",...Su(e)})}function Rp(e,t){return new jd({check:"string_format",format:"includes",...Su(t),includes:e})}function Dp(e,t){return new Id({check:"string_format",format:"starts_with",...Su(t),prefix:e})}function Up(e,t){return new Od({check:"string_format",format:"ends_with",...Su(t),suffix:e})}function Bp(e){return new Md({check:"overwrite",tx:e})}function $p(e){return Bp(t=>t.normalize(e))}function Vp(){return Bp(e=>e.trim())}function Hp(){return Bp(e=>e.toLowerCase())}function Wp(){return Bp(e=>e.toUpperCase())}function qp(){return Bp(e=>function(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}(e))}function Zp(e,t,n){return new e({type:"array",element:t,...Su(n)})}function Qp(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Su(n)})}function Kp(e){const t=Jp(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(Tu(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(Tu(r))}},e(n.value,n)));return t}function Jp(e,t){const n=new yd({check:"custom",...Su(t)});return n._zod.check=e,n}function Yp(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??Qf,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 Gp(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),Gp(i,t,r),t.seen.get(i).isParent=!0)}const l=t.metadataRegistry.get(e);l&&Object.assign(a.schema,l),"input"===t.io&&th(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 Xp(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 eh(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:nh(t,"input",e.processors),output:nh(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(a){throw new Error("Error converting schema to JSON.")}}function th(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 th(r.element,n);if("set"===r.type)return th(r.valueType,n);if("lazy"===r.type)return th(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 th(r.innerType,n);if("intersection"===r.type)return th(r.left,n)||th(r.right,n);if("record"===r.type||"map"===r.type)return th(r.keyType,n)||th(r.valueType,n);if("pipe"===r.type)return th(r.in,n)||th(r.out,n);if("object"===r.type){for(const e in r.shape)if(th(r.shape[e],n))return!0;return!1}if("union"===r.type){for(const e of r.options)if(th(e,n))return!0;return!1}if("tuple"===r.type){for(const e of r.items)if(th(e,n))return!0;return!(!r.rest||!th(r.rest,n))}return!1}const nh=(e,t,n={})=>r=>{const{libraryOptions:o,target:i}=r??{},a=Yp({...o??{},target:i,io:t,processors:n});return Gp(e,a),Xp(a,e),eh(a,e)},rh={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},oh=(e,t,n,r)=>{const o=e._zod.def;Gp(o.innerType,t,r);t.seen.get(e).ref=o.innerType},ih=eu("ZodISODateTime",(e,t)=>{Yd.init(e,t),Eh.init(e,t)});const ah=eu("ZodISODate",(e,t)=>{Gd.init(e,t),Eh.init(e,t)});const sh=eu("ZodISOTime",(e,t)=>{Xd.init(e,t),Eh.init(e,t)});const lh=eu("ZodISODuration",(e,t)=>{ef.init(e,t),Eh.init(e,t)});const ch=eu("ZodError",(e,t)=>{Iu.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,au,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,au,2)}},isEmpty:{get:()=>0===e.issues.length}})},{Parent:Error}),uh=Mu(ch),dh=Pu(ch),fh=Fu(ch),ph=Ru(ch),hh=Uu(ch),mh=Bu(ch),gh=$u(ch),bh=Vu(ch),yh=Hu(ch),vh=Wu(ch),wh=qu(ch),xh=Zu(ch),kh=eu("ZodType",(e,t)=>(Ld.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:nh(e,"input"),output:nh(e,"output")}}),e.toJSONSchema=((e,t={})=>n=>{const r=Yp({...n,processors:t});return Gp(e,r),Xp(r,e),eh(r,e)})(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(pu(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)=>ku(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>uh(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>fh(e,t,n),e.parseAsync=async(t,n)=>dh(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>ph(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>hh(e,t,n),e.decode=(t,n)=>mh(e,t,n),e.encodeAsync=async(t,n)=>gh(e,t,n),e.decodeAsync=async(t,n)=>bh(e,t,n),e.safeEncode=(t,n)=>yh(e,t,n),e.safeDecode=(t,n)=>vh(e,t,n),e.safeEncodeAsync=async(t,n)=>wh(e,t,n),e.safeDecodeAsync=async(t,n)=>xh(e,t,n),e.refine=(t,n)=>e.check(function(e,t={}){return Qp(vm,e,t)}(t,n)),e.superRefine=t=>e.check(Kp(t)),e.overwrite=t=>e.check(Bp(t)),e.optional=()=>lm(e),e.exactOptional=()=>new cm({type:"optional",innerType:e}),e.nullable=()=>dm(e),e.nullish=()=>lm(dm(e)),e.nonoptional=t=>function(e,t){return new hm({type:"nonoptional",innerType:e,...Su(t)})}(e,t),e.array=()=>{return Zp(em,e,t);var t},e.or=t=>{return new nm({type:"union",options:[e,t],...Su(n)});var n},e.and=t=>new rm({type:"intersection",left:e,right:t}),e.transform=t=>bm(e,new am({type:"transform",transform:t})),e.default=t=>{return n=t,new fm({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():vu(n)}});var n},e.prefault=t=>{return n=t,new pm({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():vu(n)}});var n},e.catch=t=>{return new mm({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:()=>n});var n},e.pipe=t=>bm(e,t),e.readonly=()=>new ym({type:"readonly",innerType:e}),e.describe=t=>{const n=e.clone();return Qf.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>Qf.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return Qf.get(e);const n=e.clone();return Qf.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),Sh=eu("_ZodString",(e,t)=>{Rd.init(e,t),kh.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=rh[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(Pp(...t)),e.includes=(...t)=>e.check(Rp(...t)),e.startsWith=(...t)=>e.check(Dp(...t)),e.endsWith=(...t)=>e.check(Up(...t)),e.min=(...t)=>e.check(Op(...t)),e.max=(...t)=>e.check(Ip(...t)),e.length=(...t)=>e.check(Mp(...t)),e.nonempty=(...t)=>e.check(Op(1,...t)),e.lowercase=t=>e.check(Fp(t)),e.uppercase=t=>e.check(Lp(t)),e.trim=()=>e.check(Vp()),e.normalize=(...t)=>e.check($p(...t)),e.toLowerCase=()=>e.check(Hp()),e.toUpperCase=()=>e.check(Wp()),e.slugify=()=>e.check(qp())}),_h=eu("ZodString",(e,t)=>{Rd.init(e,t),Sh.init(e,t),e.email=t=>e.check(Jf(zh,t)),e.url=t=>e.check(np(Th,t)),e.jwt=t=>e.check(bp(Wh,t)),e.emoji=t=>e.check(rp(jh,t)),e.guid=t=>e.check(Yf(Ah,t)),e.uuid=t=>e.check(Gf(Nh,t)),e.uuidv4=t=>e.check(Xf(Nh,t)),e.uuidv6=t=>e.check(ep(Nh,t)),e.uuidv7=t=>e.check(tp(Nh,t)),e.nanoid=t=>e.check(op(Ih,t)),e.guid=t=>e.check(Yf(Ah,t)),e.cuid=t=>e.check(ip(Oh,t)),e.cuid2=t=>e.check(ap(Mh,t)),e.ulid=t=>e.check(sp(Ph,t)),e.base64=t=>e.check(hp($h,t)),e.base64url=t=>e.check(mp(Vh,t)),e.xid=t=>e.check(lp(Fh,t)),e.ksuid=t=>e.check(cp(Lh,t)),e.ipv4=t=>e.check(up(Rh,t)),e.ipv6=t=>e.check(dp(Dh,t)),e.cidrv4=t=>e.check(fp(Uh,t)),e.cidrv6=t=>e.check(pp(Bh,t)),e.e164=t=>e.check(gp(Hh,t)),e.datetime=t=>e.check(function(e){return yp(ih,e)}(t)),e.date=t=>e.check(function(e){return vp(ah,e)}(t)),e.time=t=>e.check(function(e){return wp(sh,e)}(t)),e.duration=t=>e.check(function(e){return xp(lh,e)}(t))});function Ch(e){return Kf(_h,e)}const Eh=eu("ZodStringFormat",(e,t)=>{Dd.init(e,t),Sh.init(e,t)}),zh=eu("ZodEmail",(e,t)=>{$d.init(e,t),Eh.init(e,t)}),Ah=eu("ZodGUID",(e,t)=>{Ud.init(e,t),Eh.init(e,t)}),Nh=eu("ZodUUID",(e,t)=>{Bd.init(e,t),Eh.init(e,t)}),Th=eu("ZodURL",(e,t)=>{Vd.init(e,t),Eh.init(e,t)}),jh=eu("ZodEmoji",(e,t)=>{Hd.init(e,t),Eh.init(e,t)}),Ih=eu("ZodNanoID",(e,t)=>{Wd.init(e,t),Eh.init(e,t)}),Oh=eu("ZodCUID",(e,t)=>{qd.init(e,t),Eh.init(e,t)}),Mh=eu("ZodCUID2",(e,t)=>{Zd.init(e,t),Eh.init(e,t)}),Ph=eu("ZodULID",(e,t)=>{Qd.init(e,t),Eh.init(e,t)}),Fh=eu("ZodXID",(e,t)=>{Kd.init(e,t),Eh.init(e,t)}),Lh=eu("ZodKSUID",(e,t)=>{Jd.init(e,t),Eh.init(e,t)}),Rh=eu("ZodIPv4",(e,t)=>{tf.init(e,t),Eh.init(e,t)}),Dh=eu("ZodIPv6",(e,t)=>{nf.init(e,t),Eh.init(e,t)}),Uh=eu("ZodCIDRv4",(e,t)=>{rf.init(e,t),Eh.init(e,t)}),Bh=eu("ZodCIDRv6",(e,t)=>{of.init(e,t),Eh.init(e,t)}),$h=eu("ZodBase64",(e,t)=>{sf.init(e,t),Eh.init(e,t)}),Vh=eu("ZodBase64URL",(e,t)=>{lf.init(e,t),Eh.init(e,t)}),Hh=eu("ZodE164",(e,t)=>{cf.init(e,t),Eh.init(e,t)}),Wh=eu("ZodJWT",(e,t)=>{uf.init(e,t),Eh.init(e,t)}),qh=eu("ZodNumber",(e,t)=>{df.init(e,t),kh.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(Np(t,n)),e.gte=(t,n)=>e.check(Tp(t,n)),e.min=(t,n)=>e.check(Tp(t,n)),e.lt=(t,n)=>e.check(zp(t,n)),e.lte=(t,n)=>e.check(Ap(t,n)),e.max=(t,n)=>e.check(Ap(t,n)),e.int=t=>e.check(Kh(t)),e.safe=t=>e.check(Kh(t)),e.positive=t=>e.check(Np(0,t)),e.nonnegative=t=>e.check(Tp(0,t)),e.negative=t=>e.check(zp(0,t)),e.nonpositive=t=>e.check(Ap(0,t)),e.multipleOf=(t,n)=>e.check(jp(t,n)),e.step=(t,n)=>e.check(jp(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 Zh(e){return kp(qh,e)}const Qh=eu("ZodNumberFormat",(e,t)=>{ff.init(e,t),qh.init(e,t)});function Kh(e){return Sp(Qh,e)}const Jh=eu("ZodAny",(e,t)=>{pf.init(e,t),kh.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});const Yh=eu("ZodUnknown",(e,t)=>{hf.init(e,t),kh.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function Gh(){return Cp(Yh)}const Xh=eu("ZodNever",(e,t)=>{mf.init(e,t),kh.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n)=>{n.not={}})(0,0,t)});const em=eu("ZodArray",(e,t)=>{bf.init(e,t),kh.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=Gp(i.element,t,{...r,path:[...r.path,"items"]})})(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(Op(t,n)),e.nonempty=t=>e.check(Op(1,t)),e.max=(t,n)=>e.check(Ip(t,n)),e.length=(t,n)=>e.check(Mp(t,n)),e.unwrap=()=>e.element});const tm=eu("ZodObject",(e,t)=>{kf.init(e,t),kh.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]=Gp(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=Gp(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(o.additionalProperties=!1)})(e,t,n,r),du(e,"shape",()=>t.shape),e.keyof=()=>im(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Gh()}),e.loose=()=>e.clone({...e._zod.def,catchall:Gh()}),e.strict=()=>{return e.clone({...e._zod.def,catchall:Ep(Xh,t)});var t},e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>function(e,t){if(!yu(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=pu(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return fu(this,"shape",n),n}});return ku(e,r)}(e,t),e.safeExtend=t=>function(e,t){if(!yu(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=pu(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return fu(this,"shape",n),n}});return ku(e,n)}(e,t),e.merge=t=>function(e,t){const n=pu(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return fu(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return ku(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 ku(e,pu(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 fu(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=pu(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 fu(this,"shape",r),r},checks:[]});return ku(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=pu(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 fu(this,"shape",o),o},checks:[]});return ku(t,o)}(sm,e,t[0]),e.required=(...t)=>function(e,t,n){const r=pu(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 fu(this,"shape",o),o}});return ku(t,r)}(hm,e,t[0])});const nm=eu("ZodUnion",(e,t)=>{_f.init(e,t),kh.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)=>Gp(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 rm=eu("ZodIntersection",(e,t)=>{Cf.init(e,t),kh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def,i=Gp(o.left,t,{...r,path:[...r.path,"allOf",0]}),a=Gp(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 om=eu("ZodEnum",(e,t)=>{Af.init(e,t),kh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=iu(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 om({...t,checks:[],...Su(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 om({...t,checks:[],...Su(r),entries:o})}});function im(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new om({type:"enum",entries:n,...Su(t)})}const am=eu("ZodTransform",(e,t)=>{Nf.init(e,t),kh.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 nu(e.constructor.name);n.addIssue=r=>{if("string"==typeof r)n.issues.push(Tu(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(Tu(t))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(e=>(n.value=e,n)):(n.value=o,n)}});const sm=eu("ZodOptional",(e,t)=>{jf.init(e,t),kh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oh(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});function lm(e){return new sm({type:"optional",innerType:e})}const cm=eu("ZodExactOptional",(e,t)=>{If.init(e,t),kh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oh(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});const um=eu("ZodNullable",(e,t)=>{Of.init(e,t),kh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def,i=Gp(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 dm(e){return new um({type:"nullable",innerType:e})}const fm=eu("ZodDefault",(e,t)=>{Mf.init(e,t),kh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;Gp(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 pm=eu("ZodPrefault",(e,t)=>{Ff.init(e,t),kh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;Gp(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 hm=eu("ZodNonOptional",(e,t)=>{Lf.init(e,t),kh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;Gp(o.innerType,t,r),t.seen.get(e).ref=o.innerType})(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});const mm=eu("ZodCatch",(e,t)=>{Df.init(e,t),kh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;let i;Gp(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 gm=eu("ZodPipe",(e,t)=>{Uf.init(e,t),kh.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;Gp(i,t,r),t.seen.get(e).ref=i})(e,t,0,r),e.in=t.in,e.out=t.out});function bm(e,t){return new gm({type:"pipe",in:e,out:t})}const ym=eu("ZodReadonly",(e,t)=>{$f.init(e,t),kh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;Gp(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 vm=eu("ZodCustom",(e,t)=>{Hf.init(e,t),kh.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 wm=Object.create(null);wm.open="0",wm.close="1",wm.ping="2",wm.pong="3",wm.message="4",wm.upgrade="5",wm.noop="6";const xm=Object.create(null);Object.keys(wm).forEach(e=>{xm[wm[e]]=e});const km={type:"error",data:"parser error"},Sm="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),_m="function"==typeof ArrayBuffer,Cm=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Em=({type:e,data:t},n,r)=>Sm&&t instanceof Blob?n?r(t):zm(t,r):_m&&(t instanceof ArrayBuffer||Cm(t))?n?r(t):zm(new Blob([t]),r):r(wm[e]+(t||"")),zm=(e,t)=>{const n=new FileReader;return n.onload=function(){const e=n.result.split(",")[1];t("b"+(e||""))},n.readAsDataURL(e)};function Am(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Nm;const Tm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",jm="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let Gb=0;Gb<64;Gb++)jm[Tm.charCodeAt(Gb)]=Gb;const Im="function"==typeof ArrayBuffer,Om=(e,t)=>{if("string"!=typeof e)return{type:"message",data:Pm(e,t)};const n=e.charAt(0);if("b"===n)return{type:"message",data:Mm(e.substring(1),t)};return xm[n]?e.length>1?{type:xm[n],data:e.substring(1)}:{type:xm[n]}:km},Mm=(e,t)=>{if(Im){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=jm[e.charCodeAt(t)],r=jm[e.charCodeAt(t+1)],o=jm[e.charCodeAt(t+2)],i=jm[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 Pm(n,t)}return{base64:!0,data:e}},Pm=(e,t)=>"blob"===t?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,Fm=String.fromCharCode(30);function Lm(){return new TransformStream({transform(e,t){!function(e,t){Sm&&e.data instanceof Blob?e.data.arrayBuffer().then(Am).then(t):_m&&(e.data instanceof ArrayBuffer||Cm(e.data))?t(Am(e.data)):Em(e,!1,e=>{Nm||(Nm=new TextEncoder),t(Nm.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 Rm;function Dm(e){return e.reduce((e,t)=>e+t.length,0)}function Um(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 Bm(e){if(e)return function(e){for(var t in Bm.prototype)e[t]=Bm.prototype[t];return e}(e)}Bm.prototype.on=Bm.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Bm.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Bm.prototype.off=Bm.prototype.removeListener=Bm.prototype.removeAllListeners=Bm.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},Bm.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},Bm.prototype.emitReserved=Bm.prototype.emit,Bm.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Bm.prototype.hasListeners=function(e){return!!this.listeners(e).length};const $m="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),Vm="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function Hm(e,...t){return t.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{})}const Wm=Vm.setTimeout,qm=Vm.clearTimeout;function Zm(e,t){t.useNativeTimers?(e.setTimeoutFn=Wm.bind(Vm),e.clearTimeoutFn=qm.bind(Vm)):(e.setTimeoutFn=Vm.setTimeout.bind(Vm),e.clearTimeoutFn=Vm.clearTimeout.bind(Vm))}function Qm(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 Km(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class Jm extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type="TransportError"}}class Ym extends Bm{constructor(e){super(),this.writable=!1,Zm(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 Jm(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=Om(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 Gm extends Ym{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(Fm),r=[];for(let o=0;o<n.length;o++){const e=Om(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)=>{Em(e,!1,e=>{r[i]=e,++o===n&&t(r.join(Fm))})})})(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]=Km()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}}let Xm=!1;try{Xm="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(Yb){}const eg=Xm;function tg(){}class ng extends Gm{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 rg extends Bm{constructor(e,t,n){super(),this.createRequest=e,Zm(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=Hm(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(xb){}if("POST"===this._method)try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(xb){}try{n.setRequestHeader("Accept","*/*")}catch(xb){}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(xb){return void this.setTimeoutFn(()=>{this._onError(xb)},0)}"undefined"!=typeof document&&(this._index=rg.requestsCount++,rg.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=tg,e)try{this._xhr.abort()}catch(xb){}"undefined"!=typeof document&&delete rg.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(rg.requestsCount=0,rg.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",og);else if("function"==typeof addEventListener){addEventListener("onpagehide"in Vm?"pagehide":"unload",og,!1)}function og(){for(let e in rg.requests)rg.requests.hasOwnProperty(e)&&rg.requests[e].abort()}const ig=function(){const e=ag({xdomain:!1});return e&&null!==e.responseType}();function ag(e){const t=e.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!t||eg))return new XMLHttpRequest}catch(xb){}if(!t)try{return new(Vm[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(xb){}}const sg="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class lg extends Ym{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,n=sg?{}:Hm(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(Yb){return this.emitReserved("error",Yb)}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;Em(n,this.supportsBinary,e=>{try{this.doWrite(n,e)}catch(xb){}r&&$m(()=>{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]=Km()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const cg=Vm.WebSocket||Vm.MozWebSocket;const ug={websocket:class extends lg{createSocket(e,t,n){return sg?new cg(e,t,n):t?new cg(e,t):new cg(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends Ym{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(Yb){return this.emitReserved("error",Yb)}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){Rm||(Rm=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(Dm(n)<1)break;const e=Um(n,1);i=!(128&~e[0]),o=127&e[0],r=o<126?3:126===o?1:2}else if(1===r){if(Dm(n)<2)break;const e=Um(n,2);o=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),r=3}else if(2===r){if(Dm(n)<8)break;const e=Um(n,8),t=new DataView(e.buffer,e.byteOffset,e.length),i=t.getUint32(0);if(i>Math.pow(2,21)-1){s.enqueue(km);break}o=i*Math.pow(2,32)+t.getUint32(4),r=3}else{if(Dm(n)<o)break;const e=Um(n,o);s.enqueue(Om(i?e:Rm.decode(e),t)),r=0}if(0===o||o>e){s.enqueue(km);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),r=Lm();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&&$m(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;null===(e=this._transport)||void 0===e||e.close()}},polling:class extends ng{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=ig&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new rg(ag,this.uri(),e)}}},dg=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,fg=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function pg(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=dg.exec(e||""),i={},a=14;for(;a--;)i[fg[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 hg="function"==typeof addEventListener&&"function"==typeof removeEventListener,mg=[];hg&&addEventListener("offline",()=>{mg.forEach(e=>e())},!1);class gg extends Bm{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=pg(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=pg(t.host).host);Zm(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)),hg&&(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"})},mg.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&&gg.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",gg.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+=Qm(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,$m(()=>{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(gg.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(),hg&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const e=mg.indexOf(this._offlineEventListener);-1!==e&&mg.splice(e,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}gg.protocol=4;class bg extends gg{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;gg.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;gg.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 yg=class extends bg{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=>ug[e]).filter(e=>!!e)),super(e,n)}};const vg="function"==typeof ArrayBuffer,wg=Object.prototype.toString,xg="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===wg.call(Blob),kg="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===wg.call(File);function Sg(e){return vg&&(e instanceof ArrayBuffer||(e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer)(e))||xg&&e instanceof Blob||kg&&e instanceof File}function _g(e,t){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(_g(e[t]))return!0;return!1}if(Sg(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return _g(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&_g(e[n]))return!0;return!1}function Cg(e){const t=[],n=e.data,r=e;return r.data=Eg(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Eg(e,t){if(!e)return e;if(Sg(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]=Eg(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]=Eg(e[r],t));return n}return e}function zg(e,t){return e.data=Ag(e.data,t),delete e.attachments,e}function Ag(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]=Ag(e[n],t);else if("object"==typeof e)for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Ag(e[n],t));return e}const Ng=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Tg,jg;(jg=Tg||(Tg={}))[jg.CONNECT=0]="CONNECT",jg[jg.DISCONNECT=1]="DISCONNECT",jg[jg.EVENT=2]="EVENT",jg[jg.ACK=3]="ACK",jg[jg.CONNECT_ERROR=4]="CONNECT_ERROR",jg[jg.BINARY_EVENT=5]="BINARY_EVENT",jg[jg.BINARY_ACK=6]="BINARY_ACK";class Ig extends Bm{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===Tg.BINARY_EVENT;n||t.type===Tg.BINARY_ACK?(t.type=n?Tg.EVENT:Tg.ACK,this.reconstructor=new Og(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!Sg(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===Tg[n.type])throw new Error("unknown packet type "+n.type);if(n.type===Tg.BINARY_EVENT||n.type===Tg.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(!Ig.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(xb){return!1}}static isPayloadValid(e,t){switch(e){case Tg.CONNECT:return Pg(t);case Tg.DISCONNECT:return void 0===t;case Tg.CONNECT_ERROR:return"string"==typeof t||Pg(t);case Tg.EVENT:case Tg.BINARY_EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===Ng.indexOf(t[0]));case Tg.ACK:case Tg.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Og{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=zg(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Mg=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e};function Pg(e){return"[object Object]"===Object.prototype.toString.call(e)}const Fg=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Ig,Encoder:class{constructor(e){this.replacer=e}encode(e){return e.type!==Tg.EVENT&&e.type!==Tg.ACK||!_g(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===Tg.EVENT?Tg.BINARY_EVENT:Tg.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}encodeAsString(e){let t=""+e.type;return e.type!==Tg.BINARY_EVENT&&e.type!==Tg.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=Cg(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}},get PacketType(){return Tg},isPacketValid:function(e){return"string"==typeof e.nsp&&(void 0===(t=e.id)||Mg(t))&&function(e,t){switch(e){case Tg.CONNECT:return void 0===t||Pg(t);case Tg.DISCONNECT:return void 0===t;case Tg.EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===Ng.indexOf(t[0]));case Tg.ACK:return Array.isArray(t);case Tg.CONNECT_ERROR:return"string"==typeof t||Pg(t);default:return!1}}(e.type,e.data);var t},protocol:5},Symbol.toStringTag,{value:"Module"}));function Lg(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Rg=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Dg extends Bm{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=[Lg(e,"open",this.onopen.bind(this)),Lg(e,"packet",this.onpacket.bind(this)),Lg(e,"error",this.onerror.bind(this)),Lg(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(Rg.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:Tg.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:Tg.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 Tg.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 Tg.EVENT:case Tg.BINARY_EVENT:this.onevent(e);break;case Tg.ACK:case Tg.BINARY_ACK:this.onack(e);break;case Tg.DISCONNECT:this.ondisconnect();break;case Tg.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:Tg.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:Tg.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 Ug(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}Ug.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)},Ug.prototype.reset=function(){this.attempts=0},Ug.prototype.setMin=function(e){this.ms=e},Ug.prototype.setMax=function(e){this.max=e},Ug.prototype.setJitter=function(e){this.jitter=e};class Bg extends Bm{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,Zm(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 Ug({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||Fg;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 yg(this.uri,this.opts);const t=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=Lg(t,"open",function(){n.onopen(),e&&e()}),o=t=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",t),e?e(t):this.maybeReconnectOnOpen()},i=Lg(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(Lg(e,"ping",this.onping.bind(this)),Lg(e,"data",this.ondata.bind(this)),Lg(e,"error",this.onerror.bind(this)),Lg(e,"close",this.onclose.bind(this)),Lg(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(xb){this.onclose("parse error",xb)}}ondecoded(e){$m(()=>{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 Dg(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 $g={};function Vg(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=pg(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=$g[o]&&i in $g[o].nsps;let s;return t.forceNew||t["force new connection"]||!1===t.multiplex||a?s=new Bg(r,t):($g[o]||($g[o]=new Bg(r,t)),s=$g[o]),n.query&&!t.query&&(t.query=n.queryKey),s.socket(n.path,t)}Object.assign(Vg,{Manager:Bg,Socket:Dg,io:Vg,connect:Vg});const Hg="chat_device_id";function Wg(){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 qg=function(e,t){const n={type:"object",shape:e??{},...Su(t)};return new tm(n)}({id:Ch().optional(),type:im(["text","image","audio","location","system"]).default("text"),content:Ch().optional(),imageUrl:Ch().url().optional(),audioUrl:Ch().url().optional(),latitude:Zh().optional(),longitude:Zh().optional(),timestamp:Ch().optional(),sender:im(["bot","user","system"]).optional(),emotion:_p(Jh).optional()});function Zg(e){const{apiKey:t,apiBaseUrl:n,pageContext:r,userContext:o}=e,i=k.useRef(e);k.useEffect(()=>{i.current=e},[e]);const a=k.useRef(null),[s,l]=k.useState(!1),[c,u]=k.useState(!1),d=k.useRef(function(){try{const e=localStorage.getItem(Hg);if(e)return e;const t=Wg();return localStorage.setItem(Hg,t),t}catch{return Vt("localStorage not available, using session-only device ID"),Wg()}}()),f=k.useRef(r);k.useEffect(()=>{f.current=r},[r]);const p=k.useCallback(e=>{const t=qg.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=k.useCallback(()=>{if(!t||!n)return;if(a.current?.connected)return;l(!0);const e=Vg(`${n}/webchat`,{auth:{apiKey:t,deviceId:d.current,token:o?.token,metadata:o?.metadata},transports:["websocket","polling"],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(xb){Ht("ChatSocket Error processing bot_message:",xb)}}),e.on("chat_history",e=>{e.messages&&Array.isArray(e.messages)&&e.messages.forEach(e=>{try{i.current.onMessage(p(e))}catch(xb){Wt("Error processing history message:",xb)}}),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=k.useCallback(()=>{a.current&&(a.current.disconnect(),a.current=null,u(!1))},[]),g=k.useRef(h);g.current=h,k.useEffect(()=>(g.current(),()=>{a.current&&(a.current.disconnect(),a.current=null)}),[]);const b=k.useRef([]),y=k.useRef([]),v=k.useCallback(()=>`msg_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,[]),w=k.useCallback(()=>{if(a.current?.connected)for(;b.current.length>0;){const e=b.current.shift();a.current.emit("user_message",e)}},[]);k.useEffect(()=>{c&&w()},[c,w]),k.useEffect(()=>{if(!c)return;const e=setInterval(()=>{const e=Date.now();y.current=y.current.filter(t=>e<t.nextRetryAt||(t.attempts>=t.maxAttempts?(i.current.onEvent?.("message_failed",{id:t.id,payload:t.payload}),Ht("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 x=k.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}):(y.current.push({id:n,payload:o,attempts:0,maxAttempts:3,nextRetryAt:Date.now()+1e3}),i.current.onEvent?.("message_retry_queued",{id:n}))}),n):(b.current.push(o),i.current.onEvent?.("queued_message",{id:n,payload:o}),n)},[v]),S=k.useMemo(()=>fc(e=>{a.current?.emit("typing",e)},250),[]);return{isConnected:c,isConnecting:s,sendMessage:x,sendTyping:S,getSocket:k.useCallback(()=>a.current,[]),requestHistory:k.useCallback(()=>{a.current?.emit("request_history")},[]),reconnect:h,disconnect:m}}function Qg(e=!1){const t="undefined"!=typeof window?window.location.pathname:"",n=k.useMemo(()=>t,[t]),[r,o]=k.useState({});return k.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 Kg{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()}}let Jg=null,Yg=null;function Gg(e){Jg=e}function Xg(e){Yg=e}const eb=k.createContext(null);const tb=e=>new Promise((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>t(r.result),r.onerror=e=>n(e)});function nb(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]=k.useState(0),h=k.useRef(0),{t:m}=P(),g=function(e,t,n=!0){const r=k.useRef(null);return k.useEffect(()=>{if(!n||!e||!t)return;const o=`${e}/analytics`;r.current=new Kg(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:k.useCallback(()=>{r.current?.trackOpen()},[]),trackClose:k.useCallback(()=>{r.current?.trackClose()},[]),trackMessageSent:k.useCallback(e=>{r.current?.trackMessageSent(e)},[]),trackMessageReceived:k.useCallback((e,t)=>{r.current?.trackMessageReceived(e,t)},[]),trackError:k.useCallback((e,t)=>{r.current?.trackError(e,t)},[]),trackConnectionStatus:k.useCallback(e=>{r.current?.trackConnectionStatus(e)},[]),trackFeatureUsed:k.useCallback(e=>{r.current?.trackFeatureUsed(e)},[])}}(n,t,!0),b=function({enabled:e=!0,soundEnabled:t=!0,desktopEnabled:n=!0,botName:r="Asistente",logoUrl:o,notificationSoundUrl:i}={}){const[a,s]=k.useState("default"),l=k.useRef(null),c=o||Zt,u=i||Qt;k.useEffect(()=>{t&&"undefined"!=typeof window&&(l.current=new Audio(u),l.current.volume=.3)},[t,u]),k.useEffect(()=>{"undefined"!=typeof window&&"Notification"in window&&s(Notification.permission)},[]);const d=k.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),qt("Notification permission:",e),"granted"===e}catch(e){return Ht("Error requesting notification permission:",e),!1}},[]),f=k.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){Ht("Error showing notification:",o)}},[e,n,a,r,c]),p=k.useCallback(()=>{if(e&&t&&("undefined"==typeof document||!document.hasFocus()))try{l.current?.play().catch(e=>{Wt("Audio playback blocked:",e)})}catch(n){Ht("Error playing sound:",n)}},[e,t]),h=k.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}),y=function(e=10,t=6e4){const n=k.useRef([]);return{isAllowed:k.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:k.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:k.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:k.useCallback(()=>{n.current=[]},[])}}(10,6e4),{state:v,actions:w}=function(){const[e,t]=k.useReducer(Xc,Gc),[n,r]=k.useState(!1);k.useEffect(()=>{"undefined"==typeof window||n||(async()=>{try{await Jc.migrateFromLocalStorage();const e=await Jc.getMessages(100),n=await Jc.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(xb){Vt("Chat: Error rehydrating from IndexedDB",xb);try{const e=localStorage.getItem(Yc);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){Ht("Chat: Fallback rehydration failed",e)}}finally{r(!0)}})()},[n]),k.useEffect(()=>{if(!n)return;const t=setTimeout(async()=>{try{await Jc.saveMessages(e.messages),await Jc.setMetadata({isOpen:e.isOpen,sessionId:e.sessionId})}catch(xb){Ht("Chat Persistence Error:",xb);try{const t={isOpen:e.isOpen,messages:e.messages,sessionId:e.sessionId};localStorage.setItem(Yc,JSON.stringify(t))}catch(t){Ht("Chat: Fallback persistence failed",t)}}},500);return()=>clearTimeout(t)},[e.isOpen,e.messages,e.sessionId,n]);const o=k.useCallback(e=>{t({type:"ADD_MESSAGE",payload:e})},[]),i=k.useCallback(()=>t({type:"TOGGLE_WINDOW"}),[]),a=k.useCallback(()=>t({type:"OPEN_WINDOW"}),[]),s=k.useCallback(()=>t({type:"CLOSE_WINDOW"}),[]),l=k.useCallback(e=>t({type:"SET_CONNECTED",payload:e}),[]),c=k.useCallback(e=>t({type:"SET_TYPING",payload:e}),[]),u=k.useCallback(e=>t({type:"SET_MESSAGES",payload:e}),[]),d=k.useCallback(e=>t({type:"SET_ERROR",payload:e}),[]),f=k.useCallback(e=>t({type:"SET_SESSION_ID",payload:e}),[]),p=k.useCallback(()=>{localStorage.removeItem(Yc),t({type:"CLEAR_CHAT"})},[]),h=k.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}}}(),x=Qg(o),S=Zg({apiKey:t,apiBaseUrl:n,pageContext:k.useMemo(()=>x?{...r||{},seo:{...x||{}}}:r,[r,x]),userContext:a,onMessage:k.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),b.notifyWithSound(e))},[w,v.isOpen,g,b]),onConnected:k.useCallback((e,t)=>{w.setConnected(!0),w.setSessionId(e),g.trackConnectionStatus(!0),t&&c&&c("backend_config",t)},[w,c,g]),onDisconnected:k.useCallback(()=>{w.setConnected(!1),g.trackConnectionStatus(!1)},[w,g]),onTyping:k.useCallback(e=>w.setTyping(e),[w]),onError:k.useCallback(e=>{w.setError(e),g.trackError(e)},[w,g]),onLogin:s,onNavigate:l,onEvent:c,onThemeUpdate:d}),_=k.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]),C=k.useCallback(e=>{if(!y.isAllowed()){const e=y.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"),S.sendMessage(e,"text")},[w,S,y,g,m]),E=k.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 tb(e);S.sendMessage(r,t)},[w,S]),z=k.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),S.sendMessage(JSON.stringify(e),"location")},[w,S]);k.useEffect(()=>{const e=()=>{v.isOpen||w.openWindow()},t=()=>{v.isOpen&&w.closeWindow()},n=()=>{v.isOpen?w.closeWindow():w.openWindow()},r=e=>{e.detail?.message&&C(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,C]),k.useEffect(()=>(Gg(C),()=>Gg(null)),[C]);const A=k.useCallback(()=>{w.clearMessages(),qt("Chat history cleared")},[w]);k.useEffect(()=>(Xg(A),()=>Xg(null)),[A]);const N=k.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:S.isConnected,getSocket:S.getSocket,handleToggle:_,handleSendText:C,handleSendAttachment:E,handleSendLocation:z}}function rb(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=k.useRef(null),p=pc();!function(e){const[t,n]=k.useState(!1);k.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]=k.useState(),{mergedTheme:g,mergedStyles:b,getContainerStyle:y}=Ec(i,h),{state:v,actions:w,unreadCount:x,currentBotEmotion:S,isConnected:_,handleToggle:C,handleSendText:E,handleSendAttachment:z,handleSendLocation:N,getSocket:T}=nb({apiKey:t,apiBaseUrl:n,pageContext:r,includeSEOMetadata:o,theme:i,userContext:s,onLogin:l,onNavigate:c,onEvent:u,onStateChange:d,onThemeUpdate:m}),j=k.useCallback(e=>{w.addMessage({id:`voice-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,type:"text",sender:e.sender,timestamp:new Date,content:e.content})},[w]),I=k.useCallback(e=>{e.stopPropagation()},[]),O=y(v.isOpen,p,i?.position),M=k.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 A.jsx(Bt,{animations:i?.animations,effects:i?.effects,children:A.jsxs("div",{ref:f,id:"botuyo-chat-widget",className:At("botuyo-chat-widget flex flex-col",!p&&("bottom-left"===i?.position?"items-start":"items-end")),style:{...O,...M,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:[A.jsx("div",{className:At("transition-all duration-400 ease-[cubic-bezier(0.34,1.56,0.64,1)]",p?"bottom-left"===i?.position?"origin-bottom-left":"origin-bottom-right":"origin-bottom",v.isOpen?"opacity-100 scale-100 h-full w-full translate-y-0 pointer-events-auto":"opacity-0 scale-[0.85] pointer-events-none translate-y-8 h-0 w-0"),style:{pointerEvents:v.isOpen?"auto":"none"},onMouseDown:I,onTouchStart:I,children:A.jsx(kc,{children:A.jsx(xc,{isOpen:v.isOpen,isConnected:_,isTyping:v.isTyping,messages:v.messages,onClose:()=>w.closeWindow(),onSendMessage:E,onSendAttachment:z,onSendLocation:N,botName:i?.botName,logoUrl:i?.logoUrl,welcomeMessage:i?.welcomeMessage,inputPlaceholder:i?.inputPlaceholder,primaryColor:i?.primaryColor,position:i?.position,bubbleStyles:b,avatars:i?.avatars,mediaConfig:a,theme:g,getSocket:T,onAddVoiceMessage:j})})}),A.jsx("div",{className:At(v.isOpen?"hidden":"block",!p&&"mt-4"),style:{pointerEvents:"auto"},onMouseDown:I,onTouchStart:I,children:A.jsx(Jt,{isOpen:v.isOpen,onClick:C,unreadCount:x,position:i?.position||"bottom-right",primaryColor:i?.primaryColor,logoUrl:i?.logoUrl,starterPrompt:i?.starterPrompt,avatars:i?.avatars,emotion:S,styles:b,promptPersistence:i?.promptPersistence,avatarScale:i?.avatarScale,showPromptAvatar:i?.showPromptAvatar})})]})})}const ob=Object.freeze(Object.defineProperty({__proto__:null,ChatWidget:rb},Symbol.toStringTag,{value:"Module"}));function ib(){if("undefined"==typeof document)return;if(document.getElementById("botuyo-widget-styles"))return;const e=document.createElement("style");e.id="botuyo-widget-styles",e.textContent='@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-900:oklch(39.6% .141 25.723);--color-amber-500:oklch(76.9% .188 70.08);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-700:oklch(55.4% .135 66.442);--color-yellow-800:oklch(47.6% .114 61.907);--color-yellow-900:oklch(42.1% .095 57.708);--color-green-50:oklch(98.2% .018 155.826);--color-green-200:oklch(92.5% .084 155.995);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-green-900:oklch(39.3% .095 152.535);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-800:oklch(43.2% .095 166.913);--color-emerald-900:oklch(37.8% .077 168.94);--color-emerald-950:oklch(26.2% .051 172.552);--color-teal-500:oklch(70.4% .14 182.503);--color-teal-600:oklch(60% .118 184.704);--color-blue-50:oklch(97% .014 254.604);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-900:oklch(37.9% .146 265.522);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-md:28rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:1.33333;--text-sm:.875rem;--text-sm--line-height:1.42857;--text-base:1rem;--text-base--line-height:1.5;--text-lg:1.125rem;--text-lg--line-height:1.55556;--text-xl:1.25rem;--text-xl--line-height:1.4;--text-2xl:1.5rem;--text-2xl--line-height:1.33333;--text-3xl:1.875rem;--text-3xl--line-height:1.2;--text-4xl:2.25rem;--text-4xl--line-height:1.11111;--text-6xl:3.75rem;--text-6xl--line-height:1;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--shadow-lg:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0,0,.2,1)infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--animate-bounce:bounce 1s infinite;--blur-sm:8px;--blur-md:12px;--blur-2xl:40px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}::file-selector-button{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{border-width:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;white-space:nowrap;width:1px}.absolute,.sr-only{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing)*0)}.-top-1{top:calc(var(--spacing)*-1)}.-top-1\\.5{top:calc(var(--spacing)*-1.5)}.top-0{top:calc(var(--spacing)*0)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.top-3{top:calc(var(--spacing)*3)}.top-4{top:calc(var(--spacing)*4)}.-right-0\\.5{right:calc(var(--spacing)*-.5)}.-right-1{right:calc(var(--spacing)*-1)}.-right-1\\.5{right:calc(var(--spacing)*-1.5)}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-3{right:calc(var(--spacing)*3)}.right-4{right:calc(var(--spacing)*4)}.right-6{right:calc(var(--spacing)*6)}.-bottom-0\\.5{bottom:calc(var(--spacing)*-.5)}.-bottom-1{bottom:calc(var(--spacing)*-1)}.bottom-3{bottom:calc(var(--spacing)*3)}.bottom-4{bottom:calc(var(--spacing)*4)}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing)*0)}.left-1\\/2{left:50%}.left-4{left:calc(var(--spacing)*4)}.left-6{left:calc(var(--spacing)*6)}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\\[60\\]{z-index:60}.z-\\[9999\\]{z-index:9999}.z-\\[100000\\]{z-index:100000}.float-left{float:left}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-1{margin:calc(var(--spacing)*1)}.m-2{margin:calc(var(--spacing)*2)}.m-3{margin:calc(var(--spacing)*3)}.m-4{margin:calc(var(--spacing)*4)}.m-5{margin:calc(var(--spacing)*5)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-2{margin-inline:calc(var(--spacing)*2)}.mx-3{margin-inline:calc(var(--spacing)*3)}.mx-4{margin-inline:calc(var(--spacing)*4)}.mx-5{margin-inline:calc(var(--spacing)*5)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing)*1)}.my-2{margin-block:calc(var(--spacing)*2)}.my-3{margin-block:calc(var(--spacing)*3)}.my-4{margin-block:calc(var(--spacing)*4)}.my-5{margin-block:calc(var(--spacing)*5)}.my-8{margin-block:calc(var(--spacing)*8)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-5{margin-top:calc(var(--spacing)*5)}.mt-6{margin-top:calc(var(--spacing)*6)}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-3{margin-right:calc(var(--spacing)*3)}.mr-4{margin-right:calc(var(--spacing)*4)}.mr-5{margin-right:calc(var(--spacing)*5)}.mr-auto{margin-right:auto}.mb-0{margin-bottom:calc(var(--spacing)*0)}.mb-0\\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.mb-12{margin-bottom:calc(var(--spacing)*12)}.ml-0\\.5{margin-left:calc(var(--spacing)*.5)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-3{margin-left:calc(var(--spacing)*3)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-5{margin-left:calc(var(--spacing)*5)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-0{height:calc(var(--spacing)*0)}.h-1{height:calc(var(--spacing)*1)}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-14{height:calc(var(--spacing)*14)}.h-16{height:calc(var(--spacing)*16)}.h-20{height:calc(var(--spacing)*20)}.h-24{height:calc(var(--spacing)*24)}.h-32{height:calc(var(--spacing)*32)}.h-48{height:calc(var(--spacing)*48)}.h-56{height:calc(var(--spacing)*56)}.h-\\[44px\\]{height:44px}.h-auto{height:auto}.h-full{height:100%}.max-h-\\[90vh\\]{max-height:90vh}.max-h-\\[120px\\]{max-height:120px}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-\\[40px\\]{min-height:40px}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-0{width:calc(var(--spacing)*0)}.w-1{width:calc(var(--spacing)*1)}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-2\\.5{width:calc(var(--spacing)*2.5)}.w-3{width:calc(var(--spacing)*3)}.w-3\\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-14{width:calc(var(--spacing)*14)}.w-16{width:calc(var(--spacing)*16)}.w-20{width:calc(var(--spacing)*20)}.w-24{width:calc(var(--spacing)*24)}.w-\\[3px\\]{width:3px}.w-\\[350px\\]{width:350px}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.max-w-0{max-width:calc(var(--spacing)*0)}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\\[60px\\]{max-width:60px}.max-w-\\[85\\%\\]{max-width:85%}.max-w-\\[90\\%\\]{max-width:90%}.max-w-\\[350px\\]{max-width:350px}.max-w-full{max-width:100%}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[200px\\]{min-width:200px}.min-w-\\[350px\\]{min-width:350px}.flex-1{flex:1}.flex-shrink{flex-shrink:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.origin-bottom{transform-origin:bottom}.origin-bottom-left{transform-origin:0 100%}.origin-bottom-right{transform-origin:100% 100%}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.-translate-x-4{translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-4{--tw-translate-x:calc(var(--spacing)*-4)}.translate-x-0{--tw-translate-x:calc(var(--spacing)*0)}.translate-x-0,.translate-x-4{translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-4{--tw-translate-x:calc(var(--spacing)*4)}.-translate-y-1\\/2{--tw-translate-y:-50%}.-translate-y-1\\/2,.translate-y-0{translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing)*0)}.translate-y-8{--tw-translate-y:calc(var(--spacing)*8);translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-50{--tw-scale-x:50%;--tw-scale-y:50%;--tw-scale-z:50%}.scale-50,.scale-95{scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%}.scale-100,.scale-105{scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-105{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%}.scale-110{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-\\[0\\.85\\]{scale:.85}.-rotate-90{rotate:-90deg}.rotate-0{rotate:none}.rotate-45{rotate:45deg}.rotate-90{rotate:90deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-bounce{animation:var(--animate-bounce)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-wait{cursor:wait}.resize{resize:both}.resize-none{resize:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}.gap-8{gap:calc(var(--spacing)*8)}.gap-\\[2px\\]{gap:2px}.gap-\\[3px\\]{gap:3px}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-end:calc(var(--spacing)*1*(1 - var(--tw-space-y-reverse)));margin-block-start:calc(var(--spacing)*1*var(--tw-space-y-reverse))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-end:calc(var(--spacing)*2*(1 - var(--tw-space-y-reverse)));margin-block-start:calc(var(--spacing)*2*var(--tw-space-y-reverse))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-end:calc(var(--spacing)*3*(1 - var(--tw-space-y-reverse)));margin-block-start:calc(var(--spacing)*3*var(--tw-space-y-reverse))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-end:calc(var(--spacing)*4*(1 - var(--tw-space-y-reverse)));margin-block-start:calc(var(--spacing)*4*var(--tw-space-y-reverse))}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap}.overflow-hidden,.truncate{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.scroll-smooth{scroll-behavior:smooth}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\\[18px\\]{border-radius:18px}.rounded-\\[24px\\]{border-radius:24px}.rounded-\\[28px\\]{border-radius:28px}.rounded-\\[32px\\]{border-radius:32px}.rounded-full{border-radius:3.40282e+38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-none{border-radius:0}.rounded-xl{border-radius:var(--radius-xl)}.rounded-l-\\[4px\\]{border-bottom-left-radius:4px}.rounded-l-\\[4px\\],.rounded-tl-\\[4px\\]{border-top-left-radius:4px}.rounded-r-\\[4px\\]{border-bottom-right-radius:4px}.rounded-r-\\[4px\\],.rounded-tr-\\[4px\\]{border-top-right-radius:4px}.rounded-br-\\[4px\\]{border-bottom-right-radius:4px}.rounded-bl-\\[4px\\]{border-bottom-left-radius:4px}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-\\[hsl\\(210\\,90\\%\\,50\\%\\)\\]{border-color:#0d80f2}.border-blue-200{border-color:var(--color-blue-200)}.border-emerald-200{border-color:var(--color-emerald-200)}.border-gray-200{border-color:var(--color-gray-200)}.border-green-200{border-color:var(--color-green-200)}.border-red-200{border-color:var(--color-red-200)}.border-yellow-200{border-color:var(--color-yellow-200)}.border-yellow-300{border-color:var(--color-yellow-300)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\\/20{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\\/20{background-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}}.bg-black\\/5{background-color:#0000000d}@supports (color:color-mix(in lab,red,red)){.bg-black\\/5{background-color:color-mix(in oklab,var(--color-black)5%,transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-black\\/70{background-color:#000000b3}@supports (color:color-mix(in lab,red,red)){.bg-black\\/70{background-color:color-mix(in oklab,var(--color-black)70%,transparent)}}.bg-black\\/95{background-color:#000000f2}@supports (color:color-mix(in lab,red,red)){.bg-black\\/95{background-color:color-mix(in oklab,var(--color-black)95%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-500\\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/20{background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.bg-blue-600{background-color:var(--color-blue-600)}.bg-current,.bg-current\\/20{background-color:currentColor}@supports (color:color-mix(in lab,red,red)){.bg-current\\/20{background-color:color-mix(in oklab,currentcolor 20%,transparent)}}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\\/10{background-color:color-mix(in oklab,var(--color-emerald-500)10%,transparent)}}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-gray-500\\/20{background-color:#6a728233}@supports (color:color-mix(in lab,red,red)){.bg-gray-500\\/20{background-color:color-mix(in oklab,var(--color-gray-500)20%,transparent)}}.bg-green-50{background-color:var(--color-green-50)}.bg-green-500{background-color:var(--color-green-500)}.bg-green-500\\/10{background-color:#00c7581a}@supports (color:color-mix(in lab,red,red)){.bg-green-500\\/10{background-color:color-mix(in oklab,var(--color-green-500)10%,transparent)}}.bg-green-500\\/20{background-color:#00c75833}@supports (color:color-mix(in lab,red,red)){.bg-green-500\\/20{background-color:color-mix(in oklab,var(--color-green-500)20%,transparent)}}.bg-purple-500{background-color:var(--color-purple-500)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/10{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.bg-red-500\\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/20{background-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.bg-white\\/10{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.bg-white\\/80{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.bg-white\\/80{background-color:color-mix(in oklab,var(--color-white)80%,transparent)}}.bg-yellow-50{background-color:var(--color-yellow-50)}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab}.bg-gradient-to-b,.bg-gradient-to-br{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab}.bg-gradient-to-r{--tw-gradient-position:to right in oklab}.bg-gradient-to-r,.bg-gradient-to-t{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-t{--tw-gradient-position:to top in oklab}.from-black\\/40{--tw-gradient-from:#0006}@supports (color:color-mix(in lab,red,red)){.from-black\\/40{--tw-gradient-from:color-mix(in oklab,var(--color-black)40%,transparent)}}.from-black\\/40{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-black\\/60{--tw-gradient-from:#0009}@supports (color:color-mix(in lab,red,red)){.from-black\\/60{--tw-gradient-from:color-mix(in oklab,var(--color-black)60%,transparent)}}.from-black\\/60{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-blue-50{--tw-gradient-from:var(--color-blue-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-emerald-400{--tw-gradient-from:var(--color-emerald-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-emerald-500{--tw-gradient-from:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.via-transparent{--tw-gradient-via:transparent;--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-black\\/20{--tw-gradient-to:#0003}@supports (color:color-mix(in lab,red,red)){.to-black\\/20{--tw-gradient-to:color-mix(in oklab,var(--color-black)20%,transparent)}}.to-black\\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-green-50{--tw-gradient-to:var(--color-green-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-teal-500{--tw-gradient-to:var(--color-teal-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-teal-600{--tw-gradient-to:var(--color-teal-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.fill-current{fill:currentColor}.stroke-\\[2\\.5\\]{stroke-width:2.5px}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:calc(var(--spacing)*1)}.p-1\\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-10{padding-inline:calc(var(--spacing)*10)}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-5{padding-block:calc(var(--spacing)*5)}.py-12{padding-block:calc(var(--spacing)*12)}.py-16{padding-block:calc(var(--spacing)*16)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-5{padding-top:calc(var(--spacing)*5)}.pr-1{padding-right:calc(var(--spacing)*1)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-3{padding-right:calc(var(--spacing)*3)}.pr-4{padding-right:calc(var(--spacing)*4)}.pr-5{padding-right:calc(var(--spacing)*5)}.pr-8{padding-right:calc(var(--spacing)*8)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pb-5{padding-bottom:calc(var(--spacing)*5)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-2{padding-left:calc(var(--spacing)*2)}.pl-3{padding-left:calc(var(--spacing)*3)}.pl-4{padding-left:calc(var(--spacing)*4)}.pl-5{padding-left:calc(var(--spacing)*5)}.text-center{text-align:center}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[7px\\]{font-size:7px}.text-\\[8px\\]{font-size:8px}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[0\\.1em\\]{--tw-tracking:.1em;letter-spacing:.1em}.tracking-\\[0\\.2em\\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-tighter{--tw-tracking:var(--tracking-tighter);letter-spacing:var(--tracking-tighter)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.text-amber-500{color:var(--color-amber-500)}.text-blue-500{color:var(--color-blue-500)}.text-blue-700{color:var(--color-blue-700)}.text-blue-900{color:var(--color-blue-900)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-900{color:var(--color-emerald-900)}.text-gray-600{color:var(--color-gray-600)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-green-700{color:var(--color-green-700)}.text-green-900{color:var(--color-green-900)}.text-purple-500{color:var(--color-purple-500)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-900{color:var(--color-red-900)}.text-white{color:var(--color-white)}.text-yellow-700{color:var(--color-yellow-700)}.text-yellow-800{color:var(--color-yellow-800)}.text-yellow-900{color:var(--color-yellow-900)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-20{opacity:.2}.opacity-25{opacity:.25}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a)}.shadow,.shadow-inner{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a)}.shadow-lg,.shadow-md{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a)}.ring,.shadow-sm{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-\\[hsl\\(210\\,90\\%\\,50\\%\\)\\]\\/30{--tw-ring-color:oklab(60.6854% -.0507387 -.187037/.3)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px)}.blur,.blur-2xl{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.blur-2xl{--tw-blur:blur(var(--blur-2xl))}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md))}.backdrop-blur-md,.backdrop-blur-sm{-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm))}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-all{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-colors{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-opacity{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-transform{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-400{--tw-duration:.4s;transition-duration:.4s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-700{--tw-duration:.7s;transition-duration:.7s}.duration-1000{--tw-duration:1s;transition-duration:1s}.ease-\\[cubic-bezier\\(0\\.16\\,1\\,0\\.3\\,1\\)\\]{--tw-ease:cubic-bezier(.16,1,.3,1);transition-timing-function:cubic-bezier(.16,1,.3,1)}.ease-\\[cubic-bezier\\(0\\.34\\,1\\.56\\,0\\.64\\,1\\)\\]{--tw-ease:cubic-bezier(.34,1.56,.64,1);transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.\\[animation-delay\\:-0\\.3s\\]{animation-delay:-.3s}.\\[animation-delay\\:-0\\.15s\\]{animation-delay:-.15s}@media(hover:hover){.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.last\\:mb-0:last-child{margin-bottom:calc(var(--spacing)*0)}@media(hover:hover){.hover\\:-translate-y-1:hover{--tw-translate-y:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.hover\\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\\:scale-\\[1\\.02\\]:hover{scale:1.02}.hover\\:rotate-6:hover{rotate:6deg}.hover\\:border-\\[hsl\\(210\\,90\\%\\,70\\%\\)\\]:hover{border-color:#6eb3f7}.hover\\:bg-blue-600:hover{background-color:var(--color-blue-600)}.hover\\:bg-blue-700:hover{background-color:var(--color-blue-700)}.hover\\:bg-emerald-500\\/20:hover{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-emerald-500\\/20:hover{background-color:color-mix(in oklab,var(--color-emerald-500)20%,transparent)}}.hover\\:bg-gray-600:hover{background-color:var(--color-gray-600)}.hover\\:bg-green-600:hover{background-color:var(--color-green-600)}.hover\\:bg-purple-600:hover{background-color:var(--color-purple-600)}.hover\\:bg-red-500\\/30:hover{background-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-red-500\\/30:hover{background-color:color-mix(in oklab,var(--color-red-500)30%,transparent)}}.hover\\:bg-red-600:hover{background-color:var(--color-red-600)}.hover\\:bg-white\\/20:hover{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/20:hover{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-90:hover{opacity:.9}.hover\\:opacity-100:hover{opacity:1}.hover\\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\:underline:focus{text-decoration-line:underline}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-emerald-500:focus{--tw-ring-color:var(--color-emerald-500)}.focus\\:ring-red-500:focus{--tw-ring-color:var(--color-red-500)}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.active\\:scale-90:active{--tw-scale-x:90%;--tw-scale-y:90%;--tw-scale-z:90%;scale:var(--tw-scale-x)var(--tw-scale-y)}.active\\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.disabled\\:opacity-30:disabled{opacity:.3}.disabled\\:opacity-50:disabled{opacity:.5}.disabled\\:grayscale:disabled{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}@media(min-width:40rem){.sm\\:h-8{height:calc(var(--spacing)*8)}.sm\\:h-16{height:calc(var(--spacing)*16)}.sm\\:w-8{width:calc(var(--spacing)*8)}.sm\\:w-16{width:calc(var(--spacing)*16)}.sm\\:w-auto{width:auto}.sm\\:max-w-\\[75\\%\\]{max-width:75%}}@media(prefers-color-scheme:dark){.dark\\:border-emerald-800{border-color:var(--color-emerald-800)}.dark\\:bg-black\\/80{background-color:#000c}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-black\\/80{background-color:color-mix(in oklab,var(--color-black)80%,transparent)}}.dark\\:bg-emerald-950{background-color:var(--color-emerald-950)}.dark\\:bg-white\\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-white\\/10{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.dark\\:text-emerald-50{color:var(--color-emerald-50)}}}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}@media(prefers-contrast:high){:root{--border-width:2px;--focus-ring-width:3px;--focus-ring-color:hsl(var(--primary))}[role=button],[role=dialog],button,input,textarea{border-width:var(--border-width)!important}:focus-visible{outline:var(--focus-ring-width)solid var(--focus-ring-color)!important;outline-offset:2px!important}body{--foreground:0 0% 0%;--background:0 0% 100%;--muted-foreground:0 0% 20%}.dark{--foreground:0 0% 100%;--background:0 0% 0%;--muted-foreground:0 0% 80%}[class*=opacity-],[style*=opacity]{opacity:1!important}}@media(prefers-reduced-motion:reduce){*,:after,:before{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}.animate-pulse,[data-state=closed],[data-state=open]{animation:none!important}.scroll-smooth{scroll-behavior:auto!important}}:focus-visible{border-radius:var(--radius,.5rem);outline:2px solid hsl(var(--primary));outline-offset:2px}[role=button]:focus-visible,button:focus-visible{box-shadow:0 0 0 4px hsl(var(--primary)/.1);outline:2px solid hsl(var(--primary));outline-offset:2px}input:focus-visible,textarea:focus-visible{border-color:hsl(var(--primary));box-shadow:0 0 0 3px hsl(var(--primary)/.1);outline:2px solid hsl(var(--primary));outline-offset:0}body:has(:focus-visible) [tabindex]:not([tabindex="-1"]){position:relative}.skip-link{background:hsl(var(--primary));border-radius:0 0 4px;color:hsl(var(--primary-foreground));left:0;padding:8px;position:absolute;text-decoration:none;top:-40px;z-index:100000}.skip-link:focus{top:0}@media(prefers-color-scheme:dark)and (prefers-contrast:high){:root{--primary:48 96% 89%;--destructive:0 84% 60%;--success:142 76% 36%}}[data-state]:after{content:attr(data-state);clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}@media(min-resolution:192dpi){body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}}[data-tooltip]:focus:after,[data-tooltip]:hover:after{background:hsl(var(--popover));border-radius:4px;bottom:100%;color:hsl(var(--popover-foreground));content:attr(data-tooltip);font-size:12px;left:50%;padding:4px 8px;pointer-events:none;position:absolute;transform:translate(-50%);white-space:nowrap;z-index:1000}[aria-live=assertive],[aria-live=polite]{position:relative}@keyframes live-region-update{0%{opacity:.8}to{opacity:1}}[aria-live]:not([aria-atomic=false]):has(:new){animation:live-region-update .2s ease-in-out}.scrollbar-none{scrollbar-width:none;-ms-overflow-style:none}.scrollbar-none::-webkit-scrollbar{display:none;height:0;width:0}.scrollbar-thin{scrollbar-width:thin}.scrollbar-thin::-webkit-scrollbar{height:4px;width:4px}.scrollbar-thin::-webkit-scrollbar-track{background:0 0}.scrollbar-thin::-webkit-scrollbar-thumb{background:hsl(var(--border));border-radius:2px}.scrollbar-thin::-webkit-scrollbar-thumb:hover{background:hsl(var(--muted-foreground)/.5)}.hidden{display:none!important}.block{display:block!important}.flex{display:flex!important}.inline-flex{display:inline-flex!important}.grid{display:grid!important}.flex-row{flex-direction:row!important}.flex-col{flex-direction:column!important}.flex-1{flex:1!important}.flex-none{flex:none!important}.shrink-0{flex-shrink:0!important}.grow{flex-grow:1!important}.items-center{align-items:center!important}.items-start{align-items:flex-start!important}.items-end{align-items:flex-end!important}.justify-center{justify-content:center!important}.justify-between{justify-content:space-between!important}.justify-end{justify-content:flex-end!important}.relative{position:relative!important}.absolute{position:absolute!important}.fixed{position:fixed!important}.inset-0{inset:0!important}.w-full{width:100%!important}.h-full{height:100%!important}.w-fit{width:-moz-fit-content!important;width:fit-content!important}.w-auto{width:auto!important}.h-auto{height:auto!important}.h-0{height:0!important}.w-0{width:0!important}.h-6{height:1.5rem!important}.w-6{width:1.5rem!important}.h-7{height:1.75rem!important}.w-7{width:1.75rem!important}.h-8{height:2rem!important}.w-8{width:2rem!important}.h-14{height:3.5rem!important}.w-14{width:3.5rem!important}.min-h-0{min-height:0!important}.min-w-0{min-width:0!important}.overflow-hidden{overflow:hidden!important}.overflow-auto{overflow:auto!important}.overflow-y-auto{overflow-y:auto!important}.gap-1{gap:.25rem!important}.gap-2{gap:.5rem!important}.gap-3{gap:.75rem!important}.gap-4{gap:1rem!important}.p-1{padding:.25rem!important}.p-2{padding:.5rem!important}.p-3{padding:.75rem!important}.p-4{padding:1rem!important}.px-4{padding-left:1rem!important;padding-right:1rem!important}.py-2{padding-bottom:.5rem!important;padding-top:.5rem!important}.m-0{margin:0!important}.mt-2{margin-top:.5rem!important}.mt-4{margin-top:1rem!important}.mb-2{margin-bottom:.5rem!important}.ml-auto{margin-left:auto!important}.rounded{border-radius:.25rem!important}.rounded-lg{border-radius:.5rem!important}.rounded-xl{border-radius:.75rem!important}.rounded-2xl{border-radius:1rem!important}.rounded-full{border-radius:9999px!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.font-medium{font-weight:500!important}.font-semibold{font-weight:600!important}.font-bold{font-weight:700!important}.font-black{font-weight:900!important}.uppercase{text-transform:uppercase!important}.truncate{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.text-foreground{color:hsl(var(--foreground))!important}.text-muted-foreground{color:hsl(var(--muted-foreground))!important}.text-primary{color:hsl(var(--primary))!important}.text-primary-foreground{color:hsl(var(--primary-foreground))!important}.text-destructive{color:hsl(var(--destructive))!important}.text-white{color:#fff!important}.bg-background{background-color:hsl(var(--background))!important}.bg-muted{background-color:hsl(var(--muted))!important}.bg-primary{background-color:hsl(var(--primary))!important}.bg-card{background-color:hsl(var(--card))!important}.bg-transparent{background-color:#0000!important}.border{border-width:1px!important}.border-2{border-width:2px!important}.border-b{border-bottom-width:1px!important}.border-t{border-top-width:1px!important}.border-border{border-color:hsl(var(--border))!important}.shadow{box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a!important}.shadow-lg{box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a!important}.shadow-xl{box-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a!important}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.transition,.transition-all{transition-duration:.15s!important}.transition-all{transition-property:all!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.duration-300{transition-duration:.3s!important}.duration-500{transition-duration:.5s!important}.opacity-0{opacity:0!important}.opacity-100{opacity:1!important}.scale-95{transform:scale(.95)!important}.scale-100{transform:scale(1)!important}.translate-y-full{transform:translateY(100%)!important}.z-10{z-index:10!important}.z-20{z-index:20!important}.z-50{z-index:50!important}.pointer-events-none{pointer-events:none!important}.pointer-events-auto{pointer-events:auto!important}.cursor-pointer{cursor:pointer!important}.select-none{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}@keyframes spin{to{transform:rotate(1turn)}}#botuyo-chat-widget,#botuyo-chat-widget-root,:root{--background:0 0% 100%;--foreground:240 10% 3.9%;--card:0 0% 100%;--card-foreground:240 10% 3.9%;--popover:0 0% 100%;--popover-foreground:240 10% 3.9%;--primary:160 84% 39%;--primary-foreground:0 0% 100%;--muted:240 4.8% 95.9%;--muted-foreground:240 3.8% 46.1%;--accent:240 4.8% 95.9%;--accent-foreground:240 5.9% 10%;--destructive:0 84.2% 60.2%;--destructive-foreground:0 0% 98%;--border:240 5.9% 90%;--input:240 5.9% 90%;--ring:160 84% 39%;--radius:.5rem;--spacing1:.25rem;--spacing2:.5rem;--spacing3:.75rem;--spacing4:1rem;--spacing5:.75rem;--spacing6:1.5rem;--spacing8:2rem}#botuyo-chat-widget-root.dark,#botuyo-chat-widget.dark,.dark{--background:240 10% 3.9%;--foreground:0 0% 98%;--card:240 10% 3.9%;--card-foreground:0 0% 98%;--popover:240 10% 3.9%;--popover-foreground:0 0% 98%;--primary:160 84% 39%;--primary-foreground:0 0% 100%;--muted:240 3.7% 15.9%;--muted-foreground:240 5% 64.9%;--accent:240 3.7% 15.9%;--accent-foreground:0 0% 98%;--destructive:0 62.8% 30.6%;--destructive-foreground:0 0% 98%;--border:240 3.7% 15.9%;--input:240 3.7% 15.9%;--ring:160 84% 39%}#botuyo-chat-widget-root,#botuyo-chat-widget-root *{box-sizing:border-box;margin:0;padding:0}#botuyo-chat-widget-root{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:hsl(var(--foreground));font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;line-height:1.5}@keyframes slideInRight{0%{opacity:0;transform:translate(100%)}to{opacity:1;transform:translate(0)}}@keyframes slideOutRight{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(100%)}}@keyframes slideInUp{0%{opacity:0;transform:translateY(100%)}to{opacity:1;transform:translateY(0)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}#botuyo-chat-widget-root .chat-launcher{align-items:center;background-color:hsl(var(--primary));border-radius:50%;bottom:1.5rem;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;color:#fff;cursor:pointer;display:flex;height:60px;justify-content:center;position:fixed;right:1.5rem;transition:all .2s;width:60px;z-index:999999}#botuyo-chat-widget-root .chat-launcher:hover{box-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;transform:scale(1.05)}#botuyo-chat-widget-root .chat-launcher.position-bottom-left{left:1.5rem;right:auto}#botuyo-chat-widget-root .chat-launcher.position-top-right{bottom:auto;top:1.5rem}#botuyo-chat-widget-root .chat-launcher.position-top-left{inset:1.5rem auto auto 1.5rem}#botuyo-chat-widget-root .chat-window{animation:slideInRight .3s ease-out;background-color:hsl(var(--background));border-radius:1rem;bottom:6rem;box-shadow:0 25px 50px -12px #00000040;display:flex;flex-direction:column;height:600px;max-height:calc(100vh - 8rem);overflow:hidden;position:fixed;right:1.5rem;width:400px;z-index:999999}#botuyo-chat-widget-root .chat-window.closing{animation:slideOutRight .2s ease-in}@media(max-width:640px){#botuyo-chat-widget-root .chat-window{animation:slideInUp .3s ease-out;border-radius:0;height:100%;inset:0;max-height:100vh;width:100%}}#botuyo-chat-widget-root .message-bubble{word-wrap:break-word;border-radius:1rem;max-width:80%;padding:.75rem 1rem}#botuyo-chat-widget-root .message-bubble.user{background-color:hsl(var(--primary));color:hsl(var(--primary-foreground));margin-left:auto}#botuyo-chat-widget-root .message-bubble.bot{background-color:hsl(var(--muted));color:hsl(var(--foreground))}#botuyo-chat-widget-root .chat-messages::-webkit-scrollbar{width:6px}#botuyo-chat-widget-root .chat-messages::-webkit-scrollbar-track{background:0 0}#botuyo-chat-widget-root .chat-messages::-webkit-scrollbar-thumb{background:hsl(var(--muted));border-radius:3px}#botuyo-chat-widget-root .chat-messages::-webkit-scrollbar-thumb:hover{background:hsl(var(--muted-foreground))}#botuyo-chat-widget-root .chat-input{background-color:hsl(var(--background));border:1px solid hsl(var(--border));border-radius:.5rem;color:hsl(var(--foreground));outline:none;padding:.75rem;transition:border-color .2s;width:100%}#botuyo-chat-widget-root .chat-input:focus{border-color:hsl(var(--primary));box-shadow:0 0 0 3px hsl(var(--primary)/.1)}@media(max-width:640px){#botuyo-chat-widget-root .chat-launcher{bottom:1rem;height:56px;right:1rem;width:56px}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}',document.head.appendChild(e)}ib();const ab=k.lazy(()=>Promise.resolve().then(()=>ob).then(e=>({default:e.ChatWidget})));class sb{root=null;container=null;config=null;init(e){return ib(),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=x.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,mediaConfig:this.config.mediaConfig,onNavigate:this.config.onNavigate,onLogin:this.config.onLogin,onEvent:this.config.onEvent,onStateChange:this.config.onStateChange,onVoiceCall:this.config.onVoiceCall},t=S.createElement(k.Suspense,{fallback:S.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"}},S.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"}}))},S.createElement(ab,e));this.root.render(S.createElement(O,{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 lb=new sb;window.BotUyoChat=lb;const cb=k.memo(function({url:e,isBot:t,primaryColor:n}){const[r,o]=k.useState(!1),[i,a]=k.useState(0),[s,l]=k.useState(0),[c,u]=k.useState(!0),[d,f]=k.useState(null),p=k.useRef(null),h=k.useMemo(()=>Ft({primaryColor:n}),[n]),m=k.useCallback(()=>{d||(r?p.current?.pause():p.current?.play().catch(e=>{console.error("[AudioPlayer] Play error:",e),f("Error al reproducir")}),o(!r))},[r,d]),g=k.useCallback(()=>{a(p.current?.duration||0)},[]),b=k.useCallback(()=>{u(!1),f(null)},[]),y=k.useCallback(()=>{console.error("[AudioPlayer] Failed to load audio:",e),u(!1),f("No se pudo cargar")},[e]),v=k.useCallback(()=>{u(!0),f(null),p.current&&p.current.load()},[]);return A.jsxs("div",{className:At("flex items-center gap-3 py-1 min-w-[200px]",t?"text-foreground":"text-primary-foreground"),children:[A.jsx("audio",{ref:p,src:e,preload:"metadata",onLoadedMetadata:g,onCanPlayThrough:b,onTimeUpdate:()=>l(p.current?.currentTime||0),onEnded:()=>o(!1),onError:y}),d?A.jsx("button",{onClick:v,className:"w-8 h-8 rounded-full flex items-center justify-center shrink-0 bg-red-500/20 text-red-500 hover:bg-red-500/30 transition-colors",title:"Reintentar",children:A.jsx(ae,{className:"w-4 h-4"})}):A.jsx("button",{onClick:m,disabled:c,className:"w-8 h-8 rounded-full flex items-center justify-center shrink-0 transition-opacity",style:{backgroundColor:t?h:"hsl(var(--card))",color:t?"white":h,opacity:c?.6:1},children:c?A.jsx(J,{className:"w-4 h-4 animate-spin"}):r?A.jsx(te,{className:"w-4 h-4 fill-current"}):A.jsx(oe,{className:"w-4 h-4 fill-current ml-0.5"})}),A.jsx("div",{className:"flex-1 space-y-1",children:d?A.jsxs("div",{className:"flex items-center gap-1.5 text-red-500",children:[A.jsx(H,{className:"w-3 h-3"}),A.jsx("span",{className:"text-[9px] font-bold",children:d})]}):A.jsxs(A.Fragment,{children:[A.jsx("div",{className:"relative h-1 w-full bg-current/20 rounded-full overflow-hidden",children:A.jsx("div",{className:"absolute h-full bg-current rounded-full transition-all",style:{width:`${s/i*100||0}%`}})}),A.jsxs("div",{className:"flex justify-between text-[9px] font-bold opacity-60",children:[A.jsxs("span",{children:[Math.floor(s/60),":",Math.floor(s%60).toString().padStart(2,"0")]}),A.jsx("span",{children:c?"--:--":`${Math.floor(i/60)}:${Math.floor(i%60).toString().padStart(2,"0")}`})]})]})})]})}),ub=Object.freeze(Object.defineProperty({__proto__:null,AudioPlayer:cb},Symbol.toStringTag,{value:"Module"})),db=k.memo(function({images:e,radius:t="rounded-lg"}){const{t:n}=P("extracted"),[r,o]=k.useState(0),[i,a]=k.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]=k.useState(new Set),f=e=>{d(t=>new Set(t).add(e))};return 1===e.length?A.jsx("div",{className:"my-3 relative group",children:u.has(0)?A.jsxs("div",{className:At("w-full h-48 flex flex-col items-center justify-center","border bg-muted text-muted-foreground",t),style:{borderColor:"hsl(var(--border))"},children:[A.jsx("svg",{className:"w-12 h-12 mb-2 opacity-50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.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"})}),A.jsx("span",{className:"text-sm",children:"Imagen no disponible"})]}):A.jsxs(A.Fragment,{children:[A.jsx("img",{src:e[0].src,alt:e[0].alt||"Imagen",className:At("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)}),A.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:A.jsx(fe,{size:16,className:"text-white"})})]})}):e.length<=3?A.jsxs("div",{className:At("my-3 grid gap-2",2===e.length?"grid-cols-2":"grid-cols-3"),children:[e.map((n,r)=>A.jsx("div",{className:"relative group overflow-hidden",children:u.has(r)?A.jsx("div",{className:At("w-full h-32 flex flex-col items-center justify-center","border bg-muted text-muted-foreground",t),children:A.jsx("svg",{className:"w-8 h-8 opacity-50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.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"})})}):A.jsxs(A.Fragment,{children:[A.jsx("img",{src:n.src,alt:n.alt||`Imagen ${r+1}`,className:At("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)}),A.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:A.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&&A.jsx(fb,{images:e,currentIndex:r,onClose:()=>a(!1),onNext:s,onPrev:l})]}):A.jsxs("div",{className:"my-3 space-y-2",children:[A.jsx("div",{className:"relative group",children:u.has(r)?A.jsxs("div",{className:At("w-full h-56 flex flex-col items-center justify-center","border bg-muted text-muted-foreground",t),style:{borderColor:"hsl(var(--border))"},children:[A.jsx("svg",{className:"w-12 h-12 mb-2 opacity-50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.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"})}),A.jsx("span",{className:"text-sm",children:"Imagen no disponible"})]}):A.jsxs(A.Fragment,{children:[A.jsx("img",{src:e[r].src,alt:e[r].alt||`Imagen ${r+1}`,className:At("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)}),A.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:[A.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:A.jsx($,{size:20})}),A.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:A.jsx(V,{size:20})})]}),A.jsx("div",{className:"absolute top-3 right-3 bg-black/70 backdrop-blur-sm px-3 py-1 rounded-full",children:A.jsxs("span",{className:"text-white text-xs font-bold",children:[r+1," / ",e.length]})}),A.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:A.jsx(fe,{size:16,className:"text-white"})})]})}),A.jsx("div",{className:"flex gap-2 overflow-x-auto pb-2 scrollbar-thin scrollbar-thumb-border scrollbar-track-transparent",children:e.map((e,n)=>A.jsx("button",{onClick:()=>o(n),className:At("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)?A.jsx("div",{className:"w-full h-full flex items-center justify-center bg-muted",children:A.jsx("svg",{className:"w-6 h-6 opacity-50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A.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"})})}):A.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&&A.jsx(fb,{images:e,currentIndex:r,onClose:()=>a(!1),onNext:s,onPrev:l})]})});function fb({images:e,currentIndex:t,onClose:n,onNext:r,onPrev:o}){const{t:i}=P("extracted");return A.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:[A.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:A.jsx(de,{size:24,className:"text-white"})}),A.jsx("div",{className:"absolute top-4 left-4 bg-white/10 backdrop-blur-sm px-4 py-2 rounded-full z-10",children:A.jsxs("span",{className:"text-white text-sm font-bold",children:[t+1," / ",e.length]})}),e.length>1&&A.jsxs(A.Fragment,{children:[A.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:A.jsx($,{size:32,className:"text-white"})}),A.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:A.jsx(V,{size:32,className:"text-white"})})]}),A.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 pb=Object.freeze(Object.defineProperty({__proto__:null,Gallery:db},Symbol.toStringTag,{value:"Module"}));function hb(e,t){return new Promise(function(n,r){let o;return mb(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 mb=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 gb,bb,yb,vb={},wb={get exports(){return vb},set exports(e){vb=e}};yb={},wb.exports=yb,yb.parse=function(e,t){for(var n=yb.bin.readUshort,r=yb.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,yb._readLocal(a,g,i,c,f,t)}return i},yb._readLocal=function(e,t,n,r,o,i){var a=yb.bin.readUshort,s=yb.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=yb.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);yb.inflateRaw(f,p),n[d]=p}}},yb.inflateRaw=function(e,t){return yb.F.inflate(e,t)},yb.inflate=function(e,t){return e[0],e[1],yb.inflateRaw(new Uint8Array(e.buffer,e.byteOffset+2,e.length-6),t)},yb.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=yb.F.deflateRaw(e,r,n,t.level);var o=yb.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)},yb.deflateRaw=function(e,t){null==t&&(t={level:6});var n=new Uint8Array(50+Math.floor(1.1*e.length)),r=yb.F.deflateRaw(e,n,r,t.level);return new Uint8Array(n.buffer,0,r)},yb.encode=function(e,t){null==t&&(t=!1);var n=0,r=yb.bin.writeUint,o=yb.bin.writeUshort,i={};for(var a in e){var s=!yb._noNeed(a)&&!t,l=e[a],c=yb.crc.crc(l,0,l.length);i[a]={cpr:s,usize:l.length,crc:c,file:s?yb.deflateRaw(l):l}}for(var a in i)n+=i[a].file.length+30+46+2*yb.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=yb._writeHeader(u,d,a,p,0)}var h=0,m=d;for(var a in i)p=i[a],f.push(d),d=yb._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},yb._noNeed=function(e){var t=e.split(".").pop().toLowerCase();return-1!="png,jpg,jpeg,zip".indexOf(t)},yb._writeHeader=function(e,t,n,r,o,i){var a=yb.bin.writeUint,s=yb.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,yb.bin.sizeUTF8(n)),s(e,t+=2,0),t+=2,1==o&&(t+=2,t+=2,a(e,t+=6,i),t+=4),t+=yb.bin.writeUTF8(e,t,n),0==o&&(e.set(l,t),t+=l.length),t},yb.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=yb.crc.table[255&(e^t[n+o])]^e>>>8;return e},crc:function(e,t,n){return 4294967295^yb.crc.update(4294967295,e,t,n)}},yb.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},yb.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+="%"+yb.bin.pad(e[t+i].toString(16));try{r=decodeURIComponent(o)}catch(a){return yb.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}},yb.F={},yb.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=yb.F.U,a=yb.F._goodIndex;yb.F._hash;var s=yb.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=yb.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,b=0,y=0,v=0,w=0;for(d>2&&(p[w=yb.F._hash(e,0)]=0),l=0;l<d;l++){if(v=w,l+1<d-2){w=yb.F._hash(e,l+1);var x=l+1&32767;h[x]=p[w],p[w]=x}if(u<=l){(m>14e3||g>26697)&&d-l>100&&(u<l&&(f[m]=l-u,m+=2,u=l),c=yb.F._writeBlock(l==d-1||u==d?1:0,f,m,y,e,b,l-b,t,c),m=g=y=0,b=l);var k=0;l<d-2&&(k=yb.F._bestMatch(e,l,h,v,Math.min(o[2],d-l),o[3]));var S=k>>>16,_=65535&k;if(0!=k){_=65535&k;var C=a(S=k>>>16,i.of0);i.lhst[257+C]++;var E=a(_,i.df0);i.dhst[E]++,y+=i.exb[C]+i.dxb[E],f[m]=S<<23|l-u,f[m+1]=_<<16|C<<8|E,m+=2,u=l+S}else i.lhst[e[l]]++;g++}}for(b==l&&0!=e.length||(u<l&&(f[m]=l-u,m+=2,u=l),c=yb.F._writeBlock(1,f,m,y,e,b,l-b,t,c),m=0,g=0,m=g=y=0,b=l);7&c;)c++;return c>>>3},yb.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!=yb.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=yb.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},yb.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},yb.F._hash=function(e,t){return(e[t]<<8|e[t+1])+(e[t+2]<<4)&65535},yb.saved=0,yb.F._writeBlock=function(e,t,n,r,o,i,a,s,l){var c,u,d,f,p,h,m,g,b,y=yb.F.U,v=yb.F._putsF,w=yb.F._putsE;y.lhst[256]++,u=(c=yb.F.getTrees())[0],d=c[1],f=c[2],p=c[3],h=c[4],m=c[5],g=c[6],b=c[7];var x=32+(l+3&7?8-(l+3&7):0)+(a<<3),k=r+yb.F.contSize(y.fltree,y.lhst)+yb.F.contSize(y.fdtree,y.dhst),S=r+yb.F.contSize(y.ltree,y.lhst)+yb.F.contSize(y.dtree,y.dhst);S+=14+3*m+yb.F.contSize(y.itree,y.ihst)+(2*y.ihst[16]+3*y.ihst[17]+7*y.ihst[18]);for(var _=0;_<286;_++)y.lhst[_]=0;for(_=0;_<30;_++)y.dhst[_]=0;for(_=0;_<19;_++)y.ihst[_]=0;var C=x<k&&x<S?0:k<S?1:2;if(v(s,l,e),v(s,l+1,C),l+=3,0==C){for(;7&l;)l++;l=yb.F._copyExact(o,i,a,s,l)}else{var E,z;if(1==C&&(E=y.fltree,z=y.fdtree),2==C){yb.F.makeCodes(y.ltree,u),yb.F.revCodes(y.ltree,u),yb.F.makeCodes(y.dtree,d),yb.F.revCodes(y.dtree,d),yb.F.makeCodes(y.itree,f),yb.F.revCodes(y.itree,f),E=y.ltree,z=y.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,y.itree[1+(y.ordr[A]<<1)]);l+=3*m,l=yb.F._codeTiny(g,y.itree,s,l),l=yb.F._codeTiny(b,y.itree,s,l)}for(var N=i,T=0;T<n;T+=2){for(var j=t[T],I=j>>>23,O=N+(8388607&j);N<O;)l=yb.F._writeLit(o[N++],E,s,l);if(0!=I){var M=t[T+1],P=M>>16,F=M>>8&255,L=255&M;w(s,l=yb.F._writeLit(257+F,E,s,l),I-y.of0[F]),l+=y.exb[F],v(s,l=yb.F._writeLit(L,z,s,l),P-y.df0[L]),l+=y.dxb[L],N+=I}}l=yb.F._writeLit(256,E,s,l)}return l},yb.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)},yb.F.getTrees=function(){for(var e=yb.F.U,t=yb.F._hufTree(e.lhst,e.ltree,15),n=yb.F._hufTree(e.dhst,e.dtree,15),r=[],o=yb.F._lenCodes(e.ltree,r),i=[],a=yb.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=yb.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]},yb.F.getSecond=function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(e[n+1]);return t},yb.F.nonZero=function(e){for(var t="",n=0;n<e.length;n+=2)0!=e[n+1]&&(t+=(n>>1)+",");return t},yb.F.contSize=function(e,t){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[1+(r<<1)];return n},yb.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=yb.F._writeLit(i,t,n,r);var s=16==i?2:17==i?3:7;i>15&&(yb.F._putsE(n,r,a,s),r+=s)}return r},yb.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},yb.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=yb.F.setDepth(r[p-1],0);for(m>n&&(yb.F.restrictDepth(l,n,m),m=n),a=0;a<s;a++)t[1+(l[a].lit<<1)]=l[a].d;return m},yb.F.setDepth=function(e,t){return-1!=e.lit?(e.d=t,t):Math.max(yb.F.setDepth(e.l,t+1),yb.F.setDepth(e.r,t+1))},yb.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")},yb.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},yb.F._writeLit=function(e,t,n,r){return yb.F._putsF(n,r,t[e<<1]),r+t[1+(e<<1)]},yb.F.inflate=function(e,t){var n=Uint8Array;if(3==e[0]&&0==e[1])return t||new n(0);var r=yb.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,b=0,y=0,v=0,w=0,x=0,k=0;0==h;)if(h=o(e,k,1),m=o(e,k+1,2),k+=3,0!=m){if(d&&(t=yb.F._check(t,x+(1<<17))),1==m&&(f=u.flmap,p=u.fdmap,v=511,w=31),2==m){g=i(e,k,5)+257,b=i(e,k+5,5)+1,y=i(e,k+10,4)+4,k+=14;for(var S=0;S<38;S+=2)u.itree[S]=0,u.itree[S+1]=0;var _=1;for(S=0;S<y;S++){var C=i(e,k+3*S,3);u.itree[1+(u.ordr[S]<<1)]=C,C>_&&(_=C)}k+=3*y,s(u.itree,_),l(u.itree,_,u.imap),f=u.lmap,p=u.dmap,k=a(u.imap,(1<<_)-1,g+b,e,k,u.ttree);var E=r._copyOut(u.ttree,0,g,u.ltree);v=(1<<E)-1;var z=r._copyOut(u.ttree,g,b,u.dtree);w=(1<<z)-1,s(u.ltree,E),l(u.ltree,E,f),s(u.dtree,z),l(u.dtree,z,p)}for(;;){var A=f[c(e,k)&v];k+=15&A;var N=A>>>4;if(N>>>8==0)t[x++]=N;else{if(256==N)break;var T=x+N-254;if(N>264){var j=u.ldef[N-257];T=x+(j>>>3)+i(e,k,7&j),k+=7&j}var I=p[c(e,k)&w];k+=15&I;var O=I>>>4,M=u.ddef[O],P=(M>>>4)+o(e,k,15&M);for(k+=15&M,d&&(t=yb.F._check(t,x+(1<<17)));x<T;)t[x]=t[x++-P],t[x]=t[x++-P],t[x]=t[x++-P],t[x]=t[x++-P];x=T}}}else{7&k&&(k+=8-(7&k));var F=4+(k>>>3),L=e[F-4]|e[F-3]<<8;d&&(t=yb.F._check(t,x+L)),t.set(new n(e.buffer,e.byteOffset+F,L),x),k=F+L<<3,x+=L}return t.length==x?t:t.slice(0,x)},yb.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},yb.F._decodeTiny=function(e,t,n,r,o,i){for(var a=yb.F._bitsE,s=yb.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},yb.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},yb.F.makeCodes=function(e,t){for(var n,r,o,i,a=yb.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]++)},yb.F.codes2map=function(e,t,n){for(var r=e.length,o=yb.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++},yb.F.revCodes=function(e,t){for(var n=yb.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}},yb.F._putsE=function(e,t,n){n<<=7&t;var r=t>>>3;e[r]|=n,e[r+1]|=n>>>8},yb.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},yb.F._bitsE=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<n)-1},yb.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},yb.F._get17=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},yb.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)},yb.F.U=(gb=Uint16Array,bb=Uint32Array,{next_code:new gb(16),bl_count:new gb(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 gb(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 bb(32),flmap:new gb(512),fltree:[],fdmap:new gb(32),fdtree:[],lmap:new gb(32768),ltree:[],ttree:[],dmap:new gb(32768),dtree:[],imap:new gb(512),itree:[],rev15:new gb(32768),lhst:new bb(286),dhst:new bb(30),ihst:new bb(19),lits:new bb(15e3),strt:new gb(65536),prev:new gb(32768)}),function(){for(var e=yb.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),yb.F.makeCodes(e.fltree,9),yb.F.codes2map(e.fltree,9,e.flmap),yb.F.revCodes(e.fltree,9),r(e.fdtree,32,5),yb.F.makeCodes(e.fdtree,5),yb.F.codes2map(e.fdtree,5,e.fdmap),yb.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 xb,kb=(xb={__proto__:null,default:vb},[vb].forEach(function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach(function(t){if("default"!==t&&!(t in xb)){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(xb,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}})}),Object.freeze(xb));const Sb=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 b=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[b+3]=0)}if(16==f)for(h=0;h<a;h++)b=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[b+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 y=0;y<r;y++){var v=y*l,w=y*n;for(h=0;h<n;h++){b=w+h<<2;var x=3*(k=t[v+(h>>3)]>>7-(7&h)&1);c[b]=e[x],c[b+1]=e[x+1],c[b+2]=e[x+2],c[b+3]=k<s?i[k]:255}}if(2==f)for(y=0;y<r;y++)for(v=y*l,w=y*n,h=0;h<n;h++)b=w+h<<2,x=3*(k=t[v+(h>>2)]>>6-((3&h)<<1)&3),c[b]=e[x],c[b+1]=e[x+1],c[b+2]=e[x+2],c[b+3]=k<s?i[k]:255;if(4==f)for(y=0;y<r;y++)for(v=y*l,w=y*n,h=0;h<n;h++)b=w+h<<2,x=3*(k=t[v+(h>>1)]>>4-((1&h)<<2)&15),c[b]=e[x],c[b+1]=e[x+1],c[b+2]=e[x+2],c[b+3]=k<s?i[k]:255;if(8==f)for(h=0;h<a;h++){var k;b=h<<2,x=3*(k=t[h]),c[b]=e[x],c[b+1]=e[x+1],c[b+2]=e[x+2],c[b+3]=k<s?i[k]:255}}else if(4==d){if(8==f)for(h=0;h<a;h++){b=h<<2;var S=t[_=h<<1];c[b]=S,c[b+1]=S,c[b+2]=S,c[b+3]=t[_+1]}if(16==f)for(h=0;h<a;h++){var _;b=h<<2,S=t[_=h<<2],c[b]=S,c[b+1]=S,c[b+2]=S,c[b+3]=t[_+2]}}else if(0==d)for(g=o.tabs.tRNS?o.tabs.tRNS:-1,y=0;y<r;y++){const e=y*l,r=y*n;if(1==f)for(var C=0;C<n;C++){var E=(S=255*(t[e+(C>>>3)]>>>7-(7&C)&1))==255*g?0:255;u[r+C]=E<<24|S<<16|S<<8|S}else if(2==f)for(C=0;C<n;C++)E=(S=85*(t[e+(C>>>2)]>>>6-((3&C)<<1)&3))==85*g?0:255,u[r+C]=E<<24|S<<16|S<<8|S;else if(4==f)for(C=0;C<n;C++)E=(S=17*(t[e+(C>>>1)]>>>4-((1&C)<<2)&15))==17*g?0:255,u[r+C]=E<<24|S<<16|S<<8|S;else if(8==f)for(C=0;C<n;C++)E=(S=t[e+C])==g?0:255,u[r+C]=E<<24|S<<16|S<<8|S;else if(16==f)for(C=0;C<n;C++)S=t[e+(C<<1)],E=p(t,e+(C<<1))==g?0:255,u[r+C]=E<<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],b=h[m];let y=0,v=0,w=d[m];for(;w<r;)w+=i,v++;let x=f[m];for(;x<n;)x+=b,y++;const k=Math.ceil(y*o/8);a(e,t,u,y,v);let S=0,_=d[m];for(;_<r;){let t=f[m],r=u+S*k<<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+=b}S++,_+=i}y*v!=0&&(u+=v*(1+k)),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,b=m.e,y=m.R,v=m.n,w=m.A,x=m.Z,k=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=k.J,i=k.h,d=511,f=31),2==s){l=b(t,h,5)+257,c=b(t,h+5,5)+1,u=b(t,h+10,4)+4,h+=14;let e=1;for(var _=0;_<38;_+=2)k.Q[_]=0,k.Q[_+1]=0;for(_=0;_<u;_++){const n=b(t,h+3*_,3);k.Q[1+(k.X[_]<<1)]=n,n>e&&(e=n)}h+=3*u,v(k.Q,e),w(k.Q,e,k.u),o=k.w,i=k.d,h=y(k.u,(1<<e)-1,l+c,t,h,k.v);const n=m.V(k.v,0,l,k.C);d=(1<<n)-1;const r=m.V(k.v,l,c,k.D);f=(1<<r)-1,v(k.C,n),w(k.C,n,o),v(k.D,r),w(k.D,r,i)}for(;;){const e=o[x(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=k.q[r-257];e=p+(n>>>3)+b(t,h,7&n),h+=7&n}const o=i[x(t,h)&f];h+=15&o;const a=o>>>4,s=k.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 x=0;x<u;x++)for(let n=0;n<c;n++)if(a>=0&&s>=0?(d=x*t+n<<2,f=(s+x)*o+a+n<<2):(d=(-s+x)*t-a+n<<2,f=x*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,b=r[f+3]*(1/255),y=r[f]*b,v=r[f+1]*b,w=r[f+2]*b;const t=1-p,n=p+b*t,o=0==n?0:1/n;r[f+3]=255*n,r[f+0]=(h+y*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],b=r[f+3],y=r[f],v=r[f+1],w=r[f+2],p==b&&h==y&&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],b=r[f+3],y=r[f],v=r[f+1],w=r[f+2],p==b&&h==y&&m==v&&g==w)continue;if(p<220&&b>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 b=0;b<8;b++)if(i[b]!=g[b])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 y=a;0!=i[y];)y++;s.readASCII(i,a,y-a),i[y+1];const n=i.slice(y+2,a+e);let l=null;try{l=r(n)}catch(C){l=o(n)}d.tabs[t]=l}else if("CgBI"==t)d.tabs[t]=i.slice(a,a+4);else if("IDAT"==t){for(b=0;b<e;b++)f[h+b]=i[a+b];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(b=0;b<e-4;b++)p[m+b]=i[a+b+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]=[],b=0;b<8;b++)d.tabs[t].push(s.readUint(i,a+4*b));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),x=a+e-v-1;if("tEXt"==t)S=s.readASCII(i,v+1,x);else{var k=r(i.slice(v+2,v+2+x));S=s.readUTF8(k,0,k.length)}d.tabs[t][w]=S}else if("iTXt"==t){null==d.tabs[t]&&(d.tabs[t]={}),v=0,y=a,v=s.nextZero(i,y),w=s.readASCII(i,y,v-y);const n=i[y=v+1];var S;i[y+1],y+=2,v=s.nextZero(i,y),s.readASCII(i,y,v-y),y=v+1,v=s.nextZero(i,y),s.readUTF8(i,y,v-y),x=e-((y=v+1)-a),0==n?S=s.readUTF8(i,y,x):(k=r(i.slice(y,y+x)),S=s.readUTF8(k,0,k.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]=[],b=0;b<e;b++)d.tabs[t].push(c(i,a+2*b))}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,b=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(b,m,g,a,n,r,p,h,0):1==f.blend&&c(b,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}=Sb,{_bin:t}=Sb,n=Sb._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),b=new Int16Array(t*n*4),y=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(f=0;f<y.length;f++)y[f]=255*((y[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]+b[f]),i(e[f+1]+b[f+1]),i(e[f+2]+b[f+2]),i(e[f+3]+b[f+3])]:(m=y[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 x=16777215;for(h=0;h<u;h++){const e=a(v,d[h]);e<x&&(x=e,p=h)}const k=d[p],S=[v[0]-k[0],v[1]-k[1],v[2]-k[2],v[3]-k[3]];1==c&&(s!=t-1&&o(S,b,f+4,7),w!=n-1&&(0!=s&&o(S,b,f+4*t-4,3),o(S,b,f+4*t,5),s!=t-1&&o(S,b,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,b=0;b<g;b++)e.plte[b]>>>24!=255&&(h=!0);m+=8+3*g+4+(h?8+1*g+4:0)}for(var y=0;y<e.frames.length;y++)f&&(m+=38),m+=(k=e.frames[y]).cimg.length+12,0!=y&&(m+=4);m+=12;const v=new Uint8Array(m),w=[137,80,78,71,13,10,26,10];for(b=0;b<8;b++)v[b]=w[b];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,b=0;b<g;b++){const t=3*b,n=e.plte[b],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,b=0;b<g;b++)v[d+b]=e.plte[b]>>>24&255;d+=g,l(v,d,s(v,d-g-4,g+4)),d+=4}}let x=0;for(y=0;y<e.frames.length;y++){var k=e.frames[y];f&&(l(v,d,26),d+=4,u(v,d,"fcTL"),d+=4,l(v,d,x++),d+=4,l(v,d,k.rect.width),d+=4,l(v,d,k.rect.height),d+=4,l(v,d,k.rect.x),d+=4,l(v,d,k.rect.y),d+=4,c(v,d,i[y]),d+=2,c(v,d,1e3),d+=2,v[d]=k.dispose,d++,v[d]=k.blend,d++,l(v,d,s(v,d-30,30)),d+=4);const t=k.cimg;l(v,d,(g=t.length)+(0==y?0:4)),d+=4;const n=d;u(v,d,0==y?"IDAT":"fdAT"),d+=4,0!=y&&(l(v,d,x++),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,b=8,y=255;for(var v=0;v<t.length;v++){const e=new Uint8Array(t[v]);for(var w=e.length,x=0;x<w;x+=4)y&=e[x+3]}const k=255!=y,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,b=n,y=r,v=o?1:0;if(0!=l){const w=a||o||1==l||0!=s[l-2].dispose?1:2;let x=0,k=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<k&&(k=f,x=e,m=a,g=s,b=c-a+1,y=d-s+1)}u=new Uint8Array(t[l-1-x]),1==x&&(s[l-1].dispose=2),c=new Uint8Array(b*y*4),e(u,n,r,c,b,y,-m,-g,0),v=e(d,n,r,c,b,y,-m,-g,3)?1:0,1==v?f(d,n,r,c,{x:m,y:g,width:b,height:y}):e(d,n,r,c,b,y,-m,-g,0)}else c=d.slice(0);s.push({rect:{x:m,y:g,width:b,height:y},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),_={},C=[],E=[];if(0!=o){const e=[];for(x=0;x<S.length;x++)e.push(S[x].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(x=0;x<t.plte.length;x++)C.push(t.plte[x].est.rgba);let n=0;for(x=0;x<S.length;x++){const e=(A=S[x]).img.length;var z=new Uint8Array(t.inds.buffer,n>>2,e>>2);E.push(z);const r=new Uint8Array(t.abuf,n,e);h&&s(A.img,A.rect.width,A.rect.height,C,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),E.push(z),x=0;x<w;x++){const t=e[x];if(0!=x&&t==e[x-1])z[x]=z[x-1];else if(x>N&&t==e[x-N])z[x]=z[x-N];else{let e=_[t];if(null==e&&(_[t]=e=C.length,C.push(t),C.length>=300))break;z[x]=e}}}const T=C.length;for(T<=256&&0==p&&(b=T<=2?1:T<=4?2:T<=16?4:8,b=Math.max(b,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(b*N/8);var j=new Uint8Array(n*e);const o=E[v];for(let t=0;t<e;t++){x=t*n;const e=t*N;if(8==b)for(var I=0;I<N;I++)j[x+I]=o[e+I];else if(4==b)for(I=0;I<N;I++)j[x+(I>>1)]|=o[e+I]<<4-4*(1&I);else if(2==b)for(I=0;I<N;I++)j[x+(I>>2)]|=o[e+I]<<6-2*(3&I);else if(1==b)for(I=0;I<N;I++)j[x+(I>>3)]|=o[e+I]<<7-1*(7&I)}t=j,g=3,r=1}else if(0==k&&1==S.length){j=new Uint8Array(N*e*3);const o=N*e;for(x=0;x<o;x++){const e=3*x,n=4*x;j[e]=t[n],j[e+1]=t[n+1],j[e+2]=t[n+2]}t=j,g=2,r=3,n=3*N}A.img=t,A.bpl=n,A.bpp=r}return{ctype:g,depth:b,plte:C,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,b=r,y=-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>y&&(y=r),s<b&&(b=s),s>v&&(v=s))}-1==y&&(g=b=y=v=0),s&&(!(1&~g)&&g--,!(1&~b)&&b--),a={x:g,y:b,width:y-g+1,height:v-b+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=kb;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=b(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=y(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=x(e,o.i0,o.i1),o.est=k(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=x(e,c.i0,c.i1),c.est=k(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=k(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 b(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=y(e.est,t,n,r,o);let a=e.left,s=e.right;i>0&&(a=e.right,s=e.left);const l=b(a,t,n,r,o);if(l.tdst<=i*i)return l;const c=b(s,t,n,r,o);return c.tdst<l.tdst?c:l}function y(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 x(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 k(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]]};Sb.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)},Sb.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)},Sb.encode.compress=u,Sb.encode.dither=s,Sb.quantize=m,Sb.quantize.getKDtree=g,Sb.quantize.getNearest=b}();const _b={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,b=f,y=0,v=0,w=0;function x(e){d.setUint16(v,e,!0),v+=2}function k(e){d.setUint32(v,e,!0),v+=4}function S(e){v+=e}x(19778),k(c),S(4),k(122),k(108),k(n),k(-r>>>0),x(1),x(32),k(3),k(l),k(2835),k(2835),S(8),k(16711680),k(65280),k(255),k(4278190080),k(1466527264),function e(){for(;y<r&&b>0;){for(g=122+y*s,p=0;p<o;)b--,h=a[w++],m=h>>>24,d.setUint32(g+p,h<<8|m),p+=4;y++}w<a.length?(b=f,setTimeout(e,_b._dly)):t(u)}()},toBlob(e,t){this.toArrayBuffer(e,e=>{t(new Blob([e],{type:"image/bmp"}))})},_dly:9};var Cb={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},Eb={[Cb.CHROME]:16384,[Cb.FIREFOX]:11180,[Cb.DESKTOP_SAFARI]:16384,[Cb.IE]:8192,[Cb.IOS]:4096,[Cb.ETC]:8192};const zb="undefined"!=typeof window,Ab="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,Nb=zb&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),Tb=(zb||Ab)&&(Nb&&Nb.getOriginalSymbol(window,"File")||"undefined"!=typeof File&&File),jb=(zb||Ab)&&(Nb&&Nb.getOriginalSymbol(window,"FileReader")||"undefined"!=typeof FileReader&&FileReader);function Ib(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 Ob(e){return new Promise((t,n)=>{const r=new jb;r.onload=()=>t(r.result),r.onerror=e=>n(e),r.readAsDataURL(e)})}function Mb(e){return new Promise((t,n)=>{const r=new Image;r.onload=()=>t(r),r.onerror=e=>n(e),r.src=e})}function Pb(){if(void 0!==Pb.cachedResult)return Pb.cachedResult;let e=Cb.ETC;const{userAgent:t}=navigator;return/Chrom(e|ium)/i.test(t)?e=Cb.CHROME:/iP(ad|od|hone)/i.test(t)&&/WebKit/i.test(t)?e=Cb.IOS:/Safari/i.test(t)?e=Cb.DESKTOP_SAFARI:/Firefox/i.test(t)?e=Cb.FIREFOX:(/MSIE/i.test(t)||1==!!document.documentMode)&&(e=Cb.IE),Pb.cachedResult=e,Pb.cachedResult}function Fb(e,t){const n=Pb(),r=Eb[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 Lb(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 Rb(e,t){const{width:n,height:r}=Fb(e.width,e.height),[o,i]=Lb(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 Db(){return void 0!==Db.cachedResult||(Db.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"undefined"!=typeof document&&"ontouchend"in document),Db.cachedResult}function Ub(e,t={}){return new Promise(function(n,r){let o,i;var a=function(){try{return i=Rb(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 Ob(e).then(function(e){try{return t=e,Mb(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(Db()||[Cb.DESKTOP_SAFARI,Cb.MOBILE_SAFARI].includes(Pb()))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 Bb(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=Sb.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=>_b.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),Ib(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 $b(e){e.width=0,e.height=0}function Vb(){return new Promise(function(e,t){let n,r,o,i;return void 0!==Vb.cachedResult?e(Vb.cachedResult):Ib("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then(function(a){try{return n=a,Ub(n).then(function(a){try{return r=a[1],Bb(r,n.type,n.name,n.lastModified).then(function(n){try{return o=n,$b(r),Ub(o).then(function(n){try{return i=n[0],Vb.cachedResult=1===i.width&&2===i.height,e(Vb.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 Hb(e){return new Promise((t,n)=>{const r=new jb;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 Wb(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]=Lb(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),$b(e)),a}function qb(e,t){const{width:n}=e,{height:r}=e,[o,i]=Lb(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),$b(e),o}function Zb(e,t,n=0){return new Promise(function(r,o){let i,a,s,l,c,u,d,f,p,h,m,g,b,y,v,w,x,k,S,_;function C(e=5){if(t.signal&&t.signal.aborted)throw t.signal.reason;i+=e,t.onProgress(Math.min(i,100))}function E(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,C(),Ub(e,t).then(function(n){try{return[,l]=n,C(),c=Wb(l,t),C(),new Promise(function(n,r){var o;if(!(o=t.exifOrientation))return Hb(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,C(),Vb().then(function(n){try{return d=n?c:qb(c,u),C(),f=t.initialQuality||1,p=t.fileType||e.type,Bb(d,p,e.name,e.lastModified,f).then(function(n){try{{let u=function(){if(a--&&(v>s||v>b)){let t,n;return t=_?.95*S.width:S.width,n=_?.95*S.height:S.height,[x,k]=Lb(t,n),k.drawImage(S,0,0,t,n),f*="image/png"===p?.85:.95,Bb(x,p,e.name,e.lastModified,f).then(function(e){try{return w=e,$b(S),S=x,v=w.size,E(Math.min(99,Math.floor((y-v)/(y-s)*100))),u}catch(t){return o(t)}},o)}return[1]},z=function(){return $b(S),$b(x),$b(c),$b(d),$b(l),E(100),r(w)};return h=n,C(),m=h.size>s,g=h.size>e.size,m||g?(b=e.size,y=h.size,v=y,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)):(E(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 Qb;function Kb(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 Tb))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 Zb(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 Zb(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)=>{Qb||(Qb=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(Qb);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=hb(e,i))}catch(p){}return n(i)}})}Kb.getDataUrlFromFile=Ob,Kb.getFilefromDataUrl=Ib,Kb.loadImage=Mb,Kb.drawImageInCanvas=Rb,Kb.drawFileInCanvas=Ub,Kb.canvasToFile=Bb,Kb.getExifOrientation=Hb,Kb.handleMaxWidthOrHeight=Wb,Kb.followExifOrientation=qb,Kb.cleanupCanvasMemory=$b,Kb.isAutoOrientationInBrowser=Vb,Kb.approximateBelowMaximumCanvasSizeOfBrowser=Fb,Kb.copyExifWithoutOrientation=hb,Kb.getBrowserName=Pb,Kb.version="2.0.2";const Jb=Object.freeze(Object.defineProperty({__proto__:null,default:Kb},Symbol.toStringTag,{value:"Module"}));e.BotUyoChatWidget=sb,e.ChatWidget=rb,e.ChatWidgetProvider=function({children:e,defaultLocale:t,initialState:n,onStateChange:r,...o}){const[i,a]=k.useState(n?.isOpen??!1),[s,l]=k.useState(0),c=k.useCallback(()=>{a(!0),l(0),r?.(!0)},[r]),u=k.useCallback(()=>{a(!1),r?.(!1)},[r]),d=k.useCallback(()=>{a(e=>{const t=!e;return t&&l(0),r?.(t),t})},[r]),f=k.useCallback(e=>{Jg?(Jg(e),Wt("ChatWidgetProvider sendMessage:",e)):Vt("sendMessage called but no handler registered")},[]),p=k.useCallback(()=>{Yg?(Yg(),Wt("ChatWidgetProvider clearMessages called")):Vt("clearMessages called but no handler registered")},[]),h={isOpen:i,open:c,close:u,toggle:d,sendMessage:f,clearMessages:p,unreadCount:s},m=k.useCallback((e,t)=>{"message:received"!==e||i||l(e=>e+1),o.onEvent?.(e,t)},[i,o]);return A.jsx(O,{defaultLocale:t,children:A.jsxs(eb.Provider,{value:h,children:[e,A.jsx(rb,{...o,onStateChange:e=>{a(e),e&&l(0),r?.(e)},onEvent:m})]})})},e.LanguageProvider=O,e.default=lb,e.useChatWidget=function(){const e=k.useContext(eb);if(!e)throw new Error("useChatWidget must be used within a ChatWidgetProvider. Wrap your app with <ChatWidgetProvider>...</ChatWidgetProvider>");return e},e.useLanguage=M,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
2
2
  //# sourceMappingURL=botuyo-chat.umd.js.map