tia-gpc-widget 1.1.9 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- var TiaGPC=function(e){"use strict";function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n,r,o={exports:{}},i={};function a(){if(n)return i;n=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=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(){}},g=Object.assign,m={};function y(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||h}function v(){}function b(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||h}y.prototype.isReactComponent={},y.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")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=y.prototype;var k=b.prototype=new v;k.constructor=b,g(k,y.prototype),k.isPureReactComponent=!0;var x=Array.isArray,w=Object.prototype.hasOwnProperty,S={current:null},E={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)w.call(n,o)&&!E.hasOwnProperty(o)&&(i[o]=n[o]);var l=arguments.length-2;if(1===l)i.children=r;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];i.children=u}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 T(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var O=/\/+/g;function N(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 P(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?"."+N(l,0):i,x(a)?(o="",null!=n&&(o=n.replace(O,"$&/")+"/"),P(a,r,o,"",function(e){return e})):null!=a&&(T(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(O,"$&/")+"/")+n)),r.push(a)),1;if(l=0,i=""===i?".":i+":",x(n))for(var u=0;u<n.length;u++){var c=i+N(s=n[u],u);l+=P(s,r,o,c,a)}else if(c=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=p&&e[p]||e["@@iterator"])?e:null}(n),"function"==typeof c)for(n=c.call(n),u=0;!(s=n.next()).done;)l+=P(s=s.value,r,o,c=i+N(s,u++),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 L(e,t,n){if(null==e)return e;var r=[],o=0;return P(e,r,"","",function(e){return t.call(n,e,o++)}),r}function R(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 _={current:null},A={transition:null},I={ReactCurrentDispatcher:_,ReactCurrentBatchConfig:A,ReactCurrentOwner:S};function D(){throw Error("act(...) is not supported in production builds of React.")}return i.Children={map:L,forEach:function(e,t,n){L(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return L(e,function(){t++}),t},toArray:function(e){return L(e,function(e){return e})||[]},only:function(e){if(!T(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},i.Component=y,i.Fragment=r,i.Profiler=a,i.PureComponent=b,i.StrictMode=o,i.Suspense=c,i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=I,i.act=D,i.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=g({},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(u in n)w.call(n,u)&&!E.hasOwnProperty(u)&&(o[u]=void 0===n[u]&&void 0!==l?l[u]:n[u])}var u=arguments.length-2;if(1===u)o.children=r;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];o.children=l}return{$$typeof:e,type:t.type,key:i,ref:a,props:o,_owner:s}},i.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},i.createElement=C,i.createFactory=function(e){var t=C.bind(null,e);return t.type=e,t},i.createRef=function(){return{current:null}},i.forwardRef=function(e){return{$$typeof:u,render:e}},i.isValidElement=T,i.lazy=function(e){return{$$typeof:f,_payload:{_status:-1,_result:e},_init:R}},i.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},i.startTransition=function(e){var t=A.transition;A.transition={};try{e()}finally{A.transition=t}},i.unstable_act=D,i.useCallback=function(e,t){return _.current.useCallback(e,t)},i.useContext=function(e){return _.current.useContext(e)},i.useDebugValue=function(){},i.useDeferredValue=function(e){return _.current.useDeferredValue(e)},i.useEffect=function(e,t){return _.current.useEffect(e,t)},i.useId=function(){return _.current.useId()},i.useImperativeHandle=function(e,t,n){return _.current.useImperativeHandle(e,t,n)},i.useInsertionEffect=function(e,t){return _.current.useInsertionEffect(e,t)},i.useLayoutEffect=function(e,t){return _.current.useLayoutEffect(e,t)},i.useMemo=function(e,t){return _.current.useMemo(e,t)},i.useReducer=function(e,t,n){return _.current.useReducer(e,t,n)},i.useRef=function(e){return _.current.useRef(e)},i.useState=function(e){return _.current.useState(e)},i.useSyncExternalStore=function(e,t,n){return _.current.useSyncExternalStore(e,t,n)},i.useTransition=function(){return _.current.useTransition()},i.version="18.3.1",i}function s(){return r||(r=1,o.exports=a()),o.exports}var l=s();const u=t(l);var c,d,f,p,h,g={},m={exports:{}},y={},v={exports:{}},b={};function k(){return d||(d=1,v.exports=(c||(c=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],u=s+1,c=e[u];if(0>o(l,n))u<i&&0>o(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[s]=n,r=s);else{if(!(u<i&&0>o(c,n)))break e;e[r]=c,e[u]=n,r=u}}}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=[],u=[],c=1,d=null,f=3,p=!1,h=!1,g=!1,m="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,v="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var o=n(u);null!==o;){if(null===o.callback)r(u);else{if(!(o.startTime<=e))break;r(u),o.sortIndex=o.expirationTime,t(l,o)}o=n(u)}}function k(e){if(g=!1,b(e),!h)if(null!==n(l))h=!0,_(x);else{var t=n(u);null!==t&&A(k,t.startTime-e)}}function x(t,o){h=!1,g&&(g=!1,y(C),C=-1),p=!0;var i=f;try{for(b(o),d=n(l);null!==d&&(!(d.expirationTime>o)||t&&!N());){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),b(o)}else r(l);d=n(l)}if(null!==d)var c=!0;else{var m=n(u);null!==m&&A(k,m.startTime-o),c=!1}return c}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 w,S=!1,E=null,C=-1,T=5,O=-1;function N(){return!(e.unstable_now()-O<T)}function P(){if(null!==E){var t=e.unstable_now();O=t;var n=!0;try{n=E(!0,t)}finally{n?w():(S=!1,E=null)}}else S=!1}if("function"==typeof v)w=function(){v(P)};else if("undefined"!=typeof MessageChannel){var L=new MessageChannel,R=L.port2;L.port1.onmessage=P,w=function(){R.postMessage(null)}}else w=function(){m(P,0)};function _(e){E=e,S||(S=!0,w())}function A(t,n){C=m(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,_(x))},e.unstable_forceFrameRate=function(e){0>e||125<e||(T=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:c++,callback:o,priorityLevel:r,startTime:i,expirationTime:s=i+s,sortIndex:-1},i>a?(r.sortIndex=i,t(u,r),null===n(l)&&r===n(u)&&(g?(y(C),C=-1):g=!0,A(k,i-a))):(r.sortIndex=s,t(l,r),h||p||(h=!0,_(x))),r},e.unstable_shouldYield=N,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)),v.exports}
1
+ var TiaGPC=function(e){"use strict";function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n,r,o={exports:{}},i={};function a(){if(n)return i;n=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=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(){}},g=Object.assign,m={};function y(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||h}function v(){}function b(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||h}y.prototype.isReactComponent={},y.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")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=y.prototype;var k=b.prototype=new v;k.constructor=b,g(k,y.prototype),k.isPureReactComponent=!0;var w=Array.isArray,x=Object.prototype.hasOwnProperty,S={current:null},C={key:!0,ref:!0,__self:!0,__source:!0};function E(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)x.call(n,o)&&!C.hasOwnProperty(o)&&(i[o]=n[o]);var l=arguments.length-2;if(1===l)i.children=r;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];i.children=u}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 T(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var N=/\/+/g;function O(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 L(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?"."+O(l,0):i,w(a)?(o="",null!=n&&(o=n.replace(N,"$&/")+"/"),L(a,r,o,"",function(e){return e})):null!=a&&(T(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(N,"$&/")+"/")+n)),r.push(a)),1;if(l=0,i=""===i?".":i+":",w(n))for(var u=0;u<n.length;u++){var c=i+O(s=n[u],u);l+=L(s,r,o,c,a)}else if(c=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=p&&e[p]||e["@@iterator"])?e:null}(n),"function"==typeof c)for(n=c.call(n),u=0;!(s=n.next()).done;)l+=L(s=s.value,r,o,c=i+O(s,u++),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 P(e,t,n){if(null==e)return e;var r=[],o=0;return L(e,r,"","",function(e){return t.call(n,e,o++)}),r}function _(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 R={current:null},A={transition:null},I={ReactCurrentDispatcher:R,ReactCurrentBatchConfig:A,ReactCurrentOwner:S};function j(){throw Error("act(...) is not supported in production builds of React.")}return i.Children={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!T(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},i.Component=y,i.Fragment=r,i.Profiler=a,i.PureComponent=b,i.StrictMode=o,i.Suspense=c,i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=I,i.act=j,i.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=g({},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(u in n)x.call(n,u)&&!C.hasOwnProperty(u)&&(o[u]=void 0===n[u]&&void 0!==l?l[u]:n[u])}var u=arguments.length-2;if(1===u)o.children=r;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];o.children=l}return{$$typeof:e,type:t.type,key:i,ref:a,props:o,_owner:s}},i.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},i.createElement=E,i.createFactory=function(e){var t=E.bind(null,e);return t.type=e,t},i.createRef=function(){return{current:null}},i.forwardRef=function(e){return{$$typeof:u,render:e}},i.isValidElement=T,i.lazy=function(e){return{$$typeof:f,_payload:{_status:-1,_result:e},_init:_}},i.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},i.startTransition=function(e){var t=A.transition;A.transition={};try{e()}finally{A.transition=t}},i.unstable_act=j,i.useCallback=function(e,t){return R.current.useCallback(e,t)},i.useContext=function(e){return R.current.useContext(e)},i.useDebugValue=function(){},i.useDeferredValue=function(e){return R.current.useDeferredValue(e)},i.useEffect=function(e,t){return R.current.useEffect(e,t)},i.useId=function(){return R.current.useId()},i.useImperativeHandle=function(e,t,n){return R.current.useImperativeHandle(e,t,n)},i.useInsertionEffect=function(e,t){return R.current.useInsertionEffect(e,t)},i.useLayoutEffect=function(e,t){return R.current.useLayoutEffect(e,t)},i.useMemo=function(e,t){return R.current.useMemo(e,t)},i.useReducer=function(e,t,n){return R.current.useReducer(e,t,n)},i.useRef=function(e){return R.current.useRef(e)},i.useState=function(e){return R.current.useState(e)},i.useSyncExternalStore=function(e,t,n){return R.current.useSyncExternalStore(e,t,n)},i.useTransition=function(){return R.current.useTransition()},i.version="18.3.1",i}function s(){return r||(r=1,o.exports=a()),o.exports}var l=s();const u=t(l);var c,d,f,p,h,g={},m={exports:{}},y={},v={exports:{}},b={};function k(){return d||(d=1,v.exports=(c||(c=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],u=s+1,c=e[u];if(0>o(l,n))u<i&&0>o(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[s]=n,r=s);else{if(!(u<i&&0>o(c,n)))break e;e[r]=c,e[u]=n,r=u}}}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=[],u=[],c=1,d=null,f=3,p=!1,h=!1,g=!1,m="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,v="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var o=n(u);null!==o;){if(null===o.callback)r(u);else{if(!(o.startTime<=e))break;r(u),o.sortIndex=o.expirationTime,t(l,o)}o=n(u)}}function k(e){if(g=!1,b(e),!h)if(null!==n(l))h=!0,R(w);else{var t=n(u);null!==t&&A(k,t.startTime-e)}}function w(t,o){h=!1,g&&(g=!1,y(E),E=-1),p=!0;var i=f;try{for(b(o),d=n(l);null!==d&&(!(d.expirationTime>o)||t&&!O());){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),b(o)}else r(l);d=n(l)}if(null!==d)var c=!0;else{var m=n(u);null!==m&&A(k,m.startTime-o),c=!1}return c}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 x,S=!1,C=null,E=-1,T=5,N=-1;function O(){return!(e.unstable_now()-N<T)}function L(){if(null!==C){var t=e.unstable_now();N=t;var n=!0;try{n=C(!0,t)}finally{n?x():(S=!1,C=null)}}else S=!1}if("function"==typeof v)x=function(){v(L)};else if("undefined"!=typeof MessageChannel){var P=new MessageChannel,_=P.port2;P.port1.onmessage=L,x=function(){_.postMessage(null)}}else x=function(){m(L,0)};function R(e){C=e,S||(S=!0,x())}function A(t,n){E=m(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,R(w))},e.unstable_forceFrameRate=function(e){0>e||125<e||(T=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:c++,callback:o,priorityLevel:r,startTime:i,expirationTime:s=i+s,sortIndex:-1},i>a?(r.sortIndex=i,t(u,r),null===n(l)&&r===n(u)&&(g?(y(E),E=-1):g=!0,A(k,i-a))):(r.sortIndex=s,t(l,r),h||p||(h=!0,R(w))),r},e.unstable_shouldYield=O,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)),v.exports}
2
2
  /**
3
3
  * @license React
4
4
  * react-dom.production.min.js
@@ -7,7 +7,7 @@ var TiaGPC=function(e){"use strict";function t(e){return e&&e.__esModule&&Object
7
7
  *
8
8
  * This source code is licensed under the MIT license found in the
9
9
  * LICENSE file in the root directory of this source tree.
10
- */function x(){if(f)return y;f=1;var e=s(),t=k();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){a(e,t),a(e+"Capture",t)}function a(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),u=Object.prototype.hasOwnProperty,c=/^[: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]*$/,d={},p={};function h(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 h(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 h(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){g[e]=new h(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){g[e]=new h(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 h(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){g[e]=new h(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){g[e]=new h(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){g[e]=new h(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){g[e]=new h(e,5,!1,e.toLowerCase(),null,!1,!1)});var m=/[\-:]([a-z])/g;function v(e){return e[1].toUpperCase()}function b(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!!u.call(p,e)||!u.call(d,e)&&(c.test(e)?p[e]=!0:(d[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(m,v);g[t]=new h(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(m,v);g[t]=new h(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(m,v);g[t]=new h(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){g[e]=new h(e,1,!1,e.toLowerCase(),null,!1,!1)}),g.xlinkHref=new h("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){g[e]=new h(e,1,!1,e.toLowerCase(),null,!0,!0)});var x=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),S=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),N=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),I=Symbol.for("react.offscreen"),D=Symbol.iterator;function z(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=D&&e[D]||e["@@iterator"])?e:null}var j,F=Object.assign;function M(e){if(void 0===j)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);j=t&&t[1]||""}return"\n"+j+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(Fe){var r=Fe}Reflect.construct(e,[],t)}else{try{t.call()}catch(Fe){r=Fe}e.call(t.prototype)}else{try{throw Error()}catch(Fe){r=Fe}e()}}catch(Fe){if(Fe&&r&&"string"==typeof Fe.stack){for(var o=Fe.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:"")?M(e):""}function $(e){switch(e.tag){case 5:return M(e.type);case 16:return M("Lazy");case 13:return M("Suspense");case 19:return M("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 E:return"Fragment";case S:return"Portal";case T:return"Profiler";case C:return"StrictMode";case L:return"Suspense";case R:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case N:return(e.displayName||"Context")+".Consumer";case O:return(e._context.displayName||"Context")+".Provider";case P:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case _:return null!==(t=e.displayName||null)?t:V(e.type)||"Memo";case A: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 q(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function W(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function K(e){e._valueTracker||(e._valueTracker=function(e){var t=W(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=W(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function J(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 Y(e,t){var n=t.checked;return F({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function G(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=q(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 X(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function Z(e,t){X(e,t);var n=q(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,q(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&&J(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=""+q(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 F({},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:q(r)}}function ae(e,t){var n=q(t.value),r=q(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 ue(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 ce,de,fe=(de=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.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},ge=["Webkit","ms","Moz","O"];function me(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 ye(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=me(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(he).forEach(function(e){ge.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),he[t]=he[e]})});var ve=F({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 be(e,t){if(t){if(ve[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 ke(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 we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Se=null,Ee=null,Ce=null;function Te(e){if(e=Co(e)){if("function"!=typeof Se)throw Error(n(280));var t=e.stateNode;t&&(t=Oo(t),Se(e.stateNode,e.type,t))}}function Oe(e){Ee?Ce?Ce.push(e):Ce=[e]:Ee=e}function Ne(){if(Ee){var e=Ee,t=Ce;if(Ce=Ee=null,Te(e),t)for(e=0;e<t.length;e++)Te(t[e])}}function Pe(e,t){return e(t)}function Le(){}var Re=!1;function _e(e,t,n){if(Re)return e(t,n);Re=!0;try{return Pe(e,t,n)}finally{Re=!1,(null!==Ee||null!==Ce)&&(Le(),Ne())}}function Ae(e,t){var r=e.stateNode;if(null===r)return null;var o=Oo(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 Ie=!1;if(l)try{var Me={};Object.defineProperty(Me,"passive",{get:function(){Ie=!0}}),window.addEventListener("test",Me,Me),window.removeEventListener("test",Me,Me)}catch(de){Ie=!1}function Ue(e,t,n,r,o,i,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Be=!1,$e=null,Ve=!1,He=null,qe={onError:function(e){Be=!0,$e=e}};function We(e,t,n,r,o,i,a,s,l){Be=!1,$e=null,Ue.apply(qe,arguments)}function Ke(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 Qe(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 Je(e){if(Ke(e)!==e)throw Error(n(188))}function Ye(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ke(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 Je(i),e;if(a===o)return Je(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))?Ge(e):null}function Ge(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ge(e);if(null!==t)return t;e=e.sibling}return null}var Xe=t.unstable_scheduleCallback,Ze=t.unstable_cancelCallback,et=t.unstable_shouldYield,tt=t.unstable_requestPaint,nt=t.unstable_now,rt=t.unstable_getCurrentPriorityLevel,ot=t.unstable_ImmediatePriority,it=t.unstable_UserBlockingPriority,at=t.unstable_NormalPriority,st=t.unstable_LowPriority,lt=t.unstable_IdlePriority,ut=null,ct=null;var dt=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(ft(e)/pt|0)|0},ft=Math.log,pt=Math.LN2;var ht=64,gt=4194304;function mt(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 yt(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=mt(s):0!==(i&=a)&&(r=mt(i))}else 0!==(a=n&~o)?r=mt(a):0!==i&&(r=mt(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-dt(t)),r|=e[n],t&=~o;return r}function vt(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 bt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function kt(){var e=ht;return!(4194240&(ht<<=1))&&(ht=64),e}function xt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function wt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-dt(t)]=n}function St(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-dt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var Et=0;function Ct(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var Tt,Ot,Nt,Pt,Lt,Rt=!1,_t=[],At=null,It=null,Dt=null,zt=new Map,jt=new Map,Ft=[],Mt="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 Ut(e,t){switch(e){case"focusin":case"focusout":At=null;break;case"dragenter":case"dragleave":It=null;break;case"mouseover":case"mouseout":Dt=null;break;case"pointerover":case"pointerout":zt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":jt.delete(t.pointerId)}}function Bt(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=Co(t))&&Ot(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function $t(e){var t=Eo(e.target);if(null!==t){var n=Ke(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Qe(n)))return e.blockedOn=t,void Lt(e.priority,function(){Nt(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 Vt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=en(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=Co(n))&&Ot(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 Ht(e,t,n){Vt(e)&&n.delete(t)}function qt(){Rt=!1,null!==At&&Vt(At)&&(At=null),null!==It&&Vt(It)&&(It=null),null!==Dt&&Vt(Dt)&&(Dt=null),zt.forEach(Ht),jt.forEach(Ht)}function Wt(e,n){e.blockedOn===n&&(e.blockedOn=null,Rt||(Rt=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,qt)))}function Kt(e){function t(t){return Wt(t,e)}if(0<_t.length){Wt(_t[0],e);for(var n=1;n<_t.length;n++){var r=_t[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==At&&Wt(At,e),null!==It&&Wt(It,e),null!==Dt&&Wt(Dt,e),zt.forEach(t),jt.forEach(t),n=0;n<Ft.length;n++)(r=Ft[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Ft.length&&null===(n=Ft[0]).blockedOn;)$t(n),null===n.blockedOn&&Ft.shift()}var Qt=x.ReactCurrentBatchConfig,Jt=!0;function Yt(e,t,n,r){var o=Et,i=Qt.transition;Qt.transition=null;try{Et=1,Xt(e,t,n,r)}finally{Et=o,Qt.transition=i}}function Gt(e,t,n,r){var o=Et,i=Qt.transition;Qt.transition=null;try{Et=4,Xt(e,t,n,r)}finally{Et=o,Qt.transition=i}}function Xt(e,t,n,r){if(Jt){var o=en(e,t,n,r);if(null===o)Jr(e,t,r,Zt,n),Ut(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return At=Bt(At,e,t,n,r,o),!0;case"dragenter":return It=Bt(It,e,t,n,r,o),!0;case"mouseover":return Dt=Bt(Dt,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return zt.set(i,Bt(zt.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,jt.set(i,Bt(jt.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(Ut(e,r),4&t&&-1<Mt.indexOf(e)){for(;null!==o;){var i=Co(o);if(null!==i&&Tt(i),null===(i=en(e,t,n,r))&&Jr(e,t,r,Zt,n),i===o)break;o=i}null!==o&&r.stopPropagation()}else Jr(e,t,r,null,n)}}var Zt=null;function en(e,t,n,r){if(Zt=null,null!==(e=Eo(e=we(r))))if(null===(t=Ke(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Qe(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 Zt=e,null}function tn(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(rt()){case ot:return 1;case it:return 4;case at:case st:return 16;case lt:return 536870912;default:return 16}default:return 16}}var nn=null,rn=null,on=null;function an(){if(on)return on;var e,t,n=rn,r=n.length,o="value"in nn?nn.value:nn.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 on=o.slice(e,1<t?1-t:void 0)}function sn(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 ln(){return!0}function un(){return!1}function cn(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)?ln:un,this.isPropagationStopped=un,this}return F(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=ln)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=ln)},persist:function(){},isPersistent:ln}),t}var dn,fn,pn,hn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gn=cn(hn),mn=F({},hn,{view:0,detail:0}),yn=cn(mn),vn=F({},mn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ln,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!==pn&&(pn&&"mousemove"===e.type?(dn=e.screenX-pn.screenX,fn=e.screenY-pn.screenY):fn=dn=0,pn=e),dn)},movementY:function(e){return"movementY"in e?e.movementY:fn}}),bn=cn(vn),kn=cn(F({},vn,{dataTransfer:0})),xn=cn(F({},mn,{relatedTarget:0})),wn=cn(F({},hn,{animationName:0,elapsedTime:0,pseudoElement:0})),Sn=F({},hn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),En=cn(Sn),Cn=cn(F({},hn,{data:0})),Tn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},On={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"},Nn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Nn[e])&&!!t[e]}function Ln(){return Pn}var Rn=F({},mn,{key:function(e){if(e.key){var t=Tn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=sn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?On[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ln,charCode:function(e){return"keypress"===e.type?sn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?sn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),_n=cn(Rn),An=cn(F({},vn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),In=cn(F({},mn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ln})),Dn=cn(F({},hn,{propertyName:0,elapsedTime:0,pseudoElement:0})),zn=F({},vn,{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}),jn=cn(zn),Fn=[9,13,27,32],Mn=l&&"CompositionEvent"in window,Un=null;l&&"documentMode"in document&&(Un=document.documentMode);var Bn=l&&"TextEvent"in window&&!Un,$n=l&&(!Mn||Un&&8<Un&&11>=Un),Vn=String.fromCharCode(32),Hn=!1;function qn(e,t){switch(e){case"keyup":return-1!==Fn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Wn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Kn=!1;var Qn={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 Jn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Qn[e.type]:"textarea"===t}function Yn(e,t,n,r){Oe(r),0<(t=Gr(t,"onChange")).length&&(n=new gn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Gn=null,Xn=null;function Zn(e){Vr(e,0)}function er(e){if(Q(To(e)))return e}function tr(e,t){if("change"===e)return t}var nr=!1;if(l){var rr;if(l){var or="oninput"in document;if(!or){var ir=document.createElement("div");ir.setAttribute("oninput","return;"),or="function"==typeof ir.oninput}rr=or}else rr=!1;nr=rr&&(!document.documentMode||9<document.documentMode)}function ar(){Gn&&(Gn.detachEvent("onpropertychange",sr),Xn=Gn=null)}function sr(e){if("value"===e.propertyName&&er(Xn)){var t=[];Yn(t,Xn,e,we(e)),_e(Zn,t)}}function lr(e,t,n){"focusin"===e?(ar(),Xn=n,(Gn=t).attachEvent("onpropertychange",sr)):"focusout"===e&&ar()}function ur(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return er(Xn)}function cr(e,t){if("click"===e)return er(t)}function dr(e,t){if("input"===e||"change"===e)return er(t)}var fr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function pr(e,t){if(fr(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(!u.call(t,o)||!fr(e[o],t[o]))return!1}return!0}function hr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function gr(e,t){var n,r=hr(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=hr(r)}}function mr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?mr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function yr(){for(var e=window,t=J();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=J((e=t.contentWindow).document)}return t}function vr(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 br(e){var t=yr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&mr(n.ownerDocument.documentElement,n)){if(null!==r&&vr(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=gr(n,i);var a=gr(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 kr=l&&"documentMode"in document&&11>=document.documentMode,xr=null,wr=null,Sr=null,Er=!1;function Cr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;Er||null==xr||xr!==J(r)||("selectionStart"in(r=xr)&&vr(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},Sr&&pr(Sr,r)||(Sr=r,0<(r=Gr(wr,"onSelect")).length&&(t=new gn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=xr)))}function Tr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Or={animationend:Tr("Animation","AnimationEnd"),animationiteration:Tr("Animation","AnimationIteration"),animationstart:Tr("Animation","AnimationStart"),transitionend:Tr("Transition","TransitionEnd")},Nr={},Pr={};function Lr(e){if(Nr[e])return Nr[e];if(!Or[e])return e;var t,n=Or[e];for(t in n)if(n.hasOwnProperty(t)&&t in Pr)return Nr[e]=n[t];return e}l&&(Pr=document.createElement("div").style,"AnimationEvent"in window||(delete Or.animationend.animation,delete Or.animationiteration.animation,delete Or.animationstart.animation),"TransitionEvent"in window||delete Or.transitionend.transition);var Rr=Lr("animationend"),_r=Lr("animationiteration"),Ar=Lr("animationstart"),Ir=Lr("transitionend"),Dr=new Map,zr="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 jr(e,t){Dr.set(e,t),i(t,[e])}for(var Fr=0;Fr<zr.length;Fr++){var Mr=zr[Fr];jr(Mr.toLowerCase(),"on"+(Mr[0].toUpperCase()+Mr.slice(1)))}jr(Rr,"onAnimationEnd"),jr(_r,"onAnimationIteration"),jr(Ar,"onAnimationStart"),jr("dblclick","onDoubleClick"),jr("focusin","onFocus"),jr("focusout","onBlur"),jr(Ir,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("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 Ur="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(" "),Br=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ur));function $r(e,t,r){var o=e.type||"unknown-event";e.currentTarget=r,function(e,t,r,o,i,a,s,l,u){if(We.apply(this,arguments),Be){if(!Be)throw Error(n(198));var c=$e;Be=!1,$e=null,Ve||(Ve=!0,He=c)}}(o,t,void 0,e),e.currentTarget=null}function Vr(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,u=s.currentTarget;if(s=s.listener,l!==i&&o.isPropagationStopped())break e;$r(o,s,u),i=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,u=s.currentTarget,s=s.listener,l!==i&&o.isPropagationStopped())break e;$r(o,s,u),i=l}}}if(Ve)throw e=He,Ve=!1,He=null,e}function Hr(e,t){var n=t[xo];void 0===n&&(n=t[xo]=new Set);var r=e+"__bubble";n.has(r)||(Qr(t,e,2,!1),n.add(r))}function qr(e,t,n){var r=0;t&&(r|=4),Qr(n,e,r,t)}var Wr="_reactListening"+Math.random().toString(36).slice(2);function Kr(e){if(!e[Wr]){e[Wr]=!0,r.forEach(function(t){"selectionchange"!==t&&(Br.has(t)||qr(t,!1,e),qr(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Wr]||(t[Wr]=!0,qr("selectionchange",!1,t))}}function Qr(e,t,n,r){switch(tn(t)){case 1:var o=Yt;break;case 4:o=Gt;break;default:o=Xt}n=o.bind(null,t,n,e),o=void 0,!Ie||"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 Jr(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=Eo(s)))return;if(5===(l=a.tag)||6===l){r=i=a;continue e}s=s.parentNode}}r=r.return}_e(function(){var r=i,o=we(n),a=[];e:{var s=Dr.get(e);if(void 0!==s){var l=gn,u=e;switch(e){case"keypress":if(0===sn(n))break e;case"keydown":case"keyup":l=_n;break;case"focusin":u="focus",l=xn;break;case"focusout":u="blur",l=xn;break;case"beforeblur":case"afterblur":l=xn;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=bn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=kn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=In;break;case Rr:case _r:case Ar:l=wn;break;case Ir:l=Dn;break;case"scroll":l=yn;break;case"wheel":l=jn;break;case"copy":case"cut":case"paste":l=En;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=An}var c=!!(4&t),d=!c&&"scroll"===e,f=c?null!==s?s+"Capture":null:s;c=[];for(var p,h=r;null!==h;){var g=(p=h).stateNode;if(5===p.tag&&null!==g&&(p=g,null!==f&&(null!=(g=Ae(h,f))&&c.push(Yr(h,g,p)))),d)break;h=h.return}0<c.length&&(s=new l(s,u,null,n,o),a.push({event:s,listeners:c}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===xe||!(u=n.relatedTarget||n.fromElement)||!Eo(u)&&!u[ko])&&(l||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(u=(u=n.relatedTarget||n.toElement)?Eo(u):null)&&(u!==(d=Ke(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=r),l!==u)){if(c=bn,g="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(c=An,g="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==l?s:To(l),p=null==u?s:To(u),(s=new c(g,h+"leave",l,n,o)).target=d,s.relatedTarget=p,g=null,Eo(o)===r&&((c=new c(f,h+"enter",u,n,o)).target=p,c.relatedTarget=d,g=c),d=g,l&&u)e:{for(f=u,h=0,p=c=l;p;p=Xr(p))h++;for(p=0,g=f;g;g=Xr(g))p++;for(;0<h-p;)c=Xr(c),h--;for(;0<p-h;)f=Xr(f),p--;for(;h--;){if(c===f||null!==f&&c===f.alternate)break e;c=Xr(c),f=Xr(f)}c=null}else c=null;null!==l&&Zr(a,s,l,c,!1),null!==u&&null!==d&&Zr(a,d,u,c,!0)}if("select"===(l=(s=r?To(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var m=tr;else if(Jn(s))if(nr)m=dr;else{m=ur;var y=lr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(m=cr);switch(m&&(m=m(e,r))?Yn(a,m,n,o):(y&&y(e,s,r),"focusout"===e&&(y=s._wrapperState)&&y.controlled&&"number"===s.type&&te(s,"number",s.value)),y=r?To(r):window,e){case"focusin":(Jn(y)||"true"===y.contentEditable)&&(xr=y,wr=r,Sr=null);break;case"focusout":Sr=wr=xr=null;break;case"mousedown":Er=!0;break;case"contextmenu":case"mouseup":case"dragend":Er=!1,Cr(a,n,o);break;case"selectionchange":if(kr)break;case"keydown":case"keyup":Cr(a,n,o)}var v;if(Mn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Kn?qn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&($n&&"ko"!==n.locale&&(Kn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Kn&&(v=an()):(rn="value"in(nn=o)?nn.value:nn.textContent,Kn=!0)),0<(y=Gr(r,b)).length&&(b=new Cn(b,e,null,n,o),a.push({event:b,listeners:y}),v?b.data=v:null!==(v=Wn(n))&&(b.data=v))),(v=Bn?function(e,t){switch(e){case"compositionend":return Wn(t);case"keypress":return 32!==t.which?null:(Hn=!0,Vn);case"textInput":return(e=t.data)===Vn&&Hn?null:e;default:return null}}(e,n):function(e,t){if(Kn)return"compositionend"===e||!Mn&&qn(e,t)?(e=an(),on=rn=nn=null,Kn=!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 $n&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Gr(r,"onBeforeInput")).length&&(o=new Cn("onBeforeInput","beforeinput",null,n,o),a.push({event:o,listeners:r}),o.data=v))}Vr(a,t)})}function Yr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Gr(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=Ae(e,n))&&r.unshift(Yr(e,i,o)),null!=(i=Ae(e,t))&&r.push(Yr(e,i,o))),e=e.return}return r}function Xr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Zr(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==u&&(s=u,o?null!=(l=Ae(n,i))&&a.unshift(Yr(n,l,s)):o||null!=(l=Ae(n,i))&&a.push(Yr(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var eo=/\r\n?/g,to=/\u0000|\uFFFD/g;function no(e){return("string"==typeof e?e:""+e).replace(eo,"\n").replace(to,"")}function ro(e,t,r){if(t=no(t),no(e)!==t&&r)throw Error(n(425))}function oo(){}var io=null,ao=null;function so(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 lo="function"==typeof setTimeout?setTimeout:void 0,uo="function"==typeof clearTimeout?clearTimeout:void 0,co="function"==typeof Promise?Promise:void 0,fo="function"==typeof queueMicrotask?queueMicrotask:void 0!==co?function(e){return co.resolve(null).then(e).catch(po)}:lo;function po(e){setTimeout(function(){throw e})}function ho(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 Kt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);Kt(t)}function go(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 mo(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 yo=Math.random().toString(36).slice(2),vo="__reactFiber$"+yo,bo="__reactProps$"+yo,ko="__reactContainer$"+yo,xo="__reactEvents$"+yo,wo="__reactListeners$"+yo,So="__reactHandles$"+yo;function Eo(e){var t=e[vo];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ko]||n[vo]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=mo(e);null!==e;){if(n=e[vo])return n;e=mo(e)}return t}n=(e=n).parentNode}return null}function Co(e){return!(e=e[vo]||e[ko])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function To(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(n(33))}function Oo(e){return e[bo]||null}var No=[],Po=-1;function Lo(e){return{current:e}}function Ro(e){0>Po||(e.current=No[Po],No[Po]=null,Po--)}function _o(e,t){Po++,No[Po]=e.current,e.current=t}var Ao={},Io=Lo(Ao),Do=Lo(!1),zo=Ao;function jo(e,t){var n=e.type.contextTypes;if(!n)return Ao;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 Fo(e){return null!=(e=e.childContextTypes)}function Mo(){Ro(Do),Ro(Io)}function Uo(e,t,r){if(Io.current!==Ao)throw Error(n(168));_o(Io,t),_o(Do,r)}function Bo(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 F({},r,o)}function $o(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ao,zo=Io.current,_o(Io,e),_o(Do,Do.current),!0}function Vo(e,t,r){var o=e.stateNode;if(!o)throw Error(n(169));r?(e=Bo(e,t,zo),o.__reactInternalMemoizedMergedChildContext=e,Ro(Do),Ro(Io),_o(Io,e)):Ro(Do),_o(Do,r)}var Ho=null,qo=!1,Wo=!1;function Ko(e){null===Ho?Ho=[e]:Ho.push(e)}function Qo(){if(!Wo&&null!==Ho){Wo=!0;var e=0,t=Et;try{var n=Ho;for(Et=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Ho=null,qo=!1}catch(De){throw null!==Ho&&(Ho=Ho.slice(e+1)),Xe(ot,Qo),De}finally{Et=t,Wo=!1}}return null}var Jo=[],Yo=0,Go=null,Xo=0,Zo=[],ei=0,ti=null,ni=1,ri="";function oi(e,t){Jo[Yo++]=Xo,Jo[Yo++]=Go,Go=e,Xo=t}function ii(e,t,n){Zo[ei++]=ni,Zo[ei++]=ri,Zo[ei++]=ti,ti=e;var r=ni;e=ri;var o=32-dt(r)-1;r&=~(1<<o),n+=1;var i=32-dt(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,ni=1<<32-dt(t)+o|n<<o|r,ri=i+e}else ni=1<<i|n<<o|r,ri=e}function ai(e){null!==e.return&&(oi(e,1),ii(e,1,0))}function si(e){for(;e===Go;)Go=Jo[--Yo],Jo[Yo]=null,Xo=Jo[--Yo],Jo[Yo]=null;for(;e===ti;)ti=Zo[--ei],Zo[ei]=null,ri=Zo[--ei],Zo[ei]=null,ni=Zo[--ei],Zo[ei]=null}var li=null,ui=null,ci=!1,di=null;function fi(e,t){var n=Du(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 pi(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,li=e,ui=go(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,li=e,ui=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==ti?{id:ni,overflow:ri}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Du(18,null,null,0)).stateNode=t,n.return=e,e.child=n,li=e,ui=null,!0);default:return!1}}function hi(e){return!(!(1&e.mode)||128&e.flags)}function gi(e){if(ci){var t=ui;if(t){var r=t;if(!pi(e,t)){if(hi(e))throw Error(n(418));t=go(r.nextSibling);var o=li;t&&pi(e,t)?fi(o,r):(e.flags=-4097&e.flags|2,ci=!1,li=e)}}else{if(hi(e))throw Error(n(418));e.flags=-4097&e.flags|2,ci=!1,li=e}}}function mi(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;li=e}function yi(e){if(e!==li)return!1;if(!ci)return mi(e),ci=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!so(e.type,e.memoizedProps)),t&&(t=ui)){if(hi(e))throw vi(),Error(n(418));for(;t;)fi(e,t),t=go(t.nextSibling)}if(mi(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){ui=go(e.nextSibling);break e}t--}else"$"!==r&&"$!"!==r&&"$?"!==r||t++}e=e.nextSibling}ui=null}}else ui=li?go(e.stateNode.nextSibling):null;return!0}function vi(){for(var e=ui;e;)e=go(e.nextSibling)}function bi(){ui=li=null,ci=!1}function ki(e){null===di?di=[e]:di.push(e)}var xi=x.ReactCurrentBatchConfig;function wi(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 Si(e,t){throw e=Object.prototype.toString.call(t),Error(n(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ei(e){return(0,e._init)(e._payload)}function Ci(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=ju(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=Bu(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function u(e,t,n,r){var o=n.type;return o===E?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===A&&Ei(o)===t.type)?((r=i(t,n.props)).ref=wi(e,t,n),r.return=e,r):((r=Fu(n.type,n.key,n.props,null,e.mode,r)).ref=wi(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=$u(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=Mu(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=Bu(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case w:return(n=Fu(t.type,t.key,t.props,null,e.mode,n)).ref=wi(e,null,t),n.return=e,n;case S:return(t=$u(t,e.mode,n)).return=e,t;case A:return f(e,(0,t._init)(t._payload),n)}if(ne(t)||z(t))return(t=Mu(t,e.mode,n,null)).return=e,t;Si(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 w:return n.key===o?u(e,t,n,r):null;case S:return n.key===o?c(e,t,n,r):null;case A:return p(e,t,(o=n._init)(n._payload),r)}if(ne(n)||z(n))return null!==o?null:d(e,t,n,r,null);Si(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 w:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o);case S:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o);case A:return h(e,t,n,(0,r._init)(r._payload),o)}if(ne(r)||z(r))return d(t,e=e.get(n)||null,r,o,null);Si(t,r)}return null}return function l(u,c,d,g){if("object"==typeof d&&null!==d&&d.type===E&&null===d.key&&(d=d.props.children),"object"==typeof d&&null!==d){switch(d.$$typeof){case w:e:{for(var m=d.key,y=c;null!==y;){if(y.key===m){if((m=d.type)===E){if(7===y.tag){r(u,y.sibling),(c=i(y,d.props.children)).return=u,u=c;break e}}else if(y.elementType===m||"object"==typeof m&&null!==m&&m.$$typeof===A&&Ei(m)===y.type){r(u,y.sibling),(c=i(y,d.props)).ref=wi(u,y,d),c.return=u,u=c;break e}r(u,y);break}t(u,y),y=y.sibling}d.type===E?((c=Mu(d.props.children,u.mode,g,d.key)).return=u,u=c):((g=Fu(d.type,d.key,d.props,null,u.mode,g)).ref=wi(u,c,d),g.return=u,u=g)}return s(u);case S:e:{for(y=d.key;null!==c;){if(c.key===y){if(4===c.tag&&c.stateNode.containerInfo===d.containerInfo&&c.stateNode.implementation===d.implementation){r(u,c.sibling),(c=i(c,d.children||[])).return=u,u=c;break e}r(u,c);break}t(u,c),c=c.sibling}(c=$u(d,u.mode,g)).return=u,u=c}return s(u);case A:return l(u,c,(y=d._init)(d._payload),g)}if(ne(d))return function(n,i,s,l){for(var u=null,c=null,d=i,g=i=0,m=null;null!==d&&g<s.length;g++){d.index>g?(m=d,d=null):m=d.sibling;var y=p(n,d,s[g],l);if(null===y){null===d&&(d=m);break}e&&d&&null===y.alternate&&t(n,d),i=a(y,i,g),null===c?u=y:c.sibling=y,c=y,d=m}if(g===s.length)return r(n,d),ci&&oi(n,g),u;if(null===d){for(;g<s.length;g++)null!==(d=f(n,s[g],l))&&(i=a(d,i,g),null===c?u=d:c.sibling=d,c=d);return ci&&oi(n,g),u}for(d=o(n,d);g<s.length;g++)null!==(m=h(d,n,g,s[g],l))&&(e&&null!==m.alternate&&d.delete(null===m.key?g:m.key),i=a(m,i,g),null===c?u=m:c.sibling=m,c=m);return e&&d.forEach(function(e){return t(n,e)}),ci&&oi(n,g),u}(u,c,d,g);if(z(d))return function(i,s,l,u){var c=z(l);if("function"!=typeof c)throw Error(n(150));if(null==(l=c.call(l)))throw Error(n(151));for(var d=c=null,g=s,m=s=0,y=null,v=l.next();null!==g&&!v.done;m++,v=l.next()){g.index>m?(y=g,g=null):y=g.sibling;var b=p(i,g,v.value,u);if(null===b){null===g&&(g=y);break}e&&g&&null===b.alternate&&t(i,g),s=a(b,s,m),null===d?c=b:d.sibling=b,d=b,g=y}if(v.done)return r(i,g),ci&&oi(i,m),c;if(null===g){for(;!v.done;m++,v=l.next())null!==(v=f(i,v.value,u))&&(s=a(v,s,m),null===d?c=v:d.sibling=v,d=v);return ci&&oi(i,m),c}for(g=o(i,g);!v.done;m++,v=l.next())null!==(v=h(g,i,m,v.value,u))&&(e&&null!==v.alternate&&g.delete(null===v.key?m:v.key),s=a(v,s,m),null===d?c=v:d.sibling=v,d=v);return e&&g.forEach(function(e){return t(i,e)}),ci&&oi(i,m),c}(u,c,d,g);Si(u,d)}return"string"==typeof d&&""!==d||"number"==typeof d?(d=""+d,null!==c&&6===c.tag?(r(u,c.sibling),(c=i(c,d)).return=u,u=c):(r(u,c),(c=Bu(d,u.mode,g)).return=u,u=c),s(u)):r(u,c)}}var Ti=Ci(!0),Oi=Ci(!1),Ni=Lo(null),Pi=null,Li=null,Ri=null;function _i(){Ri=Li=Pi=null}function Ai(e){var t=Ni.current;Ro(Ni),e._currentValue=t}function Ii(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 Di(e,t){Pi=e,Ri=Li=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(Ss=!0),e.firstContext=null)}function zi(e){var t=e._currentValue;if(Ri!==e)if(e={context:e,memoizedValue:t,next:null},null===Li){if(null===Pi)throw Error(n(308));Li=e,Pi.dependencies={lanes:0,firstContext:e}}else Li=Li.next=e;return t}var ji=null;function Fi(e){null===ji?ji=[e]:ji.push(e)}function Mi(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,Fi(t)):(n.next=o.next,o.next=n),t.interleaved=n,Ui(e,r)}function Ui(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 Bi=!1;function $i(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Vi(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 Hi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function qi(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&_l){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Ui(e,n)}return null===(o=r.interleaved)?(t.next=t,Fi(r)):(t.next=o.next,o.next=t),r.interleaved=t,Ui(e,n)}function Wi(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,St(e,n)}}function Ki(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 Qi(e,t,n,r){var o=e.updateQueue;Bi=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var l=s,u=l.next;l.next=null,null===a?i=u:a.next=u,a=l;var c=e.alternate;null!==c&&((s=(c=c.updateQueue).lastBaseUpdate)!==a&&(null===s?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(null!==i){var d=o.baseState;for(a=0,c=u=l=null,s=i;;){var f=s.lane,p=s.eventTime;if((r&f)===f){null!==c&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,g=s;switch(f=t,p=n,g.tag){case 1:if("function"==typeof(h=g.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=g.payload)?h.call(p,d,f):h))break e;d=F({},d,f);break e;case 2:Bi=!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===c?(u=c=p,l=d):c=c.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===c&&(l=d),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,null!==(t=o.shared.interleaved)){o=t;do{a|=o.lane,o=o.next}while(o!==t)}else null===i&&(o.shared.lanes=0);Ul|=a,e.lanes=a,e.memoizedState=d}}function Ji(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 Yi={},Gi=Lo(Yi),Xi=Lo(Yi),Zi=Lo(Yi);function ea(e){if(e===Yi)throw Error(n(174));return e}function ta(e,t){switch(_o(Zi,t),_o(Xi,e),_o(Gi,Yi),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ue(null,"");break;default:t=ue(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Ro(Gi),_o(Gi,t)}function na(){Ro(Gi),Ro(Xi),Ro(Zi)}function ra(e){ea(Zi.current);var t=ea(Gi.current),n=ue(t,e.type);t!==n&&(_o(Xi,e),_o(Gi,n))}function oa(e){Xi.current===e&&(Ro(Gi),Ro(Xi))}var ia=Lo(0);function aa(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 sa=[];function la(){for(var e=0;e<sa.length;e++)sa[e]._workInProgressVersionPrimary=null;sa.length=0}var ua=x.ReactCurrentDispatcher,ca=x.ReactCurrentBatchConfig,da=0,fa=null,pa=null,ha=null,ga=!1,ma=!1,ya=0,va=0;function ba(){throw Error(n(321))}function ka(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!fr(e[n],t[n]))return!1;return!0}function xa(e,t,r,o,i,a){if(da=a,fa=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ua.current=null===e||null===e.memoizedState?os:is,e=r(o,i),ma){a=0;do{if(ma=!1,ya=0,25<=a)throw Error(n(301));a+=1,ha=pa=null,t.updateQueue=null,ua.current=as,e=r(o,i)}while(ma)}if(ua.current=rs,t=null!==pa&&null!==pa.next,da=0,ha=pa=fa=null,ga=!1,t)throw Error(n(300));return e}function wa(){var e=0!==ya;return ya=0,e}function Sa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ha?fa.memoizedState=ha=e:ha=ha.next=e,ha}function Ea(){if(null===pa){var e=fa.alternate;e=null!==e?e.memoizedState:null}else e=pa.next;var t=null===ha?fa.memoizedState:ha.next;if(null!==t)ha=t,pa=e;else{if(null===e)throw Error(n(310));e={memoizedState:(pa=e).memoizedState,baseState:pa.baseState,baseQueue:pa.baseQueue,queue:pa.queue,next:null},null===ha?fa.memoizedState=ha=e:ha=ha.next=e}return ha}function Ca(e,t){return"function"==typeof t?t(e):t}function Ta(e){var t=Ea(),r=t.queue;if(null===r)throw Error(n(311));r.lastRenderedReducer=e;var o=pa,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,u=null,c=a;do{var d=c.lane;if((da&d)===d)null!==u&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),o=c.hasEagerState?c.eagerState:e(o,c.action);else{var f={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===u?(l=u=f,s=o):u=u.next=f,fa.lanes|=d,Ul|=d}c=c.next}while(null!==c&&c!==a);null===u?s=o:u.next=l,fr(o,t.memoizedState)||(Ss=!0),t.memoizedState=o,t.baseState=s,t.baseQueue=u,r.lastRenderedState=o}if(null!==(e=r.interleaved)){i=e;do{a=i.lane,fa.lanes|=a,Ul|=a,i=i.next}while(i!==e)}else null===i&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Oa(e){var t=Ea(),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);fr(a,t.memoizedState)||(Ss=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),r.lastRenderedState=a}return[a,o]}function Na(){}function Pa(e,t){var r=fa,o=Ea(),i=t(),a=!fr(o.memoizedState,i);if(a&&(o.memoizedState=i,Ss=!0),o=o.queue,Ba(_a.bind(null,r,o,e),[e]),o.getSnapshot!==t||a||null!==ha&&1&ha.memoizedState.tag){if(r.flags|=2048,za(9,Ra.bind(null,r,o,i,t),void 0,null),null===Al)throw Error(n(349));30&da||La(r,t,i)}return i}function La(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=fa.updateQueue)?(t={lastEffect:null,stores:null},fa.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ra(e,t,n,r){t.value=n,t.getSnapshot=r,Aa(t)&&Ia(e)}function _a(e,t,n){return n(function(){Aa(t)&&Ia(e)})}function Aa(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!fr(e,n)}catch(r){return!0}}function Ia(e){var t=Ui(e,1);null!==t&&au(t,e,1,-1)}function Da(e){var t=Sa();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ca,lastRenderedState:e},t.queue=e,e=e.dispatch=Za.bind(null,fa,e),[t.memoizedState,e]}function za(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=fa.updateQueue)?(t={lastEffect:null,stores:null},fa.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 ja(){return Ea().memoizedState}function Fa(e,t,n,r){var o=Sa();fa.flags|=e,o.memoizedState=za(1|t,n,void 0,void 0===r?null:r)}function Ma(e,t,n,r){var o=Ea();r=void 0===r?null:r;var i=void 0;if(null!==pa){var a=pa.memoizedState;if(i=a.destroy,null!==r&&ka(r,a.deps))return void(o.memoizedState=za(t,n,i,r))}fa.flags|=e,o.memoizedState=za(1|t,n,i,r)}function Ua(e,t){return Fa(8390656,8,e,t)}function Ba(e,t){return Ma(2048,8,e,t)}function $a(e,t){return Ma(4,2,e,t)}function Va(e,t){return Ma(4,4,e,t)}function Ha(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 qa(e,t,n){return n=null!=n?n.concat([e]):null,Ma(4,4,Ha.bind(null,t,e),n)}function Wa(){}function Ka(e,t){var n=Ea();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ka(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Qa(e,t){var n=Ea();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ka(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ja(e,t,n){return 21&da?(fr(n,t)||(n=kt(),fa.lanes|=n,Ul|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ss=!0),e.memoizedState=n)}function Ya(e,t){var n=Et;Et=0!==n&&4>n?n:4,e(!0);var r=ca.transition;ca.transition={};try{e(!1),t()}finally{Et=n,ca.transition=r}}function Ga(){return Ea().memoizedState}function Xa(e,t,n){var r=iu(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},es(e))ts(t,n);else if(null!==(n=Mi(e,t,n,r))){au(n,e,r,ou()),ns(n,t,r)}}function Za(e,t,n){var r=iu(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(es(e))ts(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,fr(s,a)){var l=t.interleaved;return null===l?(o.next=o,Fi(t)):(o.next=l.next,l.next=o),void(t.interleaved=o)}}catch(Fe){}null!==(n=Mi(e,t,o,r))&&(au(n,e,r,o=ou()),ns(n,t,r))}}function es(e){var t=e.alternate;return e===fa||null!==t&&t===fa}function ts(e,t){ma=ga=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ns(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,St(e,n)}}var rs={readContext:zi,useCallback:ba,useContext:ba,useEffect:ba,useImperativeHandle:ba,useInsertionEffect:ba,useLayoutEffect:ba,useMemo:ba,useReducer:ba,useRef:ba,useState:ba,useDebugValue:ba,useDeferredValue:ba,useTransition:ba,useMutableSource:ba,useSyncExternalStore:ba,useId:ba,unstable_isNewReconciler:!1},os={readContext:zi,useCallback:function(e,t){return Sa().memoizedState=[e,void 0===t?null:t],e},useContext:zi,useEffect:Ua,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Fa(4194308,4,Ha.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fa(4194308,4,e,t)},useInsertionEffect:function(e,t){return Fa(4,2,e,t)},useMemo:function(e,t){var n=Sa();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Sa();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=Xa.bind(null,fa,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Sa().memoizedState=e},useState:Da,useDebugValue:Wa,useDeferredValue:function(e){return Sa().memoizedState=e},useTransition:function(){var e=Da(!1),t=e[0];return e=Ya.bind(null,e[1]),Sa().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var o=fa,i=Sa();if(ci){if(void 0===r)throw Error(n(407));r=r()}else{if(r=t(),null===Al)throw Error(n(349));30&da||La(o,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,Ua(_a.bind(null,o,a,e),[e]),o.flags|=2048,za(9,Ra.bind(null,o,a,r,t),void 0,null),r},useId:function(){var e=Sa(),t=Al.identifierPrefix;if(ci){var n=ri;t=":"+t+"R"+(n=(ni&~(1<<32-dt(ni)-1)).toString(32)+n),0<(n=ya++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=va++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},is={readContext:zi,useCallback:Ka,useContext:zi,useEffect:Ba,useImperativeHandle:qa,useInsertionEffect:$a,useLayoutEffect:Va,useMemo:Qa,useReducer:Ta,useRef:ja,useState:function(){return Ta(Ca)},useDebugValue:Wa,useDeferredValue:function(e){return Ja(Ea(),pa.memoizedState,e)},useTransition:function(){return[Ta(Ca)[0],Ea().memoizedState]},useMutableSource:Na,useSyncExternalStore:Pa,useId:Ga,unstable_isNewReconciler:!1},as={readContext:zi,useCallback:Ka,useContext:zi,useEffect:Ba,useImperativeHandle:qa,useInsertionEffect:$a,useLayoutEffect:Va,useMemo:Qa,useReducer:Oa,useRef:ja,useState:function(){return Oa(Ca)},useDebugValue:Wa,useDeferredValue:function(e){var t=Ea();return null===pa?t.memoizedState=e:Ja(t,pa.memoizedState,e)},useTransition:function(){return[Oa(Ca)[0],Ea().memoizedState]},useMutableSource:Na,useSyncExternalStore:Pa,useId:Ga,unstable_isNewReconciler:!1};function ss(e,t){if(e&&e.defaultProps){for(var n in t=F({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function ls(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:F({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var us={isMounted:function(e){return!!(e=e._reactInternals)&&Ke(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ou(),o=iu(e),i=Hi(r,o);i.payload=t,null!=n&&(i.callback=n),null!==(t=qi(e,i,o))&&(au(t,e,o,r),Wi(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ou(),o=iu(e),i=Hi(r,o);i.tag=1,i.payload=t,null!=n&&(i.callback=n),null!==(t=qi(e,i,o))&&(au(t,e,o,r),Wi(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ou(),r=iu(e),o=Hi(n,r);o.tag=2,null!=t&&(o.callback=t),null!==(t=qi(e,o,r))&&(au(t,e,r,n),Wi(t,e,r))}};function cs(e,t,n,r,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!pr(n,r)||!pr(o,i))}function ds(e,t,n){var r=!1,o=Ao,i=t.contextType;return"object"==typeof i&&null!==i?i=zi(i):(o=Fo(t)?zo:Io.current,i=(r=null!=(r=t.contextTypes))?jo(e,o):Ao),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=us,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function fs(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&&us.enqueueReplaceState(t,t.state,null)}function ps(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},$i(e);var i=t.contextType;"object"==typeof i&&null!==i?o.context=zi(i):(i=Fo(t)?zo:Io.current,o.context=jo(e,i)),o.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(ls(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&&us.enqueueReplaceState(o,o.state,null),Qi(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4194308)}function hs(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 gs(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}var ms="function"==typeof WeakMap?WeakMap:Map;function ys(e,t,n){(n=Hi(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ql||(Ql=!0,Jl=r)},n}function vs(e,t,n){(n=Hi(-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(){}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===Yl?Yl=new Set([this]):Yl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function bs(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ms;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=Pu.bind(null,e,t,n),t.then(e,e))}function ks(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 xs(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=Hi(-1,1)).tag=2,qi(n,t,1))),n.lanes|=1),e)}var ws=x.ReactCurrentOwner,Ss=!1;function Es(e,t,n,r){t.child=null===e?Oi(t,null,n,r):Ti(t,e.child,n,r)}function Cs(e,t,n,r,o){n=n.render;var i=t.ref;return Di(t,o),r=xa(e,t,n,r,i,o),n=wa(),null===e||Ss?(ci&&n&&ai(t),t.flags|=1,Es(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Qs(e,t,o))}function Ts(e,t,n,r,o){if(null===e){var i=n.type;return"function"!=typeof i||zu(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Fu(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,Os(e,t,i,r,o))}if(i=e.child,0===(e.lanes&o)){var a=i.memoizedProps;if((n=null!==(n=n.compare)?n:pr)(a,r)&&e.ref===t.ref)return Qs(e,t,o)}return t.flags|=1,(e=ju(i,r)).ref=t.ref,e.return=t,t.child=e}function Os(e,t,n,r,o){if(null!==e){var i=e.memoizedProps;if(pr(i,r)&&e.ref===t.ref){if(Ss=!1,t.pendingProps=r=i,0===(e.lanes&o))return t.lanes=e.lanes,Qs(e,t,o);131072&e.flags&&(Ss=!0)}}return Ls(e,t,n,r,o)}function Ns(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,_o(jl,zl),zl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==i?i.baseLanes:n,_o(jl,zl),zl|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},_o(jl,zl),zl|=n;else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,_o(jl,zl),zl|=r;return Es(e,t,o,n),t.child}function Ps(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ls(e,t,n,r,o){var i=Fo(n)?zo:Io.current;return i=jo(t,i),Di(t,o),n=xa(e,t,n,r,i,o),r=wa(),null===e||Ss?(ci&&r&&ai(t),t.flags|=1,Es(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Qs(e,t,o))}function Rs(e,t,n,r,o){if(Fo(n)){var i=!0;$o(t)}else i=!1;if(Di(t,o),null===t.stateNode)Ks(e,t),ds(t,n,r),ps(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;"object"==typeof u&&null!==u?u=zi(u):u=jo(t,u=Fo(n)?zo:Io.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==u)&&fs(t,a,r,u),Bi=!1;var f=t.memoizedState;a.state=f,Qi(t,r,a,o),l=t.memoizedState,s!==r||f!==l||Do.current||Bi?("function"==typeof c&&(ls(t,n,c,r),l=t.memoizedState),(s=Bi||cs(t,n,s,r,f,l,u))?(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=u,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Vi(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:ss(t.type,s),a.props=u,d=t.pendingProps,f=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=zi(l):l=jo(t,l=Fo(n)?zo:Io.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||f!==l)&&fs(t,a,r,l),Bi=!1,f=t.memoizedState,a.state=f,Qi(t,r,a,o);var h=t.memoizedState;s!==d||f!==h||Do.current||Bi?("function"==typeof p&&(ls(t,n,p,r),h=t.memoizedState),(u=Bi||cs(t,n,u,r,f,h,l)||!1)?(c||"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=u):("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 _s(e,t,n,r,i,o)}function _s(e,t,n,r,o,i){Ps(e,t);var a=!!(128&t.flags);if(!r&&!a)return o&&Vo(t,n,!1),Qs(e,t,i);r=t.stateNode,ws.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Ti(t,e.child,null,i),t.child=Ti(t,null,s,i)):Es(e,t,s,i),t.memoizedState=r.state,o&&Vo(t,n,!0),t.child}function As(e){var t=e.stateNode;t.pendingContext?Uo(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Uo(0,t.context,!1),ta(e,t.containerInfo)}function Is(e,t,n,r,o){return bi(),ki(o),t.flags|=256,Es(e,t,n,r),t.child}var Ds,zs,js,Fs,Ms={dehydrated:null,treeContext:null,retryLane:0};function Us(e){return{baseLanes:e,cachePool:null,transitions:null}}function Bs(e,t,r){var o,i=t.pendingProps,a=ia.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),_o(ia,1&a),null===e)return gi(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=Uu(l,i,0,null):(s.childLanes=0,s.pendingProps=l),e=Mu(e,i,r,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Us(r),t.memoizedState=Ms,e):$s(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,Vs(e,t,s,o=gs(Error(n(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=o.fallback,i=t.mode,o=Uu({mode:"visible",children:o.children},i,0,null),(a=Mu(a,i,s,null)).flags|=2,o.return=t,a.return=t,o.sibling=a,t.child=o,1&t.mode&&Ti(t,e.child,null,s),t.child.memoizedState=Us(s),t.memoizedState=Ms,a);if(!(1&t.mode))return Vs(e,t,s,null);if("$!"===i.data){if(o=i.nextSibling&&i.nextSibling.dataset)var l=o.dgst;return o=l,Vs(e,t,s,o=gs(a=Error(n(419)),o,void 0))}if(l=0!==(s&e.childLanes),Ss||l){if(null!==(o=Al)){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,Ui(e,i),au(o,e,i,-1))}return bu(),Vs(e,t,s,o=gs(Error(n(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Ru.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,ui=go(i.nextSibling),li=t,ci=!0,di=null,null!==e&&(Zo[ei++]=ni,Zo[ei++]=ri,Zo[ei++]=ti,ni=e.id,ri=e.overflow,ti=t),t=$s(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 u={mode:"hidden",children:i.children};return 1&l||t.child===a?(i=ju(a,u)).subtreeFlags=14680064&a.subtreeFlags:((i=t.child).childLanes=0,i.pendingProps=u,t.deletions=null),null!==o?s=ju(o,s):(s=Mu(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)?Us(r):{baseLanes:l.baseLanes|r,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~r,t.memoizedState=Ms,i}return e=(s=e.child).sibling,i=ju(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 $s(e,t){return(t=Uu({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Vs(e,t,n,r){return null!==r&&ki(r),Ti(t,e.child,null,n),(e=$s(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Hs(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ii(e.return,t,n)}function qs(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 Ws(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Es(e,t,r.children,n),2&(r=ia.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&&Hs(e,n,t);else if(19===e.tag)Hs(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(_o(ia,r),1&t.mode)switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===aa(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),qs(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===aa(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}qs(t,!0,n,null,i);break;case"together":qs(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Ks(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Qs(e,t,r){if(null!==e&&(t.dependencies=e.dependencies),Ul|=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=ju(e=t.child,e.pendingProps),t.child=r,r.return=t;null!==e.sibling;)e=e.sibling,(r=r.sibling=ju(e,e.pendingProps)).return=t;r.sibling=null}return t.child}function Js(e,t){if(!ci)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 Ys(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 Gs(e,t,r){var i=t.pendingProps;switch(si(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ys(t),null;case 1:case 17:return Fo(t.type)&&Mo(),Ys(t),null;case 3:return i=t.stateNode,na(),Ro(Do),Ro(Io),la(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),null!==e&&null!==e.child||(yi(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==di&&(cu(di),di=null))),zs(e,t),Ys(t),null;case 5:oa(t);var a=ea(Zi.current);if(r=t.type,null!==e&&null!=t.stateNode)js(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 Ys(t),null}if(e=ea(Gi.current),yi(t)){i=t.stateNode,r=t.type;var s=t.memoizedProps;switch(i[vo]=t,i[bo]=s,e=!!(1&t.mode),r){case"dialog":Hr("cancel",i),Hr("close",i);break;case"iframe":case"object":case"embed":Hr("load",i);break;case"video":case"audio":for(a=0;a<Ur.length;a++)Hr(Ur[a],i);break;case"source":Hr("error",i);break;case"img":case"image":case"link":Hr("error",i),Hr("load",i);break;case"details":Hr("toggle",i);break;case"input":G(i,s),Hr("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!s.multiple},Hr("invalid",i);break;case"textarea":ie(i,s),Hr("invalid",i)}for(var l in be(r,s),a=null,s)if(s.hasOwnProperty(l)){var u=s[l];"children"===l?"string"==typeof u?i.textContent!==u&&(!0!==s.suppressHydrationWarning&&ro(i.textContent,u,e),a=["children",u]):"number"==typeof u&&i.textContent!==""+u&&(!0!==s.suppressHydrationWarning&&ro(i.textContent,u,e),a=["children",""+u]):o.hasOwnProperty(l)&&null!=u&&"onScroll"===l&&Hr("scroll",i)}switch(r){case"input":K(i),ee(i,s,!0);break;case"textarea":K(i),se(i);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(i.onclick=oo)}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[vo]=t,e[bo]=i,Ds(e,t,!1,!1),t.stateNode=e;e:{switch(l=ke(r,i),r){case"dialog":Hr("cancel",e),Hr("close",e),a=i;break;case"iframe":case"object":case"embed":Hr("load",e),a=i;break;case"video":case"audio":for(a=0;a<Ur.length;a++)Hr(Ur[a],e);a=i;break;case"source":Hr("error",e),a=i;break;case"img":case"image":case"link":Hr("error",e),Hr("load",e),a=i;break;case"details":Hr("toggle",e),a=i;break;case"input":G(e,i),a=Y(e,i),Hr("invalid",e);break;case"option":default:a=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},a=F({},i,{value:void 0}),Hr("invalid",e);break;case"textarea":ie(e,i),a=oe(e,i),Hr("invalid",e)}for(s in be(r,a),u=a)if(u.hasOwnProperty(s)){var c=u[s];"style"===s?ye(e,c):"dangerouslySetInnerHTML"===s?null!=(c=c?c.__html:void 0)&&fe(e,c):"children"===s?"string"==typeof c?("textarea"!==r||""!==c)&&pe(e,c):"number"==typeof c&&pe(e,""+c):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(o.hasOwnProperty(s)?null!=c&&"onScroll"===s&&Hr("scroll",e):null!=c&&b(e,s,c,l))}switch(r){case"input":K(e),ee(e,i,!1);break;case"textarea":K(e),se(e);break;case"option":null!=i.value&&e.setAttribute("value",""+q(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=oo)}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 Ys(t),null;case 6:if(e&&null!=t.stateNode)Fs(e,t,e.memoizedProps,i);else{if("string"!=typeof i&&null===t.stateNode)throw Error(n(166));if(r=ea(Zi.current),ea(Gi.current),yi(t)){if(i=t.stateNode,r=t.memoizedProps,i[vo]=t,(s=i.nodeValue!==r)&&null!==(e=li))switch(e.tag){case 3:ro(i.nodeValue,r,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&ro(i.nodeValue,r,!!(1&e.mode))}s&&(t.flags|=4)}else(i=(9===r.nodeType?r:r.ownerDocument).createTextNode(i))[vo]=t,t.stateNode=i}return Ys(t),null;case 13:if(Ro(ia),i=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ci&&null!==ui&&1&t.mode&&!(128&t.flags))vi(),bi(),t.flags|=98560,s=!1;else if(s=yi(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[vo]=t}else bi(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Ys(t),s=!1}else null!==di&&(cu(di),di=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&ia.current?0===Fl&&(Fl=3):bu())),null!==t.updateQueue&&(t.flags|=4),Ys(t),null);case 4:return na(),zs(e,t),null===e&&Kr(t.stateNode.containerInfo),Ys(t),null;case 10:return Ai(t.type._context),Ys(t),null;case 19:if(Ro(ia),null===(s=t.memoizedState))return Ys(t),null;if(i=!!(128&t.flags),null===(l=s.rendering))if(i)Js(s,!1);else{if(0!==Fl||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(l=aa(e))){for(t.flags|=128,Js(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 _o(ia,1&ia.current|2),t.child}e=e.sibling}null!==s.tail&&nt()>Wl&&(t.flags|=128,i=!0,Js(s,!1),t.lanes=4194304)}else{if(!i)if(null!==(e=aa(l))){if(t.flags|=128,i=!0,null!==(r=e.updateQueue)&&(t.updateQueue=r,t.flags|=4),Js(s,!0),null===s.tail&&"hidden"===s.tailMode&&!l.alternate&&!ci)return Ys(t),null}else 2*nt()-s.renderingStartTime>Wl&&1073741824!==r&&(t.flags|=128,i=!0,Js(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=nt(),t.sibling=null,r=ia.current,_o(ia,i?1&r|2:1&r),t):(Ys(t),null);case 22:case 23:return gu(),i=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==i&&(t.flags|=8192),i&&1&t.mode?!!(1073741824&zl)&&(Ys(t),6&t.subtreeFlags&&(t.flags|=8192)):Ys(t),null;case 24:case 25:return null}throw Error(n(156,t.tag))}function Xs(e,t){switch(si(t),t.tag){case 1:return Fo(t.type)&&Mo(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return na(),Ro(Do),Ro(Io),la(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return oa(t),null;case 13:if(Ro(ia),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(n(340));bi()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Ro(ia),null;case 4:return na(),null;case 10:return Ai(t.type._context),null;case 22:case 23:return gu(),null;default:return null}}Ds=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}},zs=function(){},js=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,ea(Gi.current);var a,s=null;switch(n){case"input":i=Y(e,i),r=Y(e,r),s=[];break;case"select":i=F({},i,{value:void 0}),r=F({},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=oo)}for(c in be(n,r),n=null,i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var l=i[c];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(o.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var u=r[c];if(l=null!=i?i[c]:void 0,r.hasOwnProperty(c)&&u!==l&&(null!=u||null!=l))if("style"===c)if(l){for(a in l)!l.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&l[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(s||(s=[]),s.push(c,n)),n=u;else"dangerouslySetInnerHTML"===c?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(s=s||[]).push(c,u)):"children"===c?"string"!=typeof u&&"number"!=typeof u||(s=s||[]).push(c,""+u):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(o.hasOwnProperty(c)?(null!=u&&"onScroll"===c&&Hr("scroll",e),s||l===u||(s=[])):(s=s||[]).push(c,u))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}},Fs=function(e,t,n,r){n!==r&&(t.flags|=4)};var Zs=!1,el=!1,tl="function"==typeof WeakSet?WeakSet:Set,nl=null;function rl(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(r){Nu(e,t,r)}else n.current=null}function ol(e,t,n){try{n()}catch(r){Nu(e,t,r)}}var il=!1;function al(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&&ol(t,n,i)}o=o.next}while(o!==r)}}function sl(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 ll(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 ul(e){var t=e.alternate;null!==t&&(e.alternate=null,ul(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[vo],delete t[bo],delete t[xo],delete t[wo],delete t[So])),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 cl(e){return 5===e.tag||3===e.tag||4===e.tag}function dl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||cl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(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 fl(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=oo));else if(4!==r&&null!==(e=e.child))for(fl(e,t,n),e=e.sibling;null!==e;)fl(e,t,n),e=e.sibling}function pl(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(pl(e,t,n),e=e.sibling;null!==e;)pl(e,t,n),e=e.sibling}var hl=null,gl=!1;function ml(e,t,n){for(n=n.child;null!==n;)yl(e,t,n),n=n.sibling}function yl(e,t,n){if(ct&&"function"==typeof ct.onCommitFiberUnmount)try{ct.onCommitFiberUnmount(ut,n)}catch(s){}switch(n.tag){case 5:el||rl(n,t);case 6:var r=hl,o=gl;hl=null,ml(e,t,n),gl=o,null!==(hl=r)&&(gl?(e=hl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):hl.removeChild(n.stateNode));break;case 18:null!==hl&&(gl?(e=hl,n=n.stateNode,8===e.nodeType?ho(e.parentNode,n):1===e.nodeType&&ho(e,n),Kt(e)):ho(hl,n.stateNode));break;case 4:r=hl,o=gl,hl=n.stateNode.containerInfo,gl=!0,ml(e,t,n),hl=r,gl=o;break;case 0:case 11:case 14:case 15:if(!el&&(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)&&ol(n,t,a),o=o.next}while(o!==r)}ml(e,t,n);break;case 1:if(!el&&(rl(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Nu(n,t,s)}ml(e,t,n);break;case 21:ml(e,t,n);break;case 22:1&n.mode?(el=(r=el)||null!==n.memoizedState,ml(e,t,n),el=r):ml(e,t,n);break;default:ml(e,t,n)}}function vl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new tl),t.forEach(function(t){var r=_u.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function bl(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:hl=l.stateNode,gl=!1;break e;case 3:case 4:hl=l.stateNode.containerInfo,gl=!0;break e}l=l.return}if(null===hl)throw Error(n(160));yl(a,s,i),hl=null,gl=!1;var u=i.alternate;null!==u&&(u.return=null),i.return=null}catch(Fe){Nu(i,t,Fe)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)kl(t,e),t=t.sibling}function kl(e,t){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(bl(t,e),xl(e),4&o){try{al(3,e,e.return),sl(3,e)}catch(ze){Nu(e,e.return,ze)}try{al(5,e,e.return)}catch(ze){Nu(e,e.return,ze)}}break;case 1:bl(t,e),xl(e),512&o&&null!==r&&rl(r,r.return);break;case 5:if(bl(t,e),xl(e),512&o&&null!==r&&rl(r,r.return),32&e.flags){var i=e.stateNode;try{pe(i,"")}catch(ze){Nu(e,e.return,ze)}}if(4&o&&null!=(i=e.stateNode)){var a=e.memoizedProps,s=null!==r?r.memoizedProps:a,l=e.type,u=e.updateQueue;if(e.updateQueue=null,null!==u)try{"input"===l&&"radio"===a.type&&null!=a.name&&X(i,a),ke(l,s);var c=ke(l,a);for(s=0;s<u.length;s+=2){var d=u[s],f=u[s+1];"style"===d?ye(i,f):"dangerouslySetInnerHTML"===d?fe(i,f):"children"===d?pe(i,f):b(i,d,f,c)}switch(l){case"input":Z(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[bo]=a}catch(ze){Nu(e,e.return,ze)}}break;case 6:if(bl(t,e),xl(e),4&o){if(null===e.stateNode)throw Error(n(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(ze){Nu(e,e.return,ze)}}break;case 3:if(bl(t,e),xl(e),4&o&&null!==r&&r.memoizedState.isDehydrated)try{Kt(t.containerInfo)}catch(ze){Nu(e,e.return,ze)}break;case 4:default:bl(t,e),xl(e);break;case 13:bl(t,e),xl(e),8192&(i=e.child).flags&&(a=null!==i.memoizedState,i.stateNode.isHidden=a,!a||null!==i.alternate&&null!==i.alternate.memoizedState||(ql=nt())),4&o&&vl(e);break;case 22:if(d=null!==r&&null!==r.memoizedState,1&e.mode?(el=(c=el)||d,bl(t,e),el=c):bl(t,e),xl(e),8192&o){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!d&&1&e.mode)for(nl=e,d=e.child;null!==d;){for(f=nl=d;null!==nl;){switch(h=(p=nl).child,p.tag){case 0:case 11:case 14:case 15:al(4,p,p.return);break;case 1:rl(p,p.return);var g=p.stateNode;if("function"==typeof g.componentWillUnmount){o=p,r=p.return;try{t=o,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(ze){Nu(o,r,ze)}}break;case 5:rl(p,p.return);break;case 22:if(null!==p.memoizedState){Cl(f);continue}}null!==h?(h.return=p,nl=h):Cl(f)}d=d.sibling}e:for(d=null,f=e;;){if(5===f.tag){if(null===d){d=f;try{i=f.stateNode,c?"function"==typeof(a=i.style).setProperty?a.setProperty("display","none","important"):a.display="none":(l=f.stateNode,s=null!=(u=f.memoizedProps.style)&&u.hasOwnProperty("display")?u.display:null,l.style.display=me("display",s))}catch(ze){Nu(e,e.return,ze)}}}else if(6===f.tag){if(null===d)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(ze){Nu(e,e.return,ze)}}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:bl(t,e),xl(e),4&o&&vl(e);case 21:}}function xl(e){var t=e.flags;if(2&t){try{e:{for(var r=e.return;null!==r;){if(cl(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),pl(e,dl(e),i);break;case 3:case 4:var a=o.stateNode.containerInfo;fl(e,dl(e),a);break;default:throw Error(n(161))}}catch(s){Nu(e,e.return,s)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function wl(e,t,n){nl=e,Sl(e)}function Sl(e,t,n){for(var r=!!(1&e.mode);null!==nl;){var o=nl,i=o.child;if(22===o.tag&&r){var a=null!==o.memoizedState||Zs;if(!a){var s=o.alternate,l=null!==s&&null!==s.memoizedState||el;s=Zs;var u=el;if(Zs=a,(el=l)&&!u)for(nl=o;null!==nl;)l=(a=nl).child,22===a.tag&&null!==a.memoizedState?Tl(o):null!==l?(l.return=a,nl=l):Tl(o);for(;null!==i;)nl=i,Sl(i),i=i.sibling;nl=o,Zs=s,el=u}El(e)}else 8772&o.subtreeFlags&&null!==i?(i.return=o,nl=i):El(e)}}function El(e){for(;null!==nl;){var t=nl;if(8772&t.flags){var r=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:el||sl(5,t);break;case 1:var o=t.stateNode;if(4&t.flags&&!el)if(null===r)o.componentDidMount();else{var i=t.elementType===t.type?r.memoizedProps:ss(t.type,r.memoizedProps);o.componentDidUpdate(i,r.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Ji(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}Ji(t,s,r)}break;case 5:var l=t.stateNode;if(null===r&&4&t.flags){r=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&r.focus();break;case"img":u.src&&(r.src=u.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 c=t.alternate;if(null!==c){var d=c.memoizedState;if(null!==d){var f=d.dehydrated;null!==f&&Kt(f)}}}break;default:throw Error(n(163))}el||512&t.flags&&ll(t)}catch(je){Nu(t,t.return,je)}}if(t===e){nl=null;break}if(null!==(r=t.sibling)){r.return=t.return,nl=r;break}nl=t.return}}function Cl(e){for(;null!==nl;){var t=nl;if(t===e){nl=null;break}var n=t.sibling;if(null!==n){n.return=t.return,nl=n;break}nl=t.return}}function Tl(e){for(;null!==nl;){var t=nl;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{sl(4,t)}catch(l){Nu(t,n,l)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(l){Nu(t,o,l)}}var i=t.return;try{ll(t)}catch(l){Nu(t,i,l)}break;case 5:var a=t.return;try{ll(t)}catch(l){Nu(t,a,l)}}}catch(l){Nu(t,t.return,l)}if(t===e){nl=null;break}var s=t.sibling;if(null!==s){s.return=t.return,nl=s;break}nl=t.return}}var Ol,Nl=Math.ceil,Pl=x.ReactCurrentDispatcher,Ll=x.ReactCurrentOwner,Rl=x.ReactCurrentBatchConfig,_l=0,Al=null,Il=null,Dl=0,zl=0,jl=Lo(0),Fl=0,Ml=null,Ul=0,Bl=0,$l=0,Vl=null,Hl=null,ql=0,Wl=1/0,Kl=null,Ql=!1,Jl=null,Yl=null,Gl=!1,Xl=null,Zl=0,eu=0,tu=null,nu=-1,ru=0;function ou(){return 6&_l?nt():-1!==nu?nu:nu=nt()}function iu(e){return 1&e.mode?2&_l&&0!==Dl?Dl&-Dl:null!==xi.transition?(0===ru&&(ru=kt()),ru):0!==(e=Et)?e:e=void 0===(e=window.event)?16:tn(e.type):1}function au(e,t,r,o){if(50<eu)throw eu=0,tu=null,Error(n(185));wt(e,r,o),2&_l&&e===Al||(e===Al&&(!(2&_l)&&(Bl|=r),4===Fl&&du(e,Dl)),su(e,o),1===r&&0===_l&&!(1&t.mode)&&(Wl=nt()+500,qo&&Qo()))}function su(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-dt(i),s=1<<a,l=o[a];-1===l?0!==(s&n)&&0===(s&r)||(o[a]=vt(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}}(e,t);var r=yt(e,e===Al?Dl:0);if(0===r)null!==n&&Ze(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ze(n),1===t)0===e.tag?function(e){qo=!0,Ko(e)}(fu.bind(null,e)):Ko(fu.bind(null,e)),fo(function(){!(6&_l)&&Qo()}),n=null;else{switch(Ct(r)){case 1:n=ot;break;case 4:n=it;break;case 16:default:n=at;break;case 536870912:n=lt}n=Au(n,lu.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function lu(e,t){if(nu=-1,ru=0,6&_l)throw Error(n(327));var r=e.callbackNode;if(Tu()&&e.callbackNode!==r)return null;var o=yt(e,e===Al?Dl:0);if(0===o)return null;if(30&o||0!==(o&e.expiredLanes)||t)t=ku(e,o);else{t=o;var i=_l;_l|=2;var a=vu();for(Al===e&&Dl===t||(Kl=null,Wl=nt()+500,mu(e,t));;)try{wu();break}catch(l){yu(e,l)}_i(),Pl.current=a,_l=i,null!==Il?t=0:(Al=null,Dl=0,t=Fl)}if(0!==t){if(2===t&&(0!==(i=bt(e))&&(o=i,t=uu(e,i))),1===t)throw r=Ml,mu(e,0),du(e,o),su(e,nt()),r;if(6===t)du(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(!fr(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=ku(e,o),2===t&&(a=bt(e),0!==a&&(o=a,t=uu(e,a))),1!==t)))throw r=Ml,mu(e,0),du(e,o),su(e,nt()),r;switch(e.finishedWork=i,e.finishedLanes=o,t){case 0:case 1:throw Error(n(345));case 2:case 5:Cu(e,Hl,Kl);break;case 3:if(du(e,o),(130023424&o)===o&&10<(t=ql+500-nt())){if(0!==yt(e,0))break;if(((i=e.suspendedLanes)&o)!==o){ou(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=lo(Cu.bind(null,e,Hl,Kl),t);break}Cu(e,Hl,Kl);break;case 4:if(du(e,o),(4194240&o)===o)break;for(t=e.eventTimes,i=-1;0<o;){var s=31-dt(o);a=1<<s,(s=t[s])>i&&(i=s),o&=~a}if(o=i,10<(o=(120>(o=nt()-o)?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*Nl(o/1960))-o)){e.timeoutHandle=lo(Cu.bind(null,e,Hl,Kl),o);break}Cu(e,Hl,Kl);break;default:throw Error(n(329))}}}return su(e,nt()),e.callbackNode===r?lu.bind(null,e):null}function uu(e,t){var n=Vl;return e.current.memoizedState.isDehydrated&&(mu(e,t).flags|=256),2!==(e=ku(e,t))&&(t=Hl,Hl=n,null!==t&&cu(t)),e}function cu(e){null===Hl?Hl=e:Hl.push.apply(Hl,e)}function du(e,t){for(t&=~$l,t&=~Bl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-dt(t),r=1<<n;e[n]=-1,t&=~r}}function fu(e){if(6&_l)throw Error(n(327));Tu();var t=yt(e,0);if(!(1&t))return su(e,nt()),null;var r=ku(e,t);if(0!==e.tag&&2===r){var o=bt(e);0!==o&&(t=o,r=uu(e,o))}if(1===r)throw r=Ml,mu(e,0),du(e,t),su(e,nt()),r;if(6===r)throw Error(n(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Cu(e,Hl,Kl),su(e,nt()),null}function pu(e,t){var n=_l;_l|=1;try{return e(t)}finally{0===(_l=n)&&(Wl=nt()+500,qo&&Qo())}}function hu(e){null!==Xl&&0===Xl.tag&&!(6&_l)&&Tu();var t=_l;_l|=1;var n=Rl.transition,r=Et;try{if(Rl.transition=null,Et=1,e)return e()}finally{Et=r,Rl.transition=n,!(6&(_l=t))&&Qo()}}function gu(){zl=jl.current,Ro(jl)}function mu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,uo(n)),null!==Il)for(n=Il.return;null!==n;){var r=n;switch(si(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Mo();break;case 3:na(),Ro(Do),Ro(Io),la();break;case 5:oa(r);break;case 4:na();break;case 13:case 19:Ro(ia);break;case 10:Ai(r.type._context);break;case 22:case 23:gu()}n=n.return}if(Al=e,Il=e=ju(e.current,null),Dl=zl=t,Fl=0,Ml=null,$l=Bl=Ul=0,Hl=Vl=null,null!==ji){for(t=0;t<ji.length;t++)if(null!==(r=(n=ji[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}ji=null}return e}function yu(e,t){for(;;){var r=Il;try{if(_i(),ua.current=rs,ga){for(var o=fa.memoizedState;null!==o;){var i=o.queue;null!==i&&(i.pending=null),o=o.next}ga=!1}if(da=0,ha=pa=fa=null,ma=!1,ya=0,Ll.current=null,null===r||null===r.return){Fl=1,Ml=t,Il=null;break}e:{var a=e,s=r.return,l=r,u=t;if(t=Dl,l.flags|=32768,null!==u&&"object"==typeof u&&"function"==typeof u.then){var c=u,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=ks(s);if(null!==h){h.flags&=-257,xs(h,s,l,0,t),1&h.mode&&bs(a,c,t),u=c;var g=(t=h).updateQueue;if(null===g){var m=new Set;m.add(u),t.updateQueue=m}else g.add(u);break e}if(!(1&t)){bs(a,c,t),bu();break e}u=Error(n(426))}else if(ci&&1&l.mode){var y=ks(s);if(null!==y){!(65536&y.flags)&&(y.flags|=256),xs(y,s,l,0,t),ki(hs(u,l));break e}}a=u=hs(u,l),4!==Fl&&(Fl=2),null===Vl?Vl=[a]:Vl.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Ki(a,ys(0,u,t));break e;case 1:l=u;var v=a.type,b=a.stateNode;if(!(128&a.flags||"function"!=typeof v.getDerivedStateFromError&&(null===b||"function"!=typeof b.componentDidCatch||null!==Yl&&Yl.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t,Ki(a,vs(a,l,t));break e}}a=a.return}while(null!==a)}Eu(r)}catch(k){t=k,Il===r&&null!==r&&(Il=r=r.return);continue}break}}function vu(){var e=Pl.current;return Pl.current=rs,null===e?rs:e}function bu(){0!==Fl&&3!==Fl&&2!==Fl||(Fl=4),null===Al||!(268435455&Ul)&&!(268435455&Bl)||du(Al,Dl)}function ku(e,t){var r=_l;_l|=2;var o=vu();for(Al===e&&Dl===t||(Kl=null,mu(e,t));;)try{xu();break}catch(De){yu(e,De)}if(_i(),_l=r,Pl.current=o,null!==Il)throw Error(n(261));return Al=null,Dl=0,Fl}function xu(){for(;null!==Il;)Su(Il)}function wu(){for(;null!==Il&&!et();)Su(Il)}function Su(e){var t=Ol(e.alternate,e,zl);e.memoizedProps=e.pendingProps,null===t?Eu(e):Il=t,Ll.current=null}function Eu(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Xs(n,t)))return n.flags&=32767,void(Il=n);if(null===e)return Fl=6,void(Il=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Gs(n,t,zl)))return void(Il=n);if(null!==(t=t.sibling))return void(Il=t);Il=t=e}while(null!==t);0===Fl&&(Fl=5)}function Cu(e,t,r){var o=Et,i=Rl.transition;try{Rl.transition=null,Et=1,function(e,t,r,o){do{Tu()}while(null!==Xl);if(6&_l)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-dt(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}(e,a),e===Al&&(Il=Al=null,Dl=0),!(2064&r.subtreeFlags)&&!(2064&r.flags)||Gl||(Gl=!0,Au(at,function(){return Tu(),null})),a=!!(15990&r.flags),!!(15990&r.subtreeFlags)||a){a=Rl.transition,Rl.transition=null;var s=Et;Et=1;var l=_l;_l|=4,Ll.current=null,function(e,t){if(io=Jt,vr(e=yr())){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,u=-1,c=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||(u=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&&++c===i&&(l=s),p===a&&++d===o&&(u=s),null!==(h=f.nextSibling))break;p=(f=p).parentNode}f=h}r=-1===l||-1===u?null:{start:l,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(ao={focusedElem:e,selectionRange:r},Jt=!1,nl=t;null!==nl;)if(e=(t=nl).child,1028&t.subtreeFlags&&null!==e)e.return=t,nl=e;else for(;null!==nl;){t=nl;try{var g=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!==g){var m=g.memoizedProps,y=g.memoizedState,v=t.stateNode,b=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:ss(t.type,m),y);v.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var k=t.stateNode.containerInfo;1===k.nodeType?k.textContent="":9===k.nodeType&&k.documentElement&&k.removeChild(k.documentElement);break;default:throw Error(n(163))}}catch(x){Nu(t,t.return,x)}if(null!==(e=t.sibling)){e.return=t.return,nl=e;break}nl=t.return}g=il,il=!1}(e,r),kl(r,e),br(ao),Jt=!!io,ao=io=null,e.current=r,wl(r),tt(),_l=l,Et=s,Rl.transition=a}else e.current=r;if(Gl&&(Gl=!1,Xl=e,Zl=i),a=e.pendingLanes,0===a&&(Yl=null),function(e){if(ct&&"function"==typeof ct.onCommitFiberRoot)try{ct.onCommitFiberRoot(ut,e,void 0,!(128&~e.current.flags))}catch(t){}}(r.stateNode),su(e,nt()),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(Ql)throw Ql=!1,e=Jl,Jl=null,e;!!(1&Zl)&&0!==e.tag&&Tu(),a=e.pendingLanes,1&a?e===tu?eu++:(eu=0,tu=e):eu=0,Qo()}(e,t,r,o)}finally{Rl.transition=i,Et=o}return null}function Tu(){if(null!==Xl){var e=Ct(Zl),t=Rl.transition,r=Et;try{if(Rl.transition=null,Et=16>e?16:e,null===Xl)var o=!1;else{if(e=Xl,Xl=null,Zl=0,6&_l)throw Error(n(331));var i=_l;for(_l|=4,nl=e.current;null!==nl;){var a=nl,s=a.child;if(16&nl.flags){var l=a.deletions;if(null!==l){for(var u=0;u<l.length;u++){var c=l[u];for(nl=c;null!==nl;){var d=nl;switch(d.tag){case 0:case 11:case 15:al(8,d,a)}var f=d.child;if(null!==f)f.return=d,nl=f;else for(;null!==nl;){var p=(d=nl).sibling,h=d.return;if(ul(d),d===c){nl=null;break}if(null!==p){p.return=h,nl=p;break}nl=h}}}var g=a.alternate;if(null!==g){var m=g.child;if(null!==m){g.child=null;do{var y=m.sibling;m.sibling=null,m=y}while(null!==m)}}nl=a}}if(2064&a.subtreeFlags&&null!==s)s.return=a,nl=s;else e:for(;null!==nl;){if(2048&(a=nl).flags)switch(a.tag){case 0:case 11:case 15:al(9,a,a.return)}var v=a.sibling;if(null!==v){v.return=a.return,nl=v;break e}nl=a.return}}var b=e.current;for(nl=b;null!==nl;){var k=(s=nl).child;if(2064&s.subtreeFlags&&null!==k)k.return=s,nl=k;else e:for(s=b;null!==nl;){if(2048&(l=nl).flags)try{switch(l.tag){case 0:case 11:case 15:sl(9,l)}}catch(w){Nu(l,l.return,w)}if(l===s){nl=null;break e}var x=l.sibling;if(null!==x){x.return=l.return,nl=x;break e}nl=l.return}}if(_l=i,Qo(),ct&&"function"==typeof ct.onPostCommitFiberRoot)try{ct.onPostCommitFiberRoot(ut,e)}catch(w){}o=!0}return o}finally{Et=r,Rl.transition=t}}return!1}function Ou(e,t,n){e=qi(e,t=ys(0,t=hs(n,t),1),1),t=ou(),null!==e&&(wt(e,1,t),su(e,t))}function Nu(e,t,n){if(3===e.tag)Ou(e,e,n);else for(;null!==t;){if(3===t.tag){Ou(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Yl||!Yl.has(r))){t=qi(t,e=vs(t,e=hs(n,e),1),1),e=ou(),null!==t&&(wt(t,1,e),su(t,e));break}}t=t.return}}function Pu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=ou(),e.pingedLanes|=e.suspendedLanes&n,Al===e&&(Dl&n)===n&&(4===Fl||3===Fl&&(130023424&Dl)===Dl&&500>nt()-ql?mu(e,0):$l|=n),su(e,t)}function Lu(e,t){0===t&&(1&e.mode?(t=gt,!(130023424&(gt<<=1))&&(gt=4194304)):t=1);var n=ou();null!==(e=Ui(e,t))&&(wt(e,t,n),su(e,n))}function Ru(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Lu(e,n)}function _u(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),Lu(e,r)}function Au(e,t){return Xe(e,t)}function Iu(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 Du(e,t,n,r){return new Iu(e,t,n,r)}function zu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function ju(e,t){var n=e.alternate;return null===n?((n=Du(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 Fu(e,t,r,o,i,a){var s=2;if(o=e,"function"==typeof e)zu(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case E:return Mu(r.children,i,a,t);case C:s=8,i|=8;break;case T:return(e=Du(12,r,t,2|i)).elementType=T,e.lanes=a,e;case L:return(e=Du(13,r,t,i)).elementType=L,e.lanes=a,e;case R:return(e=Du(19,r,t,i)).elementType=R,e.lanes=a,e;case I:return Uu(r,i,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case O:s=10;break e;case N:s=9;break e;case P:s=11;break e;case _:s=14;break e;case A:s=16,o=null;break e}throw Error(n(130,null==e?e:typeof e,""))}return(t=Du(s,r,t,i)).elementType=e,t.type=o,t.lanes=a,t}function Mu(e,t,n,r){return(e=Du(7,e,r,t)).lanes=n,e}function Uu(e,t,n,r){return(e=Du(22,e,r,t)).elementType=I,e.lanes=n,e.stateNode={isHidden:!1},e}function Bu(e,t,n){return(e=Du(6,e,null,t)).lanes=n,e}function $u(e,t,n){return(t=Du(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Vu(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=xt(0),this.expirationTimes=xt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xt(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Hu(e,t,n,r,o,i,a,s,l){return e=new Vu(e,t,n,s,l),1===t?(t=1,!0===i&&(t|=8)):t=0,i=Du(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},$i(i),e}function qu(e){if(!e)return Ao;e:{if(Ke(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(Fo(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(Fo(r))return Bo(e,r,t)}return t}function Wu(e,t,n,r,o,i,a,s,l){return(e=Hu(n,r,!0,e,0,i,0,s,l)).context=qu(null),n=e.current,(i=Hi(r=ou(),o=iu(n))).callback=null!=t?t:null,qi(n,i,o),e.current.lanes=o,wt(e,o,r),su(e,r),e}function Ku(e,t,n,r){var o=t.current,i=ou(),a=iu(o);return n=qu(n),null===t.context?t.context=n:t.pendingContext=n,(t=Hi(i,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=qi(o,t,a))&&(au(e,o,a,i),Wi(e,o,a)),a}function Qu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Ju(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Yu(e,t){Ju(e,t),(e=e.alternate)&&Ju(e,t)}Ol=function(e,t,r){if(null!==e)if(e.memoizedProps!==t.pendingProps||Do.current)Ss=!0;else{if(0===(e.lanes&r)&&!(128&t.flags))return Ss=!1,function(e,t,n){switch(t.tag){case 3:As(t),bi();break;case 5:ra(t);break;case 1:Fo(t.type)&&$o(t);break;case 4:ta(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;_o(Ni,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(_o(ia,1&ia.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Bs(e,t,n):(_o(ia,1&ia.current),null!==(e=Qs(e,t,n))?e.sibling:null);_o(ia,1&ia.current);break;case 19:if(r=0!==(n&t.childLanes),128&e.flags){if(r)return Ws(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),_o(ia,ia.current),r)break;return null;case 22:case 23:return t.lanes=0,Ns(e,t,n)}return Qs(e,t,n)}(e,t,r);Ss=!!(131072&e.flags)}else Ss=!1,ci&&1048576&t.flags&&ii(t,Xo,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;Ks(e,t),e=t.pendingProps;var i=jo(t,Io.current);Di(t,r),i=xa(null,t,o,e,i,r);var a=wa();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,Fo(o)?(a=!0,$o(t)):a=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,$i(t),i.updater=us,t.stateNode=i,i._reactInternals=t,ps(t,o,e,r),t=_s(null,t,o,!0,a,r)):(t.tag=0,ci&&a&&ai(t),Es(null,t,i,r),t=t.child),t;case 16:o=t.elementType;e:{switch(Ks(e,t),e=t.pendingProps,o=(i=o._init)(o._payload),t.type=o,i=t.tag=function(e){if("function"==typeof e)return zu(e)?1:0;if(null!=e){if((e=e.$$typeof)===P)return 11;if(e===_)return 14}return 2}(o),e=ss(o,e),i){case 0:t=Ls(null,t,o,e,r);break e;case 1:t=Rs(null,t,o,e,r);break e;case 11:t=Cs(null,t,o,e,r);break e;case 14:t=Ts(null,t,o,ss(o.type,e),r);break e}throw Error(n(306,o,""))}return t;case 0:return o=t.type,i=t.pendingProps,Ls(e,t,o,i=t.elementType===o?i:ss(o,i),r);case 1:return o=t.type,i=t.pendingProps,Rs(e,t,o,i=t.elementType===o?i:ss(o,i),r);case 3:e:{if(As(t),null===e)throw Error(n(387));o=t.pendingProps,i=(a=t.memoizedState).element,Vi(e,t),Qi(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=Is(e,t,o,r,i=hs(Error(n(423)),t));break e}if(o!==i){t=Is(e,t,o,r,i=hs(Error(n(424)),t));break e}for(ui=go(t.stateNode.containerInfo.firstChild),li=t,ci=!0,di=null,r=Oi(t,null,o,r),t.child=r;r;)r.flags=-3&r.flags|4096,r=r.sibling}else{if(bi(),o===i){t=Qs(e,t,r);break e}Es(e,t,o,r)}t=t.child}return t;case 5:return ra(t),null===e&&gi(t),o=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,s=i.children,so(o,i)?s=null:null!==a&&so(o,a)&&(t.flags|=32),Ps(e,t),Es(e,t,s,r),t.child;case 6:return null===e&&gi(t),null;case 13:return Bs(e,t,r);case 4:return ta(t,t.stateNode.containerInfo),o=t.pendingProps,null===e?t.child=Ti(t,null,o,r):Es(e,t,o,r),t.child;case 11:return o=t.type,i=t.pendingProps,Cs(e,t,o,i=t.elementType===o?i:ss(o,i),r);case 7:return Es(e,t,t.pendingProps,r),t.child;case 8:case 12:return Es(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,_o(Ni,o._currentValue),o._currentValue=s,null!==a)if(fr(a.value,s)){if(a.children===i.children&&!Do.current){t=Qs(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 u=l.firstContext;null!==u;){if(u.context===o){if(1===a.tag){(u=Hi(-1,r&-r)).tag=2;var c=a.updateQueue;if(null!==c){var d=(c=c.shared).pending;null===d?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}a.lanes|=r,null!==(u=a.alternate)&&(u.lanes|=r),Ii(a.return,r,t),l.lanes|=r;break}u=u.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),Ii(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}Es(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,o=t.pendingProps.children,Di(t,r),o=o(i=zi(i)),t.flags|=1,Es(e,t,o,r),t.child;case 14:return i=ss(o=t.type,t.pendingProps),Ts(e,t,o,i=ss(o.type,i),r);case 15:return Os(e,t,t.type,t.pendingProps,r);case 17:return o=t.type,i=t.pendingProps,i=t.elementType===o?i:ss(o,i),Ks(e,t),t.tag=1,Fo(o)?(e=!0,$o(t)):e=!1,Di(t,r),ds(t,o,i),ps(t,o,i,r),_s(null,t,o,!0,e,r);case 19:return Ws(e,t,r);case 22:return Ns(e,t,r)}throw Error(n(156,t.tag))};var Gu="function"==typeof reportError?reportError:function(e){};function Xu(e){this._internalRoot=e}function Zu(e){this._internalRoot=e}function ec(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function tc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function nc(){}function rc(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=Qu(a);s.call(e)}}Ku(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=Qu(a);i.call(e)}}var a=Wu(t,r,e,0,null,!1,0,"",nc);return e._reactRootContainer=a,e[ko]=a.current,Kr(8===e.nodeType?e.parentNode:e),hu(),a}for(;o=e.lastChild;)e.removeChild(o);if("function"==typeof r){var s=r;r=function(){var e=Qu(l);s.call(e)}}var l=Hu(e,0,!1,null,0,!1,0,"",nc);return e._reactRootContainer=l,e[ko]=l.current,Kr(8===e.nodeType?e.parentNode:e),hu(function(){Ku(t,l,n,r)}),l}(n,t,e,o,r);return Qu(a)}Zu.prototype.render=Xu.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(n(409));Ku(e,t,null,null)},Zu.prototype.unmount=Xu.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;hu(function(){Ku(null,e,null,null)}),t[ko]=null}},Zu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Pt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ft.length&&0!==t&&t<Ft[n].priority;n++);Ft.splice(n,0,e),0===n&&$t(e)}},Tt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=mt(t.pendingLanes);0!==n&&(St(t,1|n),su(t,nt()),!(6&_l)&&(Wl=nt()+500,Qo()))}break;case 13:hu(function(){var t=Ui(e,1);if(null!==t){var n=ou();au(t,e,1,n)}}),Yu(e,1)}},Ot=function(e){if(13===e.tag){var t=Ui(e,134217728);if(null!==t)au(t,e,134217728,ou());Yu(e,134217728)}},Nt=function(e){if(13===e.tag){var t=iu(e),n=Ui(e,t);if(null!==n)au(n,e,t,ou());Yu(e,t)}},Pt=function(){return Et},Lt=function(e,t){var n=Et;try{return Et=e,t()}finally{Et=n}},Se=function(e,t,r){switch(t){case"input":if(Z(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=Oo(o);if(!i)throw Error(n(90));Q(o),Z(o,i)}}}break;case"textarea":ae(e,r);break;case"select":null!=(t=r.value)&&re(e,!!r.multiple,t,!1)}},Pe=pu,Le=hu;var oc={usingClientEntryPoint:!1,Events:[Co,To,Oo,Oe,Ne,pu]},ic={findFiberByHostInstance:Eo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ac={bundleType:ic.bundleType,version:ic.version,rendererPackageName:ic.rendererPackageName,rendererConfig:ic.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=Ye(e))?null:e.stateNode},findFiberByHostInstance:ic.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 sc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sc.isDisabled&&sc.supportsFiber)try{ut=sc.inject(ac),ct=sc}catch(de){}}return y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oc,y.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ec(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)},y.createRoot=function(e,t){if(!ec(e))throw Error(n(299));var r=!1,o="",i=Gu;return null!=t&&(!0===t.unstable_strictMode&&(r=!0),void 0!==t.identifierPrefix&&(o=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Hu(e,1,!1,null,0,r,0,o,i),e[ko]=t.current,Kr(8===e.nodeType?e.parentNode:e),new Xu(t)},y.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=Ye(t))?null:e.stateNode},y.flushSync=function(e){return hu(e)},y.hydrate=function(e,t,r){if(!tc(t))throw Error(n(200));return rc(null,e,t,!0,r)},y.hydrateRoot=function(e,t,r){if(!ec(e))throw Error(n(405));var o=null!=r&&r.hydratedSources||null,i=!1,a="",s=Gu;if(null!=r&&(!0===r.unstable_strictMode&&(i=!0),void 0!==r.identifierPrefix&&(a=r.identifierPrefix),void 0!==r.onRecoverableError&&(s=r.onRecoverableError)),t=Wu(t,null,e,1,null!=r?r:null,i,0,a,s),e[ko]=t.current,Kr(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 Zu(t)},y.render=function(e,t,r){if(!tc(t))throw Error(n(200));return rc(null,e,t,!1,r)},y.unmountComponentAtNode=function(e){if(!tc(e))throw Error(n(40));return!!e._reactRootContainer&&(hu(function(){rc(null,null,e,!1,function(){e._reactRootContainer=null,e[ko]=null})}),!0)},y.unstable_batchedUpdates=pu,y.unstable_renderSubtreeIntoContainer=function(e,t,r,o){if(!tc(r))throw Error(n(200));if(null==e||void 0===e._reactInternals)throw Error(n(38));return rc(e,t,r,!1,o)},y.version="18.3.1-next-f1338f8080-20240426",y}var w,S,E=function(){if(h)return g;h=1;var e=(p||(p=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){}}(),m.exports=x()),m.exports);return g.createRoot=e.createRoot,g.hydrateRoot=e.hydrateRoot,g}(),C={exports:{}},T={};var O=(S||(S=1,C.exports=function(){if(w)return T;w=1;var e=s(),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={},u=null,c=null;for(s in void 0!==a&&(u=""+a),void 0!==n.key&&(u=""+n.key),void 0!==n.ref&&(c=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:u,ref:c,props:l,_owner:o.current}}return T.Fragment=n,T.jsx=a,T.jsxs=a,T}()),C.exports);const N={},P=(e,t,n,r)=>{A(n)&&N[n]||(A(n)&&(N[n]=new Date),((e,t,n,r)=>{const o=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(o,"warn","react-i18next::",!0);A(o[0])&&(o[0]=`react-i18next:: ${o[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...o):console})(e,t,n,r))},L=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},R=(e,t,n)=>{e.loadNamespaces(t,L(e,n))},_=(e,t,n,r)=>{if(A(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return R(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,L(e,r))},A=e=>"string"==typeof e,I=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,D={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},z=e=>D[e];let j={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(I,z)};let F;const M={type:"3rdParty",init(e){((e={})=>{j={...j,...e}})(e.options.react),(e=>{F=e})(e)}},U=l.createContext();class B{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const $=(e,t,n,r)=>e.getFixedT(t,n,r),V=(e,t={})=>{const{i18n:n}=t,{i18n:r,defaultNS:o}=l.useContext(U)||{},i=n||r||F;if(i&&!i.reportNamespaces&&(i.reportNamespaces=new B),!i){P(i,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const e=(e,t)=>{return A(t)?t:"object"==typeof(n=t)&&null!==n&&A(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e;var n},t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}i.options.react?.wait&&P(i,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...j,...i.options.react,...t},{useSuspense:s,keyPrefix:u}=a;let c=o||i.options?.defaultNS;c=A(c)?[c]:c||["translation"],i.reportNamespaces.addUsedNamespaces?.(c);const d=(i.isInitialized||i.initializedStoreOnce)&&c.every(e=>((e,t,n={})=>t.languages&&t.languages.length?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):(P(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0))(e,i,a)),f=((e,t,n,r)=>l.useCallback($(e,t,n,r),[e,t,n,r]))(i,t.lng||null,"fallback"===a.nsMode?c:c[0],u),p=()=>f,h=()=>$(i,t.lng||null,"fallback"===a.nsMode?c:c[0],u),[g,m]=l.useState(p);let y=c.join();t.lng&&(y=`${t.lng}${y}`);const v=((e,t)=>{const n=l.useRef();return l.useEffect(()=>{n.current=e},[e,t]),n.current})(y),b=l.useRef(!0);l.useEffect(()=>{const{bindI18n:e,bindI18nStore:n}=a;b.current=!0,d||s||(t.lng?_(i,t.lng,c,()=>{b.current&&m(h)}):R(i,c,()=>{b.current&&m(h)})),d&&v&&v!==y&&b.current&&m(h);const r=()=>{b.current&&m(h)};return e&&i?.on(e,r),n&&i?.store.on(n,r),()=>{b.current=!1,i&&e&&e?.split(" ").forEach(e=>i.off(e,r)),n&&i&&n.split(" ").forEach(e=>i.store.off(e,r))}},[i,y]),l.useEffect(()=>{b.current&&d&&m(p)},[i,u,d]);const k=[g,i,d];if(k.t=g,k.i18n=i,k.ready=d,d)return k;if(!d&&!s)return k;throw new Promise(e=>{t.lng?_(i,t.lng,c,()=>e()):R(i,c,()=>e())})};function H({i18n:e,defaultNS:t,children:n}){const r=l.useMemo(()=>({i18n:e,defaultNS:t}),[e,t]);return l.createElement(U.Provider,{value:r},n)}
10
+ */function w(){if(f)return y;f=1;var e=s(),t=k();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){a(e,t),a(e+"Capture",t)}function a(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),u=Object.prototype.hasOwnProperty,c=/^[: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]*$/,d={},p={};function h(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 h(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 h(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){g[e]=new h(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){g[e]=new h(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 h(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){g[e]=new h(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){g[e]=new h(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){g[e]=new h(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){g[e]=new h(e,5,!1,e.toLowerCase(),null,!1,!1)});var m=/[\-:]([a-z])/g;function v(e){return e[1].toUpperCase()}function b(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!!u.call(p,e)||!u.call(d,e)&&(c.test(e)?p[e]=!0:(d[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(m,v);g[t]=new h(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(m,v);g[t]=new h(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(m,v);g[t]=new h(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){g[e]=new h(e,1,!1,e.toLowerCase(),null,!1,!1)}),g.xlinkHref=new h("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){g[e]=new h(e,1,!1,e.toLowerCase(),null,!0,!0)});var w=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=Symbol.for("react.element"),S=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),N=Symbol.for("react.provider"),O=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),I=Symbol.for("react.offscreen"),j=Symbol.iterator;function D(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=j&&e[j]||e["@@iterator"])?e:null}var z,M=Object.assign;function F(e){if(void 0===z)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);z=t&&t[1]||""}return"\n"+z+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(Ve){var r=Ve}Reflect.construct(e,[],t)}else{try{t.call()}catch(Ve){r=Ve}e.call(t.prototype)}else{try{throw Error()}catch(Ve){r=Ve}e()}}catch(Ve){if(Ve&&r&&"string"==typeof Ve.stack){for(var o=Ve.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:"")?F(e):""}function $(e){switch(e.tag){case 5:return F(e.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("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 C:return"Fragment";case S:return"Portal";case T:return"Profiler";case E:return"StrictMode";case P:return"Suspense";case _:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case O:return(e.displayName||"Context")+".Consumer";case N:return(e._context.displayName||"Context")+".Provider";case L:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case R:return null!==(t=e.displayName||null)?t:V(e.type)||"Memo";case A: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===E?"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 q(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function W(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function K(e){e._valueTracker||(e._valueTracker=function(e){var t=W(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=W(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function J(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 G(e,t){var n=t.checked;return M({},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=q(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 X(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function Z(e,t){X(e,t);var n=q(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,q(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&&J(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=""+q(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 M({},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:q(r)}}function ae(e,t){var n=q(t.value),r=q(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 ue(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 ce,de,fe=(de=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.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},ge=["Webkit","ms","Moz","O"];function me(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 ye(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=me(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(he).forEach(function(e){ge.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),he[t]=he[e]})});var ve=M({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 be(e,t){if(t){if(ve[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 ke(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 we=null;function xe(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Se=null,Ce=null,Ee=null;function Te(e){if(e=Eo(e)){if("function"!=typeof Se)throw Error(n(280));var t=e.stateNode;t&&(t=No(t),Se(e.stateNode,e.type,t))}}function Ne(e){Ce?Ee?Ee.push(e):Ee=[e]:Ce=e}function Oe(){if(Ce){var e=Ce,t=Ee;if(Ee=Ce=null,Te(e),t)for(e=0;e<t.length;e++)Te(t[e])}}function Le(e,t){return e(t)}function Pe(){}var _e=!1;function Re(e,t,n){if(_e)return e(t,n);_e=!0;try{return Le(e,t,n)}finally{_e=!1,(null!==Ce||null!==Ee)&&(Pe(),Oe())}}function Ae(e,t){var r=e.stateNode;if(null===r)return null;var o=No(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 Ie=!1;if(l)try{var je={};Object.defineProperty(je,"passive",{get:function(){Ie=!0}}),window.addEventListener("test",je,je),window.removeEventListener("test",je,je)}catch(de){Ie=!1}function De(e,t,n,r,o,i,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var ze=!1,Me=null,Fe=!1,He=null,qe={onError:function(e){ze=!0,Me=e}};function We(e,t,n,r,o,i,a,s,l){ze=!1,Me=null,De.apply(qe,arguments)}function Ke(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 Qe(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 Je(e){if(Ke(e)!==e)throw Error(n(188))}function Ge(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ke(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 Je(i),e;if(a===o)return Je(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))?Ye(e):null}function Ye(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ye(e);if(null!==t)return t;e=e.sibling}return null}var Xe=t.unstable_scheduleCallback,Ze=t.unstable_cancelCallback,et=t.unstable_shouldYield,tt=t.unstable_requestPaint,nt=t.unstable_now,rt=t.unstable_getCurrentPriorityLevel,ot=t.unstable_ImmediatePriority,it=t.unstable_UserBlockingPriority,at=t.unstable_NormalPriority,st=t.unstable_LowPriority,lt=t.unstable_IdlePriority,ut=null,ct=null;var dt=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(ft(e)/pt|0)|0},ft=Math.log,pt=Math.LN2;var ht=64,gt=4194304;function mt(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 yt(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=mt(s):0!==(i&=a)&&(r=mt(i))}else 0!==(a=n&~o)?r=mt(a):0!==i&&(r=mt(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-dt(t)),r|=e[n],t&=~o;return r}function vt(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 bt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function kt(){var e=ht;return!(4194240&(ht<<=1))&&(ht=64),e}function wt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function xt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-dt(t)]=n}function St(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-dt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var Ct=0;function Et(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var Tt,Nt,Ot,Lt,Pt,_t=!1,Rt=[],At=null,It=null,jt=null,Dt=new Map,zt=new Map,Mt=[],Ft="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 Ut(e,t){switch(e){case"focusin":case"focusout":At=null;break;case"dragenter":case"dragleave":It=null;break;case"mouseover":case"mouseout":jt=null;break;case"pointerover":case"pointerout":Dt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":zt.delete(t.pointerId)}}function Bt(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=Eo(t))&&Nt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function $t(e){var t=Co(e.target);if(null!==t){var n=Ke(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Qe(n)))return e.blockedOn=t,void Pt(e.priority,function(){Ot(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 Vt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=en(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=Eo(n))&&Nt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);we=r,n.target.dispatchEvent(r),we=null,t.shift()}return!0}function Ht(e,t,n){Vt(e)&&n.delete(t)}function qt(){_t=!1,null!==At&&Vt(At)&&(At=null),null!==It&&Vt(It)&&(It=null),null!==jt&&Vt(jt)&&(jt=null),Dt.forEach(Ht),zt.forEach(Ht)}function Wt(e,n){e.blockedOn===n&&(e.blockedOn=null,_t||(_t=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,qt)))}function Kt(e){function t(t){return Wt(t,e)}if(0<Rt.length){Wt(Rt[0],e);for(var n=1;n<Rt.length;n++){var r=Rt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==At&&Wt(At,e),null!==It&&Wt(It,e),null!==jt&&Wt(jt,e),Dt.forEach(t),zt.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;)$t(n),null===n.blockedOn&&Mt.shift()}var Qt=w.ReactCurrentBatchConfig,Jt=!0;function Gt(e,t,n,r){var o=Ct,i=Qt.transition;Qt.transition=null;try{Ct=1,Xt(e,t,n,r)}finally{Ct=o,Qt.transition=i}}function Yt(e,t,n,r){var o=Ct,i=Qt.transition;Qt.transition=null;try{Ct=4,Xt(e,t,n,r)}finally{Ct=o,Qt.transition=i}}function Xt(e,t,n,r){if(Jt){var o=en(e,t,n,r);if(null===o)Jr(e,t,r,Zt,n),Ut(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return At=Bt(At,e,t,n,r,o),!0;case"dragenter":return It=Bt(It,e,t,n,r,o),!0;case"mouseover":return jt=Bt(jt,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Dt.set(i,Bt(Dt.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,zt.set(i,Bt(zt.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(Ut(e,r),4&t&&-1<Ft.indexOf(e)){for(;null!==o;){var i=Eo(o);if(null!==i&&Tt(i),null===(i=en(e,t,n,r))&&Jr(e,t,r,Zt,n),i===o)break;o=i}null!==o&&r.stopPropagation()}else Jr(e,t,r,null,n)}}var Zt=null;function en(e,t,n,r){if(Zt=null,null!==(e=Co(e=xe(r))))if(null===(t=Ke(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Qe(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 Zt=e,null}function tn(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(rt()){case ot:return 1;case it:return 4;case at:case st:return 16;case lt:return 536870912;default:return 16}default:return 16}}var nn=null,rn=null,on=null;function an(){if(on)return on;var e,t,n=rn,r=n.length,o="value"in nn?nn.value:nn.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 on=o.slice(e,1<t?1-t:void 0)}function sn(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 ln(){return!0}function un(){return!1}function cn(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)?ln:un,this.isPropagationStopped=un,this}return M(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=ln)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=ln)},persist:function(){},isPersistent:ln}),t}var dn,fn,pn,hn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gn=cn(hn),mn=M({},hn,{view:0,detail:0}),yn=cn(mn),vn=M({},mn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Pn,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!==pn&&(pn&&"mousemove"===e.type?(dn=e.screenX-pn.screenX,fn=e.screenY-pn.screenY):fn=dn=0,pn=e),dn)},movementY:function(e){return"movementY"in e?e.movementY:fn}}),bn=cn(vn),kn=cn(M({},vn,{dataTransfer:0})),wn=cn(M({},mn,{relatedTarget:0})),xn=cn(M({},hn,{animationName:0,elapsedTime:0,pseudoElement:0})),Sn=M({},hn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Cn=cn(Sn),En=cn(M({},hn,{data:0})),Tn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Nn={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"},On={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ln(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=On[e])&&!!t[e]}function Pn(){return Ln}var _n=M({},mn,{key:function(e){if(e.key){var t=Tn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=sn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Nn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Pn,charCode:function(e){return"keypress"===e.type?sn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?sn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Rn=cn(_n),An=cn(M({},vn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),In=cn(M({},mn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Pn})),jn=cn(M({},hn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Dn=M({},vn,{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}),zn=cn(Dn),Mn=[9,13,27,32],Fn=l&&"CompositionEvent"in window,Un=null;l&&"documentMode"in document&&(Un=document.documentMode);var Bn=l&&"TextEvent"in window&&!Un,$n=l&&(!Fn||Un&&8<Un&&11>=Un),Vn=String.fromCharCode(32),Hn=!1;function qn(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 Wn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Kn=!1;var Qn={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 Jn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Qn[e.type]:"textarea"===t}function Gn(e,t,n,r){Ne(r),0<(t=Yr(t,"onChange")).length&&(n=new gn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Yn=null,Xn=null;function Zn(e){Vr(e,0)}function er(e){if(Q(To(e)))return e}function tr(e,t){if("change"===e)return t}var nr=!1;if(l){var rr;if(l){var or="oninput"in document;if(!or){var ir=document.createElement("div");ir.setAttribute("oninput","return;"),or="function"==typeof ir.oninput}rr=or}else rr=!1;nr=rr&&(!document.documentMode||9<document.documentMode)}function ar(){Yn&&(Yn.detachEvent("onpropertychange",sr),Xn=Yn=null)}function sr(e){if("value"===e.propertyName&&er(Xn)){var t=[];Gn(t,Xn,e,xe(e)),Re(Zn,t)}}function lr(e,t,n){"focusin"===e?(ar(),Xn=n,(Yn=t).attachEvent("onpropertychange",sr)):"focusout"===e&&ar()}function ur(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return er(Xn)}function cr(e,t){if("click"===e)return er(t)}function dr(e,t){if("input"===e||"change"===e)return er(t)}var fr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function pr(e,t){if(fr(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(!u.call(t,o)||!fr(e[o],t[o]))return!1}return!0}function hr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function gr(e,t){var n,r=hr(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=hr(r)}}function mr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?mr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function yr(){for(var e=window,t=J();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=J((e=t.contentWindow).document)}return t}function vr(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 br(e){var t=yr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&mr(n.ownerDocument.documentElement,n)){if(null!==r&&vr(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=gr(n,i);var a=gr(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 kr=l&&"documentMode"in document&&11>=document.documentMode,wr=null,xr=null,Sr=null,Cr=!1;function Er(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;Cr||null==wr||wr!==J(r)||("selectionStart"in(r=wr)&&vr(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},Sr&&pr(Sr,r)||(Sr=r,0<(r=Yr(xr,"onSelect")).length&&(t=new gn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=wr)))}function Tr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Nr={animationend:Tr("Animation","AnimationEnd"),animationiteration:Tr("Animation","AnimationIteration"),animationstart:Tr("Animation","AnimationStart"),transitionend:Tr("Transition","TransitionEnd")},Or={},Lr={};function Pr(e){if(Or[e])return Or[e];if(!Nr[e])return e;var t,n=Nr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Lr)return Or[e]=n[t];return e}l&&(Lr=document.createElement("div").style,"AnimationEvent"in window||(delete Nr.animationend.animation,delete Nr.animationiteration.animation,delete Nr.animationstart.animation),"TransitionEvent"in window||delete Nr.transitionend.transition);var _r=Pr("animationend"),Rr=Pr("animationiteration"),Ar=Pr("animationstart"),Ir=Pr("transitionend"),jr=new Map,Dr="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 zr(e,t){jr.set(e,t),i(t,[e])}for(var Mr=0;Mr<Dr.length;Mr++){var Fr=Dr[Mr];zr(Fr.toLowerCase(),"on"+(Fr[0].toUpperCase()+Fr.slice(1)))}zr(_r,"onAnimationEnd"),zr(Rr,"onAnimationIteration"),zr(Ar,"onAnimationStart"),zr("dblclick","onDoubleClick"),zr("focusin","onFocus"),zr("focusout","onBlur"),zr(Ir,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("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 Ur="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(" "),Br=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ur));function $r(e,t,r){var o=e.type||"unknown-event";e.currentTarget=r,function(e,t,r,o,i,a,s,l,u){if(We.apply(this,arguments),ze){if(!ze)throw Error(n(198));var c=Me;ze=!1,Me=null,Fe||(Fe=!0,He=c)}}(o,t,void 0,e),e.currentTarget=null}function Vr(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,u=s.currentTarget;if(s=s.listener,l!==i&&o.isPropagationStopped())break e;$r(o,s,u),i=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,u=s.currentTarget,s=s.listener,l!==i&&o.isPropagationStopped())break e;$r(o,s,u),i=l}}}if(Fe)throw e=He,Fe=!1,He=null,e}function Hr(e,t){var n=t[wo];void 0===n&&(n=t[wo]=new Set);var r=e+"__bubble";n.has(r)||(Qr(t,e,2,!1),n.add(r))}function qr(e,t,n){var r=0;t&&(r|=4),Qr(n,e,r,t)}var Wr="_reactListening"+Math.random().toString(36).slice(2);function Kr(e){if(!e[Wr]){e[Wr]=!0,r.forEach(function(t){"selectionchange"!==t&&(Br.has(t)||qr(t,!1,e),qr(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Wr]||(t[Wr]=!0,qr("selectionchange",!1,t))}}function Qr(e,t,n,r){switch(tn(t)){case 1:var o=Gt;break;case 4:o=Yt;break;default:o=Xt}n=o.bind(null,t,n,e),o=void 0,!Ie||"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 Jr(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=Co(s)))return;if(5===(l=a.tag)||6===l){r=i=a;continue e}s=s.parentNode}}r=r.return}Re(function(){var r=i,o=xe(n),a=[];e:{var s=jr.get(e);if(void 0!==s){var l=gn,u=e;switch(e){case"keypress":if(0===sn(n))break e;case"keydown":case"keyup":l=Rn;break;case"focusin":u="focus",l=wn;break;case"focusout":u="blur",l=wn;break;case"beforeblur":case"afterblur":l=wn;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=bn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=kn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=In;break;case _r:case Rr:case Ar:l=xn;break;case Ir:l=jn;break;case"scroll":l=yn;break;case"wheel":l=zn;break;case"copy":case"cut":case"paste":l=Cn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=An}var c=!!(4&t),d=!c&&"scroll"===e,f=c?null!==s?s+"Capture":null:s;c=[];for(var p,h=r;null!==h;){var g=(p=h).stateNode;if(5===p.tag&&null!==g&&(p=g,null!==f&&(null!=(g=Ae(h,f))&&c.push(Gr(h,g,p)))),d)break;h=h.return}0<c.length&&(s=new l(s,u,null,n,o),a.push({event:s,listeners:c}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===we||!(u=n.relatedTarget||n.fromElement)||!Co(u)&&!u[ko])&&(l||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(u=(u=n.relatedTarget||n.toElement)?Co(u):null)&&(u!==(d=Ke(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=r),l!==u)){if(c=bn,g="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(c=An,g="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==l?s:To(l),p=null==u?s:To(u),(s=new c(g,h+"leave",l,n,o)).target=d,s.relatedTarget=p,g=null,Co(o)===r&&((c=new c(f,h+"enter",u,n,o)).target=p,c.relatedTarget=d,g=c),d=g,l&&u)e:{for(f=u,h=0,p=c=l;p;p=Xr(p))h++;for(p=0,g=f;g;g=Xr(g))p++;for(;0<h-p;)c=Xr(c),h--;for(;0<p-h;)f=Xr(f),p--;for(;h--;){if(c===f||null!==f&&c===f.alternate)break e;c=Xr(c),f=Xr(f)}c=null}else c=null;null!==l&&Zr(a,s,l,c,!1),null!==u&&null!==d&&Zr(a,d,u,c,!0)}if("select"===(l=(s=r?To(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var m=tr;else if(Jn(s))if(nr)m=dr;else{m=ur;var y=lr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(m=cr);switch(m&&(m=m(e,r))?Gn(a,m,n,o):(y&&y(e,s,r),"focusout"===e&&(y=s._wrapperState)&&y.controlled&&"number"===s.type&&te(s,"number",s.value)),y=r?To(r):window,e){case"focusin":(Jn(y)||"true"===y.contentEditable)&&(wr=y,xr=r,Sr=null);break;case"focusout":Sr=xr=wr=null;break;case"mousedown":Cr=!0;break;case"contextmenu":case"mouseup":case"dragend":Cr=!1,Er(a,n,o);break;case"selectionchange":if(kr)break;case"keydown":case"keyup":Er(a,n,o)}var v;if(Fn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Kn?qn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&($n&&"ko"!==n.locale&&(Kn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Kn&&(v=an()):(rn="value"in(nn=o)?nn.value:nn.textContent,Kn=!0)),0<(y=Yr(r,b)).length&&(b=new En(b,e,null,n,o),a.push({event:b,listeners:y}),v?b.data=v:null!==(v=Wn(n))&&(b.data=v))),(v=Bn?function(e,t){switch(e){case"compositionend":return Wn(t);case"keypress":return 32!==t.which?null:(Hn=!0,Vn);case"textInput":return(e=t.data)===Vn&&Hn?null:e;default:return null}}(e,n):function(e,t){if(Kn)return"compositionend"===e||!Fn&&qn(e,t)?(e=an(),on=rn=nn=null,Kn=!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 $n&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Yr(r,"onBeforeInput")).length&&(o=new En("onBeforeInput","beforeinput",null,n,o),a.push({event:o,listeners:r}),o.data=v))}Vr(a,t)})}function Gr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Yr(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=Ae(e,n))&&r.unshift(Gr(e,i,o)),null!=(i=Ae(e,t))&&r.push(Gr(e,i,o))),e=e.return}return r}function Xr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Zr(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==u&&(s=u,o?null!=(l=Ae(n,i))&&a.unshift(Gr(n,l,s)):o||null!=(l=Ae(n,i))&&a.push(Gr(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var eo=/\r\n?/g,to=/\u0000|\uFFFD/g;function no(e){return("string"==typeof e?e:""+e).replace(eo,"\n").replace(to,"")}function ro(e,t,r){if(t=no(t),no(e)!==t&&r)throw Error(n(425))}function oo(){}var io=null,ao=null;function so(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 lo="function"==typeof setTimeout?setTimeout:void 0,uo="function"==typeof clearTimeout?clearTimeout:void 0,co="function"==typeof Promise?Promise:void 0,fo="function"==typeof queueMicrotask?queueMicrotask:void 0!==co?function(e){return co.resolve(null).then(e).catch(po)}:lo;function po(e){setTimeout(function(){throw e})}function ho(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 Kt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);Kt(t)}function go(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 mo(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 yo=Math.random().toString(36).slice(2),vo="__reactFiber$"+yo,bo="__reactProps$"+yo,ko="__reactContainer$"+yo,wo="__reactEvents$"+yo,xo="__reactListeners$"+yo,So="__reactHandles$"+yo;function Co(e){var t=e[vo];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ko]||n[vo]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=mo(e);null!==e;){if(n=e[vo])return n;e=mo(e)}return t}n=(e=n).parentNode}return null}function Eo(e){return!(e=e[vo]||e[ko])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function To(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(n(33))}function No(e){return e[bo]||null}var Oo=[],Lo=-1;function Po(e){return{current:e}}function _o(e){0>Lo||(e.current=Oo[Lo],Oo[Lo]=null,Lo--)}function Ro(e,t){Lo++,Oo[Lo]=e.current,e.current=t}var Ao={},Io=Po(Ao),jo=Po(!1),Do=Ao;function zo(e,t){var n=e.type.contextTypes;if(!n)return Ao;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 Fo(){_o(jo),_o(Io)}function Uo(e,t,r){if(Io.current!==Ao)throw Error(n(168));Ro(Io,t),Ro(jo,r)}function Bo(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 M({},r,o)}function $o(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ao,Do=Io.current,Ro(Io,e),Ro(jo,jo.current),!0}function Vo(e,t,r){var o=e.stateNode;if(!o)throw Error(n(169));r?(e=Bo(e,t,Do),o.__reactInternalMemoizedMergedChildContext=e,_o(jo),_o(Io),Ro(Io,e)):_o(jo),Ro(jo,r)}var Ho=null,qo=!1,Wo=!1;function Ko(e){null===Ho?Ho=[e]:Ho.push(e)}function Qo(){if(!Wo&&null!==Ho){Wo=!0;var e=0,t=Ct;try{var n=Ho;for(Ct=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Ho=null,qo=!1}catch(Ue){throw null!==Ho&&(Ho=Ho.slice(e+1)),Xe(ot,Qo),Ue}finally{Ct=t,Wo=!1}}return null}var Jo=[],Go=0,Yo=null,Xo=0,Zo=[],ei=0,ti=null,ni=1,ri="";function oi(e,t){Jo[Go++]=Xo,Jo[Go++]=Yo,Yo=e,Xo=t}function ii(e,t,n){Zo[ei++]=ni,Zo[ei++]=ri,Zo[ei++]=ti,ti=e;var r=ni;e=ri;var o=32-dt(r)-1;r&=~(1<<o),n+=1;var i=32-dt(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,ni=1<<32-dt(t)+o|n<<o|r,ri=i+e}else ni=1<<i|n<<o|r,ri=e}function ai(e){null!==e.return&&(oi(e,1),ii(e,1,0))}function si(e){for(;e===Yo;)Yo=Jo[--Go],Jo[Go]=null,Xo=Jo[--Go],Jo[Go]=null;for(;e===ti;)ti=Zo[--ei],Zo[ei]=null,ri=Zo[--ei],Zo[ei]=null,ni=Zo[--ei],Zo[ei]=null}var li=null,ui=null,ci=!1,di=null;function fi(e,t){var n=ju(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 pi(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,li=e,ui=go(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,li=e,ui=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==ti?{id:ni,overflow:ri}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=ju(18,null,null,0)).stateNode=t,n.return=e,e.child=n,li=e,ui=null,!0);default:return!1}}function hi(e){return!(!(1&e.mode)||128&e.flags)}function gi(e){if(ci){var t=ui;if(t){var r=t;if(!pi(e,t)){if(hi(e))throw Error(n(418));t=go(r.nextSibling);var o=li;t&&pi(e,t)?fi(o,r):(e.flags=-4097&e.flags|2,ci=!1,li=e)}}else{if(hi(e))throw Error(n(418));e.flags=-4097&e.flags|2,ci=!1,li=e}}}function mi(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;li=e}function yi(e){if(e!==li)return!1;if(!ci)return mi(e),ci=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!so(e.type,e.memoizedProps)),t&&(t=ui)){if(hi(e))throw vi(),Error(n(418));for(;t;)fi(e,t),t=go(t.nextSibling)}if(mi(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){ui=go(e.nextSibling);break e}t--}else"$"!==r&&"$!"!==r&&"$?"!==r||t++}e=e.nextSibling}ui=null}}else ui=li?go(e.stateNode.nextSibling):null;return!0}function vi(){for(var e=ui;e;)e=go(e.nextSibling)}function bi(){ui=li=null,ci=!1}function ki(e){null===di?di=[e]:di.push(e)}var wi=w.ReactCurrentBatchConfig;function xi(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 Si(e,t){throw e=Object.prototype.toString.call(t),Error(n(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ci(e){return(0,e._init)(e._payload)}function Ei(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=zu(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=Bu(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function u(e,t,n,r){var o=n.type;return o===C?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===A&&Ci(o)===t.type)?((r=i(t,n.props)).ref=xi(e,t,n),r.return=e,r):((r=Mu(n.type,n.key,n.props,null,e.mode,r)).ref=xi(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=$u(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=Fu(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=Bu(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case x:return(n=Mu(t.type,t.key,t.props,null,e.mode,n)).ref=xi(e,null,t),n.return=e,n;case S:return(t=$u(t,e.mode,n)).return=e,t;case A:return f(e,(0,t._init)(t._payload),n)}if(ne(t)||D(t))return(t=Fu(t,e.mode,n,null)).return=e,t;Si(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 x:return n.key===o?u(e,t,n,r):null;case S:return n.key===o?c(e,t,n,r):null;case A:return p(e,t,(o=n._init)(n._payload),r)}if(ne(n)||D(n))return null!==o?null:d(e,t,n,r,null);Si(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 x:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o);case S:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o);case A:return h(e,t,n,(0,r._init)(r._payload),o)}if(ne(r)||D(r))return d(t,e=e.get(n)||null,r,o,null);Si(t,r)}return null}return function l(u,c,d,g){if("object"==typeof d&&null!==d&&d.type===C&&null===d.key&&(d=d.props.children),"object"==typeof d&&null!==d){switch(d.$$typeof){case x:e:{for(var m=d.key,y=c;null!==y;){if(y.key===m){if((m=d.type)===C){if(7===y.tag){r(u,y.sibling),(c=i(y,d.props.children)).return=u,u=c;break e}}else if(y.elementType===m||"object"==typeof m&&null!==m&&m.$$typeof===A&&Ci(m)===y.type){r(u,y.sibling),(c=i(y,d.props)).ref=xi(u,y,d),c.return=u,u=c;break e}r(u,y);break}t(u,y),y=y.sibling}d.type===C?((c=Fu(d.props.children,u.mode,g,d.key)).return=u,u=c):((g=Mu(d.type,d.key,d.props,null,u.mode,g)).ref=xi(u,c,d),g.return=u,u=g)}return s(u);case S:e:{for(y=d.key;null!==c;){if(c.key===y){if(4===c.tag&&c.stateNode.containerInfo===d.containerInfo&&c.stateNode.implementation===d.implementation){r(u,c.sibling),(c=i(c,d.children||[])).return=u,u=c;break e}r(u,c);break}t(u,c),c=c.sibling}(c=$u(d,u.mode,g)).return=u,u=c}return s(u);case A:return l(u,c,(y=d._init)(d._payload),g)}if(ne(d))return function(n,i,s,l){for(var u=null,c=null,d=i,g=i=0,m=null;null!==d&&g<s.length;g++){d.index>g?(m=d,d=null):m=d.sibling;var y=p(n,d,s[g],l);if(null===y){null===d&&(d=m);break}e&&d&&null===y.alternate&&t(n,d),i=a(y,i,g),null===c?u=y:c.sibling=y,c=y,d=m}if(g===s.length)return r(n,d),ci&&oi(n,g),u;if(null===d){for(;g<s.length;g++)null!==(d=f(n,s[g],l))&&(i=a(d,i,g),null===c?u=d:c.sibling=d,c=d);return ci&&oi(n,g),u}for(d=o(n,d);g<s.length;g++)null!==(m=h(d,n,g,s[g],l))&&(e&&null!==m.alternate&&d.delete(null===m.key?g:m.key),i=a(m,i,g),null===c?u=m:c.sibling=m,c=m);return e&&d.forEach(function(e){return t(n,e)}),ci&&oi(n,g),u}(u,c,d,g);if(D(d))return function(i,s,l,u){var c=D(l);if("function"!=typeof c)throw Error(n(150));if(null==(l=c.call(l)))throw Error(n(151));for(var d=c=null,g=s,m=s=0,y=null,v=l.next();null!==g&&!v.done;m++,v=l.next()){g.index>m?(y=g,g=null):y=g.sibling;var b=p(i,g,v.value,u);if(null===b){null===g&&(g=y);break}e&&g&&null===b.alternate&&t(i,g),s=a(b,s,m),null===d?c=b:d.sibling=b,d=b,g=y}if(v.done)return r(i,g),ci&&oi(i,m),c;if(null===g){for(;!v.done;m++,v=l.next())null!==(v=f(i,v.value,u))&&(s=a(v,s,m),null===d?c=v:d.sibling=v,d=v);return ci&&oi(i,m),c}for(g=o(i,g);!v.done;m++,v=l.next())null!==(v=h(g,i,m,v.value,u))&&(e&&null!==v.alternate&&g.delete(null===v.key?m:v.key),s=a(v,s,m),null===d?c=v:d.sibling=v,d=v);return e&&g.forEach(function(e){return t(i,e)}),ci&&oi(i,m),c}(u,c,d,g);Si(u,d)}return"string"==typeof d&&""!==d||"number"==typeof d?(d=""+d,null!==c&&6===c.tag?(r(u,c.sibling),(c=i(c,d)).return=u,u=c):(r(u,c),(c=Bu(d,u.mode,g)).return=u,u=c),s(u)):r(u,c)}}var Ti=Ei(!0),Ni=Ei(!1),Oi=Po(null),Li=null,Pi=null,_i=null;function Ri(){_i=Pi=Li=null}function Ai(e){var t=Oi.current;_o(Oi),e._currentValue=t}function Ii(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){Li=e,_i=Pi=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(Ss=!0),e.firstContext=null)}function Di(e){var t=e._currentValue;if(_i!==e)if(e={context:e,memoizedValue:t,next:null},null===Pi){if(null===Li)throw Error(n(308));Pi=e,Li.dependencies={lanes:0,firstContext:e}}else Pi=Pi.next=e;return t}var zi=null;function Mi(e){null===zi?zi=[e]:zi.push(e)}function Fi(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,Ui(e,r)}function Ui(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 Bi=!1;function $i(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Vi(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 Hi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function qi(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&Rl){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Ui(e,n)}return null===(o=r.interleaved)?(t.next=t,Mi(r)):(t.next=o.next,o.next=t),r.interleaved=t,Ui(e,n)}function Wi(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,St(e,n)}}function Ki(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 Qi(e,t,n,r){var o=e.updateQueue;Bi=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var l=s,u=l.next;l.next=null,null===a?i=u:a.next=u,a=l;var c=e.alternate;null!==c&&((s=(c=c.updateQueue).lastBaseUpdate)!==a&&(null===s?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(null!==i){var d=o.baseState;for(a=0,c=u=l=null,s=i;;){var f=s.lane,p=s.eventTime;if((r&f)===f){null!==c&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,g=s;switch(f=t,p=n,g.tag){case 1:if("function"==typeof(h=g.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=g.payload)?h.call(p,d,f):h))break e;d=M({},d,f);break e;case 2:Bi=!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===c?(u=c=p,l=d):c=c.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===c&&(l=d),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,null!==(t=o.shared.interleaved)){o=t;do{a|=o.lane,o=o.next}while(o!==t)}else null===i&&(o.shared.lanes=0);Ul|=a,e.lanes=a,e.memoizedState=d}}function Ji(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 Gi={},Yi=Po(Gi),Xi=Po(Gi),Zi=Po(Gi);function ea(e){if(e===Gi)throw Error(n(174));return e}function ta(e,t){switch(Ro(Zi,t),Ro(Xi,e),Ro(Yi,Gi),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ue(null,"");break;default:t=ue(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}_o(Yi),Ro(Yi,t)}function na(){_o(Yi),_o(Xi),_o(Zi)}function ra(e){ea(Zi.current);var t=ea(Yi.current),n=ue(t,e.type);t!==n&&(Ro(Xi,e),Ro(Yi,n))}function oa(e){Xi.current===e&&(_o(Yi),_o(Xi))}var ia=Po(0);function aa(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 sa=[];function la(){for(var e=0;e<sa.length;e++)sa[e]._workInProgressVersionPrimary=null;sa.length=0}var ua=w.ReactCurrentDispatcher,ca=w.ReactCurrentBatchConfig,da=0,fa=null,pa=null,ha=null,ga=!1,ma=!1,ya=0,va=0;function ba(){throw Error(n(321))}function ka(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!fr(e[n],t[n]))return!1;return!0}function wa(e,t,r,o,i,a){if(da=a,fa=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ua.current=null===e||null===e.memoizedState?os:is,e=r(o,i),ma){a=0;do{if(ma=!1,ya=0,25<=a)throw Error(n(301));a+=1,ha=pa=null,t.updateQueue=null,ua.current=as,e=r(o,i)}while(ma)}if(ua.current=rs,t=null!==pa&&null!==pa.next,da=0,ha=pa=fa=null,ga=!1,t)throw Error(n(300));return e}function xa(){var e=0!==ya;return ya=0,e}function Sa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ha?fa.memoizedState=ha=e:ha=ha.next=e,ha}function Ca(){if(null===pa){var e=fa.alternate;e=null!==e?e.memoizedState:null}else e=pa.next;var t=null===ha?fa.memoizedState:ha.next;if(null!==t)ha=t,pa=e;else{if(null===e)throw Error(n(310));e={memoizedState:(pa=e).memoizedState,baseState:pa.baseState,baseQueue:pa.baseQueue,queue:pa.queue,next:null},null===ha?fa.memoizedState=ha=e:ha=ha.next=e}return ha}function Ea(e,t){return"function"==typeof t?t(e):t}function Ta(e){var t=Ca(),r=t.queue;if(null===r)throw Error(n(311));r.lastRenderedReducer=e;var o=pa,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,u=null,c=a;do{var d=c.lane;if((da&d)===d)null!==u&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),o=c.hasEagerState?c.eagerState:e(o,c.action);else{var f={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===u?(l=u=f,s=o):u=u.next=f,fa.lanes|=d,Ul|=d}c=c.next}while(null!==c&&c!==a);null===u?s=o:u.next=l,fr(o,t.memoizedState)||(Ss=!0),t.memoizedState=o,t.baseState=s,t.baseQueue=u,r.lastRenderedState=o}if(null!==(e=r.interleaved)){i=e;do{a=i.lane,fa.lanes|=a,Ul|=a,i=i.next}while(i!==e)}else null===i&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Na(e){var t=Ca(),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);fr(a,t.memoizedState)||(Ss=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),r.lastRenderedState=a}return[a,o]}function Oa(){}function La(e,t){var r=fa,o=Ca(),i=t(),a=!fr(o.memoizedState,i);if(a&&(o.memoizedState=i,Ss=!0),o=o.queue,Ba(Ra.bind(null,r,o,e),[e]),o.getSnapshot!==t||a||null!==ha&&1&ha.memoizedState.tag){if(r.flags|=2048,Da(9,_a.bind(null,r,o,i,t),void 0,null),null===Al)throw Error(n(349));30&da||Pa(r,t,i)}return i}function Pa(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=fa.updateQueue)?(t={lastEffect:null,stores:null},fa.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function _a(e,t,n,r){t.value=n,t.getSnapshot=r,Aa(t)&&Ia(e)}function Ra(e,t,n){return n(function(){Aa(t)&&Ia(e)})}function Aa(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!fr(e,n)}catch(r){return!0}}function Ia(e){var t=Ui(e,1);null!==t&&au(t,e,1,-1)}function ja(e){var t=Sa();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ea,lastRenderedState:e},t.queue=e,e=e.dispatch=Za.bind(null,fa,e),[t.memoizedState,e]}function Da(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=fa.updateQueue)?(t={lastEffect:null,stores:null},fa.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 za(){return Ca().memoizedState}function Ma(e,t,n,r){var o=Sa();fa.flags|=e,o.memoizedState=Da(1|t,n,void 0,void 0===r?null:r)}function Fa(e,t,n,r){var o=Ca();r=void 0===r?null:r;var i=void 0;if(null!==pa){var a=pa.memoizedState;if(i=a.destroy,null!==r&&ka(r,a.deps))return void(o.memoizedState=Da(t,n,i,r))}fa.flags|=e,o.memoizedState=Da(1|t,n,i,r)}function Ua(e,t){return Ma(8390656,8,e,t)}function Ba(e,t){return Fa(2048,8,e,t)}function $a(e,t){return Fa(4,2,e,t)}function Va(e,t){return Fa(4,4,e,t)}function Ha(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 qa(e,t,n){return n=null!=n?n.concat([e]):null,Fa(4,4,Ha.bind(null,t,e),n)}function Wa(){}function Ka(e,t){var n=Ca();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ka(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Qa(e,t){var n=Ca();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ka(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ja(e,t,n){return 21&da?(fr(n,t)||(n=kt(),fa.lanes|=n,Ul|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ss=!0),e.memoizedState=n)}function Ga(e,t){var n=Ct;Ct=0!==n&&4>n?n:4,e(!0);var r=ca.transition;ca.transition={};try{e(!1),t()}finally{Ct=n,ca.transition=r}}function Ya(){return Ca().memoizedState}function Xa(e,t,n){var r=iu(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},es(e))ts(t,n);else if(null!==(n=Fi(e,t,n,r))){au(n,e,r,ou()),ns(n,t,r)}}function Za(e,t,n){var r=iu(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(es(e))ts(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,fr(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(Ve){}null!==(n=Fi(e,t,o,r))&&(au(n,e,r,o=ou()),ns(n,t,r))}}function es(e){var t=e.alternate;return e===fa||null!==t&&t===fa}function ts(e,t){ma=ga=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ns(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,St(e,n)}}var rs={readContext:Di,useCallback:ba,useContext:ba,useEffect:ba,useImperativeHandle:ba,useInsertionEffect:ba,useLayoutEffect:ba,useMemo:ba,useReducer:ba,useRef:ba,useState:ba,useDebugValue:ba,useDeferredValue:ba,useTransition:ba,useMutableSource:ba,useSyncExternalStore:ba,useId:ba,unstable_isNewReconciler:!1},os={readContext:Di,useCallback:function(e,t){return Sa().memoizedState=[e,void 0===t?null:t],e},useContext:Di,useEffect:Ua,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Ma(4194308,4,Ha.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=Sa();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Sa();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=Xa.bind(null,fa,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Sa().memoizedState=e},useState:ja,useDebugValue:Wa,useDeferredValue:function(e){return Sa().memoizedState=e},useTransition:function(){var e=ja(!1),t=e[0];return e=Ga.bind(null,e[1]),Sa().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var o=fa,i=Sa();if(ci){if(void 0===r)throw Error(n(407));r=r()}else{if(r=t(),null===Al)throw Error(n(349));30&da||Pa(o,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,Ua(Ra.bind(null,o,a,e),[e]),o.flags|=2048,Da(9,_a.bind(null,o,a,r,t),void 0,null),r},useId:function(){var e=Sa(),t=Al.identifierPrefix;if(ci){var n=ri;t=":"+t+"R"+(n=(ni&~(1<<32-dt(ni)-1)).toString(32)+n),0<(n=ya++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=va++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},is={readContext:Di,useCallback:Ka,useContext:Di,useEffect:Ba,useImperativeHandle:qa,useInsertionEffect:$a,useLayoutEffect:Va,useMemo:Qa,useReducer:Ta,useRef:za,useState:function(){return Ta(Ea)},useDebugValue:Wa,useDeferredValue:function(e){return Ja(Ca(),pa.memoizedState,e)},useTransition:function(){return[Ta(Ea)[0],Ca().memoizedState]},useMutableSource:Oa,useSyncExternalStore:La,useId:Ya,unstable_isNewReconciler:!1},as={readContext:Di,useCallback:Ka,useContext:Di,useEffect:Ba,useImperativeHandle:qa,useInsertionEffect:$a,useLayoutEffect:Va,useMemo:Qa,useReducer:Na,useRef:za,useState:function(){return Na(Ea)},useDebugValue:Wa,useDeferredValue:function(e){var t=Ca();return null===pa?t.memoizedState=e:Ja(t,pa.memoizedState,e)},useTransition:function(){return[Na(Ea)[0],Ca().memoizedState]},useMutableSource:Oa,useSyncExternalStore:La,useId:Ya,unstable_isNewReconciler:!1};function ss(e,t){if(e&&e.defaultProps){for(var n in t=M({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function ls(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:M({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var us={isMounted:function(e){return!!(e=e._reactInternals)&&Ke(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ou(),o=iu(e),i=Hi(r,o);i.payload=t,null!=n&&(i.callback=n),null!==(t=qi(e,i,o))&&(au(t,e,o,r),Wi(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ou(),o=iu(e),i=Hi(r,o);i.tag=1,i.payload=t,null!=n&&(i.callback=n),null!==(t=qi(e,i,o))&&(au(t,e,o,r),Wi(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ou(),r=iu(e),o=Hi(n,r);o.tag=2,null!=t&&(o.callback=t),null!==(t=qi(e,o,r))&&(au(t,e,r,n),Wi(t,e,r))}};function cs(e,t,n,r,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!pr(n,r)||!pr(o,i))}function ds(e,t,n){var r=!1,o=Ao,i=t.contextType;return"object"==typeof i&&null!==i?i=Di(i):(o=Mo(t)?Do:Io.current,i=(r=null!=(r=t.contextTypes))?zo(e,o):Ao),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=us,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function fs(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&&us.enqueueReplaceState(t,t.state,null)}function ps(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},$i(e);var i=t.contextType;"object"==typeof i&&null!==i?o.context=Di(i):(i=Mo(t)?Do:Io.current,o.context=zo(e,i)),o.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(ls(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&&us.enqueueReplaceState(o,o.state,null),Qi(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4194308)}function hs(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 gs(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}var ms="function"==typeof WeakMap?WeakMap:Map;function ys(e,t,n){(n=Hi(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ql||(Ql=!0,Jl=r)},n}function vs(e,t,n){(n=Hi(-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(){}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===Gl?Gl=new Set([this]):Gl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function bs(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ms;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=Lu.bind(null,e,t,n),t.then(e,e))}function ks(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 ws(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=Hi(-1,1)).tag=2,qi(n,t,1))),n.lanes|=1),e)}var xs=w.ReactCurrentOwner,Ss=!1;function Cs(e,t,n,r){t.child=null===e?Ni(t,null,n,r):Ti(t,e.child,n,r)}function Es(e,t,n,r,o){n=n.render;var i=t.ref;return ji(t,o),r=wa(e,t,n,r,i,o),n=xa(),null===e||Ss?(ci&&n&&ai(t),t.flags|=1,Cs(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Qs(e,t,o))}function Ts(e,t,n,r,o){if(null===e){var i=n.type;return"function"!=typeof i||Du(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Mu(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,Ns(e,t,i,r,o))}if(i=e.child,0===(e.lanes&o)){var a=i.memoizedProps;if((n=null!==(n=n.compare)?n:pr)(a,r)&&e.ref===t.ref)return Qs(e,t,o)}return t.flags|=1,(e=zu(i,r)).ref=t.ref,e.return=t,t.child=e}function Ns(e,t,n,r,o){if(null!==e){var i=e.memoizedProps;if(pr(i,r)&&e.ref===t.ref){if(Ss=!1,t.pendingProps=r=i,0===(e.lanes&o))return t.lanes=e.lanes,Qs(e,t,o);131072&e.flags&&(Ss=!0)}}return Ps(e,t,n,r,o)}function Os(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,Ro(zl,Dl),Dl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==i?i.baseLanes:n,Ro(zl,Dl),Dl|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ro(zl,Dl),Dl|=n;else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,Ro(zl,Dl),Dl|=r;return Cs(e,t,o,n),t.child}function Ls(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ps(e,t,n,r,o){var i=Mo(n)?Do:Io.current;return i=zo(t,i),ji(t,o),n=wa(e,t,n,r,i,o),r=xa(),null===e||Ss?(ci&&r&&ai(t),t.flags|=1,Cs(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Qs(e,t,o))}function _s(e,t,n,r,o){if(Mo(n)){var i=!0;$o(t)}else i=!1;if(ji(t,o),null===t.stateNode)Ks(e,t),ds(t,n,r),ps(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;"object"==typeof u&&null!==u?u=Di(u):u=zo(t,u=Mo(n)?Do:Io.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==u)&&fs(t,a,r,u),Bi=!1;var f=t.memoizedState;a.state=f,Qi(t,r,a,o),l=t.memoizedState,s!==r||f!==l||jo.current||Bi?("function"==typeof c&&(ls(t,n,c,r),l=t.memoizedState),(s=Bi||cs(t,n,s,r,f,l,u))?(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=u,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Vi(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:ss(t.type,s),a.props=u,d=t.pendingProps,f=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=Di(l):l=zo(t,l=Mo(n)?Do:Io.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||f!==l)&&fs(t,a,r,l),Bi=!1,f=t.memoizedState,a.state=f,Qi(t,r,a,o);var h=t.memoizedState;s!==d||f!==h||jo.current||Bi?("function"==typeof p&&(ls(t,n,p,r),h=t.memoizedState),(u=Bi||cs(t,n,u,r,f,h,l)||!1)?(c||"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=u):("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 Rs(e,t,n,r,i,o)}function Rs(e,t,n,r,o,i){Ls(e,t);var a=!!(128&t.flags);if(!r&&!a)return o&&Vo(t,n,!1),Qs(e,t,i);r=t.stateNode,xs.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Ti(t,e.child,null,i),t.child=Ti(t,null,s,i)):Cs(e,t,s,i),t.memoizedState=r.state,o&&Vo(t,n,!0),t.child}function As(e){var t=e.stateNode;t.pendingContext?Uo(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Uo(0,t.context,!1),ta(e,t.containerInfo)}function Is(e,t,n,r,o){return bi(),ki(o),t.flags|=256,Cs(e,t,n,r),t.child}var js,Ds,zs,Ms,Fs={dehydrated:null,treeContext:null,retryLane:0};function Us(e){return{baseLanes:e,cachePool:null,transitions:null}}function Bs(e,t,r){var o,i=t.pendingProps,a=ia.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),Ro(ia,1&a),null===e)return gi(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=Uu(l,i,0,null):(s.childLanes=0,s.pendingProps=l),e=Fu(e,i,r,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Us(r),t.memoizedState=Fs,e):$s(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,Vs(e,t,s,o=gs(Error(n(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=o.fallback,i=t.mode,o=Uu({mode:"visible",children:o.children},i,0,null),(a=Fu(a,i,s,null)).flags|=2,o.return=t,a.return=t,o.sibling=a,t.child=o,1&t.mode&&Ti(t,e.child,null,s),t.child.memoizedState=Us(s),t.memoizedState=Fs,a);if(!(1&t.mode))return Vs(e,t,s,null);if("$!"===i.data){if(o=i.nextSibling&&i.nextSibling.dataset)var l=o.dgst;return o=l,Vs(e,t,s,o=gs(a=Error(n(419)),o,void 0))}if(l=0!==(s&e.childLanes),Ss||l){if(null!==(o=Al)){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,Ui(e,i),au(o,e,i,-1))}return bu(),Vs(e,t,s,o=gs(Error(n(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=_u.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,ui=go(i.nextSibling),li=t,ci=!0,di=null,null!==e&&(Zo[ei++]=ni,Zo[ei++]=ri,Zo[ei++]=ti,ni=e.id,ri=e.overflow,ti=t),t=$s(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 u={mode:"hidden",children:i.children};return 1&l||t.child===a?(i=zu(a,u)).subtreeFlags=14680064&a.subtreeFlags:((i=t.child).childLanes=0,i.pendingProps=u,t.deletions=null),null!==o?s=zu(o,s):(s=Fu(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)?Us(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=zu(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 $s(e,t){return(t=Uu({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Vs(e,t,n,r){return null!==r&&ki(r),Ti(t,e.child,null,n),(e=$s(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Hs(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ii(e.return,t,n)}function qs(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 Ws(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Cs(e,t,r.children,n),2&(r=ia.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&&Hs(e,n,t);else if(19===e.tag)Hs(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(Ro(ia,r),1&t.mode)switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===aa(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),qs(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===aa(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}qs(t,!0,n,null,i);break;case"together":qs(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Ks(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Qs(e,t,r){if(null!==e&&(t.dependencies=e.dependencies),Ul|=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=zu(e=t.child,e.pendingProps),t.child=r,r.return=t;null!==e.sibling;)e=e.sibling,(r=r.sibling=zu(e,e.pendingProps)).return=t;r.sibling=null}return t.child}function Js(e,t){if(!ci)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 Gs(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 Ys(e,t,r){var i=t.pendingProps;switch(si(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Gs(t),null;case 1:case 17:return Mo(t.type)&&Fo(),Gs(t),null;case 3:return i=t.stateNode,na(),_o(jo),_o(Io),la(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),null!==e&&null!==e.child||(yi(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==di&&(cu(di),di=null))),Ds(e,t),Gs(t),null;case 5:oa(t);var a=ea(Zi.current);if(r=t.type,null!==e&&null!=t.stateNode)zs(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 Gs(t),null}if(e=ea(Yi.current),yi(t)){i=t.stateNode,r=t.type;var s=t.memoizedProps;switch(i[vo]=t,i[bo]=s,e=!!(1&t.mode),r){case"dialog":Hr("cancel",i),Hr("close",i);break;case"iframe":case"object":case"embed":Hr("load",i);break;case"video":case"audio":for(a=0;a<Ur.length;a++)Hr(Ur[a],i);break;case"source":Hr("error",i);break;case"img":case"image":case"link":Hr("error",i),Hr("load",i);break;case"details":Hr("toggle",i);break;case"input":Y(i,s),Hr("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!s.multiple},Hr("invalid",i);break;case"textarea":ie(i,s),Hr("invalid",i)}for(var l in be(r,s),a=null,s)if(s.hasOwnProperty(l)){var u=s[l];"children"===l?"string"==typeof u?i.textContent!==u&&(!0!==s.suppressHydrationWarning&&ro(i.textContent,u,e),a=["children",u]):"number"==typeof u&&i.textContent!==""+u&&(!0!==s.suppressHydrationWarning&&ro(i.textContent,u,e),a=["children",""+u]):o.hasOwnProperty(l)&&null!=u&&"onScroll"===l&&Hr("scroll",i)}switch(r){case"input":K(i),ee(i,s,!0);break;case"textarea":K(i),se(i);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(i.onclick=oo)}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[vo]=t,e[bo]=i,js(e,t,!1,!1),t.stateNode=e;e:{switch(l=ke(r,i),r){case"dialog":Hr("cancel",e),Hr("close",e),a=i;break;case"iframe":case"object":case"embed":Hr("load",e),a=i;break;case"video":case"audio":for(a=0;a<Ur.length;a++)Hr(Ur[a],e);a=i;break;case"source":Hr("error",e),a=i;break;case"img":case"image":case"link":Hr("error",e),Hr("load",e),a=i;break;case"details":Hr("toggle",e),a=i;break;case"input":Y(e,i),a=G(e,i),Hr("invalid",e);break;case"option":default:a=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},a=M({},i,{value:void 0}),Hr("invalid",e);break;case"textarea":ie(e,i),a=oe(e,i),Hr("invalid",e)}for(s in be(r,a),u=a)if(u.hasOwnProperty(s)){var c=u[s];"style"===s?ye(e,c):"dangerouslySetInnerHTML"===s?null!=(c=c?c.__html:void 0)&&fe(e,c):"children"===s?"string"==typeof c?("textarea"!==r||""!==c)&&pe(e,c):"number"==typeof c&&pe(e,""+c):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(o.hasOwnProperty(s)?null!=c&&"onScroll"===s&&Hr("scroll",e):null!=c&&b(e,s,c,l))}switch(r){case"input":K(e),ee(e,i,!1);break;case"textarea":K(e),se(e);break;case"option":null!=i.value&&e.setAttribute("value",""+q(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=oo)}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 Gs(t),null;case 6:if(e&&null!=t.stateNode)Ms(e,t,e.memoizedProps,i);else{if("string"!=typeof i&&null===t.stateNode)throw Error(n(166));if(r=ea(Zi.current),ea(Yi.current),yi(t)){if(i=t.stateNode,r=t.memoizedProps,i[vo]=t,(s=i.nodeValue!==r)&&null!==(e=li))switch(e.tag){case 3:ro(i.nodeValue,r,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&ro(i.nodeValue,r,!!(1&e.mode))}s&&(t.flags|=4)}else(i=(9===r.nodeType?r:r.ownerDocument).createTextNode(i))[vo]=t,t.stateNode=i}return Gs(t),null;case 13:if(_o(ia),i=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ci&&null!==ui&&1&t.mode&&!(128&t.flags))vi(),bi(),t.flags|=98560,s=!1;else if(s=yi(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[vo]=t}else bi(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Gs(t),s=!1}else null!==di&&(cu(di),di=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&ia.current?0===Ml&&(Ml=3):bu())),null!==t.updateQueue&&(t.flags|=4),Gs(t),null);case 4:return na(),Ds(e,t),null===e&&Kr(t.stateNode.containerInfo),Gs(t),null;case 10:return Ai(t.type._context),Gs(t),null;case 19:if(_o(ia),null===(s=t.memoizedState))return Gs(t),null;if(i=!!(128&t.flags),null===(l=s.rendering))if(i)Js(s,!1);else{if(0!==Ml||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(l=aa(e))){for(t.flags|=128,Js(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 Ro(ia,1&ia.current|2),t.child}e=e.sibling}null!==s.tail&&nt()>Wl&&(t.flags|=128,i=!0,Js(s,!1),t.lanes=4194304)}else{if(!i)if(null!==(e=aa(l))){if(t.flags|=128,i=!0,null!==(r=e.updateQueue)&&(t.updateQueue=r,t.flags|=4),Js(s,!0),null===s.tail&&"hidden"===s.tailMode&&!l.alternate&&!ci)return Gs(t),null}else 2*nt()-s.renderingStartTime>Wl&&1073741824!==r&&(t.flags|=128,i=!0,Js(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=nt(),t.sibling=null,r=ia.current,Ro(ia,i?1&r|2:1&r),t):(Gs(t),null);case 22:case 23:return gu(),i=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==i&&(t.flags|=8192),i&&1&t.mode?!!(1073741824&Dl)&&(Gs(t),6&t.subtreeFlags&&(t.flags|=8192)):Gs(t),null;case 24:case 25:return null}throw Error(n(156,t.tag))}function Xs(e,t){switch(si(t),t.tag){case 1:return Mo(t.type)&&Fo(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return na(),_o(jo),_o(Io),la(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return oa(t),null;case 13:if(_o(ia),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(n(340));bi()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return _o(ia),null;case 4:return na(),null;case 10:return Ai(t.type._context),null;case 22:case 23:return gu(),null;default:return null}}js=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}},Ds=function(){},zs=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,ea(Yi.current);var a,s=null;switch(n){case"input":i=G(e,i),r=G(e,r),s=[];break;case"select":i=M({},i,{value:void 0}),r=M({},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=oo)}for(c in be(n,r),n=null,i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var l=i[c];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(o.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var u=r[c];if(l=null!=i?i[c]:void 0,r.hasOwnProperty(c)&&u!==l&&(null!=u||null!=l))if("style"===c)if(l){for(a in l)!l.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&l[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(s||(s=[]),s.push(c,n)),n=u;else"dangerouslySetInnerHTML"===c?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(s=s||[]).push(c,u)):"children"===c?"string"!=typeof u&&"number"!=typeof u||(s=s||[]).push(c,""+u):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(o.hasOwnProperty(c)?(null!=u&&"onScroll"===c&&Hr("scroll",e),s||l===u||(s=[])):(s=s||[]).push(c,u))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}},Ms=function(e,t,n,r){n!==r&&(t.flags|=4)};var Zs=!1,el=!1,tl="function"==typeof WeakSet?WeakSet:Set,nl=null;function rl(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(r){Ou(e,t,r)}else n.current=null}function ol(e,t,n){try{n()}catch(r){Ou(e,t,r)}}var il=!1;function al(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&&ol(t,n,i)}o=o.next}while(o!==r)}}function sl(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 ll(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 ul(e){var t=e.alternate;null!==t&&(e.alternate=null,ul(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[vo],delete t[bo],delete t[wo],delete t[xo],delete t[So])),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 cl(e){return 5===e.tag||3===e.tag||4===e.tag}function dl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||cl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(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 fl(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=oo));else if(4!==r&&null!==(e=e.child))for(fl(e,t,n),e=e.sibling;null!==e;)fl(e,t,n),e=e.sibling}function pl(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(pl(e,t,n),e=e.sibling;null!==e;)pl(e,t,n),e=e.sibling}var hl=null,gl=!1;function ml(e,t,n){for(n=n.child;null!==n;)yl(e,t,n),n=n.sibling}function yl(e,t,n){if(ct&&"function"==typeof ct.onCommitFiberUnmount)try{ct.onCommitFiberUnmount(ut,n)}catch(s){}switch(n.tag){case 5:el||rl(n,t);case 6:var r=hl,o=gl;hl=null,ml(e,t,n),gl=o,null!==(hl=r)&&(gl?(e=hl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):hl.removeChild(n.stateNode));break;case 18:null!==hl&&(gl?(e=hl,n=n.stateNode,8===e.nodeType?ho(e.parentNode,n):1===e.nodeType&&ho(e,n),Kt(e)):ho(hl,n.stateNode));break;case 4:r=hl,o=gl,hl=n.stateNode.containerInfo,gl=!0,ml(e,t,n),hl=r,gl=o;break;case 0:case 11:case 14:case 15:if(!el&&(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)&&ol(n,t,a),o=o.next}while(o!==r)}ml(e,t,n);break;case 1:if(!el&&(rl(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Ou(n,t,s)}ml(e,t,n);break;case 21:ml(e,t,n);break;case 22:1&n.mode?(el=(r=el)||null!==n.memoizedState,ml(e,t,n),el=r):ml(e,t,n);break;default:ml(e,t,n)}}function vl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new tl),t.forEach(function(t){var r=Ru.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function bl(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:hl=l.stateNode,gl=!1;break e;case 3:case 4:hl=l.stateNode.containerInfo,gl=!0;break e}l=l.return}if(null===hl)throw Error(n(160));yl(a,s,i),hl=null,gl=!1;var u=i.alternate;null!==u&&(u.return=null),i.return=null}catch(Ve){Ou(i,t,Ve)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)kl(t,e),t=t.sibling}function kl(e,t){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(bl(t,e),wl(e),4&o){try{al(3,e,e.return),sl(3,e)}catch(Be){Ou(e,e.return,Be)}try{al(5,e,e.return)}catch(Be){Ou(e,e.return,Be)}}break;case 1:bl(t,e),wl(e),512&o&&null!==r&&rl(r,r.return);break;case 5:if(bl(t,e),wl(e),512&o&&null!==r&&rl(r,r.return),32&e.flags){var i=e.stateNode;try{pe(i,"")}catch(Be){Ou(e,e.return,Be)}}if(4&o&&null!=(i=e.stateNode)){var a=e.memoizedProps,s=null!==r?r.memoizedProps:a,l=e.type,u=e.updateQueue;if(e.updateQueue=null,null!==u)try{"input"===l&&"radio"===a.type&&null!=a.name&&X(i,a),ke(l,s);var c=ke(l,a);for(s=0;s<u.length;s+=2){var d=u[s],f=u[s+1];"style"===d?ye(i,f):"dangerouslySetInnerHTML"===d?fe(i,f):"children"===d?pe(i,f):b(i,d,f,c)}switch(l){case"input":Z(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[bo]=a}catch(Be){Ou(e,e.return,Be)}}break;case 6:if(bl(t,e),wl(e),4&o){if(null===e.stateNode)throw Error(n(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(Be){Ou(e,e.return,Be)}}break;case 3:if(bl(t,e),wl(e),4&o&&null!==r&&r.memoizedState.isDehydrated)try{Kt(t.containerInfo)}catch(Be){Ou(e,e.return,Be)}break;case 4:default:bl(t,e),wl(e);break;case 13:bl(t,e),wl(e),8192&(i=e.child).flags&&(a=null!==i.memoizedState,i.stateNode.isHidden=a,!a||null!==i.alternate&&null!==i.alternate.memoizedState||(ql=nt())),4&o&&vl(e);break;case 22:if(d=null!==r&&null!==r.memoizedState,1&e.mode?(el=(c=el)||d,bl(t,e),el=c):bl(t,e),wl(e),8192&o){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!d&&1&e.mode)for(nl=e,d=e.child;null!==d;){for(f=nl=d;null!==nl;){switch(h=(p=nl).child,p.tag){case 0:case 11:case 14:case 15:al(4,p,p.return);break;case 1:rl(p,p.return);var g=p.stateNode;if("function"==typeof g.componentWillUnmount){o=p,r=p.return;try{t=o,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(Be){Ou(o,r,Be)}}break;case 5:rl(p,p.return);break;case 22:if(null!==p.memoizedState){El(f);continue}}null!==h?(h.return=p,nl=h):El(f)}d=d.sibling}e:for(d=null,f=e;;){if(5===f.tag){if(null===d){d=f;try{i=f.stateNode,c?"function"==typeof(a=i.style).setProperty?a.setProperty("display","none","important"):a.display="none":(l=f.stateNode,s=null!=(u=f.memoizedProps.style)&&u.hasOwnProperty("display")?u.display:null,l.style.display=me("display",s))}catch(Be){Ou(e,e.return,Be)}}}else if(6===f.tag){if(null===d)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(Be){Ou(e,e.return,Be)}}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:bl(t,e),wl(e),4&o&&vl(e);case 21:}}function wl(e){var t=e.flags;if(2&t){try{e:{for(var r=e.return;null!==r;){if(cl(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),pl(e,dl(e),i);break;case 3:case 4:var a=o.stateNode.containerInfo;fl(e,dl(e),a);break;default:throw Error(n(161))}}catch(s){Ou(e,e.return,s)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function xl(e,t,n){nl=e,Sl(e)}function Sl(e,t,n){for(var r=!!(1&e.mode);null!==nl;){var o=nl,i=o.child;if(22===o.tag&&r){var a=null!==o.memoizedState||Zs;if(!a){var s=o.alternate,l=null!==s&&null!==s.memoizedState||el;s=Zs;var u=el;if(Zs=a,(el=l)&&!u)for(nl=o;null!==nl;)l=(a=nl).child,22===a.tag&&null!==a.memoizedState?Tl(o):null!==l?(l.return=a,nl=l):Tl(o);for(;null!==i;)nl=i,Sl(i),i=i.sibling;nl=o,Zs=s,el=u}Cl(e)}else 8772&o.subtreeFlags&&null!==i?(i.return=o,nl=i):Cl(e)}}function Cl(e){for(;null!==nl;){var t=nl;if(8772&t.flags){var r=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:el||sl(5,t);break;case 1:var o=t.stateNode;if(4&t.flags&&!el)if(null===r)o.componentDidMount();else{var i=t.elementType===t.type?r.memoizedProps:ss(t.type,r.memoizedProps);o.componentDidUpdate(i,r.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Ji(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}Ji(t,s,r)}break;case 5:var l=t.stateNode;if(null===r&&4&t.flags){r=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&r.focus();break;case"img":u.src&&(r.src=u.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 c=t.alternate;if(null!==c){var d=c.memoizedState;if(null!==d){var f=d.dehydrated;null!==f&&Kt(f)}}}break;default:throw Error(n(163))}el||512&t.flags&&ll(t)}catch($e){Ou(t,t.return,$e)}}if(t===e){nl=null;break}if(null!==(r=t.sibling)){r.return=t.return,nl=r;break}nl=t.return}}function El(e){for(;null!==nl;){var t=nl;if(t===e){nl=null;break}var n=t.sibling;if(null!==n){n.return=t.return,nl=n;break}nl=t.return}}function Tl(e){for(;null!==nl;){var t=nl;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{sl(4,t)}catch(l){Ou(t,n,l)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(l){Ou(t,o,l)}}var i=t.return;try{ll(t)}catch(l){Ou(t,i,l)}break;case 5:var a=t.return;try{ll(t)}catch(l){Ou(t,a,l)}}}catch(l){Ou(t,t.return,l)}if(t===e){nl=null;break}var s=t.sibling;if(null!==s){s.return=t.return,nl=s;break}nl=t.return}}var Nl,Ol=Math.ceil,Ll=w.ReactCurrentDispatcher,Pl=w.ReactCurrentOwner,_l=w.ReactCurrentBatchConfig,Rl=0,Al=null,Il=null,jl=0,Dl=0,zl=Po(0),Ml=0,Fl=null,Ul=0,Bl=0,$l=0,Vl=null,Hl=null,ql=0,Wl=1/0,Kl=null,Ql=!1,Jl=null,Gl=null,Yl=!1,Xl=null,Zl=0,eu=0,tu=null,nu=-1,ru=0;function ou(){return 6&Rl?nt():-1!==nu?nu:nu=nt()}function iu(e){return 1&e.mode?2&Rl&&0!==jl?jl&-jl:null!==wi.transition?(0===ru&&(ru=kt()),ru):0!==(e=Ct)?e:e=void 0===(e=window.event)?16:tn(e.type):1}function au(e,t,r,o){if(50<eu)throw eu=0,tu=null,Error(n(185));xt(e,r,o),2&Rl&&e===Al||(e===Al&&(!(2&Rl)&&(Bl|=r),4===Ml&&du(e,jl)),su(e,o),1===r&&0===Rl&&!(1&t.mode)&&(Wl=nt()+500,qo&&Qo()))}function su(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-dt(i),s=1<<a,l=o[a];-1===l?0!==(s&n)&&0===(s&r)||(o[a]=vt(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}}(e,t);var r=yt(e,e===Al?jl:0);if(0===r)null!==n&&Ze(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ze(n),1===t)0===e.tag?function(e){qo=!0,Ko(e)}(fu.bind(null,e)):Ko(fu.bind(null,e)),fo(function(){!(6&Rl)&&Qo()}),n=null;else{switch(Et(r)){case 1:n=ot;break;case 4:n=it;break;case 16:default:n=at;break;case 536870912:n=lt}n=Au(n,lu.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function lu(e,t){if(nu=-1,ru=0,6&Rl)throw Error(n(327));var r=e.callbackNode;if(Tu()&&e.callbackNode!==r)return null;var o=yt(e,e===Al?jl:0);if(0===o)return null;if(30&o||0!==(o&e.expiredLanes)||t)t=ku(e,o);else{t=o;var i=Rl;Rl|=2;var a=vu();for(Al===e&&jl===t||(Kl=null,Wl=nt()+500,mu(e,t));;)try{xu();break}catch(l){yu(e,l)}Ri(),Ll.current=a,Rl=i,null!==Il?t=0:(Al=null,jl=0,t=Ml)}if(0!==t){if(2===t&&(0!==(i=bt(e))&&(o=i,t=uu(e,i))),1===t)throw r=Fl,mu(e,0),du(e,o),su(e,nt()),r;if(6===t)du(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(!fr(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=ku(e,o),2===t&&(a=bt(e),0!==a&&(o=a,t=uu(e,a))),1!==t)))throw r=Fl,mu(e,0),du(e,o),su(e,nt()),r;switch(e.finishedWork=i,e.finishedLanes=o,t){case 0:case 1:throw Error(n(345));case 2:case 5:Eu(e,Hl,Kl);break;case 3:if(du(e,o),(130023424&o)===o&&10<(t=ql+500-nt())){if(0!==yt(e,0))break;if(((i=e.suspendedLanes)&o)!==o){ou(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=lo(Eu.bind(null,e,Hl,Kl),t);break}Eu(e,Hl,Kl);break;case 4:if(du(e,o),(4194240&o)===o)break;for(t=e.eventTimes,i=-1;0<o;){var s=31-dt(o);a=1<<s,(s=t[s])>i&&(i=s),o&=~a}if(o=i,10<(o=(120>(o=nt()-o)?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*Ol(o/1960))-o)){e.timeoutHandle=lo(Eu.bind(null,e,Hl,Kl),o);break}Eu(e,Hl,Kl);break;default:throw Error(n(329))}}}return su(e,nt()),e.callbackNode===r?lu.bind(null,e):null}function uu(e,t){var n=Vl;return e.current.memoizedState.isDehydrated&&(mu(e,t).flags|=256),2!==(e=ku(e,t))&&(t=Hl,Hl=n,null!==t&&cu(t)),e}function cu(e){null===Hl?Hl=e:Hl.push.apply(Hl,e)}function du(e,t){for(t&=~$l,t&=~Bl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-dt(t),r=1<<n;e[n]=-1,t&=~r}}function fu(e){if(6&Rl)throw Error(n(327));Tu();var t=yt(e,0);if(!(1&t))return su(e,nt()),null;var r=ku(e,t);if(0!==e.tag&&2===r){var o=bt(e);0!==o&&(t=o,r=uu(e,o))}if(1===r)throw r=Fl,mu(e,0),du(e,t),su(e,nt()),r;if(6===r)throw Error(n(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Eu(e,Hl,Kl),su(e,nt()),null}function pu(e,t){var n=Rl;Rl|=1;try{return e(t)}finally{0===(Rl=n)&&(Wl=nt()+500,qo&&Qo())}}function hu(e){null!==Xl&&0===Xl.tag&&!(6&Rl)&&Tu();var t=Rl;Rl|=1;var n=_l.transition,r=Ct;try{if(_l.transition=null,Ct=1,e)return e()}finally{Ct=r,_l.transition=n,!(6&(Rl=t))&&Qo()}}function gu(){Dl=zl.current,_o(zl)}function mu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,uo(n)),null!==Il)for(n=Il.return;null!==n;){var r=n;switch(si(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Fo();break;case 3:na(),_o(jo),_o(Io),la();break;case 5:oa(r);break;case 4:na();break;case 13:case 19:_o(ia);break;case 10:Ai(r.type._context);break;case 22:case 23:gu()}n=n.return}if(Al=e,Il=e=zu(e.current,null),jl=Dl=t,Ml=0,Fl=null,$l=Bl=Ul=0,Hl=Vl=null,null!==zi){for(t=0;t<zi.length;t++)if(null!==(r=(n=zi[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}zi=null}return e}function yu(e,t){for(;;){var r=Il;try{if(Ri(),ua.current=rs,ga){for(var o=fa.memoizedState;null!==o;){var i=o.queue;null!==i&&(i.pending=null),o=o.next}ga=!1}if(da=0,ha=pa=fa=null,ma=!1,ya=0,Pl.current=null,null===r||null===r.return){Ml=1,Fl=t,Il=null;break}e:{var a=e,s=r.return,l=r,u=t;if(t=jl,l.flags|=32768,null!==u&&"object"==typeof u&&"function"==typeof u.then){var c=u,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=ks(s);if(null!==h){h.flags&=-257,ws(h,s,l,0,t),1&h.mode&&bs(a,c,t),u=c;var g=(t=h).updateQueue;if(null===g){var m=new Set;m.add(u),t.updateQueue=m}else g.add(u);break e}if(!(1&t)){bs(a,c,t),bu();break e}u=Error(n(426))}else if(ci&&1&l.mode){var y=ks(s);if(null!==y){!(65536&y.flags)&&(y.flags|=256),ws(y,s,l,0,t),ki(hs(u,l));break e}}a=u=hs(u,l),4!==Ml&&(Ml=2),null===Vl?Vl=[a]:Vl.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Ki(a,ys(0,u,t));break e;case 1:l=u;var v=a.type,b=a.stateNode;if(!(128&a.flags||"function"!=typeof v.getDerivedStateFromError&&(null===b||"function"!=typeof b.componentDidCatch||null!==Gl&&Gl.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t,Ki(a,vs(a,l,t));break e}}a=a.return}while(null!==a)}Cu(r)}catch(k){t=k,Il===r&&null!==r&&(Il=r=r.return);continue}break}}function vu(){var e=Ll.current;return Ll.current=rs,null===e?rs:e}function bu(){0!==Ml&&3!==Ml&&2!==Ml||(Ml=4),null===Al||!(268435455&Ul)&&!(268435455&Bl)||du(Al,jl)}function ku(e,t){var r=Rl;Rl|=2;var o=vu();for(Al===e&&jl===t||(Kl=null,mu(e,t));;)try{wu();break}catch(Ue){yu(e,Ue)}if(Ri(),Rl=r,Ll.current=o,null!==Il)throw Error(n(261));return Al=null,jl=0,Ml}function wu(){for(;null!==Il;)Su(Il)}function xu(){for(;null!==Il&&!et();)Su(Il)}function Su(e){var t=Nl(e.alternate,e,Dl);e.memoizedProps=e.pendingProps,null===t?Cu(e):Il=t,Pl.current=null}function Cu(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Xs(n,t)))return n.flags&=32767,void(Il=n);if(null===e)return Ml=6,void(Il=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Ys(n,t,Dl)))return void(Il=n);if(null!==(t=t.sibling))return void(Il=t);Il=t=e}while(null!==t);0===Ml&&(Ml=5)}function Eu(e,t,r){var o=Ct,i=_l.transition;try{_l.transition=null,Ct=1,function(e,t,r,o){do{Tu()}while(null!==Xl);if(6&Rl)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-dt(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}(e,a),e===Al&&(Il=Al=null,jl=0),!(2064&r.subtreeFlags)&&!(2064&r.flags)||Yl||(Yl=!0,Au(at,function(){return Tu(),null})),a=!!(15990&r.flags),!!(15990&r.subtreeFlags)||a){a=_l.transition,_l.transition=null;var s=Ct;Ct=1;var l=Rl;Rl|=4,Pl.current=null,function(e,t){if(io=Jt,vr(e=yr())){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(w){r=null;break e}var s=0,l=-1,u=-1,c=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||(u=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&&++c===i&&(l=s),p===a&&++d===o&&(u=s),null!==(h=f.nextSibling))break;p=(f=p).parentNode}f=h}r=-1===l||-1===u?null:{start:l,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(ao={focusedElem:e,selectionRange:r},Jt=!1,nl=t;null!==nl;)if(e=(t=nl).child,1028&t.subtreeFlags&&null!==e)e.return=t,nl=e;else for(;null!==nl;){t=nl;try{var g=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!==g){var m=g.memoizedProps,y=g.memoizedState,v=t.stateNode,b=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:ss(t.type,m),y);v.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var k=t.stateNode.containerInfo;1===k.nodeType?k.textContent="":9===k.nodeType&&k.documentElement&&k.removeChild(k.documentElement);break;default:throw Error(n(163))}}catch(w){Ou(t,t.return,w)}if(null!==(e=t.sibling)){e.return=t.return,nl=e;break}nl=t.return}g=il,il=!1}(e,r),kl(r,e),br(ao),Jt=!!io,ao=io=null,e.current=r,xl(r),tt(),Rl=l,Ct=s,_l.transition=a}else e.current=r;if(Yl&&(Yl=!1,Xl=e,Zl=i),a=e.pendingLanes,0===a&&(Gl=null),function(e){if(ct&&"function"==typeof ct.onCommitFiberRoot)try{ct.onCommitFiberRoot(ut,e,void 0,!(128&~e.current.flags))}catch(t){}}(r.stateNode),su(e,nt()),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(Ql)throw Ql=!1,e=Jl,Jl=null,e;!!(1&Zl)&&0!==e.tag&&Tu(),a=e.pendingLanes,1&a?e===tu?eu++:(eu=0,tu=e):eu=0,Qo()}(e,t,r,o)}finally{_l.transition=i,Ct=o}return null}function Tu(){if(null!==Xl){var e=Et(Zl),t=_l.transition,r=Ct;try{if(_l.transition=null,Ct=16>e?16:e,null===Xl)var o=!1;else{if(e=Xl,Xl=null,Zl=0,6&Rl)throw Error(n(331));var i=Rl;for(Rl|=4,nl=e.current;null!==nl;){var a=nl,s=a.child;if(16&nl.flags){var l=a.deletions;if(null!==l){for(var u=0;u<l.length;u++){var c=l[u];for(nl=c;null!==nl;){var d=nl;switch(d.tag){case 0:case 11:case 15:al(8,d,a)}var f=d.child;if(null!==f)f.return=d,nl=f;else for(;null!==nl;){var p=(d=nl).sibling,h=d.return;if(ul(d),d===c){nl=null;break}if(null!==p){p.return=h,nl=p;break}nl=h}}}var g=a.alternate;if(null!==g){var m=g.child;if(null!==m){g.child=null;do{var y=m.sibling;m.sibling=null,m=y}while(null!==m)}}nl=a}}if(2064&a.subtreeFlags&&null!==s)s.return=a,nl=s;else e:for(;null!==nl;){if(2048&(a=nl).flags)switch(a.tag){case 0:case 11:case 15:al(9,a,a.return)}var v=a.sibling;if(null!==v){v.return=a.return,nl=v;break e}nl=a.return}}var b=e.current;for(nl=b;null!==nl;){var k=(s=nl).child;if(2064&s.subtreeFlags&&null!==k)k.return=s,nl=k;else e:for(s=b;null!==nl;){if(2048&(l=nl).flags)try{switch(l.tag){case 0:case 11:case 15:sl(9,l)}}catch(x){Ou(l,l.return,x)}if(l===s){nl=null;break e}var w=l.sibling;if(null!==w){w.return=l.return,nl=w;break e}nl=l.return}}if(Rl=i,Qo(),ct&&"function"==typeof ct.onPostCommitFiberRoot)try{ct.onPostCommitFiberRoot(ut,e)}catch(x){}o=!0}return o}finally{Ct=r,_l.transition=t}}return!1}function Nu(e,t,n){e=qi(e,t=ys(0,t=hs(n,t),1),1),t=ou(),null!==e&&(xt(e,1,t),su(e,t))}function Ou(e,t,n){if(3===e.tag)Nu(e,e,n);else for(;null!==t;){if(3===t.tag){Nu(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Gl||!Gl.has(r))){t=qi(t,e=vs(t,e=hs(n,e),1),1),e=ou(),null!==t&&(xt(t,1,e),su(t,e));break}}t=t.return}}function Lu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=ou(),e.pingedLanes|=e.suspendedLanes&n,Al===e&&(jl&n)===n&&(4===Ml||3===Ml&&(130023424&jl)===jl&&500>nt()-ql?mu(e,0):$l|=n),su(e,t)}function Pu(e,t){0===t&&(1&e.mode?(t=gt,!(130023424&(gt<<=1))&&(gt=4194304)):t=1);var n=ou();null!==(e=Ui(e,t))&&(xt(e,t,n),su(e,n))}function _u(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Pu(e,n)}function Ru(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),Pu(e,r)}function Au(e,t){return Xe(e,t)}function Iu(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 ju(e,t,n,r){return new Iu(e,t,n,r)}function Du(e){return!(!(e=e.prototype)||!e.isReactComponent)}function zu(e,t){var n=e.alternate;return null===n?((n=ju(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 Mu(e,t,r,o,i,a){var s=2;if(o=e,"function"==typeof e)Du(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case C:return Fu(r.children,i,a,t);case E:s=8,i|=8;break;case T:return(e=ju(12,r,t,2|i)).elementType=T,e.lanes=a,e;case P:return(e=ju(13,r,t,i)).elementType=P,e.lanes=a,e;case _:return(e=ju(19,r,t,i)).elementType=_,e.lanes=a,e;case I:return Uu(r,i,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case N:s=10;break e;case O:s=9;break e;case L:s=11;break e;case R:s=14;break e;case A:s=16,o=null;break e}throw Error(n(130,null==e?e:typeof e,""))}return(t=ju(s,r,t,i)).elementType=e,t.type=o,t.lanes=a,t}function Fu(e,t,n,r){return(e=ju(7,e,r,t)).lanes=n,e}function Uu(e,t,n,r){return(e=ju(22,e,r,t)).elementType=I,e.lanes=n,e.stateNode={isHidden:!1},e}function Bu(e,t,n){return(e=ju(6,e,null,t)).lanes=n,e}function $u(e,t,n){return(t=ju(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Vu(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=wt(0),this.expirationTimes=wt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wt(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Hu(e,t,n,r,o,i,a,s,l){return e=new Vu(e,t,n,s,l),1===t?(t=1,!0===i&&(t|=8)):t=0,i=ju(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},$i(i),e}function qu(e){if(!e)return Ao;e:{if(Ke(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 Bo(e,r,t)}return t}function Wu(e,t,n,r,o,i,a,s,l){return(e=Hu(n,r,!0,e,0,i,0,s,l)).context=qu(null),n=e.current,(i=Hi(r=ou(),o=iu(n))).callback=null!=t?t:null,qi(n,i,o),e.current.lanes=o,xt(e,o,r),su(e,r),e}function Ku(e,t,n,r){var o=t.current,i=ou(),a=iu(o);return n=qu(n),null===t.context?t.context=n:t.pendingContext=n,(t=Hi(i,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=qi(o,t,a))&&(au(e,o,a,i),Wi(e,o,a)),a}function Qu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Ju(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Gu(e,t){Ju(e,t),(e=e.alternate)&&Ju(e,t)}Nl=function(e,t,r){if(null!==e)if(e.memoizedProps!==t.pendingProps||jo.current)Ss=!0;else{if(0===(e.lanes&r)&&!(128&t.flags))return Ss=!1,function(e,t,n){switch(t.tag){case 3:As(t),bi();break;case 5:ra(t);break;case 1:Mo(t.type)&&$o(t);break;case 4:ta(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Ro(Oi,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Ro(ia,1&ia.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Bs(e,t,n):(Ro(ia,1&ia.current),null!==(e=Qs(e,t,n))?e.sibling:null);Ro(ia,1&ia.current);break;case 19:if(r=0!==(n&t.childLanes),128&e.flags){if(r)return Ws(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ro(ia,ia.current),r)break;return null;case 22:case 23:return t.lanes=0,Os(e,t,n)}return Qs(e,t,n)}(e,t,r);Ss=!!(131072&e.flags)}else Ss=!1,ci&&1048576&t.flags&&ii(t,Xo,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;Ks(e,t),e=t.pendingProps;var i=zo(t,Io.current);ji(t,r),i=wa(null,t,o,e,i,r);var a=xa();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,$o(t)):a=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,$i(t),i.updater=us,t.stateNode=i,i._reactInternals=t,ps(t,o,e,r),t=Rs(null,t,o,!0,a,r)):(t.tag=0,ci&&a&&ai(t),Cs(null,t,i,r),t=t.child),t;case 16:o=t.elementType;e:{switch(Ks(e,t),e=t.pendingProps,o=(i=o._init)(o._payload),t.type=o,i=t.tag=function(e){if("function"==typeof e)return Du(e)?1:0;if(null!=e){if((e=e.$$typeof)===L)return 11;if(e===R)return 14}return 2}(o),e=ss(o,e),i){case 0:t=Ps(null,t,o,e,r);break e;case 1:t=_s(null,t,o,e,r);break e;case 11:t=Es(null,t,o,e,r);break e;case 14:t=Ts(null,t,o,ss(o.type,e),r);break e}throw Error(n(306,o,""))}return t;case 0:return o=t.type,i=t.pendingProps,Ps(e,t,o,i=t.elementType===o?i:ss(o,i),r);case 1:return o=t.type,i=t.pendingProps,_s(e,t,o,i=t.elementType===o?i:ss(o,i),r);case 3:e:{if(As(t),null===e)throw Error(n(387));o=t.pendingProps,i=(a=t.memoizedState).element,Vi(e,t),Qi(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=Is(e,t,o,r,i=hs(Error(n(423)),t));break e}if(o!==i){t=Is(e,t,o,r,i=hs(Error(n(424)),t));break e}for(ui=go(t.stateNode.containerInfo.firstChild),li=t,ci=!0,di=null,r=Ni(t,null,o,r),t.child=r;r;)r.flags=-3&r.flags|4096,r=r.sibling}else{if(bi(),o===i){t=Qs(e,t,r);break e}Cs(e,t,o,r)}t=t.child}return t;case 5:return ra(t),null===e&&gi(t),o=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,s=i.children,so(o,i)?s=null:null!==a&&so(o,a)&&(t.flags|=32),Ls(e,t),Cs(e,t,s,r),t.child;case 6:return null===e&&gi(t),null;case 13:return Bs(e,t,r);case 4:return ta(t,t.stateNode.containerInfo),o=t.pendingProps,null===e?t.child=Ti(t,null,o,r):Cs(e,t,o,r),t.child;case 11:return o=t.type,i=t.pendingProps,Es(e,t,o,i=t.elementType===o?i:ss(o,i),r);case 7:return Cs(e,t,t.pendingProps,r),t.child;case 8:case 12:return Cs(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,Ro(Oi,o._currentValue),o._currentValue=s,null!==a)if(fr(a.value,s)){if(a.children===i.children&&!jo.current){t=Qs(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 u=l.firstContext;null!==u;){if(u.context===o){if(1===a.tag){(u=Hi(-1,r&-r)).tag=2;var c=a.updateQueue;if(null!==c){var d=(c=c.shared).pending;null===d?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}a.lanes|=r,null!==(u=a.alternate)&&(u.lanes|=r),Ii(a.return,r,t),l.lanes|=r;break}u=u.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),Ii(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}Cs(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=Di(i)),t.flags|=1,Cs(e,t,o,r),t.child;case 14:return i=ss(o=t.type,t.pendingProps),Ts(e,t,o,i=ss(o.type,i),r);case 15:return Ns(e,t,t.type,t.pendingProps,r);case 17:return o=t.type,i=t.pendingProps,i=t.elementType===o?i:ss(o,i),Ks(e,t),t.tag=1,Mo(o)?(e=!0,$o(t)):e=!1,ji(t,r),ds(t,o,i),ps(t,o,i,r),Rs(null,t,o,!0,e,r);case 19:return Ws(e,t,r);case 22:return Os(e,t,r)}throw Error(n(156,t.tag))};var Yu="function"==typeof reportError?reportError:function(e){};function Xu(e){this._internalRoot=e}function Zu(e){this._internalRoot=e}function ec(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function tc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function nc(){}function rc(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=Qu(a);s.call(e)}}Ku(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=Qu(a);i.call(e)}}var a=Wu(t,r,e,0,null,!1,0,"",nc);return e._reactRootContainer=a,e[ko]=a.current,Kr(8===e.nodeType?e.parentNode:e),hu(),a}for(;o=e.lastChild;)e.removeChild(o);if("function"==typeof r){var s=r;r=function(){var e=Qu(l);s.call(e)}}var l=Hu(e,0,!1,null,0,!1,0,"",nc);return e._reactRootContainer=l,e[ko]=l.current,Kr(8===e.nodeType?e.parentNode:e),hu(function(){Ku(t,l,n,r)}),l}(n,t,e,o,r);return Qu(a)}Zu.prototype.render=Xu.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(n(409));Ku(e,t,null,null)},Zu.prototype.unmount=Xu.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;hu(function(){Ku(null,e,null,null)}),t[ko]=null}},Zu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Lt();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&&$t(e)}},Tt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=mt(t.pendingLanes);0!==n&&(St(t,1|n),su(t,nt()),!(6&Rl)&&(Wl=nt()+500,Qo()))}break;case 13:hu(function(){var t=Ui(e,1);if(null!==t){var n=ou();au(t,e,1,n)}}),Gu(e,1)}},Nt=function(e){if(13===e.tag){var t=Ui(e,134217728);if(null!==t)au(t,e,134217728,ou());Gu(e,134217728)}},Ot=function(e){if(13===e.tag){var t=iu(e),n=Ui(e,t);if(null!==n)au(n,e,t,ou());Gu(e,t)}},Lt=function(){return Ct},Pt=function(e,t){var n=Ct;try{return Ct=e,t()}finally{Ct=n}},Se=function(e,t,r){switch(t){case"input":if(Z(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=No(o);if(!i)throw Error(n(90));Q(o),Z(o,i)}}}break;case"textarea":ae(e,r);break;case"select":null!=(t=r.value)&&re(e,!!r.multiple,t,!1)}},Le=pu,Pe=hu;var oc={usingClientEntryPoint:!1,Events:[Eo,To,No,Ne,Oe,pu]},ic={findFiberByHostInstance:Co,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ac={bundleType:ic.bundleType,version:ic.version,rendererPackageName:ic.rendererPackageName,rendererConfig:ic.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ge(e))?null:e.stateNode},findFiberByHostInstance:ic.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 sc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sc.isDisabled&&sc.supportsFiber)try{ut=sc.inject(ac),ct=sc}catch(de){}}return y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oc,y.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ec(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)},y.createRoot=function(e,t){if(!ec(e))throw Error(n(299));var r=!1,o="",i=Yu;return null!=t&&(!0===t.unstable_strictMode&&(r=!0),void 0!==t.identifierPrefix&&(o=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Hu(e,1,!1,null,0,r,0,o,i),e[ko]=t.current,Kr(8===e.nodeType?e.parentNode:e),new Xu(t)},y.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=Ge(t))?null:e.stateNode},y.flushSync=function(e){return hu(e)},y.hydrate=function(e,t,r){if(!tc(t))throw Error(n(200));return rc(null,e,t,!0,r)},y.hydrateRoot=function(e,t,r){if(!ec(e))throw Error(n(405));var o=null!=r&&r.hydratedSources||null,i=!1,a="",s=Yu;if(null!=r&&(!0===r.unstable_strictMode&&(i=!0),void 0!==r.identifierPrefix&&(a=r.identifierPrefix),void 0!==r.onRecoverableError&&(s=r.onRecoverableError)),t=Wu(t,null,e,1,null!=r?r:null,i,0,a,s),e[ko]=t.current,Kr(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 Zu(t)},y.render=function(e,t,r){if(!tc(t))throw Error(n(200));return rc(null,e,t,!1,r)},y.unmountComponentAtNode=function(e){if(!tc(e))throw Error(n(40));return!!e._reactRootContainer&&(hu(function(){rc(null,null,e,!1,function(){e._reactRootContainer=null,e[ko]=null})}),!0)},y.unstable_batchedUpdates=pu,y.unstable_renderSubtreeIntoContainer=function(e,t,r,o){if(!tc(r))throw Error(n(200));if(null==e||void 0===e._reactInternals)throw Error(n(38));return rc(e,t,r,!1,o)},y.version="18.3.1-next-f1338f8080-20240426",y}var x,S,C=function(){if(h)return g;h=1;var e=(p||(p=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){}}(),m.exports=w()),m.exports);return g.createRoot=e.createRoot,g.hydrateRoot=e.hydrateRoot,g}(),E={exports:{}},T={};var N=(S||(S=1,E.exports=function(){if(x)return T;x=1;var e=s(),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={},u=null,c=null;for(s in void 0!==a&&(u=""+a),void 0!==n.key&&(u=""+n.key),void 0!==n.ref&&(c=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:u,ref:c,props:l,_owner:o.current}}return T.Fragment=n,T.jsx=a,T.jsxs=a,T}()),E.exports);const O={},L=(e,t,n,r)=>{A(n)&&O[n]||(A(n)&&(O[n]=new Date),((e,t,n,r)=>{const o=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(o,"warn","react-i18next::",!0);A(o[0])&&(o[0]=`react-i18next:: ${o[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...o):console})(e,t,n,r))},P=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},_=(e,t,n)=>{e.loadNamespaces(t,P(e,n))},R=(e,t,n,r)=>{if(A(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return _(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,P(e,r))},A=e=>"string"==typeof e,I=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,j={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},D=e=>j[e];let z={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(I,D)};let M;const F={type:"3rdParty",init(e){((e={})=>{z={...z,...e}})(e.options.react),(e=>{M=e})(e)}},U=l.createContext();class B{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const $=(e,t,n,r)=>e.getFixedT(t,n,r),V=(e,t={})=>{const{i18n:n}=t,{i18n:r,defaultNS:o}=l.useContext(U)||{},i=n||r||M;if(i&&!i.reportNamespaces&&(i.reportNamespaces=new B),!i){L(i,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const e=(e,t)=>{return A(t)?t:"object"==typeof(n=t)&&null!==n&&A(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e;var n},t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}i.options.react?.wait&&L(i,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...z,...i.options.react,...t},{useSuspense:s,keyPrefix:u}=a;let c=o||i.options?.defaultNS;c=A(c)?[c]:c||["translation"],i.reportNamespaces.addUsedNamespaces?.(c);const d=(i.isInitialized||i.initializedStoreOnce)&&c.every(e=>((e,t,n={})=>t.languages&&t.languages.length?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):(L(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0))(e,i,a)),f=((e,t,n,r)=>l.useCallback($(e,t,n,r),[e,t,n,r]))(i,t.lng||null,"fallback"===a.nsMode?c:c[0],u),p=()=>f,h=()=>$(i,t.lng||null,"fallback"===a.nsMode?c:c[0],u),[g,m]=l.useState(p);let y=c.join();t.lng&&(y=`${t.lng}${y}`);const v=((e,t)=>{const n=l.useRef();return l.useEffect(()=>{n.current=e},[e,t]),n.current})(y),b=l.useRef(!0);l.useEffect(()=>{const{bindI18n:e,bindI18nStore:n}=a;b.current=!0,d||s||(t.lng?R(i,t.lng,c,()=>{b.current&&m(h)}):_(i,c,()=>{b.current&&m(h)})),d&&v&&v!==y&&b.current&&m(h);const r=()=>{b.current&&m(h)};return e&&i?.on(e,r),n&&i?.store.on(n,r),()=>{b.current=!1,i&&e&&e?.split(" ").forEach(e=>i.off(e,r)),n&&i&&n.split(" ").forEach(e=>i.store.off(e,r))}},[i,y]),l.useEffect(()=>{b.current&&d&&m(p)},[i,u,d]);const k=[g,i,d];if(k.t=g,k.i18n=i,k.ready=d,d)return k;if(!d&&!s)return k;throw new Promise(e=>{t.lng?R(i,t.lng,c,()=>e()):_(i,c,()=>e())})};function H({i18n:e,defaultNS:t,children:n}){const r=l.useMemo(()=>({i18n:e,defaultNS:t}),[e,t]);return l.createElement(U.Provider,{value:r},n)}
11
11
  /**
12
12
  * @license lucide-react v0.525.0 - ISC
13
13
  *
@@ -26,13 +26,13 @@ var Q={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24"
26
26
  *
27
27
  * This source code is licensed under the ISC license.
28
28
  * See the LICENSE file in the root directory of this source tree.
29
- */const J=l.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},u)=>l.createElement("svg",{ref:u,...Q,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:W("lucide",o),...!i&&!K(s)&&{"aria-hidden":"true"},...s},[...a.map(([e,t])=>l.createElement(e,t)),...Array.isArray(i)?i:[i]])),Y=(e,t)=>{const n=l.forwardRef(({className:n,...r},o)=>{return l.createElement(J,{ref:o,iconNode:t,className:W(`lucide-${i=q(e),i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...r});var i});return n.displayName=q(e),n},G=Y("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),X=Y("circle-alert",[["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"}]]),Z=Y("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]),ee=Y("message-circle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]),te=Y("message-square",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]),ne=Y("mic-off",[["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"}]]),re=Y("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]),oe=Y("moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]),ie=Y("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]),ae=Y("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),se=({onClick:e,unreadCount:t=0,widgetConfig:n})=>{const{t:r}=V(),o=n?.company_name||r("widget.title");return O.jsxs("button",{onClick:e,className:"gpc-floating-button gpc-floating-button-with-text gpc-animate-fade-in","aria-label":r("chat.title"),title:r("chat.title"),children:[O.jsxs("div",{className:"gpc-floating-content",children:[O.jsx(ee,{className:"gpc-floating-icon"}),O.jsxs("span",{className:"gpc-floating-text",children:[r("widget.questionsTo")," ",o]})]}),t>0&&O.jsx("span",{className:"gpc-notification-badge",children:t>9?"9+":t})]})};
29
+ */const J=l.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},u)=>l.createElement("svg",{ref:u,...Q,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:W("lucide",o),...!i&&!K(s)&&{"aria-hidden":"true"},...s},[...a.map(([e,t])=>l.createElement(e,t)),...Array.isArray(i)?i:[i]])),G=(e,t)=>{const n=l.forwardRef(({className:n,...r},o)=>{return l.createElement(J,{ref:o,iconNode:t,className:W(`lucide-${i=q(e),i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...r});var i});return n.displayName=q(e),n},Y=G("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),X=G("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Z=G("circle-alert",[["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"}]]),ee=G("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),te=G("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]),ne=G("message-circle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]),re=G("message-square",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]),oe=G("mic-off",[["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"}]]),ie=G("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]),ae=G("moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]),se=G("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),le=G("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]),ue=G("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),ce=G("trash-2",[["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"}]]),de=G("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),fe=({onClick:e,unreadCount:t=0,widgetConfig:n})=>{const{t:r}=V(),o=n?.widget_customization?.branding?.company_name||r("widget.title");return N.jsxs("button",{onClick:e,className:"gpc-floating-button gpc-floating-button-with-text gpc-animate-fade-in","aria-label":r("chat.title"),title:r("chat.title"),children:[N.jsxs("div",{className:"gpc-floating-content",children:[N.jsx(ne,{className:"gpc-floating-icon"}),N.jsxs("span",{className:"gpc-floating-text",children:[r("widget.questionsTo")," ",o]})]}),t>0&&N.jsx("span",{className:"gpc-notification-badge",children:t>9?"9+":t})]})};
30
30
  /**
31
31
  * @license lucide-react v0.525.0 - ISC
32
32
  *
33
33
  * This source code is licensed under the ISC license.
34
34
  * See the LICENSE file in the root directory of this source tree.
35
- */let le,ue,ce,de={data:""},fe=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,pe=/\/\*[^]*?\*\/| +/g,he=/\n+/g,ge=(e,t)=>{let n="",r="",o="";for(let i in e){let a=e[i];"@"==i[0]?"i"==i[1]?n=i+" "+a+";":r+="f"==i[1]?ge(a,i):i+"{"+ge(a,"k"==i[1]?"":t)+"}":"object"==typeof a?r+=ge(a,t?t.replace(/([^,])+/g,e=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):i):null!=a&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=ge.p?ge.p(i,a):i+":"+a+";")}return n+(t&&o?t+"{"+o+"}":o)+r},me={},ye=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+ye(e[n]);return t}return e};function ve(e){let t=this||{},n=e.call?e(t.p):e;return((e,t,n,r,o)=>{let i=ye(e),a=me[i]||(me[i]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(i));if(!me[a]){let t=i!==e?e:(e=>{let t,n,r=[{}];for(;t=fe.exec(e.replace(pe,""));)t[4]?r.shift():t[3]?(n=t[3].replace(he," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(he," ").trim();return r[0]})(e);me[a]=ge(o?{["@keyframes "+a]:t}:t,n?"":"."+a)}let s=n&&me.g?me.g:null;return n&&(me.g=me[a]),l=me[a],u=t,c=r,(d=s)?u.data=u.data.replace(d,l):-1===u.data.indexOf(l)&&(u.data=c?l+u.data:u.data+l),a;var l,u,c,d})(n.unshift?n.raw?((e,t,n)=>e.reduce((e,r,o)=>{let i=t[o];if(i&&i.call){let e=i(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;i=t?"."+t:e&&"object"==typeof e?e.props?"":ge(e,""):!1===e?"":e}return e+r+(null==i?"":i)},""))(n,[].slice.call(arguments,1),t.p):n.reduce((e,n)=>Object.assign(e,n&&n.call?n(t.p):n),{}):n,(e=>{if("object"==typeof window){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||de})(t.target),t.g,t.o,t.k)}ve.bind({g:1});let be=ve.bind({k:1});function ke(e,t){let n=this||{};return function(){let t=arguments;return function r(o,i){let a=Object.assign({},o),s=a.className||r.className;n.p=Object.assign({theme:ue&&ue()},a),n.o=/ *go\d+/.test(s),a.className=ve.apply(n,t)+(s?" "+s:"");let l=e;return e[0]&&(l=a.as||e,delete a.as),ce&&l[0]&&ce(a),le(l,a)}}}var xe=(e,t)=>(e=>"function"==typeof e)(e)?e(t):e,we=(()=>{let e=0;return()=>(++e).toString()})(),Se=(()=>{let e;return()=>{if(void 0===e&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),Ee="default",Ce=(e,t)=>{let{toastLimit:n}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,n)};case 1:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case 2:let{toast:r}=t;return Ce(e,{type:e.toasts.find(e=>e.id===r.id)?1:0,toast:r});case 3:let{toastId:o}=t;return{...e,toasts:e.toasts.map(e=>e.id===o||void 0===o?{...e,dismissed:!0,visible:!1}:e)};case 4:return void 0===t.toastId?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(e=>({...e,pauseDuration:e.pauseDuration+i}))}}},Te=[],Oe={toasts:[],pausedAt:void 0,settings:{toastLimit:20}},Ne={},Pe=(e,t=Ee)=>{Ne[t]=Ce(Ne[t]||Oe,e),Te.forEach(([e,n])=>{e===t&&n(Ne[t])})},Le=e=>Object.keys(Ne).forEach(t=>Pe(e,t)),Re=(e=Ee)=>t=>{Pe(t,e)},_e={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Ae=e=>(t,n)=>{let r=((e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(null==n?void 0:n.id)||we()}))(t,e,n);return Re(r.toasterId||(e=>Object.keys(Ne).find(t=>Ne[t].toasts.some(t=>t.id===e)))(r.id))({type:2,toast:r}),r.id},Ie=(e,t)=>Ae("blank")(e,t);Ie.error=Ae("error"),Ie.success=Ae("success"),Ie.loading=Ae("loading"),Ie.custom=Ae("custom"),Ie.dismiss=(e,t)=>{let n={type:3,toastId:e};t?Re(t)(n):Le(n)},Ie.dismissAll=e=>Ie.dismiss(void 0,e),Ie.remove=(e,t)=>{let n={type:4,toastId:e};t?Re(t)(n):Le(n)},Ie.removeAll=e=>Ie.remove(void 0,e),Ie.promise=(e,t,n)=>{let r=Ie.loading(t.loading,{...n,...null==n?void 0:n.loading});return"function"==typeof e&&(e=e()),e.then(e=>{let o=t.success?xe(t.success,e):void 0;return o?Ie.success(o,{id:r,...n,...null==n?void 0:n.success}):Ie.dismiss(r),e}).catch(e=>{let o=t.error?xe(t.error,e):void 0;o?Ie.error(o,{id:r,...n,...null==n?void 0:n.error}):Ie.dismiss(r)}),e};var De,ze,je,Fe,Me=(e,t="default")=>{let{toasts:n,pausedAt:r}=((e={},t=Ee)=>{let[n,r]=l.useState(Ne[t]||Oe),o=l.useRef(Ne[t]);l.useEffect(()=>(o.current!==Ne[t]&&r(Ne[t]),Te.push([t,r]),()=>{let e=Te.findIndex(([e])=>e===t);e>-1&&Te.splice(e,1)}),[t]);let i=n.toasts.map(t=>{var n,r,o;return{...e,...e[t.type],...t,removeDelay:t.removeDelay||(null==(n=e[t.type])?void 0:n.removeDelay)||(null==e?void 0:e.removeDelay),duration:t.duration||(null==(r=e[t.type])?void 0:r.duration)||(null==e?void 0:e.duration)||_e[t.type],style:{...e.style,...null==(o=e[t.type])?void 0:o.style,...t.style}}});return{...n,toasts:i}})(e,t),o=l.useRef(new Map).current,i=l.useCallback((e,t=1e3)=>{if(o.has(e))return;let n=setTimeout(()=>{o.delete(e),a({type:4,toastId:e})},t);o.set(e,n)},[]);l.useEffect(()=>{if(r)return;let e=Date.now(),o=n.map(n=>{if(n.duration===1/0)return;let r=(n.duration||0)+n.pauseDuration-(e-n.createdAt);if(!(r<0))return setTimeout(()=>Ie.dismiss(n.id,t),r);n.visible&&Ie.dismiss(n.id)});return()=>{o.forEach(e=>e&&clearTimeout(e))}},[n,r,t]);let a=l.useCallback(Re(t),[t]),s=l.useCallback(()=>{a({type:5,time:Date.now()})},[a]),u=l.useCallback((e,t)=>{a({type:1,toast:{id:e,height:t}})},[a]),c=l.useCallback(()=>{r&&a({type:6,time:Date.now()})},[r,a]),d=l.useCallback((e,t)=>{let{reverseOrder:r=!1,gutter:o=8,defaultPosition:i}=t||{},a=n.filter(t=>(t.position||i)===(e.position||i)&&t.height),s=a.findIndex(t=>t.id===e.id),l=a.filter((e,t)=>t<s&&e.visible).length;return a.filter(e=>e.visible).slice(...r?[l+1]:[0,l]).reduce((e,t)=>e+(t.height||0)+o,0)},[n]);return l.useEffect(()=>{n.forEach(e=>{if(e.dismissed)i(e.id,e.removeDelay);else{let t=o.get(e.id);t&&(clearTimeout(t),o.delete(e.id))}})},[n,i]),{toasts:n,handlers:{updateHeight:u,startPause:s,endPause:c,calculateOffset:d}}},Ue=be`
35
+ */let pe,he,ge,me={data:""},ye=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,ve=/\/\*[^]*?\*\/| +/g,be=/\n+/g,ke=(e,t)=>{let n="",r="",o="";for(let i in e){let a=e[i];"@"==i[0]?"i"==i[1]?n=i+" "+a+";":r+="f"==i[1]?ke(a,i):i+"{"+ke(a,"k"==i[1]?"":t)+"}":"object"==typeof a?r+=ke(a,t?t.replace(/([^,])+/g,e=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):i):null!=a&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=ke.p?ke.p(i,a):i+":"+a+";")}return n+(t&&o?t+"{"+o+"}":o)+r},we={},xe=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+xe(e[n]);return t}return e};function Se(e){let t=this||{},n=e.call?e(t.p):e;return((e,t,n,r,o)=>{let i=xe(e),a=we[i]||(we[i]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(i));if(!we[a]){let t=i!==e?e:(e=>{let t,n,r=[{}];for(;t=ye.exec(e.replace(ve,""));)t[4]?r.shift():t[3]?(n=t[3].replace(be," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(be," ").trim();return r[0]})(e);we[a]=ke(o?{["@keyframes "+a]:t}:t,n?"":"."+a)}let s=n&&we.g?we.g:null;return n&&(we.g=we[a]),l=we[a],u=t,c=r,(d=s)?u.data=u.data.replace(d,l):-1===u.data.indexOf(l)&&(u.data=c?l+u.data:u.data+l),a;var l,u,c,d})(n.unshift?n.raw?((e,t,n)=>e.reduce((e,r,o)=>{let i=t[o];if(i&&i.call){let e=i(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;i=t?"."+t:e&&"object"==typeof e?e.props?"":ke(e,""):!1===e?"":e}return e+r+(null==i?"":i)},""))(n,[].slice.call(arguments,1),t.p):n.reduce((e,n)=>Object.assign(e,n&&n.call?n(t.p):n),{}):n,(e=>{if("object"==typeof window){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||me})(t.target),t.g,t.o,t.k)}Se.bind({g:1});let Ce=Se.bind({k:1});function Ee(e,t){let n=this||{};return function(){let t=arguments;return function r(o,i){let a=Object.assign({},o),s=a.className||r.className;n.p=Object.assign({theme:he&&he()},a),n.o=/ *go\d+/.test(s),a.className=Se.apply(n,t)+(s?" "+s:"");let l=e;return e[0]&&(l=a.as||e,delete a.as),ge&&l[0]&&ge(a),pe(l,a)}}}var Te=(e,t)=>(e=>"function"==typeof e)(e)?e(t):e,Ne=(()=>{let e=0;return()=>(++e).toString()})(),Oe=(()=>{let e;return()=>{if(void 0===e&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),Le="default",Pe=(e,t)=>{let{toastLimit:n}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,n)};case 1:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case 2:let{toast:r}=t;return Pe(e,{type:e.toasts.find(e=>e.id===r.id)?1:0,toast:r});case 3:let{toastId:o}=t;return{...e,toasts:e.toasts.map(e=>e.id===o||void 0===o?{...e,dismissed:!0,visible:!1}:e)};case 4:return void 0===t.toastId?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(e=>({...e,pauseDuration:e.pauseDuration+i}))}}},_e=[],Re={toasts:[],pausedAt:void 0,settings:{toastLimit:20}},Ae={},Ie=(e,t=Le)=>{Ae[t]=Pe(Ae[t]||Re,e),_e.forEach(([e,n])=>{e===t&&n(Ae[t])})},je=e=>Object.keys(Ae).forEach(t=>Ie(e,t)),De=(e=Le)=>t=>{Ie(t,e)},ze={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Me=e=>(t,n)=>{let r=((e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(null==n?void 0:n.id)||Ne()}))(t,e,n);return De(r.toasterId||(e=>Object.keys(Ae).find(t=>Ae[t].toasts.some(t=>t.id===e)))(r.id))({type:2,toast:r}),r.id},Fe=(e,t)=>Me("blank")(e,t);Fe.error=Me("error"),Fe.success=Me("success"),Fe.loading=Me("loading"),Fe.custom=Me("custom"),Fe.dismiss=(e,t)=>{let n={type:3,toastId:e};t?De(t)(n):je(n)},Fe.dismissAll=e=>Fe.dismiss(void 0,e),Fe.remove=(e,t)=>{let n={type:4,toastId:e};t?De(t)(n):je(n)},Fe.removeAll=e=>Fe.remove(void 0,e),Fe.promise=(e,t,n)=>{let r=Fe.loading(t.loading,{...n,...null==n?void 0:n.loading});return"function"==typeof e&&(e=e()),e.then(e=>{let o=t.success?Te(t.success,e):void 0;return o?Fe.success(o,{id:r,...n,...null==n?void 0:n.success}):Fe.dismiss(r),e}).catch(e=>{let o=t.error?Te(t.error,e):void 0;o?Fe.error(o,{id:r,...n,...null==n?void 0:n.error}):Fe.dismiss(r)}),e};var Ue,Be,$e,Ve,He=(e,t="default")=>{let{toasts:n,pausedAt:r}=((e={},t=Le)=>{let[n,r]=l.useState(Ae[t]||Re),o=l.useRef(Ae[t]);l.useEffect(()=>(o.current!==Ae[t]&&r(Ae[t]),_e.push([t,r]),()=>{let e=_e.findIndex(([e])=>e===t);e>-1&&_e.splice(e,1)}),[t]);let i=n.toasts.map(t=>{var n,r,o;return{...e,...e[t.type],...t,removeDelay:t.removeDelay||(null==(n=e[t.type])?void 0:n.removeDelay)||(null==e?void 0:e.removeDelay),duration:t.duration||(null==(r=e[t.type])?void 0:r.duration)||(null==e?void 0:e.duration)||ze[t.type],style:{...e.style,...null==(o=e[t.type])?void 0:o.style,...t.style}}});return{...n,toasts:i}})(e,t),o=l.useRef(new Map).current,i=l.useCallback((e,t=1e3)=>{if(o.has(e))return;let n=setTimeout(()=>{o.delete(e),a({type:4,toastId:e})},t);o.set(e,n)},[]);l.useEffect(()=>{if(r)return;let e=Date.now(),o=n.map(n=>{if(n.duration===1/0)return;let r=(n.duration||0)+n.pauseDuration-(e-n.createdAt);if(!(r<0))return setTimeout(()=>Fe.dismiss(n.id,t),r);n.visible&&Fe.dismiss(n.id)});return()=>{o.forEach(e=>e&&clearTimeout(e))}},[n,r,t]);let a=l.useCallback(De(t),[t]),s=l.useCallback(()=>{a({type:5,time:Date.now()})},[a]),u=l.useCallback((e,t)=>{a({type:1,toast:{id:e,height:t}})},[a]),c=l.useCallback(()=>{r&&a({type:6,time:Date.now()})},[r,a]),d=l.useCallback((e,t)=>{let{reverseOrder:r=!1,gutter:o=8,defaultPosition:i}=t||{},a=n.filter(t=>(t.position||i)===(e.position||i)&&t.height),s=a.findIndex(t=>t.id===e.id),l=a.filter((e,t)=>t<s&&e.visible).length;return a.filter(e=>e.visible).slice(...r?[l+1]:[0,l]).reduce((e,t)=>e+(t.height||0)+o,0)},[n]);return l.useEffect(()=>{n.forEach(e=>{if(e.dismissed)i(e.id,e.removeDelay);else{let t=o.get(e.id);t&&(clearTimeout(t),o.delete(e.id))}})},[n,i]),{toasts:n,handlers:{updateHeight:u,startPause:s,endPause:c,calculateOffset:d}}},qe=Ce`
36
36
  from {
37
37
  transform: scale(0) rotate(45deg);
38
38
  opacity: 0;
@@ -40,7 +40,7 @@ from {
40
40
  to {
41
41
  transform: scale(1) rotate(45deg);
42
42
  opacity: 1;
43
- }`,Be=be`
43
+ }`,We=Ce`
44
44
  from {
45
45
  transform: scale(0);
46
46
  opacity: 0;
@@ -48,7 +48,7 @@ from {
48
48
  to {
49
49
  transform: scale(1);
50
50
  opacity: 1;
51
- }`,$e=be`
51
+ }`,Ke=Ce`
52
52
  from {
53
53
  transform: scale(0) rotate(90deg);
54
54
  opacity: 0;
@@ -56,7 +56,7 @@ from {
56
56
  to {
57
57
  transform: scale(1) rotate(90deg);
58
58
  opacity: 1;
59
- }`,Ve=ke("div")`
59
+ }`,Qe=Ee("div")`
60
60
  width: 20px;
61
61
  opacity: 0;
62
62
  height: 20px;
@@ -65,14 +65,14 @@ to {
65
65
  position: relative;
66
66
  transform: rotate(45deg);
67
67
 
68
- animation: ${Ue} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
68
+ animation: ${qe} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
69
69
  forwards;
70
70
  animation-delay: 100ms;
71
71
 
72
72
  &:after,
73
73
  &:before {
74
74
  content: '';
75
- animation: ${Be} 0.15s ease-out forwards;
75
+ animation: ${We} 0.15s ease-out forwards;
76
76
  animation-delay: 150ms;
77
77
  position: absolute;
78
78
  border-radius: 3px;
@@ -85,18 +85,18 @@ to {
85
85
  }
86
86
 
87
87
  &:before {
88
- animation: ${$e} 0.15s ease-out forwards;
88
+ animation: ${Ke} 0.15s ease-out forwards;
89
89
  animation-delay: 180ms;
90
90
  transform: rotate(90deg);
91
91
  }
92
- `,He=be`
92
+ `,Je=Ce`
93
93
  from {
94
94
  transform: rotate(0deg);
95
95
  }
96
96
  to {
97
97
  transform: rotate(360deg);
98
98
  }
99
- `,qe=ke("div")`
99
+ `,Ge=Ee("div")`
100
100
  width: 12px;
101
101
  height: 12px;
102
102
  box-sizing: border-box;
@@ -104,8 +104,8 @@ to {
104
104
  border-radius: 100%;
105
105
  border-color: ${e=>e.secondary||"#e0e0e0"};
106
106
  border-right-color: ${e=>e.primary||"#616161"};
107
- animation: ${He} 1s linear infinite;
108
- `,We=be`
107
+ animation: ${Je} 1s linear infinite;
108
+ `,Ye=Ce`
109
109
  from {
110
110
  transform: scale(0) rotate(45deg);
111
111
  opacity: 0;
@@ -113,7 +113,7 @@ from {
113
113
  to {
114
114
  transform: scale(1) rotate(45deg);
115
115
  opacity: 1;
116
- }`,Ke=be`
116
+ }`,Xe=Ce`
117
117
  0% {
118
118
  height: 0;
119
119
  width: 0;
@@ -127,7 +127,7 @@ to {
127
127
  100% {
128
128
  opacity: 1;
129
129
  height: 10px;
130
- }`,Qe=ke("div")`
130
+ }`,Ze=Ee("div")`
131
131
  width: 20px;
132
132
  opacity: 0;
133
133
  height: 20px;
@@ -136,13 +136,13 @@ to {
136
136
  position: relative;
137
137
  transform: rotate(45deg);
138
138
 
139
- animation: ${We} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
139
+ animation: ${Ye} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
140
140
  forwards;
141
141
  animation-delay: 100ms;
142
142
  &:after {
143
143
  content: '';
144
144
  box-sizing: border-box;
145
- animation: ${Ke} 0.2s ease-out forwards;
145
+ animation: ${Xe} 0.2s ease-out forwards;
146
146
  opacity: 0;
147
147
  animation-delay: 200ms;
148
148
  position: absolute;
@@ -154,16 +154,16 @@ to {
154
154
  height: 10px;
155
155
  width: 6px;
156
156
  }
157
- `,Je=ke("div")`
157
+ `,et=Ee("div")`
158
158
  position: absolute;
159
- `,Ye=ke("div")`
159
+ `,tt=Ee("div")`
160
160
  position: relative;
161
161
  display: flex;
162
162
  justify-content: center;
163
163
  align-items: center;
164
164
  min-width: 20px;
165
165
  min-height: 20px;
166
- `,Ge=be`
166
+ `,nt=Ce`
167
167
  from {
168
168
  transform: scale(0.6);
169
169
  opacity: 0.4;
@@ -171,14 +171,14 @@ from {
171
171
  to {
172
172
  transform: scale(1);
173
173
  opacity: 1;
174
- }`,Xe=ke("div")`
174
+ }`,rt=Ee("div")`
175
175
  position: relative;
176
176
  transform: scale(0.6);
177
177
  opacity: 0.4;
178
178
  min-width: 20px;
179
- animation: ${Ge} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
179
+ animation: ${nt} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
180
180
  forwards;
181
- `,Ze=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return void 0!==t?"string"==typeof t?l.createElement(Xe,null,t):t:"blank"===n?null:l.createElement(Ye,null,l.createElement(qe,{...r}),"loading"!==n&&l.createElement(Je,null,"error"===n?l.createElement(Ve,{...r}):l.createElement(Qe,{...r})))},et=e=>`\n0% {transform: translate3d(0,${-200*e}%,0) scale(.6); opacity:.5;}\n100% {transform: translate3d(0,0,0) scale(1); opacity:1;}\n`,tt=e=>`\n0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}\n100% {transform: translate3d(0,${-150*e}%,-1px) scale(.6); opacity:0;}\n`,nt=ke("div")`
181
+ `,ot=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return void 0!==t?"string"==typeof t?l.createElement(rt,null,t):t:"blank"===n?null:l.createElement(tt,null,l.createElement(Ge,{...r}),"loading"!==n&&l.createElement(et,null,"error"===n?l.createElement(Qe,{...r}):l.createElement(Ze,{...r})))},it=e=>`\n0% {transform: translate3d(0,${-200*e}%,0) scale(.6); opacity:.5;}\n100% {transform: translate3d(0,0,0) scale(1); opacity:1;}\n`,at=e=>`\n0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}\n100% {transform: translate3d(0,${-150*e}%,-1px) scale(.6); opacity:0;}\n`,st=Ee("div")`
182
182
  display: flex;
183
183
  align-items: center;
184
184
  background: #fff;
@@ -190,17 +190,17 @@ to {
190
190
  pointer-events: auto;
191
191
  padding: 8px 10px;
192
192
  border-radius: 8px;
193
- `,rt=ke("div")`
193
+ `,lt=Ee("div")`
194
194
  display: flex;
195
195
  justify-content: center;
196
196
  margin: 4px 10px;
197
197
  color: inherit;
198
198
  flex: 1 1 auto;
199
199
  white-space: pre-line;
200
- `,ot=l.memo(({toast:e,position:t,style:n,children:r})=>{let o=e.height?((e,t)=>{let n=e.includes("top")?1:-1,[r,o]=Se()?["0%{opacity:0;} 100%{opacity:1;}","0%{opacity:1;} 100%{opacity:0;}"]:[et(n),tt(n)];return{animation:t?`${be(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${be(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}})(e.position||t||"top-center",e.visible):{opacity:0},i=l.createElement(Ze,{toast:e}),a=l.createElement(rt,{...e.ariaProps},xe(e.message,e));return l.createElement(nt,{className:e.className,style:{...o,...n,...e.style}},"function"==typeof r?r({icon:i,message:a}):l.createElement(l.Fragment,null,i,a))});De=l.createElement,ge.p=ze,le=De,ue=je,ce=Fe;var it=({id:e,className:t,style:n,onHeightUpdate:r,children:o})=>{let i=l.useCallback(t=>{if(t){let n=()=>{let n=t.getBoundingClientRect().height;r(e,n)};n(),new MutationObserver(n).observe(t,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return l.createElement("div",{ref:i,className:t,style:n},o)},at=ve`
200
+ `,ut=l.memo(({toast:e,position:t,style:n,children:r})=>{let o=e.height?((e,t)=>{let n=e.includes("top")?1:-1,[r,o]=Oe()?["0%{opacity:0;} 100%{opacity:1;}","0%{opacity:1;} 100%{opacity:0;}"]:[it(n),at(n)];return{animation:t?`${Ce(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Ce(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}})(e.position||t||"top-center",e.visible):{opacity:0},i=l.createElement(ot,{toast:e}),a=l.createElement(lt,{...e.ariaProps},Te(e.message,e));return l.createElement(st,{className:e.className,style:{...o,...n,...e.style}},"function"==typeof r?r({icon:i,message:a}):l.createElement(l.Fragment,null,i,a))});Ue=l.createElement,ke.p=Be,pe=Ue,he=$e,ge=Ve;var ct=({id:e,className:t,style:n,onHeightUpdate:r,children:o})=>{let i=l.useCallback(t=>{if(t){let n=()=>{let n=t.getBoundingClientRect().height;r(e,n)};n(),new MutationObserver(n).observe(t,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return l.createElement("div",{ref:i,className:t,style:n},o)},dt=Se`
201
201
  z-index: 9999;
202
202
  > * {
203
203
  pointer-events: auto;
204
204
  }
205
- `,st=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:o,toasterId:i,containerStyle:a,containerClassName:s})=>{let{toasts:u,handlers:c}=Me(n,i);return l.createElement("div",{"data-rht-toaster":i||"",style:{position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none",...a},className:s,onMouseEnter:c.startPause,onMouseLeave:c.endPause},u.map(n=>{let i=n.position||t,a=((e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},o=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Se()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...o}})(i,c.calculateOffset(n,{reverseOrder:e,gutter:r,defaultPosition:t}));return l.createElement(it,{id:n.id,key:n.id,onHeightUpdate:c.updateHeight,className:n.visible?at:"",style:a},"custom"===n.type?xe(n.message,n):o?o(n):l.createElement(ot,{toast:n,position:i}))}))},lt=Ie;const ut=({theme:e,onToggle:t})=>{const{t:n}=V();return O.jsx("button",{onClick:t,className:"gpc-header-button gpc-focus-visible gpc-transition","aria-label":n("theme.toggle"),title:n("theme.toggle"),children:"light"===e?O.jsx(oe,{className:"gpc-icon"}):O.jsx(ae,{className:"gpc-icon"})})},ct=[{code:"en",label:"English",flag:"🇬🇧"},{code:"es",label:"Español",flag:"🇪🇸"},{code:"fr",label:"Français",flag:"🇫🇷"}],dt=()=>{const{i18n:e}=V(),[t,n]=l.useState(!1),r=l.useRef(null),o=ct.find(t=>t.code===e.language)||ct[0];return l.useEffect(()=>{const e=e=>{r.current&&!r.current.contains(e.target)&&n(!1)};return t&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[t]),O.jsxs("div",{className:"gpc-language-selector",ref:r,children:[O.jsx("button",{onClick:()=>n(!t),className:"gpc-header-button gpc-focus-visible gpc-transition","aria-label":"Cambiar idioma",title:"Cambiar idioma",children:O.jsx(Z,{className:"gpc-icon"})}),t&&O.jsx("div",{className:"gpc-language-dropdown",children:ct.map(t=>O.jsxs("button",{onClick:()=>{return r=t.code,e.changeLanguage(r),void n(!1);var r},className:"gpc-language-option "+(t.code===o.code?"gpc-language-option-active":""),children:[O.jsx("span",{className:"gpc-language-flag",children:t.flag}),O.jsx("span",{className:"gpc-language-label",children:t.label})]},t.code))})]})},ft=({onClose:e,theme:t,onToggleTheme:n,showBranding:r=!0,widgetConfig:o=null})=>{const{t:i}=V(),a=o?.company_name||i("widget.title"),s=o?.company_logo_base64,l=s?.startsWith("data:")?s:s?`data:image/png;base64,${s}`:null;return O.jsxs("div",{className:"gpc-chat-header",children:[O.jsxs("div",{className:"gpc-header-content",children:[l&&O.jsx("div",{className:"gpc-header-logo",children:O.jsx("img",{src:l,alt:a,className:"gpc-company-logo"})}),O.jsx("div",{className:"gpc-header-text",children:O.jsx("h2",{className:"gpc-header-title",children:a})})]}),O.jsxs("div",{className:"gpc-header-actions",children:[O.jsx(dt,{}),O.jsx(ut,{theme:t,onToggle:n}),O.jsx("button",{onClick:e,className:"gpc-header-button gpc-focus-visible gpc-transition","aria-label":i("chat.close"),title:i("chat.close"),children:O.jsx(G,{className:"gpc-icon"})})]})]})};function pt(){}function ht(){}const gt=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,mt=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yt={};function vt(e,t){return(yt.jsx?mt:gt).test(e)}const bt=/[ \t\n\f\r]/g;function kt(e){return""===e.replace(bt,"")}class xt{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function wt(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new xt(n,r,t)}function St(e){return e.toLowerCase()}xt.prototype.normal={},xt.prototype.property={},xt.prototype.space=void 0;class Et{constructor(e,t){this.attribute=t,this.property=e}}Et.prototype.attribute="",Et.prototype.booleanish=!1,Et.prototype.boolean=!1,Et.prototype.commaOrSpaceSeparated=!1,Et.prototype.commaSeparated=!1,Et.prototype.defined=!1,Et.prototype.mustUseProperty=!1,Et.prototype.number=!1,Et.prototype.overloadedBoolean=!1,Et.prototype.property="",Et.prototype.spaceSeparated=!1,Et.prototype.space=void 0;let Ct=0;const Tt=At(),Ot=At(),Nt=At(),Pt=At(),Lt=At(),Rt=At(),_t=At();function At(){return 2**++Ct}const It=Object.freeze(Object.defineProperty({__proto__:null,boolean:Tt,booleanish:Ot,commaOrSpaceSeparated:_t,commaSeparated:Rt,number:Pt,overloadedBoolean:Nt,spaceSeparated:Lt},Symbol.toStringTag,{value:"Module"})),Dt=Object.keys(It);class zt extends Et{constructor(e,t,n,r){let o=-1;if(super(e,t),jt(this,"space",r),"number"==typeof n)for(;++o<Dt.length;){const e=Dt[o];jt(this,Dt[o],(n&It[e])===It[e])}}}function jt(e,t,n){n&&(e[t]=n)}function Ft(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const i=new zt(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[St(r)]=r,n[St(i.attribute)]=r}return new xt(t,n,e.space)}zt.prototype.defined=!0;const Mt=Ft({properties:{ariaActiveDescendant:null,ariaAtomic:Ot,ariaAutoComplete:null,ariaBusy:Ot,ariaChecked:Ot,ariaColCount:Pt,ariaColIndex:Pt,ariaColSpan:Pt,ariaControls:Lt,ariaCurrent:null,ariaDescribedBy:Lt,ariaDetails:null,ariaDisabled:Ot,ariaDropEffect:Lt,ariaErrorMessage:null,ariaExpanded:Ot,ariaFlowTo:Lt,ariaGrabbed:Ot,ariaHasPopup:null,ariaHidden:Ot,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Lt,ariaLevel:Pt,ariaLive:null,ariaModal:Ot,ariaMultiLine:Ot,ariaMultiSelectable:Ot,ariaOrientation:null,ariaOwns:Lt,ariaPlaceholder:null,ariaPosInSet:Pt,ariaPressed:Ot,ariaReadOnly:Ot,ariaRelevant:null,ariaRequired:Ot,ariaRoleDescription:Lt,ariaRowCount:Pt,ariaRowIndex:Pt,ariaRowSpan:Pt,ariaSelected:Ot,ariaSetSize:Pt,ariaSort:null,ariaValueMax:Pt,ariaValueMin:Pt,ariaValueNow:Pt,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function Ut(e,t){return t in e?e[t]:t}function Bt(e,t){return Ut(e,t.toLowerCase())}const $t=Ft({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Rt,acceptCharset:Lt,accessKey:Lt,action:null,allow:null,allowFullScreen:Tt,allowPaymentRequest:Tt,allowUserMedia:Tt,alt:null,as:null,async:Tt,autoCapitalize:null,autoComplete:Lt,autoFocus:Tt,autoPlay:Tt,blocking:Lt,capture:null,charSet:null,checked:Tt,cite:null,className:Lt,cols:Pt,colSpan:null,content:null,contentEditable:Ot,controls:Tt,controlsList:Lt,coords:Pt|Rt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Tt,defer:Tt,dir:null,dirName:null,disabled:Tt,download:Nt,draggable:Ot,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Tt,formTarget:null,headers:Lt,height:Pt,hidden:Nt,high:Pt,href:null,hrefLang:null,htmlFor:Lt,httpEquiv:Lt,id:null,imageSizes:null,imageSrcSet:null,inert:Tt,inputMode:null,integrity:null,is:null,isMap:Tt,itemId:null,itemProp:Lt,itemRef:Lt,itemScope:Tt,itemType:Lt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Tt,low:Pt,manifest:null,max:null,maxLength:Pt,media:null,method:null,min:null,minLength:Pt,multiple:Tt,muted:Tt,name:null,nonce:null,noModule:Tt,noValidate:Tt,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:Tt,optimum:Pt,pattern:null,ping:Lt,placeholder:null,playsInline:Tt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Tt,referrerPolicy:null,rel:Lt,required:Tt,reversed:Tt,rows:Pt,rowSpan:Pt,sandbox:Lt,scope:null,scoped:Tt,seamless:Tt,selected:Tt,shadowRootClonable:Tt,shadowRootDelegatesFocus:Tt,shadowRootMode:null,shape:null,size:Pt,sizes:null,slot:null,span:Pt,spellCheck:Ot,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Pt,step:null,style:null,tabIndex:Pt,target:null,title:null,translate:null,type:null,typeMustMatch:Tt,useMap:null,value:Ot,width:Pt,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Lt,axis:null,background:null,bgColor:null,border:Pt,borderColor:null,bottomMargin:Pt,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Tt,declare:Tt,event:null,face:null,frame:null,frameBorder:null,hSpace:Pt,leftMargin:Pt,link:null,longDesc:null,lowSrc:null,marginHeight:Pt,marginWidth:Pt,noResize:Tt,noHref:Tt,noShade:Tt,noWrap:Tt,object:null,profile:null,prompt:null,rev:null,rightMargin:Pt,rules:null,scheme:null,scrolling:Ot,standby:null,summary:null,text:null,topMargin:Pt,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Pt,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Tt,disableRemotePlayback:Tt,prefix:null,property:null,results:Pt,security:null,unselectable:null},space:"html",transform:Bt}),Vt=Ft({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:_t,accentHeight:Pt,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Pt,amplitude:Pt,arabicForm:null,ascent:Pt,attributeName:null,attributeType:null,azimuth:Pt,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Pt,by:null,calcMode:null,capHeight:Pt,className:Lt,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:Pt,diffuseConstant:Pt,direction:null,display:null,dur:null,divisor:Pt,dominantBaseline:null,download:Tt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Pt,enableBackground:null,end:null,event:null,exponent:Pt,externalResourcesRequired:null,fill:null,fillOpacity:Pt,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:Rt,g2:Rt,glyphName:Rt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Pt,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Pt,horizOriginX:Pt,horizOriginY:Pt,id:null,ideographic:Pt,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Pt,k:Pt,k1:Pt,k2:Pt,k3:Pt,k4:Pt,kernelMatrix:_t,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Pt,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:Pt,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:Pt,overlineThickness:Pt,paintOrder:null,panose1:null,path:null,pathLength:Pt,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Lt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Pt,pointsAtY:Pt,pointsAtZ:Pt,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:_t,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:_t,rev:_t,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:_t,requiredFeatures:_t,requiredFonts:_t,requiredFormats:_t,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:Pt,specularExponent:Pt,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Pt,strikethroughThickness:Pt,string:null,stroke:null,strokeDashArray:_t,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Pt,strokeOpacity:Pt,strokeWidth:null,style:null,surfaceScale:Pt,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:_t,tabIndex:Pt,tableValues:null,target:null,targetX:Pt,targetY:Pt,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:_t,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Pt,underlineThickness:Pt,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Pt,values:null,vAlphabetic:Pt,vMathematical:Pt,vectorEffect:null,vHanging:Pt,vIdeographic:Pt,version:null,vertAdvY:Pt,vertOriginX:Pt,vertOriginY:Pt,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Pt,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ut}),Ht=Ft({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()}),qt=Ft({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Bt}),Wt=Ft({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),Kt={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"},Qt=/[A-Z]/g,Jt=/-[a-z]/g,Yt=/^data[-\w.:]+$/i;function Gt(e){return"-"+e.toLowerCase()}function Xt(e){return e.charAt(1).toUpperCase()}const Zt=wt([Mt,$t,Ht,qt,Wt],"html"),en=wt([Mt,Vt,Ht,qt,Wt],"svg");var tn,nn,rn,on={};function an(){if(rn)return on;rn=1;var e=on&&on.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(on,"__esModule",{value:!0}),on.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(nn)return tn;nn=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 u(e){return e?e.replace(s,l):l}return tn=function(s,c){if("string"!=typeof s)throw new TypeError("First argument must be a string");if(!s)return[];c=c||{};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 g(e),v(),t}}function g(e){this.start=e,this.end={line:d,column:f},this.source=c.source}function m(e){var t=new Error(c.source+":"+d+":"+f+": "+e);if(t.reason=e,t.filename=c.source,t.line=d,t.column=f,t.source=s,!c.silent)throw t}function y(e){var t=e.exec(s);if(t){var n=t[0];return p(n),s=s.slice(n.length),t}}function v(){y(n)}function b(e){var t;for(e=e||[];t=k();)!1!==t&&e.push(t);return e}function k(){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 m("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=y(r);if(n){if(k(),!y(o))return m("property missing ':'");var s=y(i),c=t({type:"declaration",property:u(n[0].replace(e,l)),value:s?u(s[0].replace(e,l)):l});return y(a),c}}return g.prototype.content=s,v(),function(){var e,t=[];for(b(t);e=x();)!1!==e&&(t.push(e),b(t));return t}()}}());return on}var sn,ln,un,cn={};function dn(){if(sn)return cn;sn=1,Object.defineProperty(cn,"__esModule",{value:!0}),cn.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 cn.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))},cn}const fn=t(function(){if(un)return ln;un=1;var e=(ln&&ln.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(an()),t=dn();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,ln=n}()),pn=gn("end"),hn=gn("start");function gn(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 mn(e){return e&&"object"==typeof e?"position"in e||"type"in e?vn(e.position):"start"in e||"end"in e?vn(e):"line"in e||"column"in e?yn(e):"":""}function yn(e){return bn(e&&e.line)+":"+bn(e&&e.column)}function vn(e){return yn(e&&e.start)+"-"+yn(e&&e.end)}function bn(e){return e&&"number"==typeof e?e:1}class kn 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=mn(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}}kn.prototype.file="",kn.prototype.name="",kn.prototype.reason="",kn.prototype.message="",kn.prototype.stack="",kn.prototype.column=void 0,kn.prototype.line=void 0,kn.prototype.ancestors=void 0,kn.prototype.cause=void 0,kn.prototype.fatal=void 0,kn.prototype.place=void 0,kn.prototype.ruleId=void 0,kn.prototype.source=void 0;const xn={}.hasOwnProperty,wn=new Map,Sn=/[A-Z]/g,En=new Set(["table","tbody","thead","tfoot","tr"]),Cn=new Set(["td","th"]),Tn="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function On(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=hn(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?en:Zt,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},i=Nn(o,e,void 0);return i&&"string"!=typeof i?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function Nn(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=en,e.schema=o);e.ancestors.push(t);const i=An(e,t.tagName,!1),a=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&xn.call(t.properties,o)){const i=_n(e,o,t.properties[o]);if(i){const[o,a]=i;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof a&&Cn.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=Rn(e,t);En.has(t.tagName)&&(s=s.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&kt(t.value):kt(t));var t}));return Pn(e,a,i,t),Ln(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)}In(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=en,e.schema=o);e.ancestors.push(t);const i=null===t.name?e.Fragment:An(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];pt(t.type);const o=t.expression;pt(o.type);const i=o.properties[0];pt(i.type),Object.assign(n,e.evaluater.evaluateExpression(i.argument))}else In(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];pt(t.type),i=e.evaluater.evaluateExpression(t.expression)}else In(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(e,t),s=Rn(e,t);return Pn(e,a,i,t),Ln(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);In(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return Ln(r,Rn(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 Pn(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ln(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Rn(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:wn;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=Nn(e,i,a);void 0!==s&&n.push(s)}return n}function _n(e,t,n){const r=function(e,t){const n=St(t);let r=t,o=Et;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&Yt.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Jt,Xt);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Jt.test(e)){let n=e.replace(Qt,Gt);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=zt}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 fn(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const t=n,r=new kn("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=Tn+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)xn.call(e,n)&&(t[Dn(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?Kt[r.property]||r.property:r.attribute,n]}}function An(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=vt(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=vt(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 xn.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);In(e)}function In(e,t){const n=new kn("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=Tn+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Dn(e){let t=e.replace(Sn,zn);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function zn(e){return"-"+e.toLowerCase()}const jn={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"]},Fn={};function Mn(e,t){return Un(e,"boolean"!=typeof Fn.includeImageAlt||Fn.includeImageAlt,"boolean"!=typeof Fn.includeHtml||Fn.includeHtml)}function Un(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 Bn(e.children,t,n)}return Array.isArray(e)?Bn(e,t,n):""}function Bn(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Un(e[o],t,n);return r.join("")}const $n=document.createElement("i");function Vn(e){const t="&"+e+";";$n.innerHTML=t;const n=$n.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function Hn(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 qn(e,t){return e.length>0?(Hn(e,e.length,0,t),e):t}const Wn={}.hasOwnProperty;function Kn(e){const t={};let n=-1;for(;++n<e.length;)Qn(t,e[n]);return t}function Qn(e,t){let n;for(n in t){const r=(Wn.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){Wn.call(r,i)||(r[i]=[]);const e=o[i];Jn(r[i],Array.isArray(e)?e:e?[e]:[])}}}function Jn(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);Hn(e,0,0,r)}function Yn(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 Gn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Xn=cr(/[A-Za-z]/),Zn=cr(/[\dA-Za-z]/),er=cr(/[#-'*+\--9=?A-Z^-~]/);function tr(e){return null!==e&&(e<32||127===e)}const nr=cr(/\d/),rr=cr(/[\dA-Fa-f]/),or=cr(/[!-/:-@[-`{-~]/);function ir(e){return null!==e&&e<-2}function ar(e){return null!==e&&(e<0||32===e)}function sr(e){return-2===e||-1===e||32===e}const lr=cr(new RegExp("\\p{P}|\\p{S}","u")),ur=cr(/\s/);function cr(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function dr(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(37===i&&Zn(e.charCodeAt(n+1))&&Zn(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 fr(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){if(sr(r))return e.enter(n),a(r);return t(r)};function a(r){return sr(r)&&i++<o?(e.consume(r),a):(e.exit(n),t(r))}}const pr={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"),fr(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)):ir(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const hr={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,u)(r)}return u(r)}function l(e){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&v();const n=t.events.length;let o,i=n;for(;i--;)if("exit"===t.events[i][0]&&"chunkFlow"===t.events[i][1].type){o=t.events[i][1].end;break}y(a);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return Hn(t.events,i+1,0,t.events.slice(n)),t.events.length=s,u(e)}return s(e)}function u(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(gr,c,d)(o)}function c(e){return r&&v(),y(a),f(e)}function d(e){return t.parser.lazy[t.now().line]=a!==n.length,i=t.now().offset,h(e)}function f(n){return t.containerState={},e.attempt(gr,p,h)(n)}function p(e){return a++,n.push([t.currentConstruct,t.containerState]),f(e)}function h(n){return null===n?(r&&v(),y(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),g(n))}function g(n){return null===n?(m(e.exit("chunkFlow"),!0),y(0),void e.consume(n)):ir(n)?(e.consume(n),m(e.exit("chunkFlow")),a=0,t.interrupt=void 0,s):(e.consume(n),g)}function m(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<i&&(!r.events[e][1].end||r.events[e][1].end.offset>i))return;const n=t.events.length;let o,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(o){s=t.events[l][1].end;break}o=!0}for(y(a),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;Hn(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function y(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},gr={tokenize:function(e,t,n){return fr(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function mr(e){return null===e||ar(e)||ur(e)?1:lr(e)?2:void 0}function yr(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 vr={name:"attention",resolveAll:function(e,t){let n,r,o,i,a,s,l,u,c=-1;for(;++c<e.length;)if("enter"===e[c][0]&&"attentionSequence"===e[c][1].type&&e[c][1]._close)for(n=c;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[c][1]).charCodeAt(0)){if((e[n][1]._close||e[c][1]._open)&&(e[c][1].end.offset-e[c][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[c][1].end.offset-e[c][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[c][1].end.offset-e[c][1].start.offset>1?2:1;const d={...e[n][1].end},f={...e[c][1].start};br(d,-s),br(f,s),i={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[c][1].start},end:f},o={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[c][1].start}},r={type:s>1?"strong":"emphasis",start:{...i.start},end:{...a.end}},e[n][1].end={...i.start},e[c][1].start={...a.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=qn(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=qn(l,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),l=qn(l,yr(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),l=qn(l,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(u=2,l=qn(l,[["enter",e[c][1],t],["exit",e[c][1],t]])):u=0,Hn(e,n-1,c-n+3,l),c=n+l.length-u-2;break}c=-1;for(;++c<e.length;)"attentionSequence"===e[c][1].type&&(e[c][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=mr(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"),u=mr(s),c=!u||2===u&&o||n.includes(s),d=!o||2===o&&u||n.includes(r);return l._open=Boolean(42===i?c:c&&(o||!d)),l._close=Boolean(42===i?d:d&&(u||!c)),t(s)}}};function br(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const kr={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 Xn(t)?(e.consume(t),i):64===t?n(t):l(t)}function i(e){return 43===e||45===e||46===e||Zn(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||Zn(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||tr(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),u):er(t)?(e.consume(t),l):n(t)}function u(e){return Zn(e)?c(e):n(e)}function c(n){return 46===n?(e.consume(n),r=0,u):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||Zn(t))&&r++<63){const n=45===t?d:c;return e.consume(t),n}return n(t)}}};const xr={partial:!0,tokenize:function(e,t,n){return function(t){return sr(t)?fr(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||ir(e)?t(e):n(e)}}};const wr={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(sr(t))return fr(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return o(t)};function o(r){return e.attempt(wr,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 sr(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const Sr={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 or(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const Er={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=Zn,u(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=rr,u):(e.enter("characterReferenceValue"),o=7,i=nr,u(t))}function u(s){if(59===s&&a){const o=e.exit("characterReferenceValue");return i!==Zn||Vn(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),u):n(s)}}};const Cr={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)}}},Tr={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"),sr(t)?fr(e,u,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):u(t)}function u(t){return t===i?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===i?(o++,e.consume(t),c):o>=s?(e.exit("codeFencedFenceSequence"),sr(t)?fr(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||ir(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"),sr(t)?fr(e,u,"whitespace")(t):u(t))}function u(n){return null===n||ir(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(Cr,p,v)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(n))}function c(t){return null===t||ir(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),u(t)):sr(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),fr(e,d,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),c)}function d(t){return null===t||ir(t)?u(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),f(t))}function f(t){return null===t||ir(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),u(t)):96===t&&t===i?n(t):(e.consume(t),f)}function p(t){return e.attempt(o,v,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),g}function g(t){return a>0&&sr(t)?fr(e,m,"linePrefix",a+1)(t):m(t)}function m(t){return null===t||ir(t)?e.check(Cr,p,v)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||ir(t)?(e.exit("codeFlowValue"),m(t)):(e.consume(t),y)}function v(n){return e.exit("codeFenced"),t(n)}}};const Or={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),fr(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):ir(t)?e.attempt(Nr,i,s)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||ir(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),a)}function s(n){return e.exit("codeIndented"),t(n)}}},Nr={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):ir(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):fr(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):ir(e)?o(e):n(e)}}};const Pr={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,u(t)):ir(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||ir(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function u(n){return 96===n?(e.consume(n),r++,u):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",l(n))}}};class Lr{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&&Rr(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),Rr(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Rr(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);Rr(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Rr(this.left,t.reverse())}}}function Rr(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 _r(e){const t={};let n,r,o,i,a,s,l,u=-1;const c=new Lr(e);for(;++u<c.length;){for(;u in t;)u=t[u];if(n=c.get(u),u&&"chunkFlow"===n[1].type&&"listItemPrefix"===c.get(u-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,Ar(c,u)),u=t[u],l=!0);else if(n[1]._container){for(o=u,r=void 0;o--;)if(i=c.get(o),"lineEnding"===i[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(r&&(c.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={...c.get(r)[1].start},a=c.slice(r,u),a.unshift(n),c.splice(r,u-r+1,a))}}return Hn(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function Ar(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=[],u={};let c,d,f=-1,p=n,h=0,g=0;const m=[g];for(;p;){for(;e.get(++o)[1]!==p;);i.push(o),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),d&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(c),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&&(g=f+1,m.push(g),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):m.pop(),f=m.length;f--;){const t=s.slice(m[f],m[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;)u[h+l[f][0]]=h+l[f][1],h+=l[f][1]-l[f][0]-1;return u}const Ir={resolve:function(e){return _r(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):ir(t)?e.check(Dr,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}}},Dr={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"),fr(e,o,"linePrefix")};function o(o){if(null===o||ir(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 zr(e,t,n,r,o,i,a,s,l){const u=l||Number.POSITIVE_INFINITY;let c=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||tr(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||ir(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 c||null!==o&&41!==o&&!ar(o)?c<u&&40===o?(e.consume(o),c++,h):41===o?(e.consume(o),c--,h):null===o||32===o||40===o||tr(o)?n(o):(e.consume(o),92===o?g:h):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(o))}function g(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function jr(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),u};function u(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):ir(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(t){return null===t||91===t||93===t||ir(t)||l++>999?(e.exit("chunkString"),u(t)):(e.consume(t),s||(s=!sr(t)),92===t?d:c)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,c):c(t)}}function Fr(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):ir(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),fr(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(t))}function u(t){return t===a||null===t||ir(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?c:u)}function c(t){return t===a||92===t?(e.consume(t),u):u(t)}}function Mr(e,t){let n;return function r(o){if(ir(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if(sr(o))return fr(e,r,n?"linePrefix":"lineSuffix")(o);return t(o)}}const Ur={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return jr.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=Gn(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 ar(t)?Mr(e,s)(t):s(t)}function s(t){return zr(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(Br,u,u)(t)}function u(t){return sr(t)?fr(e,c,"whitespace")(t):c(t)}function c(i){return null===i||ir(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},Br={partial:!0,tokenize:function(e,t,n){return function(t){return ar(t)?Mr(e,r)(t):n(t)};function r(t){return Fr(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return sr(t)?fr(e,i,"whitespace")(t):i(t)}function i(e){return null===e||ir(e)?t(e):n(e)}}};const $r={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return ir(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const Vr={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"},Hn(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||ar(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||ir(n)?(e.exit("atxHeading"),t(n)):sr(n)?fr(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||ar(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),s)}}};const Hr=["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"],qr=["pre","script","style","textarea"],Wr={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),u}(t)};function u(s){return 33===s?(e.consume(s),c):47===s?(e.consume(s),i=!0,p):63===s?(e.consume(s),o=3,r.interrupt?t:I):Xn(s)?(e.consume(s),a=String.fromCharCode(s),h):n(s)}function c(i){return 45===i?(e.consume(i),o=2,d):91===i?(e.consume(i),o=5,s=0,f):Xn(i)?(e.consume(i),o=4,r.interrupt?t:I):n(i)}function d(o){return 45===o?(e.consume(o),r.interrupt?t:I):n(o)}function f(o){const i="CDATA[";return o===i.charCodeAt(s++)?(e.consume(o),6===s?r.interrupt?t:T:f):n(o)}function p(t){return Xn(t)?(e.consume(t),a=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||ar(s)){const l=47===s,u=a.toLowerCase();return l||i||!qr.includes(u)?Hr.includes(a.toLowerCase())?(o=6,l?(e.consume(s),g):r.interrupt?t(s):T(s)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):i?m(s):y(s)):(o=1,r.interrupt?t(s):T(s))}return 45===s||Zn(s)?(e.consume(s),a+=String.fromCharCode(s),h):n(s)}function g(o){return 62===o?(e.consume(o),r.interrupt?t:T):n(o)}function m(t){return sr(t)?(e.consume(t),m):E(t)}function y(t){return 47===t?(e.consume(t),E):58===t||95===t||Xn(t)?(e.consume(t),v):sr(t)?(e.consume(t),y):E(t)}function v(t){return 45===t||46===t||58===t||95===t||Zn(t)?(e.consume(t),v):b(t)}function b(t){return 61===t?(e.consume(t),k):sr(t)?(e.consume(t),b):y(t)}function k(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,x):sr(t)?(e.consume(t),k):w(t)}function x(t){return t===l?(e.consume(t),l=null,S):null===t||ir(t)?n(t):(e.consume(t),x)}function w(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||ar(t)?b(t):(e.consume(t),w)}function S(e){return 47===e||62===e||sr(e)?y(e):n(e)}function E(t){return 62===t?(e.consume(t),C):n(t)}function C(t){return null===t||ir(t)?T(t):sr(t)?(e.consume(t),C):n(t)}function T(t){return 45===t&&2===o?(e.consume(t),L):60===t&&1===o?(e.consume(t),R):62===t&&4===o?(e.consume(t),D):63===t&&3===o?(e.consume(t),I):93===t&&5===o?(e.consume(t),A):!ir(t)||6!==o&&7!==o?null===t||ir(t)?(e.exit("htmlFlowData"),O(t)):(e.consume(t),T):(e.exit("htmlFlowData"),e.check(Kr,z,O)(t))}function O(t){return e.check(Qr,N,z)(t)}function N(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return null===t||ir(t)?O(t):(e.enter("htmlFlowData"),T(t))}function L(t){return 45===t?(e.consume(t),I):T(t)}function R(t){return 47===t?(e.consume(t),a="",_):T(t)}function _(t){if(62===t){const n=a.toLowerCase();return qr.includes(n)?(e.consume(t),D):T(t)}return Xn(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),_):T(t)}function A(t){return 93===t?(e.consume(t),I):T(t)}function I(t){return 62===t?(e.consume(t),D):45===t&&2===o?(e.consume(t),I):T(t)}function D(t){return null===t||ir(t)?(e.exit("htmlFlowData"),z(t)):(e.consume(t),D)}function z(n){return e.exit("htmlFlow"),t(n)}}},Kr={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(xr,t,n)}}},Qr={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(ir(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 Jr={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),k):63===t?(e.consume(t),v):Xn(t)?(e.consume(t),S):n(t)}function l(t){return 45===t?(e.consume(t),u):91===t?(e.consume(t),i=0,p):Xn(t)?(e.consume(t),y):n(t)}function u(t){return 45===t?(e.consume(t),f):n(t)}function c(t){return null===t?n(t):45===t?(e.consume(t),d):ir(t)?(a=c,_(t)):(e.consume(t),c)}function d(t){return 45===t?(e.consume(t),f):c(t)}function f(e){return 62===e?R(e):45===e?d(e):c(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),g):ir(t)?(a=h,_(t)):(e.consume(t),h)}function g(t){return 93===t?(e.consume(t),m):h(t)}function m(t){return 62===t?R(t):93===t?(e.consume(t),m):h(t)}function y(t){return null===t||62===t?R(t):ir(t)?(a=y,_(t)):(e.consume(t),y)}function v(t){return null===t?n(t):63===t?(e.consume(t),b):ir(t)?(a=v,_(t)):(e.consume(t),v)}function b(e){return 62===e?R(e):v(e)}function k(t){return Xn(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||Zn(t)?(e.consume(t),x):w(t)}function w(t){return ir(t)?(a=w,_(t)):sr(t)?(e.consume(t),w):R(t)}function S(t){return 45===t||Zn(t)?(e.consume(t),S):47===t||62===t||ar(t)?E(t):n(t)}function E(t){return 47===t?(e.consume(t),R):58===t||95===t||Xn(t)?(e.consume(t),C):ir(t)?(a=E,_(t)):sr(t)?(e.consume(t),E):R(t)}function C(t){return 45===t||46===t||58===t||95===t||Zn(t)?(e.consume(t),C):T(t)}function T(t){return 61===t?(e.consume(t),O):ir(t)?(a=T,_(t)):sr(t)?(e.consume(t),T):E(t)}function O(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,N):ir(t)?(a=O,_(t)):sr(t)?(e.consume(t),O):(e.consume(t),P)}function N(t){return t===o?(e.consume(t),o=void 0,L):null===t?n(t):ir(t)?(a=N,_(t)):(e.consume(t),N)}function P(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||ar(t)?E(t):(e.consume(t),P)}function L(e){return 47===e||62===e||ar(e)?E(e):n(e)}function R(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function _(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),A}function A(t){return sr(t)?fr(e,I,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):I(t)}function I(t){return e.enter("htmlTextData"),a(t)}}};const Yr={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&&Hn(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}},u={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},c={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",l,t],["enter",u,t]],i=qn(i,e.slice(r+1,r+s+3)),i=qn(i,[["enter",c,t]]),i=qn(i,yr(t.parser.constructs.insideSpan.null,e.slice(r+s+4,o-3),t)),i=qn(i,[["exit",c,t],e[o-2],e[o-1],["exit",u,t]]),i=qn(i,e.slice(o+1)),i=qn(i,[["exit",l,t]]),Hn(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 c(t);return i=r.parser.defined.includes(Gn(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(Gr,u,i?u:c)(t):91===t?e.attempt(Xr,u,i?l:c)(t):i?u(t):c(t)}function l(t){return e.attempt(Zr,u,c)(t)}function u(e){return t(e)}function c(e){return o._balanced=!0,n(e)}}},Gr={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 ar(t)?Mr(e,o)(t):o(t)}function o(t){return 41===t?u(t):zr(e,i,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return ar(t)?Mr(e,s)(t):u(t)}function a(e){return n(e)}function s(t){return 34===t||39===t||40===t?Fr(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):u(t)}function l(t){return ar(t)?Mr(e,u)(t):u(t)}function u(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},Xr={tokenize:function(e,t,n){const r=this;return function(t){return jr.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(Gn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},Zr={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 eo={name:"labelStartImage",resolveAll:Yr.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 to={name:"labelStartLink",resolveAll:Yr.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 no={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),fr(e,t,"linePrefix")}}};const ro={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||ir(i))?(e.exit("thematicBreak"),t(i)):n(i)}function a(t){return t===r?(e.consume(t),o++,a):(e.exit("thematicBreakSequence"),sr(t)?fr(e,i,"whitespace")(t):i(t))}}};const oo={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(xr,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,fr(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){if(r.containerState.furtherBlankLines||!sr(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(ao,t,o)(n)});function o(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,fr(e,e.attempt(oo,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:nr(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(ro,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 nr(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(xr,r.interrupt?n:u,e.attempt(io,d,c))}function u(e){return r.containerState.initialBlankLine=!0,i++,d(e)}function c(t){return sr(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)}}},io={partial:!0,tokenize:function(e,t,n){const r=this;return fr(e,function(e){const o=r.events[r.events.length-1];return!sr(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},ao={partial:!0,tokenize:function(e,t,n){const r=this;return fr(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 so={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"),sr(t)?fr(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||ir(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const lo={tokenize:function(e){const t=this,n=e.attempt(xr,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,fr(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Ir,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 uo={resolveAll:ho()},co=po("string"),fo=po("text");function po(e){return{resolveAll:ho("text"===e?go: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 ho(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 go(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 mo={42:oo,43:oo,45:oo,48:oo,49:oo,50:oo,51:oo,52:oo,53:oo,54:oo,55:oo,56:oo,57:oo,62:wr},yo={91:Ur},vo={[-2]:Or,[-1]:Or,32:Or},bo={35:Vr,42:ro,45:[so,ro],60:Wr,61:so,95:ro,96:Tr,126:Tr},ko={38:Er,92:Sr},xo={[-5]:no,[-4]:no,[-3]:no,33:eo,38:Er,42:vr,60:[kr,Jr],91:to,92:[$r,Sr],93:Yr,95:vr,96:Pr},wo={null:[vr,uo]},So=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:yo,disable:{null:[]},document:mo,flow:bo,flowInitial:vo,insideSpan:wo,string:ko,text:xo},Symbol.toStringTag,{value:"Module"}));function Eo(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:m(function(e,t){y(e,t.from)}),check:m(g),consume:function(e){ir(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,v()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++));u.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=f(),u.events.push(["enter",n,u]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=f(),u.events.push(["exit",t,u]),t},interrupt:m(g,{interrupt:!0})},u={code:null,containerState:{},defineSkip:function(e){o[e.line]=e.column,v()},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=qn(a,e),p(),null!==a[a.length-1])return[];return y(t,0),u.events=yr(i,u.events,u),u.events}};let c=t.tokenize.call(u,l);return t.resolveAll&&i.push(t),u;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){c=c(e)}function g(e,t){t.restore()}function m(e,t){return function(n,o,i){let a,c,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,c=0,0===e.length?i:g(e[c])}function g(e){return function(n){p=function(){const e=f(),t=u.previous,n=u.currentConstruct,o=u.events.length,i=Array.from(s);return{from:o,restore:a};function a(){r=e,u.previous=t,u.currentConstruct=n,u.events.length=o,s=i,v()}}(),d=e,e.partial||(u.currentConstruct=e);if(e.name&&u.parser.constructs.disable.null.includes(e.name))return y();return e.tokenize.call(t?Object.assign(Object.create(u),t):u,l,m,y)(n)}}function m(t){return e(d,p),o}function y(e){return p.restore(),++c<a.length?g(a[c]):i}}}function y(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&Hn(u.events,t,u.events.length-t,e.resolve(u.events.slice(t),u)),e.resolveTo&&(u.events=e.resolveTo(u.events,u))}function v(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const Co=/[\0\t\n\r]/g;const To=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Oo(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return Yn(n.slice(t?2:1),t?16:10)}return Vn(n)||e}const No={}.hasOwnProperty;function Po(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(G),blockQuote:i(W),characterEscape:C,characterReference:C,codeFenced:i(K),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(K,a),codeText:i(Q,a),codeTextData:C,data:C,codeFlowValue:C,definition:i(J),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(Y),hardBreakEscape:i(X),hardBreakTrailing:i(X),htmlFlow:i(Z,a),htmlFlowData:C,htmlText:i(Z,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:M,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(G),strong:i(ie),thematicBreak:i(se)},exit:{atxHeading:l(),atxHeadingSequence:x,autolink:l(),autolinkEmail:q,autolinkProtocol:H,blockQuote:l(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:B,characterReferenceMarkerNumeric:B,characterReferenceValue:$,characterReference:V,codeFenced:l(m),codeFencedFence:g,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:T,codeIndented:l(y),codeText:l(R),codeTextData:T,data:T,definition:l(),definitionDestinationString:k,definitionLabelString:v,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(N),hardBreakTrailing:l(N),htmlFlow:l(P),htmlFlowData:T,htmlText:l(L),htmlTextData:T,image:l(A),label:D,labelText:I,lineEnding:O,link:l(_),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:U,resourceDestinationString:z,resourceTitleString:j,resource:F,setextHeading:l(E),setextHeadingLineSequence:S,setextHeadingText:w,strong:l(),thematicBreak:l()}};Ro(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:u,buffer:a,resume:c,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]];No.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]||Ao).call(i,void 0,e[0])}for(r.position={start:Lo(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Lo(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,u=!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",u=!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=u,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:Lo(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+mn({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]||Ao).call(this,e,r[0])}n.position.end=Lo(e.end)}function c(){return Mn(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 g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function m(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function v(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Gn(this.sliceSerialize(e)).toLowerCase()}function b(){const e=this.resume();this.stack[this.stack.length-1].title=e}function k(){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 w(){this.data.setextHeadingSlurpLineEnding=!0}function S(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function E(){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:Lo(e.start),end:void 0},t.push(n)),this.stack.push(n)}function T(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Lo(e.end)}function O(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=Lo(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(C.call(this,e),T.call(this,e))}function N(){this.data.atHardBreak=!0}function P(){const e=this.resume();this.stack[this.stack.length-1].value=e}function L(){const e=this.resume();this.stack[this.stack.length-1].value=e}function R(){const e=this.resume();this.stack[this.stack.length-1].value=e}function _(){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 A(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function I(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(To,Oo)}(t),n.identifier=Gn(t).toLowerCase()}function D(){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 z(){const e=this.resume();this.stack[this.stack.length-1].url=e}function j(){const e=this.resume();this.stack[this.stack.length-1].title=e}function F(){this.data.inReference=void 0}function M(){this.data.referenceType="collapsed"}function U(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Gn(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=Yn(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=Vn(t)}this.stack[this.stack.length-1].value+=r}function V(e){this.stack.pop().position.end=Lo(e.end)}function H(e){T.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function q(e){T.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function W(){return{type:"blockquote",children:[]}}function K(){return{type:"code",lang:null,meta:null,value:""}}function Q(){return{type:"inlineCode",value:""}}function J(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Y(){return{type:"emphasis",children:[]}}function G(){return{type:"heading",depth:0,children:[]}}function X(){return{type:"break"}}function Z(){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(;!_r(e););return e}(function(e){const t={constructs:Kn([So,...(e||{}).extensions||[]]),content:n(pr),defined:[],document:n(hr),flow:n(lo),lazy:{},string:n(co),text:n(fo)};return t;function n(e){return function(n){return Eo(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,i,a){const s=[];let l,u,c,d,f;for(o=n+("string"==typeof o?o.toString():new TextDecoder(i||void 0).decode(o)),c=0,n="",r&&(65279===o.charCodeAt(0)&&c++,r=void 0);c<o.length;){if(Co.lastIndex=c,l=Co.exec(o),d=l&&void 0!==l.index?l.index:o.length,f=o.charCodeAt(d),!l){n=o.slice(c);break}if(10===f&&c===d&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),c<d&&(s.push(o.slice(c,d)),t+=d-c),f){case 0:s.push(65533),t++;break;case 9:for(u=4*Math.ceil(t/4),s.push(-2);t++<u;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}c=d+1}return a&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function Lo(e){return{line:e.line,column:e.column,offset:e.offset}}function Ro(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Ro(e,r):_o(e,r)}}function _o(e,t){let n;for(n in t)if(No.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 Ao(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+mn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+mn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+mn({start:t.start,end:t.end})+") is still open")}function Io(e){const t=this;t.parser=function(n){return Po(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Do(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 zo(e){const t=e.spread;return null==t?e.children.length>1:t}function jo(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(Fo(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(Fo(t.slice(o),o>0,!1)),i.join("")}function Fo(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 Mo={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={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},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=dr(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 u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)},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 Do(e,t);const o={src:dr(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:dr(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 Do(e,t);const o={href:dr(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:dr(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=zo(n[r])}return t}(n):zo(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 u={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,u),e.applyData(t,u)},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=hn(t.children[1]),a=pn(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 u={type:"element",tagName:o,properties:r,children:[]};n&&(u.children=e.all(n),e.patch(n,u),u=e.applyData(n,u)),l.push(u)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,u),e.applyData(t,u)},text:function(e,t){const n={type:"text",value:jo(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:Uo,yaml:Uo,definition:Uo,footnoteDefinition:Uo};function Uo(){}const Bo="object"==typeof self?self:globalThis,$o=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 Bo[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 Bo[i](a),o)};return r})(new Map,e)(0),Vo="",{toString:Ho}={},{keys:qo}=Object,Wo=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=Ho.call(e).slice(8,-1);switch(n){case"Array":return[1,Vo];case"Object":return[2,Vo];case"Date":return[3,Vo];case"RegExp":return[4,Vo];case"Map":return[5,Vo];case"Set":return[6,Vo];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},Ko=([e,t])=>0===e&&("function"===t||"symbol"===t),Qo=(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]=Wo(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 qo(r))!e&&Ko(Wo(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||!Ko(Wo(o))&&!Ko(Wo(a)))&&t.push([i(o),i(a)]);return n}case 6:{const t=[],n=o([a,t],r);for(const o of r)!e&&Ko(Wo(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},Jo="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?$o(Qo(e,t)):structuredClone(e):(e,t)=>$o(Qo(e,t));function Yo(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 Go(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const Xo=function(e){if(null==e)return ei;if("function"==typeof e)return Zo(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Xo(e[n]);return Zo(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 Zo(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 Zo(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function Zo(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 ei(){return!0}const ti=[],ni=!0,ri=!1;function oi(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=Xo(o),a=r?-1:1;!function e(o,s,l){const u=o&&"object"==typeof o?o:{};if("string"==typeof u.type){const e="string"==typeof u.tagName?u.tagName:"string"==typeof u.name?u.name:void 0;Object.defineProperty(c,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return c;function c(){let u,c,d,f=ti;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[ni,e];return null==e?ti:[e]}(n(o,l)),f[0]===ri))return f;if("children"in o&&o.children){const t=o;if(t.children&&"skip"!==f[0])for(c=(r?t.children.length:-1)+a,d=l.concat(t);c>-1&&c<t.children.length;){const n=t.children[c];if(u=e(n,c,d)(),u[0]===ri)return u;c="number"==typeof u[1]?u[1]:c+a}}return f}}(e,void 0,[])()}function ii(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),oi(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 ai={}.hasOwnProperty,si={};function li(e,t){e.position&&(t.position=function(e){const t=hn(e),n=pn(e);if(t&&n)return{start:t,end:n}}(e))}function ui(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,Jo(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function ci(e,t){const n=t.data||{},r=!("value"in t)||ai.call(n,"hProperties")||ai.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 di(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 fi(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function pi(e,t){const n=function(e,t){const n=t||si,r=new Map,o=new Map,i=new Map,a={...Mo,...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=fi(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=fi(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:ui,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:function(e,t){const n=e.type,r=s.handlers[n];if(ai.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=Jo(n);return r.children=s.all(e),r}return Jo(e)}return(s.options.unknownHandler||ci)(s,e,t)},options:n,patch:li,wrap:di};return ii(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||Yo,r=e.options.footnoteBackLabel||Go,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(),u=dr(a.toLowerCase());let c=0;const d=[],f=e.footnoteCounts.get(a);for(;void 0!==f&&++c<=f;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,c);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+u+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,c),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-"+u},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:{...Jo(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 hi(e,t){return e&&"run"in e?async function(n,r){const o=pi(n,{file:r,...t});await e.run(o,r)}:function(n,r){return pi(n,{file:r,...e||t})}}function gi(e){if(e)throw e}var mi,yi;var vi=function(){if(yi)return mi;yi=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 mi=function e(){var t,n,r,l,u,c,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)||(u=o(l)))?(u?(u=!1,c=r&&o(r)?r:[]):c=r&&i(r)?r:{},a(d,{name:n,newValue:e(h,c,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},mi}();const bi=t(vi);function ki(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 xi(){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 wi={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Si(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(Si(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){Si(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;)Si(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){Si(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 Si(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Ei={cwd:function(){return"/"}};function Ci(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function Ti(e){if("string"==typeof e)e=new URL(e);else if(!Ci(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 Oi=["history","path","basename","stem","extname","dirname"];class Ni{constructor(e){let t;t=e?Ci(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?"":Ei.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<Oi.length;){const e=Oi[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)Oi.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?wi.basename(this.path):void 0}set basename(e){Li(e,"basename"),Pi(e,"basename"),this.path=wi.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?wi.dirname(this.path):void 0}set dirname(e){Ri(this.basename,"dirname"),this.path=wi.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?wi.extname(this.path):void 0}set extname(e){if(Pi(e,"extname"),Ri(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=wi.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Ci(e)&&(e=Ti(e)),Li(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?wi.basename(this.path,this.extname):void 0}set stem(e){Li(e,"stem"),Pi(e,"stem"),this.path=wi.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 kn(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 Pi(e,t){if(e&&e.includes(wi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+wi.sep+"`")}function Li(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ri(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const _i=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},Ai={}.hasOwnProperty;class Ii extends _i{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=xi()}copy(){const e=new Ii;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(bi(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(Fi("data",this.frozen),this.namespace[e]=t,this):Ai.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Fi("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=Bi(e),n=this.parser||this.Parser;return zi("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),zi("process",this.parser||this.Parser),ji("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=Bi(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(),zi("processSync",this.parser||this.Parser),ji("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,gi(e),t=r}),Ui("processSync","process",n),t}run(e,t,n){Mi(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=Bi(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){gi(e),n=t,r=!0}),Ui("runSync","run",r),n}stringify(e,t){this.freeze();const n=Bi(t),r=this.compiler||this.Compiler;return ji("stringify",r),Mi(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(Fi("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=bi(!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];ki(a)&&ki(r)&&(r=bi(!0,a,r)),n[o]=[e,r,...i]}}}}const Di=(new Ii).freeze();function zi(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function ji(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function Fi(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 Mi(e){if(!ki(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function Ui(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Bi(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new Ni(e)}const $i=[],Vi={allowDangerousHtml:!0},Hi=/^(https?|ircs?|mailto|xmpp)$/i,qi=[{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 Wi(e){const t=function(e){const t=e.rehypePlugins||$i,n=e.remarkPlugins||$i,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Vi}:Vi,o=Di().use(Io).use(n).use(hi,r).use(t);return o}(e),n=function(e){const t=e.children||"",n=new Ni;"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||Ki;for(const c of qi)Object.hasOwn(t,c.from)&&ht((c.from,c.to&&c.to,c.id));return ii(e,u),On(e,{Fragment:O.Fragment,components:o,ignoreInvalidStyle:!0,jsx:O.jsx,jsxs:O.jsxs,passKeys:!0,passNode:!0});function u(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 jn)if(Object.hasOwn(jn,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=jn[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 Ki(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||Hi.test(e.slice(0,t))?e:""}function Qi(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 Ji(e,t,n){const r=Xo((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([Yi(e[0]),Gi(e[1])])}return t}(t);let i=-1;for(;++i<o.length;)oi(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 u=!1,c=[];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&&c.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(i)?c.push(...i):i&&c.push(i),s=n+d[0].length,u=!0),!r.global)break;d=r.exec(e.value)}u?(s<e.value.length&&c.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...c)):c=[e];return l+c.length}(e,t)}}function Yi(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 Gi(e){return"function"==typeof e?e:function(){return e}}const Xi="phrasing",Zi=["autolink","link","image","label"];function ea(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ta(e){this.config.enter.autolinkProtocol.call(this,e)}function na(e){this.config.exit.autolinkProtocol.call(this,e)}function ra(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 oa(e){this.config.exit.autolinkEmail.call(this,e)}function ia(e){this.exit(e)}function aa(e){Ji(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,sa],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),la]],{ignore:["link","linkReference"]})}function sa(e,t,n,r,o){let i="";if(!ua(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=Qi(e,"(");let i=Qi(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 la(e,t,n,r){return!(!ua(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function ua(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||ur(n)||lr(n))&&(!t||47!==n)}function ca(){this.buffer()}function da(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function fa(){this.buffer()}function pa(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ha(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Gn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ga(e){this.exit(e)}function ma(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Gn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ya(e){this.exit(e)}function va(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 ba(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?xa:ka)));return s(),a},footnoteReference:va},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function ka(e,t,n){return 0===t?e:xa(e,t,n)}function xa(e,t,n){return(n?"":" ")+e}va.peek=function(){return"["};const wa=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function Sa(e){this.enter({type:"delete",children:[]},e)}function Ea(e){this.exit(e)}function Ca(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 Ta(e){return e.length}function Oa(e){return null==e?"":String(e)}function Na(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 Pa(e,t,n){return">"+(n?"":" ")+e}function La(e,t){return Ra(e,t.inConstruct,!0)&&!Ra(e,t.notInConstruct,!1)}function Ra(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 _a(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if("\n"===n.unsafe[o].character&&La(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return"\\\n"}function Aa(e,t,n){return(n?"":" ")+e}function Ia(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 Da(e){return"&#x"+e.toString(16).toUpperCase()+";"}function za(e,t,n){const r=mr(e),o=mr(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 ja(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 u=l.charCodeAt(0),c=za(r.before.charCodeAt(r.before.length-1),u,o);c.inside&&(l=Da(u)+l.slice(1));const d=l.charCodeAt(l.length-1),f=za(r.after.charCodeAt(0),d,o);f.inside&&(l=l.slice(0,-1)+Da(d));const p=a.move(o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:c.outside},s+l+p}function Fa(e){return e.value||""}function Ma(e,t,n,r){const o=Ia(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let u=l.move("![");return u+=l.move(n.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),u+=l.move(" "+o),u+=l.move(n.safe(e.title,{before:u,after:o,...l.current()})),u+=l.move(o),s()),u+=l.move(")"),a(),u}function Ua(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 u=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),a();const c=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=c,i(),"full"!==o&&u&&u===d?"shortcut"===o?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Ba(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 $a(e,t){const n=Mn(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 Va(e,t,n,r){const o=Ia(n),i='"'===o?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if($a(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 u=a.move("[");return u+=a.move(n.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${i}`),u+=a.move(" "+o),u+=a.move(n.safe(e.title,{before:u,after:o,...a.current()})),u+=a.move(o),l()),u+=a.move(")"),s(),u}function Ha(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 u=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),a();const c=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=c,i(),"full"!==o&&u&&u===d?"shortcut"===o?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function qa(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 Wa(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}Ca.peek=function(){return"~"},ja.peek=function(e,t,n){return n.options.emphasis||"*"},Fa.peek=function(){return"<"},Ma.peek=function(){return"!"},Ua.peek=function(){return"!"},Ba.peek=function(){return"`"},Va.peek=function(e,t,n){return $a(e,n)?"<":"["},Ha.peek=function(){return"["};const Ka=Xo(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Qa(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 u=l.charCodeAt(0),c=za(r.before.charCodeAt(r.before.length-1),u,o);c.inside&&(l=Da(u)+l.slice(1));const d=l.charCodeAt(l.length-1),f=za(r.after.charCodeAt(0),d,o);f.inside&&(l=l.slice(0,-1)+Da(d));const p=a.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:c.outside},s+l+p}Qa.peek=function(e,t,n){return n.options.strong||"*"};const Ja={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()),Pa);return o(),a},break:_a,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,Aa);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)),u=n.enter("codeFenced");let c=s.move(l);if(e.lang){const t=n.enter(`codeFencedLang${a}`);c+=s.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${a}`);c+=s.move(" "),c+=s.move(n.safe(e.meta,{before:c,after:"\n",encode:["`"],...s.current()})),t()}return c+=s.move("\n"),i&&(c+=s.move(i+"\n")),c+=s.move(l),u(),c},definition:function(e,t,n,r){const o=Ia(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let u=l.move("[");return u+=l.move(n.safe(n.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),u+=l.move(" "+o),u+=l.move(n.safe(e.title,{before:u,after:o,...l.current()})),u+=l.move(o),s()),a(),u},emphasis:ja,hardBreak:_a,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 ii(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,ri}),Boolean((!e.depth||e.depth<3)&&Mn(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 u=n.containerPhrasing(e,{before:"# ",after:"\n",...i.current()});return/^[\t ]/.test(u)&&(u=Da(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,n.options.closeAtx&&(u+=" "+a),l(),s(),u},html:Fa,image:Ma,imageReference:Ua,inlineCode:Ba,link:Va,linkReference:Ha,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):qa(n);const s=e.ordered?"."===a?")":".":function(e){const t=qa(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),Wa(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 u=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,o(),u},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||qa(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"),u=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(),u},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 Ka(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:Qa,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(Wa(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 Ya(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 Ga(e){this.exit(e),this.data.inTable=void 0}function Xa(e){this.enter({type:"tableRow",children:[]},e)}function Za(e){this.exit(e)}function es(e){this.enter({type:"tableCell",children:[]},e)}function ts(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,ns));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function ns(e,t){return"|"===t?t:e}function rs(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=Ja.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||Ta,i=[],a=[],s=[],l=[];let u=0,c=-1;for(;++c<e.length;){const t=[],r=[];let i=-1;for(e[c].length>u&&(u=e[c].length);++i<e[c].length;){const a=Oa(e[c][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[c]=t,s[c]=r}let d=-1;if("object"==typeof r&&"length"in r)for(;++d<u;)i[d]=Na(r[d]);else{const e=Na(r);for(;++d<u;)i[d]=e}d=-1;const f=[],p=[];for(;++d<u;){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),c=-1;const h=[];for(;++c<a.length;){const e=a[c],t=s[c];d=-1;const r=[];for(;++d<u;){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===u-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 os(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function is(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 as(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=Ja.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+a})),l}const ss={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},ls={tokenize:function(e,t,n){let r,o,i;return a;function a(t){return 46===t||95===t?e.check(cs,l,s)(t):null===t||ar(t)||ur(t)||45!==t&&lr(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},us={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(cs,t,i)(a):null===a||ar(a)||ur(a)?t(a):(e.consume(a),o)}function i(t){return 41===t&&r++,e.consume(t),o}},partial:!0},cs={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||ar(a)||ur(a)?t(a):n(a)}function o(e){return null===e||40===e||91===e||ar(e)||ur(e)?t(e):r(e)}function i(e){return Xn(e)?a(e):n(e)}function a(t){return 59===t?(e.consume(t),r):Xn(t)?(e.consume(t),a):n(t)}},partial:!0},ds={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return Zn(e)?n(e):t(e)}},partial:!0},fs={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!ys.call(r,r.previous)||xs(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(ss,e.attempt(ls,e.attempt(us,o),n),n)(t)};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:ys},ps={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let o="",i=!1;return function(t){if((72===t||104===t)&&vs.call(r,r.previous)&&!xs(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),a;return n(t)};function a(t){if(Xn(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||tr(t)||ar(t)||ur(t)||lr(t)?n(t):e.attempt(ls,e.attempt(us,u),n)(t)}function u(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:vs},hs={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let o,i;return function(t){if(!ks(t)||!bs.call(r,r.previous)||xs(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)};function a(t){return ks(t)?(e.consume(t),a):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(ds,u,l)(t):45===t||95===t||Zn(t)?(i=!0,e.consume(t),s):u(t)}function l(t){return e.consume(t),o=!0,s}function u(a){return i&&o&&Xn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):n(a)}},previous:bs},gs={};let ms=48;for(;ms<123;)gs[ms]=hs,ms++,58===ms?ms=65:91===ms&&(ms=97);function ys(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||ar(e)}function vs(e){return!Xn(e)}function bs(e){return!(47===e||ks(e))}function ks(e){return 43===e||45===e||46===e||95===e||Zn(e)}function xs(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}gs[43]=hs,gs[45]=hs,gs[46]=hs,gs[95]=hs,gs[72]=[hs,ps],gs[104]=[hs,ps],gs[87]=[hs,fs],gs[119]=[hs,fs];const ws={tokenize:function(e,t,n){const r=this;return fr(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 Ss(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=Gn(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 Es(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 Cs(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||ar(s))return n(s);if(93===s){e.exit("chunkString");const i=e.exit("gfmFootnoteCallString");return o.includes(Gn(r.sliceSerialize(i)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return ar(s)||(i=!0),a++,e.consume(s),92===s?u:l}function u(t){return 91===t||92===t||93===t?(e.consume(t),a++,l):l(t)}}function Ts(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",u):n(t)}function u(t){if(s>999||93===t&&!a||null===t||91===t||ar(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return i=Gn(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return ar(t)||(a=!0),s++,e.consume(t),92===t?c:u}function c(t){return 91===t||92===t||93===t?(e.consume(t),s++,u):u(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(i)||o.push(i),fr(e,f,"gfmFootnoteDefinitionWhitespace")):n(t)}function f(e){return t(e)}}function Os(e,t,n){return e.check(xr,t,e.attempt(ws,t,n))}function Ns(e){e.exit("gfmFootnoteDefinition")}function Ps(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=mr(o);if(126===i)return a>1?r(i):(e.consume(i),a++,s);if(a<2&&!t)return r(i);const u=e.exit("strikethroughSequenceTemporary"),c=mr(i);return u._open=!c||2===c&&Boolean(l),u._close=!l||2===l&&Boolean(c),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&&Hn(a,a.length,0,yr(s,e.slice(r+1,n),t)),Hn(a,a.length,0,[["exit",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",o,t]]),Hn(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 Ls{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 Rs(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 _s(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?k:s;if(i===k&&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):ir(t)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):sr(t)?fr(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"),u(t)))}function u(t){return null===t||124===t||ar(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?c:u)}function c(t){return 92===t||124===t?(e.consume(t),u):u(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),o=!1,sr(t)?fr(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):b(t)}function p(t){return sr(t)?fr(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"),g):45===t?(a+=1,g(t)):null===t||ir(t)?v(t):b(t)}function g(t){return 45===t?(e.enter("tableDelimiterFiller"),m(t)):b(t)}function m(t){return 45===t?(e.consume(t),m):58===t?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(t))}function y(t){return sr(t)?fr(e,v,"whitespace")(t):v(t)}function v(n){return 124===n?f(n):(null===n||ir(n))&&o&&i===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):b(n)}function b(e){return n(e)}function k(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||ir(n)?(e.exit("tableRow"),t(n)):sr(n)?fr(e,x,"whitespace")(n):(e.enter("data"),w(n))}function w(t){return null===t||124===t||ar(t)?(e.exit("data"),x(t)):(e.consume(t),92===t?S:w)}function S(t){return 92===t||124===t?(e.consume(t),w):w(t)}}function As(e,t){let n,r,o,i=-1,a=!0,s=0,l=[0,0,0,0],u=[0,0,0,0],c=!1,d=0;const f=new Ls;for(;++i<e.length;){const p=e[i],h=p[1];"enter"===p[0]?"tableHead"===h.type?(c=!1,0!==d&&(Ds(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],u=[0,i+1,0,0],c&&(c=!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]&&(u[0]=u[1],o=Is(f,t,l,s,void 0,o)),l=u,u=[l[1],i,0,0])):(a=!1,0===u[2]&&(0!==l[1]&&(u[0]=u[1],o=Is(f,t,l,s,void 0,o),l=[0,0,0,0]),u[2]=i)):"tableHead"===h.type?(c=!0,d=i):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=i,0!==l[1]?(u[0]=u[1],o=Is(f,t,l,s,i,o)):0!==u[1]&&(o=Is(f,t,u,s,i,o)),s=0):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(u[3]=i)}for(0!==d&&Ds(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=Rs(t.events,i))}return e}function Is(e,t,n,r,o,i){const a=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(i.end=Object.assign({},zs(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const s=zs(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=zs(t.events,n[2]),i=zs(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({},zs(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function Ds(e,t,n,r,o){const i=[],a=zs(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 zs(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const js={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 ar(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 ir(r)?t(r):sr(r)?e.check({tokenize:Fs},t,n)(r):n(r)}}};function Fs(e,t,n){return fr(e,function(e){return null===e?n(e):t(e)},"whitespace")}const Ms={};function Us(e){const t=e||Ms,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return Kn([{text:gs},{document:{91:{name:"gfmFootnoteDefinition",tokenize:Ts,continuation:{tokenize:Os},exit:Ns}},text:{91:{name:"gfmFootnoteCall",tokenize:Cs},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Ss,resolveTo:Es}}},Ps(e),{flow:{null:{name:"table",tokenize:_s,resolveAll:As}}},{text:{91:js}}])}(t)),o.push([{transforms:[aa],enter:{literalAutolink:ea,literalAutolinkEmail:ta,literalAutolinkHttp:ta,literalAutolinkWww:ta},exit:{literalAutolink:ia,literalAutolinkEmail:oa,literalAutolinkHttp:na,literalAutolinkWww:ra}},{enter:{gfmFootnoteCallString:ca,gfmFootnoteCall:da,gfmFootnoteDefinitionLabelString:fa,gfmFootnoteDefinition:pa},exit:{gfmFootnoteCallString:ha,gfmFootnoteCall:ga,gfmFootnoteDefinitionLabelString:ma,gfmFootnoteDefinition:ya}},{canContainEols:["delete"],enter:{strikethrough:Sa},exit:{strikethrough:Ea}},{enter:{table:Ya,tableData:es,tableHeader:es,tableRow:Xa},exit:{codeText:ts,table:Ga,tableData:Za,tableHeader:Za,tableRow:Za}},{exit:{taskListCheckValueChecked:os,taskListCheckValueUnchecked:os,paragraph:is}}]),i.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Xi,notInConstruct:Zi},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Xi,notInConstruct:Zi},{character:":",before:"[ps]",after:"\\/",inConstruct:Xi,notInConstruct:Zi}]},ba(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:wa}],handlers:{delete:Ca}},rs(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:as}}]}}(t))}const Bs="https://www.tiagpctest.softiabot.com",$s={BOTTOM_RIGHT:"bottom-right",BOTTOM_LEFT:"bottom-left",TOP_RIGHT:"top-right",TOP_LEFT:"top-left"},Vs={LIGHT:"light",DARK:"dark",AUTO:"auto"},Hs={SPANISH:"es",ENGLISH:"en",FRANCES:"fr"},qs=640,Ws=Vs.AUTO,Ks=$s.BOTTOM_RIGHT,Qs=Hs.ENGLISH,Js="400px",Ys="600px",Gs=!1,Xs=!0,Zs=!0,el=3e4,tl=2e3,nl=e=>{try{return new Date(e).toLocaleTimeString("es-ES",{hour:"2-digit",minute:"2-digit"})}catch{return""}},rl=()=>crypto.randomUUID(),ol=({size:e="md",className:t=""})=>O.jsx("div",{className:`gpc-spinner ${{sm:"w-4 h-4 border-2",md:"w-6 h-6 border-2",lg:"w-8 h-8 border-3"}[e]} ${t}`,role:"status","aria-label":"Cargando",children:O.jsx("span",{className:"sr-only",children:"Cargando..."})}),il=()=>O.jsxs("div",{className:"gpc-typing-indicator",role:"status","aria-label":"Escribiendo",children:[O.jsx("span",{className:"gpc-typing-dot"}),O.jsx("span",{className:"gpc-typing-dot"}),O.jsx("span",{className:"gpc-typing-dot"})]}),al=({message:e,showMetadata:t=!1,messageRef:n=null})=>{const{t:r}=V(),o="user"===e.role,i=!o&&e.isStreaming&&!e.content;return O.jsxs("div",{ref:n,className:"gpc-message "+(o?"gpc-message-user":"gpc-message-assistant"),role:"article","aria-label":o?"Mensaje del usuario":"Mensaje del asistente",children:[O.jsx("div",{className:"gpc-message-content",children:i?O.jsx(il,{}):o?e.content.trim():O.jsx(Wi,{remarkPlugins:[Us],components:{table:({node:e,...t})=>O.jsx("div",{className:"gpc-table-wrapper",children:O.jsx("table",{className:"gpc-table",...t})}),thead:({node:e,...t})=>O.jsx("thead",{className:"gpc-table-head",...t}),tbody:({node:e,...t})=>O.jsx("tbody",{className:"gpc-table-body",...t}),tr:({node:e,...t})=>O.jsx("tr",{className:"gpc-table-row",...t}),th:({node:e,...t})=>O.jsx("th",{className:"gpc-table-header",...t}),td:({node:e,...t})=>O.jsx("td",{className:"gpc-table-cell",...t})},children:e.content})}),O.jsx("div",{className:"gpc-message-timestamp "+(o?"gpc-message-timestamp-user":""),children:nl(e.timestamp)}),!o&&t&&e.metadata&&O.jsxs("div",{className:"gpc-message-metadata",children:[e.metadata.tokensUsed&&O.jsxs("div",{className:"gpc-metadata-item",children:[O.jsxs("strong",{children:[r("metadata.tokensUsed"),":"]})," ",e.metadata.tokensUsed]}),e.metadata.responseTimeMs&&O.jsxs("div",{className:"gpc-metadata-item",children:[O.jsxs("strong",{children:[r("metadata.responseTime"),":"]})," ",(a=e.metadata.responseTimeMs,a>=1e3?`${(a/1e3).toFixed(1)}s`:`${Math.round(a)}ms`)]}),e.metadata.model&&O.jsxs("div",{className:"gpc-metadata-item",children:[O.jsxs("strong",{children:[r("metadata.model"),":"]})," ",e.metadata.model]})]})]});var a},sl=({messages:e,isLoading:t,showMetadata:n=!1,widgetConfig:r=null})=>{const{t:o}=V(),i=l.useRef(null),a=l.useRef(null),s=l.useRef(e.length);l.useEffect(()=>{const t=e.length>s.current,n=e[e.length-1];t&&n&&("user"===n.role?i.current?.scrollIntoView({behavior:"smooth"}):"assistant"===n.role&&n.isStreaming&&setTimeout(()=>{a.current?.scrollIntoView({behavior:"smooth",block:"start"})},100)),s.current=e.length},[e]);const u=r?.company_name||"TIA GPC",c=r?.company_logo_base64,d=c?.startsWith("data:")?c:c?`data:image/png;base64,${c}`:null;return 0!==e.length||t?O.jsxs("div",{className:"gpc-messages-container gpc-scrollbar gpc-smooth-scroll",children:[e.map((t,r)=>O.jsx(al,{message:t,showMetadata:n,messageRef:r===e.length-1?a:null},t.id)),O.jsx("div",{ref:i})]}):O.jsx("div",{className:"gpc-messages-container",children:O.jsxs("div",{className:"gpc-empty-state",children:[d?O.jsx("div",{className:"gpc-welcome-logo",children:O.jsx("img",{src:d,alt:u,className:"gpc-welcome-company-logo"})}):O.jsx(te,{className:"gpc-empty-icon"}),O.jsx("h3",{className:"gpc-empty-title",children:o("chat.welcome",{companyName:u})}),O.jsx("p",{className:"gpc-empty-text",children:o("chat.emptyState")})]})})},ll=({onTranscript:e,isLoading:t,disabled:n,onRecordingStateChange:r,onAnalyserChange:o})=>{const{t:i}=V(),[a,s]=l.useState(!1),[u,c]=l.useState(!1),d=l.useRef(null),f=l.useRef([]),p=l.useRef(null),h=l.useRef(null),g=l.useRef(null),m=l.useRef(null),y=l.useRef(null);l.useEffect(()=>()=>{"recording"===d.current?.state&&d.current.stop(),p.current&&"closed"!==p.current.state&&p.current.close(),y.current&&clearInterval(y.current)},[]),l.useEffect(()=>{r&&r(a||u)},[a,u,r]),l.useEffect(()=>{o&&o(h.current)},[h.current,o]);const v=async()=>{try{if(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia)return void alert(i("voice.unsupported"));const t=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0,sampleRate:48e3,channelCount:1}});p.current=new(window.AudioContext||window.webkitAudioContext),h.current=p.current.createAnalyser();p.current.createMediaStreamSource(t).connect(h.current),h.current.fftSize=1024,h.current.smoothingTimeConstant=.4,h.current.minDecibels=-85,h.current.maxDecibels=-15;const n=h.current.frequencyBinCount;g.current=new Uint8Array(n);const r=new MediaRecorder(t,{mimeType:"audio/webm;codecs=opus"});d.current=r,f.current=[],m.current=null,r.ondataavailable=e=>{e.data.size>0&&f.current.push(e.data)},r.onstop=async()=>{if(y.current&&(clearInterval(y.current),y.current=null),p.current&&"closed"!==p.current.state&&p.current.close(),m.current=null,0===f.current.length)return;const t=new Blob(f.current,{type:"audio/webm"});c(!0);try{await e(t)}catch(n){alert(i("voice.error"))}finally{c(!1),f.current=[]}},r.start(100),s(!0),y.current=setInterval(()=>{(()=>{if(!h.current||!g.current)return;h.current.getByteTimeDomainData(g.current);let e=0;for(let t=0;t<g.current.length;t++){const n=(g.current[t]-128)/128;e+=n*n}if(100*Math.sqrt(e/g.current.length)<1.2){if(m.current||(m.current=Date.now()),Date.now()-m.current>2e3)b()}else m.current=null})()},100)}catch(t){"NotAllowedError"===t.name||"PermissionDeniedError"===t.name?alert(i("voice.permissionDenied")):alert(i("voice.unsupported"))}},b=()=>{(a||"recording"===d.current?.state)&&(d.current&&"recording"===d.current.state&&d.current.stop(),y.current&&(clearInterval(y.current),y.current=null),m.current=null,s(!1),d.current&&d.current.stream&&d.current.stream.getTracks().forEach(e=>e.stop()))},k=n||t||u,x=i(u?"voice.processing":a?"voice.stop":"voice.record");return O.jsx("button",{type:"button",onClick:()=>{a?b():v()},disabled:k,className:"gpc-voice-button "+(a?"gpc-voice-recording":""),"aria-label":x,title:x,children:u?O.jsx("span",{className:"gpc-spinner"}):a?O.jsx(ne,{className:"gpc-icon gpc-voice-icon-active"}):O.jsx(re,{className:"gpc-icon"})})},ul=({analyser:e,isRecording:t})=>{const n=l.useRef(null),r=l.useRef(null);return l.useEffect(()=>{if(!t||!e||!n.current)return;const o=n.current,i=o.getContext("2d"),a=e.frequencyBinCount,s=new Uint8Array(a),l=window.devicePixelRatio||1,u=o.getBoundingClientRect();o.width=u.width*l,o.height=u.height*l,i.scale(l,l);const c=u.width,d=u.height,f=()=>{if(!t)return;r.current=requestAnimationFrame(f),e.getByteFrequencyData(s),i.clearRect(0,0,c,d);const n=(c-200)/2;for(let e=0;e<40;e++){const t=Math.floor(e*a/40),r=s[t]/255,o=Math.max(2,r*d*.8),l=n+5*e,u=(d-o)/2,c=i.createLinearGradient(0,u,0,u+o);c.addColorStop(0,"rgba(59, 130, 246, 0.8)"),c.addColorStop(1,"rgba(96, 165, 250, 0.6)"),i.fillStyle=c,i.fillRect(l,u,3,o)}};return f(),()=>{r.current&&cancelAnimationFrame(r.current)}},[e,t]),t?O.jsx("div",{className:"gpc-audio-waveform-container",children:O.jsx("canvas",{ref:n,className:"gpc-audio-waveform-canvas","aria-label":"Audio waveform visualization"})}):null},cl=({onSendMessage:e,isLoading:t,disabled:n,gpcService:r})=>{const{t:o}=V(),[i,a]=l.useState(""),[s,u]=l.useState(!1),[c,d]=l.useState(null),f=l.useRef(null);l.useEffect(()=>{n||t||s||f.current?.focus()},[n,t,s]);const p=async r=>{r.preventDefault();const o=(e=>e.trim().slice(0,2e3))(i);if(o&&!t&&!n&&!s)try{await e(o),a("")}catch(l){}},h=i.trim().length>0&&!t&&!n&&!s,g=t||n||s;return O.jsxs("form",{onSubmit:p,className:"gpc-input-container",children:[O.jsxs("div",{className:"gpc-input-wrapper",children:[O.jsx("input",{ref:f,type:"text",value:i,onChange:e=>a(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||s||(e.preventDefault(),p(e))},placeholder:s?"":o("chat.placeholder"),disabled:g,maxLength:tl,className:"gpc-input "+(s?"gpc-input-recording":""),"aria-label":o("chat.placeholder"),"aria-describedby":"chat-input-help"}),O.jsx(ul,{analyser:c,isRecording:s})]}),O.jsx(ll,{onTranscript:async e=>{if(!r)throw new Error("GPC Service not available");const t=await r.transcribeAudio(e);t.success&&t.text&&(a(t.text),f.current?.focus())},isLoading:t,disabled:n,onRecordingStateChange:e=>{u(e)},onAnalyserChange:e=>{d(e)}}),O.jsx("button",{type:"submit",disabled:!h,className:"gpc-send-button","aria-label":o("chat.send"),title:o("chat.send"),children:t?O.jsx("span",{className:"gpc-spinner"}):O.jsx(ie,{className:"gpc-icon"})}),O.jsxs("span",{id:"chat-input-help",className:"gpc-sr-only",children:[o("chat.placeholder"),". Máximo ",tl," caracteres."]})]})};var dl=l.forwardRef(({as:e="div",...t},n)=>O.jsx(e,{...t,ref:n})),fl="cf-turnstile-script",pl="onloadTurnstileCallback",hl=e=>!!document.getElementById(e),gl={normal:{width:300,height:65},compact:{width:150,height:140},invisible:{width:0,height:0,overflow:"hidden"},flexible:{minWidth:300,width:"100%",height:65},interactionOnly:{width:"fit-content",height:"auto",display:"flex"}};function ml(e){if("invisible"!==e&&"interactionOnly"!==e)return e}var yl,vl="unloaded",bl=new Promise((e,t)=>{yl={resolve:e,reject:t},"ready"===vl&&e(void 0)}),kl=l.forwardRef((e,t)=>{let{scriptOptions:n,options:r={},siteKey:o,onWidgetLoad:i,onSuccess:a,onExpire:s,onError:u,onBeforeInteractive:c,onAfterInteractive:d,onUnsupported:f,onTimeout:p,onLoadScript:h,id:g,style:m,as:y="div",injectScript:v=!0,rerenderOnCallbackChange:b=!1,...k}=e,x=r.size,w=l.useCallback(()=>typeof x>"u"?{}:"execute"===r.execution?gl.invisible:"interaction-only"===r.appearance?gl.interactionOnly:gl[x],[r.execution,x,r.appearance]),[S,E]=l.useState(w()),C=l.useRef(null),[T,N]=l.useState(!1),P=l.useRef(),L=l.useRef(!1),R=g||"cf-turnstile",_=l.useRef({onSuccess:a,onError:u,onExpire:s,onBeforeInteractive:c,onAfterInteractive:d,onUnsupported:f,onTimeout:p});l.useEffect(()=>{b||(_.current={onSuccess:a,onError:u,onExpire:s,onBeforeInteractive:c,onAfterInteractive:d,onUnsupported:f,onTimeout:p})});let A=n?.id||fl,I=function(e=fl){let[t,n]=l.useState(!1);return l.useEffect(()=>{let t=()=>{hl(e)&&n(!0)},r=new MutationObserver(t);return r.observe(document,{childList:!0,subtree:!0}),t(),()=>{r.disconnect()}},[e]),t}(A),D=n?.onLoadCallbackName||pl,z=r.appearance||"always",j=l.useMemo(()=>({sitekey:o,action:r.action,cData:r.cData,theme:r.theme||"auto",language:r.language||"auto",tabindex:r.tabIndex,"response-field":r.responseField,"response-field-name":r.responseFieldName,size:ml(x),retry:r.retry||"auto","retry-interval":r.retryInterval||8e3,"refresh-expired":r.refreshExpired||"auto","refresh-timeout":r.refreshTimeout||"auto",execution:r.execution||"render",appearance:r.appearance||"always","feedback-enabled":r.feedbackEnabled||!0,callback:e=>{L.current=!0,b?a?.(e):_.current.onSuccess?.(e)},"error-callback":b?u:(...e)=>_.current.onError?.(...e),"expired-callback":b?s:(...e)=>_.current.onExpire?.(...e),"before-interactive-callback":b?c:(...e)=>_.current.onBeforeInteractive?.(...e),"after-interactive-callback":b?d:(...e)=>_.current.onAfterInteractive?.(...e),"unsupported-callback":b?f:(...e)=>_.current.onUnsupported?.(...e),"timeout-callback":b?p:(...e)=>_.current.onTimeout?.(...e)}),[r.action,r.appearance,r.cData,r.execution,r.language,r.refreshExpired,r.responseField,r.responseFieldName,r.retry,r.retryInterval,r.tabIndex,r.theme,r.feedbackEnabled,r.refreshTimeout,o,x,b,b?a:null,b?u:null,b?s:null,b?c:null,b?d:null,b?f:null,b?p:null]),F=l.useCallback(()=>typeof window<"u"&&!!window.turnstile,[]);return l.useEffect(function(){v&&!T&&(({render:e="explicit",onLoadCallbackName:t=pl,scriptOptions:{nonce:n="",defer:r=!0,async:o=!0,id:i="",appendTo:a,onError:s,crossOrigin:l=""}={}})=>{let u=i||fl;if(hl(u))return;let c=document.createElement("script");c.id=u,c.src=`https://challenges.cloudflare.com/turnstile/v0/api.js?onload=${t}&render=${e}`,document.querySelector(`script[src="${c.src}"]`)||(c.defer=!!r,c.async=!!o,n&&(c.nonce=n),l&&(c.crossOrigin=l),s&&(c.onerror=s,delete window[t]),("body"===a?document.body:document.getElementsByTagName("head")[0]).appendChild(c))})({onLoadCallbackName:D,scriptOptions:{...n,id:A}})},[v,T,n,A]),l.useEffect(function(){"ready"!==vl&&((e=pl)=>("unloaded"===vl&&(vl="loading",window[e]=()=>{yl.resolve(),vl="ready",delete window[e]}),bl))(D).then(()=>N(!0)).catch(console.error)},[]),l.useEffect(function(){if(!C.current||!T)return;let e=!1;return(async()=>{if(e||!C.current)return;let t=window.turnstile.render(C.current,j);P.current=t,P.current&&i?.(P.current)})(),()=>{e=!0,P.current&&(window.turnstile.remove(P.current),L.current=!1)}},[R,T,j]),l.useImperativeHandle(t,()=>{let{turnstile:e}=window;return{getResponse(){if(e?.getResponse&&P.current&&F())return e.getResponse(P.current)},getResponsePromise:async(e=3e4,t=100)=>new Promise((n,r)=>{let o,i=async()=>{if(L.current&&window.turnstile&&P.current)try{let e=window.turnstile.getResponse(P.current);return o&&clearTimeout(o),e?n(e):r(new Error("No response received"))}catch(a){return o&&clearTimeout(o),r(new Error("Failed to get response"))}o||(o=setTimeout(()=>{o&&clearTimeout(o),r(new Error("Timeout"))},e)),await new Promise(e=>setTimeout(e,t)),await i()};i()}),reset(){if(e?.reset&&P.current&&F()){"execute"===r.execution&&E(gl.invisible);try{L.current=!1,e.reset(P.current)}catch(Fe){}}},remove(){e?.remove&&P.current&&F()&&(E(gl.invisible),L.current=!1,e.remove(P.current),P.current=null)},render(){if(!e?.render||!C.current||!F()||P.current)return;let t=e.render(C.current,j);return P.current=t,P.current&&i?.(P.current),"execute"!==r.execution&&E(x?gl[x]:{}),t},execute(){"execute"===r.execution&&e?.execute&&C.current&&P.current&&F()&&(e.execute(C.current,j),E(x?gl[x]:{}))},isExpired:()=>!!(e?.isExpired&&P.current&&F())&&e.isExpired(P.current)}},[P,r.execution,x,j,C,F,T,i]),l.useEffect(()=>{I&&!T&&window.turnstile&&N(!0)},[T,I]),l.useEffect(()=>{E(w())},[r.execution,x,z]),l.useEffect(()=>{!I||"function"!=typeof h||h()},[I]),O.jsx(dl,{ref:C,as:y,id:R,style:{...S,...m},...k})});kl.displayName="Turnstile";const xl=({siteKey:e,onSuccess:t,onError:n})=>{const{t:r}=V(),[o,i]=l.useState(!1),[a,s]=l.useState(null);return O.jsxs("div",{className:"gpc-validator-container",children:[O.jsxs("div",{className:"gpc-validator-header",children:[O.jsx("h3",{className:"gpc-validator-title",children:r("chat.validation")}),O.jsx("p",{className:"gpc-validator-subtitle",children:r("turnstile.verifying")})]}),!a&&O.jsx("div",{className:"gpc-animate-fade-in",children:O.jsx(kl,{siteKey:e,onSuccess:async e=>{i(!0),s(null);try{await t(e)}catch(o){s(r("turnstile.error")),n?.(o)}finally{i(!1)}},onError:e=>{s(r("turnstile.error")),n?.(new Error(r("turnstile.error")))},options:{theme:"light",size:"normal"}})}),o&&O.jsxs("div",{className:"gpc-validator-loading",children:[O.jsx(ol,{size:"md"}),O.jsx("p",{className:"gpc-validator-text",children:r("chat.validation")})]}),a&&O.jsxs("div",{className:"gpc-validator-error",children:[O.jsx(X,{className:"gpc-error-icon"}),O.jsxs("div",{className:"gpc-error-content",children:[O.jsx("p",{className:"gpc-error-title",children:r("errors.validation")}),O.jsx("p",{className:"gpc-error-message",children:a}),O.jsx("button",{onClick:()=>window.location.reload(),className:"gpc-error-button",children:r("chat.retry")})]})]})]})},wl=(e="auto")=>{const[t,n]=l.useState(e),[r,o]=l.useState("light");l.useEffect(()=>{if(o("auto"===t?window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t),"auto"===t){const e=window.matchMedia("(prefers-color-scheme: dark)"),t=e=>{o(e.matches?"dark":"light")};return e.addEventListener("change",t),()=>{e.removeEventListener("change",t)}}},[t]);return{theme:r,themeMode:t,setThemeMode:n,toggleTheme:()=>{n(e=>"auto"===e?"light"===r?"dark":"light":"light"===e?"dark":"light")}}},Sl=({gpcService:e,licenseToken:t,widgetConfig:n,turnstileSiteKey:r,onClose:o,themeMode:i,showBranding:a=!0,showMetadata:s=!1,onError:u})=>{const{t:c}=V(),[d,f]=l.useState(null),[p,h]=l.useState(!1),{theme:g,toggleTheme:m}=wl(i),y=l.useCallback(()=>{h(!1),f(null),e&&e.renewSessionToken()},[e]),{messages:v,isLoading:b,sendMessage:k}=((e,t,n)=>{const{t:r}=V(),[o,i]=l.useState([]),[a,s]=l.useState(!1),[u,c]=l.useState(null),d=l.useCallback(async o=>{if(!o.trim()||a)return;if(!t)return void lt.error("Validación anti-bot pendiente");const l={id:rl(),role:"user",content:o.trim(),timestamp:(new Date).toISOString()};i(e=>[...e,l]),s(!0),c(null);const u=rl(),d={id:u,role:"assistant",content:"",timestamp:(new Date).toISOString(),isStreaming:!0};i(e=>[...e,d]);try{const n=await e.sendMessage(o,t,e=>{i(t=>t.map(t=>t.id===u?{...t,content:t.content+e}:t))});i(e=>e.map(e=>e.id===u?{id:n.data.message_id,role:"assistant",content:n.data.response,timestamp:n.data.created_at,isStreaming:!1,metadata:{costUsd:n.data.cost_usd,creditBalanceUsd:n.data.credit_balance_usd,inputTokens:n.data.input_tokens,outputTokens:n.data.output_tokens,responseTimeMs:n.data.response_time_ms,modelUsed:n.data.model_used}}:e))}catch(f){let e,t;i(e=>e.filter(e=>e.id!==u));try{e=JSON.parse(f.message)}catch{e={statusCode:500,message:f.message}}const o=e.statusCode||500,a=e.errorCode||"";switch(401===o&&"SESSION_EXPIRED"===a&&(t=r("errors.sessionExpired","Session expired, please verify again"),n&&n()),o){case 401:t||(t=r("errors.unauthorized"));break;case 402:t=r("errors.insufficientCredits");break;case 403:t=a.includes("DOMAIN")||a.includes("UNAUTHORIZED")?r("errors.domainUnauthorized"):r("errors.validation");break;case 429:t=r("errors.rateLimit");break;case 503:case 502:case 504:t=r("errors.aiServiceUnavailable");break;case 500:t=r("errors.serverError");break;default:t=r("errors.generic")}c(t),lt.error(t,{duration:4e3,position:"top-center"});const s={id:rl(),role:"assistant",content:t,timestamp:(new Date).toISOString()};i(e=>[...e,s])}finally{s(!1)}},[e,t,a,r,n]),f=l.useCallback(()=>{i([]),c(null)},[]),p=l.useCallback(()=>{c(null)},[]);return{messages:o,isLoading:a,error:u,sendMessage:d,clearMessages:f,clearError:p}})(e,d,y);l.useEffect(()=>{e&&e.hasValidCachedSession()&&(h(!0),f("CACHED_SESSION"))},[e]);return l.useEffect(()=>()=>{e&&e.releaseSession().catch(e=>{})},[e]),O.jsxs("div",{className:"gpc-chat-window gpc-animate-fade-in "+("dark"===g?"gpc-dark":""),children:[O.jsx(ft,{onClose:o,theme:g,onToggleTheme:m,showBranding:a,widgetConfig:n}),p?O.jsxs(O.Fragment,{children:[O.jsx(sl,{messages:v,isLoading:b,showMetadata:s,widgetConfig:n}),O.jsx(cl,{onSendMessage:k,isLoading:b,disabled:!1,gpcService:e})]}):O.jsx(xl,{siteKey:r,onSuccess:t=>{f(t),h(!0),e&&e.validateSession()},onError:u}),a&&O.jsx("div",{className:"gpc-footer",children:O.jsx("span",{className:"gpc-footer-text",children:c("widget.poweredBy")})}),O.jsx(st,{position:"top-center"})]})};function El(e,t){return function(){return e.apply(t,arguments)}}const{toString:Cl}=Object.prototype,{getPrototypeOf:Tl}=Object,{iterator:Ol,toStringTag:Nl}=Symbol,Pl=(e=>t=>{const n=Cl.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ll=e=>(e=e.toLowerCase(),t=>Pl(t)===e),Rl=e=>t=>typeof t===e,{isArray:_l}=Array,Al=Rl("undefined");function Il(e){return null!==e&&!Al(e)&&null!==e.constructor&&!Al(e.constructor)&&jl(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Dl=Ll("ArrayBuffer");const zl=Rl("string"),jl=Rl("function"),Fl=Rl("number"),Ml=e=>null!==e&&"object"==typeof e,Ul=e=>{if("object"!==Pl(e))return!1;const t=Tl(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Nl in e||Ol in e)},Bl=Ll("Date"),$l=Ll("File"),Vl=Ll("Blob"),Hl=Ll("FileList"),ql=Ll("URLSearchParams"),[Wl,Kl,Ql,Jl]=["ReadableStream","Request","Response","Headers"].map(Ll);function Yl(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),_l(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Il(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function Gl(e,t){if(Il(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const Xl="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Zl=e=>!Al(e)&&e!==Xl;const eu=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&Tl(Uint8Array)),tu=Ll("HTMLFormElement"),nu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ru=Ll("RegExp"),ou=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Yl(n,(n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)}),Object.defineProperties(e,r)};const iu=Ll("AsyncFunction"),au=(su="function"==typeof setImmediate,lu=jl(Xl.postMessage),su?setImmediate:lu?(uu=`axios@${Math.random()}`,cu=[],Xl.addEventListener("message",({source:e,data:t})=>{e===Xl&&t===uu&&cu.length&&cu.shift()()},!1),e=>{cu.push(e),Xl.postMessage(uu,"*")}):e=>setTimeout(e));var su,lu,uu,cu;const du="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Xl):"undefined"!=typeof process&&process.nextTick||au,fu={isArray:_l,isArrayBuffer:Dl,isBuffer:Il,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||jl(e.append)&&("formdata"===(t=Pl(e))||"object"===t&&jl(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Dl(e.buffer),t},isString:zl,isNumber:Fl,isBoolean:e=>!0===e||!1===e,isObject:Ml,isPlainObject:Ul,isEmptyObject:e=>{if(!Ml(e)||Il(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(De){return!1}},isReadableStream:Wl,isRequest:Kl,isResponse:Ql,isHeaders:Jl,isUndefined:Al,isDate:Bl,isFile:$l,isBlob:Vl,isRegExp:ru,isFunction:jl,isStream:e=>Ml(e)&&jl(e.pipe),isURLSearchParams:ql,isTypedArray:eu,isFileList:Hl,forEach:Yl,merge:function e(){const{caseless:t,skipUndefined:n}=Zl(this)&&this||{},r={},o=(o,i)=>{const a=t&&Gl(r,i)||i;Ul(r[a])&&Ul(o)?r[a]=e(r[a],o):Ul(o)?r[a]=e({},o):_l(o)?r[a]=o.slice():n&&Al(o)||(r[a]=o)};for(let i=0,a=arguments.length;i<a;i++)arguments[i]&&Yl(arguments[i],o);return r},extend:(e,t,n,{allOwnKeys:r}={})=>(Yl(t,(t,r)=>{n&&jl(t)?e[r]=El(t,n):e[r]=t},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&Tl(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Pl,kindOfTest:Ll,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(_l(e))return e;let t=e.length;if(!Fl(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Ol]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:tu,hasOwnProperty:nu,hasOwnProp:nu,reduceDescriptors:ou,freezeMethods:e=>{ou(e,(t,n)=>{if(jl(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];jl(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return _l(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Gl,global:Xl,isContextDefined:Zl,isSpecCompliantForm:function(e){return!!(e&&jl(e.append)&&"FormData"===e[Nl]&&e[Ol])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Ml(e)){if(t.indexOf(e)>=0)return;if(Il(e))return e;if(!("toJSON"in e)){t[r]=e;const o=_l(e)?[]:{};return Yl(e,(e,t)=>{const i=n(e,r+1);!Al(i)&&(o[t]=i)}),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:iu,isThenable:e=>e&&(Ml(e)||jl(e))&&jl(e.then)&&jl(e.catch),setImmediate:au,asap:du,isIterable:e=>null!=e&&jl(e[Ol])};function pu(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}fu.inherits(pu,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:fu.toJSONObject(this.config),code:this.code,status:this.status}}});const hu=pu.prototype,gu={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{gu[e]={value:e}}),Object.defineProperties(pu,gu),Object.defineProperty(hu,"isAxiosError",{value:!0}),pu.from=(e,t,n,r,o,i)=>{const a=Object.create(hu);fu.toFlatObject(e,a,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const s=e&&e.message?e.message:"Error",l=null==t&&e?e.code:t;return pu.call(a,s,l,n,r,o),e&&null==a.cause&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",i&&Object.assign(a,i),a};function mu(e){return fu.isPlainObject(e)||fu.isArray(e)}function yu(e){return fu.endsWith(e,"[]")?e.slice(0,-2):e}function vu(e,t,n){return e?e.concat(t).map(function(e,t){return e=yu(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const bu=fu.toFlatObject(fu,{},null,function(e){return/^is[A-Z]/.test(e)});function ku(e,t,n){if(!fu.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=fu.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!fu.isUndefined(t[e])})).metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&fu.isSpecCompliantForm(t);if(!fu.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(fu.isDate(e))return e.toISOString();if(fu.isBoolean(e))return e.toString();if(!s&&fu.isBlob(e))throw new pu("Blob is not supported. Use a Buffer instead.");return fu.isArrayBuffer(e)||fu.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let s=e;if(e&&!o&&"object"==typeof e)if(fu.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(fu.isArray(e)&&function(e){return fu.isArray(e)&&!e.some(mu)}(e)||(fu.isFileList(e)||fu.endsWith(n,"[]"))&&(s=fu.toArray(e)))return n=yu(n),s.forEach(function(e,r){!fu.isUndefined(e)&&null!==e&&t.append(!0===a?vu([n],r,i):null===a?n:n+"[]",l(e))}),!1;return!!mu(e)||(t.append(vu(o,n,i),l(e)),!1)}const c=[],d=Object.assign(bu,{defaultVisitor:u,convertValue:l,isVisitable:mu});if(!fu.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!fu.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+r.join("."));c.push(n),fu.forEach(n,function(n,i){!0===(!(fu.isUndefined(n)||null===n)&&o.call(t,n,fu.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])}),c.pop()}}(e),t}function xu(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function wu(e,t){this._pairs=[],e&&ku(e,this,t)}const Su=wu.prototype;function Eu(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Cu(e,t,n){if(!t)return e;const r=n&&n.encode||Eu;fu.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(i=o?o(t,n):fu.isURLSearchParams(t)?t.toString():new wu(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}Su.append=function(e,t){this._pairs.push([e,t])},Su.toString=function(e){const t=e?function(t){return e.call(this,t,xu)}:xu;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class Tu{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){fu.forEach(this.handlers,function(t){null!==t&&e(t)})}}const Ou={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Nu={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:wu,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Pu="undefined"!=typeof window&&"undefined"!=typeof document,Lu="object"==typeof navigator&&navigator||void 0,Ru=Pu&&(!Lu||["ReactNative","NativeScript","NS"].indexOf(Lu.product)<0),_u="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Au=Pu&&window.location.href||"http://localhost",Iu={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Pu,hasStandardBrowserEnv:Ru,hasStandardBrowserWebWorkerEnv:_u,navigator:Lu,origin:Au},Symbol.toStringTag,{value:"Module"})),...Nu};function Du(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&fu.isArray(r)?r.length:i,s)return fu.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a;r[i]&&fu.isObject(r[i])||(r[i]=[]);return t(e,n,r[i],o)&&fu.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!a}if(fu.isFormData(e)&&fu.isFunction(e.entries)){const n={};return fu.forEachEntry(e,(e,r)=>{t(function(e){return fu.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const zu={transitional:Ou,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=fu.isObject(e);o&&fu.isHTMLForm(e)&&(e=new FormData(e));if(fu.isFormData(e))return r?JSON.stringify(Du(e)):e;if(fu.isArrayBuffer(e)||fu.isBuffer(e)||fu.isStream(e)||fu.isFile(e)||fu.isBlob(e)||fu.isReadableStream(e))return e;if(fu.isArrayBufferView(e))return e.buffer;if(fu.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ku(e,new Iu.classes.URLSearchParams,{visitor:function(e,t,n,r){return Iu.isNode&&fu.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=fu.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ku(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(fu.isString(e))try{return(t||JSON.parse)(e),fu.trim(e)}catch(De){if("SyntaxError"!==De.name)throw De}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||zu.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(fu.isResponse(e)||fu.isReadableStream(e))return e;if(e&&fu.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(De){if(n){if("SyntaxError"===De.name)throw pu.from(De,pu.ERR_BAD_RESPONSE,this,null,this.response);throw De}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Iu.classes.FormData,Blob:Iu.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};fu.forEach(["delete","get","head","post","put","patch"],e=>{zu.headers[e]={}});const ju=fu.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Fu=Symbol("internals");function Mu(e){return e&&String(e).trim().toLowerCase()}function Uu(e){return!1===e||null==e?e:fu.isArray(e)?e.map(Uu):String(e)}function Bu(e,t,n,r,o){return fu.isFunction(r)?r.call(this,t,n):(o&&(t=n),fu.isString(t)?fu.isString(r)?-1!==t.indexOf(r):fu.isRegExp(r)?r.test(t):void 0:void 0)}let $u=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=Mu(t);if(!o)throw new Error("header name must be a non-empty string");const i=fu.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Uu(e))}const i=(e,t)=>fu.forEach(e,(e,n)=>o(e,n,t));if(fu.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(fu.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&ju[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(fu.isObject(e)&&fu.isIterable(e)){let n,r,o={};for(const t of e){if(!fu.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?fu.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=Mu(e)){const n=fu.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(fu.isFunction(t))return t.call(this,e,n);if(fu.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Mu(e)){const n=fu.findKey(this,e);return!(!n||void 0===this[n]||t&&!Bu(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=Mu(e)){const o=fu.findKey(n,e);!o||t&&!Bu(0,n[o],o,t)||(delete n[o],r=!0)}}return fu.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!Bu(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return fu.forEach(this,(r,o)=>{const i=fu.findKey(n,o);if(i)return t[i]=Uu(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();a!==o&&delete t[o],t[a]=Uu(r),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return fu.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&fu.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[Fu]=this[Fu]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Mu(e);t[r]||(!function(e,t){const n=fu.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return fu.isArray(e)?e.forEach(r):r(e),this}};function Vu(e,t){const n=this||zu,r=t||n,o=$u.from(r.headers);let i=r.data;return fu.forEach(e,function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Hu(e){return!(!e||!e.__CANCEL__)}function qu(e,t,n){pu.call(this,null==e?"canceled":e,pu.ERR_CANCELED,t,n),this.name="CanceledError"}function Wu(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new pu("Request failed with status code "+n.status,[pu.ERR_BAD_REQUEST,pu.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}$u.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),fu.reduceDescriptors($u.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),fu.freezeMethods($u),fu.inherits(qu,pu,{__CANCEL__:!0});const Ku=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),u=r[a];o||(o=l),n[i]=s,r[i]=l;let c=a,d=0;for(;c!==i;)d+=n[c++],c%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o<t)return;const f=u&&l-u;return f?Math.round(1e3*d/f):void 0}}(50,250);return function(e,t){let n,r,o=0,i=1e3/t;const a=(t,i=Date.now())=>{o=i,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?a(e,t):(n=e,r||(r=setTimeout(()=>{r=null,a(n)},i-s)))},()=>n&&a(n)]}(n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,s=i-r,l=o(s);r=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&i<=a?(a-i)/l:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})},n)},Qu=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ju=e=>(...t)=>fu.asap(()=>e(...t)),Yu=Iu.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Iu.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Iu.origin),Iu.navigator&&/(msie|trident)/i.test(Iu.navigator.userAgent)):()=>!0,Gu=Iu.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];fu.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),fu.isString(r)&&a.push("path="+r),fu.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Xu(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Zu=e=>e instanceof $u?{...e}:e;function ec(e,t){t=t||{};const n={};function r(e,t,n,r){return fu.isPlainObject(e)&&fu.isPlainObject(t)?fu.merge.call({caseless:r},e,t):fu.isPlainObject(t)?fu.merge({},t):fu.isArray(t)?t.slice():t}function o(e,t,n,o){return fu.isUndefined(t)?fu.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!fu.isUndefined(t))return r(void 0,t)}function a(e,t){return fu.isUndefined(t)?fu.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,n)=>o(Zu(e),Zu(t),0,!0)};return fu.forEach(Object.keys({...e,...t}),function(r){const i=l[r]||o,a=i(e[r],t[r],r);fu.isUndefined(a)&&i!==s||(n[r]=a)}),n}const tc=e=>{const t=ec({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;if(t.headers=a=$u.from(a),t.url=Cu(Xu(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),fu.isFormData(n))if(Iu.hasStandardBrowserEnv||Iu.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(fu.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&a.set(e,n)})}if(Iu.hasStandardBrowserEnv&&(r&&fu.isFunction(r)&&(r=r(t)),r||!1!==r&&Yu(t.url))){const e=o&&i&&Gu.read(i);e&&a.set(o,e)}return t},nc="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=tc(e);let o=r.data;const i=$u.from(r.headers).normalize();let a,s,l,u,c,{responseType:d,onUploadProgress:f,onDownloadProgress:p}=r;function h(){u&&u(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let g=new XMLHttpRequest;function m(){if(!g)return;const r=$u.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());Wu(function(e){t(e),h()},function(e){n(e),h()},{data:d&&"text"!==d&&"json"!==d?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:e,request:g}),g=null}g.open(r.method.toUpperCase(),r.url,!0),g.timeout=r.timeout,"onloadend"in g?g.onloadend=m:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(m)},g.onabort=function(){g&&(n(new pu("Request aborted",pu.ECONNABORTED,e,g)),g=null)},g.onerror=function(t){const r=new pu(t&&t.message?t.message:"Network Error",pu.ERR_NETWORK,e,g);r.event=t||null,n(r),g=null},g.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||Ou;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new pu(t,o.clarifyTimeoutError?pu.ETIMEDOUT:pu.ECONNABORTED,e,g)),g=null},void 0===o&&i.setContentType(null),"setRequestHeader"in g&&fu.forEach(i.toJSON(),function(e,t){g.setRequestHeader(t,e)}),fu.isUndefined(r.withCredentials)||(g.withCredentials=!!r.withCredentials),d&&"json"!==d&&(g.responseType=r.responseType),p&&([l,c]=Ku(p,!0),g.addEventListener("progress",l)),f&&g.upload&&([s,u]=Ku(f),g.upload.addEventListener("progress",s),g.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(a=t=>{g&&(n(!t||t.type?new qu(null,e,g):t),g.abort(),g=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const y=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);y&&-1===Iu.protocols.indexOf(y)?n(new pu("Unsupported protocol "+y+":",pu.ERR_BAD_REQUEST,e)):g.send(o||null)})},rc=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof pu?t:new qu(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new pu(`timeout ${t} of ms exceeded`,pu.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:s}=r;return s.unsubscribe=()=>fu.asap(a),s}},oc=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},ic=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},ac=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of ic(e))yield*oc(n,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return s(),void e.close();let i=r.byteLength;if(n){let e=a+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(t){throw s(t),t}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},{isFunction:sc}=fu,lc=(({Request:e,Response:t})=>({Request:e,Response:t}))(fu.global),{ReadableStream:uc,TextEncoder:cc}=fu.global,dc=(e,...t)=>{try{return!!e(...t)}catch(De){return!1}},fc=e=>{e=fu.merge.call({skipUndefined:!0},lc,e);const{fetch:t,Request:n,Response:r}=e,o=t?sc(t):"function"==typeof fetch,i=sc(n),a=sc(r);if(!o)return!1;const s=o&&sc(uc),l=o&&("function"==typeof cc?(e=>t=>e.encode(t))(new cc):async e=>new Uint8Array(await new n(e).arrayBuffer())),u=i&&s&&dc(()=>{let e=!1;const t=new n(Iu.origin,{body:new uc,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),c=a&&s&&dc(()=>fu.isReadableStream(new r("").body)),d={stream:c&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!d[e]&&(d[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new pu(`Response type '${e}' is not supported`,pu.ERR_NOT_SUPPORT,n)})});const f=async(e,t)=>{const r=fu.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(fu.isBlob(e))return e.size;if(fu.isSpecCompliantForm(e)){const t=new n(Iu.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return fu.isArrayBufferView(e)||fu.isArrayBuffer(e)?e.byteLength:(fu.isURLSearchParams(e)&&(e+=""),fu.isString(e)?(await l(e)).byteLength:void 0)})(t):r};return async e=>{let{url:o,method:a,data:s,signal:l,cancelToken:p,timeout:h,onDownloadProgress:g,onUploadProgress:m,responseType:y,headers:v,withCredentials:b="same-origin",fetchOptions:k}=tc(e),x=t||fetch;y=y?(y+"").toLowerCase():"text";let w=rc([l,p&&p.toAbortSignal()],h),S=null;const E=w&&w.unsubscribe&&(()=>{w.unsubscribe()});let C;try{if(m&&u&&"get"!==a&&"head"!==a&&0!==(C=await f(v,s))){let e,t=new n(o,{method:"POST",body:s,duplex:"half"});if(fu.isFormData(s)&&(e=t.headers.get("content-type"))&&v.setContentType(e),t.body){const[e,n]=Qu(C,Ku(Ju(m)));s=ac(t.body,65536,e,n)}}fu.isString(b)||(b=b?"include":"omit");const t=i&&"credentials"in n.prototype,l={...k,signal:w,method:a.toUpperCase(),headers:v.normalize().toJSON(),body:s,duplex:"half",credentials:t?b:void 0};S=i&&new n(o,l);let p=await(i?x(S,k):x(o,l));const h=c&&("stream"===y||"response"===y);if(c&&(g||h&&E)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=p[t]});const t=fu.toFiniteNumber(p.headers.get("content-length")),[n,o]=g&&Qu(t,Ku(Ju(g),!0))||[];p=new r(ac(p.body,65536,n,()=>{o&&o(),E&&E()}),e)}y=y||"text";let T=await d[fu.findKey(d,y)||"text"](p,e);return!h&&E&&E(),await new Promise((t,n)=>{Wu(t,n,{data:T,headers:$u.from(p.headers),status:p.status,statusText:p.statusText,config:e,request:S})})}catch(T){if(E&&E(),T&&"TypeError"===T.name&&/Load failed|fetch/i.test(T.message))throw Object.assign(new pu("Network Error",pu.ERR_NETWORK,e,S),{cause:T.cause||T});throw pu.from(T,T&&T.code,e,S)}}},pc=new Map,hc=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:o}=t,i=[r,o,n];let a,s,l=i.length,u=pc;for(;l--;)a=i[l],s=u.get(a),void 0===s&&u.set(a,s=l?new Map:fc(t)),u=s;return s};hc();const gc={http:null,xhr:nc,fetch:{get:hc}};fu.forEach(gc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(De){}Object.defineProperty(e,"adapterName",{value:t})}});const mc=e=>`- ${e}`,yc=e=>fu.isFunction(e)||null===e||!1===e,vc=(e,t)=>{e=fu.isArray(e)?e:[e];const{length:n}=e;let r,o;const i={};for(let a=0;a<n;a++){let n;if(r=e[a],o=r,!yc(r)&&(o=gc[(n=String(r)).toLowerCase()],void 0===o))throw new pu(`Unknown adapter '${n}'`);if(o&&(fu.isFunction(o)||(o=o.get(t))))break;i[n||"#"+a]=o}if(!o){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new pu("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(mc).join("\n"):" "+mc(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o};function bc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new qu(null,e)}function kc(e){bc(e),e.headers=$u.from(e.headers),e.data=Vu.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return vc(e.adapter||zu.adapter,e)(e).then(function(t){return bc(e),t.data=Vu.call(e,e.transformResponse,t),t.headers=$u.from(t.headers),t},function(t){return Hu(t)||(bc(e),t&&t.response&&(t.response.data=Vu.call(e,e.transformResponse,t.response),t.response.headers=$u.from(t.response.headers))),Promise.reject(t)})}const xc="1.12.2",wc={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{wc[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Sc={};wc.transitional=function(e,t,n){return(r,o,i)=>{if(!1===e)throw new pu(function(e,t){return"[Axios v"+xc+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}(o," has been removed"+(t?" in "+t:"")),pu.ERR_DEPRECATED);return t&&!Sc[o]&&(Sc[o]=!0),!e||e(r,o,i)}},wc.spelling=function(e){return(e,t)=>!0};const Ec={assertOptions:function(e,t,n){if("object"!=typeof e)throw new pu("options must be an object",pu.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const t=e[i],n=void 0===t||a(t,i,e);if(!0!==n)throw new pu("option "+i+" must be "+n,pu.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new pu("Unknown option "+i,pu.ERR_BAD_OPTION)}},validators:wc},Cc=Ec.validators;let Tc=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Tu,response:new Tu}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{n.stack?t&&!String(n.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+t):n.stack=t}catch(De){}}throw n}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=ec(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&Ec.assertOptions(n,{silentJSONParsing:Cc.transitional(Cc.boolean),forcedJSONParsing:Cc.transitional(Cc.boolean),clarifyTimeoutError:Cc.transitional(Cc.boolean)},!1),null!=r&&(fu.isFunction(r)?t.paramsSerializer={serialize:r}:Ec.assertOptions(r,{encode:Cc.function,serialize:Cc.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Ec.assertOptions(t,{baseUrl:Cc.spelling("baseURL"),withXsrfToken:Cc.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&fu.merge(o.common,o[t.method]);o&&fu.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=$u.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))});const l=[];let u;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let c,d=0;if(!s){const e=[kc.bind(this),void 0];for(e.unshift(...a),e.push(...l),c=e.length,u=Promise.resolve(t);d<c;)u=u.then(e[d++],e[d++]);return u}c=a.length;let f=t;for(;d<c;){const e=a[d++],t=a[d++];try{f=e(f)}catch(p){t.call(this,p);break}}try{u=kc.call(this,f)}catch(p){return Promise.reject(p)}for(d=0,c=l.length;d<c;)u=u.then(l[d++],l[d++]);return u}getUri(e){return Cu(Xu((e=ec(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};fu.forEach(["delete","get","head","options"],function(e){Tc.prototype[e]=function(t,n){return this.request(ec(n||{},{method:e,url:t,data:(n||{}).data}))}}),fu.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,o){return this.request(ec(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Tc.prototype[e]=t(),Tc.prototype[e+"Form"]=t(!0)});const Oc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Oc).forEach(([e,t])=>{Oc[t]=e});const Nc=function e(t){const n=new Tc(t),r=El(Tc.prototype.request,n);return fu.extend(r,Tc.prototype,n,{allOwnKeys:!0}),fu.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(ec(t,n))},r}(zu);Nc.Axios=Tc,Nc.CanceledError=qu,Nc.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new qu(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},Nc.isCancel=Hu,Nc.VERSION=xc,Nc.toFormData=ku,Nc.AxiosError=pu,Nc.Cancel=Nc.CanceledError,Nc.all=function(e){return Promise.all(e)},Nc.spread=function(e){return function(t){return e.apply(null,t)}},Nc.isAxiosError=function(e){return fu.isObject(e)&&!0===e.isAxiosError},Nc.mergeConfig=ec,Nc.AxiosHeaders=$u,Nc.formToJSON=e=>Du(fu.isHTMLForm(e)?new FormData(e):e),Nc.getAdapter=vc,Nc.HttpStatusCode=Oc,Nc.default=Nc;const{Axios:Pc,AxiosError:Lc,CanceledError:Rc,isCancel:_c,CancelToken:Ac,VERSION:Ic,all:Dc,Cancel:zc,isAxiosError:jc,spread:Fc,toFormData:Mc,AxiosHeaders:Uc,HttpStatusCode:Bc,formToJSON:$c,getAdapter:Vc,mergeConfig:Hc}=Nc;class qc{constructor(e,t){this.licenseToken=t,this.sessionToken=this._getOrCreateSessionToken(t),this.api=Nc.create({baseURL:e||Bs,timeout:el,headers:{"Content-Type":"application/json"}}),this.api.interceptors.request.use(e=>(this.licenseToken&&(e.headers.Authorization=`Bearer ${this.licenseToken}`),e))}_generateSessionToken(){return"session_"+Array.from(crypto.getRandomValues(new Uint8Array(28))).map(e=>e.toString(16).padStart(2,"0")).join("")}_getStorageKey(e){return`tiagpc_session_${e.substring(0,16)}`}_getOrCreateSessionToken(e){const t=this._getStorageKey(e);try{const e=localStorage.getItem(t);if(e){const{sessionToken:n,timestamp:r,validated:o}=JSON.parse(e),i=Date.now();if(o&&i-r<864e5)return n;localStorage.removeItem(t)}}catch(n){}return this._generateSessionToken()}hasValidCachedSession(){const e=this._getStorageKey(this.licenseToken);try{const t=localStorage.getItem(e);if(t){const{sessionToken:e,timestamp:n,validated:r}=JSON.parse(t),o=Date.now();return r&&o-n<864e5}}catch(t){}return!1}_saveSessionToken(e,t,n=!1){const r=this._getStorageKey(e);try{const e={sessionToken:t,timestamp:Date.now(),validated:n};localStorage.setItem(r,JSON.stringify(e))}catch(o){}}_clearSessionToken(e){const t=this._getStorageKey(e);try{localStorage.removeItem(t)}catch(n){}}async sendMessage(e,t,n){if(!this.licenseToken)throw new Error("License token is required.");const r=this.hasValidCachedSession();if(!t&&!r)throw new Error("Turnstile token is required for anti-bot validation.");const o=`${this.api.defaults.baseURL}/ask`;try{const r=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.licenseToken}`},body:JSON.stringify({message:e,turnstile_token:t||"CACHED_SESSION",session_token:this.sessionToken})});if(!r.ok){const e=await r.json().catch(()=>({}));throw new Error(JSON.stringify({statusCode:r.status,errorCode:e.error_code||"UNKNOWN_ERROR",message:e.message||"Request failed",retryAfter:e.retry_after_seconds||null}))}const a=r.body.getReader(),s=new TextDecoder;let l="",u="",c=null,d=null;for(;;){const{done:e,value:t}=await a.read();if(e)break;l+=s.decode(t,{stream:!0});const r=l.split("\n");l=r.pop();for(const o of r){if(!o.trim()||!o.startsWith("data: "))continue;const e=o.replace("data: ","").trim();if("[DONE]"!==e)try{const t=JSON.parse(e);if("content"===t.type)u+=t.text,n&&n(t.text);else if("metadata"===t.type)c=t;else if("summary"===t.type)d=t;else if("error"===t.type)throw new Error(JSON.stringify({statusCode:t.status_code||500,errorCode:t.error_code,message:t.message,retryAfter:null}))}catch(i){if(i.message&&i.message.startsWith("{"))throw i}}}if(!d)throw new Error("No summary received from server");return{success:!0,data:{message_id:d.message_id,response:u,cost_usd:d.cost_usd,credit_balance_usd:d.credit_balance_usd,input_tokens:d.input_tokens,output_tokens:d.output_tokens,response_time_ms:d.response_time_ms,model_used:d.model_used,created_at:d.created_at}}}catch(a){if(a.message.startsWith("{"))throw a;throw new Error(JSON.stringify({statusCode:500,errorCode:"NETWORK_ERROR",message:a.message,retryAfter:null}))}}async transcribeAudio(e){if(!this.licenseToken)throw new Error("License token is required.");try{const t=new FormData;t.append("file",e,"audio.webm");return(await this.api.post("/transcribe",t,{headers:{"Content-Type":"multipart/form-data"}})).data}catch(t){this._handleError(t)}}async releaseSession(){if(this.licenseToken)try{return(await this.api.post("/release-session",{session_token:this.sessionToken})).data}catch(e){}}async getInitConfig(){if(!this.licenseToken)throw new Error("License token is required.");try{return(await this.api.get("/init")).data}catch(e){this._handleError(e)}}async checkHealth(){try{return(await this.api.get("/health")).data}catch(e){return{status:"unhealthy",error:e.message}}}getSessionToken(){return this.sessionToken}renewSessionToken(){const e=this._generateSessionToken();this.sessionToken=e,this._saveSessionToken(this.licenseToken,e)}validateSession(){this._saveSessionToken(this.licenseToken,this.sessionToken,!0)}_handleError(e){if(e.response){const t=e.response.data,n={statusCode:e.response.status,errorCode:t.error_code||"UNKNOWN_ERROR",message:t.message||"Request failed",retryAfter:t.retry_after_seconds||null};throw new Error(JSON.stringify(n))}throw e.request?new Error(JSON.stringify({statusCode:503,errorCode:"NETWORK_ERROR",message:"No response from server",retryAfter:null})):new Error(JSON.stringify({statusCode:500,errorCode:"INTERNAL_ERROR",message:e.message,retryAfter:null}))}}const Wc=e=>"string"==typeof e,Kc=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},Qc=e=>null==e?"":""+e,Jc=/###/g,Yc=e=>e&&e.indexOf("###")>-1?e.replace(Jc,"."):e,Gc=e=>!e||Wc(e),Xc=(e,t,n)=>{const r=Wc(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(Gc(e))return{};const t=Yc(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return Gc(e)?{}:{obj:e,k:Yc(r[o])}},Zc=(e,t,n)=>{const{obj:r,k:o}=Xc(e,t,Object);if(void 0!==r||1===t.length)return void(r[o]=n);let i=t[t.length-1],a=t.slice(0,t.length-1),s=Xc(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=Xc(e,a,Object),s?.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},ed=(e,t)=>{const{obj:n,k:r}=Xc(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},td=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?Wc(e[r])||e[r]instanceof String||Wc(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):td(e[r],t[r],n):e[r]=t[r]);return e},nd=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var rd={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const od=e=>Wc(e)?e.replace(/[&<>"'\/]/g,e=>rd[e]):e;const id=[" ",",","?","!",";"],ad=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),sd=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const r=t.split(n);let o=e;for(let i=0;i<r.length;){if(!o||"object"!=typeof o)return;let e,t="";for(let a=i;a<r.length;++a)if(a!==i&&(t+=n),t+=r[a],e=o[t],void 0!==e){if(["string","number","boolean"].indexOf(typeof e)>-1&&a<r.length-1)continue;i+=a-i+1;break}o=e}return o},ld=e=>e?.replace("_","-"),ud={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){}};class cd{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||ud,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(Wc(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new cd(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new cd(this.logger,e)}}var dd=new cd;class fd{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e,...t){if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(([n,r])=>{for(let o=0;o<r;o++)n.apply(n,[e,...t])})}}}class pd extends fd{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):Wc(n)&&o?a.push(...n.split(o)):a.push(n)));const s=ed(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&i&&Wc(n)?sd(this.data?.[e]?.[t],n,o):s}addResource(e,t,n,r,o={silent:!1}){const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),Zc(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(const o in n)(Wc(n[o])||Array.isArray(n[o]))&&this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,o,i={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=ed(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?td(s,n,o):s={...s,...n},Zc(this.data,a,s),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var hd={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,o)??t}),t}};const gd=Symbol("i18next/PATH_KEY");function md(e,t){const{[gd]:n}=e(function(){const e=[],t=Object.create(null);let n;return t.get=(r,o)=>(n?.revoke?.(),o===gd?e:(e.push(o),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}());return n.join(t?.keySeparator??".")}const yd={},vd=e=>!Wc(e)&&"boolean"!=typeof e&&"number"!=typeof e;class bd extends fd{constructor(e,t={}){super(),((e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=dd.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(null==e)return!1;const r=this.resolve(e,n);if(void 0===r?.res)return!1;const o=vd(r.res);return!1!==n.returnObjects||!o}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=id.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;const o=ad.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,n,r));if(i&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:Wc(o)?[o]:o};const i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return{key:e,namespaces:Wc(o)?[o]:o}}translate(e,t,n){let r="object"==typeof t?{...t}:t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof r&&(r={...r}),r||(r={}),null==e)return"";"function"==typeof e&&(e=md(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]);const o=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],r),l=s[s.length-1];let u=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===u&&(u=":");const c=r.lng||this.language,d=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===c?.toLowerCase())return d?o?{res:`${l}${u}${a}`,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${u}${a}`:o?{res:a,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:a;const f=this.resolve(e,r);let p=f?.res;const h=f?.usedKey||a,g=f?.exactUsedKey||a,m=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,v=void 0!==r.count&&!Wc(r.count),b=bd.hasDefaultValue(r),k=v?this.pluralResolver.getSuffix(c,r.count,r):"",x=r.ordinal&&v?this.pluralResolver.getSuffix(c,r.count,{ordinal:!1}):"",w=v&&!r.ordinal&&0===r.count,S=w&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${k}`]||r[`defaultValue${x}`]||r.defaultValue;let E=p;y&&!p&&b&&(E=S);const C=vd(E),T=Object.prototype.toString.apply(E);if(!(y&&E&&C&&["[object Number]","[object Function]","[object RegExp]"].indexOf(T)<0)||Wc(m)&&Array.isArray(E))if(y&&Wc(m)&&Array.isArray(p))p=p.join(m),p&&(p=this.extendTranslation(p,e,r,n));else{let t=!1,o=!1;!this.isValidLookup(p)&&b&&(t=!0,p=S),this.isValidLookup(p)||(o=!0,p=a);const s=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:p,d=b&&S!==p&&this.options.updateMissing;if(o||t||d){if(this.logger.log(d?"updateKey":"missingKey",c,l,a,d?S:p),i){const e=this.resolve(a,{...r,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let r=0;r<t.length;r++)e.push(t[r]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(r.lng||this.language):e.push(r.lng||this.language);const n=(e,t,n)=>{const o=b&&n!==p?n:s;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,o,d,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,o,d,r),this.emit("missingKey",e,l,t,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&v?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,r);w&&r[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],a+t,r[`defaultValue${t}`]||S)})}):n(e,a,S))}p=this.extendTranslation(p,e,r,f,n),o&&p===a&&this.options.appendNamespaceToMissingKey&&(p=`${l}${u}${a}`),(o||t)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${a}`:a,t?p:void 0,r))}else{if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...r,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(f.res=e,f.usedParams=this.getUsedParamsDetails(r),f):e}if(i){const e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(const o in E)if(Object.prototype.hasOwnProperty.call(E,o)){const e=`${n}${i}${o}`;t[o]=b&&!p?this.translate(e,{...r,defaultValue:vd(S)?S[o]:void 0,joinArrays:!1,ns:s}):this.translate(e,{...r,joinArrays:!1,ns:s}),t[o]===e&&(t[o]=E[o])}p=t}}return o?(f.res=p,f.usedParams=this.getUsedParamsDetails(r),f):p}extendTranslation(e,t,n,r,o){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const i=Wc(e)&&(void 0!==n?.interpolation?.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(i){const t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let s=n.replace&&!Wc(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),i){const t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>o?.[0]!==e[0]||n.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),n)),n.interpolation&&this.interpolator.reset()}const i=n.postProcess||this.options.postProcess,a=Wc(i)?[i]:i;return null!=e&&a?.length&&!1!==n.applyPostProcessor&&(e=hd.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,o,i,a;return Wc(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(n))return;const s=this.extractFromKey(e,t),l=s.key;r=l;let u=s.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const c=void 0!==t.count&&!Wc(t.count),d=c&&!t.ordinal&&0===t.count,f=void 0!==t.context&&(Wc(t.context)||"number"==typeof t.context)&&""!==t.context,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(e=>{this.isValidLookup(n)||(a=e,yd[`${p[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(a)||(yd[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(r=>{if(this.isValidLookup(n))return;i=r;const a=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(a,l,r,e,t);else{let e;c&&(e=this.pluralResolver.getSuffix(r,t.count,t));const n=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(t.ordinal&&0===e.indexOf(o)&&a.push(l+e.replace(o,this.options.pluralSeparator)),a.push(l+e),d&&a.push(l+n)),f){const r=`${l}${this.options.contextSeparator||"_"}${t.context}`;a.push(r),c&&(t.ordinal&&0===e.indexOf(o)&&a.push(r+e.replace(o,this.options.pluralSeparator)),a.push(r+e),d&&a.push(r+n))}}let s;for(;s=a.pop();)this.isValidLookup(n)||(o=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:o,usedLng:i,usedNS:a}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!Wc(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}class kd{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=dd.create("languageUtils")}getScriptPartFromCode(e){if(!(e=ld(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=ld(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Wc(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(De){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;const r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:e.indexOf("-")>0&&r.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),Wc(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return Wc(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):Wc(e)&&o(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))}),r}}const xd={zero:0,one:1,two:2,few:3,many:4,other:5},wd={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Sd{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=dd.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=ld("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:r});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(n,{type:r})}catch(a){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),wd;if(!e.match(/-|_/))return wd;const n=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(n,t)}return this.pluralRulesCache[o]=i,i}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>xd[e]-xd[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){const r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const Ed=(e,t,n,r=".",o=!0)=>{let i=((e,t,n)=>{const r=ed(e,n);return void 0!==r?r:ed(t,n)})(e,t,n);return!i&&o&&Wc(n)&&(i=sd(e,n,r),void 0===i&&(i=sd(t,n,r))),i},Cd=e=>e.replace(/\$/g,"$$$$");class Td{constructor(e={}){this.logger=dd.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:l,unescapeSuffix:u,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:h,nestingOptionsSeparator:g,maxReplaces:m,alwaysFormat:y}=e.interpolation;this.escape=void 0!==t?t:od,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?nd(o):i||"{{",this.suffix=a?nd(a):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=u?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=d?nd(d):f||nd("$t("),this.nestingSuffix=p?nd(p):h||nd(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==y&&y,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let o,i,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const o=Ed(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(Ed(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:i})};this.resetRegExp();const u=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,c=void 0!==r?.interpolation?.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Cd(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Cd(this.escape(e)):Cd(e)}].forEach(t=>{for(a=0;o=t.regex.exec(e);){const n=o[1].trim();if(i=l(n),void 0===i)if("function"==typeof u){const t=u(e,o,r);i=Wc(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(c){i=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else Wc(i)||this.useRawValueToEscape||(i=Qc(i));const s=t.safeValue(i);if(e=e.replace(o[0],s),c?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,o,i;const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let o=`{${r[1]}`;e=r[0],o=this.interpolate(o,i);const a=o.match(/'/g),s=o.match(/"/g);((a?.length??0)%2==0&&!s||s.length%2!=0)&&(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i={...t,...i})}catch(De){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,De),`${e}${n}${o}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];i={...n},i=i.replace&&!Wc(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;const l=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==l&&(s=r[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,l)),o=t(a.call(this,r[1].trim(),i),i),o&&r[0]===e&&!Wc(o))return o;Wc(o)||(o=Qc(o)),o||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),o=""),s.length&&(o=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),o.trim())),e=e.replace(r[0],o),this.regexp.lastIndex=0}return e}}const Od=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=r+JSON.stringify(i);let s=t[a];return s||(s=e(ld(r),o),t[a]=s),s(n)}},Nd=e=>(t,n,r)=>e(ld(n),r)(t);class Pd{constructor(e={}){this.logger=dd.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?Od:Nd;this.formats={number:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:n((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Od(t)}format(e,t,n,r={}){const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(e=>e.indexOf(")")>-1)){const e=o.findIndex(e=>e.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}const i=o.reduce((e,t)=>{const{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(e=>{if(e){const[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[o]){let t=e;try{const a=r?.formatParams?.[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[o](e,s,{...i,...r,...a})}catch(a){this.logger.warn(a)}return t}return this.logger.warn(`there was no format function for ${o}`),e},e);return i}}class Ld extends fd{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=dd.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){const o={},i={},a={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,r=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===s[t]&&(s[t]=!0)))}),r||(a[e]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),!t&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:r,k:o}=Xc(e,t,Object);r[o]=r[o]||[],r[o].push(n)})(n.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,o=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*o,i)},o):i(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then(e=>a(null,e)).catch(a):a(null,n)}catch(l){a(l)}}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();Wc(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Wc(t)&&(t=[t]);const o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,(n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)})}saveMissing(e,t,n,r,o,i={},a=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(this.backend?.create){const l={...i,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let o;o=5===u.length?u(e,t,n,r,l):u(e,t,n,r),o&&"function"==typeof o.then?o.then(e=>a(null,e)).catch(a):a(null,o)}catch(s){a(s)}else u(e,t,n,r,a,l)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}else this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const Rd=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),Wc(e[1])&&(t.defaultValue=e[1]),Wc(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),_d=e=>(Wc(e.ns)&&(e.ns=[e.ns]),Wc(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Wc(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),Ad=()=>{};class Id extends fd{constructor(e={},t){var n;if(super(),this.options=_d(e),this.services={},this.logger=dd,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(Wc(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=Rd();this.options={...n,...this.options,..._d(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator);const r=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?dd.init(r(this.modules.logger),this.options):dd.init(null,this.options),e=this.modules.formatter?this.modules.formatter:Pd;const t=new kd(this.options);this.store=new pd(this.options.resources,this.options);const o=this.services;o.logger=dd,o.resourceStore=this.store,o.languageUtils=t,o.pluralResolver=new Sd(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix});this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!e||this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format||(o.formatter=r(e),o.formatter.init&&o.formatter.init(o,this.options),this.options.interpolation.format=o.formatter.format.bind(o.formatter)),o.interpolator=new Td(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new Ld(r(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(o.languageDetector=r(this.modules.languageDetector),o.languageDetector.init&&o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=r(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new bd(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=Ad),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});const o=Kc(),i=()=>{const e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?i():setTimeout(i,0),o}loadResources(e,t=Ad){let n=t;const r=Wc(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===r?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return n();const e=[],t=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};if(r)t(r);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e))}this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){const r=Kc();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=Ad),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&hd.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=Kc();this.emit("languageChanging",e);const r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(o,i)=>{i?this.isLanguageChangingTo===e&&(r(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(o,(...e)=>this.t(...e))},i=t=>{e||t||!this.services.languageDetector||(t=[]);const n=Wc(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(Wc(t)?[t]:t);i&&(this.language||r(i),this.translator.language||this.translator.changeLanguage(i),this.services.languageDetector?.cacheUserLanguage?.(i)),this.loadResources(i,e=>{o(e,i)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),n}getFixedT(e,t,n){const r=(e,t,...o)=>{let i;i="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(o)):{...t},i.lng=i.lng||r.lng,i.lngs=i.lngs||r.lngs,i.ns=i.ns||r.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||r.keyPrefix);const a=this.options.keySeparator||".";let s;return i.keyPrefix&&Array.isArray(e)?s=e.map(e=>("function"==typeof e&&(e=md(e,{...this.options,...t})),`${i.keyPrefix}${a}${e}`)):("function"==typeof e&&(e=md(e,{...this.options,...t})),s=i.keyPrefix?`${i.keyPrefix}${a}${e}`:e),this.t(s,i)};return Wc(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){const n=Kc();return this.options.ns?(Wc(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=Kc();Wc(e)&&(e=[e]);const r=this.options.preload||[],o=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=r.concat(o),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(De){}const t=this.services?.languageUtils||new kd(Rd());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new Id(e,t)}cloneInstance(e={},t=Ad){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new Id(r);void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e));if(["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{});o.store=new pd(e,r),o.services.resourceStore=o.store}return o.translator=new bd(o.services,r),o.translator.on("*",(e,...t)=>{o.emit(e,...t)}),o.init(r,t),o.translator.options=r,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Dd=Id.createInstance();Dd.createInstance=Id.createInstance,Dd.createInstance,Dd.dir,Dd.init,Dd.loadResources,Dd.reloadResources,Dd.use,Dd.changeLanguage,Dd.getFixedT,Dd.t,Dd.exists,Dd.setDefaultNamespace,Dd.hasLoadedNamespace,Dd.loadNamespaces,Dd.loadLanguages;const{slice:zd,forEach:jd}=[];const Fd=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Md={create(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+60*n*1e3)),r&&(o.domain=r),document.cookie=function(e,t){const n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"};let r=`${e}=${encodeURIComponent(t)}`;if(n.maxAge>0){const e=n.maxAge-0;if(Number.isNaN(e))throw new Error("maxAge should be a Number");r+=`; Max-Age=${Math.floor(e)}`}if(n.domain){if(!Fd.test(n.domain))throw new TypeError("option domain is invalid");r+=`; Domain=${n.domain}`}if(n.path){if(!Fd.test(n.path))throw new TypeError("option path is invalid");r+=`; Path=${n.path}`}if(n.expires){if("function"!=typeof n.expires.toUTCString)throw new TypeError("option expires is invalid");r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+="; HttpOnly"),n.secure&&(r+="; Secure"),n.sameSite)switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:r+="; SameSite=Strict";break;case"lax":r+="; SameSite=Lax";break;case"strict":r+="; SameSite=Strict";break;case"none":r+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(r+="; Partitioned"),r}(e,t,o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let e=n[r];for(;" "===e.charAt(0);)e=e.substring(1,e.length);if(0===e.indexOf(t))return e.substring(t.length,e.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var Ud={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&"undefined"!=typeof document)return Md.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:i}=t;n&&"undefined"!=typeof document&&Md.create(n,e,r,o,i)}},Bd={name:"querystring",lookup(e){let t,{lookupQuerystring:n}=e;if("undefined"!=typeof window){let{search:e}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(e=window.location.hash.substring(window.location.hash.indexOf("?")));const r=e.substring(1).split("&");for(let o=0;o<r.length;o++){const e=r[o].indexOf("=");if(e>0){r[o].substring(0,e)===n&&(t=r[o].substring(e+1))}}}return t}},$d={name:"hash",lookup(e){let t,{lookupHash:n,lookupFromHashIndex:r}=e;if("undefined"!=typeof window){const{hash:e}=window.location;if(e&&e.length>2){const o=e.substring(1);if(n){const e=o.split("&");for(let r=0;r<e.length;r++){const o=e[r].indexOf("=");if(o>0){e[r].substring(0,o)===n&&(t=e[r].substring(o+1))}}}if(t)return t;if(!t&&r>-1){const t=e.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(t))return;const n="number"==typeof r?r:0;return t[n]?.replace("/","")}}}return t}};let Vd=null;const Hd=()=>{if(null!==Vd)return Vd;try{if(Vd="undefined"!=typeof window&&null!==window.localStorage,!Vd)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(De){Vd=!1}return Vd};var qd={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&Hd())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&Hd()&&window.localStorage.setItem(n,e)}};let Wd=null;const Kd=()=>{if(null!==Wd)return Wd;try{if(Wd="undefined"!=typeof window&&null!==window.sessionStorage,!Wd)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(De){Wd=!1}return Wd};var Qd={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Kd())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Kd()&&window.sessionStorage.setItem(n,e)}},Jd={name:"navigator",lookup(e){const t=[];if("undefined"!=typeof navigator){const{languages:e,userLanguage:n,language:r}=navigator;if(e)for(let o=0;o<e.length;o++)t.push(e[o]);n&&t.push(n),r&&t.push(r)}return t.length>0?t:void 0}},Yd={name:"htmlTag",lookup(e){let t,{htmlTag:n}=e;const r=n||("undefined"!=typeof document?document.documentElement:null);return r&&"function"==typeof r.getAttribute&&(t=r.getAttribute("lang")),t}},Gd={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if("undefined"==typeof window)return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(n))return;const r="number"==typeof t?t:0;return n[r]?.replace("/","")}},Xd={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n="number"==typeof t?t+1:1,r="undefined"!=typeof window&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let Zd=!1;try{document.cookie,Zd=!0}catch(De){}const ef=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Zd||ef.splice(1,1);class tf{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=function(e){return jd.call(zd.call(arguments,1),t=>{if(t)for(const n in t)void 0===e[n]&&(e[n]=t[n])}),e}(t,this.options||{},{order:ef,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Ud),this.addDetector(Bd),this.addDetector(qd),this.addDetector(Qd),this.addDetector(Jd),this.addDetector(Yd),this.addDetector(Gd),this.addDetector(Xd),this.addDetector($d)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order,t=[];return e.forEach(e=>{if(this.detectors[e]){let n=this.detectors[e].lookup(this.options);n&&"string"==typeof n&&(n=[n]),n&&(t=t.concat(n))}}),t=t.filter(e=>{return null!=e&&!("string"==typeof(t=e)&&[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(e=>e.test(t)));var t}).map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)}))}}tf.type="languageDetector";const nf={widget:{title:"TIA GPC",poweredBy:"Desarrollado por TIA GPC",questionsTo:"Preguntas a"},chat:{title:"Asistente",placeholder:"Escribe tu pregunta...",send:"Enviar",close:"Cerrar",welcome:"¡Hola! Bienvenido a {{companyName}}. ¿En qué puedo ayudarte hoy?",emptyState:"Inicia una conversación escribiendo tu pregunta",validation:"Verificando seguridad...",retry:"Reintentar"},voice:{record:"Grabar audio",recording:"Grabando...",stop:"Detener grabación",processing:"Transcribiendo audio...",error:"Error al transcribir audio",unsupported:"Tu navegador no soporta grabación de audio",permissionDenied:"Permiso de micrófono denegado"},theme:{light:"Claro",dark:"Oscuro",toggle:"Cambiar tema"},errors:{unauthorized:"Autenticación fallida. Por favor, verifica tu token de licencia e intenta nuevamente.",validation:"Verificación anti-bot fallida. Por favor, recarga la página e intenta nuevamente.",network:"No se pudo conectar al servidor. Verifica tu conexión a internet.",rateLimit:"Has realizado demasiadas consultas o se alcanzó el límite de usuarios concurrentes. Por favor, espera un momento antes de continuar.",session:"Tu sesión ha expirado por inactividad. Por favor, recarga la página para continuar.",insufficientCredits:"Créditos insuficientes. Por favor, recarga créditos desde tu panel de administración para continuar usando TIA GPC.",generic:"Ha ocurrido un error inesperado. Por favor, intenta nuevamente.",aiServiceUnavailable:"El asistente está temporalmente no disponible. Por favor, intenta de nuevo en unos momentos.",serverError:"El servidor encontró un problema. Por favor, intenta de nuevo más tarde.",domainUnauthorized:"Este dominio no está autorizado para usar este widget. Por favor, contacta a tu administrador."},turnstile:{verifying:"Verificando que eres humano...",error:"No se pudo completar la verificación de seguridad. Por favor, recarga la página e intenta nuevamente."},metadata:{tokensUsed:"Tokens usados",responseTime:"Tiempo de respuesta",model:"Modelo"}},rf={widget:{title:"TIA GPC",poweredBy:"Powered by TIA GPC",questionsTo:"Questions to"},chat:{title:"Assistant",placeholder:"Type your question...",send:"Send",close:"Close",welcome:"Hello! Welcome to {{companyName}}. How can I help you today?",emptyState:"Start a conversation by typing your question",validation:"Verifying security...",retry:"Retry"},voice:{record:"Record audio",recording:"Recording...",stop:"Stop recording",processing:"Transcribing audio...",error:"Error transcribing audio",unsupported:"Your browser does not support audio recording",permissionDenied:"Microphone permission denied"},theme:{light:"Light",dark:"Dark",toggle:"Toggle theme"},errors:{unauthorized:"Authentication failed. Please check your license token and try again.",validation:"Bot verification failed. Please reload the page and try again.",network:"Unable to connect to the server. Please check your internet connection.",rateLimit:"You've made too many requests or the concurrent user limit has been reached. Please wait a moment before continuing.",session:"Your session has expired due to inactivity. Please reload the page to continue.",insufficientCredits:"Insufficient credits. Please reload credits from your admin panel to continue using TIA GPC.",generic:"An unexpected error has occurred. Please try again.",aiServiceUnavailable:"The assistant is temporarily unavailable. Please try again in a few moments.",serverError:"The server encountered a problem. Please try again later.",domainUnauthorized:"This domain is not authorized to use this widget. Please contact your administrator."},turnstile:{verifying:"Verifying you're human...",error:"Security verification could not be completed. Please reload the page and try again."},metadata:{tokensUsed:"Tokens used",responseTime:"Response time",model:"Model"}},of={widget:{title:"TIA GPC",poweredBy:"Propulsé par TIA GPC",questionsTo:"Questions à"},chat:{title:"Assistant",placeholder:"Tapez votre question...",send:"Envoyer",close:"Fermer",welcome:"Bonjour ! Bienvenue à {{companyName}}. Comment puis-je vous aider aujourd'hui ?",emptyState:"Commencez une conversation en tapant votre question",validation:"Vérification de sécurité...",retry:"Réessayer"},voice:{record:"Enregistrer audio",recording:"Enregistrement...",stop:"Arrêter l'enregistrement",processing:"Transcription audio...",error:"Erreur de transcription audio",unsupported:"Votre navigateur ne prend pas en charge l'enregistrement audio",permissionDenied:"Permission du microphone refusée"},theme:{light:"Clair",dark:"Sombre",toggle:"Changer de thème"},errors:{unauthorized:"Échec de l'authentification. Veuillez vérifier votre jeton de licence et réessayer.",validation:"La vérification anti-bot a échoué. Veuillez recharger la page et réessayer.",network:"Impossible de se connecter au serveur. Veuillez vérifier votre connexion internet.",rateLimit:"Vous avez fait trop de demandes ou la limite d'utilisateurs concurrents a été atteinte. Veuillez patienter un moment avant de continuer.",session:"Votre session a expiré en raison d'inactivité. Veuillez recharger la page pour continuer.",insufficientCredits:"Crédits insuffisants. Veuillez recharger des crédits depuis votre panneau d'administration pour continuer à utiliser TIA GPC.",generic:"Une erreur inattendue s'est produite. Veuillez réessayer.",aiServiceUnavailable:"L'assistant est temporairement indisponible. Veuillez réessayer dans quelques instants.",serverError:"Le serveur a rencontré un problème. Veuillez réessayer plus tard.",domainUnauthorized:"Ce domaine n'est pas autorisé à utiliser ce widget. Veuillez contacter votre administrateur."},turnstile:{verifying:"Vérification que vous êtes humain...",error:"La vérification de sécurité n'a pas pu être complétée. Veuillez recharger la page et réessayer."},metadata:{tokensUsed:"Tokens utilisés",responseTime:"Temps de réponse",model:"Modèle"}};Dd.use(tf).use(M).init({resources:{en:{translation:rf},es:{translation:nf},fr:{translation:of}},fallbackLng:"en",supportedLngs:["en","es","fr"],interpolation:{escapeValue:!1},detection:{order:["localStorage","navigator"],caches:["localStorage"]}});const af=({token:e,turnstileSiteKey:t="0x4AAAAAAB-BKyDZcYYqCbid",theme:n=Ws,position:r=Ks,language:o=Qs,primaryColor:i,width:a=Js,height:s=Ys,apiUrl:u=Bs,onReady:c,onError:d,onClose:f,autoOpen:p=Gs,showBranding:h=Xs,mobileFullscreen:g=Zs,...m})=>{const[y,v]=l.useState(p),[b,k]=l.useState(!1),[x,w]=l.useState(null),[S,E]=l.useState(!0),C=l.useMemo(()=>new qc(u,e),[u,e]);if(l.useEffect(()=>{const e=()=>{k(window.innerWidth<qs)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),l.useEffect(()=>{o&&Dd.changeLanguage&&Dd.changeLanguage(o)},[o]),l.useEffect(()=>{(async()=>{if(e)try{const e=await C.getInitConfig();e.success&&(w(e.data),c&&c(e.data))}catch(t){d&&d(t)}finally{E(!1)}else E(!1)})()},[e,C,c,d]),!e)return null;return O.jsx(H,{i18n:Dd,children:O.jsxs("div",{className:`gpc-widget gpc-widget-container ${b&&g?"gpc-position-bottom-right":`gpc-position-${r}`} ${"dark"===n?"gpc-dark":""}`,style:(()=>{const e={};return i&&(e["--gpc-color-primary"]=i),b&&g||(a&&(e["--gpc-widget-width"]=a),s&&(e["--gpc-widget-height"]=s)),e})(),children:[!y&&O.jsx(se,{onClick:()=>v(!0),widgetConfig:x}),y&&!S&&O.jsx(Sl,{gpcService:C,licenseToken:e,widgetConfig:x,turnstileSiteKey:t,onClose:()=>{v(!1),f?.()},themeMode:n,showBranding:h,showMetadata:m.showMetadata||!1,onError:d})]})})};af.defaultProps={theme:"auto",position:"bottom-right",language:"en",width:"400px",height:"600px",autoOpen:!1,showBranding:!0,mobileFullscreen:!0};class sf extends HTMLElement{constructor(){super(),this.root=null,this.mountPoint=null}static get observedAttributes(){return["token","theme","position","language","primary-color","width","height","api-url","turnstile-site-key","auto-open","show-branding","mobile-fullscreen"]}connectedCallback(){this.mountPoint=document.createElement("div"),this.mountPoint.className="tia-gpc-mount",this.appendChild(this.mountPoint),this.root=E.createRoot(this.mountPoint),this.render()}disconnectedCallback(){this.root&&(this.root.unmount(),this.root=null)}attributeChangedCallback(e,t,n){t!==n&&this.root&&this.render()}getProps(){const e={},t=this.getAttribute("token");t&&(e.token=t);const n=this.getAttribute("theme");n&&(e.theme=n);const r=this.getAttribute("position");r&&(e.position=r);const o=this.getAttribute("language");o&&(e.language=o);const i=this.getAttribute("primary-color");i&&(e.primaryColor=i);const a=this.getAttribute("width");a&&(e.width=a);const s=this.getAttribute("height");s&&(e.height=s);const l=this.getAttribute("api-url");l&&(e.apiUrl=l);const u=this.getAttribute("turnstile-site-key");u&&(e.turnstileSiteKey=u);const c=this.getAttribute("auto-open");null!==c&&(e.autoOpen="false"!==c);const d=this.getAttribute("show-branding");null!==d&&(e.showBranding="false"!==d);const f=this.getAttribute("mobile-fullscreen");return null!==f&&(e.mobileFullscreen="false"!==f),e.onReady=()=>{this.dispatchEvent(new CustomEvent("ready",{bubbles:!0,composed:!0}))},e.onError=e=>{this.dispatchEvent(new CustomEvent("error",{bubbles:!0,composed:!0,detail:e}))},e.onClose=()=>{this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))},e}render(){if(!this.root)return;const e=this.getProps();this.root.render(u.createElement(af,e))}open(){this.dispatchEvent(new CustomEvent("open-widget",{bubbles:!0,composed:!0}))}close(){this.dispatchEvent(new CustomEvent("close-widget",{bubbles:!0,composed:!0}))}}"undefined"==typeof window||customElements.get("tia-gpc-widget")||customElements.define("tia-gpc-widget",sf),window.TiaGPC={version:"1.0.0",POSITIONS:$s,THEMES:Vs,LANGUAGES:Hs,create(e){if(!e||!e.token)throw new Error('TiaGPC.create(): El parámetro "token" es requerido');const t=document.createElement("tia-gpc-widget");t.setAttribute("token",e.token),e.theme&&t.setAttribute("theme",e.theme),e.position&&t.setAttribute("position",e.position),e.language&&t.setAttribute("language",e.language),e.primaryColor&&t.setAttribute("primary-color",e.primaryColor),e.width&&t.setAttribute("width",e.width),e.height&&t.setAttribute("height",e.height),e.apiUrl&&t.setAttribute("api-url",e.apiUrl),e.turnstileSiteKey&&t.setAttribute("turnstile-site-key",e.turnstileSiteKey),void 0!==e.autoOpen&&t.setAttribute("auto-open",String(e.autoOpen)),void 0!==e.showBranding&&t.setAttribute("show-branding",String(e.showBranding)),void 0!==e.mobileFullscreen&&t.setAttribute("mobile-fullscreen",String(e.mobileFullscreen)),e.onReady&&t.addEventListener("ready",e.onReady),e.onError&&t.addEventListener("error",t=>e.onError(t.detail)),e.onClose&&t.addEventListener("close",e.onClose);return(e.container||document.body).appendChild(t),t},info(){return{version:this.version,positions:this.POSITIONS,themes:this.THEMES,languages:this.LANGUAGES}}};const lf=window.TiaGPC;return e.TiaGPCWebComponent=sf,e.default=lf,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),e}({});
205
+ `,ft=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:o,toasterId:i,containerStyle:a,containerClassName:s})=>{let{toasts:u,handlers:c}=He(n,i);return l.createElement("div",{"data-rht-toaster":i||"",style:{position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none",...a},className:s,onMouseEnter:c.startPause,onMouseLeave:c.endPause},u.map(n=>{let i=n.position||t,a=((e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},o=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Oe()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...o}})(i,c.calculateOffset(n,{reverseOrder:e,gutter:r,defaultPosition:t}));return l.createElement(ct,{id:n.id,key:n.id,onHeightUpdate:c.updateHeight,className:n.visible?dt:"",style:a},"custom"===n.type?Te(n.message,n):o?o(n):l.createElement(ut,{toast:n,position:i}))}))},pt=Fe;const ht=({theme:e,onToggle:t})=>{const{t:n}=V();return N.jsx("button",{onClick:t,className:"gpc-header-button gpc-focus-visible gpc-transition","aria-label":n("theme.toggle"),title:n("theme.toggle"),children:"light"===e?N.jsx(ae,{className:"gpc-icon"}):N.jsx(ue,{className:"gpc-icon"})})},gt=()=>{const{i18n:e,t:t}=V(),n=[{code:"en",label:t("languages.english"),flag:"🇬🇧"},{code:"es",label:t("languages.spanish"),flag:"🇪🇸"},{code:"fr",label:t("languages.french"),flag:"🇫🇷"}],[r,o]=l.useState(!1),i=l.useRef(null),a=n.find(t=>t.code===e.language)||n[0];return l.useEffect(()=>{const e=e=>{i.current&&!i.current.contains(e.target)&&o(!1)};return r&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[r]),N.jsxs("div",{className:"gpc-language-selector",ref:i,children:[N.jsx("button",{onClick:()=>o(!r),className:"gpc-header-button gpc-focus-visible gpc-transition","aria-label":t("ui.languageSelector.label"),title:t("ui.languageSelector.label"),children:N.jsx(te,{className:"gpc-icon"})}),r&&N.jsx("div",{className:"gpc-language-dropdown",children:n.map(t=>N.jsxs("button",{onClick:()=>{return n=t.code,e.changeLanguage(n),void o(!1);var n},className:"gpc-language-option "+(t.code===a.code?"gpc-language-option-active":""),children:[N.jsx("span",{className:"gpc-language-flag",children:t.flag}),N.jsx("span",{className:"gpc-language-label",children:t.label})]},t.code))})]})},mt=({onClose:e,theme:t,onToggleTheme:n,showBranding:r=!0,widgetConfig:o=null,onToggleConversations:i,showConversations:a=!1,conversationsCount:s=0})=>{const{t:l}=V(),u=o?.widget_customization?.branding?.company_name||l("widget.title"),c=o?.widget_customization?.branding?.custom_title,d=o?.widget_customization?.branding?.company_logo_base64,f=c||u,p=d?.startsWith("data:")?d:d?`data:image/png;base64,${d}`:null,h=o?.widget_customization?.colors?.header_background,g=o?.widget_customization?.colors?.header_text,m={};return h&&(m.backgroundColor=h),g&&(m.color=g),N.jsxs("div",{className:"gpc-chat-header",style:m,children:[N.jsxs("div",{className:"gpc-header-content",children:[p&&N.jsx("div",{className:"gpc-header-logo",children:N.jsx("img",{src:p,alt:u,className:"gpc-company-logo"})}),N.jsx("div",{className:"gpc-header-text",children:N.jsx("h2",{className:"gpc-header-title",style:g?{color:g}:{},children:f})})]}),N.jsxs("div",{className:"gpc-header-actions",children:[N.jsx(gt,{}),i&&N.jsxs("button",{onClick:i,className:"gpc-header-button gpc-focus-visible gpc-transition relative "+(a?"bg-blue-500 text-white":""),"aria-label":l("conversations.toggle","Toggle conversations"),title:l("conversations.toggle","Toggle conversations"),children:[N.jsx(re,{className:"gpc-icon",size:20}),s>0&&N.jsx("span",{className:"absolute -top-1 -right-1 bg-red-500 text-white text-xs rounded-full w-4 h-4 flex items-center justify-center",children:s>9?"9+":s})]}),N.jsx(ht,{theme:t,onToggle:n}),N.jsx("button",{onClick:e,className:"gpc-header-button gpc-focus-visible gpc-transition","aria-label":l("chat.close"),title:l("chat.close"),children:N.jsx(X,{className:"gpc-icon"})})]})]})};function yt(){}function vt(){}const bt=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,kt=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wt={};function xt(e,t){return(wt.jsx?kt:bt).test(e)}const St=/[ \t\n\f\r]/g;function Ct(e){return""===e.replace(St,"")}class Et{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function Tt(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Et(n,r,t)}function Nt(e){return e.toLowerCase()}Et.prototype.normal={},Et.prototype.property={},Et.prototype.space=void 0;class Ot{constructor(e,t){this.attribute=t,this.property=e}}Ot.prototype.attribute="",Ot.prototype.booleanish=!1,Ot.prototype.boolean=!1,Ot.prototype.commaOrSpaceSeparated=!1,Ot.prototype.commaSeparated=!1,Ot.prototype.defined=!1,Ot.prototype.mustUseProperty=!1,Ot.prototype.number=!1,Ot.prototype.overloadedBoolean=!1,Ot.prototype.property="",Ot.prototype.spaceSeparated=!1,Ot.prototype.space=void 0;let Lt=0;const Pt=zt(),_t=zt(),Rt=zt(),At=zt(),It=zt(),jt=zt(),Dt=zt();function zt(){return 2**++Lt}const Mt=Object.freeze(Object.defineProperty({__proto__:null,boolean:Pt,booleanish:_t,commaOrSpaceSeparated:Dt,commaSeparated:jt,number:At,overloadedBoolean:Rt,spaceSeparated:It},Symbol.toStringTag,{value:"Module"})),Ft=Object.keys(Mt);class Ut extends Ot{constructor(e,t,n,r){let o=-1;if(super(e,t),Bt(this,"space",r),"number"==typeof n)for(;++o<Ft.length;){const e=Ft[o];Bt(this,Ft[o],(n&Mt[e])===Mt[e])}}}function Bt(e,t,n){n&&(e[t]=n)}function $t(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const i=new Ut(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Nt(r)]=r,n[Nt(i.attribute)]=r}return new Et(t,n,e.space)}Ut.prototype.defined=!0;const Vt=$t({properties:{ariaActiveDescendant:null,ariaAtomic:_t,ariaAutoComplete:null,ariaBusy:_t,ariaChecked:_t,ariaColCount:At,ariaColIndex:At,ariaColSpan:At,ariaControls:It,ariaCurrent:null,ariaDescribedBy:It,ariaDetails:null,ariaDisabled:_t,ariaDropEffect:It,ariaErrorMessage:null,ariaExpanded:_t,ariaFlowTo:It,ariaGrabbed:_t,ariaHasPopup:null,ariaHidden:_t,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:It,ariaLevel:At,ariaLive:null,ariaModal:_t,ariaMultiLine:_t,ariaMultiSelectable:_t,ariaOrientation:null,ariaOwns:It,ariaPlaceholder:null,ariaPosInSet:At,ariaPressed:_t,ariaReadOnly:_t,ariaRelevant:null,ariaRequired:_t,ariaRoleDescription:It,ariaRowCount:At,ariaRowIndex:At,ariaRowSpan:At,ariaSelected:_t,ariaSetSize:At,ariaSort:null,ariaValueMax:At,ariaValueMin:At,ariaValueNow:At,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function Ht(e,t){return t in e?e[t]:t}function qt(e,t){return Ht(e,t.toLowerCase())}const Wt=$t({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:jt,acceptCharset:It,accessKey:It,action:null,allow:null,allowFullScreen:Pt,allowPaymentRequest:Pt,allowUserMedia:Pt,alt:null,as:null,async:Pt,autoCapitalize:null,autoComplete:It,autoFocus:Pt,autoPlay:Pt,blocking:It,capture:null,charSet:null,checked:Pt,cite:null,className:It,cols:At,colSpan:null,content:null,contentEditable:_t,controls:Pt,controlsList:It,coords:At|jt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Pt,defer:Pt,dir:null,dirName:null,disabled:Pt,download:Rt,draggable:_t,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Pt,formTarget:null,headers:It,height:At,hidden:Rt,high:At,href:null,hrefLang:null,htmlFor:It,httpEquiv:It,id:null,imageSizes:null,imageSrcSet:null,inert:Pt,inputMode:null,integrity:null,is:null,isMap:Pt,itemId:null,itemProp:It,itemRef:It,itemScope:Pt,itemType:It,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Pt,low:At,manifest:null,max:null,maxLength:At,media:null,method:null,min:null,minLength:At,multiple:Pt,muted:Pt,name:null,nonce:null,noModule:Pt,noValidate:Pt,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:Pt,optimum:At,pattern:null,ping:It,placeholder:null,playsInline:Pt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Pt,referrerPolicy:null,rel:It,required:Pt,reversed:Pt,rows:At,rowSpan:At,sandbox:It,scope:null,scoped:Pt,seamless:Pt,selected:Pt,shadowRootClonable:Pt,shadowRootDelegatesFocus:Pt,shadowRootMode:null,shape:null,size:At,sizes:null,slot:null,span:At,spellCheck:_t,src:null,srcDoc:null,srcLang:null,srcSet:null,start:At,step:null,style:null,tabIndex:At,target:null,title:null,translate:null,type:null,typeMustMatch:Pt,useMap:null,value:_t,width:At,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:It,axis:null,background:null,bgColor:null,border:At,borderColor:null,bottomMargin:At,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Pt,declare:Pt,event:null,face:null,frame:null,frameBorder:null,hSpace:At,leftMargin:At,link:null,longDesc:null,lowSrc:null,marginHeight:At,marginWidth:At,noResize:Pt,noHref:Pt,noShade:Pt,noWrap:Pt,object:null,profile:null,prompt:null,rev:null,rightMargin:At,rules:null,scheme:null,scrolling:_t,standby:null,summary:null,text:null,topMargin:At,valueType:null,version:null,vAlign:null,vLink:null,vSpace:At,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Pt,disableRemotePlayback:Pt,prefix:null,property:null,results:At,security:null,unselectable:null},space:"html",transform:qt}),Kt=$t({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:Dt,accentHeight:At,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:At,amplitude:At,arabicForm:null,ascent:At,attributeName:null,attributeType:null,azimuth:At,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:At,by:null,calcMode:null,capHeight:At,className:It,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:At,diffuseConstant:At,direction:null,display:null,dur:null,divisor:At,dominantBaseline:null,download:Pt,dx:null,dy:null,edgeMode:null,editable:null,elevation:At,enableBackground:null,end:null,event:null,exponent:At,externalResourcesRequired:null,fill:null,fillOpacity:At,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:jt,g2:jt,glyphName:jt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:At,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:At,horizOriginX:At,horizOriginY:At,id:null,ideographic:At,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:At,k:At,k1:At,k2:At,k3:At,k4:At,kernelMatrix:Dt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:At,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:At,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:At,overlineThickness:At,paintOrder:null,panose1:null,path:null,pathLength:At,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:It,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:At,pointsAtY:At,pointsAtZ:At,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Dt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Dt,rev:Dt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Dt,requiredFeatures:Dt,requiredFonts:Dt,requiredFormats:Dt,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:At,specularExponent:At,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:At,strikethroughThickness:At,string:null,stroke:null,strokeDashArray:Dt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:At,strokeOpacity:At,strokeWidth:null,style:null,surfaceScale:At,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Dt,tabIndex:At,tableValues:null,target:null,targetX:At,targetY:At,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Dt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:At,underlineThickness:At,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:At,values:null,vAlphabetic:At,vMathematical:At,vectorEffect:null,vHanging:At,vIdeographic:At,version:null,vertAdvY:At,vertOriginX:At,vertOriginY:At,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:At,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ht}),Qt=$t({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()}),Jt=$t({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:qt}),Gt=$t({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),Yt={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"},Xt=/[A-Z]/g,Zt=/-[a-z]/g,en=/^data[-\w.:]+$/i;function tn(e){return"-"+e.toLowerCase()}function nn(e){return e.charAt(1).toUpperCase()}const rn=Tt([Vt,Wt,Qt,Jt,Gt],"html"),on=Tt([Vt,Kt,Qt,Jt,Gt],"svg");var an,sn,ln,un={};function cn(){if(ln)return un;ln=1;var e=un&&un.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(un,"__esModule",{value:!0}),un.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(sn)return an;sn=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 u(e){return e?e.replace(s,l):l}return an=function(s,c){if("string"!=typeof s)throw new TypeError("First argument must be a string");if(!s)return[];c=c||{};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 g(e),v(),t}}function g(e){this.start=e,this.end={line:d,column:f},this.source=c.source}function m(e){var t=new Error(c.source+":"+d+":"+f+": "+e);if(t.reason=e,t.filename=c.source,t.line=d,t.column=f,t.source=s,!c.silent)throw t}function y(e){var t=e.exec(s);if(t){var n=t[0];return p(n),s=s.slice(n.length),t}}function v(){y(n)}function b(e){var t;for(e=e||[];t=k();)!1!==t&&e.push(t);return e}function k(){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 m("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 w(){var t=h(),n=y(r);if(n){if(k(),!y(o))return m("property missing ':'");var s=y(i),c=t({type:"declaration",property:u(n[0].replace(e,l)),value:s?u(s[0].replace(e,l)):l});return y(a),c}}return g.prototype.content=s,v(),function(){var e,t=[];for(b(t);e=w();)!1!==e&&(t.push(e),b(t));return t}()}}());return un}var dn,fn,pn,hn={};function gn(){if(dn)return hn;dn=1,Object.defineProperty(hn,"__esModule",{value:!0}),hn.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 hn.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))},hn}const mn=t(function(){if(pn)return fn;pn=1;var e=(fn&&fn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(cn()),t=gn();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,fn=n}()),yn=bn("end"),vn=bn("start");function bn(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 kn(e){return e&&"object"==typeof e?"position"in e||"type"in e?xn(e.position):"start"in e||"end"in e?xn(e):"line"in e||"column"in e?wn(e):"":""}function wn(e){return Sn(e&&e.line)+":"+Sn(e&&e.column)}function xn(e){return wn(e&&e.start)+"-"+wn(e&&e.end)}function Sn(e){return e&&"number"==typeof e?e:1}class Cn 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=kn(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}}Cn.prototype.file="",Cn.prototype.name="",Cn.prototype.reason="",Cn.prototype.message="",Cn.prototype.stack="",Cn.prototype.column=void 0,Cn.prototype.line=void 0,Cn.prototype.ancestors=void 0,Cn.prototype.cause=void 0,Cn.prototype.fatal=void 0,Cn.prototype.place=void 0,Cn.prototype.ruleId=void 0,Cn.prototype.source=void 0;const En={}.hasOwnProperty,Tn=new Map,Nn=/[A-Z]/g,On=new Set(["table","tbody","thead","tfoot","tr"]),Ln=new Set(["td","th"]),Pn="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function _n(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=vn(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?on:rn,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},i=Rn(o,e,void 0);return i&&"string"!=typeof i?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function Rn(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=on,e.schema=o);e.ancestors.push(t);const i=zn(e,t.tagName,!1),a=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&En.call(t.properties,o)){const i=Dn(e,o,t.properties[o]);if(i){const[o,a]=i;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof a&&Ln.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=jn(e,t);On.has(t.tagName)&&(s=s.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&Ct(t.value):Ct(t));var t}));return An(e,a,i,t),In(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)}Mn(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=on,e.schema=o);e.ancestors.push(t);const i=null===t.name?e.Fragment:zn(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];yt(t.type);const o=t.expression;yt(o.type);const i=o.properties[0];yt(i.type),Object.assign(n,e.evaluater.evaluateExpression(i.argument))}else Mn(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];yt(t.type),i=e.evaluater.evaluateExpression(t.expression)}else Mn(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(e,t),s=jn(e,t);return An(e,a,i,t),In(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);Mn(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return In(r,jn(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 An(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function In(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function jn(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Tn;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=Rn(e,i,a);void 0!==s&&n.push(s)}return n}function Dn(e,t,n){const r=function(e,t){const n=Nt(t);let r=t,o=Ot;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&en.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Zt,nn);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Zt.test(e)){let n=e.replace(Xt,tn);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=Ut}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 mn(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const t=n,r=new Cn("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=Pn+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)En.call(e,n)&&(t[Fn(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?Yt[r.property]||r.property:r.attribute,n]}}function zn(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=xt(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=xt(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 En.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Mn(e)}function Mn(e,t){const n=new Cn("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=Pn+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Fn(e){let t=e.replace(Nn,Un);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function Un(e){return"-"+e.toLowerCase()}const Bn={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"]},$n={};function Vn(e,t){return Hn(e,"boolean"!=typeof $n.includeImageAlt||$n.includeImageAlt,"boolean"!=typeof $n.includeHtml||$n.includeHtml)}function Hn(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 qn(e.children,t,n)}return Array.isArray(e)?qn(e,t,n):""}function qn(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Hn(e[o],t,n);return r.join("")}const Wn=document.createElement("i");function Kn(e){const t="&"+e+";";Wn.innerHTML=t;const n=Wn.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function Qn(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 Jn(e,t){return e.length>0?(Qn(e,e.length,0,t),e):t}const Gn={}.hasOwnProperty;function Yn(e){const t={};let n=-1;for(;++n<e.length;)Xn(t,e[n]);return t}function Xn(e,t){let n;for(n in t){const r=(Gn.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){Gn.call(r,i)||(r[i]=[]);const e=o[i];Zn(r[i],Array.isArray(e)?e:e?[e]:[])}}}function Zn(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);Qn(e,0,0,r)}function er(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 tr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const nr=hr(/[A-Za-z]/),rr=hr(/[\dA-Za-z]/),or=hr(/[#-'*+\--9=?A-Z^-~]/);function ir(e){return null!==e&&(e<32||127===e)}const ar=hr(/\d/),sr=hr(/[\dA-Fa-f]/),lr=hr(/[!-/:-@[-`{-~]/);function ur(e){return null!==e&&e<-2}function cr(e){return null!==e&&(e<0||32===e)}function dr(e){return-2===e||-1===e||32===e}const fr=hr(new RegExp("\\p{P}|\\p{S}","u")),pr=hr(/\s/);function hr(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function gr(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(37===i&&rr(e.charCodeAt(n+1))&&rr(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 mr(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){if(dr(r))return e.enter(n),a(r);return t(r)};function a(r){return dr(r)&&i++<o?(e.consume(r),a):(e.exit(n),t(r))}}const yr={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"),mr(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)):ur(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const vr={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,u)(r)}return u(r)}function l(e){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&v();const n=t.events.length;let o,i=n;for(;i--;)if("exit"===t.events[i][0]&&"chunkFlow"===t.events[i][1].type){o=t.events[i][1].end;break}y(a);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return Qn(t.events,i+1,0,t.events.slice(n)),t.events.length=s,u(e)}return s(e)}function u(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(br,c,d)(o)}function c(e){return r&&v(),y(a),f(e)}function d(e){return t.parser.lazy[t.now().line]=a!==n.length,i=t.now().offset,h(e)}function f(n){return t.containerState={},e.attempt(br,p,h)(n)}function p(e){return a++,n.push([t.currentConstruct,t.containerState]),f(e)}function h(n){return null===n?(r&&v(),y(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),g(n))}function g(n){return null===n?(m(e.exit("chunkFlow"),!0),y(0),void e.consume(n)):ur(n)?(e.consume(n),m(e.exit("chunkFlow")),a=0,t.interrupt=void 0,s):(e.consume(n),g)}function m(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<i&&(!r.events[e][1].end||r.events[e][1].end.offset>i))return;const n=t.events.length;let o,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(o){s=t.events[l][1].end;break}o=!0}for(y(a),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;Qn(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function y(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},br={tokenize:function(e,t,n){return mr(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function kr(e){return null===e||cr(e)||pr(e)?1:fr(e)?2:void 0}function wr(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 xr={name:"attention",resolveAll:function(e,t){let n,r,o,i,a,s,l,u,c=-1;for(;++c<e.length;)if("enter"===e[c][0]&&"attentionSequence"===e[c][1].type&&e[c][1]._close)for(n=c;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[c][1]).charCodeAt(0)){if((e[n][1]._close||e[c][1]._open)&&(e[c][1].end.offset-e[c][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[c][1].end.offset-e[c][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[c][1].end.offset-e[c][1].start.offset>1?2:1;const d={...e[n][1].end},f={...e[c][1].start};Sr(d,-s),Sr(f,s),i={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[c][1].start},end:f},o={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[c][1].start}},r={type:s>1?"strong":"emphasis",start:{...i.start},end:{...a.end}},e[n][1].end={...i.start},e[c][1].start={...a.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=Jn(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=Jn(l,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),l=Jn(l,wr(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),l=Jn(l,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(u=2,l=Jn(l,[["enter",e[c][1],t],["exit",e[c][1],t]])):u=0,Qn(e,n-1,c-n+3,l),c=n+l.length-u-2;break}c=-1;for(;++c<e.length;)"attentionSequence"===e[c][1].type&&(e[c][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=kr(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"),u=kr(s),c=!u||2===u&&o||n.includes(s),d=!o||2===o&&u||n.includes(r);return l._open=Boolean(42===i?c:c&&(o||!d)),l._close=Boolean(42===i?d:d&&(u||!c)),t(s)}}};function Sr(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Cr={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 nr(t)?(e.consume(t),i):64===t?n(t):l(t)}function i(e){return 43===e||45===e||46===e||rr(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||rr(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||ir(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),u):or(t)?(e.consume(t),l):n(t)}function u(e){return rr(e)?c(e):n(e)}function c(n){return 46===n?(e.consume(n),r=0,u):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||rr(t))&&r++<63){const n=45===t?d:c;return e.consume(t),n}return n(t)}}};const Er={partial:!0,tokenize:function(e,t,n){return function(t){return dr(t)?mr(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||ur(e)?t(e):n(e)}}};const Tr={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(dr(t))return mr(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return o(t)};function o(r){return e.attempt(Tr,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 dr(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const Nr={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 lr(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const Or={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=rr,u(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=sr,u):(e.enter("characterReferenceValue"),o=7,i=ar,u(t))}function u(s){if(59===s&&a){const o=e.exit("characterReferenceValue");return i!==rr||Kn(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),u):n(s)}}};const Lr={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)}}},Pr={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"),dr(t)?mr(e,u,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):u(t)}function u(t){return t===i?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===i?(o++,e.consume(t),c):o>=s?(e.exit("codeFencedFenceSequence"),dr(t)?mr(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||ur(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"),dr(t)?mr(e,u,"whitespace")(t):u(t))}function u(n){return null===n||ur(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(Lr,p,v)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(n))}function c(t){return null===t||ur(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),u(t)):dr(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),mr(e,d,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),c)}function d(t){return null===t||ur(t)?u(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),f(t))}function f(t){return null===t||ur(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),u(t)):96===t&&t===i?n(t):(e.consume(t),f)}function p(t){return e.attempt(o,v,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),g}function g(t){return a>0&&dr(t)?mr(e,m,"linePrefix",a+1)(t):m(t)}function m(t){return null===t||ur(t)?e.check(Lr,p,v)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||ur(t)?(e.exit("codeFlowValue"),m(t)):(e.consume(t),y)}function v(n){return e.exit("codeFenced"),t(n)}}};const _r={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),mr(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):ur(t)?e.attempt(Rr,i,s)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||ur(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),a)}function s(n){return e.exit("codeIndented"),t(n)}}},Rr={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):ur(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):mr(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):ur(e)?o(e):n(e)}}};const Ar={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,u(t)):ur(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||ur(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function u(n){return 96===n?(e.consume(n),r++,u):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",l(n))}}};class Ir{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&&jr(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),jr(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),jr(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);jr(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);jr(this.left,t.reverse())}}}function jr(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 Dr(e){const t={};let n,r,o,i,a,s,l,u=-1;const c=new Ir(e);for(;++u<c.length;){for(;u in t;)u=t[u];if(n=c.get(u),u&&"chunkFlow"===n[1].type&&"listItemPrefix"===c.get(u-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,zr(c,u)),u=t[u],l=!0);else if(n[1]._container){for(o=u,r=void 0;o--;)if(i=c.get(o),"lineEnding"===i[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(r&&(c.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={...c.get(r)[1].start},a=c.slice(r,u),a.unshift(n),c.splice(r,u-r+1,a))}}return Qn(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function zr(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=[],u={};let c,d,f=-1,p=n,h=0,g=0;const m=[g];for(;p;){for(;e.get(++o)[1]!==p;);i.push(o),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),d&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(c),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&&(g=f+1,m.push(g),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):m.pop(),f=m.length;f--;){const t=s.slice(m[f],m[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;)u[h+l[f][0]]=h+l[f][1],h+=l[f][1]-l[f][0]-1;return u}const Mr={resolve:function(e){return Dr(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):ur(t)?e.check(Fr,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}}},Fr={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"),mr(e,o,"linePrefix")};function o(o){if(null===o||ur(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 Ur(e,t,n,r,o,i,a,s,l){const u=l||Number.POSITIVE_INFINITY;let c=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||ir(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||ur(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 c||null!==o&&41!==o&&!cr(o)?c<u&&40===o?(e.consume(o),c++,h):41===o?(e.consume(o),c--,h):null===o||32===o||40===o||ir(o)?n(o):(e.consume(o),92===o?g:h):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(o))}function g(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function Br(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),u};function u(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):ur(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(t){return null===t||91===t||93===t||ur(t)||l++>999?(e.exit("chunkString"),u(t)):(e.consume(t),s||(s=!dr(t)),92===t?d:c)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,c):c(t)}}function $r(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):ur(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),mr(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(t))}function u(t){return t===a||null===t||ur(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?c:u)}function c(t){return t===a||92===t?(e.consume(t),u):u(t)}}function Vr(e,t){let n;return function r(o){if(ur(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if(dr(o))return mr(e,r,n?"linePrefix":"lineSuffix")(o);return t(o)}}const Hr={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return Br.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=tr(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 cr(t)?Vr(e,s)(t):s(t)}function s(t){return Ur(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(qr,u,u)(t)}function u(t){return dr(t)?mr(e,c,"whitespace")(t):c(t)}function c(i){return null===i||ur(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},qr={partial:!0,tokenize:function(e,t,n){return function(t){return cr(t)?Vr(e,r)(t):n(t)};function r(t){return $r(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return dr(t)?mr(e,i,"whitespace")(t):i(t)}function i(e){return null===e||ur(e)?t(e):n(e)}}};const Wr={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return ur(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const Kr={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"},Qn(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||cr(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||ur(n)?(e.exit("atxHeading"),t(n)):dr(n)?mr(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||cr(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),s)}}};const Qr=["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"],Jr=["pre","script","style","textarea"],Gr={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),u}(t)};function u(s){return 33===s?(e.consume(s),c):47===s?(e.consume(s),i=!0,p):63===s?(e.consume(s),o=3,r.interrupt?t:I):nr(s)?(e.consume(s),a=String.fromCharCode(s),h):n(s)}function c(i){return 45===i?(e.consume(i),o=2,d):91===i?(e.consume(i),o=5,s=0,f):nr(i)?(e.consume(i),o=4,r.interrupt?t:I):n(i)}function d(o){return 45===o?(e.consume(o),r.interrupt?t:I):n(o)}function f(o){const i="CDATA[";return o===i.charCodeAt(s++)?(e.consume(o),6===s?r.interrupt?t:T:f):n(o)}function p(t){return nr(t)?(e.consume(t),a=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||cr(s)){const l=47===s,u=a.toLowerCase();return l||i||!Jr.includes(u)?Qr.includes(a.toLowerCase())?(o=6,l?(e.consume(s),g):r.interrupt?t(s):T(s)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):i?m(s):y(s)):(o=1,r.interrupt?t(s):T(s))}return 45===s||rr(s)?(e.consume(s),a+=String.fromCharCode(s),h):n(s)}function g(o){return 62===o?(e.consume(o),r.interrupt?t:T):n(o)}function m(t){return dr(t)?(e.consume(t),m):C(t)}function y(t){return 47===t?(e.consume(t),C):58===t||95===t||nr(t)?(e.consume(t),v):dr(t)?(e.consume(t),y):C(t)}function v(t){return 45===t||46===t||58===t||95===t||rr(t)?(e.consume(t),v):b(t)}function b(t){return 61===t?(e.consume(t),k):dr(t)?(e.consume(t),b):y(t)}function k(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,w):dr(t)?(e.consume(t),k):x(t)}function w(t){return t===l?(e.consume(t),l=null,S):null===t||ur(t)?n(t):(e.consume(t),w)}function x(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||cr(t)?b(t):(e.consume(t),x)}function S(e){return 47===e||62===e||dr(e)?y(e):n(e)}function C(t){return 62===t?(e.consume(t),E):n(t)}function E(t){return null===t||ur(t)?T(t):dr(t)?(e.consume(t),E):n(t)}function T(t){return 45===t&&2===o?(e.consume(t),P):60===t&&1===o?(e.consume(t),_):62===t&&4===o?(e.consume(t),j):63===t&&3===o?(e.consume(t),I):93===t&&5===o?(e.consume(t),A):!ur(t)||6!==o&&7!==o?null===t||ur(t)?(e.exit("htmlFlowData"),N(t)):(e.consume(t),T):(e.exit("htmlFlowData"),e.check(Yr,D,N)(t))}function N(t){return e.check(Xr,O,D)(t)}function O(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),L}function L(t){return null===t||ur(t)?N(t):(e.enter("htmlFlowData"),T(t))}function P(t){return 45===t?(e.consume(t),I):T(t)}function _(t){return 47===t?(e.consume(t),a="",R):T(t)}function R(t){if(62===t){const n=a.toLowerCase();return Jr.includes(n)?(e.consume(t),j):T(t)}return nr(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),R):T(t)}function A(t){return 93===t?(e.consume(t),I):T(t)}function I(t){return 62===t?(e.consume(t),j):45===t&&2===o?(e.consume(t),I):T(t)}function j(t){return null===t||ur(t)?(e.exit("htmlFlowData"),D(t)):(e.consume(t),j)}function D(n){return e.exit("htmlFlow"),t(n)}}},Yr={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Er,t,n)}}},Xr={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(ur(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 Zr={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),k):63===t?(e.consume(t),v):nr(t)?(e.consume(t),S):n(t)}function l(t){return 45===t?(e.consume(t),u):91===t?(e.consume(t),i=0,p):nr(t)?(e.consume(t),y):n(t)}function u(t){return 45===t?(e.consume(t),f):n(t)}function c(t){return null===t?n(t):45===t?(e.consume(t),d):ur(t)?(a=c,R(t)):(e.consume(t),c)}function d(t){return 45===t?(e.consume(t),f):c(t)}function f(e){return 62===e?_(e):45===e?d(e):c(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),g):ur(t)?(a=h,R(t)):(e.consume(t),h)}function g(t){return 93===t?(e.consume(t),m):h(t)}function m(t){return 62===t?_(t):93===t?(e.consume(t),m):h(t)}function y(t){return null===t||62===t?_(t):ur(t)?(a=y,R(t)):(e.consume(t),y)}function v(t){return null===t?n(t):63===t?(e.consume(t),b):ur(t)?(a=v,R(t)):(e.consume(t),v)}function b(e){return 62===e?_(e):v(e)}function k(t){return nr(t)?(e.consume(t),w):n(t)}function w(t){return 45===t||rr(t)?(e.consume(t),w):x(t)}function x(t){return ur(t)?(a=x,R(t)):dr(t)?(e.consume(t),x):_(t)}function S(t){return 45===t||rr(t)?(e.consume(t),S):47===t||62===t||cr(t)?C(t):n(t)}function C(t){return 47===t?(e.consume(t),_):58===t||95===t||nr(t)?(e.consume(t),E):ur(t)?(a=C,R(t)):dr(t)?(e.consume(t),C):_(t)}function E(t){return 45===t||46===t||58===t||95===t||rr(t)?(e.consume(t),E):T(t)}function T(t){return 61===t?(e.consume(t),N):ur(t)?(a=T,R(t)):dr(t)?(e.consume(t),T):C(t)}function N(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,O):ur(t)?(a=N,R(t)):dr(t)?(e.consume(t),N):(e.consume(t),L)}function O(t){return t===o?(e.consume(t),o=void 0,P):null===t?n(t):ur(t)?(a=O,R(t)):(e.consume(t),O)}function L(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||cr(t)?C(t):(e.consume(t),L)}function P(e){return 47===e||62===e||cr(e)?C(e):n(e)}function _(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function R(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),A}function A(t){return dr(t)?mr(e,I,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):I(t)}function I(t){return e.enter("htmlTextData"),a(t)}}};const eo={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&&Qn(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}},u={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},c={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",l,t],["enter",u,t]],i=Jn(i,e.slice(r+1,r+s+3)),i=Jn(i,[["enter",c,t]]),i=Jn(i,wr(t.parser.constructs.insideSpan.null,e.slice(r+s+4,o-3),t)),i=Jn(i,[["exit",c,t],e[o-2],e[o-1],["exit",u,t]]),i=Jn(i,e.slice(o+1)),i=Jn(i,[["exit",l,t]]),Qn(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 c(t);return i=r.parser.defined.includes(tr(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(to,u,i?u:c)(t):91===t?e.attempt(no,u,i?l:c)(t):i?u(t):c(t)}function l(t){return e.attempt(ro,u,c)(t)}function u(e){return t(e)}function c(e){return o._balanced=!0,n(e)}}},to={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 cr(t)?Vr(e,o)(t):o(t)}function o(t){return 41===t?u(t):Ur(e,i,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return cr(t)?Vr(e,s)(t):u(t)}function a(e){return n(e)}function s(t){return 34===t||39===t||40===t?$r(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):u(t)}function l(t){return cr(t)?Vr(e,u)(t):u(t)}function u(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},no={tokenize:function(e,t,n){const r=this;return function(t){return Br.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(tr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},ro={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 oo={name:"labelStartImage",resolveAll:eo.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 io={name:"labelStartLink",resolveAll:eo.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 ao={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),mr(e,t,"linePrefix")}}};const so={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||ur(i))?(e.exit("thematicBreak"),t(i)):n(i)}function a(t){return t===r?(e.consume(t),o++,a):(e.exit("thematicBreakSequence"),dr(t)?mr(e,i,"whitespace")(t):i(t))}}};const lo={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Er,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,mr(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){if(r.containerState.furtherBlankLines||!dr(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(co,t,o)(n)});function o(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,mr(e,e.attempt(lo,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:ar(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(so,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 ar(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(Er,r.interrupt?n:u,e.attempt(uo,d,c))}function u(e){return r.containerState.initialBlankLine=!0,i++,d(e)}function c(t){return dr(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)}}},uo={partial:!0,tokenize:function(e,t,n){const r=this;return mr(e,function(e){const o=r.events[r.events.length-1];return!dr(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},co={partial:!0,tokenize:function(e,t,n){const r=this;return mr(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 fo={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"),dr(t)?mr(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||ur(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const po={tokenize:function(e){const t=this,n=e.attempt(Er,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,mr(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Mr,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 ho={resolveAll:vo()},go=yo("string"),mo=yo("text");function yo(e){return{resolveAll:vo("text"===e?bo: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 vo(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 bo(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 ko={42:lo,43:lo,45:lo,48:lo,49:lo,50:lo,51:lo,52:lo,53:lo,54:lo,55:lo,56:lo,57:lo,62:Tr},wo={91:Hr},xo={[-2]:_r,[-1]:_r,32:_r},So={35:Kr,42:so,45:[fo,so],60:Gr,61:fo,95:so,96:Pr,126:Pr},Co={38:Or,92:Nr},Eo={[-5]:ao,[-4]:ao,[-3]:ao,33:oo,38:Or,42:xr,60:[Cr,Zr],91:io,92:[Wr,Nr],93:eo,95:xr,96:Ar},To={null:[xr,ho]},No=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:wo,disable:{null:[]},document:ko,flow:So,flowInitial:xo,insideSpan:To,string:Co,text:Eo},Symbol.toStringTag,{value:"Module"}));function Oo(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:m(function(e,t){y(e,t.from)}),check:m(g),consume:function(e){ur(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,v()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++));u.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=f(),u.events.push(["enter",n,u]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=f(),u.events.push(["exit",t,u]),t},interrupt:m(g,{interrupt:!0})},u={code:null,containerState:{},defineSkip:function(e){o[e.line]=e.column,v()},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=Jn(a,e),p(),null!==a[a.length-1])return[];return y(t,0),u.events=wr(i,u.events,u),u.events}};let c=t.tokenize.call(u,l);return t.resolveAll&&i.push(t),u;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){c=c(e)}function g(e,t){t.restore()}function m(e,t){return function(n,o,i){let a,c,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,c=0,0===e.length?i:g(e[c])}function g(e){return function(n){p=function(){const e=f(),t=u.previous,n=u.currentConstruct,o=u.events.length,i=Array.from(s);return{from:o,restore:a};function a(){r=e,u.previous=t,u.currentConstruct=n,u.events.length=o,s=i,v()}}(),d=e,e.partial||(u.currentConstruct=e);if(e.name&&u.parser.constructs.disable.null.includes(e.name))return y();return e.tokenize.call(t?Object.assign(Object.create(u),t):u,l,m,y)(n)}}function m(t){return e(d,p),o}function y(e){return p.restore(),++c<a.length?g(a[c]):i}}}function y(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&Qn(u.events,t,u.events.length-t,e.resolve(u.events.slice(t),u)),e.resolveTo&&(u.events=e.resolveTo(u.events,u))}function v(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const Lo=/[\0\t\n\r]/g;const Po=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function _o(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return er(n.slice(t?2:1),t?16:10)}return Kn(n)||e}const Ro={}.hasOwnProperty;function Ao(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(te),autolinkProtocol:E,autolinkEmail:E,atxHeading:i(Y),blockQuote:i(W),characterEscape:E,characterReference:E,codeFenced:i(K),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(K,a),codeText:i(Q,a),codeTextData:E,data:E,codeFlowValue:E,definition:i(J),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(G),hardBreakEscape:i(X),hardBreakTrailing:i(X),htmlFlow:i(Z,a),htmlFlowData:E,htmlText:i(Z,a),htmlTextData:E,image:i(ee),label:a,link:i(te),listItem:i(re),listItemValue:f,listOrdered:i(ne,d),listUnordered:i(ne),paragraph:i(oe),reference:F,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(Y),strong:i(ie),thematicBreak:i(se)},exit:{atxHeading:l(),atxHeadingSequence:w,autolink:l(),autolinkEmail:q,autolinkProtocol:H,blockQuote:l(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:B,characterReferenceMarkerNumeric:B,characterReferenceValue:$,characterReference:V,codeFenced:l(m),codeFencedFence:g,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:T,codeIndented:l(y),codeText:l(_),codeTextData:T,data:T,definition:l(),definitionDestinationString:k,definitionLabelString:v,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(O),hardBreakTrailing:l(O),htmlFlow:l(L),htmlFlowData:T,htmlText:l(P),htmlTextData:T,image:l(A),label:j,labelText:I,lineEnding:N,link:l(R),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:U,resourceDestinationString:D,resourceTitleString:z,resource:M,setextHeading:l(C),setextHeadingLineSequence:S,setextHeadingText:x,strong:l(),thematicBreak:l()}};jo(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:u,buffer:a,resume:c,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]];Ro.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]||zo).call(i,void 0,e[0])}for(r.position={start:Io(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Io(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,u=!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",u=!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=u,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:Io(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+kn({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]||zo).call(this,e,r[0])}n.position.end=Io(e.end)}function c(){return Vn(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 g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function m(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function v(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=tr(this.sliceSerialize(e)).toLowerCase()}function b(){const e=this.resume();this.stack[this.stack.length-1].title=e}function k(){const e=this.resume();this.stack[this.stack.length-1].url=e}function w(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function x(){this.data.setextHeadingSlurpLineEnding=!0}function S(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function C(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=ae(),n.position={start:Io(e.start),end:void 0},t.push(n)),this.stack.push(n)}function T(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Io(e.end)}function N(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=Io(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),T.call(this,e))}function O(){this.data.atHardBreak=!0}function L(){const e=this.resume();this.stack[this.stack.length-1].value=e}function P(){const e=this.resume();this.stack[this.stack.length-1].value=e}function _(){const e=this.resume();this.stack[this.stack.length-1].value=e}function R(){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 A(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function I(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(Po,_o)}(t),n.identifier=tr(t).toLowerCase()}function j(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function D(){const e=this.resume();this.stack[this.stack.length-1].url=e}function z(){const e=this.resume();this.stack[this.stack.length-1].title=e}function M(){this.data.inReference=void 0}function F(){this.data.referenceType="collapsed"}function U(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=tr(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=er(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=Kn(t)}this.stack[this.stack.length-1].value+=r}function V(e){this.stack.pop().position.end=Io(e.end)}function H(e){T.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function q(e){T.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function W(){return{type:"blockquote",children:[]}}function K(){return{type:"code",lang:null,meta:null,value:""}}function Q(){return{type:"inlineCode",value:""}}function J(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function G(){return{type:"emphasis",children:[]}}function Y(){return{type:"heading",depth:0,children:[]}}function X(){return{type:"break"}}function Z(){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(;!Dr(e););return e}(function(e){const t={constructs:Yn([No,...(e||{}).extensions||[]]),content:n(yr),defined:[],document:n(vr),flow:n(po),lazy:{},string:n(go),text:n(mo)};return t;function n(e){return function(n){return Oo(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,i,a){const s=[];let l,u,c,d,f;for(o=n+("string"==typeof o?o.toString():new TextDecoder(i||void 0).decode(o)),c=0,n="",r&&(65279===o.charCodeAt(0)&&c++,r=void 0);c<o.length;){if(Lo.lastIndex=c,l=Lo.exec(o),d=l&&void 0!==l.index?l.index:o.length,f=o.charCodeAt(d),!l){n=o.slice(c);break}if(10===f&&c===d&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),c<d&&(s.push(o.slice(c,d)),t+=d-c),f){case 0:s.push(65533),t++;break;case 9:for(u=4*Math.ceil(t/4),s.push(-2);t++<u;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}c=d+1}return a&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function Io(e){return{line:e.line,column:e.column,offset:e.offset}}function jo(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?jo(e,r):Do(e,r)}}function Do(e,t){let n;for(n in t)if(Ro.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 zo(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+kn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+kn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+kn({start:t.start,end:t.end})+") is still open")}function Mo(e){const t=this;t.parser=function(n){return Ao(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Fo(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 Uo(e){const t=e.spread;return null==t?e.children.length>1:t}function Bo(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push($o(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push($o(t.slice(o),o>0,!1)),i.join("")}function $o(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 Vo={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={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},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=gr(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 u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)},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 Fo(e,t);const o={src:gr(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:gr(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 Fo(e,t);const o={href:gr(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:gr(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=Uo(n[r])}return t}(n):Uo(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 u={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,u),e.applyData(t,u)},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=vn(t.children[1]),a=yn(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 u={type:"element",tagName:o,properties:r,children:[]};n&&(u.children=e.all(n),e.patch(n,u),u=e.applyData(n,u)),l.push(u)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,u),e.applyData(t,u)},text:function(e,t){const n={type:"text",value:Bo(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:Ho,yaml:Ho,definition:Ho,footnoteDefinition:Ho};function Ho(){}const qo="object"==typeof self?self:globalThis,Wo=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 qo[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 qo[i](a),o)};return r})(new Map,e)(0),Ko="",{toString:Qo}={},{keys:Jo}=Object,Go=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=Qo.call(e).slice(8,-1);switch(n){case"Array":return[1,Ko];case"Object":return[2,Ko];case"Date":return[3,Ko];case"RegExp":return[4,Ko];case"Map":return[5,Ko];case"Set":return[6,Ko];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},Yo=([e,t])=>0===e&&("function"===t||"symbol"===t),Xo=(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]=Go(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 Jo(r))!e&&Yo(Go(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||!Yo(Go(o))&&!Yo(Go(a)))&&t.push([i(o),i(a)]);return n}case 6:{const t=[],n=o([a,t],r);for(const o of r)!e&&Yo(Go(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},Zo="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?Wo(Xo(e,t)):structuredClone(e):(e,t)=>Wo(Xo(e,t));function ei(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 ti(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const ni=function(e){if(null==e)return oi;if("function"==typeof e)return ri(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ni(e[n]);return ri(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 ri(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 ri(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function ri(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 oi(){return!0}const ii=[],ai=!0,si=!1;function li(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=ni(o),a=r?-1:1;!function e(o,s,l){const u=o&&"object"==typeof o?o:{};if("string"==typeof u.type){const e="string"==typeof u.tagName?u.tagName:"string"==typeof u.name?u.name:void 0;Object.defineProperty(c,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return c;function c(){let u,c,d,f=ii;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[ai,e];return null==e?ii:[e]}(n(o,l)),f[0]===si))return f;if("children"in o&&o.children){const t=o;if(t.children&&"skip"!==f[0])for(c=(r?t.children.length:-1)+a,d=l.concat(t);c>-1&&c<t.children.length;){const n=t.children[c];if(u=e(n,c,d)(),u[0]===si)return u;c="number"==typeof u[1]?u[1]:c+a}}return f}}(e,void 0,[])()}function ui(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),li(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 ci={}.hasOwnProperty,di={};function fi(e,t){e.position&&(t.position=function(e){const t=vn(e),n=yn(e);if(t&&n)return{start:t,end:n}}(e))}function pi(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,Zo(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function hi(e,t){const n=t.data||{},r=!("value"in t)||ci.call(n,"hProperties")||ci.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 gi(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 mi(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function yi(e,t){const n=function(e,t){const n=t||di,r=new Map,o=new Map,i=new Map,a={...Vo,...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=mi(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=mi(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:pi,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:function(e,t){const n=e.type,r=s.handlers[n];if(ci.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=Zo(n);return r.children=s.all(e),r}return Zo(e)}return(s.options.unknownHandler||hi)(s,e,t)},options:n,patch:fi,wrap:gi};return ui(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||ei,r=e.options.footnoteBackLabel||ti,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(),u=gr(a.toLowerCase());let c=0;const d=[],f=e.footnoteCounts.get(a);for(;void 0!==f&&++c<=f;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,c);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+u+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,c),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-"+u},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:{...Zo(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 vi(e,t){return e&&"run"in e?async function(n,r){const o=yi(n,{file:r,...t});await e.run(o,r)}:function(n,r){return yi(n,{file:r,...e||t})}}function bi(e){if(e)throw e}var ki,wi;var xi=function(){if(wi)return ki;wi=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 ki=function e(){var t,n,r,l,u,c,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)||(u=o(l)))?(u?(u=!1,c=r&&o(r)?r:[]):c=r&&i(r)?r:{},a(d,{name:n,newValue:e(h,c,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},ki}();const Si=t(xi);function Ci(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 Ei(){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 Ti={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Ni(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(Ni(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){Ni(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;)Ni(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){Ni(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 Ni(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Oi={cwd:function(){return"/"}};function Li(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function Pi(e){if("string"==typeof e)e=new URL(e);else if(!Li(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 _i=["history","path","basename","stem","extname","dirname"];class Ri{constructor(e){let t;t=e?Li(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?"":Oi.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<_i.length;){const e=_i[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)_i.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?Ti.basename(this.path):void 0}set basename(e){Ii(e,"basename"),Ai(e,"basename"),this.path=Ti.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?Ti.dirname(this.path):void 0}set dirname(e){ji(this.basename,"dirname"),this.path=Ti.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?Ti.extname(this.path):void 0}set extname(e){if(Ai(e,"extname"),ji(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=Ti.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Li(e)&&(e=Pi(e)),Ii(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?Ti.basename(this.path,this.extname):void 0}set stem(e){Ii(e,"stem"),Ai(e,"stem"),this.path=Ti.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 Cn(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 Ai(e,t){if(e&&e.includes(Ti.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ti.sep+"`")}function Ii(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ji(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const Di=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},zi={}.hasOwnProperty;class Mi extends Di{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=Ei()}copy(){const e=new Mi;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(Si(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?($i("data",this.frozen),this.namespace[e]=t,this):zi.call(this.namespace,e)&&this.namespace[e]||void 0:e?($i("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=qi(e),n=this.parser||this.Parser;return Ui("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),Ui("process",this.parser||this.Parser),Bi("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=qi(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(),Ui("processSync",this.parser||this.Parser),Bi("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,bi(e),t=r}),Hi("processSync","process",n),t}run(e,t,n){Vi(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=qi(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){bi(e),n=t,r=!0}),Hi("runSync","run",r),n}stringify(e,t){this.freeze();const n=qi(t),r=this.compiler||this.Compiler;return Bi("stringify",r),Vi(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if($i("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=Si(!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];Ci(a)&&Ci(r)&&(r=Si(!0,a,r)),n[o]=[e,r,...i]}}}}const Fi=(new Mi).freeze();function Ui(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function Bi(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function $i(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 Vi(e){if(!Ci(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function Hi(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function qi(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new Ri(e)}const Wi=[],Ki={allowDangerousHtml:!0},Qi=/^(https?|ircs?|mailto|xmpp)$/i,Ji=[{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 Gi(e){const t=function(e){const t=e.rehypePlugins||Wi,n=e.remarkPlugins||Wi,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ki}:Ki,o=Fi().use(Mo).use(n).use(vi,r).use(t);return o}(e),n=function(e){const t=e.children||"",n=new Ri;"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||Yi;for(const c of Ji)Object.hasOwn(t,c.from)&&vt((c.from,c.to&&c.to,c.id));return ui(e,u),_n(e,{Fragment:N.Fragment,components:o,ignoreInvalidStyle:!0,jsx:N.jsx,jsxs:N.jsxs,passKeys:!0,passNode:!0});function u(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 Bn)if(Object.hasOwn(Bn,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=Bn[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 Yi(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||Qi.test(e.slice(0,t))?e:""}function Xi(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 Zi(e,t,n){const r=ni((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([ea(e[0]),ta(e[1])])}return t}(t);let i=-1;for(;++i<o.length;)li(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 u=!1,c=[];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&&c.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(i)?c.push(...i):i&&c.push(i),s=n+d[0].length,u=!0),!r.global)break;d=r.exec(e.value)}u?(s<e.value.length&&c.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...c)):c=[e];return l+c.length}(e,t)}}function ea(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 ta(e){return"function"==typeof e?e:function(){return e}}const na="phrasing",ra=["autolink","link","image","label"];function oa(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ia(e){this.config.enter.autolinkProtocol.call(this,e)}function aa(e){this.config.exit.autolinkProtocol.call(this,e)}function sa(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 la(e){this.config.exit.autolinkEmail.call(this,e)}function ua(e){this.exit(e)}function ca(e){Zi(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,da],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),fa]],{ignore:["link","linkReference"]})}function da(e,t,n,r,o){let i="";if(!pa(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=Xi(e,"(");let i=Xi(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 fa(e,t,n,r){return!(!pa(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function pa(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||pr(n)||fr(n))&&(!t||47!==n)}function ha(){this.buffer()}function ga(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ma(){this.buffer()}function ya(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function va(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=tr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ba(e){this.exit(e)}function ka(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=tr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function wa(e){this.exit(e)}function xa(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 Sa(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?Ea:Ca)));return s(),a},footnoteReference:xa},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function Ca(e,t,n){return 0===t?e:Ea(e,t,n)}function Ea(e,t,n){return(n?"":" ")+e}xa.peek=function(){return"["};const Ta=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function Na(e){this.enter({type:"delete",children:[]},e)}function Oa(e){this.exit(e)}function La(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 Pa(e){return e.length}function _a(e){return null==e?"":String(e)}function Ra(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 Aa(e,t,n){return">"+(n?"":" ")+e}function Ia(e,t){return ja(e,t.inConstruct,!0)&&!ja(e,t.notInConstruct,!1)}function ja(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 Da(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if("\n"===n.unsafe[o].character&&Ia(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return"\\\n"}function za(e,t,n){return(n?"":" ")+e}function Ma(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 Fa(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ua(e,t,n){const r=kr(e),o=kr(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 Ba(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 u=l.charCodeAt(0),c=Ua(r.before.charCodeAt(r.before.length-1),u,o);c.inside&&(l=Fa(u)+l.slice(1));const d=l.charCodeAt(l.length-1),f=Ua(r.after.charCodeAt(0),d,o);f.inside&&(l=l.slice(0,-1)+Fa(d));const p=a.move(o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:c.outside},s+l+p}function $a(e){return e.value||""}function Va(e,t,n,r){const o=Ma(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let u=l.move("![");return u+=l.move(n.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),u+=l.move(" "+o),u+=l.move(n.safe(e.title,{before:u,after:o,...l.current()})),u+=l.move(o),s()),u+=l.move(")"),a(),u}function Ha(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 u=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),a();const c=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=c,i(),"full"!==o&&u&&u===d?"shortcut"===o?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function qa(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 Wa(e,t){const n=Vn(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 Ka(e,t,n,r){const o=Ma(n),i='"'===o?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(Wa(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 u=a.move("[");return u+=a.move(n.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${i}`),u+=a.move(" "+o),u+=a.move(n.safe(e.title,{before:u,after:o,...a.current()})),u+=a.move(o),l()),u+=a.move(")"),s(),u}function Qa(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 u=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),a();const c=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=c,i(),"full"!==o&&u&&u===d?"shortcut"===o?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Ja(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 Ga(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}La.peek=function(){return"~"},Ba.peek=function(e,t,n){return n.options.emphasis||"*"},$a.peek=function(){return"<"},Va.peek=function(){return"!"},Ha.peek=function(){return"!"},qa.peek=function(){return"`"},Ka.peek=function(e,t,n){return Wa(e,n)?"<":"["},Qa.peek=function(){return"["};const Ya=ni(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Xa(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 u=l.charCodeAt(0),c=Ua(r.before.charCodeAt(r.before.length-1),u,o);c.inside&&(l=Fa(u)+l.slice(1));const d=l.charCodeAt(l.length-1),f=Ua(r.after.charCodeAt(0),d,o);f.inside&&(l=l.slice(0,-1)+Fa(d));const p=a.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:c.outside},s+l+p}Xa.peek=function(e,t,n){return n.options.strong||"*"};const Za={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()),Aa);return o(),a},break:Da,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,za);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)),u=n.enter("codeFenced");let c=s.move(l);if(e.lang){const t=n.enter(`codeFencedLang${a}`);c+=s.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${a}`);c+=s.move(" "),c+=s.move(n.safe(e.meta,{before:c,after:"\n",encode:["`"],...s.current()})),t()}return c+=s.move("\n"),i&&(c+=s.move(i+"\n")),c+=s.move(l),u(),c},definition:function(e,t,n,r){const o=Ma(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let u=l.move("[");return u+=l.move(n.safe(n.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),u+=l.move(" "+o),u+=l.move(n.safe(e.title,{before:u,after:o,...l.current()})),u+=l.move(o),s()),a(),u},emphasis:Ba,hardBreak:Da,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 ui(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,si}),Boolean((!e.depth||e.depth<3)&&Vn(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 u=n.containerPhrasing(e,{before:"# ",after:"\n",...i.current()});return/^[\t ]/.test(u)&&(u=Fa(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,n.options.closeAtx&&(u+=" "+a),l(),s(),u},html:$a,image:Va,imageReference:Ha,inlineCode:qa,link:Ka,linkReference:Qa,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):Ja(n);const s=e.ordered?"."===a?")":".":function(e){const t=Ja(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),Ga(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 u=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,o(),u},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||Ja(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"),u=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(),u},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 Ya(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:Xa,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(Ga(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 es(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 ts(e){this.exit(e),this.data.inTable=void 0}function ns(e){this.enter({type:"tableRow",children:[]},e)}function rs(e){this.exit(e)}function os(e){this.enter({type:"tableCell",children:[]},e)}function is(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,as));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function as(e,t){return"|"===t?t:e}function ss(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=Za.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||Pa,i=[],a=[],s=[],l=[];let u=0,c=-1;for(;++c<e.length;){const t=[],r=[];let i=-1;for(e[c].length>u&&(u=e[c].length);++i<e[c].length;){const a=_a(e[c][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[c]=t,s[c]=r}let d=-1;if("object"==typeof r&&"length"in r)for(;++d<u;)i[d]=Ra(r[d]);else{const e=Ra(r);for(;++d<u;)i[d]=e}d=-1;const f=[],p=[];for(;++d<u;){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),c=-1;const h=[];for(;++c<a.length;){const e=a[c],t=s[c];d=-1;const r=[];for(;++d<u;){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===u-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 ls(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function us(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 cs(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=Za.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+a})),l}const ds={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},fs={tokenize:function(e,t,n){let r,o,i;return a;function a(t){return 46===t||95===t?e.check(hs,l,s)(t):null===t||cr(t)||pr(t)||45!==t&&fr(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},ps={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(hs,t,i)(a):null===a||cr(a)||pr(a)?t(a):(e.consume(a),o)}function i(t){return 41===t&&r++,e.consume(t),o}},partial:!0},hs={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||cr(a)||pr(a)?t(a):n(a)}function o(e){return null===e||40===e||91===e||cr(e)||pr(e)?t(e):r(e)}function i(e){return nr(e)?a(e):n(e)}function a(t){return 59===t?(e.consume(t),r):nr(t)?(e.consume(t),a):n(t)}},partial:!0},gs={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return rr(e)?n(e):t(e)}},partial:!0},ms={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!ws.call(r,r.previous)||Es(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(ds,e.attempt(fs,e.attempt(ps,o),n),n)(t)};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:ws},ys={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let o="",i=!1;return function(t){if((72===t||104===t)&&xs.call(r,r.previous)&&!Es(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),a;return n(t)};function a(t){if(nr(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||ir(t)||cr(t)||pr(t)||fr(t)?n(t):e.attempt(fs,e.attempt(ps,u),n)(t)}function u(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:xs},vs={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let o,i;return function(t){if(!Cs(t)||!Ss.call(r,r.previous)||Es(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)};function a(t){return Cs(t)?(e.consume(t),a):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(gs,u,l)(t):45===t||95===t||rr(t)?(i=!0,e.consume(t),s):u(t)}function l(t){return e.consume(t),o=!0,s}function u(a){return i&&o&&nr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):n(a)}},previous:Ss},bs={};let ks=48;for(;ks<123;)bs[ks]=vs,ks++,58===ks?ks=65:91===ks&&(ks=97);function ws(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||cr(e)}function xs(e){return!nr(e)}function Ss(e){return!(47===e||Cs(e))}function Cs(e){return 43===e||45===e||46===e||95===e||rr(e)}function Es(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}bs[43]=vs,bs[45]=vs,bs[46]=vs,bs[95]=vs,bs[72]=[vs,ys],bs[104]=[vs,ys],bs[87]=[vs,ms],bs[119]=[vs,ms];const Ts={tokenize:function(e,t,n){const r=this;return mr(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 Ns(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=tr(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 Os(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 Ls(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||cr(s))return n(s);if(93===s){e.exit("chunkString");const i=e.exit("gfmFootnoteCallString");return o.includes(tr(r.sliceSerialize(i)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return cr(s)||(i=!0),a++,e.consume(s),92===s?u:l}function u(t){return 91===t||92===t||93===t?(e.consume(t),a++,l):l(t)}}function Ps(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",u):n(t)}function u(t){if(s>999||93===t&&!a||null===t||91===t||cr(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return i=tr(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return cr(t)||(a=!0),s++,e.consume(t),92===t?c:u}function c(t){return 91===t||92===t||93===t?(e.consume(t),s++,u):u(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(i)||o.push(i),mr(e,f,"gfmFootnoteDefinitionWhitespace")):n(t)}function f(e){return t(e)}}function _s(e,t,n){return e.check(Er,t,e.attempt(Ts,t,n))}function Rs(e){e.exit("gfmFootnoteDefinition")}function As(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=kr(o);if(126===i)return a>1?r(i):(e.consume(i),a++,s);if(a<2&&!t)return r(i);const u=e.exit("strikethroughSequenceTemporary"),c=kr(i);return u._open=!c||2===c&&Boolean(l),u._close=!l||2===l&&Boolean(c),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&&Qn(a,a.length,0,wr(s,e.slice(r+1,n),t)),Qn(a,a.length,0,[["exit",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",o,t]]),Qn(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 Is{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 js(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 Ds(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?k:s;if(i===k&&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):ur(t)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):dr(t)?mr(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"),u(t)))}function u(t){return null===t||124===t||cr(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?c:u)}function c(t){return 92===t||124===t?(e.consume(t),u):u(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),o=!1,dr(t)?mr(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):b(t)}function p(t){return dr(t)?mr(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"),g):45===t?(a+=1,g(t)):null===t||ur(t)?v(t):b(t)}function g(t){return 45===t?(e.enter("tableDelimiterFiller"),m(t)):b(t)}function m(t){return 45===t?(e.consume(t),m):58===t?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(t))}function y(t){return dr(t)?mr(e,v,"whitespace")(t):v(t)}function v(n){return 124===n?f(n):(null===n||ur(n))&&o&&i===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):b(n)}function b(e){return n(e)}function k(t){return e.enter("tableRow"),w(t)}function w(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),w):null===n||ur(n)?(e.exit("tableRow"),t(n)):dr(n)?mr(e,w,"whitespace")(n):(e.enter("data"),x(n))}function x(t){return null===t||124===t||cr(t)?(e.exit("data"),w(t)):(e.consume(t),92===t?S:x)}function S(t){return 92===t||124===t?(e.consume(t),x):x(t)}}function zs(e,t){let n,r,o,i=-1,a=!0,s=0,l=[0,0,0,0],u=[0,0,0,0],c=!1,d=0;const f=new Is;for(;++i<e.length;){const p=e[i],h=p[1];"enter"===p[0]?"tableHead"===h.type?(c=!1,0!==d&&(Fs(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],u=[0,i+1,0,0],c&&(c=!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]&&(u[0]=u[1],o=Ms(f,t,l,s,void 0,o)),l=u,u=[l[1],i,0,0])):(a=!1,0===u[2]&&(0!==l[1]&&(u[0]=u[1],o=Ms(f,t,l,s,void 0,o),l=[0,0,0,0]),u[2]=i)):"tableHead"===h.type?(c=!0,d=i):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=i,0!==l[1]?(u[0]=u[1],o=Ms(f,t,l,s,i,o)):0!==u[1]&&(o=Ms(f,t,u,s,i,o)),s=0):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(u[3]=i)}for(0!==d&&Fs(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=js(t.events,i))}return e}function Ms(e,t,n,r,o,i){const a=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(i.end=Object.assign({},Us(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const s=Us(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=Us(t.events,n[2]),i=Us(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({},Us(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function Fs(e,t,n,r,o){const i=[],a=Us(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 Us(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const Bs={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 cr(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 ur(r)?t(r):dr(r)?e.check({tokenize:$s},t,n)(r):n(r)}}};function $s(e,t,n){return mr(e,function(e){return null===e?n(e):t(e)},"whitespace")}const Vs={};function Hs(e){const t=e||Vs,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return Yn([{text:bs},{document:{91:{name:"gfmFootnoteDefinition",tokenize:Ps,continuation:{tokenize:_s},exit:Rs}},text:{91:{name:"gfmFootnoteCall",tokenize:Ls},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Ns,resolveTo:Os}}},As(e),{flow:{null:{name:"table",tokenize:Ds,resolveAll:zs}}},{text:{91:Bs}}])}(t)),o.push([{transforms:[ca],enter:{literalAutolink:oa,literalAutolinkEmail:ia,literalAutolinkHttp:ia,literalAutolinkWww:ia},exit:{literalAutolink:ua,literalAutolinkEmail:la,literalAutolinkHttp:aa,literalAutolinkWww:sa}},{enter:{gfmFootnoteCallString:ha,gfmFootnoteCall:ga,gfmFootnoteDefinitionLabelString:ma,gfmFootnoteDefinition:ya},exit:{gfmFootnoteCallString:va,gfmFootnoteCall:ba,gfmFootnoteDefinitionLabelString:ka,gfmFootnoteDefinition:wa}},{canContainEols:["delete"],enter:{strikethrough:Na},exit:{strikethrough:Oa}},{enter:{table:es,tableData:os,tableHeader:os,tableRow:ns},exit:{codeText:is,table:ts,tableData:rs,tableHeader:rs,tableRow:rs}},{exit:{taskListCheckValueChecked:ls,taskListCheckValueUnchecked:ls,paragraph:us}}]),i.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:na,notInConstruct:ra},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:na,notInConstruct:ra},{character:":",before:"[ps]",after:"\\/",inConstruct:na,notInConstruct:ra}]},Sa(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Ta}],handlers:{delete:La}},ss(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:cs}}]}}(t))}const qs="https://www.tiagpctest.softiabot.com",Ws={BOTTOM_RIGHT:"bottom-right",BOTTOM_LEFT:"bottom-left",TOP_RIGHT:"top-right",TOP_LEFT:"top-left"},Ks={LIGHT:"light",DARK:"dark",AUTO:"auto"},Qs={SPANISH:"es",ENGLISH:"en",FRANCES:"fr"},Js=640,Gs=Ks.AUTO,Ys=Ws.BOTTOM_RIGHT,Xs=Qs.ENGLISH,Zs="400px",el="600px",tl=!1,nl=!0,rl=!0,ol=3e4,il=2e3,al=e=>{try{return new Date(e).toLocaleTimeString("es-ES",{hour:"2-digit",minute:"2-digit"})}catch{return""}},sl=()=>crypto.randomUUID(),ll=({size:e="md",className:t=""})=>{const{t:n}=V();return N.jsx("div",{className:`gpc-spinner ${{sm:"w-4 h-4 border-2",md:"w-6 h-6 border-2",lg:"w-8 h-8 border-3"}[e]} ${t}`,role:"status","aria-label":n("ui.spinner.loading"),children:N.jsx("span",{className:"sr-only",children:n("ui.spinner.loading")})})},ul=()=>{const{t:e}=V();return N.jsxs("div",{className:"gpc-typing-indicator",role:"status","aria-label":e("ui.typingIndicator.typing"),children:[N.jsx("span",{className:"gpc-typing-dot"}),N.jsx("span",{className:"gpc-typing-dot"}),N.jsx("span",{className:"gpc-typing-dot"})]})},cl=({message:e,showMetadata:t=!1,messageRef:n=null})=>{const{t:r}=V(),o="user"===e.role,i=!o&&e.isStreaming&&!e.content;return N.jsxs("div",{ref:n,className:"gpc-message "+(o?"gpc-message-user":"gpc-message-assistant"),role:"article","aria-label":r(o?"ui.message.userMessage":"ui.message.assistantMessage"),children:[N.jsx("div",{className:"gpc-message-content",children:i?N.jsx(ul,{}):o?e.content.trim():N.jsx(Gi,{remarkPlugins:[Hs],components:{table:({node:e,...t})=>N.jsx("div",{className:"gpc-table-wrapper",children:N.jsx("table",{className:"gpc-table",...t})}),thead:({node:e,...t})=>N.jsx("thead",{className:"gpc-table-head",...t}),tbody:({node:e,...t})=>N.jsx("tbody",{className:"gpc-table-body",...t}),tr:({node:e,...t})=>N.jsx("tr",{className:"gpc-table-row",...t}),th:({node:e,...t})=>N.jsx("th",{className:"gpc-table-header",...t}),td:({node:e,...t})=>N.jsx("td",{className:"gpc-table-cell",...t})},children:e.content})}),N.jsx("div",{className:"gpc-message-timestamp "+(o?"gpc-message-timestamp-user":""),children:al(e.timestamp)}),!o&&t&&e.metadata&&N.jsxs("div",{className:"gpc-message-metadata",children:[e.metadata.tokensUsed&&N.jsxs("div",{className:"gpc-metadata-item",children:[N.jsxs("strong",{children:[r("metadata.tokensUsed"),":"]})," ",e.metadata.tokensUsed]}),e.metadata.responseTimeMs&&N.jsxs("div",{className:"gpc-metadata-item",children:[N.jsxs("strong",{children:[r("metadata.responseTime"),":"]})," ",(a=e.metadata.responseTimeMs,a>=1e3?`${(a/1e3).toFixed(1)}s`:`${Math.round(a)}ms`)]}),e.metadata.model&&N.jsxs("div",{className:"gpc-metadata-item",children:[N.jsxs("strong",{children:[r("metadata.model"),":"]})," ",e.metadata.model]})]})]});var a},dl=({messages:e,isLoading:t,showMetadata:n=!1,widgetConfig:r=null,hasMoreMessages:o=!1,isLoadingMoreMessages:i=!1,onLoadMoreMessages:a=null})=>{const{t:s}=V(),u=l.useRef(null),c=l.useRef(null),d=l.useRef(0),f=l.useRef(!1),p=l.useRef(null),h=l.useRef(null),g=l.useRef(0);l.useLayoutEffect(()=>{e.length>0&&!f.current&&(u.current?.scrollIntoView({behavior:"instant"}),f.current=!0,d.current=e.length)},[e.length]),l.useEffect(()=>{if(!a)return;const e=new IntersectionObserver(e=>{e[0].isIntersecting&&o&&!i&&(p.current&&(g.current=p.current.scrollHeight),a())},{threshold:1});return h.current&&e.observe(h.current),()=>{h.current&&e.unobserve(h.current)}},[o,i,a]),l.useEffect(()=>{if(!1===i&&g.current>0&&p.current){const e=p.current.scrollHeight-g.current;p.current.scrollTop=e,g.current=0}},[i]),l.useEffect(()=>{const t=e.length,n=d.current,r=e[t-1],o=t>n+1;t>0&&f.current&&(o?setTimeout(()=>{u.current?.scrollIntoView({behavior:"instant"})},150):t>n&&r&&("user"===r.role?u.current?.scrollIntoView({behavior:"smooth"}):"assistant"===r.role&&r.isStreaming&&setTimeout(()=>{c.current?.scrollIntoView({behavior:"smooth",block:"start"})},100))),d.current=t},[e]);const m=r?.widget_customization?.branding?.company_name||"TIA GPC",y=r?.widget_customization?.branding?.company_logo_base64,v=r?.widget_customization?.welcome_message,b=y?.startsWith("data:")?y:y?`data:image/png;base64,${y}`:null,k=v||s("chat.welcome",{companyName:m});return 0!==e.length||t?N.jsxs("div",{ref:p,className:"gpc-messages-container gpc-scrollbar gpc-smooth-scroll",children:[o&&N.jsx("div",{style:{textAlign:"center",padding:"10px"},children:i?N.jsxs("div",{className:"gpc-loading-more-messages",children:[N.jsx("div",{className:"gpc-loading-spinner"}),N.jsx("span",{children:s("chat.loadingMore","Loading older messages...")})]}):N.jsx("div",{ref:h,style:{height:"1px"}})}),e.map((t,r)=>N.jsx(cl,{message:t,showMetadata:n,messageRef:r===e.length-1?c:null},t.id)),N.jsx("div",{ref:u})]}):N.jsx("div",{className:"gpc-messages-container",children:N.jsxs("div",{className:"gpc-empty-state",children:[b?N.jsx("div",{className:"gpc-welcome-logo",children:N.jsx("img",{src:b,alt:m,className:"gpc-welcome-company-logo"})}):N.jsx(re,{className:"gpc-empty-icon"}),N.jsx("h3",{className:"gpc-empty-title",children:k}),N.jsx("p",{className:"gpc-empty-text",children:s("chat.emptyState")})]})})},fl=({onTranscript:e,isLoading:t,disabled:n,onRecordingStateChange:r,onAnalyserChange:o})=>{const{t:i}=V(),[a,s]=l.useState(!1),[u,c]=l.useState(!1),d=l.useRef(null),f=l.useRef([]),p=l.useRef(null),h=l.useRef(null),g=l.useRef(null),m=l.useRef(null),y=l.useRef(null);l.useEffect(()=>()=>{"recording"===d.current?.state&&d.current.stop(),p.current&&"closed"!==p.current.state&&p.current.close(),y.current&&clearInterval(y.current)},[]),l.useEffect(()=>{r&&r(a||u)},[a,u,r]),l.useEffect(()=>{o&&o(h.current)},[h.current,o]);const v=async()=>{try{if(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia)return void alert(i("voice.unsupported"));const t=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0,sampleRate:48e3,channelCount:1}});p.current=new(window.AudioContext||window.webkitAudioContext),h.current=p.current.createAnalyser();p.current.createMediaStreamSource(t).connect(h.current),h.current.fftSize=1024,h.current.smoothingTimeConstant=.4,h.current.minDecibels=-85,h.current.maxDecibels=-15;const n=h.current.frequencyBinCount;g.current=new Uint8Array(n);const r=new MediaRecorder(t,{mimeType:"audio/webm;codecs=opus"});d.current=r,f.current=[],m.current=null,r.ondataavailable=e=>{e.data.size>0&&f.current.push(e.data)},r.onstop=async()=>{if(y.current&&(clearInterval(y.current),y.current=null),p.current&&"closed"!==p.current.state&&p.current.close(),m.current=null,0===f.current.length)return;const t=new Blob(f.current,{type:"audio/webm"});c(!0);try{await e(t)}catch(n){alert(i("voice.error"))}finally{c(!1),f.current=[]}},r.start(100),s(!0),y.current=setInterval(()=>{(()=>{if(!h.current||!g.current)return;h.current.getByteTimeDomainData(g.current);let e=0;for(let t=0;t<g.current.length;t++){const n=(g.current[t]-128)/128;e+=n*n}if(100*Math.sqrt(e/g.current.length)<1.2){if(m.current||(m.current=Date.now()),Date.now()-m.current>2e3)b()}else m.current=null})()},100)}catch(t){"NotAllowedError"===t.name||"PermissionDeniedError"===t.name?alert(i("voice.permissionDenied")):alert(i("voice.unsupported"))}},b=()=>{(a||"recording"===d.current?.state)&&(d.current&&"recording"===d.current.state&&d.current.stop(),y.current&&(clearInterval(y.current),y.current=null),m.current=null,s(!1),d.current&&d.current.stream&&d.current.stream.getTracks().forEach(e=>e.stop()))},k=n||t||u,w=i(u?"voice.processing":a?"voice.stop":"voice.record");return N.jsx("button",{type:"button",onClick:()=>{a?b():v()},disabled:k,className:"gpc-voice-button "+(a?"gpc-voice-recording":""),"aria-label":w,title:w,children:u?N.jsx("span",{className:"gpc-spinner"}):a?N.jsx(oe,{className:"gpc-icon gpc-voice-icon-active"}):N.jsx(ie,{className:"gpc-icon"})})},pl=({analyser:e,isRecording:t})=>{const n=l.useRef(null),r=l.useRef(null);return l.useEffect(()=>{if(!t||!e||!n.current)return;const o=n.current,i=o.getContext("2d"),a=e.frequencyBinCount,s=new Uint8Array(a),l=window.devicePixelRatio||1,u=o.getBoundingClientRect();o.width=u.width*l,o.height=u.height*l,i.scale(l,l);const c=u.width,d=u.height,f=()=>{if(!t)return;r.current=requestAnimationFrame(f),e.getByteFrequencyData(s),i.clearRect(0,0,c,d);const n=(c-200)/2;for(let e=0;e<40;e++){const t=Math.floor(e*a/40),r=s[t]/255,o=Math.max(2,r*d*.8),l=n+5*e,u=(d-o)/2,c=i.createLinearGradient(0,u,0,u+o);c.addColorStop(0,"rgba(59, 130, 246, 0.8)"),c.addColorStop(1,"rgba(96, 165, 250, 0.6)"),i.fillStyle=c,i.fillRect(l,u,3,o)}};return f(),()=>{r.current&&cancelAnimationFrame(r.current)}},[e,t]),t?N.jsx("div",{className:"gpc-audio-waveform-container",children:N.jsx("canvas",{ref:n,className:"gpc-audio-waveform-canvas","aria-label":"Audio waveform visualization"})}):null},hl=({onSendMessage:e,isLoading:t,disabled:n,gpcService:r,showBranding:o=!0})=>{const{t:i}=V(),[a,s]=l.useState(""),[u,c]=l.useState(!1),[d,f]=l.useState(null),p=l.useRef(null);l.useEffect(()=>{n||t||u||p.current?.focus()},[n,t,u]),l.useEffect(()=>{p.current&&(p.current.style.height="auto",p.current.style.height=`${Math.min(p.current.scrollHeight,120)}px`)},[a]);const h=async r=>{r.preventDefault();const o=(e=>e.trim().slice(0,2e3))(a);if(o&&!t&&!n&&!u)try{await e(o),s(""),p.current&&(p.current.style.height="auto")}catch(i){}},g=a.trim().length>0&&!t&&!n&&!u,m=t||n||u,y=n||a.trim().length>0;return N.jsxs("form",{onSubmit:h,className:"gpc-input-container",children:[N.jsxs("div",{className:"gpc-input-wrapper",children:[N.jsx("textarea",{ref:p,value:a,onChange:e=>s(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||u||(e.preventDefault(),h(e))},placeholder:u?"":i("chat.placeholder"),disabled:m,maxLength:il,className:"gpc-input gpc-textarea "+(u?"gpc-input-recording":""),"aria-label":i("chat.placeholder"),"aria-describedby":"chat-input-help",rows:1}),N.jsx(pl,{analyser:d,isRecording:u})]}),N.jsxs("div",{className:"gpc-input-actions-right",children:[N.jsx(fl,{onTranscript:async e=>{if(!r)throw new Error(i("toast.gpcServiceNotAvailable"));const t=await r.transcribeAudio(e);t.success&&t.text&&(s(t.text),p.current?.focus())},isLoading:t,disabled:y,onRecordingStateChange:e=>{c(e)},onAnalyserChange:e=>{f(e)}}),N.jsx("button",{type:"submit",disabled:!g,className:"gpc-send-button","aria-label":i("chat.send"),title:i("chat.send"),children:t?N.jsx("span",{className:"gpc-spinner"}):N.jsx(le,{className:"gpc-icon"})})]}),o&&N.jsx("span",{className:"gpc-footer-text",children:i("widget.poweredBy")}),N.jsxs("span",{id:"chat-input-help",className:"gpc-sr-only",children:[i("chat.placeholder"),"."," ",i("input.maxCharacters",{count:il})]})]})};var gl=l.forwardRef(({as:e="div",...t},n)=>N.jsx(e,{...t,ref:n})),ml="cf-turnstile-script",yl="onloadTurnstileCallback",vl=e=>!!document.getElementById(e),bl={normal:{width:300,height:65},compact:{width:150,height:140},invisible:{width:0,height:0,overflow:"hidden"},flexible:{minWidth:300,width:"100%",height:65},interactionOnly:{width:"fit-content",height:"auto",display:"flex"}};function kl(e){if("invisible"!==e&&"interactionOnly"!==e)return e}var wl,xl="unloaded",Sl=new Promise((e,t)=>{wl={resolve:e,reject:t},"ready"===xl&&e(void 0)}),Cl=l.forwardRef((e,t)=>{let{scriptOptions:n,options:r={},siteKey:o,onWidgetLoad:i,onSuccess:a,onExpire:s,onError:u,onBeforeInteractive:c,onAfterInteractive:d,onUnsupported:f,onTimeout:p,onLoadScript:h,id:g,style:m,as:y="div",injectScript:v=!0,rerenderOnCallbackChange:b=!1,...k}=e,w=r.size,x=l.useCallback(()=>typeof w>"u"?{}:"execute"===r.execution?bl.invisible:"interaction-only"===r.appearance?bl.interactionOnly:bl[w],[r.execution,w,r.appearance]),[S,C]=l.useState(x()),E=l.useRef(null),[T,O]=l.useState(!1),L=l.useRef(),P=l.useRef(!1),_=g||"cf-turnstile",R=l.useRef({onSuccess:a,onError:u,onExpire:s,onBeforeInteractive:c,onAfterInteractive:d,onUnsupported:f,onTimeout:p});l.useEffect(()=>{b||(R.current={onSuccess:a,onError:u,onExpire:s,onBeforeInteractive:c,onAfterInteractive:d,onUnsupported:f,onTimeout:p})});let A=n?.id||ml,I=function(e=ml){let[t,n]=l.useState(!1);return l.useEffect(()=>{let t=()=>{vl(e)&&n(!0)},r=new MutationObserver(t);return r.observe(document,{childList:!0,subtree:!0}),t(),()=>{r.disconnect()}},[e]),t}(A),j=n?.onLoadCallbackName||yl,D=r.appearance||"always",z=l.useMemo(()=>({sitekey:o,action:r.action,cData:r.cData,theme:r.theme||"auto",language:r.language||"auto",tabindex:r.tabIndex,"response-field":r.responseField,"response-field-name":r.responseFieldName,size:kl(w),retry:r.retry||"auto","retry-interval":r.retryInterval||8e3,"refresh-expired":r.refreshExpired||"auto","refresh-timeout":r.refreshTimeout||"auto",execution:r.execution||"render",appearance:r.appearance||"always","feedback-enabled":r.feedbackEnabled||!0,callback:e=>{P.current=!0,b?a?.(e):R.current.onSuccess?.(e)},"error-callback":b?u:(...e)=>R.current.onError?.(...e),"expired-callback":b?s:(...e)=>R.current.onExpire?.(...e),"before-interactive-callback":b?c:(...e)=>R.current.onBeforeInteractive?.(...e),"after-interactive-callback":b?d:(...e)=>R.current.onAfterInteractive?.(...e),"unsupported-callback":b?f:(...e)=>R.current.onUnsupported?.(...e),"timeout-callback":b?p:(...e)=>R.current.onTimeout?.(...e)}),[r.action,r.appearance,r.cData,r.execution,r.language,r.refreshExpired,r.responseField,r.responseFieldName,r.retry,r.retryInterval,r.tabIndex,r.theme,r.feedbackEnabled,r.refreshTimeout,o,w,b,b?a:null,b?u:null,b?s:null,b?c:null,b?d:null,b?f:null,b?p:null]),M=l.useCallback(()=>typeof window<"u"&&!!window.turnstile,[]);return l.useEffect(function(){v&&!T&&(({render:e="explicit",onLoadCallbackName:t=yl,scriptOptions:{nonce:n="",defer:r=!0,async:o=!0,id:i="",appendTo:a,onError:s,crossOrigin:l=""}={}})=>{let u=i||ml;if(vl(u))return;let c=document.createElement("script");c.id=u,c.src=`https://challenges.cloudflare.com/turnstile/v0/api.js?onload=${t}&render=${e}`,document.querySelector(`script[src="${c.src}"]`)||(c.defer=!!r,c.async=!!o,n&&(c.nonce=n),l&&(c.crossOrigin=l),s&&(c.onerror=s,delete window[t]),("body"===a?document.body:document.getElementsByTagName("head")[0]).appendChild(c))})({onLoadCallbackName:j,scriptOptions:{...n,id:A}})},[v,T,n,A]),l.useEffect(function(){"ready"!==xl&&((e=yl)=>("unloaded"===xl&&(xl="loading",window[e]=()=>{wl.resolve(),xl="ready",delete window[e]}),Sl))(j).then(()=>O(!0)).catch(console.error)},[]),l.useEffect(function(){if(!E.current||!T)return;let e=!1;return(async()=>{if(e||!E.current)return;let t=window.turnstile.render(E.current,z);L.current=t,L.current&&i?.(L.current)})(),()=>{e=!0,L.current&&(window.turnstile.remove(L.current),P.current=!1)}},[_,T,z]),l.useImperativeHandle(t,()=>{let{turnstile:e}=window;return{getResponse(){if(e?.getResponse&&L.current&&M())return e.getResponse(L.current)},getResponsePromise:async(e=3e4,t=100)=>new Promise((n,r)=>{let o,i=async()=>{if(P.current&&window.turnstile&&L.current)try{let e=window.turnstile.getResponse(L.current);return o&&clearTimeout(o),e?n(e):r(new Error("No response received"))}catch(a){return o&&clearTimeout(o),r(new Error("Failed to get response"))}o||(o=setTimeout(()=>{o&&clearTimeout(o),r(new Error("Timeout"))},e)),await new Promise(e=>setTimeout(e,t)),await i()};i()}),reset(){if(e?.reset&&L.current&&M()){"execute"===r.execution&&C(bl.invisible);try{P.current=!1,e.reset(L.current)}catch(Ve){}}},remove(){e?.remove&&L.current&&M()&&(C(bl.invisible),P.current=!1,e.remove(L.current),L.current=null)},render(){if(!e?.render||!E.current||!M()||L.current)return;let t=e.render(E.current,z);return L.current=t,L.current&&i?.(L.current),"execute"!==r.execution&&C(w?bl[w]:{}),t},execute(){"execute"===r.execution&&e?.execute&&E.current&&L.current&&M()&&(e.execute(E.current,z),C(w?bl[w]:{}))},isExpired:()=>!!(e?.isExpired&&L.current&&M())&&e.isExpired(L.current)}},[L,r.execution,w,z,E,M,T,i]),l.useEffect(()=>{I&&!T&&window.turnstile&&O(!0)},[T,I]),l.useEffect(()=>{C(x())},[r.execution,w,D]),l.useEffect(()=>{!I||"function"!=typeof h||h()},[I]),N.jsx(gl,{ref:E,as:y,id:_,style:{...S,...m},...k})});Cl.displayName="Turnstile";const El=({siteKey:e,onSuccess:t,onError:n})=>{const{t:r}=V(),[o,i]=l.useState(!1),[a,s]=l.useState(null);return N.jsxs("div",{className:"gpc-validator-container",children:[N.jsxs("div",{className:"gpc-validator-header",children:[N.jsx("h3",{className:"gpc-validator-title",children:r("chat.validation")}),N.jsx("p",{className:"gpc-validator-subtitle",children:r("turnstile.verifying")})]}),!a&&N.jsx("div",{className:"gpc-animate-fade-in",children:N.jsx(Cl,{siteKey:e,onSuccess:async e=>{i(!0),s(null);try{await t(e)}catch(o){s(r("turnstile.error")),n?.(o)}finally{i(!1)}},onError:e=>{s(r("turnstile.error")),n?.(new Error(r("turnstile.error")))},options:{theme:"light",size:"normal"}})}),o&&N.jsxs("div",{className:"gpc-validator-loading",children:[N.jsx(ll,{size:"md"}),N.jsx("p",{className:"gpc-validator-text",children:r("chat.validation")})]}),a&&N.jsxs("div",{className:"gpc-validator-error",children:[N.jsx(Z,{className:"gpc-error-icon"}),N.jsxs("div",{className:"gpc-error-content",children:[N.jsx("p",{className:"gpc-error-title",children:r("errors.validation")}),N.jsx("p",{className:"gpc-error-message",children:a}),N.jsx("button",{onClick:()=>window.location.reload(),className:"gpc-error-button",children:r("chat.retry")})]})]})]})},Tl=({isOpen:e,onClose:t,onConfirm:n,message:r,confirmText:o,cancelText:i,variant:a="danger"})=>{const{t:s}=V();if(!e)return null;return N.jsx("div",{className:"gpc-confirm-toast-container gpc-animate-slide-down",children:N.jsxs("div",{className:"gpc-confirm-toast "+("danger"===a?"gpc-confirm-toast-danger":""),children:[N.jsx("p",{className:"gpc-confirm-toast-message",children:r}),N.jsxs("div",{className:"gpc-confirm-toast-actions",children:[N.jsx("button",{onClick:t,className:"gpc-confirm-toast-button gpc-confirm-toast-button-cancel gpc-focus-visible gpc-transition",children:i||s("conversations.cancel","Cancel")}),N.jsx("button",{onClick:()=>{n(),t()},className:"gpc-confirm-toast-button gpc-confirm-toast-button-confirm gpc-focus-visible gpc-transition",children:o||s("conversations.delete","Delete")})]})]})})},Nl=({conversations:e,totalConversations:t,currentConversationId:n,onSelectConversation:r,onNewConversation:o,onRenameConversation:i,onDeleteConversation:a,isLoadingHistory:s,hasMoreConversations:u,isLoadingMoreConversations:c,onLoadMore:d})=>{const{t:f}=V(),p=l.useRef(null),[h,g]=l.useState(null),[m,y]=l.useState(""),[v,b]=l.useState({isOpen:!1,id:null,title:""});l.useEffect(()=>{const e=new IntersectionObserver(e=>{e[0].isIntersecting&&u&&!c&&!s&&d()},{threshold:1});return p.current&&e.observe(p.current),()=>{p.current&&e.unobserve(p.current)}},[u,c,s,d]);const k=e=>{const t=new Date(e),n=new Date-t,r=Math.floor(n/6e4),o=Math.floor(n/36e5),i=Math.floor(n/864e5);return r<1?f("time.justNow","Just now"):r<60?f("time.minutesAgo",`${r} min ago`,{count:r}):o<24?f("time.hoursAgo",`${o}h ago`,{count:o}):i<7?f("time.daysAgo",`${i}d ago`,{count:i}):t.toLocaleDateString()},w=()=>{g(null),y("")},x=e=>{m.trim()&&i&&(i(e,m.trim()),g(null),y(""))};return N.jsxs("div",{className:"gpc-conversations-container",children:[N.jsxs("div",{className:"gpc-conversations-header",children:[N.jsx("h3",{className:"gpc-conversations-title",children:f("conversations.title","Conversations")}),N.jsxs("button",{onClick:o,className:"gpc-new-conversation-button gpc-focus-visible gpc-transition",disabled:s,"aria-label":f("conversations.new","New"),children:[N.jsx(re,{size:16}),N.jsx("span",{children:f("conversations.new","New")})]})]}),N.jsx("div",{className:"gpc-conversations-list",children:0===e.length?N.jsxs("div",{className:"gpc-conversations-empty",children:[N.jsx(re,{size:48,className:"gpc-conversations-empty-icon"}),N.jsx("p",{className:"gpc-conversations-empty-text",children:f("conversations.empty","No conversations yet")}),N.jsx("p",{className:"gpc-conversations-empty-hint",children:f("conversations.emptyHint","Start a conversation to see it here")})]}):N.jsxs("div",{className:"gpc-conversations-items",children:[e.map(e=>N.jsx("div",{className:`gpc-conversation-item gpc-animate-fade-in ${n===e.conversation_id?"gpc-conversation-item-active":""} ${s?"gpc-conversation-item-disabled":""}`,children:N.jsx("div",{className:"gpc-conversation-content gpc-transition",onClick:()=>h!==e.conversation_id&&!s&&r(e.conversation_id),children:h===e.conversation_id?N.jsxs("div",{className:"gpc-conversation-edit",children:[N.jsx("input",{type:"text",value:m,onChange:e=>y(e.target.value),onKeyDown:t=>{"Enter"===t.key&&x(e.conversation_id),"Escape"===t.key&&w()},className:"gpc-conversation-edit-input gpc-focus-visible",placeholder:f("conversations.untitled","Untitled conversation"),autoFocus:!0,maxLength:200}),N.jsxs("div",{className:"gpc-conversation-edit-actions",children:[N.jsx("button",{onClick:()=>x(e.conversation_id),className:"gpc-conversation-action-button gpc-conversation-action-save gpc-focus-visible gpc-transition",title:f("conversations.save","Save"),"aria-label":f("conversations.save","Save"),children:N.jsx(Y,{size:16})}),N.jsx("button",{onClick:w,className:"gpc-conversation-action-button gpc-conversation-action-cancel gpc-focus-visible gpc-transition",title:f("conversations.cancel","Cancel"),"aria-label":f("conversations.cancel","Cancel"),children:N.jsx(de,{size:16})})]})]}):N.jsxs(N.Fragment,{children:[N.jsxs("div",{className:"gpc-conversation-header",children:[N.jsx("h4",{className:"gpc-conversation-title",children:e.title||f("conversations.untitled","Untitled conversation")}),N.jsxs("div",{className:"gpc-conversation-actions",children:[N.jsx("button",{onClick:t=>{t.stopPropagation(),(e=>{g(e.conversation_id),y(e.title||"")})(e)},className:"gpc-conversation-action-button gpc-focus-visible gpc-transition",disabled:s,title:f("conversations.rename","Rename"),"aria-label":f("conversations.rename","Rename"),children:N.jsx(se,{size:16})}),N.jsx("button",{onClick:t=>{var n,r;t.stopPropagation(),n=e.conversation_id,r=e.title||f("conversations.untitled","Untitled conversation"),b({isOpen:!0,id:n,title:r||f("conversations.untitled","Untitled conversation")})},className:"gpc-conversation-action-button gpc-conversation-action-delete gpc-focus-visible gpc-transition",disabled:s,title:f("conversations.delete","Delete"),"aria-label":f("conversations.delete","Delete"),children:N.jsx(ce,{size:16})})]})]}),N.jsxs("div",{className:"gpc-conversation-metadata",children:[N.jsxs("div",{className:"gpc-conversation-meta-item",children:[N.jsx(re,{size:12}),N.jsx("span",{children:e.total_messages})]}),N.jsxs("div",{className:"gpc-conversation-meta-item",children:[N.jsx(ee,{size:12}),N.jsx("span",{children:k(e.last_modification_date)})]})]})]})})},e.conversation_id)),c&&N.jsxs("div",{className:"gpc-conversations-loading",children:[N.jsx("div",{className:"gpc-loading-spinner"}),N.jsx("span",{children:f("conversations.loadingMore","Loading more...")})]}),u&&!c&&N.jsx("div",{ref:p,style:{height:"1px"}})]})}),N.jsx(Tl,{isOpen:v.isOpen,onClose:()=>{b({isOpen:!1,id:null,title:""})},onConfirm:()=>{v.id&&a&&a(v.id),b({isOpen:!1,id:null,title:""})},message:f("conversations.confirmDelete",{title:v.title,defaultValue:`Delete "${v.title}"?`}),confirmText:f("conversations.delete","Delete"),cancelText:f("conversations.cancel","Cancel"),variant:"danger"})]})},Ol=(e="auto")=>{const[t,n]=l.useState(e),[r,o]=l.useState("light");l.useEffect(()=>{n(e)},[e]),l.useEffect(()=>{if(o("auto"===t?window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t),"auto"===t){const e=window.matchMedia("(prefers-color-scheme: dark)"),t=e=>{o(e.matches?"dark":"light")};return e.addEventListener("change",t),()=>{e.removeEventListener("change",t)}}},[t]);return{theme:r,themeMode:t,setThemeMode:n,toggleTheme:()=>{n(e=>"auto"===e?"light"===r?"dark":"light":"light"===e?"dark":"light")}}},Ll=({gpcService:e,licenseToken:t,widgetConfig:n,turnstileSiteKey:r,onClose:o,themeMode:i,showBranding:a=!0,showMetadata:s=!1,onError:u})=>{const{t:c}=V(),[d,f]=l.useState(null),[p,h]=l.useState(!1),[g,m]=l.useState(!1),[y,v]=l.useState(!0),{theme:b,toggleTheme:k}=Ol(i),w=l.useCallback(()=>{h(!1),f(null),e&&e.resetTurnstileValidation()},[e]),{messages:x,isLoading:S,sendMessage:C,currentConversationId:E,conversations:T,totalConversations:O,isLoadingHistory:L,startNewConversation:P,switchConversation:_,renameConversation:R,deleteConversation:A,isRestoringConversation:I,hasMoreConversations:j,isLoadingMoreConversations:D,loadMoreConversations:z,hasMoreMessages:M,isLoadingMoreMessages:F,loadMoreMessages:U}=((e,t,n)=>{const{t:r}=V(),[o,i]=l.useState([]),[a,s]=l.useState(!1),[u,c]=l.useState(null),[d,f]=l.useState(null),[p,h]=l.useState([]),[g,m]=l.useState(0),[y,v]=l.useState(!1),[b,k]=l.useState(!0),[w,x]=l.useState(0),[S,C]=l.useState(!0),[E,T]=l.useState(!1),[N,O]=l.useState(0),[L,P]=l.useState(!1),[_,R]=l.useState(!1),A=l.useCallback(async o=>{if(!o.trim()||a)return;if(!t)return void pt.error(r("toast.antiBotValidationPending"));const l={id:sl(),role:"user",content:o.trim(),timestamp:(new Date).toISOString()};i(e=>[...e,l]),s(!0),c(null);const u=sl(),p={id:u,role:"assistant",content:"",timestamp:(new Date).toISOString(),isStreaming:!0};i(e=>[...e,p]);try{const n=await e.sendMessage(o,t,e=>{i(t=>t.map(t=>t.id===u?{...t,content:t.content+e}:t))},d);i(e=>e.map(e=>e.id===u?{id:n.data.message_id,role:"assistant",content:n.data.response,timestamp:n.data.created_at,isStreaming:!1,metadata:{costUsd:n.data.cost_usd,creditBalanceUsd:n.data.credit_balance_usd,inputTokens:n.data.input_tokens,outputTokens:n.data.output_tokens,responseTimeMs:n.data.response_time_ms,modelUsed:n.data.model_used}}:e)),n.data.conversation_id&&f(n.data.conversation_id),z()}catch(h){let e,t;i(e=>e.filter(e=>e.id!==u));try{e=JSON.parse(h.message)}catch{e={statusCode:500,message:h.message}}const o=e.statusCode||500,a=e.errorCode||"";switch(401===o&&"SESSION_EXPIRED"===a&&(t=r("toast.sessionExpired"),n&&n()),o){case 401:t||(t=r("errors.unauthorized"));break;case 402:t=r("errors.insufficientCredits");break;case 403:t=a.includes("DOMAIN")||a.includes("UNAUTHORIZED")?r("errors.domainUnauthorized"):r("errors.validation");break;case 429:t=r("errors.rateLimit");break;case 503:case 502:case 504:t=r("errors.aiServiceUnavailable");break;case 500:t=r("errors.serverError");break;default:t=r("errors.generic")}c(t),pt.error(t,{duration:4e3,position:"top-center"});const s={id:sl(),role:"assistant",content:t,timestamp:(new Date).toISOString()};i(e=>[...e,s])}finally{s(!1)}},[e,t,a,r,n,d]),I=l.useCallback(()=>{i([]),c(null)},[]),j=l.useCallback(()=>{c(null)},[]),D=l.useCallback(async(t,n=!0)=>{if(e&&t){v(!0);try{const r=n?0:N,o=await e.getConversationHistory(t,50,r);if(o.success&&o.data.messages){const e=o.data.messages.flatMap(e=>[{id:`${e.message_id}-question`,role:"user",content:e.question,timestamp:e.creation_date},{id:e.message_id,role:"assistant",content:e.answer,timestamp:e.creation_date}]);n?(i(e),O(o.data.count)):(i(t=>[...e,...t]),O(e=>e+o.data.count)),P(o.data.has_more),f(t)}}catch(o){pt.error(r("toast.failedLoadHistory"))}finally{v(!1)}}},[e,r,N]),z=l.useCallback(async(t=!0)=>{if(e)try{const n=t?0:w,r=await e.listConversations(20,n);r.success&&r.data.conversations&&(t?(h(r.data.conversations),x(r.data.count)):(h(e=>[...e,...r.data.conversations]),x(e=>e+r.data.count)),C(r.data.has_more),m(r.data.total||0))}catch(n){}},[e,w]),M=l.useCallback(async()=>{if(e&&!E&&S){T(!0);try{await z(!1)}finally{T(!1)}}},[e,E,S,z]),F=l.useCallback(async()=>{if(e&&d&&!_&&L){R(!0);try{await D(d,!1)}finally{R(!1)}}},[e,d,_,L,D]),U=l.useCallback(()=>{i([]),f(null),c(null),e&&e.clearLastConversation(),pt.success(r("toast.newConversationStarted"))},[r,e]),B=l.useCallback(async e=>{await D(e)},[D]),$=l.useCallback(async(t,n)=>{if(e)try{await e.updateConversationTitle(t,n),await z(!0),pt.success(r("toast.conversationRenamed"))}catch(o){pt.error(r("toast.failedRenameConversation"))}},[e,z,r]),H=l.useCallback(async t=>{if(e)try{await e.deleteConversation(t),t===d&&(i([]),f(null)),await z(!0),pt.success(r("toast.conversationDeleted"))}catch(n){pt.error(r("toast.failedDeleteConversation"))}},[e,d,z,r]);return l.useEffect(()=>{(async()=>{if(e)try{const t=e.getLastConversation();t&&(i(t.messages),f(t.conversationId))}catch(t){}finally{k(!1)}else k(!1)})()},[e]),l.useEffect(()=>{e&&!b&&z()},[e,z,b]),l.useEffect(()=>{e&&o.length>0&&!b&&e.saveLastConversation(d,o)},[e,o,d,b]),{messages:o,isLoading:a,error:u,sendMessage:A,clearMessages:I,clearError:j,currentConversationId:d,conversations:p,totalConversations:g,isLoadingHistory:y,loadConversationHistory:D,loadConversations:z,startNewConversation:U,switchConversation:B,renameConversation:$,deleteConversation:H,isRestoringConversation:b,hasMoreConversations:S,isLoadingMoreConversations:E,loadMoreConversations:M,hasMoreMessages:L,isLoadingMoreMessages:_,loadMoreMessages:F}})(e,d,w),B=l.useCallback(()=>{m(e=>!e)},[]),$=l.useCallback(e=>{_(e),m(!1)},[_]),H=l.useCallback(()=>{P(),m(!1)},[P]);l.useEffect(()=>{(async()=>{v(!0),e&&e.hasValidCachedSession()&&(h(!0),f("CACHED_SESSION")),v(!1)})()},[e]);return l.useEffect(()=>()=>{e&&e.releaseSession().catch(e=>{})},[e]),N.jsxs("div",{className:"gpc-chat-window gpc-animate-fade-in "+("dark"===b?"gpc-dark":""),children:[N.jsx(mt,{onClose:o,theme:b,onToggleTheme:k,showBranding:a,widgetConfig:n,onToggleConversations:B,showConversations:g,conversationsCount:O}),y?N.jsxs("div",{className:"gpc-loading-container",children:[N.jsx("div",{className:"gpc-loading-spinner"}),N.jsx("p",{children:c("widget.validatingSession","Validating session...")})]}):p?N.jsxs(N.Fragment,{children:[N.jsx(dl,{messages:x,isLoading:S||L||I,showMetadata:s,widgetConfig:n,hasMoreMessages:M,isLoadingMoreMessages:F,onLoadMoreMessages:U}),N.jsx(hl,{onSendMessage:C,isLoading:S||I,disabled:I,gpcService:e,showBranding:a}),g&&N.jsx("div",{className:"gpc-conversations-overlay",children:N.jsx(Nl,{conversations:T,totalConversations:O,currentConversationId:E,onSelectConversation:$,onNewConversation:H,onRenameConversation:R,onDeleteConversation:A,isLoadingHistory:L,hasMoreConversations:j,isLoadingMoreConversations:D,onLoadMore:z})})]}):N.jsx(El,{siteKey:r,onSuccess:t=>{f(t),h(!0),e&&e.validateSession()},onError:u}),N.jsx(ft,{position:"top-center"})]})};function Pl(e,t){return function(){return e.apply(t,arguments)}}const{toString:_l}=Object.prototype,{getPrototypeOf:Rl}=Object,{iterator:Al,toStringTag:Il}=Symbol,jl=(e=>t=>{const n=_l.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Dl=e=>(e=e.toLowerCase(),t=>jl(t)===e),zl=e=>t=>typeof t===e,{isArray:Ml}=Array,Fl=zl("undefined");function Ul(e){return null!==e&&!Fl(e)&&null!==e.constructor&&!Fl(e.constructor)&&Vl(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Bl=Dl("ArrayBuffer");const $l=zl("string"),Vl=zl("function"),Hl=zl("number"),ql=e=>null!==e&&"object"==typeof e,Wl=e=>{if("object"!==jl(e))return!1;const t=Rl(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Il in e||Al in e)},Kl=Dl("Date"),Ql=Dl("File"),Jl=Dl("Blob"),Gl=Dl("FileList"),Yl=Dl("URLSearchParams"),[Xl,Zl,eu,tu]=["ReadableStream","Request","Response","Headers"].map(Dl);function nu(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),Ml(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Ul(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function ru(e,t){if(Ul(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const ou="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,iu=e=>!Fl(e)&&e!==ou;const au=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&Rl(Uint8Array)),su=Dl("HTMLFormElement"),lu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),uu=Dl("RegExp"),cu=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};nu(n,(n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)}),Object.defineProperties(e,r)};const du=Dl("AsyncFunction"),fu=(pu="function"==typeof setImmediate,hu=Vl(ou.postMessage),pu?setImmediate:hu?(gu=`axios@${Math.random()}`,mu=[],ou.addEventListener("message",({source:e,data:t})=>{e===ou&&t===gu&&mu.length&&mu.shift()()},!1),e=>{mu.push(e),ou.postMessage(gu,"*")}):e=>setTimeout(e));var pu,hu,gu,mu;const yu="undefined"!=typeof queueMicrotask?queueMicrotask.bind(ou):"undefined"!=typeof process&&process.nextTick||fu,vu={isArray:Ml,isArrayBuffer:Bl,isBuffer:Ul,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Vl(e.append)&&("formdata"===(t=jl(e))||"object"===t&&Vl(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Bl(e.buffer),t},isString:$l,isNumber:Hl,isBoolean:e=>!0===e||!1===e,isObject:ql,isPlainObject:Wl,isEmptyObject:e=>{if(!ql(e)||Ul(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(Ue){return!1}},isReadableStream:Xl,isRequest:Zl,isResponse:eu,isHeaders:tu,isUndefined:Fl,isDate:Kl,isFile:Ql,isBlob:Jl,isRegExp:uu,isFunction:Vl,isStream:e=>ql(e)&&Vl(e.pipe),isURLSearchParams:Yl,isTypedArray:au,isFileList:Gl,forEach:nu,merge:function e(){const{caseless:t,skipUndefined:n}=iu(this)&&this||{},r={},o=(o,i)=>{const a=t&&ru(r,i)||i;Wl(r[a])&&Wl(o)?r[a]=e(r[a],o):Wl(o)?r[a]=e({},o):Ml(o)?r[a]=o.slice():n&&Fl(o)||(r[a]=o)};for(let i=0,a=arguments.length;i<a;i++)arguments[i]&&nu(arguments[i],o);return r},extend:(e,t,n,{allOwnKeys:r}={})=>(nu(t,(t,r)=>{n&&Vl(t)?e[r]=Pl(t,n):e[r]=t},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&Rl(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:jl,kindOfTest:Dl,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(Ml(e))return e;let t=e.length;if(!Hl(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Al]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:su,hasOwnProperty:lu,hasOwnProp:lu,reduceDescriptors:cu,freezeMethods:e=>{cu(e,(t,n)=>{if(Vl(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];Vl(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return Ml(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:ru,global:ou,isContextDefined:iu,isSpecCompliantForm:function(e){return!!(e&&Vl(e.append)&&"FormData"===e[Il]&&e[Al])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(ql(e)){if(t.indexOf(e)>=0)return;if(Ul(e))return e;if(!("toJSON"in e)){t[r]=e;const o=Ml(e)?[]:{};return nu(e,(e,t)=>{const i=n(e,r+1);!Fl(i)&&(o[t]=i)}),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:du,isThenable:e=>e&&(ql(e)||Vl(e))&&Vl(e.then)&&Vl(e.catch),setImmediate:fu,asap:yu,isIterable:e=>null!=e&&Vl(e[Al])};function bu(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}vu.inherits(bu,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:vu.toJSONObject(this.config),code:this.code,status:this.status}}});const ku=bu.prototype,wu={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{wu[e]={value:e}}),Object.defineProperties(bu,wu),Object.defineProperty(ku,"isAxiosError",{value:!0}),bu.from=(e,t,n,r,o,i)=>{const a=Object.create(ku);vu.toFlatObject(e,a,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const s=e&&e.message?e.message:"Error",l=null==t&&e?e.code:t;return bu.call(a,s,l,n,r,o),e&&null==a.cause&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",i&&Object.assign(a,i),a};function xu(e){return vu.isPlainObject(e)||vu.isArray(e)}function Su(e){return vu.endsWith(e,"[]")?e.slice(0,-2):e}function Cu(e,t,n){return e?e.concat(t).map(function(e,t){return e=Su(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const Eu=vu.toFlatObject(vu,{},null,function(e){return/^is[A-Z]/.test(e)});function Tu(e,t,n){if(!vu.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=vu.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!vu.isUndefined(t[e])})).metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&vu.isSpecCompliantForm(t);if(!vu.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(vu.isDate(e))return e.toISOString();if(vu.isBoolean(e))return e.toString();if(!s&&vu.isBlob(e))throw new bu("Blob is not supported. Use a Buffer instead.");return vu.isArrayBuffer(e)||vu.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let s=e;if(e&&!o&&"object"==typeof e)if(vu.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(vu.isArray(e)&&function(e){return vu.isArray(e)&&!e.some(xu)}(e)||(vu.isFileList(e)||vu.endsWith(n,"[]"))&&(s=vu.toArray(e)))return n=Su(n),s.forEach(function(e,r){!vu.isUndefined(e)&&null!==e&&t.append(!0===a?Cu([n],r,i):null===a?n:n+"[]",l(e))}),!1;return!!xu(e)||(t.append(Cu(o,n,i),l(e)),!1)}const c=[],d=Object.assign(Eu,{defaultVisitor:u,convertValue:l,isVisitable:xu});if(!vu.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!vu.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+r.join("."));c.push(n),vu.forEach(n,function(n,i){!0===(!(vu.isUndefined(n)||null===n)&&o.call(t,n,vu.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])}),c.pop()}}(e),t}function Nu(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Ou(e,t){this._pairs=[],e&&Tu(e,this,t)}const Lu=Ou.prototype;function Pu(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function _u(e,t,n){if(!t)return e;const r=n&&n.encode||Pu;vu.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(i=o?o(t,n):vu.isURLSearchParams(t)?t.toString():new Ou(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}Lu.append=function(e,t){this._pairs.push([e,t])},Lu.toString=function(e){const t=e?function(t){return e.call(this,t,Nu)}:Nu;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class Ru{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){vu.forEach(this.handlers,function(t){null!==t&&e(t)})}}const Au={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Iu={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Ou,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},ju="undefined"!=typeof window&&"undefined"!=typeof document,Du="object"==typeof navigator&&navigator||void 0,zu=ju&&(!Du||["ReactNative","NativeScript","NS"].indexOf(Du.product)<0),Mu="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Fu=ju&&window.location.href||"http://localhost",Uu={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ju,hasStandardBrowserEnv:zu,hasStandardBrowserWebWorkerEnv:Mu,navigator:Du,origin:Fu},Symbol.toStringTag,{value:"Module"})),...Iu};function Bu(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&vu.isArray(r)?r.length:i,s)return vu.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a;r[i]&&vu.isObject(r[i])||(r[i]=[]);return t(e,n,r[i],o)&&vu.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!a}if(vu.isFormData(e)&&vu.isFunction(e.entries)){const n={};return vu.forEachEntry(e,(e,r)=>{t(function(e){return vu.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const $u={transitional:Au,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=vu.isObject(e);o&&vu.isHTMLForm(e)&&(e=new FormData(e));if(vu.isFormData(e))return r?JSON.stringify(Bu(e)):e;if(vu.isArrayBuffer(e)||vu.isBuffer(e)||vu.isStream(e)||vu.isFile(e)||vu.isBlob(e)||vu.isReadableStream(e))return e;if(vu.isArrayBufferView(e))return e.buffer;if(vu.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Tu(e,new Uu.classes.URLSearchParams,{visitor:function(e,t,n,r){return Uu.isNode&&vu.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=vu.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Tu(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(vu.isString(e))try{return(t||JSON.parse)(e),vu.trim(e)}catch(Ue){if("SyntaxError"!==Ue.name)throw Ue}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||$u.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(vu.isResponse(e)||vu.isReadableStream(e))return e;if(e&&vu.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(Ue){if(n){if("SyntaxError"===Ue.name)throw bu.from(Ue,bu.ERR_BAD_RESPONSE,this,null,this.response);throw Ue}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Uu.classes.FormData,Blob:Uu.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};vu.forEach(["delete","get","head","post","put","patch"],e=>{$u.headers[e]={}});const Vu=vu.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Hu=Symbol("internals");function qu(e){return e&&String(e).trim().toLowerCase()}function Wu(e){return!1===e||null==e?e:vu.isArray(e)?e.map(Wu):String(e)}function Ku(e,t,n,r,o){return vu.isFunction(r)?r.call(this,t,n):(o&&(t=n),vu.isString(t)?vu.isString(r)?-1!==t.indexOf(r):vu.isRegExp(r)?r.test(t):void 0:void 0)}let Qu=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=qu(t);if(!o)throw new Error("header name must be a non-empty string");const i=vu.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Wu(e))}const i=(e,t)=>vu.forEach(e,(e,n)=>o(e,n,t));if(vu.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(vu.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&Vu[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(vu.isObject(e)&&vu.isIterable(e)){let n,r,o={};for(const t of e){if(!vu.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?vu.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=qu(e)){const n=vu.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(vu.isFunction(t))return t.call(this,e,n);if(vu.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=qu(e)){const n=vu.findKey(this,e);return!(!n||void 0===this[n]||t&&!Ku(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=qu(e)){const o=vu.findKey(n,e);!o||t&&!Ku(0,n[o],o,t)||(delete n[o],r=!0)}}return vu.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!Ku(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return vu.forEach(this,(r,o)=>{const i=vu.findKey(n,o);if(i)return t[i]=Wu(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();a!==o&&delete t[o],t[a]=Wu(r),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return vu.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&vu.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[Hu]=this[Hu]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=qu(e);t[r]||(!function(e,t){const n=vu.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return vu.isArray(e)?e.forEach(r):r(e),this}};function Ju(e,t){const n=this||$u,r=t||n,o=Qu.from(r.headers);let i=r.data;return vu.forEach(e,function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Gu(e){return!(!e||!e.__CANCEL__)}function Yu(e,t,n){bu.call(this,null==e?"canceled":e,bu.ERR_CANCELED,t,n),this.name="CanceledError"}function Xu(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new bu("Request failed with status code "+n.status,[bu.ERR_BAD_REQUEST,bu.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}Qu.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),vu.reduceDescriptors(Qu.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),vu.freezeMethods(Qu),vu.inherits(Yu,bu,{__CANCEL__:!0});const Zu=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),u=r[a];o||(o=l),n[i]=s,r[i]=l;let c=a,d=0;for(;c!==i;)d+=n[c++],c%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o<t)return;const f=u&&l-u;return f?Math.round(1e3*d/f):void 0}}(50,250);return function(e,t){let n,r,o=0,i=1e3/t;const a=(t,i=Date.now())=>{o=i,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?a(e,t):(n=e,r||(r=setTimeout(()=>{r=null,a(n)},i-s)))},()=>n&&a(n)]}(n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,s=i-r,l=o(s);r=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&i<=a?(a-i)/l:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})},n)},ec=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},tc=e=>(...t)=>vu.asap(()=>e(...t)),nc=Uu.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Uu.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Uu.origin),Uu.navigator&&/(msie|trident)/i.test(Uu.navigator.userAgent)):()=>!0,rc=Uu.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];vu.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),vu.isString(r)&&a.push("path="+r),vu.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function oc(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const ic=e=>e instanceof Qu?{...e}:e;function ac(e,t){t=t||{};const n={};function r(e,t,n,r){return vu.isPlainObject(e)&&vu.isPlainObject(t)?vu.merge.call({caseless:r},e,t):vu.isPlainObject(t)?vu.merge({},t):vu.isArray(t)?t.slice():t}function o(e,t,n,o){return vu.isUndefined(t)?vu.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!vu.isUndefined(t))return r(void 0,t)}function a(e,t){return vu.isUndefined(t)?vu.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,n)=>o(ic(e),ic(t),0,!0)};return vu.forEach(Object.keys({...e,...t}),function(r){const i=l[r]||o,a=i(e[r],t[r],r);vu.isUndefined(a)&&i!==s||(n[r]=a)}),n}const sc=e=>{const t=ac({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;if(t.headers=a=Qu.from(a),t.url=_u(oc(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),vu.isFormData(n))if(Uu.hasStandardBrowserEnv||Uu.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(vu.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&a.set(e,n)})}if(Uu.hasStandardBrowserEnv&&(r&&vu.isFunction(r)&&(r=r(t)),r||!1!==r&&nc(t.url))){const e=o&&i&&rc.read(i);e&&a.set(o,e)}return t},lc="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=sc(e);let o=r.data;const i=Qu.from(r.headers).normalize();let a,s,l,u,c,{responseType:d,onUploadProgress:f,onDownloadProgress:p}=r;function h(){u&&u(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let g=new XMLHttpRequest;function m(){if(!g)return;const r=Qu.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());Xu(function(e){t(e),h()},function(e){n(e),h()},{data:d&&"text"!==d&&"json"!==d?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:e,request:g}),g=null}g.open(r.method.toUpperCase(),r.url,!0),g.timeout=r.timeout,"onloadend"in g?g.onloadend=m:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(m)},g.onabort=function(){g&&(n(new bu("Request aborted",bu.ECONNABORTED,e,g)),g=null)},g.onerror=function(t){const r=new bu(t&&t.message?t.message:"Network Error",bu.ERR_NETWORK,e,g);r.event=t||null,n(r),g=null},g.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||Au;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new bu(t,o.clarifyTimeoutError?bu.ETIMEDOUT:bu.ECONNABORTED,e,g)),g=null},void 0===o&&i.setContentType(null),"setRequestHeader"in g&&vu.forEach(i.toJSON(),function(e,t){g.setRequestHeader(t,e)}),vu.isUndefined(r.withCredentials)||(g.withCredentials=!!r.withCredentials),d&&"json"!==d&&(g.responseType=r.responseType),p&&([l,c]=Zu(p,!0),g.addEventListener("progress",l)),f&&g.upload&&([s,u]=Zu(f),g.upload.addEventListener("progress",s),g.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(a=t=>{g&&(n(!t||t.type?new Yu(null,e,g):t),g.abort(),g=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const y=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);y&&-1===Uu.protocols.indexOf(y)?n(new bu("Unsupported protocol "+y+":",bu.ERR_BAD_REQUEST,e)):g.send(o||null)})},uc=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof bu?t:new Yu(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new bu(`timeout ${t} of ms exceeded`,bu.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:s}=r;return s.unsubscribe=()=>vu.asap(a),s}},cc=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},dc=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},fc=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of dc(e))yield*cc(n,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return s(),void e.close();let i=r.byteLength;if(n){let e=a+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(t){throw s(t),t}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},{isFunction:pc}=vu,hc=(({Request:e,Response:t})=>({Request:e,Response:t}))(vu.global),{ReadableStream:gc,TextEncoder:mc}=vu.global,yc=(e,...t)=>{try{return!!e(...t)}catch(Ue){return!1}},vc=e=>{e=vu.merge.call({skipUndefined:!0},hc,e);const{fetch:t,Request:n,Response:r}=e,o=t?pc(t):"function"==typeof fetch,i=pc(n),a=pc(r);if(!o)return!1;const s=o&&pc(gc),l=o&&("function"==typeof mc?(e=>t=>e.encode(t))(new mc):async e=>new Uint8Array(await new n(e).arrayBuffer())),u=i&&s&&yc(()=>{let e=!1;const t=new n(Uu.origin,{body:new gc,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),c=a&&s&&yc(()=>vu.isReadableStream(new r("").body)),d={stream:c&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!d[e]&&(d[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new bu(`Response type '${e}' is not supported`,bu.ERR_NOT_SUPPORT,n)})});const f=async(e,t)=>{const r=vu.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(vu.isBlob(e))return e.size;if(vu.isSpecCompliantForm(e)){const t=new n(Uu.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return vu.isArrayBufferView(e)||vu.isArrayBuffer(e)?e.byteLength:(vu.isURLSearchParams(e)&&(e+=""),vu.isString(e)?(await l(e)).byteLength:void 0)})(t):r};return async e=>{let{url:o,method:a,data:s,signal:l,cancelToken:p,timeout:h,onDownloadProgress:g,onUploadProgress:m,responseType:y,headers:v,withCredentials:b="same-origin",fetchOptions:k}=sc(e),w=t||fetch;y=y?(y+"").toLowerCase():"text";let x=uc([l,p&&p.toAbortSignal()],h),S=null;const C=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let E;try{if(m&&u&&"get"!==a&&"head"!==a&&0!==(E=await f(v,s))){let e,t=new n(o,{method:"POST",body:s,duplex:"half"});if(vu.isFormData(s)&&(e=t.headers.get("content-type"))&&v.setContentType(e),t.body){const[e,n]=ec(E,Zu(tc(m)));s=fc(t.body,65536,e,n)}}vu.isString(b)||(b=b?"include":"omit");const t=i&&"credentials"in n.prototype,l={...k,signal:x,method:a.toUpperCase(),headers:v.normalize().toJSON(),body:s,duplex:"half",credentials:t?b:void 0};S=i&&new n(o,l);let p=await(i?w(S,k):w(o,l));const h=c&&("stream"===y||"response"===y);if(c&&(g||h&&C)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=p[t]});const t=vu.toFiniteNumber(p.headers.get("content-length")),[n,o]=g&&ec(t,Zu(tc(g),!0))||[];p=new r(fc(p.body,65536,n,()=>{o&&o(),C&&C()}),e)}y=y||"text";let T=await d[vu.findKey(d,y)||"text"](p,e);return!h&&C&&C(),await new Promise((t,n)=>{Xu(t,n,{data:T,headers:Qu.from(p.headers),status:p.status,statusText:p.statusText,config:e,request:S})})}catch(T){if(C&&C(),T&&"TypeError"===T.name&&/Load failed|fetch/i.test(T.message))throw Object.assign(new bu("Network Error",bu.ERR_NETWORK,e,S),{cause:T.cause||T});throw bu.from(T,T&&T.code,e,S)}}},bc=new Map,kc=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:o}=t,i=[r,o,n];let a,s,l=i.length,u=bc;for(;l--;)a=i[l],s=u.get(a),void 0===s&&u.set(a,s=l?new Map:vc(t)),u=s;return s};kc();const wc={http:null,xhr:lc,fetch:{get:kc}};vu.forEach(wc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(Ue){}Object.defineProperty(e,"adapterName",{value:t})}});const xc=e=>`- ${e}`,Sc=e=>vu.isFunction(e)||null===e||!1===e,Cc=(e,t)=>{e=vu.isArray(e)?e:[e];const{length:n}=e;let r,o;const i={};for(let a=0;a<n;a++){let n;if(r=e[a],o=r,!Sc(r)&&(o=wc[(n=String(r)).toLowerCase()],void 0===o))throw new bu(`Unknown adapter '${n}'`);if(o&&(vu.isFunction(o)||(o=o.get(t))))break;i[n||"#"+a]=o}if(!o){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new bu("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(xc).join("\n"):" "+xc(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o};function Ec(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Yu(null,e)}function Tc(e){Ec(e),e.headers=Qu.from(e.headers),e.data=Ju.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Cc(e.adapter||$u.adapter,e)(e).then(function(t){return Ec(e),t.data=Ju.call(e,e.transformResponse,t),t.headers=Qu.from(t.headers),t},function(t){return Gu(t)||(Ec(e),t&&t.response&&(t.response.data=Ju.call(e,e.transformResponse,t.response),t.response.headers=Qu.from(t.response.headers))),Promise.reject(t)})}const Nc="1.12.2",Oc={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Oc[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Lc={};Oc.transitional=function(e,t,n){return(r,o,i)=>{if(!1===e)throw new bu(function(e,t){return"[Axios v"+Nc+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}(o," has been removed"+(t?" in "+t:"")),bu.ERR_DEPRECATED);return t&&!Lc[o]&&(Lc[o]=!0),!e||e(r,o,i)}},Oc.spelling=function(e){return(e,t)=>!0};const Pc={assertOptions:function(e,t,n){if("object"!=typeof e)throw new bu("options must be an object",bu.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const t=e[i],n=void 0===t||a(t,i,e);if(!0!==n)throw new bu("option "+i+" must be "+n,bu.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new bu("Unknown option "+i,bu.ERR_BAD_OPTION)}},validators:Oc},_c=Pc.validators;let Rc=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Ru,response:new Ru}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{n.stack?t&&!String(n.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+t):n.stack=t}catch(Ue){}}throw n}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=ac(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&Pc.assertOptions(n,{silentJSONParsing:_c.transitional(_c.boolean),forcedJSONParsing:_c.transitional(_c.boolean),clarifyTimeoutError:_c.transitional(_c.boolean)},!1),null!=r&&(vu.isFunction(r)?t.paramsSerializer={serialize:r}:Pc.assertOptions(r,{encode:_c.function,serialize:_c.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Pc.assertOptions(t,{baseUrl:_c.spelling("baseURL"),withXsrfToken:_c.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&vu.merge(o.common,o[t.method]);o&&vu.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=Qu.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))});const l=[];let u;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let c,d=0;if(!s){const e=[Tc.bind(this),void 0];for(e.unshift(...a),e.push(...l),c=e.length,u=Promise.resolve(t);d<c;)u=u.then(e[d++],e[d++]);return u}c=a.length;let f=t;for(;d<c;){const e=a[d++],t=a[d++];try{f=e(f)}catch(p){t.call(this,p);break}}try{u=Tc.call(this,f)}catch(p){return Promise.reject(p)}for(d=0,c=l.length;d<c;)u=u.then(l[d++],l[d++]);return u}getUri(e){return _u(oc((e=ac(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};vu.forEach(["delete","get","head","options"],function(e){Rc.prototype[e]=function(t,n){return this.request(ac(n||{},{method:e,url:t,data:(n||{}).data}))}}),vu.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,o){return this.request(ac(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Rc.prototype[e]=t(),Rc.prototype[e+"Form"]=t(!0)});const Ac={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ac).forEach(([e,t])=>{Ac[t]=e});const Ic=function e(t){const n=new Rc(t),r=Pl(Rc.prototype.request,n);return vu.extend(r,Rc.prototype,n,{allOwnKeys:!0}),vu.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(ac(t,n))},r}($u);Ic.Axios=Rc,Ic.CanceledError=Yu,Ic.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new Yu(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},Ic.isCancel=Gu,Ic.VERSION=Nc,Ic.toFormData=Tu,Ic.AxiosError=bu,Ic.Cancel=Ic.CanceledError,Ic.all=function(e){return Promise.all(e)},Ic.spread=function(e){return function(t){return e.apply(null,t)}},Ic.isAxiosError=function(e){return vu.isObject(e)&&!0===e.isAxiosError},Ic.mergeConfig=ac,Ic.AxiosHeaders=Qu,Ic.formToJSON=e=>Bu(vu.isHTMLForm(e)?new FormData(e):e),Ic.getAdapter=Cc,Ic.HttpStatusCode=Ac,Ic.default=Ic;const{Axios:jc,AxiosError:Dc,CanceledError:zc,isCancel:Mc,CancelToken:Fc,VERSION:Uc,all:Bc,Cancel:$c,isAxiosError:Vc,spread:Hc,toFormData:qc,AxiosHeaders:Wc,HttpStatusCode:Kc,formToJSON:Qc,getAdapter:Jc,mergeConfig:Gc}=Ic;class Yc{constructor(e,t){this.licenseToken=t,this.baseURL=e||qs,this.client=Ic.create({baseURL:this.baseURL,timeout:ol,headers:{"Content-Type":"application/json"}}),this.client.interceptors.request.use(e=>(this.licenseToken&&(e.headers.Authorization=`Bearer ${this.licenseToken}`),e))}handleError(e){if(e.response){const t=e.response.data,n={statusCode:e.response.status,errorCode:t.error_code||"UNKNOWN_ERROR",message:t.message||"Request failed",retryAfter:t.retry_after_seconds||null};throw new Error(JSON.stringify(n))}throw e.request?new Error(JSON.stringify({statusCode:503,errorCode:"NETWORK_ERROR",message:"No response from server",retryAfter:null})):new Error(JSON.stringify({statusCode:500,errorCode:"INTERNAL_ERROR",message:e.message,retryAfter:null}))}async get(e,t={}){try{return(await this.client.get(e,t)).data}catch(n){this.handleError(n)}}async post(e,t,n={}){try{return(await this.client.post(e,t,n)).data}catch(r){this.handleError(r)}}async put(e,t,n={}){try{return(await this.client.put(e,t,n)).data}catch(r){this.handleError(r)}}async patch(e,t,n={}){try{return(await this.client.patch(e,t,n)).data}catch(r){this.handleError(r)}}async delete(e,t={}){try{return(await this.client.delete(e,t)).data}catch(n){this.handleError(n)}}getClient(){return this.client}}class Xc{constructor(e="tiagpc"){this.prefix=e}_getKey(e){return`${this.prefix}_${e}`}set(e,t){try{const n=this._getKey(e),r=JSON.stringify(t);return localStorage.setItem(n,r),!0}catch(n){return!1}}get(e){try{const t=this._getKey(e),n=localStorage.getItem(t);return null===n?null:JSON.parse(n)}catch(t){return this.remove(e),null}}remove(e){try{const t=this._getKey(e);return localStorage.removeItem(t),!0}catch(t){return!1}}has(e){const t=this._getKey(e);return null!==localStorage.getItem(t)}clear(){try{const e=Object.keys(localStorage);return e.filter(e=>e.startsWith(`${this.prefix}_`)).forEach(e=>{localStorage.removeItem(e)}),!0}catch(e){return!1}}setWithTimestamp(e,t){return this.set(e,{data:t,timestamp:Date.now()})}getWithExpiry(e,t){const n=this.get(e);if(!n||!n.timestamp)return null;return Date.now()-n.timestamp>t?(this.remove(e),null):n.data}}class Zc{constructor(e,t){this.licenseToken=e,this.httpClient=t,this.storage=new Xc("tiagpc"),this.sessionToken=this._getOrCreateSessionToken()}_generateSessionToken(){return"session_"+Array.from(crypto.getRandomValues(new Uint8Array(28))).map(e=>e.toString(16).padStart(2,"0")).join("")}_getSessionKey(){return`session_${this.licenseToken.substring(0,16)}`}_getOrCreateSessionToken(){const e=this._getSessionKey(),t=this.storage.get(e);if(t&&t.sessionToken)return t.sessionToken;const n=this._generateSessionToken();return this._saveSessionToken(n,!1),n}_saveSessionToken(e,t=!1){const n=this._getSessionKey();this.storage.set(n,{sessionToken:e,timestamp:Date.now(),validated:t})}hasValidCachedSession(){const e=this._getSessionKey(),t=this.storage.get(e);if(!t)return!1;const{validated:n,timestamp:r}=t,o=Date.now();return n&&o-r<864e5}async validateTurnstileSession(){try{return await this.httpClient.post("/validate-session",{session_token:this.sessionToken})}catch(e){return this.clearSession(),{success:!1,valid:!1}}}validateSession(){this._saveSessionToken(this.sessionToken,!0)}resetTurnstileValidation(){this._saveSessionToken(this.sessionToken,!1)}getSessionToken(){return this.sessionToken}renewSessionToken(){const e=this._generateSessionToken();return this.sessionToken=e,this._saveSessionToken(e,!1),e}clearSession(){const e=this._getSessionKey();this.storage.remove(e)}async releaseSession(){if(this.licenseToken)try{return await this.httpClient.post("/release-session",{session_token:this.sessionToken})}catch(e){}}}class ed{constructor(e,t,n){this.licenseToken=e,this.sessionToken=t,this.httpClient=n,this.storage=new Xc("tiagpc")}_getLastConversationKey(){return`last_conversation_${this.licenseToken.substring(0,16)}`}async listConversations(e=20,t=0){return await this.httpClient.get("/conversations",{params:{limit:e,offset:t},headers:{"X-Session-Token":this.sessionToken}})}async getConversationHistory(e,t=50,n=0){return await this.httpClient.get(`/conversation/${e}/history`,{params:{limit:t,offset:n}})}async getCurrentConversation(){return await this.httpClient.get("/conversation/current",{headers:{"X-Session-Token":this.sessionToken}})}saveLastConversation(e,t){const n=this._getLastConversationKey();return this.storage.setWithTimestamp(n,{conversationId:e,messages:t})}getLastConversation(e=864e5){const t=this._getLastConversationKey();return this.storage.getWithExpiry(t,e)}clearLastConversation(){const e=this._getLastConversationKey();return this.storage.remove(e)}hasLastConversation(){const e=this._getLastConversationKey();return this.storage.has(e)}async updateConversationTitle(e,t){return await this.httpClient.patch(`/conversation/${e}/title`,{new_title:t},{headers:{"X-Session-Token":this.sessionToken}})}async deleteConversation(e){return await this.httpClient.delete(`/conversation/${e}`,{headers:{"X-Session-Token":this.sessionToken}})}}class td{constructor(e,t,n){this.licenseToken=e,this.sessionToken=t,this.httpClient=n}async sendMessage(e,t,n,r=null){const o=`${this.httpClient.baseURL}/ask`,i={message:e,turnstile_token:t||"CACHED_SESSION",session_token:this.sessionToken};r&&(i.conversation_id=r);try{const e=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.licenseToken}`},body:JSON.stringify(i)});if(!e.ok){const t=await e.json().catch(()=>({}));throw new Error(JSON.stringify({statusCode:e.status,errorCode:t.error_code||"UNKNOWN_ERROR",message:t.message||"Request failed",retryAfter:t.retry_after_seconds||null}))}return await this._processSSEResponse(e,n)}catch(a){if(a.message.startsWith("{"))throw a;throw new Error(JSON.stringify({statusCode:500,errorCode:"NETWORK_ERROR",message:a.message,retryAfter:null}))}}async _processSSEResponse(e,t){const n=e.body.getReader(),r=new TextDecoder;let o="",i="",a=null,s=null;for(;;){const{done:e,value:u}=await n.read();if(e)break;o+=r.decode(u,{stream:!0});const c=o.split("\n");o=c.pop();for(const n of c){if(!n.trim()||!n.startsWith("data: "))continue;const e=n.replace("data: ","").trim();if("[DONE]"!==e)try{const n=JSON.parse(e);if("content"===n.type)i+=n.text,t&&t(n.text);else if("metadata"===n.type)a=n;else if("summary"===n.type)s=n;else if("error"===n.type)throw new Error(JSON.stringify({statusCode:n.status_code||500,errorCode:n.error_code,message:n.message,retryAfter:null}))}catch(l){if(l.message&&l.message.startsWith("{"))throw l}}}if(!s)throw new Error("No summary received from server");return{success:!0,data:{message_id:s.message_id,conversation_id:s.conversation_id,response:i,cost_usd:s.cost_usd,credit_balance_usd:s.credit_balance_usd,input_tokens:s.input_tokens,output_tokens:s.output_tokens,response_time_ms:s.response_time_ms,model_used:s.model_used,created_at:s.created_at}}}async transcribeAudio(e){const t=new FormData;t.append("file",e,"audio.webm");const n=this.httpClient.getClient();return(await n.post("/transcribe",t,{headers:{"Content-Type":"multipart/form-data"}})).data}}class nd{constructor(e,t){if(!t)throw new Error("License token is required");this.licenseToken=t,this.httpClient=new Yc(e,t),this.sessionService=new Zc(t,this.httpClient),this.conversationService=new ed(t,this.sessionService.getSessionToken(),this.httpClient),this.messageService=new td(t,this.sessionService.getSessionToken(),this.httpClient)}getSessionToken(){return this.sessionService.getSessionToken()}hasValidCachedSession(){return this.sessionService.hasValidCachedSession()}async validateTurnstileSession(){return await this.sessionService.validateTurnstileSession()}validateSession(){this.sessionService.validateSession()}resetTurnstileValidation(){this.sessionService.resetTurnstileValidation()}renewSessionToken(){const e=this.sessionService.renewSessionToken();return this.conversationService.sessionToken=e,this.messageService.sessionToken=e,e}async releaseSession(){return await this.sessionService.releaseSession()}async listConversations(e=20){return await this.conversationService.listConversations(e)}async getConversationHistory(e,t=50){return await this.conversationService.getConversationHistory(e,t)}async getCurrentConversation(){return await this.conversationService.getCurrentConversation()}saveLastConversation(e,t){return this.conversationService.saveLastConversation(e,t)}getLastConversation(e=864e5){return this.conversationService.getLastConversation(e)}clearLastConversation(){return this.conversationService.clearLastConversation()}async updateConversationTitle(e,t){return await this.conversationService.updateConversationTitle(e,t)}async deleteConversation(e){return await this.conversationService.deleteConversation(e)}async sendMessage(e,t,n,r=null){if(!this.licenseToken)throw new Error("License token is required.");const o=this.hasValidCachedSession();if(!t&&!o)throw new Error("Turnstile token is required for anti-bot validation.");return await this.messageService.sendMessage(e,t,n,r)}async transcribeAudio(e){if(!this.licenseToken)throw new Error("License token is required.");return await this.messageService.transcribeAudio(e)}async getInitConfig(){if(!this.licenseToken)throw new Error("License token is required.");return await this.httpClient.get("/init")}async checkHealth(){try{return await this.httpClient.get("/health")}catch(e){return{status:"unhealthy",error:e.message}}}}const rd=e=>"string"==typeof e,od=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},id=e=>null==e?"":""+e,ad=/###/g,sd=e=>e&&e.indexOf("###")>-1?e.replace(ad,"."):e,ld=e=>!e||rd(e),ud=(e,t,n)=>{const r=rd(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(ld(e))return{};const t=sd(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return ld(e)?{}:{obj:e,k:sd(r[o])}},cd=(e,t,n)=>{const{obj:r,k:o}=ud(e,t,Object);if(void 0!==r||1===t.length)return void(r[o]=n);let i=t[t.length-1],a=t.slice(0,t.length-1),s=ud(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=ud(e,a,Object),s?.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},dd=(e,t)=>{const{obj:n,k:r}=ud(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},fd=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?rd(e[r])||e[r]instanceof String||rd(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):fd(e[r],t[r],n):e[r]=t[r]);return e},pd=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var hd={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const gd=e=>rd(e)?e.replace(/[&<>"'\/]/g,e=>hd[e]):e;const md=[" ",",","?","!",";"],yd=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),vd=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const r=t.split(n);let o=e;for(let i=0;i<r.length;){if(!o||"object"!=typeof o)return;let e,t="";for(let a=i;a<r.length;++a)if(a!==i&&(t+=n),t+=r[a],e=o[t],void 0!==e){if(["string","number","boolean"].indexOf(typeof e)>-1&&a<r.length-1)continue;i+=a-i+1;break}o=e}return o},bd=e=>e?.replace("_","-"),kd={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){}};class wd{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||kd,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(rd(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new wd(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new wd(this.logger,e)}}var xd=new wd;class Sd{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e,...t){if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(([n,r])=>{for(let o=0;o<r;o++)n.apply(n,[e,...t])})}}}class Cd extends Sd{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):rd(n)&&o?a.push(...n.split(o)):a.push(n)));const s=dd(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&i&&rd(n)?vd(this.data?.[e]?.[t],n,o):s}addResource(e,t,n,r,o={silent:!1}){const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),cd(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(const o in n)(rd(n[o])||Array.isArray(n[o]))&&this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,o,i={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=dd(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?fd(s,n,o):s={...s,...n},cd(this.data,a,s),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var Ed={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,o)??t}),t}};const Td=Symbol("i18next/PATH_KEY");function Nd(e,t){const{[Td]:n}=e(function(){const e=[],t=Object.create(null);let n;return t.get=(r,o)=>(n?.revoke?.(),o===Td?e:(e.push(o),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}());return n.join(t?.keySeparator??".")}const Od={},Ld=e=>!rd(e)&&"boolean"!=typeof e&&"number"!=typeof e;class Pd extends Sd{constructor(e,t={}){super(),((e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=xd.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(null==e)return!1;const r=this.resolve(e,n);if(void 0===r?.res)return!1;const o=Ld(r.res);return!1!==n.returnObjects||!o}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=md.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;const o=yd.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,n,r));if(i&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:rd(o)?[o]:o};const i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return{key:e,namespaces:rd(o)?[o]:o}}translate(e,t,n){let r="object"==typeof t?{...t}:t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof r&&(r={...r}),r||(r={}),null==e)return"";"function"==typeof e&&(e=Nd(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]);const o=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],r),l=s[s.length-1];let u=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===u&&(u=":");const c=r.lng||this.language,d=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===c?.toLowerCase())return d?o?{res:`${l}${u}${a}`,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${u}${a}`:o?{res:a,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:a;const f=this.resolve(e,r);let p=f?.res;const h=f?.usedKey||a,g=f?.exactUsedKey||a,m=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,v=void 0!==r.count&&!rd(r.count),b=Pd.hasDefaultValue(r),k=v?this.pluralResolver.getSuffix(c,r.count,r):"",w=r.ordinal&&v?this.pluralResolver.getSuffix(c,r.count,{ordinal:!1}):"",x=v&&!r.ordinal&&0===r.count,S=x&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${k}`]||r[`defaultValue${w}`]||r.defaultValue;let C=p;y&&!p&&b&&(C=S);const E=Ld(C),T=Object.prototype.toString.apply(C);if(!(y&&C&&E&&["[object Number]","[object Function]","[object RegExp]"].indexOf(T)<0)||rd(m)&&Array.isArray(C))if(y&&rd(m)&&Array.isArray(p))p=p.join(m),p&&(p=this.extendTranslation(p,e,r,n));else{let t=!1,o=!1;!this.isValidLookup(p)&&b&&(t=!0,p=S),this.isValidLookup(p)||(o=!0,p=a);const s=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:p,d=b&&S!==p&&this.options.updateMissing;if(o||t||d){if(this.logger.log(d?"updateKey":"missingKey",c,l,a,d?S:p),i){const e=this.resolve(a,{...r,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let r=0;r<t.length;r++)e.push(t[r]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(r.lng||this.language):e.push(r.lng||this.language);const n=(e,t,n)=>{const o=b&&n!==p?n:s;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,o,d,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,o,d,r),this.emit("missingKey",e,l,t,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&v?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,r);x&&r[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],a+t,r[`defaultValue${t}`]||S)})}):n(e,a,S))}p=this.extendTranslation(p,e,r,f,n),o&&p===a&&this.options.appendNamespaceToMissingKey&&(p=`${l}${u}${a}`),(o||t)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${a}`:a,t?p:void 0,r))}else{if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,C,{...r,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(f.res=e,f.usedParams=this.getUsedParamsDetails(r),f):e}if(i){const e=Array.isArray(C),t=e?[]:{},n=e?g:h;for(const o in C)if(Object.prototype.hasOwnProperty.call(C,o)){const e=`${n}${i}${o}`;t[o]=b&&!p?this.translate(e,{...r,defaultValue:Ld(S)?S[o]:void 0,joinArrays:!1,ns:s}):this.translate(e,{...r,joinArrays:!1,ns:s}),t[o]===e&&(t[o]=C[o])}p=t}}return o?(f.res=p,f.usedParams=this.getUsedParamsDetails(r),f):p}extendTranslation(e,t,n,r,o){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const i=rd(e)&&(void 0!==n?.interpolation?.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(i){const t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let s=n.replace&&!rd(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),i){const t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>o?.[0]!==e[0]||n.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),n)),n.interpolation&&this.interpolator.reset()}const i=n.postProcess||this.options.postProcess,a=rd(i)?[i]:i;return null!=e&&a?.length&&!1!==n.applyPostProcessor&&(e=Ed.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,o,i,a;return rd(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(n))return;const s=this.extractFromKey(e,t),l=s.key;r=l;let u=s.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const c=void 0!==t.count&&!rd(t.count),d=c&&!t.ordinal&&0===t.count,f=void 0!==t.context&&(rd(t.context)||"number"==typeof t.context)&&""!==t.context,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(e=>{this.isValidLookup(n)||(a=e,Od[`${p[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(a)||(Od[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(r=>{if(this.isValidLookup(n))return;i=r;const a=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(a,l,r,e,t);else{let e;c&&(e=this.pluralResolver.getSuffix(r,t.count,t));const n=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(t.ordinal&&0===e.indexOf(o)&&a.push(l+e.replace(o,this.options.pluralSeparator)),a.push(l+e),d&&a.push(l+n)),f){const r=`${l}${this.options.contextSeparator||"_"}${t.context}`;a.push(r),c&&(t.ordinal&&0===e.indexOf(o)&&a.push(r+e.replace(o,this.options.pluralSeparator)),a.push(r+e),d&&a.push(r+n))}}let s;for(;s=a.pop();)this.isValidLookup(n)||(o=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:o,usedLng:i,usedNS:a}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!rd(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}class _d{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=xd.create("languageUtils")}getScriptPartFromCode(e){if(!(e=bd(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=bd(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(rd(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(Ue){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;const r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:e.indexOf("-")>0&&r.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),rd(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return rd(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):rd(e)&&o(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))}),r}}const Rd={zero:0,one:1,two:2,few:3,many:4,other:5},Ad={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Id{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=xd.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=bd("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:r});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(n,{type:r})}catch(a){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Ad;if(!e.match(/-|_/))return Ad;const n=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(n,t)}return this.pluralRulesCache[o]=i,i}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>Rd[e]-Rd[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){const r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const jd=(e,t,n,r=".",o=!0)=>{let i=((e,t,n)=>{const r=dd(e,n);return void 0!==r?r:dd(t,n)})(e,t,n);return!i&&o&&rd(n)&&(i=vd(e,n,r),void 0===i&&(i=vd(t,n,r))),i},Dd=e=>e.replace(/\$/g,"$$$$");class zd{constructor(e={}){this.logger=xd.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:l,unescapeSuffix:u,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:h,nestingOptionsSeparator:g,maxReplaces:m,alwaysFormat:y}=e.interpolation;this.escape=void 0!==t?t:gd,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?pd(o):i||"{{",this.suffix=a?pd(a):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=u?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=d?pd(d):f||pd("$t("),this.nestingSuffix=p?pd(p):h||pd(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==y&&y,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let o,i,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const o=jd(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(jd(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:i})};this.resetRegExp();const u=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,c=void 0!==r?.interpolation?.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Dd(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Dd(this.escape(e)):Dd(e)}].forEach(t=>{for(a=0;o=t.regex.exec(e);){const n=o[1].trim();if(i=l(n),void 0===i)if("function"==typeof u){const t=u(e,o,r);i=rd(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(c){i=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else rd(i)||this.useRawValueToEscape||(i=id(i));const s=t.safeValue(i);if(e=e.replace(o[0],s),c?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,o,i;const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let o=`{${r[1]}`;e=r[0],o=this.interpolate(o,i);const a=o.match(/'/g),s=o.match(/"/g);((a?.length??0)%2==0&&!s||s.length%2!=0)&&(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i={...t,...i})}catch(Ue){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,Ue),`${e}${n}${o}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];i={...n},i=i.replace&&!rd(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;const l=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==l&&(s=r[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,l)),o=t(a.call(this,r[1].trim(),i),i),o&&r[0]===e&&!rd(o))return o;rd(o)||(o=id(o)),o||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),o=""),s.length&&(o=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),o.trim())),e=e.replace(r[0],o),this.regexp.lastIndex=0}return e}}const Md=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=r+JSON.stringify(i);let s=t[a];return s||(s=e(bd(r),o),t[a]=s),s(n)}},Fd=e=>(t,n,r)=>e(bd(n),r)(t);class Ud{constructor(e={}){this.logger=xd.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?Md:Fd;this.formats={number:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:n((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Md(t)}format(e,t,n,r={}){const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(e=>e.indexOf(")")>-1)){const e=o.findIndex(e=>e.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}const i=o.reduce((e,t)=>{const{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(e=>{if(e){const[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[o]){let t=e;try{const a=r?.formatParams?.[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[o](e,s,{...i,...r,...a})}catch(a){this.logger.warn(a)}return t}return this.logger.warn(`there was no format function for ${o}`),e},e);return i}}class Bd extends Sd{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=xd.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){const o={},i={},a={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,r=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===s[t]&&(s[t]=!0)))}),r||(a[e]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),!t&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:r,k:o}=ud(e,t,Object);r[o]=r[o]||[],r[o].push(n)})(n.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,o=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*o,i)},o):i(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then(e=>a(null,e)).catch(a):a(null,n)}catch(l){a(l)}}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();rd(e)&&(e=this.languageUtils.toResolveHierarchy(e)),rd(t)&&(t=[t]);const o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,(n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)})}saveMissing(e,t,n,r,o,i={},a=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(this.backend?.create){const l={...i,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let o;o=5===u.length?u(e,t,n,r,l):u(e,t,n,r),o&&"function"==typeof o.then?o.then(e=>a(null,e)).catch(a):a(null,o)}catch(s){a(s)}else u(e,t,n,r,a,l)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}else this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const $d=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),rd(e[1])&&(t.defaultValue=e[1]),rd(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Vd=e=>(rd(e.ns)&&(e.ns=[e.ns]),rd(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),rd(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),Hd=()=>{};class qd extends Sd{constructor(e={},t){var n;if(super(),this.options=Vd(e),this.services={},this.logger=xd,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(rd(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=$d();this.options={...n,...this.options,...Vd(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator);const r=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?xd.init(r(this.modules.logger),this.options):xd.init(null,this.options),e=this.modules.formatter?this.modules.formatter:Ud;const t=new _d(this.options);this.store=new Cd(this.options.resources,this.options);const o=this.services;o.logger=xd,o.resourceStore=this.store,o.languageUtils=t,o.pluralResolver=new Id(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix});this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!e||this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format||(o.formatter=r(e),o.formatter.init&&o.formatter.init(o,this.options),this.options.interpolation.format=o.formatter.format.bind(o.formatter)),o.interpolator=new zd(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new Bd(r(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(o.languageDetector=r(this.modules.languageDetector),o.languageDetector.init&&o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=r(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new Pd(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=Hd),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});const o=od(),i=()=>{const e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?i():setTimeout(i,0),o}loadResources(e,t=Hd){let n=t;const r=rd(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===r?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return n();const e=[],t=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};if(r)t(r);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e))}this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){const r=od();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=Hd),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&Ed.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=od();this.emit("languageChanging",e);const r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(o,i)=>{i?this.isLanguageChangingTo===e&&(r(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(o,(...e)=>this.t(...e))},i=t=>{e||t||!this.services.languageDetector||(t=[]);const n=rd(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(rd(t)?[t]:t);i&&(this.language||r(i),this.translator.language||this.translator.changeLanguage(i),this.services.languageDetector?.cacheUserLanguage?.(i)),this.loadResources(i,e=>{o(e,i)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),n}getFixedT(e,t,n){const r=(e,t,...o)=>{let i;i="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(o)):{...t},i.lng=i.lng||r.lng,i.lngs=i.lngs||r.lngs,i.ns=i.ns||r.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||r.keyPrefix);const a=this.options.keySeparator||".";let s;return i.keyPrefix&&Array.isArray(e)?s=e.map(e=>("function"==typeof e&&(e=Nd(e,{...this.options,...t})),`${i.keyPrefix}${a}${e}`)):("function"==typeof e&&(e=Nd(e,{...this.options,...t})),s=i.keyPrefix?`${i.keyPrefix}${a}${e}`:e),this.t(s,i)};return rd(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){const n=od();return this.options.ns?(rd(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=od();rd(e)&&(e=[e]);const r=this.options.preload||[],o=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=r.concat(o),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(Ue){}const t=this.services?.languageUtils||new _d($d());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new qd(e,t)}cloneInstance(e={},t=Hd){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new qd(r);void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e));if(["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{});o.store=new Cd(e,r),o.services.resourceStore=o.store}return o.translator=new Pd(o.services,r),o.translator.on("*",(e,...t)=>{o.emit(e,...t)}),o.init(r,t),o.translator.options=r,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Wd=qd.createInstance();Wd.createInstance=qd.createInstance,Wd.createInstance,Wd.dir,Wd.init,Wd.loadResources,Wd.reloadResources,Wd.use,Wd.changeLanguage,Wd.getFixedT,Wd.t,Wd.exists,Wd.setDefaultNamespace,Wd.hasLoadedNamespace,Wd.loadNamespaces,Wd.loadLanguages;const{slice:Kd,forEach:Qd}=[];const Jd=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Gd={create(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+60*n*1e3)),r&&(o.domain=r),document.cookie=function(e,t){const n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"};let r=`${e}=${encodeURIComponent(t)}`;if(n.maxAge>0){const e=n.maxAge-0;if(Number.isNaN(e))throw new Error("maxAge should be a Number");r+=`; Max-Age=${Math.floor(e)}`}if(n.domain){if(!Jd.test(n.domain))throw new TypeError("option domain is invalid");r+=`; Domain=${n.domain}`}if(n.path){if(!Jd.test(n.path))throw new TypeError("option path is invalid");r+=`; Path=${n.path}`}if(n.expires){if("function"!=typeof n.expires.toUTCString)throw new TypeError("option expires is invalid");r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+="; HttpOnly"),n.secure&&(r+="; Secure"),n.sameSite)switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:r+="; SameSite=Strict";break;case"lax":r+="; SameSite=Lax";break;case"strict":r+="; SameSite=Strict";break;case"none":r+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(r+="; Partitioned"),r}(e,t,o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let e=n[r];for(;" "===e.charAt(0);)e=e.substring(1,e.length);if(0===e.indexOf(t))return e.substring(t.length,e.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var Yd={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&"undefined"!=typeof document)return Gd.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:i}=t;n&&"undefined"!=typeof document&&Gd.create(n,e,r,o,i)}},Xd={name:"querystring",lookup(e){let t,{lookupQuerystring:n}=e;if("undefined"!=typeof window){let{search:e}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(e=window.location.hash.substring(window.location.hash.indexOf("?")));const r=e.substring(1).split("&");for(let o=0;o<r.length;o++){const e=r[o].indexOf("=");if(e>0){r[o].substring(0,e)===n&&(t=r[o].substring(e+1))}}}return t}},Zd={name:"hash",lookup(e){let t,{lookupHash:n,lookupFromHashIndex:r}=e;if("undefined"!=typeof window){const{hash:e}=window.location;if(e&&e.length>2){const o=e.substring(1);if(n){const e=o.split("&");for(let r=0;r<e.length;r++){const o=e[r].indexOf("=");if(o>0){e[r].substring(0,o)===n&&(t=e[r].substring(o+1))}}}if(t)return t;if(!t&&r>-1){const t=e.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(t))return;const n="number"==typeof r?r:0;return t[n]?.replace("/","")}}}return t}};let ef=null;const tf=()=>{if(null!==ef)return ef;try{if(ef="undefined"!=typeof window&&null!==window.localStorage,!ef)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(Ue){ef=!1}return ef};var nf={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&tf())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&tf()&&window.localStorage.setItem(n,e)}};let rf=null;const of=()=>{if(null!==rf)return rf;try{if(rf="undefined"!=typeof window&&null!==window.sessionStorage,!rf)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(Ue){rf=!1}return rf};var af={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&of())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&of()&&window.sessionStorage.setItem(n,e)}},sf={name:"navigator",lookup(e){const t=[];if("undefined"!=typeof navigator){const{languages:e,userLanguage:n,language:r}=navigator;if(e)for(let o=0;o<e.length;o++)t.push(e[o]);n&&t.push(n),r&&t.push(r)}return t.length>0?t:void 0}},lf={name:"htmlTag",lookup(e){let t,{htmlTag:n}=e;const r=n||("undefined"!=typeof document?document.documentElement:null);return r&&"function"==typeof r.getAttribute&&(t=r.getAttribute("lang")),t}},uf={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if("undefined"==typeof window)return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(n))return;const r="number"==typeof t?t:0;return n[r]?.replace("/","")}},cf={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n="number"==typeof t?t+1:1,r="undefined"!=typeof window&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let df=!1;try{document.cookie,df=!0}catch(Ue){}const ff=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];df||ff.splice(1,1);class pf{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=function(e){return Qd.call(Kd.call(arguments,1),t=>{if(t)for(const n in t)void 0===e[n]&&(e[n]=t[n])}),e}(t,this.options||{},{order:ff,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Yd),this.addDetector(Xd),this.addDetector(nf),this.addDetector(af),this.addDetector(sf),this.addDetector(lf),this.addDetector(uf),this.addDetector(cf),this.addDetector(Zd)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order,t=[];return e.forEach(e=>{if(this.detectors[e]){let n=this.detectors[e].lookup(this.options);n&&"string"==typeof n&&(n=[n]),n&&(t=t.concat(n))}}),t=t.filter(e=>{return null!=e&&!("string"==typeof(t=e)&&[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(e=>e.test(t)));var t}).map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)}))}}pf.type="languageDetector";const hf={widget:{title:"TIA GPC",poweredBy:"Desarrollado por TIA GPC",questionsTo:"Preguntas a",validatingSession:"Validando sesión..."},chat:{title:"Asistente",placeholder:"Escribe tu pregunta...",send:"Enviar",close:"Cerrar",welcome:"¡Hola! Bienvenido a {{companyName}}. ¿En qué puedo ayudarte hoy?",emptyState:"Inicia una conversación escribiendo tu pregunta",validation:"Verificando seguridad...",retry:"Reintentar",loadingMore:"Cargando mensajes anteriores..."},voice:{record:"Grabar audio",recording:"Grabando...",stop:"Detener grabación",processing:"Transcribiendo audio...",error:"Error al transcribir audio",unsupported:"Tu navegador no soporta grabación de audio",permissionDenied:"Permiso de micrófono denegado"},theme:{light:"Claro",dark:"Oscuro",toggle:"Cambiar tema"},errors:{unauthorized:"Autenticación fallida. Por favor, verifica tu token de licencia e intenta nuevamente.",validation:"Verificación anti-bot fallida. Por favor, recarga la página e intenta nuevamente.",network:"No se pudo conectar al servidor. Verifica tu conexión a internet.",rateLimit:"Has realizado demasiadas consultas o se alcanzó el límite de usuarios concurrentes. Por favor, espera un momento antes de continuar.",session:"Tu sesión ha expirado por inactividad. Por favor, recarga la página para continuar.",insufficientCredits:"Créditos insuficientes. Por favor, recarga créditos desde tu panel de administración para continuar usando TIA GPC.",generic:"Ha ocurrido un error inesperado. Por favor, intenta nuevamente.",aiServiceUnavailable:"El asistente está temporalmente no disponible. Por favor, intenta de nuevo en unos momentos.",serverError:"El servidor encontró un problema. Por favor, intenta de nuevo más tarde.",domainUnauthorized:"Este dominio no está autorizado para usar este widget. Por favor, contacta a tu administrador."},turnstile:{verifying:"Verificando que eres humano...",error:"No se pudo completar la verificación de seguridad. Por favor, recarga la página e intenta nuevamente."},metadata:{tokensUsed:"Tokens usados",responseTime:"Tiempo de respuesta",model:"Modelo"},conversations:{title:"Conversaciones",new:"Nueva",empty:"No hay conversaciones aún",emptyHint:"Inicia una conversación para verla aquí",untitled:"Conversación sin título",loadingMore:"Cargando más...",toggle:"Alternar conversaciones",rename:"Renombrar",delete:"Eliminar",save:"Guardar",cancel:"Cancelar",confirmDelete:'¿Eliminar "{{title}}"?'},time:{justNow:"Justo ahora",minutesAgo:"hace {{count}} min",minutesAgo_one:"hace 1 min",minutesAgo_other:"hace {{count}} min",hoursAgo:"hace {{count}}h",hoursAgo_one:"hace 1h",hoursAgo_other:"hace {{count}}h",daysAgo:"hace {{count}}d",daysAgo_one:"hace 1d",daysAgo_other:"hace {{count}}d"},ui:{languageSelector:{label:"Cambiar idioma"},spinner:{loading:"Cargando"},typingIndicator:{typing:"Escribiendo"},message:{userMessage:"Mensaje del usuario",assistantMessage:"Mensaje del asistente"}},languages:{english:"English",spanish:"Español",french:"Français"},input:{maxCharacters:"Máximo {{count}} caracteres"},toast:{antiBotValidationPending:"Validación anti-bot pendiente",newConversationStarted:"Nueva conversación iniciada",failedLoadHistory:"No se pudo cargar el historial de la conversación",sessionExpired:"Sesión expirada, por favor verifica nuevamente",gpcServiceNotAvailable:"Servicio GPC no disponible",conversationRenamed:"Conversación renombrada exitosamente",failedRenameConversation:"No se pudo renombrar la conversación",conversationDeleted:"Conversación eliminada exitosamente",failedDeleteConversation:"No se pudo eliminar la conversación"}},gf={widget:{title:"TIA GPC",poweredBy:"Powered by TIA GPC",questionsTo:"Questions to",validatingSession:"Validating session..."},chat:{title:"Assistant",placeholder:"Type your question...",send:"Send",close:"Close",welcome:"Hello! Welcome to {{companyName}}. How can I help you today?",emptyState:"Start a conversation by typing your question",validation:"Verifying security...",retry:"Retry",loadingMore:"Loading older messages..."},voice:{record:"Record audio",recording:"Recording...",stop:"Stop recording",processing:"Transcribing audio...",error:"Error transcribing audio",unsupported:"Your browser does not support audio recording",permissionDenied:"Microphone permission denied"},theme:{light:"Light",dark:"Dark",toggle:"Toggle theme"},errors:{unauthorized:"Authentication failed. Please check your license token and try again.",validation:"Bot verification failed. Please reload the page and try again.",network:"Unable to connect to the server. Please check your internet connection.",rateLimit:"You've made too many requests or the concurrent user limit has been reached. Please wait a moment before continuing.",session:"Your session has expired due to inactivity. Please reload the page to continue.",insufficientCredits:"Insufficient credits. Please reload credits from your admin panel to continue using TIA GPC.",generic:"An unexpected error has occurred. Please try again.",aiServiceUnavailable:"The assistant is temporarily unavailable. Please try again in a few moments.",serverError:"The server encountered a problem. Please try again later.",domainUnauthorized:"This domain is not authorized to use this widget. Please contact your administrator."},turnstile:{verifying:"Verifying you're human...",error:"Security verification could not be completed. Please reload the page and try again."},metadata:{tokensUsed:"Tokens used",responseTime:"Response time",model:"Model"},conversations:{title:"Conversations",new:"New",empty:"No conversations yet",emptyHint:"Start a conversation to see it here",untitled:"Untitled conversation",loadingMore:"Loading more...",toggle:"Toggle conversations",rename:"Rename",delete:"Delete",save:"Save",cancel:"Cancel",confirmDelete:'Delete "{{title}}"?'},time:{justNow:"Just now",minutesAgo:"{{count}} min ago",minutesAgo_one:"1 min ago",minutesAgo_other:"{{count}} min ago",hoursAgo:"{{count}}h ago",hoursAgo_one:"1h ago",hoursAgo_other:"{{count}}h ago",daysAgo:"{{count}}d ago",daysAgo_one:"1d ago",daysAgo_other:"{{count}}d ago"},ui:{languageSelector:{label:"Change language"},spinner:{loading:"Loading"},typingIndicator:{typing:"Typing"},message:{userMessage:"User message",assistantMessage:"Assistant message"}},languages:{english:"English",spanish:"Español",french:"Français"},input:{maxCharacters:"Maximum {{count}} characters"},toast:{antiBotValidationPending:"Anti-bot validation pending",newConversationStarted:"New conversation started",failedLoadHistory:"Failed to load conversation history",sessionExpired:"Session expired, please verify again",gpcServiceNotAvailable:"GPC Service not available",conversationRenamed:"Conversation renamed successfully",failedRenameConversation:"Failed to rename conversation",conversationDeleted:"Conversation deleted successfully",failedDeleteConversation:"Failed to delete conversation"}},mf={widget:{title:"TIA GPC",poweredBy:"Propulsé par TIA GPC",questionsTo:"Questions à",validatingSession:"Validation de la session..."},chat:{title:"Assistant",placeholder:"Tapez votre question...",send:"Envoyer",close:"Fermer",welcome:"Bonjour ! Bienvenue à {{companyName}}. Comment puis-je vous aider aujourd'hui ?",emptyState:"Commencez une conversation en tapant votre question",validation:"Vérification de sécurité...",retry:"Réessayer",loadingMore:"Chargement des messages précédents..."},voice:{record:"Enregistrer audio",recording:"Enregistrement...",stop:"Arrêter l'enregistrement",processing:"Transcription audio...",error:"Erreur de transcription audio",unsupported:"Votre navigateur ne prend pas en charge l'enregistrement audio",permissionDenied:"Permission du microphone refusée"},theme:{light:"Clair",dark:"Sombre",toggle:"Changer de thème"},errors:{unauthorized:"Échec de l'authentification. Veuillez vérifier votre jeton de licence et réessayer.",validation:"La vérification anti-bot a échoué. Veuillez recharger la page et réessayer.",network:"Impossible de se connecter au serveur. Veuillez vérifier votre connexion internet.",rateLimit:"Vous avez fait trop de demandes ou la limite d'utilisateurs concurrents a été atteinte. Veuillez patienter un moment avant de continuer.",session:"Votre session a expiré en raison d'inactivité. Veuillez recharger la page pour continuer.",insufficientCredits:"Crédits insuffisants. Veuillez recharger des crédits depuis votre panneau d'administration pour continuer à utiliser TIA GPC.",generic:"Une erreur inattendue s'est produite. Veuillez réessayer.",aiServiceUnavailable:"L'assistant est temporairement indisponible. Veuillez réessayer dans quelques instants.",serverError:"Le serveur a rencontré un problème. Veuillez réessayer plus tard.",domainUnauthorized:"Ce domaine n'est pas autorisé à utiliser ce widget. Veuillez contacter votre administrateur."},turnstile:{verifying:"Vérification que vous êtes humain...",error:"La vérification de sécurité n'a pas pu être complétée. Veuillez recharger la page et réessayer."},metadata:{tokensUsed:"Tokens utilisés",responseTime:"Temps de réponse",model:"Modèle"},conversations:{title:"Conversations",new:"Nouvelle",empty:"Aucune conversation pour le moment",emptyHint:"Démarrez une conversation pour la voir ici",untitled:"Conversation sans titre",loadingMore:"Chargement...",toggle:"Basculer les conversations",rename:"Renommer",delete:"Supprimer",save:"Enregistrer",cancel:"Annuler",confirmDelete:'Supprimer "{{title}}" ?'},time:{justNow:"À l'instant",minutesAgo:"il y a {{count}} min",minutesAgo_one:"il y a 1 min",minutesAgo_other:"il y a {{count}} min",hoursAgo:"il y a {{count}}h",hoursAgo_one:"il y a 1h",hoursAgo_other:"il y a {{count}}h",daysAgo:"il y a {{count}}j",daysAgo_one:"il y a 1j",daysAgo_other:"il y a {{count}}j"},ui:{languageSelector:{label:"Changer de langue"},spinner:{loading:"Chargement"},typingIndicator:{typing:"Écriture en cours"},message:{userMessage:"Message de l'utilisateur",assistantMessage:"Message de l'assistant"}},languages:{english:"English",spanish:"Español",french:"Français"},input:{maxCharacters:"Maximum {{count}} caractères"},toast:{antiBotValidationPending:"Validation anti-bot en attente",newConversationStarted:"Nouvelle conversation démarrée",failedLoadHistory:"Échec du chargement de l'historique de la conversation",sessionExpired:"Session expirée, veuillez vérifier à nouveau",gpcServiceNotAvailable:"Service GPC non disponible",conversationRenamed:"Conversation renommée avec succès",failedRenameConversation:"Échec du renommage de la conversation",conversationDeleted:"Conversation supprimée avec succès",failedDeleteConversation:"Échec de la suppression de la conversation"}};Wd.use(pf).use(F).init({resources:{en:{translation:gf},es:{translation:hf},fr:{translation:mf}},fallbackLng:"en",supportedLngs:["en","es","fr"],interpolation:{escapeValue:!1},detection:{order:["localStorage","navigator"],caches:["localStorage"]}});const yf=({token:e,turnstileSiteKey:t="0x4AAAAAAB-BKyDZcYYqCbid",theme:n=Gs,position:r=Ys,language:o=Xs,primaryColor:i,width:a=Zs,height:s=el,apiUrl:u=qs,onReady:c,onError:d,onClose:f,autoOpen:p=tl,showBranding:h=nl,mobileFullscreen:g=rl,...m})=>{const[y,v]=l.useState(!1),[b,k]=l.useState(null),[w,x]=l.useState(!0),[S,C]=l.useState(!1),E=l.useMemo(()=>new nd(u,e),[u,e]);if(l.useEffect(()=>{const e=()=>{v(window.innerWidth<Js)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),l.useEffect(()=>{const e=b?.widget_customization?.language||o;e&&Wd.changeLanguage&&Wd.changeLanguage(e)},[o,b]),l.useEffect(()=>{(async()=>{if(e)try{const e=await E.getInitConfig();if(e.success){k(e.data);(e.data?.widget_customization?.behavior?.auto_open??p)&&C(!0),c&&c(e.data)}}catch(t){d&&d(t)}finally{x(!1)}else x(!1)})()},[e,E,c,d,p]),l.useEffect(()=>{const e=()=>{if(!E)return;const e=E.getSessionToken(),t=E.httpClient.baseURL,n=E.licenseToken;fetch(`${t}/release-session`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`},body:JSON.stringify({session_token:e}),keepalive:!0}).catch(()=>{})};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}},[E]),!e)return null;const T=b?.widget_customization?.theme||n;return N.jsx(H,{i18n:Wd,children:N.jsxs("div",{className:`gpc-widget gpc-widget-container ${(()=>{const e=b?.widget_customization?.position||r;return y&&(b?.widget_customization?.behavior?.mobile_fullscreen??g)?"gpc-position-bottom-right":`gpc-position-${e}`})()} ${"dark"===T?"gpc-dark":""}`,style:(()=>{const e={},t=b?.widget_customization?.colors?.primary||i,n=b?.widget_customization?.colors?.header_background,r=b?.widget_customization?.colors?.header_text;t&&(e["--gpc-color-primary"]=t),n&&(e["--gpc-header-bg"]=n),r&&(e["--gpc-header-text"]=r);const o=b?.widget_customization?.dimensions?.width||a,l=b?.widget_customization?.dimensions?.height||s;return y&&(b?.widget_customization?.behavior?.mobile_fullscreen??g)||(o&&(e["--gpc-widget-width"]=o),l&&(e["--gpc-widget-height"]=l)),e})(),children:[!S&&N.jsx(fe,{onClick:()=>C(!0),widgetConfig:b}),S&&!w&&N.jsx(Ll,{gpcService:E,licenseToken:e,widgetConfig:b,turnstileSiteKey:t,onClose:()=>{C(!1),f?.()},themeMode:T,showBranding:h,showMetadata:m.showMetadata||!1,onError:d})]})})};yf.defaultProps={theme:"auto",position:"bottom-right",language:"en",width:"400px",height:"600px",autoOpen:!1,showBranding:!0,mobileFullscreen:!0};class vf extends HTMLElement{constructor(){super(),this.root=null,this.mountPoint=null}static get observedAttributes(){return["token","theme","position","language","primary-color","width","height","api-url","turnstile-site-key","auto-open","show-branding","mobile-fullscreen"]}connectedCallback(){this.mountPoint=document.createElement("div"),this.mountPoint.className="tia-gpc-mount",this.appendChild(this.mountPoint),this.root=C.createRoot(this.mountPoint),this.render()}disconnectedCallback(){this.root&&(this.root.unmount(),this.root=null)}attributeChangedCallback(e,t,n){t!==n&&this.root&&this.render()}getProps(){const e={},t=this.getAttribute("token");t&&(e.token=t);const n=this.getAttribute("theme");n&&(e.theme=n);const r=this.getAttribute("position");r&&(e.position=r);const o=this.getAttribute("language");o&&(e.language=o);const i=this.getAttribute("primary-color");i&&(e.primaryColor=i);const a=this.getAttribute("width");a&&(e.width=a);const s=this.getAttribute("height");s&&(e.height=s);const l=this.getAttribute("api-url");l&&(e.apiUrl=l);const u=this.getAttribute("turnstile-site-key");u&&(e.turnstileSiteKey=u);const c=this.getAttribute("auto-open");null!==c&&(e.autoOpen="false"!==c);const d=this.getAttribute("show-branding");null!==d&&(e.showBranding="false"!==d);const f=this.getAttribute("mobile-fullscreen");return null!==f&&(e.mobileFullscreen="false"!==f),e.onReady=()=>{this.dispatchEvent(new CustomEvent("ready",{bubbles:!0,composed:!0}))},e.onError=e=>{this.dispatchEvent(new CustomEvent("error",{bubbles:!0,composed:!0,detail:e}))},e.onClose=()=>{this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))},e}render(){if(!this.root)return;const e=this.getProps();this.root.render(u.createElement(yf,e))}open(){this.dispatchEvent(new CustomEvent("open-widget",{bubbles:!0,composed:!0}))}close(){this.dispatchEvent(new CustomEvent("close-widget",{bubbles:!0,composed:!0}))}}"undefined"==typeof window||customElements.get("tia-gpc-widget")||customElements.define("tia-gpc-widget",vf),window.TiaGPC={version:"2.0.1",POSITIONS:Ws,THEMES:Ks,LANGUAGES:Qs,create(e){if(!e||!e.token)throw new Error('TiaGPC.create(): El parámetro "token" es requerido');const t=document.createElement("tia-gpc-widget");t.setAttribute("token",e.token),e.theme&&t.setAttribute("theme",e.theme),e.position&&t.setAttribute("position",e.position),e.language&&t.setAttribute("language",e.language),e.primaryColor&&t.setAttribute("primary-color",e.primaryColor),e.width&&t.setAttribute("width",e.width),e.height&&t.setAttribute("height",e.height),e.apiUrl&&t.setAttribute("api-url",e.apiUrl),e.turnstileSiteKey&&t.setAttribute("turnstile-site-key",e.turnstileSiteKey),void 0!==e.autoOpen&&t.setAttribute("auto-open",String(e.autoOpen)),void 0!==e.showBranding&&t.setAttribute("show-branding",String(e.showBranding)),void 0!==e.mobileFullscreen&&t.setAttribute("mobile-fullscreen",String(e.mobileFullscreen)),e.onReady&&t.addEventListener("ready",e.onReady),e.onError&&t.addEventListener("error",t=>e.onError(t.detail)),e.onClose&&t.addEventListener("close",e.onClose);return(e.container||document.body).appendChild(t),t},info(){return{version:this.version,positions:this.POSITIONS,themes:this.THEMES,languages:this.LANGUAGES}}};const bf=window.TiaGPC;return e.TiaGPCWebComponent=vf,e.default=bf,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),e}({});
206
206
  //# sourceMappingURL=tia-gpc-widget.standalone.js.map