@moveo-ai/web-client 0.91.0 → 0.92.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/147.min.js.LICENSE.txt +1 -1
- package/dist/329.min.js.LICENSE.txt +1 -1
- package/dist/audio-client.min.js +1 -1
- package/dist/audio-client.min.js.LICENSE.txt +1 -1
- package/dist/audio-client.min.js.map +1 -1
- package/dist/iframe.min.js.LICENSE.txt +1 -1
- package/dist/iframe.v2.min.js.LICENSE.txt +1 -1
- package/dist/index.html +1 -1
- package/dist/preview/index.html +2 -2
- package/dist/preview.css.min.js.LICENSE.txt +1 -1
- package/dist/web-client.min.js.LICENSE.txt +1 -1
- package/package.json +1 -1
package/dist/audio-client.min.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see audio-client.min.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("MoveoAudio",[],t):"object"==typeof exports?exports.MoveoAudio=t():e.MoveoAudio=t()}(this,function(){return function(){var e,t,n,i,r={1613:function(e,t){"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var i=n-1>>>1,r=e[i];if(!(0<o(r,t)))break e;e[i]=t,e[n]=r,n=i}}function i(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 i=0,r=e.length,s=r>>>1;i<s;){var a=2*(i+1)-1,l=e[a],c=a+1,u=e[c];if(0>o(l,n))c<r&&0>o(u,l)?(e[i]=u,e[c]=n,i=c):(e[i]=l,e[a]=n,i=a);else{if(!(c<r&&0>o(u,n)))break e;e[i]=u,e[c]=n,i=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var a=Date,l=a.now();t.unstable_now=function(){return a.now()-l}}var c=[],u=[],d=1,h=null,p=3,f=!1,g=!1,m=!1,v="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,_="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var t=i(u);null!==t;){if(null===t.callback)r(u);else{if(!(t.startTime<=e))break;r(u),t.sortIndex=t.expirationTime,n(c,t)}t=i(u)}}function w(e){if(m=!1,b(e),!g)if(null!==i(c))g=!0,D(S);else{var t=i(u);null!==t&&A(w,t.startTime-e)}}function S(e,n){g=!1,m&&(m=!1,y(E),E=-1),f=!0;var o=p;try{for(b(n),h=i(c);null!==h&&(!(h.expirationTime>n)||e&&!I());){var s=h.callback;if("function"==typeof s){h.callback=null,p=h.priorityLevel;var a=s(h.expirationTime<=n);n=t.unstable_now(),"function"==typeof a?h.callback=a:h===i(c)&&r(c),b(n)}else r(c);h=i(c)}if(null!==h)var l=!0;else{var d=i(u);null!==d&&A(w,d.startTime-n),l=!1}return l}finally{h=null,p=o,f=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k,C=!1,x=null,E=-1,P=5,T=-1;function I(){return!(t.unstable_now()-T<P)}function O(){if(null!==x){var e=t.unstable_now();T=e;var n=!0;try{n=x(!0,e)}finally{n?k():(C=!1,x=null)}}else C=!1}if("function"==typeof _)k=function(){_(O)};else if("undefined"!=typeof MessageChannel){var R=new MessageChannel,L=R.port2;R.port1.onmessage=O,k=function(){L.postMessage(null)}}else k=function(){v(O,0)};function D(e){x=e,C||(C=!0,k())}function A(e,n){E=v(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){g||f||(g=!0,D(S))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return i(c)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,r,o){var s=t.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0<o?s+o:s,e){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return e={id:d++,callback:r,priorityLevel:e,startTime:o,expirationTime:a=o+a,sortIndex:-1},o>s?(e.sortIndex=o,n(u,e),null===i(c)&&e===i(u)&&(m?(y(E),E=-1):m=!0,A(w,o-s))):(e.sortIndex=a,n(c,e),g||f||(g=!0,D(S))),e},t.unstable_shouldYield=I,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},1931:function(e,t,n){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let i=0,r=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(i++,"%c"===e&&(r=i))}),t.splice(r,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(4582)(t);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},2328:function(e,t,n){"use strict";e.exports=n(1613)},2483:function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(7045)},3121:function(e){e.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}},3394:function(e,t,n){"use strict";var i=n(7810),r=Symbol.for("react.element"),o=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var i,o={},c=null,u=null;for(i in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,i)&&!l.hasOwnProperty(i)&&(o[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps)void 0===o[i]&&(o[i]=t[i]);return{$$typeof:r,type:e,key:c,ref:u,props:o,_owner:a.current}}t.Fragment=o,t.jsx=c,t.jsxs=c},3667:function(e,t,n){var i,r;!function(){"use strict";i=function(){var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=["trace","debug","info","warn","error"],r={},o=null;function s(e,t){var n=e[t];if("function"==typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch(t){return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function a(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(){for(var n=this.getLevel(),r=0;r<i.length;r++){var o=i[r];this[o]=r<n?e:this.methodFactory(o,n,this.name)}if(this.log=this.debug,typeof console===t&&n<this.levels.SILENT)return"No console available for logging"}function c(e){return function(){typeof console!==t&&(l.call(this),this[e].apply(this,arguments))}}function u(i,r,o){return function(i){return"debug"===i&&(i="log"),typeof console!==t&&("trace"===i&&n?a:void 0!==console[i]?s(console,i):void 0!==console.log?s(console,"log"):e)}(i)||c.apply(this,arguments)}function d(e,n){var s,a,c,d=this,h="loglevel";function p(){var e;if(typeof window!==t&&h){try{e=window.localStorage[h]}catch(e){}if(typeof e===t)try{var n=window.document.cookie,i=encodeURIComponent(h),r=n.indexOf(i+"=");-1!==r&&(e=/^([^;]+)/.exec(n.slice(r+i.length+1))[1])}catch(e){}return void 0===d.levels[e]&&(e=void 0),e}}function f(e){var t=e;if("string"==typeof t&&void 0!==d.levels[t.toUpperCase()]&&(t=d.levels[t.toUpperCase()]),"number"==typeof t&&t>=0&&t<=d.levels.SILENT)return t;throw new TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?h+=":"+e:"symbol"==typeof e&&(h=void 0),d.name=e,d.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},d.methodFactory=n||u,d.getLevel=function(){return null!=c?c:null!=a?a:s},d.setLevel=function(e,n){return c=f(e),!1!==n&&function(e){var n=(i[e]||"silent").toUpperCase();if(typeof window!==t&&h){try{return void(window.localStorage[h]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(h)+"="+n+";"}catch(e){}}}(c),l.call(d)},d.setDefaultLevel=function(e){a=f(e),p()||d.setLevel(e,!1)},d.resetLevel=function(){c=null,function(){if(typeof window!==t&&h){try{window.localStorage.removeItem(h)}catch(e){}try{window.document.cookie=encodeURIComponent(h)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}(),l.call(d)},d.enableAll=function(e){d.setLevel(d.levels.TRACE,e)},d.disableAll=function(e){d.setLevel(d.levels.SILENT,e)},d.rebuild=function(){if(o!==d&&(s=f(o.getLevel())),l.call(d),o===d)for(var e in r)r[e].rebuild()},s=f(o?o.getLevel():"WARN");var g=p();null!=g&&(c=f(g)),l.call(d)}(o=new d).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=r[e];return t||(t=r[e]=new d(e,o.methodFactory)),t};var h=typeof window!==t?window.log:void 0;return o.noConflict=function(){return typeof window!==t&&window.log===o&&(window.log=h),o},o.getLoggers=function(){return r},o.default=o,o},void 0===(r=i.call(t,n,t,e))||(e.exports=r)}()},4140:function(e,t,n){"use strict";var i=n(2483);t.H=i.createRoot,i.hydrateRoot},4582:function(e,t,n){e.exports=function(e){function t(e){let n,r,o,s=null;function a(...e){if(!a.enabled)return;const i=a,r=Number(new Date),o=r-(n||r);i.diff=o,i.prev=n,i.curr=r,n=r,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(n,r)=>{if("%%"===n)return"%";s++;const o=t.formatters[r];if("function"==typeof o){const t=e[s];n=o.call(i,t),e.splice(s,1),s--}return n}),t.formatArgs.call(i,e),(i.log||t.log).apply(i,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=i,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(r!==t.namespaces&&(r=t.namespaces,o=t.enabled(e)),o),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function i(e,n){const i=t(this.namespace+(void 0===n?":":n)+e);return i.log=this.log,i}function r(e,t){let n=0,i=0,r=-1,o=0;for(;n<e.length;)if(i<t.length&&(t[i]===e[n]||"*"===t[i]))"*"===t[i]?(r=i,o=n,i++):(n++,i++);else{if(-1===r)return!1;i=r+1,o++,n=o}for(;i<t.length&&"*"===t[i];)i++;return i===t.length}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of n)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const n of t.skips)if(r(e,n))return!1;for(const n of t.names)if(r(e,n))return!0;return!1},t.humanize=n(6151),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(n=>{t[n]=e[n]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},4785:function(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,i=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise(function(n,i){function r(n){e.removeListener(t,o),i(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",r),n([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,r)})},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,n,i){var r,o,s,c;if(a(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),(r=l(e))>0&&s.length>r&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,c=u,console&&console.warn&&console.warn(c)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=u.bind(i);return r.listener=n,i.wrapFn=r,r}function h(e,t,n){var i=e._events;if(void 0===i)return[];var r=i[t];return void 0===r?[]:"function"==typeof r?n?[r.listener||r]:[r]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(r):f(r,r.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function f(e,t){for(var n=new Array(t),i=0;i<t;++i)n[i]=e[i];return n}function g(e,t,n,i){if("function"==typeof e.on)i.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function r(o){i.once&&e.removeEventListener(t,r),n(o)})}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)i(l,this,t);else{var c=l.length,u=f(l,c);for(n=0;n<c;++n)i(u[n],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,i,r,o,s;if(a(t),void 0===(i=this._events))return this;if(void 0===(n=i[e]))return this;if(n===t||n.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(r=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,r=o;break}if(r<0)return this;0===r?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,r),1===n.length&&(i[e]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,i;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var r,o=Object.keys(n);for(i=0;i<o.length;++i)"removeListener"!==(r=o[i])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},4922:function(e,t,n){"use strict";e.exports=n(3394)},5677:function(e,t){"use strict";var n=Symbol.for("react.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator,f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,m={};function v(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||f}function y(){}function _(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||f}v.prototype.isReactComponent={},v.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")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var b=_.prototype=new y;b.constructor=_,g(b,v.prototype),b.isPureReactComponent=!0;var w=Array.isArray,S=Object.prototype.hasOwnProperty,k={current:null},C={key:!0,ref:!0,__self:!0,__source:!0};function x(e,t,i){var r,o={},s=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(s=""+t.key),t)S.call(t,r)&&!C.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(1===l)o.children=i;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===o[r]&&(o[r]=l[r]);return{$$typeof:n,type:e,key:s,ref:a,props:o,_owner:k.current}}function E(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var P=/\/+/g;function T(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 I(e,t,r,o,s){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var l=!1;if(null===e)l=!0;else switch(a){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case i:l=!0}}if(l)return s=s(l=e),e=""===o?"."+T(l,0):o,w(s)?(r="",null!=e&&(r=e.replace(P,"$&/")+"/"),I(s,t,r,"",function(e){return e})):null!=s&&(E(s)&&(s=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(s,r+(!s.key||l&&l.key===s.key?"":(""+s.key).replace(P,"$&/")+"/")+e)),t.push(s)),1;if(l=0,o=""===o?".":o+":",w(e))for(var c=0;c<e.length;c++){var u=o+T(a=e[c],c);l+=I(a,t,r,u,s)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"==typeof u)for(e=u.call(e),c=0;!(a=e.next()).done;)l+=I(a=a.value,t,r,u=o+T(a,c++),s);else if("object"===a)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function O(e,t,n){if(null==e)return e;var i=[],r=0;return I(e,i,"","",function(e){return t.call(n,e,r++)}),i}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 L={current:null},D={transition:null},A={ReactCurrentDispatcher:L,ReactCurrentBatchConfig:D,ReactCurrentOwner:k};function N(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:O,forEach:function(e,t,n){O(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return O(e,function(){t++}),t},toArray:function(e){return O(e,function(e){return e})||[]},only:function(e){if(!E(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=r,t.Profiler=s,t.PureComponent=_,t.StrictMode=o,t.Suspense=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=A,t.act=N,t.cloneElement=function(e,t,i){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=g({},e.props),o=e.key,s=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,a=k.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)S.call(t,c)&&!C.hasOwnProperty(c)&&(r[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)r.children=i;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:n,type:e.type,key:o,ref:s,props:r,_owner:a}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=x,t.createFactory=function(e){var t=x.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=E,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:R}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=D.transition;D.transition={};try{e()}finally{D.transition=t}},t.unstable_act=N,t.useCallback=function(e,t){return L.current.useCallback(e,t)},t.useContext=function(e){return L.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return L.current.useDeferredValue(e)},t.useEffect=function(e,t){return L.current.useEffect(e,t)},t.useId=function(){return L.current.useId()},t.useImperativeHandle=function(e,t,n){return L.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return L.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return L.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return L.current.useMemo(e,t)},t.useReducer=function(e,t,n){return L.current.useReducer(e,t,n)},t.useRef=function(e){return L.current.useRef(e)},t.useState=function(e){return L.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return L.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return L.current.useTransition()},t.version="18.3.1"},6151:function(e){var t=1e3,n=60*t,i=60*n,r=24*i,o=7*r;function s(e,t,n,i){var r=t>=1.5*n;return Math.round(e/n)+" "+i+(r?"s":"")}e.exports=function(e,a){a=a||{};var l,c,u=typeof e;if("string"===u&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(s){var a=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return a*o;case"days":case"day":case"d":return a*r;case"hours":case"hour":case"hrs":case"hr":case"h":return a*i;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}(e);if("number"===u&&isFinite(e))return a.long?(l=e,(c=Math.abs(l))>=r?s(l,c,r,"day"):c>=i?s(l,c,i,"hour"):c>=n?s(l,c,n,"minute"):c>=t?s(l,c,t,"second"):l+" ms"):function(e){var o=Math.abs(e);return o>=r?Math.round(e/r)+"d":o>=i?Math.round(e/i)+"h":o>=n?Math.round(e/n)+"m":o>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},7045:function(e,t,n){"use strict";var i=n(7810),r=n(2328);function o(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 s=new Set,a={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(a[e]=t,e=0;e<t.length;e++)s.add(t[e])}var u=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),d=Object.prototype.hasOwnProperty,h=/^[: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]*$/,p={},f={};function g(e,t,n,i,r,o,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){m[e]=new g(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];m[t]=new g(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){m[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){m[e]=new g(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){m[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){m[e]=new g(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){m[e]=new g(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){m[e]=new g(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){m[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)});var v=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function _(e,t,n,i){var r=m.hasOwnProperty(t)?m[t]:null;(null!==r?0!==r.type:i||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,i){if(null==t||function(e,t,n,i){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!i&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,i))return!0;if(i)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,r,i)&&(n=null),i||null===r?function(e){return!!d.call(f,e)||!d.call(p,e)&&(h.test(e)?f[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):r.mustUseProperty?e[r.propertyName]=null===n?3!==r.type&&"":n:(t=r.attributeName,i=r.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(r=r.type)||4===r&&!0===n?"":""+n,i?e.setAttributeNS(i,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(v,y);m[t]=new g(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(v,y);m[t]=new g(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(v,y);m[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)}),m.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)});var b=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),S=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),E=Symbol.for("react.provider"),P=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),L=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var D=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var A=Symbol.iterator;function N(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=A&&e[A]||e["@@iterator"])?e:null}var M,j=Object.assign;function F(e){if(void 0===M)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);M=t&&t[1]||""}return"\n"+M+e}var $=!1;function U(e,t){if(!e||$)return"";$=!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(e){var i=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){i=e}e.call(t.prototype)}else{try{throw Error()}catch(e){i=e}e()}}catch(t){if(t&&i&&"string"==typeof t.stack){for(var r=t.stack.split("\n"),o=i.stack.split("\n"),s=r.length-1,a=o.length-1;1<=s&&0<=a&&r[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(r[s]!==o[a]){if(1!==s||1!==a)do{if(s--,0>--a||r[s]!==o[a]){var l="\n"+r[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=s&&0<=a);break}}}finally{$=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?F(e):""}function z(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 U(e.type,!1);case 11:return U(e.type.render,!1);case 1:return U(e.type,!0);default:return""}}function H(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 k:return"Fragment";case S:return"Portal";case x:return"Profiler";case C:return"StrictMode";case I:return"Suspense";case O:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case P:return(e.displayName||"Context")+".Consumer";case E:return(e._context.displayName||"Context")+".Provider";case T: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:H(e.type)||"Memo";case L:t=e._payload,e=e._init;try{return H(e(t))}catch(e){}}return null}function V(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 H(t);case 8:return t===C?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function W(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function B(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function q(e){e._valueTracker||(e._valueTracker=function(e){var t=B(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var r=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(e){i=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(e){i=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function G(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=B(e)?e.checked?"true":"false":e.value),(e=i)!==n&&(t.setValue(e),!0)}function Q(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 K(e,t){var n=t.checked;return j({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function J(e,t){var n=null==t.defaultValue?"":t.defaultValue,i=null!=t.checked?t.checked:t.defaultChecked;n=W(null!=t.value?t.value:n),e._wrapperState={initialChecked:i,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function X(e,t){null!=(t=t.checked)&&_(e,"checked",t,!1)}function Y(e,t){X(e,t);var n=W(t.value),i=t.type;if(null!=n)"number"===i?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===i||"reset"===i)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,W(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Z(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!("submit"!==i&&"reset"!==i||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 ee(e,t,n){"number"===t&&Q(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,i){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&i&&(e[n].defaultSelected=!0)}else{for(n=""+W(n),t=null,r=0;r<e.length;r++){if(e[r].value===n)return e[r].selected=!0,void(i&&(e[r].defaultSelected=!0));null!==t||e[r].disabled||(t=e[r])}null!==t&&(t.selected=!0)}}function ie(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return j({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function re(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(o(92));if(te(n)){if(1<n.length)throw Error(o(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:W(n)}}function oe(e,t){var n=W(t.value),i=W(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=i&&(e.defaultValue=""+i)}function se(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function ae(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 le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?ae(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,ue,de=(ue=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,i){MSApp.execUnsafeLocalFunction(function(){return ue(e,t)})}:ue);function he(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 pe={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},fe=["Webkit","ms","Moz","O"];function ge(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||pe.hasOwnProperty(e)&&pe[e]?(""+t).trim():t+"px"}function me(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var i=0===n.indexOf("--"),r=ge(n,t[n],i);"float"===n&&(n="cssFloat"),i?e.setProperty(n,r):e[n]=r}}Object.keys(pe).forEach(function(e){fe.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pe[t]=pe[e]})});var ve=j({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 ye(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(o(62))}}function _e(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 be=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Se=null,ke=null,Ce=null;function xe(e){if(e=_r(e)){if("function"!=typeof Se)throw Error(o(280));var t=e.stateNode;t&&(t=wr(t),Se(e.stateNode,e.type,t))}}function Ee(e){ke?Ce?Ce.push(e):Ce=[e]:ke=e}function Pe(){if(ke){var e=ke,t=Ce;if(Ce=ke=null,xe(e),t)for(e=0;e<t.length;e++)xe(t[e])}}function Te(e,t){return e(t)}function Ie(){}var Oe=!1;function Re(e,t,n){if(Oe)return e(t,n);Oe=!0;try{return Te(e,t,n)}finally{Oe=!1,(null!==ke||null!==Ce)&&(Ie(),Pe())}}function Le(e,t){var n=e.stateNode;if(null===n)return null;var i=wr(n);if(null===i)return null;n=i[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":(i=!i.disabled)||(i=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!i;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(o(231,t,typeof n));return n}var De=!1;if(u)try{var Ae={};Object.defineProperty(Ae,"passive",{get:function(){De=!0}}),window.addEventListener("test",Ae,Ae),window.removeEventListener("test",Ae,Ae)}catch(ue){De=!1}function Ne(e,t,n,i,r,o,s,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var Me=!1,je=null,Fe=!1,$e=null,Ue={onError:function(e){Me=!0,je=e}};function ze(e,t,n,i,r,o,s,a,l){Me=!1,je=null,Ne.apply(Ue,arguments)}function He(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 Ve(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function We(e){if(He(e)!==e)throw Error(o(188))}function Be(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=He(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,i=t;;){var r=n.return;if(null===r)break;var s=r.alternate;if(null===s){if(null!==(i=r.return)){n=i;continue}break}if(r.child===s.child){for(s=r.child;s;){if(s===n)return We(r),e;if(s===i)return We(r),t;s=s.sibling}throw Error(o(188))}if(n.return!==i.return)n=r,i=s;else{for(var a=!1,l=r.child;l;){if(l===n){a=!0,n=r,i=s;break}if(l===i){a=!0,i=r,n=s;break}l=l.sibling}if(!a){for(l=s.child;l;){if(l===n){a=!0,n=s,i=r;break}if(l===i){a=!0,i=s,n=r;break}l=l.sibling}if(!a)throw Error(o(189))}}if(n.alternate!==i)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(e))?qe(e):null}function qe(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=qe(e);if(null!==t)return t;e=e.sibling}return null}var Ge=r.unstable_scheduleCallback,Qe=r.unstable_cancelCallback,Ke=r.unstable_shouldYield,Je=r.unstable_requestPaint,Xe=r.unstable_now,Ye=r.unstable_getCurrentPriorityLevel,Ze=r.unstable_ImmediatePriority,et=r.unstable_UserBlockingPriority,tt=r.unstable_NormalPriority,nt=r.unstable_LowPriority,it=r.unstable_IdlePriority,rt=null,ot=null,st=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(at(e)/lt|0)|0},at=Math.log,lt=Math.LN2,ct=64,ut=4194304;function dt(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 ht(e,t){var n=e.pendingLanes;if(0===n)return 0;var i=0,r=e.suspendedLanes,o=e.pingedLanes,s=268435455&n;if(0!==s){var a=s&~r;0!==a?i=dt(a):0!==(o&=s)&&(i=dt(o))}else 0!==(s=n&~r)?i=dt(s):0!==o&&(i=dt(o));if(0===i)return 0;if(0!==t&&t!==i&&0===(t&r)&&((r=i&-i)>=(o=t&-t)||16===r&&4194240&o))return t;if(4&i&&(i|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=i;0<t;)r=1<<(n=31-st(t)),i|=e[n],t&=~r;return i}function pt(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 ft(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function gt(){var e=ct;return!(4194240&(ct<<=1))&&(ct=64),e}function mt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-st(t)]=n}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var i=31-st(n),r=1<<i;r&t|e[i]&t&&(e[i]|=t),n&=~r}}var _t=0;function bt(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var wt,St,kt,Ct,xt,Et=!1,Pt=[],Tt=null,It=null,Ot=null,Rt=new Map,Lt=new Map,Dt=[],At="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 Nt(e,t){switch(e){case"focusin":case"focusout":Tt=null;break;case"dragenter":case"dragleave":It=null;break;case"mouseover":case"mouseout":Ot=null;break;case"pointerover":case"pointerout":Rt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Lt.delete(t.pointerId)}}function Mt(e,t,n,i,r,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:i,nativeEvent:o,targetContainers:[r]},null!==t&&null!==(t=_r(t))&&St(t),e):(e.eventSystemFlags|=i,t=e.targetContainers,null!==r&&-1===t.indexOf(r)&&t.push(r),e)}function jt(e){var t=yr(e.target);if(null!==t){var n=He(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ve(n)))return e.blockedOn=t,void xt(e.priority,function(){kt(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 Ft(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Kt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=_r(n))&&St(t),e.blockedOn=n,!1;var i=new(n=e.nativeEvent).constructor(n.type,n);be=i,n.target.dispatchEvent(i),be=null,t.shift()}return!0}function $t(e,t,n){Ft(e)&&n.delete(t)}function Ut(){Et=!1,null!==Tt&&Ft(Tt)&&(Tt=null),null!==It&&Ft(It)&&(It=null),null!==Ot&&Ft(Ot)&&(Ot=null),Rt.forEach($t),Lt.forEach($t)}function zt(e,t){e.blockedOn===t&&(e.blockedOn=null,Et||(Et=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Ut)))}function Ht(e){function t(t){return zt(t,e)}if(0<Pt.length){zt(Pt[0],e);for(var n=1;n<Pt.length;n++){var i=Pt[n];i.blockedOn===e&&(i.blockedOn=null)}}for(null!==Tt&&zt(Tt,e),null!==It&&zt(It,e),null!==Ot&&zt(Ot,e),Rt.forEach(t),Lt.forEach(t),n=0;n<Dt.length;n++)(i=Dt[n]).blockedOn===e&&(i.blockedOn=null);for(;0<Dt.length&&null===(n=Dt[0]).blockedOn;)jt(n),null===n.blockedOn&&Dt.shift()}var Vt=b.ReactCurrentBatchConfig,Wt=!0;function Bt(e,t,n,i){var r=_t,o=Vt.transition;Vt.transition=null;try{_t=1,Gt(e,t,n,i)}finally{_t=r,Vt.transition=o}}function qt(e,t,n,i){var r=_t,o=Vt.transition;Vt.transition=null;try{_t=4,Gt(e,t,n,i)}finally{_t=r,Vt.transition=o}}function Gt(e,t,n,i){if(Wt){var r=Kt(e,t,n,i);if(null===r)Wi(e,t,i,Qt,n),Nt(e,i);else if(function(e,t,n,i,r){switch(t){case"focusin":return Tt=Mt(Tt,e,t,n,i,r),!0;case"dragenter":return It=Mt(It,e,t,n,i,r),!0;case"mouseover":return Ot=Mt(Ot,e,t,n,i,r),!0;case"pointerover":var o=r.pointerId;return Rt.set(o,Mt(Rt.get(o)||null,e,t,n,i,r)),!0;case"gotpointercapture":return o=r.pointerId,Lt.set(o,Mt(Lt.get(o)||null,e,t,n,i,r)),!0}return!1}(r,e,t,n,i))i.stopPropagation();else if(Nt(e,i),4&t&&-1<At.indexOf(e)){for(;null!==r;){var o=_r(r);if(null!==o&&wt(o),null===(o=Kt(e,t,n,i))&&Wi(e,t,i,Qt,n),o===r)break;r=o}null!==r&&i.stopPropagation()}else Wi(e,t,i,null,n)}}var Qt=null;function Kt(e,t,n,i){if(Qt=null,null!==(e=yr(e=we(i))))if(null===(t=He(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Ve(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 Qt=e,null}function Jt(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(Ye()){case Ze:return 1;case et:return 4;case tt:case nt:return 16;case it:return 536870912;default:return 16}default:return 16}}var Xt=null,Yt=null,Zt=null;function en(){if(Zt)return Zt;var e,t,n=Yt,i=n.length,r="value"in Xt?Xt.value:Xt.textContent,o=r.length;for(e=0;e<i&&n[e]===r[e];e++);var s=i-e;for(t=1;t<=s&&n[i-t]===r[o-t];t++);return Zt=r.slice(e,1<t?1-t:void 0)}function tn(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 nn(){return!0}function rn(){return!1}function on(e){function t(t,n,i,r,o){for(var s in this._reactName=t,this._targetInst=i,this.type=n,this.nativeEvent=r,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(s)&&(t=e[s],this[s]=t?t(r):r[s]);return this.isDefaultPrevented=(null!=r.defaultPrevented?r.defaultPrevented:!1===r.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return j(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=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var sn,an,ln,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=on(cn),dn=j({},cn,{view:0,detail:0}),hn=on(dn),pn=j({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xn,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!==ln&&(ln&&"mousemove"===e.type?(sn=e.screenX-ln.screenX,an=e.screenY-ln.screenY):an=sn=0,ln=e),sn)},movementY:function(e){return"movementY"in e?e.movementY:an}}),fn=on(pn),gn=on(j({},pn,{dataTransfer:0})),mn=on(j({},dn,{relatedTarget:0})),vn=on(j({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),yn=j({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),_n=on(yn),bn=on(j({},cn,{data:0})),wn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},kn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=kn[e])&&!!t[e]}function xn(){return Cn}var En=j({},dn,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Sn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xn,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Pn=on(En),Tn=on(j({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),In=on(j({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xn})),On=on(j({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Rn=j({},pn,{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}),Ln=on(Rn),Dn=[9,13,27,32],An=u&&"CompositionEvent"in window,Nn=null;u&&"documentMode"in document&&(Nn=document.documentMode);var Mn=u&&"TextEvent"in window&&!Nn,jn=u&&(!An||Nn&&8<Nn&&11>=Nn),Fn=String.fromCharCode(32),$n=!1;function Un(e,t){switch(e){case"keyup":return-1!==Dn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Hn=!1,Vn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Wn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Vn[e.type]:"textarea"===t}function Bn(e,t,n,i){Ee(i),0<(t=qi(t,"onChange")).length&&(n=new un("onChange","change",null,n,i),e.push({event:n,listeners:t}))}var qn=null,Gn=null;function Qn(e){Fi(e,0)}function Kn(e){if(G(br(e)))return e}function Jn(e,t){if("change"===e)return t}var Xn=!1;if(u){var Yn;if(u){var Zn="oninput"in document;if(!Zn){var ei=document.createElement("div");ei.setAttribute("oninput","return;"),Zn="function"==typeof ei.oninput}Yn=Zn}else Yn=!1;Xn=Yn&&(!document.documentMode||9<document.documentMode)}function ti(){qn&&(qn.detachEvent("onpropertychange",ni),Gn=qn=null)}function ni(e){if("value"===e.propertyName&&Kn(Gn)){var t=[];Bn(t,Gn,e,we(e)),Re(Qn,t)}}function ii(e,t,n){"focusin"===e?(ti(),Gn=n,(qn=t).attachEvent("onpropertychange",ni)):"focusout"===e&&ti()}function ri(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Kn(Gn)}function oi(e,t){if("click"===e)return Kn(t)}function si(e,t){if("input"===e||"change"===e)return Kn(t)}var ai="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function li(e,t){if(ai(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var r=n[i];if(!d.call(t,r)||!ai(e[r],t[r]))return!1}return!0}function ci(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ui(e,t){var n,i=ci(e);for(e=0;i;){if(3===i.nodeType){if(n=e+i.textContent.length,e<=t&&n>=t)return{node:i,offset:t-e};e=n}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=ci(i)}}function di(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?di(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hi(){for(var e=window,t=Q();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=Q((e=t.contentWindow).document)}return t}function pi(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 fi(e){var t=hi(),n=e.focusedElem,i=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&di(n.ownerDocument.documentElement,n)){if(null!==i&&pi(n))if(t=i.start,void 0===(e=i.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 r=n.textContent.length,o=Math.min(i.start,r);i=void 0===i.end?o:Math.min(i.end,r),!e.extend&&o>i&&(r=i,i=o,o=r),r=ui(n,o);var s=ui(n,i);r&&s&&(1!==e.rangeCount||e.anchorNode!==r.node||e.anchorOffset!==r.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&((t=t.createRange()).setStart(r.node,r.offset),e.removeAllRanges(),o>i?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.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 gi=u&&"documentMode"in document&&11>=document.documentMode,mi=null,vi=null,yi=null,_i=!1;function bi(e,t,n){var i=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;_i||null==mi||mi!==Q(i)||(i="selectionStart"in(i=mi)&&pi(i)?{start:i.selectionStart,end:i.selectionEnd}:{anchorNode:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset},yi&&li(yi,i)||(yi=i,0<(i=qi(vi,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:i}),t.target=mi)))}function wi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Si={animationend:wi("Animation","AnimationEnd"),animationiteration:wi("Animation","AnimationIteration"),animationstart:wi("Animation","AnimationStart"),transitionend:wi("Transition","TransitionEnd")},ki={},Ci={};function xi(e){if(ki[e])return ki[e];if(!Si[e])return e;var t,n=Si[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ci)return ki[e]=n[t];return e}u&&(Ci=document.createElement("div").style,"AnimationEvent"in window||(delete Si.animationend.animation,delete Si.animationiteration.animation,delete Si.animationstart.animation),"TransitionEvent"in window||delete Si.transitionend.transition);var Ei=xi("animationend"),Pi=xi("animationiteration"),Ti=xi("animationstart"),Ii=xi("transitionend"),Oi=new Map,Ri="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 Li(e,t){Oi.set(e,t),l(t,[e])}for(var Di=0;Di<Ri.length;Di++){var Ai=Ri[Di];Li(Ai.toLowerCase(),"on"+(Ai[0].toUpperCase()+Ai.slice(1)))}Li(Ei,"onAnimationEnd"),Li(Pi,"onAnimationIteration"),Li(Ti,"onAnimationStart"),Li("dblclick","onDoubleClick"),Li("focusin","onFocus"),Li("focusout","onBlur"),Li(Ii,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ni="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(" "),Mi=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ni));function ji(e,t,n){var i=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,i,r,s,a,l,c){if(ze.apply(this,arguments),Me){if(!Me)throw Error(o(198));var u=je;Me=!1,je=null,Fe||(Fe=!0,$e=u)}}(i,t,void 0,e),e.currentTarget=null}function Fi(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var i=e[n],r=i.event;i=i.listeners;e:{var o=void 0;if(t)for(var s=i.length-1;0<=s;s--){var a=i[s],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==o&&r.isPropagationStopped())break e;ji(r,a,c),o=l}else for(s=0;s<i.length;s++){if(l=(a=i[s]).instance,c=a.currentTarget,a=a.listener,l!==o&&r.isPropagationStopped())break e;ji(r,a,c),o=l}}}if(Fe)throw e=$e,Fe=!1,$e=null,e}function $i(e,t){var n=t[gr];void 0===n&&(n=t[gr]=new Set);var i=e+"__bubble";n.has(i)||(Vi(t,e,2,!1),n.add(i))}function Ui(e,t,n){var i=0;t&&(i|=4),Vi(n,e,i,t)}var zi="_reactListening"+Math.random().toString(36).slice(2);function Hi(e){if(!e[zi]){e[zi]=!0,s.forEach(function(t){"selectionchange"!==t&&(Mi.has(t)||Ui(t,!1,e),Ui(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[zi]||(t[zi]=!0,Ui("selectionchange",!1,t))}}function Vi(e,t,n,i){switch(Jt(t)){case 1:var r=Bt;break;case 4:r=qt;break;default:r=Gt}n=r.bind(null,t,n,e),r=void 0,!De||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(r=!0),i?void 0!==r?e.addEventListener(t,n,{capture:!0,passive:r}):e.addEventListener(t,n,!0):void 0!==r?e.addEventListener(t,n,{passive:r}):e.addEventListener(t,n,!1)}function Wi(e,t,n,i,r){var o=i;if(!(1&t||2&t||null===i))e:for(;;){if(null===i)return;var s=i.tag;if(3===s||4===s){var a=i.stateNode.containerInfo;if(a===r||8===a.nodeType&&a.parentNode===r)break;if(4===s)for(s=i.return;null!==s;){var l=s.tag;if((3===l||4===l)&&((l=s.stateNode.containerInfo)===r||8===l.nodeType&&l.parentNode===r))return;s=s.return}for(;null!==a;){if(null===(s=yr(a)))return;if(5===(l=s.tag)||6===l){i=o=s;continue e}a=a.parentNode}}i=i.return}Re(function(){var i=o,r=we(n),s=[];e:{var a=Oi.get(e);if(void 0!==a){var l=un,c=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=Pn;break;case"focusin":c="focus",l=mn;break;case"focusout":c="blur",l=mn;break;case"beforeblur":case"afterblur":l=mn;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=fn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=gn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=In;break;case Ei:case Pi:case Ti:l=vn;break;case Ii:l=On;break;case"scroll":l=hn;break;case"wheel":l=Ln;break;case"copy":case"cut":case"paste":l=_n;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Tn}var u=!!(4&t),d=!u&&"scroll"===e,h=u?null!==a?a+"Capture":null:a;u=[];for(var p,f=i;null!==f;){var g=(p=f).stateNode;if(5===p.tag&&null!==g&&(p=g,null!==h&&null!=(g=Le(f,h))&&u.push(Bi(f,g,p))),d)break;f=f.return}0<u.length&&(a=new l(a,c,null,n,r),s.push({event:a,listeners:u}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(a="mouseover"===e||"pointerover"===e)||n===be||!(c=n.relatedTarget||n.fromElement)||!yr(c)&&!c[fr])&&(l||a)&&(a=r.window===r?r:(a=r.ownerDocument)?a.defaultView||a.parentWindow:window,l?(l=i,null!==(c=(c=n.relatedTarget||n.toElement)?yr(c):null)&&(c!==(d=He(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=i),l!==c)){if(u=fn,g="onMouseLeave",h="onMouseEnter",f="mouse","pointerout"!==e&&"pointerover"!==e||(u=Tn,g="onPointerLeave",h="onPointerEnter",f="pointer"),d=null==l?a:br(l),p=null==c?a:br(c),(a=new u(g,f+"leave",l,n,r)).target=d,a.relatedTarget=p,g=null,yr(r)===i&&((u=new u(h,f+"enter",c,n,r)).target=p,u.relatedTarget=d,g=u),d=g,l&&c)e:{for(h=c,f=0,p=u=l;p;p=Gi(p))f++;for(p=0,g=h;g;g=Gi(g))p++;for(;0<f-p;)u=Gi(u),f--;for(;0<p-f;)h=Gi(h),p--;for(;f--;){if(u===h||null!==h&&u===h.alternate)break e;u=Gi(u),h=Gi(h)}u=null}else u=null;null!==l&&Qi(s,a,l,u,!1),null!==c&&null!==d&&Qi(s,d,c,u,!0)}if("select"===(l=(a=i?br(i):window).nodeName&&a.nodeName.toLowerCase())||"input"===l&&"file"===a.type)var m=Jn;else if(Wn(a))if(Xn)m=si;else{m=ri;var v=ii}else(l=a.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===a.type||"radio"===a.type)&&(m=oi);switch(m&&(m=m(e,i))?Bn(s,m,n,r):(v&&v(e,a,i),"focusout"===e&&(v=a._wrapperState)&&v.controlled&&"number"===a.type&&ee(a,"number",a.value)),v=i?br(i):window,e){case"focusin":(Wn(v)||"true"===v.contentEditable)&&(mi=v,vi=i,yi=null);break;case"focusout":yi=vi=mi=null;break;case"mousedown":_i=!0;break;case"contextmenu":case"mouseup":case"dragend":_i=!1,bi(s,n,r);break;case"selectionchange":if(gi)break;case"keydown":case"keyup":bi(s,n,r)}var y;if(An)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else Hn?Un(e,n)&&(_="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(_="onCompositionStart");_&&(jn&&"ko"!==n.locale&&(Hn||"onCompositionStart"!==_?"onCompositionEnd"===_&&Hn&&(y=en()):(Yt="value"in(Xt=r)?Xt.value:Xt.textContent,Hn=!0)),0<(v=qi(i,_)).length&&(_=new bn(_,e,null,n,r),s.push({event:_,listeners:v}),(y||null!==(y=zn(n)))&&(_.data=y))),(y=Mn?function(e,t){switch(e){case"compositionend":return zn(t);case"keypress":return 32!==t.which?null:($n=!0,Fn);case"textInput":return(e=t.data)===Fn&&$n?null:e;default:return null}}(e,n):function(e,t){if(Hn)return"compositionend"===e||!An&&Un(e,t)?(e=en(),Zt=Yt=Xt=null,Hn=!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 jn&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(i=qi(i,"onBeforeInput")).length&&(r=new bn("onBeforeInput","beforeinput",null,n,r),s.push({event:r,listeners:i}),r.data=y)}Fi(s,t)})}function Bi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function qi(e,t){for(var n=t+"Capture",i=[];null!==e;){var r=e,o=r.stateNode;5===r.tag&&null!==o&&(r=o,null!=(o=Le(e,n))&&i.unshift(Bi(e,o,r)),null!=(o=Le(e,t))&&i.push(Bi(e,o,r))),e=e.return}return i}function Gi(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Qi(e,t,n,i,r){for(var o=t._reactName,s=[];null!==n&&n!==i;){var a=n,l=a.alternate,c=a.stateNode;if(null!==l&&l===i)break;5===a.tag&&null!==c&&(a=c,r?null!=(l=Le(n,o))&&s.unshift(Bi(n,l,a)):r||null!=(l=Le(n,o))&&s.push(Bi(n,l,a))),n=n.return}0!==s.length&&e.push({event:t,listeners:s})}var Ki=/\r\n?/g,Ji=/\u0000|\uFFFD/g;function Xi(e){return("string"==typeof e?e:""+e).replace(Ki,"\n").replace(Ji,"")}function Yi(e,t,n){if(t=Xi(t),Xi(e)!==t&&n)throw Error(o(425))}function Zi(){}var er=null,tr=null;function nr(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 ir="function"==typeof setTimeout?setTimeout:void 0,rr="function"==typeof clearTimeout?clearTimeout:void 0,or="function"==typeof Promise?Promise:void 0,sr="function"==typeof queueMicrotask?queueMicrotask:void 0!==or?function(e){return or.resolve(null).then(e).catch(ar)}:ir;function ar(e){setTimeout(function(){throw e})}function lr(e,t){var n=t,i=0;do{var r=n.nextSibling;if(e.removeChild(n),r&&8===r.nodeType)if("/$"===(n=r.data)){if(0===i)return e.removeChild(r),void Ht(t);i--}else"$"!==n&&"$?"!==n&&"$!"!==n||i++;n=r}while(n);Ht(t)}function cr(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 ur(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 dr=Math.random().toString(36).slice(2),hr="__reactFiber$"+dr,pr="__reactProps$"+dr,fr="__reactContainer$"+dr,gr="__reactEvents$"+dr,mr="__reactListeners$"+dr,vr="__reactHandles$"+dr;function yr(e){var t=e[hr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[fr]||n[hr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ur(e);null!==e;){if(n=e[hr])return n;e=ur(e)}return t}n=(e=n).parentNode}return null}function _r(e){return!(e=e[hr]||e[fr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function br(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function wr(e){return e[pr]||null}var Sr=[],kr=-1;function Cr(e){return{current:e}}function xr(e){0>kr||(e.current=Sr[kr],Sr[kr]=null,kr--)}function Er(e,t){kr++,Sr[kr]=e.current,e.current=t}var Pr={},Tr=Cr(Pr),Ir=Cr(!1),Or=Pr;function Rr(e,t){var n=e.type.contextTypes;if(!n)return Pr;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var r,o={};for(r in n)o[r]=t[r];return i&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Lr(e){return null!=e.childContextTypes}function Dr(){xr(Ir),xr(Tr)}function Ar(e,t,n){if(Tr.current!==Pr)throw Error(o(168));Er(Tr,t),Er(Ir,n)}function Nr(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,"function"!=typeof i.getChildContext)return n;for(var r in i=i.getChildContext())if(!(r in t))throw Error(o(108,V(e)||"Unknown",r));return j({},n,i)}function Mr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Pr,Or=Tr.current,Er(Tr,e),Er(Ir,Ir.current),!0}function jr(e,t,n){var i=e.stateNode;if(!i)throw Error(o(169));n?(e=Nr(e,t,Or),i.__reactInternalMemoizedMergedChildContext=e,xr(Ir),xr(Tr),Er(Tr,e)):xr(Ir),Er(Ir,n)}var Fr=null,$r=!1,Ur=!1;function zr(e){null===Fr?Fr=[e]:Fr.push(e)}function Hr(){if(!Ur&&null!==Fr){Ur=!0;var e=0,t=_t;try{var n=Fr;for(_t=1;e<n.length;e++){var i=n[e];do{i=i(!0)}while(null!==i)}Fr=null,$r=!1}catch(t){throw null!==Fr&&(Fr=Fr.slice(e+1)),Ge(Ze,Hr),t}finally{_t=t,Ur=!1}}return null}var Vr=[],Wr=0,Br=null,qr=0,Gr=[],Qr=0,Kr=null,Jr=1,Xr="";function Yr(e,t){Vr[Wr++]=qr,Vr[Wr++]=Br,Br=e,qr=t}function Zr(e,t,n){Gr[Qr++]=Jr,Gr[Qr++]=Xr,Gr[Qr++]=Kr,Kr=e;var i=Jr;e=Xr;var r=32-st(i)-1;i&=~(1<<r),n+=1;var o=32-st(t)+r;if(30<o){var s=r-r%5;o=(i&(1<<s)-1).toString(32),i>>=s,r-=s,Jr=1<<32-st(t)+r|n<<r|i,Xr=o+e}else Jr=1<<o|n<<r|i,Xr=e}function eo(e){null!==e.return&&(Yr(e,1),Zr(e,1,0))}function to(e){for(;e===Br;)Br=Vr[--Wr],Vr[Wr]=null,qr=Vr[--Wr],Vr[Wr]=null;for(;e===Kr;)Kr=Gr[--Qr],Gr[Qr]=null,Xr=Gr[--Qr],Gr[Qr]=null,Jr=Gr[--Qr],Gr[Qr]=null}var no=null,io=null,ro=!1,oo=null;function so(e,t){var n=Rc(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 ao(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,no=e,io=cr(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,no=e,io=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Kr?{id:Jr,overflow:Xr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Rc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,no=e,io=null,!0);default:return!1}}function lo(e){return!(!(1&e.mode)||128&e.flags)}function co(e){if(ro){var t=io;if(t){var n=t;if(!ao(e,t)){if(lo(e))throw Error(o(418));t=cr(n.nextSibling);var i=no;t&&ao(e,t)?so(i,n):(e.flags=-4097&e.flags|2,ro=!1,no=e)}}else{if(lo(e))throw Error(o(418));e.flags=-4097&e.flags|2,ro=!1,no=e}}}function uo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;no=e}function ho(e){if(e!==no)return!1;if(!ro)return uo(e),ro=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!nr(e.type,e.memoizedProps)),t&&(t=io)){if(lo(e))throw po(),Error(o(418));for(;t;)so(e,t),t=cr(t.nextSibling)}if(uo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){io=cr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}io=null}}else io=no?cr(e.stateNode.nextSibling):null;return!0}function po(){for(var e=io;e;)e=cr(e.nextSibling)}function fo(){io=no=null,ro=!1}function go(e){null===oo?oo=[e]:oo.push(e)}var mo=b.ReactCurrentBatchConfig;function vo(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(o(309));var i=n.stateNode}if(!i)throw Error(o(147,e));var r=i,s=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===s?t.ref:(t=function(e){var t=r.refs;null===e?delete t[s]:t[s]=e},t._stringRef=s,t)}if("string"!=typeof e)throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function yo(e,t){throw e=Object.prototype.toString.call(t),Error(o(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function _o(e){return(0,e._init)(e._payload)}function bo(e){function t(t,n){if(e){var i=t.deletions;null===i?(t.deletions=[n],t.flags|=16):i.push(n)}}function n(n,i){if(!e)return null;for(;null!==i;)t(n,i),i=i.sibling;return null}function i(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 r(e,t){return(e=Dc(e,t)).index=0,e.sibling=null,e}function s(t,n,i){return t.index=i,e?null!==(i=t.alternate)?(i=i.index)<n?(t.flags|=2,n):i:(t.flags|=2,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,i){return null===t||6!==t.tag?((t=jc(n,e.mode,i)).return=e,t):((t=r(t,n)).return=e,t)}function c(e,t,n,i){var o=n.type;return o===k?d(e,t,n.props.children,i,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===L&&_o(o)===t.type)?((i=r(t,n.props)).ref=vo(e,t,n),i.return=e,i):((i=Ac(n.type,n.key,n.props,null,e.mode,i)).ref=vo(e,t,n),i.return=e,i)}function u(e,t,n,i){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Fc(n,e.mode,i)).return=e,t):((t=r(t,n.children||[])).return=e,t)}function d(e,t,n,i,o){return null===t||7!==t.tag?((t=Nc(n,e.mode,i,o)).return=e,t):((t=r(t,n)).return=e,t)}function h(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=jc(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case w:return(n=Ac(t.type,t.key,t.props,null,e.mode,n)).ref=vo(e,null,t),n.return=e,n;case S:return(t=Fc(t,e.mode,n)).return=e,t;case L:return h(e,(0,t._init)(t._payload),n)}if(te(t)||N(t))return(t=Nc(t,e.mode,n,null)).return=e,t;yo(e,t)}return null}function p(e,t,n,i){var r=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==r?null:l(e,t,""+n,i);if("object"==typeof n&&null!==n){switch(n.$$typeof){case w:return n.key===r?c(e,t,n,i):null;case S:return n.key===r?u(e,t,n,i):null;case L:return p(e,t,(r=n._init)(n._payload),i)}if(te(n)||N(n))return null!==r?null:d(e,t,n,i,null);yo(e,n)}return null}function f(e,t,n,i,r){if("string"==typeof i&&""!==i||"number"==typeof i)return l(t,e=e.get(n)||null,""+i,r);if("object"==typeof i&&null!==i){switch(i.$$typeof){case w:return c(t,e=e.get(null===i.key?n:i.key)||null,i,r);case S:return u(t,e=e.get(null===i.key?n:i.key)||null,i,r);case L:return f(e,t,n,(0,i._init)(i._payload),r)}if(te(i)||N(i))return d(t,e=e.get(n)||null,i,r,null);yo(t,i)}return null}function g(r,o,a,l){for(var c=null,u=null,d=o,g=o=0,m=null;null!==d&&g<a.length;g++){d.index>g?(m=d,d=null):m=d.sibling;var v=p(r,d,a[g],l);if(null===v){null===d&&(d=m);break}e&&d&&null===v.alternate&&t(r,d),o=s(v,o,g),null===u?c=v:u.sibling=v,u=v,d=m}if(g===a.length)return n(r,d),ro&&Yr(r,g),c;if(null===d){for(;g<a.length;g++)null!==(d=h(r,a[g],l))&&(o=s(d,o,g),null===u?c=d:u.sibling=d,u=d);return ro&&Yr(r,g),c}for(d=i(r,d);g<a.length;g++)null!==(m=f(d,r,g,a[g],l))&&(e&&null!==m.alternate&&d.delete(null===m.key?g:m.key),o=s(m,o,g),null===u?c=m:u.sibling=m,u=m);return e&&d.forEach(function(e){return t(r,e)}),ro&&Yr(r,g),c}function m(r,a,l,c){var u=N(l);if("function"!=typeof u)throw Error(o(150));if(null==(l=u.call(l)))throw Error(o(151));for(var d=u=null,g=a,m=a=0,v=null,y=l.next();null!==g&&!y.done;m++,y=l.next()){g.index>m?(v=g,g=null):v=g.sibling;var _=p(r,g,y.value,c);if(null===_){null===g&&(g=v);break}e&&g&&null===_.alternate&&t(r,g),a=s(_,a,m),null===d?u=_:d.sibling=_,d=_,g=v}if(y.done)return n(r,g),ro&&Yr(r,m),u;if(null===g){for(;!y.done;m++,y=l.next())null!==(y=h(r,y.value,c))&&(a=s(y,a,m),null===d?u=y:d.sibling=y,d=y);return ro&&Yr(r,m),u}for(g=i(r,g);!y.done;m++,y=l.next())null!==(y=f(g,r,m,y.value,c))&&(e&&null!==y.alternate&&g.delete(null===y.key?m:y.key),a=s(y,a,m),null===d?u=y:d.sibling=y,d=y);return e&&g.forEach(function(e){return t(r,e)}),ro&&Yr(r,m),u}return function e(i,o,s,l){if("object"==typeof s&&null!==s&&s.type===k&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case w:e:{for(var c=s.key,u=o;null!==u;){if(u.key===c){if((c=s.type)===k){if(7===u.tag){n(i,u.sibling),(o=r(u,s.props.children)).return=i,i=o;break e}}else if(u.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===L&&_o(c)===u.type){n(i,u.sibling),(o=r(u,s.props)).ref=vo(i,u,s),o.return=i,i=o;break e}n(i,u);break}t(i,u),u=u.sibling}s.type===k?((o=Nc(s.props.children,i.mode,l,s.key)).return=i,i=o):((l=Ac(s.type,s.key,s.props,null,i.mode,l)).ref=vo(i,o,s),l.return=i,i=l)}return a(i);case S:e:{for(u=s.key;null!==o;){if(o.key===u){if(4===o.tag&&o.stateNode.containerInfo===s.containerInfo&&o.stateNode.implementation===s.implementation){n(i,o.sibling),(o=r(o,s.children||[])).return=i,i=o;break e}n(i,o);break}t(i,o),o=o.sibling}(o=Fc(s,i.mode,l)).return=i,i=o}return a(i);case L:return e(i,o,(u=s._init)(s._payload),l)}if(te(s))return g(i,o,s,l);if(N(s))return m(i,o,s,l);yo(i,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==o&&6===o.tag?(n(i,o.sibling),(o=r(o,s)).return=i,i=o):(n(i,o),(o=jc(s,i.mode,l)).return=i,i=o),a(i)):n(i,o)}}var wo=bo(!0),So=bo(!1),ko=Cr(null),Co=null,xo=null,Eo=null;function Po(){Eo=xo=Co=null}function To(e){var t=ko.current;xr(ko),e._currentValue=t}function Io(e,t,n){for(;null!==e;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==i&&(i.childLanes|=t)):null!==i&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===n)break;e=e.return}}function Oo(e,t){Co=e,Eo=xo=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(_a=!0),e.firstContext=null)}function Ro(e){var t=e._currentValue;if(Eo!==e)if(e={context:e,memoizedValue:t,next:null},null===xo){if(null===Co)throw Error(o(308));xo=e,Co.dependencies={lanes:0,firstContext:e}}else xo=xo.next=e;return t}var Lo=null;function Do(e){null===Lo?Lo=[e]:Lo.push(e)}function Ao(e,t,n,i){var r=t.interleaved;return null===r?(n.next=n,Do(t)):(n.next=r.next,r.next=n),t.interleaved=n,No(e,i)}function No(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 Mo=!1;function jo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Fo(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 $o(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Uo(e,t,n){var i=e.updateQueue;if(null===i)return null;if(i=i.shared,2&Tl){var r=i.pending;return null===r?t.next=t:(t.next=r.next,r.next=t),i.pending=t,No(e,n)}return null===(r=i.interleaved)?(t.next=t,Do(i)):(t.next=r.next,r.next=t),i.interleaved=t,No(e,n)}function zo(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var i=t.lanes;n|=i&=e.pendingLanes,t.lanes=n,yt(e,n)}}function Ho(e,t){var n=e.updateQueue,i=e.alternate;if(null!==i&&n===(i=i.updateQueue)){var r=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?r=o=s:o=o.next=s,n=n.next}while(null!==n);null===o?r=o=t:o=o.next=t}else r=o=t;return n={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:o,shared:i.shared,effects:i.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Vo(e,t,n,i){var r=e.updateQueue;Mo=!1;var o=r.firstBaseUpdate,s=r.lastBaseUpdate,a=r.shared.pending;if(null!==a){r.shared.pending=null;var l=a,c=l.next;l.next=null,null===s?o=c:s.next=c,s=l;var u=e.alternate;null!==u&&(a=(u=u.updateQueue).lastBaseUpdate)!==s&&(null===a?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l)}if(null!==o){var d=r.baseState;for(s=0,u=c=l=null,a=o;;){var h=a.lane,p=a.eventTime;if((i&h)===h){null!==u&&(u=u.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var f=e,g=a;switch(h=t,p=n,g.tag){case 1:if("function"==typeof(f=g.payload)){d=f.call(p,d,h);break e}d=f;break e;case 3:f.flags=-65537&f.flags|128;case 0:if(null==(h="function"==typeof(f=g.payload)?f.call(p,d,h):f))break e;d=j({},d,h);break e;case 2:Mo=!0}}null!==a.callback&&0!==a.lane&&(e.flags|=64,null===(h=r.effects)?r.effects=[a]:h.push(a))}else p={eventTime:p,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===u?(c=u=p,l=d):u=u.next=p,s|=h;if(null===(a=a.next)){if(null===(a=r.shared.pending))break;a=(h=a).next,h.next=null,r.lastBaseUpdate=h,r.shared.pending=null}}if(null===u&&(l=d),r.baseState=l,r.firstBaseUpdate=c,r.lastBaseUpdate=u,null!==(t=r.shared.interleaved)){r=t;do{s|=r.lane,r=r.next}while(r!==t)}else null===o&&(r.shared.lanes=0);Ml|=s,e.lanes=s,e.memoizedState=d}}function Wo(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var i=e[t],r=i.callback;if(null!==r){if(i.callback=null,i=n,"function"!=typeof r)throw Error(o(191,r));r.call(i)}}}var Bo={},qo=Cr(Bo),Go=Cr(Bo),Qo=Cr(Bo);function Ko(e){if(e===Bo)throw Error(o(174));return e}function Jo(e,t){switch(Er(Qo,t),Er(Go,e),Er(qo,Bo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}xr(qo),Er(qo,t)}function Xo(){xr(qo),xr(Go),xr(Qo)}function Yo(e){Ko(Qo.current);var t=Ko(qo.current),n=le(t,e.type);t!==n&&(Er(Go,e),Er(qo,n))}function Zo(e){Go.current===e&&(xr(qo),xr(Go))}var es=Cr(0);function ts(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 ns=[];function is(){for(var e=0;e<ns.length;e++)ns[e]._workInProgressVersionPrimary=null;ns.length=0}var rs=b.ReactCurrentDispatcher,os=b.ReactCurrentBatchConfig,ss=0,as=null,ls=null,cs=null,us=!1,ds=!1,hs=0,ps=0;function fs(){throw Error(o(321))}function gs(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ai(e[n],t[n]))return!1;return!0}function ms(e,t,n,i,r,s){if(ss=s,as=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,rs.current=null===e||null===e.memoizedState?Zs:ea,e=n(i,r),ds){s=0;do{if(ds=!1,hs=0,25<=s)throw Error(o(301));s+=1,cs=ls=null,t.updateQueue=null,rs.current=ta,e=n(i,r)}while(ds)}if(rs.current=Ys,t=null!==ls&&null!==ls.next,ss=0,cs=ls=as=null,us=!1,t)throw Error(o(300));return e}function vs(){var e=0!==hs;return hs=0,e}function ys(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===cs?as.memoizedState=cs=e:cs=cs.next=e,cs}function _s(){if(null===ls){var e=as.alternate;e=null!==e?e.memoizedState:null}else e=ls.next;var t=null===cs?as.memoizedState:cs.next;if(null!==t)cs=t,ls=e;else{if(null===e)throw Error(o(310));e={memoizedState:(ls=e).memoizedState,baseState:ls.baseState,baseQueue:ls.baseQueue,queue:ls.queue,next:null},null===cs?as.memoizedState=cs=e:cs=cs.next=e}return cs}function bs(e,t){return"function"==typeof t?t(e):t}function ws(e){var t=_s(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var i=ls,r=i.baseQueue,s=n.pending;if(null!==s){if(null!==r){var a=r.next;r.next=s.next,s.next=a}i.baseQueue=r=s,n.pending=null}if(null!==r){s=r.next,i=i.baseState;var l=a=null,c=null,u=s;do{var d=u.lane;if((ss&d)===d)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:e(i,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=h,a=i):c=c.next=h,as.lanes|=d,Ml|=d}u=u.next}while(null!==u&&u!==s);null===c?a=i:c.next=l,ai(i,t.memoizedState)||(_a=!0),t.memoizedState=i,t.baseState=a,t.baseQueue=c,n.lastRenderedState=i}if(null!==(e=n.interleaved)){r=e;do{s=r.lane,as.lanes|=s,Ml|=s,r=r.next}while(r!==e)}else null===r&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ss(e){var t=_s(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var i=n.dispatch,r=n.pending,s=t.memoizedState;if(null!==r){n.pending=null;var a=r=r.next;do{s=e(s,a.action),a=a.next}while(a!==r);ai(s,t.memoizedState)||(_a=!0),t.memoizedState=s,null===t.baseQueue&&(t.baseState=s),n.lastRenderedState=s}return[s,i]}function ks(){}function Cs(e,t){var n=as,i=_s(),r=t(),s=!ai(i.memoizedState,r);if(s&&(i.memoizedState=r,_a=!0),i=i.queue,Ms(Ps.bind(null,n,i,e),[e]),i.getSnapshot!==t||s||null!==cs&&1&cs.memoizedState.tag){if(n.flags|=2048,Rs(9,Es.bind(null,n,i,r,t),void 0,null),null===Il)throw Error(o(349));30&ss||xs(n,t,r)}return r}function xs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=as.updateQueue)?(t={lastEffect:null,stores:null},as.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Es(e,t,n,i){t.value=n,t.getSnapshot=i,Ts(t)&&Is(e)}function Ps(e,t,n){return n(function(){Ts(t)&&Is(e)})}function Ts(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ai(e,n)}catch(e){return!0}}function Is(e){var t=No(e,1);null!==t&&nc(t,e,1,-1)}function Os(e){var t=ys();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:bs,lastRenderedState:e},t.queue=e,e=e.dispatch=Qs.bind(null,as,e),[t.memoizedState,e]}function Rs(e,t,n,i){return e={tag:e,create:t,destroy:n,deps:i,next:null},null===(t=as.updateQueue)?(t={lastEffect:null,stores:null},as.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(i=n.next,n.next=e,e.next=i,t.lastEffect=e),e}function Ls(){return _s().memoizedState}function Ds(e,t,n,i){var r=ys();as.flags|=e,r.memoizedState=Rs(1|t,n,void 0,void 0===i?null:i)}function As(e,t,n,i){var r=_s();i=void 0===i?null:i;var o=void 0;if(null!==ls){var s=ls.memoizedState;if(o=s.destroy,null!==i&&gs(i,s.deps))return void(r.memoizedState=Rs(t,n,o,i))}as.flags|=e,r.memoizedState=Rs(1|t,n,o,i)}function Ns(e,t){return Ds(8390656,8,e,t)}function Ms(e,t){return As(2048,8,e,t)}function js(e,t){return As(4,2,e,t)}function Fs(e,t){return As(4,4,e,t)}function $s(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 Us(e,t,n){return n=null!=n?n.concat([e]):null,As(4,4,$s.bind(null,t,e),n)}function zs(){}function Hs(e,t){var n=_s();t=void 0===t?null:t;var i=n.memoizedState;return null!==i&&null!==t&&gs(t,i[1])?i[0]:(n.memoizedState=[e,t],e)}function Vs(e,t){var n=_s();t=void 0===t?null:t;var i=n.memoizedState;return null!==i&&null!==t&&gs(t,i[1])?i[0]:(e=e(),n.memoizedState=[e,t],e)}function Ws(e,t,n){return 21&ss?(ai(n,t)||(n=gt(),as.lanes|=n,Ml|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,_a=!0),e.memoizedState=n)}function Bs(e,t){var n=_t;_t=0!==n&&4>n?n:4,e(!0);var i=os.transition;os.transition={};try{e(!1),t()}finally{_t=n,os.transition=i}}function qs(){return _s().memoizedState}function Gs(e,t,n){var i=tc(e);n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},Ks(e)?Js(t,n):null!==(n=Ao(e,t,n,i))&&(nc(n,e,i,ec()),Xs(n,t,i))}function Qs(e,t,n){var i=tc(e),r={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ks(e))Js(t,r);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var s=t.lastRenderedState,a=o(s,n);if(r.hasEagerState=!0,r.eagerState=a,ai(a,s)){var l=t.interleaved;return null===l?(r.next=r,Do(t)):(r.next=l.next,l.next=r),void(t.interleaved=r)}}catch(e){}null!==(n=Ao(e,t,r,i))&&(nc(n,e,i,r=ec()),Xs(n,t,i))}}function Ks(e){var t=e.alternate;return e===as||null!==t&&t===as}function Js(e,t){ds=us=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Xs(e,t,n){if(4194240&n){var i=t.lanes;n|=i&=e.pendingLanes,t.lanes=n,yt(e,n)}}var Ys={readContext:Ro,useCallback:fs,useContext:fs,useEffect:fs,useImperativeHandle:fs,useInsertionEffect:fs,useLayoutEffect:fs,useMemo:fs,useReducer:fs,useRef:fs,useState:fs,useDebugValue:fs,useDeferredValue:fs,useTransition:fs,useMutableSource:fs,useSyncExternalStore:fs,useId:fs,unstable_isNewReconciler:!1},Zs={readContext:Ro,useCallback:function(e,t){return ys().memoizedState=[e,void 0===t?null:t],e},useContext:Ro,useEffect:Ns,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Ds(4194308,4,$s.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ds(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ds(4,2,e,t)},useMemo:function(e,t){var n=ys();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var i=ys();return t=void 0!==n?n(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=Gs.bind(null,as,e),[i.memoizedState,e]},useRef:function(e){return e={current:e},ys().memoizedState=e},useState:Os,useDebugValue:zs,useDeferredValue:function(e){return ys().memoizedState=e},useTransition:function(){var e=Os(!1),t=e[0];return e=Bs.bind(null,e[1]),ys().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=as,r=ys();if(ro){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===Il)throw Error(o(349));30&ss||xs(i,t,n)}r.memoizedState=n;var s={value:n,getSnapshot:t};return r.queue=s,Ns(Ps.bind(null,i,s,e),[e]),i.flags|=2048,Rs(9,Es.bind(null,i,s,n,t),void 0,null),n},useId:function(){var e=ys(),t=Il.identifierPrefix;if(ro){var n=Xr;t=":"+t+"R"+(n=(Jr&~(1<<32-st(Jr)-1)).toString(32)+n),0<(n=hs++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=ps++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ea={readContext:Ro,useCallback:Hs,useContext:Ro,useEffect:Ms,useImperativeHandle:Us,useInsertionEffect:js,useLayoutEffect:Fs,useMemo:Vs,useReducer:ws,useRef:Ls,useState:function(){return ws(bs)},useDebugValue:zs,useDeferredValue:function(e){return Ws(_s(),ls.memoizedState,e)},useTransition:function(){return[ws(bs)[0],_s().memoizedState]},useMutableSource:ks,useSyncExternalStore:Cs,useId:qs,unstable_isNewReconciler:!1},ta={readContext:Ro,useCallback:Hs,useContext:Ro,useEffect:Ms,useImperativeHandle:Us,useInsertionEffect:js,useLayoutEffect:Fs,useMemo:Vs,useReducer:Ss,useRef:Ls,useState:function(){return Ss(bs)},useDebugValue:zs,useDeferredValue:function(e){var t=_s();return null===ls?t.memoizedState=e:Ws(t,ls.memoizedState,e)},useTransition:function(){return[Ss(bs)[0],_s().memoizedState]},useMutableSource:ks,useSyncExternalStore:Cs,useId:qs,unstable_isNewReconciler:!1};function na(e,t){if(e&&e.defaultProps){for(var n in t=j({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function ia(e,t,n,i){n=null==(n=n(i,t=e.memoizedState))?t:j({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var ra={isMounted:function(e){return!!(e=e._reactInternals)&&He(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var i=ec(),r=tc(e),o=$o(i,r);o.payload=t,null!=n&&(o.callback=n),null!==(t=Uo(e,o,r))&&(nc(t,e,r,i),zo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var i=ec(),r=tc(e),o=$o(i,r);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=Uo(e,o,r))&&(nc(t,e,r,i),zo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ec(),i=tc(e),r=$o(n,i);r.tag=2,null!=t&&(r.callback=t),null!==(t=Uo(e,r,i))&&(nc(t,e,i,n),zo(t,e,i))}};function oa(e,t,n,i,r,o,s){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(i,o,s):!(t.prototype&&t.prototype.isPureReactComponent&&li(n,i)&&li(r,o))}function sa(e,t,n){var i=!1,r=Pr,o=t.contextType;return"object"==typeof o&&null!==o?o=Ro(o):(r=Lr(t)?Or:Tr.current,o=(i=null!=(i=t.contextTypes))?Rr(e,r):Pr),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ra,e.stateNode=t,t._reactInternals=e,i&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=o),t}function aa(e,t,n,i){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,i),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==e&&ra.enqueueReplaceState(t,t.state,null)}function la(e,t,n,i){var r=e.stateNode;r.props=n,r.state=e.memoizedState,r.refs={},jo(e);var o=t.contextType;"object"==typeof o&&null!==o?r.context=Ro(o):(o=Lr(t)?Or:Tr.current,r.context=Rr(e,o)),r.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(ia(e,t,o,n),r.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof r.getSnapshotBeforeUpdate||"function"!=typeof r.UNSAFE_componentWillMount&&"function"!=typeof r.componentWillMount||(t=r.state,"function"==typeof r.componentWillMount&&r.componentWillMount(),"function"==typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),t!==r.state&&ra.enqueueReplaceState(r,r.state,null),Vo(e,n,r,i),r.state=e.memoizedState),"function"==typeof r.componentDidMount&&(e.flags|=4194308)}function ca(e,t){try{var n="",i=t;do{n+=z(i),i=i.return}while(i);var r=n}catch(e){r="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:r,digest:null}}function ua(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function da(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var ha="function"==typeof WeakMap?WeakMap:Map;function pa(e,t,n){(n=$o(-1,n)).tag=3,n.payload={element:null};var i=t.value;return n.callback=function(){Wl||(Wl=!0,Bl=i),da(0,t)},n}function fa(e,t,n){(n=$o(-1,n)).tag=3;var i=e.type.getDerivedStateFromError;if("function"==typeof i){var r=t.value;n.payload=function(){return i(r)},n.callback=function(){da(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){da(0,t),"function"!=typeof i&&(null===ql?ql=new Set([this]):ql.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ga(e,t,n){var i=e.pingCache;if(null===i){i=e.pingCache=new ha;var r=new Set;i.set(t,r)}else void 0===(r=i.get(t))&&(r=new Set,i.set(t,r));r.has(n)||(r.add(n),e=xc.bind(null,e,t,n),t.then(e,e))}function ma(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 va(e,t,n,i,r){return 1&e.mode?(e.flags|=65536,e.lanes=r,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=$o(-1,1)).tag=2,Uo(n,t,1))),n.lanes|=1),e)}var ya=b.ReactCurrentOwner,_a=!1;function ba(e,t,n,i){t.child=null===e?So(t,null,n,i):wo(t,e.child,n,i)}function wa(e,t,n,i,r){n=n.render;var o=t.ref;return Oo(t,r),i=ms(e,t,n,i,o,r),n=vs(),null===e||_a?(ro&&n&&eo(t),t.flags|=1,ba(e,t,i,r),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,Wa(e,t,r))}function Sa(e,t,n,i,r){if(null===e){var o=n.type;return"function"!=typeof o||Lc(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Ac(n.type,null,i,t,t.mode,r)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,ka(e,t,o,i,r))}if(o=e.child,0===(e.lanes&r)){var s=o.memoizedProps;if((n=null!==(n=n.compare)?n:li)(s,i)&&e.ref===t.ref)return Wa(e,t,r)}return t.flags|=1,(e=Dc(o,i)).ref=t.ref,e.return=t,t.child=e}function ka(e,t,n,i,r){if(null!==e){var o=e.memoizedProps;if(li(o,i)&&e.ref===t.ref){if(_a=!1,t.pendingProps=i=o,0===(e.lanes&r))return t.lanes=e.lanes,Wa(e,t,r);131072&e.flags&&(_a=!0)}}return Ea(e,t,n,i,r)}function Ca(e,t,n){var i=t.pendingProps,r=i.children,o=null!==e?e.memoizedState:null;if("hidden"===i.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Er(Dl,Ll),Ll|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=null!==o?o.baseLanes:n,Er(Dl,Ll),Ll|=i}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Er(Dl,Ll),Ll|=n;else null!==o?(i=o.baseLanes|n,t.memoizedState=null):i=n,Er(Dl,Ll),Ll|=i;return ba(e,t,r,n),t.child}function xa(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ea(e,t,n,i,r){var o=Lr(n)?Or:Tr.current;return o=Rr(t,o),Oo(t,r),n=ms(e,t,n,i,o,r),i=vs(),null===e||_a?(ro&&i&&eo(t),t.flags|=1,ba(e,t,n,r),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,Wa(e,t,r))}function Pa(e,t,n,i,r){if(Lr(n)){var o=!0;Mr(t)}else o=!1;if(Oo(t,r),null===t.stateNode)Va(e,t),sa(t,n,i),la(t,n,i,r),i=!0;else if(null===e){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=n.contextType;c="object"==typeof c&&null!==c?Ro(c):Rr(t,c=Lr(n)?Or:Tr.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof s.getSnapshotBeforeUpdate;d||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==i||l!==c)&&aa(t,s,i,c),Mo=!1;var h=t.memoizedState;s.state=h,Vo(t,i,s,r),l=t.memoizedState,a!==i||h!==l||Ir.current||Mo?("function"==typeof u&&(ia(t,n,u,i),l=t.memoizedState),(a=Mo||oa(t,n,a,i,h,l,c))?(d||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||("function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"==typeof s.componentDidMount&&(t.flags|=4194308)):("function"==typeof s.componentDidMount&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=l),s.props=i,s.state=l,s.context=c,i=a):("function"==typeof s.componentDidMount&&(t.flags|=4194308),i=!1)}else{s=t.stateNode,Fo(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:na(t.type,a),s.props=c,d=t.pendingProps,h=s.context,l="object"==typeof(l=n.contextType)&&null!==l?Ro(l):Rr(t,l=Lr(n)?Or:Tr.current);var p=n.getDerivedStateFromProps;(u="function"==typeof p||"function"==typeof s.getSnapshotBeforeUpdate)||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==d||h!==l)&&aa(t,s,i,l),Mo=!1,h=t.memoizedState,s.state=h,Vo(t,i,s,r);var f=t.memoizedState;a!==d||h!==f||Ir.current||Mo?("function"==typeof p&&(ia(t,n,p,i),f=t.memoizedState),(c=Mo||oa(t,n,c,i,h,f,l)||!1)?(u||"function"!=typeof s.UNSAFE_componentWillUpdate&&"function"!=typeof s.componentWillUpdate||("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(i,f,l),"function"==typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(i,f,l)),"function"==typeof s.componentDidUpdate&&(t.flags|=4),"function"==typeof s.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=f),s.props=i,s.state=f,s.context=l,i=c):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),i=!1)}return Ta(e,t,n,i,o,r)}function Ta(e,t,n,i,r,o){xa(e,t);var s=!!(128&t.flags);if(!i&&!s)return r&&jr(t,n,!1),Wa(e,t,o);i=t.stateNode,ya.current=t;var a=s&&"function"!=typeof n.getDerivedStateFromError?null:i.render();return t.flags|=1,null!==e&&s?(t.child=wo(t,e.child,null,o),t.child=wo(t,null,a,o)):ba(e,t,a,o),t.memoizedState=i.state,r&&jr(t,n,!0),t.child}function Ia(e){var t=e.stateNode;t.pendingContext?Ar(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ar(0,t.context,!1),Jo(e,t.containerInfo)}function Oa(e,t,n,i,r){return fo(),go(r),t.flags|=256,ba(e,t,n,i),t.child}var Ra,La,Da,Aa,Na={dehydrated:null,treeContext:null,retryLane:0};function Ma(e){return{baseLanes:e,cachePool:null,transitions:null}}function ja(e,t,n){var i,r=t.pendingProps,s=es.current,a=!1,l=!!(128&t.flags);if((i=l)||(i=(null===e||null!==e.memoizedState)&&!!(2&s)),i?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(s|=1),Er(es,1&s),null===e)return co(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=r.children,e=r.fallback,a?(r=t.mode,a=t.child,l={mode:"hidden",children:l},1&r||null===a?a=Mc(l,r,0,null):(a.childLanes=0,a.pendingProps=l),e=Nc(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Ma(n),t.memoizedState=Na,e):Fa(t,l));if(null!==(s=e.memoizedState)&&null!==(i=s.dehydrated))return function(e,t,n,i,r,s,a){if(n)return 256&t.flags?(t.flags&=-257,$a(e,t,a,i=ua(Error(o(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(s=i.fallback,r=t.mode,i=Mc({mode:"visible",children:i.children},r,0,null),(s=Nc(s,r,a,null)).flags|=2,i.return=t,s.return=t,i.sibling=s,t.child=i,1&t.mode&&wo(t,e.child,null,a),t.child.memoizedState=Ma(a),t.memoizedState=Na,s);if(!(1&t.mode))return $a(e,t,a,null);if("$!"===r.data){if(i=r.nextSibling&&r.nextSibling.dataset)var l=i.dgst;return i=l,$a(e,t,a,i=ua(s=Error(o(419)),i,void 0))}if(l=0!==(a&e.childLanes),_a||l){if(null!==(i=Il)){switch(a&-a){case 4:r=2;break;case 16:r=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:r=32;break;case 536870912:r=268435456;break;default:r=0}0!==(r=0!==(r&(i.suspendedLanes|a))?0:r)&&r!==s.retryLane&&(s.retryLane=r,No(e,r),nc(i,e,r,-1))}return gc(),$a(e,t,a,i=ua(Error(o(421))))}return"$?"===r.data?(t.flags|=128,t.child=e.child,t=Pc.bind(null,e),r._reactRetry=t,null):(e=s.treeContext,io=cr(r.nextSibling),no=t,ro=!0,oo=null,null!==e&&(Gr[Qr++]=Jr,Gr[Qr++]=Xr,Gr[Qr++]=Kr,Jr=e.id,Xr=e.overflow,Kr=t),(t=Fa(t,i.children)).flags|=4096,t)}(e,t,l,r,i,s,n);if(a){a=r.fallback,l=t.mode,i=(s=e.child).sibling;var c={mode:"hidden",children:r.children};return 1&l||t.child===s?(r=Dc(s,c)).subtreeFlags=14680064&s.subtreeFlags:((r=t.child).childLanes=0,r.pendingProps=c,t.deletions=null),null!==i?a=Dc(i,a):(a=Nc(a,l,n,null)).flags|=2,a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,l=null===(l=e.child.memoizedState)?Ma(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},a.memoizedState=l,a.childLanes=e.childLanes&~n,t.memoizedState=Na,r}return e=(a=e.child).sibling,r=Dc(a,{mode:"visible",children:r.children}),!(1&t.mode)&&(r.lanes=n),r.return=t,r.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Fa(e,t){return(t=Mc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function $a(e,t,n,i){return null!==i&&go(i),wo(t,e.child,null,n),(e=Fa(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ua(e,t,n){e.lanes|=t;var i=e.alternate;null!==i&&(i.lanes|=t),Io(e.return,t,n)}function za(e,t,n,i,r){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:r}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=i,o.tail=n,o.tailMode=r)}function Ha(e,t,n){var i=t.pendingProps,r=i.revealOrder,o=i.tail;if(ba(e,t,i.children,n),2&(i=es.current))i=1&i|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&&Ua(e,n,t);else if(19===e.tag)Ua(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}i&=1}if(Er(es,i),1&t.mode)switch(r){case"forwards":for(n=t.child,r=null;null!==n;)null!==(e=n.alternate)&&null===ts(e)&&(r=n),n=n.sibling;null===(n=r)?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),za(t,!1,r,n,o);break;case"backwards":for(n=null,r=t.child,t.child=null;null!==r;){if(null!==(e=r.alternate)&&null===ts(e)){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}za(t,!0,n,null,o);break;case"together":za(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Va(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Wa(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Ml|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Dc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Dc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Ba(e,t){if(!ro)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 i=null;null!==n;)null!==n.alternate&&(i=n),n=n.sibling;null===i?t||null===e.tail?e.tail=null:e.tail.sibling=null:i.sibling=null}}function qa(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,i=0;if(t)for(var r=e.child;null!==r;)n|=r.lanes|r.childLanes,i|=14680064&r.subtreeFlags,i|=14680064&r.flags,r.return=e,r=r.sibling;else for(r=e.child;null!==r;)n|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function Ga(e,t,n){var i=t.pendingProps;switch(to(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qa(t),null;case 1:case 17:return Lr(t.type)&&Dr(),qa(t),null;case 3:return i=t.stateNode,Xo(),xr(Ir),xr(Tr),is(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),null!==e&&null!==e.child||(ho(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==oo&&(sc(oo),oo=null))),La(e,t),qa(t),null;case 5:Zo(t);var r=Ko(Qo.current);if(n=t.type,null!==e&&null!=t.stateNode)Da(e,t,n,i,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(null===t.stateNode)throw Error(o(166));return qa(t),null}if(e=Ko(qo.current),ho(t)){i=t.stateNode,n=t.type;var s=t.memoizedProps;switch(i[hr]=t,i[pr]=s,e=!!(1&t.mode),n){case"dialog":$i("cancel",i),$i("close",i);break;case"iframe":case"object":case"embed":$i("load",i);break;case"video":case"audio":for(r=0;r<Ni.length;r++)$i(Ni[r],i);break;case"source":$i("error",i);break;case"img":case"image":case"link":$i("error",i),$i("load",i);break;case"details":$i("toggle",i);break;case"input":J(i,s),$i("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!s.multiple},$i("invalid",i);break;case"textarea":re(i,s),$i("invalid",i)}for(var l in ye(n,s),r=null,s)if(s.hasOwnProperty(l)){var c=s[l];"children"===l?"string"==typeof c?i.textContent!==c&&(!0!==s.suppressHydrationWarning&&Yi(i.textContent,c,e),r=["children",c]):"number"==typeof c&&i.textContent!==""+c&&(!0!==s.suppressHydrationWarning&&Yi(i.textContent,c,e),r=["children",""+c]):a.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&$i("scroll",i)}switch(n){case"input":q(i),Z(i,s,!0);break;case"textarea":q(i),se(i);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(i.onclick=Zi)}i=r,t.updateQueue=i,null!==i&&(t.flags|=4)}else{l=9===r.nodeType?r:r.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=ae(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof i.is?e=l.createElement(n,{is:i.is}):(e=l.createElement(n),"select"===n&&(l=e,i.multiple?l.multiple=!0:i.size&&(l.size=i.size))):e=l.createElementNS(e,n),e[hr]=t,e[pr]=i,Ra(e,t,!1,!1),t.stateNode=e;e:{switch(l=_e(n,i),n){case"dialog":$i("cancel",e),$i("close",e),r=i;break;case"iframe":case"object":case"embed":$i("load",e),r=i;break;case"video":case"audio":for(r=0;r<Ni.length;r++)$i(Ni[r],e);r=i;break;case"source":$i("error",e),r=i;break;case"img":case"image":case"link":$i("error",e),$i("load",e),r=i;break;case"details":$i("toggle",e),r=i;break;case"input":J(e,i),r=K(e,i),$i("invalid",e);break;case"option":default:r=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},r=j({},i,{value:void 0}),$i("invalid",e);break;case"textarea":re(e,i),r=ie(e,i),$i("invalid",e)}for(s in ye(n,r),c=r)if(c.hasOwnProperty(s)){var u=c[s];"style"===s?me(e,u):"dangerouslySetInnerHTML"===s?null!=(u=u?u.__html:void 0)&&de(e,u):"children"===s?"string"==typeof u?("textarea"!==n||""!==u)&&he(e,u):"number"==typeof u&&he(e,""+u):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(a.hasOwnProperty(s)?null!=u&&"onScroll"===s&&$i("scroll",e):null!=u&&_(e,s,u,l))}switch(n){case"input":q(e),Z(e,i,!1);break;case"textarea":q(e),se(e);break;case"option":null!=i.value&&e.setAttribute("value",""+W(i.value));break;case"select":e.multiple=!!i.multiple,null!=(s=i.value)?ne(e,!!i.multiple,s,!1):null!=i.defaultValue&&ne(e,!!i.multiple,i.defaultValue,!0);break;default:"function"==typeof r.onClick&&(e.onclick=Zi)}switch(n){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 qa(t),null;case 6:if(e&&null!=t.stateNode)Aa(e,t,e.memoizedProps,i);else{if("string"!=typeof i&&null===t.stateNode)throw Error(o(166));if(n=Ko(Qo.current),Ko(qo.current),ho(t)){if(i=t.stateNode,n=t.memoizedProps,i[hr]=t,(s=i.nodeValue!==n)&&null!==(e=no))switch(e.tag){case 3:Yi(i.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Yi(i.nodeValue,n,!!(1&e.mode))}s&&(t.flags|=4)}else(i=(9===n.nodeType?n:n.ownerDocument).createTextNode(i))[hr]=t,t.stateNode=i}return qa(t),null;case 13:if(xr(es),i=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ro&&null!==io&&1&t.mode&&!(128&t.flags))po(),fo(),t.flags|=98560,s=!1;else if(s=ho(t),null!==i&&null!==i.dehydrated){if(null===e){if(!s)throw Error(o(318));if(!(s=null!==(s=t.memoizedState)?s.dehydrated:null))throw Error(o(317));s[hr]=t}else fo(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;qa(t),s=!1}else null!==oo&&(sc(oo),oo=null),s=!0;if(!s)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((i=null!==i)!=(null!==e&&null!==e.memoizedState)&&i&&(t.child.flags|=8192,1&t.mode&&(null===e||1&es.current?0===Al&&(Al=3):gc())),null!==t.updateQueue&&(t.flags|=4),qa(t),null);case 4:return Xo(),La(e,t),null===e&&Hi(t.stateNode.containerInfo),qa(t),null;case 10:return To(t.type._context),qa(t),null;case 19:if(xr(es),null===(s=t.memoizedState))return qa(t),null;if(i=!!(128&t.flags),null===(l=s.rendering))if(i)Ba(s,!1);else{if(0!==Al||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(l=ts(e))){for(t.flags|=128,Ba(s,!1),null!==(i=l.updateQueue)&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;null!==n;)e=i,(s=n).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}),n=n.sibling;return Er(es,1&es.current|2),t.child}e=e.sibling}null!==s.tail&&Xe()>Hl&&(t.flags|=128,i=!0,Ba(s,!1),t.lanes=4194304)}else{if(!i)if(null!==(e=ts(l))){if(t.flags|=128,i=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Ba(s,!0),null===s.tail&&"hidden"===s.tailMode&&!l.alternate&&!ro)return qa(t),null}else 2*Xe()-s.renderingStartTime>Hl&&1073741824!==n&&(t.flags|=128,i=!0,Ba(s,!1),t.lanes=4194304);s.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=s.last)?n.sibling=l:t.child=l,s.last=l)}return null!==s.tail?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Xe(),t.sibling=null,n=es.current,Er(es,i?1&n|2:1&n),t):(qa(t),null);case 22:case 23:return dc(),i=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==i&&(t.flags|=8192),i&&1&t.mode?!!(1073741824&Ll)&&(qa(t),6&t.subtreeFlags&&(t.flags|=8192)):qa(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function Qa(e,t){switch(to(t),t.tag){case 1:return Lr(t.type)&&Dr(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Xo(),xr(Ir),xr(Tr),is(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Zo(t),null;case 13:if(xr(es),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));fo()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return xr(es),null;case 4:return Xo(),null;case 10:return To(t.type._context),null;case 22:case 23:return dc(),null;default:return null}}Ra=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}},La=function(){},Da=function(e,t,n,i){var r=e.memoizedProps;if(r!==i){e=t.stateNode,Ko(qo.current);var o,s=null;switch(n){case"input":r=K(e,r),i=K(e,i),s=[];break;case"select":r=j({},r,{value:void 0}),i=j({},i,{value:void 0}),s=[];break;case"textarea":r=ie(e,r),i=ie(e,i),s=[];break;default:"function"!=typeof r.onClick&&"function"==typeof i.onClick&&(e.onclick=Zi)}for(u in ye(n,i),n=null,r)if(!i.hasOwnProperty(u)&&r.hasOwnProperty(u)&&null!=r[u])if("style"===u){var l=r[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(a.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in i){var c=i[u];if(l=null!=r?r[u]:void 0,i.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(s||(s=[]),s.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(s=s||[]).push(u,c)):"children"===u?"string"!=typeof c&&"number"!=typeof c||(s=s||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(a.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&$i("scroll",e),s||l===c||(s=[])):(s=s||[]).push(u,c))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}},Aa=function(e,t,n,i){n!==i&&(t.flags|=4)};var Ka=!1,Ja=!1,Xa="function"==typeof WeakSet?WeakSet:Set,Ya=null;function Za(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Cc(e,t,n)}else n.current=null}function el(e,t,n){try{n()}catch(n){Cc(e,t,n)}}var tl=!1;function nl(e,t,n){var i=t.updateQueue;if(null!==(i=null!==i?i.lastEffect:null)){var r=i=i.next;do{if((r.tag&e)===e){var o=r.destroy;r.destroy=void 0,void 0!==o&&el(t,n,o)}r=r.next}while(r!==i)}}function il(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var i=n.create;n.destroy=i()}n=n.next}while(n!==t)}}function rl(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 ol(e){var t=e.alternate;null!==t&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&(delete t[hr],delete t[pr],delete t[gr],delete t[mr],delete t[vr]),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function sl(e){return 5===e.tag||3===e.tag||4===e.tag}function al(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||sl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ll(e,t,n){var i=e.tag;if(5===i||6===i)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=Zi));else if(4!==i&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}function cl(e,t,n){var i=e.tag;if(5===i||6===i)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==i&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}var ul=null,dl=!1;function hl(e,t,n){for(n=n.child;null!==n;)pl(e,t,n),n=n.sibling}function pl(e,t,n){if(ot&&"function"==typeof ot.onCommitFiberUnmount)try{ot.onCommitFiberUnmount(rt,n)}catch(e){}switch(n.tag){case 5:Ja||Za(n,t);case 6:var i=ul,r=dl;ul=null,hl(e,t,n),dl=r,null!==(ul=i)&&(dl?(e=ul,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):ul.removeChild(n.stateNode));break;case 18:null!==ul&&(dl?(e=ul,n=n.stateNode,8===e.nodeType?lr(e.parentNode,n):1===e.nodeType&&lr(e,n),Ht(e)):lr(ul,n.stateNode));break;case 4:i=ul,r=dl,ul=n.stateNode.containerInfo,dl=!0,hl(e,t,n),ul=i,dl=r;break;case 0:case 11:case 14:case 15:if(!Ja&&null!==(i=n.updateQueue)&&null!==(i=i.lastEffect)){r=i=i.next;do{var o=r,s=o.destroy;o=o.tag,void 0!==s&&(2&o||4&o)&&el(n,t,s),r=r.next}while(r!==i)}hl(e,t,n);break;case 1:if(!Ja&&(Za(n,t),"function"==typeof(i=n.stateNode).componentWillUnmount))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(e){Cc(n,t,e)}hl(e,t,n);break;case 21:hl(e,t,n);break;case 22:1&n.mode?(Ja=(i=Ja)||null!==n.memoizedState,hl(e,t,n),Ja=i):hl(e,t,n);break;default:hl(e,t,n)}}function fl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Xa),t.forEach(function(t){var i=Tc.bind(null,e,t);n.has(t)||(n.add(t),t.then(i,i))})}}function gl(e,t){var n=t.deletions;if(null!==n)for(var i=0;i<n.length;i++){var r=n[i];try{var s=e,a=t,l=a;e:for(;null!==l;){switch(l.tag){case 5:ul=l.stateNode,dl=!1;break e;case 3:case 4:ul=l.stateNode.containerInfo,dl=!0;break e}l=l.return}if(null===ul)throw Error(o(160));pl(s,a,r),ul=null,dl=!1;var c=r.alternate;null!==c&&(c.return=null),r.return=null}catch(e){Cc(r,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)ml(t,e),t=t.sibling}function ml(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gl(t,e),vl(e),4&i){try{nl(3,e,e.return),il(3,e)}catch(t){Cc(e,e.return,t)}try{nl(5,e,e.return)}catch(t){Cc(e,e.return,t)}}break;case 1:gl(t,e),vl(e),512&i&&null!==n&&Za(n,n.return);break;case 5:if(gl(t,e),vl(e),512&i&&null!==n&&Za(n,n.return),32&e.flags){var r=e.stateNode;try{he(r,"")}catch(t){Cc(e,e.return,t)}}if(4&i&&null!=(r=e.stateNode)){var s=e.memoizedProps,a=null!==n?n.memoizedProps:s,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===s.type&&null!=s.name&&X(r,s),_e(l,a);var u=_e(l,s);for(a=0;a<c.length;a+=2){var d=c[a],h=c[a+1];"style"===d?me(r,h):"dangerouslySetInnerHTML"===d?de(r,h):"children"===d?he(r,h):_(r,d,h,u)}switch(l){case"input":Y(r,s);break;case"textarea":oe(r,s);break;case"select":var p=r._wrapperState.wasMultiple;r._wrapperState.wasMultiple=!!s.multiple;var f=s.value;null!=f?ne(r,!!s.multiple,f,!1):p!==!!s.multiple&&(null!=s.defaultValue?ne(r,!!s.multiple,s.defaultValue,!0):ne(r,!!s.multiple,s.multiple?[]:"",!1))}r[pr]=s}catch(t){Cc(e,e.return,t)}}break;case 6:if(gl(t,e),vl(e),4&i){if(null===e.stateNode)throw Error(o(162));r=e.stateNode,s=e.memoizedProps;try{r.nodeValue=s}catch(t){Cc(e,e.return,t)}}break;case 3:if(gl(t,e),vl(e),4&i&&null!==n&&n.memoizedState.isDehydrated)try{Ht(t.containerInfo)}catch(t){Cc(e,e.return,t)}break;case 4:default:gl(t,e),vl(e);break;case 13:gl(t,e),vl(e),8192&(r=e.child).flags&&(s=null!==r.memoizedState,r.stateNode.isHidden=s,!s||null!==r.alternate&&null!==r.alternate.memoizedState||(zl=Xe())),4&i&&fl(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(Ja=(u=Ja)||d,gl(t,e),Ja=u):gl(t,e),vl(e),8192&i){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!d&&1&e.mode)for(Ya=e,d=e.child;null!==d;){for(h=Ya=d;null!==Ya;){switch(f=(p=Ya).child,p.tag){case 0:case 11:case 14:case 15:nl(4,p,p.return);break;case 1:Za(p,p.return);var g=p.stateNode;if("function"==typeof g.componentWillUnmount){i=p,n=p.return;try{t=i,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(e){Cc(i,n,e)}}break;case 5:Za(p,p.return);break;case 22:if(null!==p.memoizedState){wl(h);continue}}null!==f?(f.return=p,Ya=f):wl(h)}d=d.sibling}e:for(d=null,h=e;;){if(5===h.tag){if(null===d){d=h;try{r=h.stateNode,u?"function"==typeof(s=r.style).setProperty?s.setProperty("display","none","important"):s.display="none":(l=h.stateNode,a=null!=(c=h.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,l.style.display=ge("display",a))}catch(t){Cc(e,e.return,t)}}}else if(6===h.tag){if(null===d)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(t){Cc(e,e.return,t)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:gl(t,e),vl(e),4&i&&fl(e);case 21:}}function vl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(sl(n)){var i=n;break e}n=n.return}throw Error(o(160))}switch(i.tag){case 5:var r=i.stateNode;32&i.flags&&(he(r,""),i.flags&=-33),cl(e,al(e),r);break;case 3:case 4:var s=i.stateNode.containerInfo;ll(e,al(e),s);break;default:throw Error(o(161))}}catch(t){Cc(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function yl(e,t,n){Ya=e,_l(e,t,n)}function _l(e,t,n){for(var i=!!(1&e.mode);null!==Ya;){var r=Ya,o=r.child;if(22===r.tag&&i){var s=null!==r.memoizedState||Ka;if(!s){var a=r.alternate,l=null!==a&&null!==a.memoizedState||Ja;a=Ka;var c=Ja;if(Ka=s,(Ja=l)&&!c)for(Ya=r;null!==Ya;)l=(s=Ya).child,22===s.tag&&null!==s.memoizedState?Sl(r):null!==l?(l.return=s,Ya=l):Sl(r);for(;null!==o;)Ya=o,_l(o,t,n),o=o.sibling;Ya=r,Ka=a,Ja=c}bl(e)}else 8772&r.subtreeFlags&&null!==o?(o.return=r,Ya=o):bl(e)}}function bl(e){for(;null!==Ya;){var t=Ya;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Ja||il(5,t);break;case 1:var i=t.stateNode;if(4&t.flags&&!Ja)if(null===n)i.componentDidMount();else{var r=t.elementType===t.type?n.memoizedProps:na(t.type,n.memoizedProps);i.componentDidUpdate(r,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;null!==s&&Wo(t,s,i);break;case 3:var a=t.updateQueue;if(null!==a){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Wo(t,a,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var d=u.memoizedState;if(null!==d){var h=d.dehydrated;null!==h&&Ht(h)}}}break;default:throw Error(o(163))}Ja||512&t.flags&&rl(t)}catch(e){Cc(t,t.return,e)}}if(t===e){Ya=null;break}if(null!==(n=t.sibling)){n.return=t.return,Ya=n;break}Ya=t.return}}function wl(e){for(;null!==Ya;){var t=Ya;if(t===e){Ya=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Ya=n;break}Ya=t.return}}function Sl(e){for(;null!==Ya;){var t=Ya;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{il(4,t)}catch(e){Cc(t,n,e)}break;case 1:var i=t.stateNode;if("function"==typeof i.componentDidMount){var r=t.return;try{i.componentDidMount()}catch(e){Cc(t,r,e)}}var o=t.return;try{rl(t)}catch(e){Cc(t,o,e)}break;case 5:var s=t.return;try{rl(t)}catch(e){Cc(t,s,e)}}}catch(e){Cc(t,t.return,e)}if(t===e){Ya=null;break}var a=t.sibling;if(null!==a){a.return=t.return,Ya=a;break}Ya=t.return}}var kl,Cl=Math.ceil,xl=b.ReactCurrentDispatcher,El=b.ReactCurrentOwner,Pl=b.ReactCurrentBatchConfig,Tl=0,Il=null,Ol=null,Rl=0,Ll=0,Dl=Cr(0),Al=0,Nl=null,Ml=0,jl=0,Fl=0,$l=null,Ul=null,zl=0,Hl=1/0,Vl=null,Wl=!1,Bl=null,ql=null,Gl=!1,Ql=null,Kl=0,Jl=0,Xl=null,Yl=-1,Zl=0;function ec(){return 6&Tl?Xe():-1!==Yl?Yl:Yl=Xe()}function tc(e){return 1&e.mode?2&Tl&&0!==Rl?Rl&-Rl:null!==mo.transition?(0===Zl&&(Zl=gt()),Zl):0!==(e=_t)?e:e=void 0===(e=window.event)?16:Jt(e.type):1}function nc(e,t,n,i){if(50<Jl)throw Jl=0,Xl=null,Error(o(185));vt(e,n,i),2&Tl&&e===Il||(e===Il&&(!(2&Tl)&&(jl|=n),4===Al&&ac(e,Rl)),ic(e,i),1===n&&0===Tl&&!(1&t.mode)&&(Hl=Xe()+500,$r&&Hr()))}function ic(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,r=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-st(o),a=1<<s,l=r[s];-1===l?0!==(a&n)&&0===(a&i)||(r[s]=pt(a,t)):l<=t&&(e.expiredLanes|=a),o&=~a}}(e,t);var i=ht(e,e===Il?Rl:0);if(0===i)null!==n&&Qe(n),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(null!=n&&Qe(n),1===t)0===e.tag?function(e){$r=!0,zr(e)}(lc.bind(null,e)):zr(lc.bind(null,e)),sr(function(){!(6&Tl)&&Hr()}),n=null;else{switch(bt(i)){case 1:n=Ze;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=it}n=Ic(n,rc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function rc(e,t){if(Yl=-1,Zl=0,6&Tl)throw Error(o(327));var n=e.callbackNode;if(Sc()&&e.callbackNode!==n)return null;var i=ht(e,e===Il?Rl:0);if(0===i)return null;if(30&i||0!==(i&e.expiredLanes)||t)t=mc(e,i);else{t=i;var r=Tl;Tl|=2;var s=fc();for(Il===e&&Rl===t||(Vl=null,Hl=Xe()+500,hc(e,t));;)try{yc();break}catch(t){pc(e,t)}Po(),xl.current=s,Tl=r,null!==Ol?t=0:(Il=null,Rl=0,t=Al)}if(0!==t){if(2===t&&0!==(r=ft(e))&&(i=r,t=oc(e,r)),1===t)throw n=Nl,hc(e,0),ac(e,i),ic(e,Xe()),n;if(6===t)ac(e,i);else{if(r=e.current.alternate,!(30&i||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var i=0;i<n.length;i++){var r=n[i],o=r.getSnapshot;r=r.value;try{if(!ai(o(),r))return!1}catch(e){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}(r)||(t=mc(e,i),2===t&&(s=ft(e),0!==s&&(i=s,t=oc(e,s))),1!==t)))throw n=Nl,hc(e,0),ac(e,i),ic(e,Xe()),n;switch(e.finishedWork=r,e.finishedLanes=i,t){case 0:case 1:throw Error(o(345));case 2:case 5:wc(e,Ul,Vl);break;case 3:if(ac(e,i),(130023424&i)===i&&10<(t=zl+500-Xe())){if(0!==ht(e,0))break;if(((r=e.suspendedLanes)&i)!==i){ec(),e.pingedLanes|=e.suspendedLanes&r;break}e.timeoutHandle=ir(wc.bind(null,e,Ul,Vl),t);break}wc(e,Ul,Vl);break;case 4:if(ac(e,i),(4194240&i)===i)break;for(t=e.eventTimes,r=-1;0<i;){var a=31-st(i);s=1<<a,(a=t[a])>r&&(r=a),i&=~s}if(i=r,10<(i=(120>(i=Xe()-i)?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Cl(i/1960))-i)){e.timeoutHandle=ir(wc.bind(null,e,Ul,Vl),i);break}wc(e,Ul,Vl);break;default:throw Error(o(329))}}}return ic(e,Xe()),e.callbackNode===n?rc.bind(null,e):null}function oc(e,t){var n=$l;return e.current.memoizedState.isDehydrated&&(hc(e,t).flags|=256),2!==(e=mc(e,t))&&(t=Ul,Ul=n,null!==t&&sc(t)),e}function sc(e){null===Ul?Ul=e:Ul.push.apply(Ul,e)}function ac(e,t){for(t&=~Fl,t&=~jl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-st(t),i=1<<n;e[n]=-1,t&=~i}}function lc(e){if(6&Tl)throw Error(o(327));Sc();var t=ht(e,0);if(!(1&t))return ic(e,Xe()),null;var n=mc(e,t);if(0!==e.tag&&2===n){var i=ft(e);0!==i&&(t=i,n=oc(e,i))}if(1===n)throw n=Nl,hc(e,0),ac(e,t),ic(e,Xe()),n;if(6===n)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wc(e,Ul,Vl),ic(e,Xe()),null}function cc(e,t){var n=Tl;Tl|=1;try{return e(t)}finally{0===(Tl=n)&&(Hl=Xe()+500,$r&&Hr())}}function uc(e){null!==Ql&&0===Ql.tag&&!(6&Tl)&&Sc();var t=Tl;Tl|=1;var n=Pl.transition,i=_t;try{if(Pl.transition=null,_t=1,e)return e()}finally{_t=i,Pl.transition=n,!(6&(Tl=t))&&Hr()}}function dc(){Ll=Dl.current,xr(Dl)}function hc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,rr(n)),null!==Ol)for(n=Ol.return;null!==n;){var i=n;switch(to(i),i.tag){case 1:null!=(i=i.type.childContextTypes)&&Dr();break;case 3:Xo(),xr(Ir),xr(Tr),is();break;case 5:Zo(i);break;case 4:Xo();break;case 13:case 19:xr(es);break;case 10:To(i.type._context);break;case 22:case 23:dc()}n=n.return}if(Il=e,Ol=e=Dc(e.current,null),Rl=Ll=t,Al=0,Nl=null,Fl=jl=Ml=0,Ul=$l=null,null!==Lo){for(t=0;t<Lo.length;t++)if(null!==(i=(n=Lo[t]).interleaved)){n.interleaved=null;var r=i.next,o=n.pending;if(null!==o){var s=o.next;o.next=r,i.next=s}n.pending=i}Lo=null}return e}function pc(e,t){for(;;){var n=Ol;try{if(Po(),rs.current=Ys,us){for(var i=as.memoizedState;null!==i;){var r=i.queue;null!==r&&(r.pending=null),i=i.next}us=!1}if(ss=0,cs=ls=as=null,ds=!1,hs=0,El.current=null,null===n||null===n.return){Al=1,Nl=t,Ol=null;break}e:{var s=e,a=n.return,l=n,c=t;if(t=Rl,l.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var u=c,d=l,h=d.tag;if(!(1&d.mode||0!==h&&11!==h&&15!==h)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var f=ma(a);if(null!==f){f.flags&=-257,va(f,a,l,0,t),1&f.mode&&ga(s,u,t),c=u;var g=(t=f).updateQueue;if(null===g){var m=new Set;m.add(c),t.updateQueue=m}else g.add(c);break e}if(!(1&t)){ga(s,u,t),gc();break e}c=Error(o(426))}else if(ro&&1&l.mode){var v=ma(a);if(null!==v){!(65536&v.flags)&&(v.flags|=256),va(v,a,l,0,t),go(ca(c,l));break e}}s=c=ca(c,l),4!==Al&&(Al=2),null===$l?$l=[s]:$l.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t,Ho(s,pa(0,c,t));break e;case 1:l=c;var y=s.type,_=s.stateNode;if(!(128&s.flags||"function"!=typeof y.getDerivedStateFromError&&(null===_||"function"!=typeof _.componentDidCatch||null!==ql&&ql.has(_)))){s.flags|=65536,t&=-t,s.lanes|=t,Ho(s,fa(s,l,t));break e}}s=s.return}while(null!==s)}bc(n)}catch(e){t=e,Ol===n&&null!==n&&(Ol=n=n.return);continue}break}}function fc(){var e=xl.current;return xl.current=Ys,null===e?Ys:e}function gc(){0!==Al&&3!==Al&&2!==Al||(Al=4),null===Il||!(268435455&Ml)&&!(268435455&jl)||ac(Il,Rl)}function mc(e,t){var n=Tl;Tl|=2;var i=fc();for(Il===e&&Rl===t||(Vl=null,hc(e,t));;)try{vc();break}catch(t){pc(e,t)}if(Po(),Tl=n,xl.current=i,null!==Ol)throw Error(o(261));return Il=null,Rl=0,Al}function vc(){for(;null!==Ol;)_c(Ol)}function yc(){for(;null!==Ol&&!Ke();)_c(Ol)}function _c(e){var t=kl(e.alternate,e,Ll);e.memoizedProps=e.pendingProps,null===t?bc(e):Ol=t,El.current=null}function bc(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Qa(n,t)))return n.flags&=32767,void(Ol=n);if(null===e)return Al=6,void(Ol=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Ga(n,t,Ll)))return void(Ol=n);if(null!==(t=t.sibling))return void(Ol=t);Ol=t=e}while(null!==t);0===Al&&(Al=5)}function wc(e,t,n){var i=_t,r=Pl.transition;try{Pl.transition=null,_t=1,function(e,t,n,i){do{Sc()}while(null!==Ql);if(6&Tl)throw Error(o(327));n=e.finishedWork;var r=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.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 i=e.eventTimes;for(e=e.expirationTimes;0<n;){var r=31-st(n),o=1<<r;t[r]=0,i[r]=-1,e[r]=-1,n&=~o}}(e,s),e===Il&&(Ol=Il=null,Rl=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||Gl||(Gl=!0,Ic(tt,function(){return Sc(),null})),s=!!(15990&n.flags),15990&n.subtreeFlags||s){s=Pl.transition,Pl.transition=null;var a=_t;_t=1;var l=Tl;Tl|=4,El.current=null,function(e,t){if(er=Wt,pi(e=hi())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var i=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(i&&0!==i.rangeCount){n=i.anchorNode;var r=i.anchorOffset,s=i.focusNode;i=i.focusOffset;try{n.nodeType,s.nodeType}catch(e){n=null;break e}var a=0,l=-1,c=-1,u=0,d=0,h=e,p=null;t:for(;;){for(var f;h!==n||0!==r&&3!==h.nodeType||(l=a+r),h!==s||0!==i&&3!==h.nodeType||(c=a+i),3===h.nodeType&&(a+=h.nodeValue.length),null!==(f=h.firstChild);)p=h,h=f;for(;;){if(h===e)break t;if(p===n&&++u===r&&(l=a),p===s&&++d===i&&(c=a),null!==(f=h.nextSibling))break;p=(h=p).parentNode}h=f}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(tr={focusedElem:e,selectionRange:n},Wt=!1,Ya=t;null!==Ya;)if(e=(t=Ya).child,1028&t.subtreeFlags&&null!==e)e.return=t,Ya=e;else for(;null!==Ya;){t=Ya;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,v=g.memoizedState,y=t.stateNode,_=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:na(t.type,m),v);y.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(o(163))}}catch(e){Cc(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Ya=e;break}Ya=t.return}g=tl,tl=!1}(e,n),ml(n,e),fi(tr),Wt=!!er,tr=er=null,e.current=n,yl(n,e,r),Je(),Tl=l,_t=a,Pl.transition=s}else e.current=n;if(Gl&&(Gl=!1,Ql=e,Kl=r),0===(s=e.pendingLanes)&&(ql=null),function(e){if(ot&&"function"==typeof ot.onCommitFiberRoot)try{ot.onCommitFiberRoot(rt,e,void 0,!(128&~e.current.flags))}catch(e){}}(n.stateNode),ic(e,Xe()),null!==t)for(i=e.onRecoverableError,n=0;n<t.length;n++)i((r=t[n]).value,{componentStack:r.stack,digest:r.digest});if(Wl)throw Wl=!1,e=Bl,Bl=null,e;!!(1&Kl)&&0!==e.tag&&Sc(),1&(s=e.pendingLanes)?e===Xl?Jl++:(Jl=0,Xl=e):Jl=0,Hr()}(e,t,n,i)}finally{Pl.transition=r,_t=i}return null}function Sc(){if(null!==Ql){var e=bt(Kl),t=Pl.transition,n=_t;try{if(Pl.transition=null,_t=16>e?16:e,null===Ql)var i=!1;else{if(e=Ql,Ql=null,Kl=0,6&Tl)throw Error(o(331));var r=Tl;for(Tl|=4,Ya=e.current;null!==Ya;){var s=Ya,a=s.child;if(16&Ya.flags){var l=s.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for(Ya=u;null!==Ya;){var d=Ya;switch(d.tag){case 0:case 11:case 15:nl(8,d,s)}var h=d.child;if(null!==h)h.return=d,Ya=h;else for(;null!==Ya;){var p=(d=Ya).sibling,f=d.return;if(ol(d),d===u){Ya=null;break}if(null!==p){p.return=f,Ya=p;break}Ya=f}}}var g=s.alternate;if(null!==g){var m=g.child;if(null!==m){g.child=null;do{var v=m.sibling;m.sibling=null,m=v}while(null!==m)}}Ya=s}}if(2064&s.subtreeFlags&&null!==a)a.return=s,Ya=a;else e:for(;null!==Ya;){if(2048&(s=Ya).flags)switch(s.tag){case 0:case 11:case 15:nl(9,s,s.return)}var y=s.sibling;if(null!==y){y.return=s.return,Ya=y;break e}Ya=s.return}}var _=e.current;for(Ya=_;null!==Ya;){var b=(a=Ya).child;if(2064&a.subtreeFlags&&null!==b)b.return=a,Ya=b;else e:for(a=_;null!==Ya;){if(2048&(l=Ya).flags)try{switch(l.tag){case 0:case 11:case 15:il(9,l)}}catch(e){Cc(l,l.return,e)}if(l===a){Ya=null;break e}var w=l.sibling;if(null!==w){w.return=l.return,Ya=w;break e}Ya=l.return}}if(Tl=r,Hr(),ot&&"function"==typeof ot.onPostCommitFiberRoot)try{ot.onPostCommitFiberRoot(rt,e)}catch(e){}i=!0}return i}finally{_t=n,Pl.transition=t}}return!1}function kc(e,t,n){e=Uo(e,t=pa(0,t=ca(n,t),1),1),t=ec(),null!==e&&(vt(e,1,t),ic(e,t))}function Cc(e,t,n){if(3===e.tag)kc(e,e,n);else for(;null!==t;){if(3===t.tag){kc(t,e,n);break}if(1===t.tag){var i=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof i.componentDidCatch&&(null===ql||!ql.has(i))){t=Uo(t,e=fa(t,e=ca(n,e),1),1),e=ec(),null!==t&&(vt(t,1,e),ic(t,e));break}}t=t.return}}function xc(e,t,n){var i=e.pingCache;null!==i&&i.delete(t),t=ec(),e.pingedLanes|=e.suspendedLanes&n,Il===e&&(Rl&n)===n&&(4===Al||3===Al&&(130023424&Rl)===Rl&&500>Xe()-zl?hc(e,0):Fl|=n),ic(e,t)}function Ec(e,t){0===t&&(1&e.mode?(t=ut,!(130023424&(ut<<=1))&&(ut=4194304)):t=1);var n=ec();null!==(e=No(e,t))&&(vt(e,t,n),ic(e,n))}function Pc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Ec(e,n)}function Tc(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,r=e.memoizedState;null!==r&&(n=r.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(o(314))}null!==i&&i.delete(t),Ec(e,n)}function Ic(e,t){return Ge(e,t)}function Oc(e,t,n,i){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=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Rc(e,t,n,i){return new Oc(e,t,n,i)}function Lc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Dc(e,t){var n=e.alternate;return null===n?((n=Rc(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 Ac(e,t,n,i,r,s){var a=2;if(i=e,"function"==typeof e)Lc(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case k:return Nc(n.children,r,s,t);case C:a=8,r|=8;break;case x:return(e=Rc(12,n,t,2|r)).elementType=x,e.lanes=s,e;case I:return(e=Rc(13,n,t,r)).elementType=I,e.lanes=s,e;case O:return(e=Rc(19,n,t,r)).elementType=O,e.lanes=s,e;case D:return Mc(n,r,s,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case E:a=10;break e;case P:a=9;break e;case T:a=11;break e;case R:a=14;break e;case L:a=16,i=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Rc(a,n,t,r)).elementType=e,t.type=i,t.lanes=s,t}function Nc(e,t,n,i){return(e=Rc(7,e,i,t)).lanes=n,e}function Mc(e,t,n,i){return(e=Rc(22,e,i,t)).elementType=D,e.lanes=n,e.stateNode={isHidden:!1},e}function jc(e,t,n){return(e=Rc(6,e,null,t)).lanes=n,e}function Fc(e,t,n){return(t=Rc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $c(e,t,n,i,r){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=mt(0),this.expirationTimes=mt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mt(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function Uc(e,t,n,i,r,o,s,a,l){return e=new $c(e,t,n,a,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Rc(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},jo(o),e}function zc(e){if(!e)return Pr;e:{if(He(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Lr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var n=e.type;if(Lr(n))return Nr(e,n,t)}return t}function Hc(e,t,n,i,r,o,s,a,l){return(e=Uc(n,i,!0,e,0,o,0,a,l)).context=zc(null),n=e.current,(o=$o(i=ec(),r=tc(n))).callback=null!=t?t:null,Uo(n,o,r),e.current.lanes=r,vt(e,r,i),ic(e,i),e}function Vc(e,t,n,i){var r=t.current,o=ec(),s=tc(r);return n=zc(n),null===t.context?t.context=n:t.pendingContext=n,(t=$o(o,s)).payload={element:e},null!==(i=void 0===i?null:i)&&(t.callback=i),null!==(e=Uo(r,t,s))&&(nc(e,r,s,o),zo(e,r,s)),s}function Wc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Bc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function qc(e,t){Bc(e,t),(e=e.alternate)&&Bc(e,t)}kl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ir.current)_a=!0;else{if(0===(e.lanes&n)&&!(128&t.flags))return _a=!1,function(e,t,n){switch(t.tag){case 3:Ia(t),fo();break;case 5:Yo(t);break;case 1:Lr(t.type)&&Mr(t);break;case 4:Jo(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,r=t.memoizedProps.value;Er(ko,i._currentValue),i._currentValue=r;break;case 13:if(null!==(i=t.memoizedState))return null!==i.dehydrated?(Er(es,1&es.current),t.flags|=128,null):0!==(n&t.child.childLanes)?ja(e,t,n):(Er(es,1&es.current),null!==(e=Wa(e,t,n))?e.sibling:null);Er(es,1&es.current);break;case 19:if(i=0!==(n&t.childLanes),128&e.flags){if(i)return Ha(e,t,n);t.flags|=128}if(null!==(r=t.memoizedState)&&(r.rendering=null,r.tail=null,r.lastEffect=null),Er(es,es.current),i)break;return null;case 22:case 23:return t.lanes=0,Ca(e,t,n)}return Wa(e,t,n)}(e,t,n);_a=!!(131072&e.flags)}else _a=!1,ro&&1048576&t.flags&&Zr(t,qr,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Va(e,t),e=t.pendingProps;var r=Rr(t,Tr.current);Oo(t,n),r=ms(null,t,i,e,r,n);var s=vs();return t.flags|=1,"object"==typeof r&&null!==r&&"function"==typeof r.render&&void 0===r.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Lr(i)?(s=!0,Mr(t)):s=!1,t.memoizedState=null!==r.state&&void 0!==r.state?r.state:null,jo(t),r.updater=ra,t.stateNode=r,r._reactInternals=t,la(t,i,e,n),t=Ta(null,t,i,!0,s,n)):(t.tag=0,ro&&s&&eo(t),ba(null,t,r,n),t=t.child),t;case 16:i=t.elementType;e:{switch(Va(e,t),e=t.pendingProps,i=(r=i._init)(i._payload),t.type=i,r=t.tag=function(e){if("function"==typeof e)return Lc(e)?1:0;if(null!=e){if((e=e.$$typeof)===T)return 11;if(e===R)return 14}return 2}(i),e=na(i,e),r){case 0:t=Ea(null,t,i,e,n);break e;case 1:t=Pa(null,t,i,e,n);break e;case 11:t=wa(null,t,i,e,n);break e;case 14:t=Sa(null,t,i,na(i.type,e),n);break e}throw Error(o(306,i,""))}return t;case 0:return i=t.type,r=t.pendingProps,Ea(e,t,i,r=t.elementType===i?r:na(i,r),n);case 1:return i=t.type,r=t.pendingProps,Pa(e,t,i,r=t.elementType===i?r:na(i,r),n);case 3:e:{if(Ia(t),null===e)throw Error(o(387));i=t.pendingProps,r=(s=t.memoizedState).element,Fo(e,t),Vo(t,i,null,n);var a=t.memoizedState;if(i=a.element,s.isDehydrated){if(s={element:i,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=s,t.memoizedState=s,256&t.flags){t=Oa(e,t,i,n,r=ca(Error(o(423)),t));break e}if(i!==r){t=Oa(e,t,i,n,r=ca(Error(o(424)),t));break e}for(io=cr(t.stateNode.containerInfo.firstChild),no=t,ro=!0,oo=null,n=So(t,null,i,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(fo(),i===r){t=Wa(e,t,n);break e}ba(e,t,i,n)}t=t.child}return t;case 5:return Yo(t),null===e&&co(t),i=t.type,r=t.pendingProps,s=null!==e?e.memoizedProps:null,a=r.children,nr(i,r)?a=null:null!==s&&nr(i,s)&&(t.flags|=32),xa(e,t),ba(e,t,a,n),t.child;case 6:return null===e&&co(t),null;case 13:return ja(e,t,n);case 4:return Jo(t,t.stateNode.containerInfo),i=t.pendingProps,null===e?t.child=wo(t,null,i,n):ba(e,t,i,n),t.child;case 11:return i=t.type,r=t.pendingProps,wa(e,t,i,r=t.elementType===i?r:na(i,r),n);case 7:return ba(e,t,t.pendingProps,n),t.child;case 8:case 12:return ba(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(i=t.type._context,r=t.pendingProps,s=t.memoizedProps,a=r.value,Er(ko,i._currentValue),i._currentValue=a,null!==s)if(ai(s.value,a)){if(s.children===r.children&&!Ir.current){t=Wa(e,t,n);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){var l=s.dependencies;if(null!==l){a=s.child;for(var c=l.firstContext;null!==c;){if(c.context===i){if(1===s.tag){(c=$o(-1,n&-n)).tag=2;var u=s.updateQueue;if(null!==u){var d=(u=u.shared).pending;null===d?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}s.lanes|=n,null!==(c=s.alternate)&&(c.lanes|=n),Io(s.return,n,t),l.lanes|=n;break}c=c.next}}else if(10===s.tag)a=s.type===t.type?null:s.child;else if(18===s.tag){if(null===(a=s.return))throw Error(o(341));a.lanes|=n,null!==(l=a.alternate)&&(l.lanes|=n),Io(a,n,t),a=s.sibling}else a=s.child;if(null!==a)a.return=s;else for(a=s;null!==a;){if(a===t){a=null;break}if(null!==(s=a.sibling)){s.return=a.return,a=s;break}a=a.return}s=a}ba(e,t,r.children,n),t=t.child}return t;case 9:return r=t.type,i=t.pendingProps.children,Oo(t,n),i=i(r=Ro(r)),t.flags|=1,ba(e,t,i,n),t.child;case 14:return r=na(i=t.type,t.pendingProps),Sa(e,t,i,r=na(i.type,r),n);case 15:return ka(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,r=t.pendingProps,r=t.elementType===i?r:na(i,r),Va(e,t),t.tag=1,Lr(i)?(e=!0,Mr(t)):e=!1,Oo(t,n),sa(t,i,r),la(t,i,r,n),Ta(null,t,i,!0,e,n);case 19:return Ha(e,t,n);case 22:return Ca(e,t,n)}throw Error(o(156,t.tag))};var Gc="function"==typeof reportError?reportError:function(e){console.error(e)};function Qc(e){this._internalRoot=e}function Kc(e){this._internalRoot=e}function Jc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Xc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Yc(){}function Zc(e,t,n,i,r){var o=n._reactRootContainer;if(o){var s=o;if("function"==typeof r){var a=r;r=function(){var e=Wc(s);a.call(e)}}Vc(t,s,e,r)}else s=function(e,t,n,i,r){if(r){if("function"==typeof i){var o=i;i=function(){var e=Wc(s);o.call(e)}}var s=Hc(t,i,e,0,null,!1,0,"",Yc);return e._reactRootContainer=s,e[fr]=s.current,Hi(8===e.nodeType?e.parentNode:e),uc(),s}for(;r=e.lastChild;)e.removeChild(r);if("function"==typeof i){var a=i;i=function(){var e=Wc(l);a.call(e)}}var l=Uc(e,0,!1,null,0,!1,0,"",Yc);return e._reactRootContainer=l,e[fr]=l.current,Hi(8===e.nodeType?e.parentNode:e),uc(function(){Vc(t,l,n,i)}),l}(n,t,e,r,i);return Wc(s)}Kc.prototype.render=Qc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));Vc(e,t,null,null)},Kc.prototype.unmount=Qc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;uc(function(){Vc(null,e,null,null)}),t[fr]=null}},Kc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Dt.length&&0!==t&&t<Dt[n].priority;n++);Dt.splice(n,0,e),0===n&&jt(e)}},wt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(yt(t,1|n),ic(t,Xe()),!(6&Tl)&&(Hl=Xe()+500,Hr()))}break;case 13:uc(function(){var t=No(e,1);if(null!==t){var n=ec();nc(t,e,1,n)}}),qc(e,1)}},St=function(e){if(13===e.tag){var t=No(e,134217728);null!==t&&nc(t,e,134217728,ec()),qc(e,134217728)}},kt=function(e){if(13===e.tag){var t=tc(e),n=No(e,t);null!==n&&nc(n,e,t,ec()),qc(e,t)}},Ct=function(){return _t},xt=function(e,t){var n=_t;try{return _t=e,t()}finally{_t=n}},Se=function(e,t,n){switch(t){case"input":if(Y(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var r=wr(i);if(!r)throw Error(o(90));G(i),Y(i,r)}}}break;case"textarea":oe(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Te=cc,Ie=uc;var eu={usingClientEntryPoint:!1,Events:[_r,br,wr,Ee,Pe,cc]},tu={findFiberByHostInstance:yr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nu={bundleType:tu.bundleType,version:tu.version,rendererPackageName:tu.rendererPackageName,rendererConfig:tu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:b.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Be(e))?null:e.stateNode},findFiberByHostInstance:tu.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 iu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!iu.isDisabled&&iu.supportsFiber)try{rt=iu.inject(nu),ot=iu}catch(ue){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=eu,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Jc(t))throw Error(o(200));return function(e,t,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:S,key:null==i?null:""+i,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Jc(e))throw Error(o(299));var n=!1,i="",r=Gc;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(i=t.identifierPrefix),void 0!==t.onRecoverableError&&(r=t.onRecoverableError)),t=Uc(e,1,!1,null,0,n,0,i,r),e[fr]=t.current,Hi(8===e.nodeType?e.parentNode:e),new Qc(t)},t.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(o(188));throw e=Object.keys(e).join(","),Error(o(268,e))}return null===(e=Be(t))?null:e.stateNode},t.flushSync=function(e){return uc(e)},t.hydrate=function(e,t,n){if(!Xc(t))throw Error(o(200));return Zc(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Jc(e))throw Error(o(405));var i=null!=n&&n.hydratedSources||null,r=!1,s="",a=Gc;if(null!=n&&(!0===n.unstable_strictMode&&(r=!0),void 0!==n.identifierPrefix&&(s=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError)),t=Hc(t,null,e,1,null!=n?n:null,r,0,s,a),e[fr]=t.current,Hi(e),i)for(e=0;e<i.length;e++)r=(r=(n=i[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,r]:t.mutableSourceEagerHydrationData.push(n,r);return new Kc(t)},t.render=function(e,t,n){if(!Xc(t))throw Error(o(200));return Zc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Xc(e))throw Error(o(40));return!!e._reactRootContainer&&(uc(function(){Zc(null,null,e,!1,function(){e._reactRootContainer=null,e[fr]=null})}),!0)},t.unstable_batchedUpdates=cc,t.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!Xc(n))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return Zc(e,t,n,!1,i)},t.version="18.3.1-next-f1338f8080-20240426"},7810:function(e,t,n){"use strict";e.exports=n(5677)}},o={};function s(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e].call(n.exports,n,n.exports,s),n.exports}s.m=r,s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},s.t=function(n,i){if(1&i&&(n=this(n)),8&i)return n;if("object"==typeof n&&n){if(4&i&&n.__esModule)return n;if(16&i&&"function"==typeof n.then)return n}var r=Object.create(null);s.r(r);var o={};e=e||[null,t({}),t([]),t(t)];for(var a=2&i&&n;("object"==typeof a||"function"==typeof a)&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach(function(e){o[e]=function(){return n[e]}});return o.default=function(){return n},s.d(r,o),r},s.d=function(e,t){for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=function(e){return Promise.all(Object.keys(s.f).reduce(function(t,n){return s.f[n](e,t),t},[]))},s.u=function(e){return e+".min.js"},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n={},i="MoveoAI:",s.l=function(e,t,r,o){if(n[e])n[e].push(t);else{var a,l;if(void 0!==r)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==i+r){a=d;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",s.nc&&a.setAttribute("nonce",s.nc),a.setAttribute("data-webpack",i+r),a.src=e),n[e]=[t];var h=function(t,i){a.onerror=a.onload=null,clearTimeout(p);var r=n[e];if(delete n[e],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach(function(e){return e(i)}),t)return t(i)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=h.bind(null,a.onerror),a.onload=h.bind(null,a.onload),l&&document.head.appendChild(a)}},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;s.g.importScripts&&(e=s.g.location+"");var t=s.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var i=n.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=n[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e}(),function(){var e={233:0};s.f.j=function(t,n){var i=s.o(e,t)?e[t]:void 0;if(0!==i)if(i)n.push(i[2]);else{var r=new Promise(function(n,r){i=e[t]=[n,r]});n.push(i[2]=r);var o=s.p+s.u(t),a=new Error;s.l(o,function(n){if(s.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var r=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+r+": "+o+")",a.name="ChunkLoadError",a.type=r,a.request=o,i[1](a)}},"chunk-"+t,t)}};var t=function(t,n){var i,r,o=n[0],a=n[1],l=n[2],c=0;if(o.some(function(t){return 0!==e[t]})){for(i in a)s.o(a,i)&&(s.m[i]=a[i]);l&&l(s)}for(t&&t(n);c<o.length;c++)r=o[c],s.o(e,r)&&e[r]&&e[r][0](),e[r]=0},n=this.webpackChunkMoveoAI=this.webpackChunkMoveoAI||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var a={};return function(){"use strict";s.d(a,{default:function(){return Ii}});var e={};s.r(e),s.d(e,{Exception:function(){return B},average:function(){return A},difference:function(){return N},flatMap:function(){return H},isChrome:function(){return j},isElectron:function(){return M},isFirefox:function(){return F},isLegacyEdge:function(){return $},isSafari:function(){return U},promisifyEvents:function(){return V},queryToJson:function(){return z},sortByMimeTypes:function(){return W}});var t=s(1931),n=s.n(t),i=s(4785);class r extends i.EventEmitter{constructor(e){super(),Object.defineProperties(this,{_attempts:{value:0,writable:!0},_duration:{enumerable:!1,get(){let e=this._min*Math.pow(this._factor,this._attempts);if(this._jitter){const t=Math.random(),n=Math.floor(t*this._jitter*e);e=1&Math.floor(10*t)?e+n:e-n}return 0|Math.min(e,this._max)}},_factor:{value:e.factor||2},_jitter:{value:e.jitter>0&&e.jitter<=1?e.jitter:0},_max:{value:e.max||1e4},_min:{value:e.min||100},_timeoutID:{value:null,writable:!0}})}backoff(){const e=this._duration;this._timeoutID&&(clearTimeout(this._timeoutID),this._timeoutID=null),this.emit("backoff",this._attempts,e),this._timeoutID=setTimeout(()=>{this.emit("ready",this._attempts,e),this._attempts++},e)}reset(){this._attempts=0,this._timeoutID&&(clearTimeout(this._timeoutID),this._timeoutID=null)}}function o(e,t,n,i){return new(n||(n=Promise))(function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}l((i=i.apply(e,t||[])).next())})}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var l,c,u,d,h,p,f,g,m,v=s(3667);class y extends Error{constructor(e,t){super(),Object.setPrototypeOf(this,y.prototype);const n="string"==typeof e?e:this.explanation,i="object"==typeof e?e:t;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=i}}!function(e){e.AccessTokenInvalid=class extends y{constructor(t,n){super(t,n),this.causes=[],this.code=20101,this.description="Invalid access token",this.explanation="Twilio was unable to validate your Access Token",this.name="AccessTokenInvalid",this.solutions=[],Object.setPrototypeOf(this,e.AccessTokenInvalid.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}},e.AccessTokenExpired=class extends y{constructor(t,n){super(t,n),this.causes=[],this.code=20104,this.description="Access token expired or expiration date invalid",this.explanation="The Access Token provided to the Twilio API has expired, the expiration time specified in the token was invalid, or the expiration time specified was too far in the future",this.name="AccessTokenExpired",this.solutions=[],Object.setPrototypeOf(this,e.AccessTokenExpired.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}},e.AuthenticationFailed=class extends y{constructor(t,n){super(t,n),this.causes=[],this.code=20151,this.description="Authentication Failed",this.explanation="The Authentication with the provided JWT failed",this.name="AuthenticationFailed",this.solutions=[],Object.setPrototypeOf(this,e.AuthenticationFailed.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}}}(l||(l={})),function(e){e.AccessTokenSignatureValidationFailed=class extends y{constructor(t,n){super(t,n),this.causes=["The access token has an invalid Account SID, API Key, or API Key Secret."],this.code=31202,this.description="Signature validation failed.",this.explanation="The provided access token failed signature validation.",this.name="AccessTokenSignatureValidationFailed",this.solutions=["Ensure the Account SID, API Key, and API Key Secret are valid when generating your access token."],Object.setPrototypeOf(this,e.AccessTokenSignatureValidationFailed.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}}}(c||(c={})),function(e){e.BadRequest=class extends y{constructor(t,n){super(t,n),this.causes=[],this.code=31400,this.description="Bad Request (HTTP/SIP)",this.explanation="The request could not be understood due to malformed syntax.",this.name="BadRequest",this.solutions=[],Object.setPrototypeOf(this,e.BadRequest.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}},e.NotFound=class extends y{constructor(t,n){super(t,n),this.causes=["The outbound call was made to an invalid phone number.","The TwiML application sid is missing a Voice URL."],this.code=31404,this.description="Not Found (HTTP/SIP)",this.explanation="The server has not found anything matching the request.",this.name="NotFound",this.solutions=["Ensure the phone number dialed is valid.","Ensure the TwiML application is configured correctly with a Voice URL link."],Object.setPrototypeOf(this,e.NotFound.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}},e.TemporarilyUnavailable=class extends y{constructor(t,n){super(t,n),this.causes=[],this.code=31480,this.description="Temporarily Unavailable (SIP)",this.explanation="The callee is currently unavailable.",this.name="TemporarilyUnavailable",this.solutions=[],Object.setPrototypeOf(this,e.TemporarilyUnavailable.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}},e.BusyHere=class extends y{constructor(t,n){super(t,n),this.causes=[],this.code=31486,this.description="Busy Here (SIP)",this.explanation="The callee is busy.",this.name="BusyHere",this.solutions=[],Object.setPrototypeOf(this,e.BusyHere.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}}}(u||(u={})),function(e){e.Decline=class extends y{constructor(t,n){super(t,n),this.causes=[],this.code=31603,this.description="Decline (SIP)",this.explanation="The callee does not wish to participate in the call.",this.name="Decline",this.solutions=[],Object.setPrototypeOf(this,e.Decline.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}}}(d||(d={})),function(e){e.UnknownError=class extends y{constructor(t,n){super(t,n),this.causes=[],this.code=31e3,this.description="Unknown Error",this.explanation="An unknown error has occurred. See error details for more information.",this.name="UnknownError",this.solutions=[],Object.setPrototypeOf(this,e.UnknownError.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}},e.ApplicationNotFoundError=class extends y{constructor(t,n){super(t,n),this.causes=[],this.code=31001,this.description="Application Not Found",this.explanation="",this.name="ApplicationNotFoundError",this.solutions=[],Object.setPrototypeOf(this,e.ApplicationNotFoundError.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}},e.ConnectionDeclinedError=class extends y{constructor(t,n){super(t,n),this.causes=[],this.code=31002,this.description="Connection Declined",this.explanation="",this.name="ConnectionDeclinedError",this.solutions=[],Object.setPrototypeOf(this,e.ConnectionDeclinedError.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}},e.ConnectionTimeoutError=class extends y{constructor(t,n){super(t,n),this.causes=[],this.code=31003,this.description="Connection Timeout",this.explanation="The server could not produce a response within a suitable amount of time.",this.name="ConnectionTimeoutError",this.solutions=[],Object.setPrototypeOf(this,e.ConnectionTimeoutError.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}},e.ConnectionError=class extends y{constructor(t,n){super(t,n),this.causes=[],this.code=31005,this.description="Connection error",this.explanation="A connection error occurred during the call",this.name="ConnectionError",this.solutions=[],Object.setPrototypeOf(this,e.ConnectionError.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}},e.CallCancelledError=class extends y{constructor(t,n){super(t,n),this.causes=["The incoming call was cancelled because it was not answered in time or it was accepted/rejected by another application instance registered with the same identity."],this.code=31008,this.description="Call cancelled",this.explanation="Unable to answer because the call has ended",this.name="CallCancelledError",this.solutions=[],Object.setPrototypeOf(this,e.CallCancelledError.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}},e.TransportError=class extends y{constructor(t,n){super(t,n),this.causes=[],this.code=31009,this.description="Transport error",this.explanation="No transport available to send or receive messages",this.name="TransportError",this.solutions=[],Object.setPrototypeOf(this,e.TransportError.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}}}(h||(h={})),function(e){e.MalformedRequestError=class extends y{constructor(t,n){super(t,n),this.causes=["Invalid content or MessageType passed to sendMessage method."],this.code=31100,this.description="The request had malformed syntax.",this.explanation="The request could not be understood due to malformed syntax.",this.name="MalformedRequestError",this.solutions=["Ensure content and MessageType passed to sendMessage method are valid."],Object.setPrototypeOf(this,e.MalformedRequestError.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}},e.MissingParameterArrayError=class extends y{constructor(t,n){super(t,n),this.causes=[],this.code=31101,this.description="Missing parameter array in request",this.explanation="",this.name="MissingParameterArrayError",this.solutions=[],Object.setPrototypeOf(this,e.MissingParameterArrayError.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}},e.AuthorizationTokenMissingError=class extends y{constructor(t,n){super(t,n),this.causes=[],this.code=31102,this.description="Authorization token missing in request.",this.explanation="",this.name="AuthorizationTokenMissingError",this.solutions=[],Object.setPrototypeOf(this,e.AuthorizationTokenMissingError.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}},e.MaxParameterLengthExceededError=class extends y{constructor(t,n){super(t,n),this.causes=[],this.code=31103,this.description="Maximum parameter length has been exceeded.",this.explanation="Length of parameters cannot exceed MAX_PARAM_LENGTH.",this.name="MaxParameterLengthExceededError",this.solutions=[],Object.setPrototypeOf(this,e.MaxParameterLengthExceededError.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}},e.InvalidBridgeTokenError=class extends y{constructor(t,n){super(t,n),this.causes=[],this.code=31104,this.description="Invalid bridge token",this.explanation="",this.name="InvalidBridgeTokenError",this.solutions=[],Object.setPrototypeOf(this,e.InvalidBridgeTokenError.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}},e.InvalidClientNameError=class extends y{constructor(t,n){super(t,n),this.causes=["Client name contains invalid characters."],this.code=31105,this.description="Invalid client name",this.explanation="Client name should not contain control, space, delims, or unwise characters.",this.name="InvalidClientNameError",this.solutions=["Make sure that client name does not contain any of the invalid characters."],Object.setPrototypeOf(this,e.InvalidClientNameError.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}},e.ReconnectParameterInvalidError=class extends y{constructor(t,n){super(t,n),this.causes=[],this.code=31107,this.description="The reconnect parameter is invalid",this.explanation="",this.name="ReconnectParameterInvalidError",this.solutions=[],Object.setPrototypeOf(this,e.ReconnectParameterInvalidError.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}}}(p||(p={})),function(e){e.AuthorizationError=class extends y{constructor(t,n){super(t,n),this.causes=[],this.code=31201,this.description="Authorization error",this.explanation="The request requires user authentication. The server understood the request, but is refusing to fulfill it.",this.name="AuthorizationError",this.solutions=[],Object.setPrototypeOf(this,e.AuthorizationError.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}},e.NoValidAccountError=class extends y{constructor(t,n){super(t,n),this.causes=[],this.code=31203,this.description="No valid account",this.explanation="",this.name="NoValidAccountError",this.solutions=[],Object.setPrototypeOf(this,e.NoValidAccountError.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}},e.InvalidJWTTokenError=class extends y{constructor(t,n){super(t,n),this.causes=[],this.code=31204,this.description="Invalid JWT token",this.explanation="",this.name="InvalidJWTTokenError",this.solutions=[],Object.setPrototypeOf(this,e.InvalidJWTTokenError.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}},e.JWTTokenExpiredError=class extends y{constructor(t,n){super(t,n),this.causes=[],this.code=31205,this.description="JWT token expired",this.explanation="",this.name="JWTTokenExpiredError",this.solutions=[],Object.setPrototypeOf(this,e.JWTTokenExpiredError.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}},e.RateExceededError=class extends y{constructor(t,n){super(t,n),this.causes=["Rate limit exceeded."],this.code=31206,this.description="Rate exceeded authorized limit.",this.explanation="The request performed exceeds the authorized limit.",this.name="RateExceededError",this.solutions=["Ensure message send rate does not exceed authorized limits."],Object.setPrototypeOf(this,e.RateExceededError.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}},e.JWTTokenExpirationTooLongError=class extends y{constructor(t,n){super(t,n),this.causes=[],this.code=31207,this.description="JWT token expiration too long",this.explanation="",this.name="JWTTokenExpirationTooLongError",this.solutions=[],Object.setPrototypeOf(this,e.JWTTokenExpirationTooLongError.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}},e.ReconnectAttemptError=class extends y{constructor(t,n){super(t,n),this.causes=[],this.code=31209,this.description="Reconnect attempt is not authorized.",this.explanation="",this.name="ReconnectAttemptError",this.solutions=[],Object.setPrototypeOf(this,e.ReconnectAttemptError.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}},e.CallMessageEventTypeInvalidError=class extends y{constructor(t,n){super(t,n),this.causes=["The Call Message Event Type is invalid and is not understood by Twilio Voice."],this.code=31210,this.description="Call Message Event Type is invalid.",this.explanation="The Call Message Event Type is invalid and is not understood by Twilio Voice.",this.name="CallMessageEventTypeInvalidError",this.solutions=["Ensure the Call Message Event Type is Valid and understood by Twilio Voice and try again."],Object.setPrototypeOf(this,e.CallMessageEventTypeInvalidError.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}},e.PayloadSizeExceededError=class extends y{constructor(t,n){super(t,n),this.causes=["The payload size of Call Message Event exceeds the authorized limit."],this.code=31212,this.description="Call Message Event Payload size exceeded authorized limit.",this.explanation="The request performed to send a Call Message Event exceeds the payload size authorized limit",this.name="PayloadSizeExceededError",this.solutions=["Reduce payload size of Call Message Event to be within the authorized limit and try again."],Object.setPrototypeOf(this,e.PayloadSizeExceededError.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}}}(l||(l={})),function(e){e.PermissionDeniedError=class extends y{constructor(t,n){super(t,n),this.causes=["The user denied the getUserMedia request.","The browser denied the getUserMedia request."],this.code=31401,this.description="UserMedia Permission Denied Error",this.explanation="The browser or end-user denied permissions to user media. Therefore we were unable to acquire input audio.",this.name="PermissionDeniedError",this.solutions=["The user should accept the request next time prompted. If the browser saved the deny, the user should change that permission in their browser.","The user should to verify that the browser has permission to access the microphone at this address."],Object.setPrototypeOf(this,e.PermissionDeniedError.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}},e.AcquisitionFailedError=class extends y{constructor(t,n){super(t,n),this.causes=["NotFoundError - The deviceID specified was not found.","The getUserMedia constraints were overconstrained and no devices matched."],this.code=31402,this.description="UserMedia Acquisition Failed Error",this.explanation="The browser and end-user allowed permissions, however getting the media failed. Usually this is due to bad constraints, but can sometimes fail due to browser, OS or hardware issues.",this.name="AcquisitionFailedError",this.solutions=["Ensure the deviceID being specified exists.","Try acquiring media with fewer constraints."],Object.setPrototypeOf(this,e.AcquisitionFailedError.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}}}(f||(f={})),function(e){e.ConnectionError=class extends y{constructor(t,n){super(t,n),this.causes=[],this.code=53e3,this.description="Signaling connection error",this.explanation="Raised whenever a signaling connection error occurs that is not covered by a more specific error code.",this.name="ConnectionError",this.solutions=[],Object.setPrototypeOf(this,e.ConnectionError.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}},e.ConnectionDisconnected=class extends y{constructor(t,n){super(t,n),this.causes=["The device running your application lost its Internet connection."],this.code=53001,this.description="Signaling connection disconnected",this.explanation="Raised whenever the signaling connection is unexpectedly disconnected.",this.name="ConnectionDisconnected",this.solutions=["Ensure the device running your application has access to a stable Internet connection."],Object.setPrototypeOf(this,e.ConnectionDisconnected.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}}}(g||(g={})),function(e){e.ClientLocalDescFailed=class extends y{constructor(t,n){super(t,n),this.causes=["The Client may not be using a supported WebRTC implementation.","The Client may not have the necessary resources to create or apply a new media description."],this.code=53400,this.description="Client is unable to create or apply a local media description",this.explanation="Raised whenever a Client is unable to create or apply a local media description.",this.name="ClientLocalDescFailed",this.solutions=["If you are experiencing this error using the JavaScript SDK, ensure you are running it with a supported WebRTC implementation."],Object.setPrototypeOf(this,e.ClientLocalDescFailed.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}},e.ClientRemoteDescFailed=class extends y{constructor(t,n){super(t,n),this.causes=["The Client may not be using a supported WebRTC implementation.","The Client may be connecting peer-to-peer with another Participant that is not using a supported WebRTC implementation.","The Client may not have the necessary resources to apply a new media description."],this.code=53402,this.description="Client is unable to apply a remote media description",this.explanation="Raised whenever the Client receives a remote media description but is unable to apply it.",this.name="ClientRemoteDescFailed",this.solutions=["If you are experiencing this error using the JavaScript SDK, ensure you are running it with a supported WebRTC implementation."],Object.setPrototypeOf(this,e.ClientRemoteDescFailed.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}},e.ConnectionError=class extends y{constructor(t,n){super(t,n),this.causes=["The Client was unable to establish a media connection.","A media connection which was active failed liveliness checks."],this.code=53405,this.description="Media connection failed",this.explanation="Raised by the Client or Server whenever a media connection fails.",this.name="ConnectionError",this.solutions=["If the problem persists, try connecting to another region.","Check your Client's network connectivity.","If you've provided custom ICE Servers then ensure that the URLs and credentials are valid."],Object.setPrototypeOf(this,e.ConnectionError.prototype);const i="string"==typeof t?t:this.explanation,r="object"==typeof t?t:n;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=r}}}(m||(m={}));const _=new Map([[20101,l.AccessTokenInvalid],[20104,l.AccessTokenExpired],[20151,l.AuthenticationFailed],[31202,c.AccessTokenSignatureValidationFailed],[31400,u.BadRequest],[31404,u.NotFound],[31480,u.TemporarilyUnavailable],[31486,u.BusyHere],[31603,d.Decline],[31e3,h.UnknownError],[31001,h.ApplicationNotFoundError],[31002,h.ConnectionDeclinedError],[31003,h.ConnectionTimeoutError],[31005,h.ConnectionError],[31008,h.CallCancelledError],[31009,h.TransportError],[31100,p.MalformedRequestError],[31101,p.MissingParameterArrayError],[31102,p.AuthorizationTokenMissingError],[31103,p.MaxParameterLengthExceededError],[31104,p.InvalidBridgeTokenError],[31105,p.InvalidClientNameError],[31107,p.ReconnectParameterInvalidError],[31201,l.AuthorizationError],[31203,l.NoValidAccountError],[31204,l.InvalidJWTTokenError],[31205,l.JWTTokenExpiredError],[31206,l.RateExceededError],[31207,l.JWTTokenExpirationTooLongError],[31209,l.ReconnectAttemptError],[31210,l.CallMessageEventTypeInvalidError],[31212,l.PayloadSizeExceededError],[31401,f.PermissionDeniedError],[31402,f.AcquisitionFailedError],[53e3,g.ConnectionError],[53001,g.ConnectionDisconnected],[53400,m.ClientLocalDescFailed],[53402,m.ClientRemoteDescFailed],[53405,m.ConnectionError]]);Object.freeze(_);const b=new Set([31001,31002,31003,31101,31102,31103,31104,31105,31107,31201,31202,31203,31204,31205,31207,31404,31480,31486,31603]);function w(e,t){var n;if("number"==typeof t&&(n=t,_.has(n)))return!e&&b.has(t)?void 0:function(e){const t=_.get(e);if(!t)throw new S(`Error code ${e} not found`);return t}(t)}class S extends Error{constructor(e){super(e),this.name="InvalidArgumentError"}}class k extends Error{constructor(e){super(e),this.name="InvalidStateError"}}class C extends Error{constructor(e){super(e),this.name="NotSupportedError"}}const x="@twilio/voice-sdk",E="2.17.0",P="https://sdk.twilio.com/js/client/sounds/releases/1.0.0",T=`${P}/cowbell.mp3?cache=${E}`;class I{static getLogLevelInstance(e){if(!I.loglevelInstance)try{I.loglevelInstance=(e&&e.LogLevelModule?e.LogLevelModule:v).getLogger(x)}catch(e){console.warn("Cannot create custom logger"),I.loglevelInstance=console}return I.loglevelInstance}constructor(e,t){this._log=I.getLogLevelInstance(t),this._prefix=`[TwilioVoice][${e}]`}debug(...e){this._log.debug(this._prefix,...e)}error(...e){this._log.error(this._prefix,...e)}info(...e){this._log.info(this._prefix,...e)}setDefaultLevel(e){this._log.setDefaultLevel?this._log.setDefaultLevel(e):console.warn("Logger cannot setDefaultLevel")}warn(...e){this._log.warn(this._prefix,...e)}}I.levels=v.levels,I.getLogLevelInstance();const O=`${P}/outgoing.mp3`;class R{constructor(e,t,n,i){this._name=e,this._availableDevices=t,this._beforeChange=n,this._isSupported=i,this._activeDevices=new Set,this._log=new I("OutputDeviceCollection")}delete(e){this._log.debug(".delete",e);const t=!!this._activeDevices.delete(e),n=this._availableDevices.get("default")||Array.from(this._availableDevices.values())[0];!this._activeDevices.size&&n&&this._activeDevices.add(n);const i=Array.from(this._activeDevices.values()).map(e=>e.deviceId);return this._beforeChange(this._name,i),!!t}get(){return this._activeDevices}set(e){if(this._log.debug(".set",e),!this._isSupported)return Promise.reject(new C("This browser does not support audio output selection"));const t=Array.isArray(e)?e:[e];if(!t.length)return Promise.reject(new S("Must specify at least one device to set"));const n=[],i=t.map(e=>{const t=this._availableDevices.get(e);return t||n.push(e),t});return n.length?Promise.reject(new S(`Devices not found: ${n.join(", ")}`)):new Promise(e=>{e(this._beforeChange(this._name,t))}).then(()=>{this._activeDevices.clear(),i.forEach(this._activeDevices.add,this._activeDevices)})}test(e=O){return this._isSupported?this._activeDevices.size?Promise.all(Array.from(this._activeDevices).map(t=>{let n;return new Promise(t=>{n=new Audio(e),n.oncanplay=t}).then(()=>n.setSinkId(t.deviceId).then(()=>n.play()))})):Promise.reject(new k("No active output devices to test")):Promise.reject(new C("This browser does not support audio output selection"))}}class L{constructor(e){Object.defineProperties(this,{deviceId:{get(){return e.deviceId}},groupId:{get(){return e.groupId}},kind:{get(){return e.kind}},label:{get(){return e.label}}})}}function D(e){if(!(this instanceof D))return new D(e);this.message=e}function A(e){return e&&e.length?e.reduce((e,t)=>e+t)/e.length:0}function N(e,t,n){n=n||(e=>e);const i=new Set(t.map(n));return e.filter(e=>!i.has(n(e)))}function M(e){return!!e.userAgent.match("Electron")}function j(e,t){const n=!!t.userAgent.match("CriOS"),i=!!t.userAgent.match("HeadlessChrome"),r=void 0!==e.chrome&&"Google Inc."===t.vendor&&-1===t.userAgent.indexOf("OPR")&&-1===t.userAgent.indexOf("Edge");return n||M(t)||r||i}function F(e){return!!(e=e||("undefined"==typeof window?s.g.navigator:window.navigator))&&"string"==typeof e.userAgent&&/firefox|fxios/i.test(e.userAgent)}function $(e){return!!(e=e||("undefined"==typeof window?s.g.navigator:window.navigator))&&"string"==typeof e.userAgent&&/edge\/\d+/i.test(e.userAgent)}function U(e){return!!e.vendor&&-1!==e.vendor.indexOf("Apple")&&e.userAgent&&-1===e.userAgent.indexOf("CriOS")&&-1===e.userAgent.indexOf("FxiOS")}function z(e){return e?e.split("&").reduce((e,t)=>{const n=t.split("="),i=n[0],r=decodeURIComponent((n[1]||"").replace(/\+/g,"%20"));return i&&(e[i]=r),e},{}):""}function H(e,t){const n=e instanceof Map||e instanceof Set?Array.from(e.values()):e;return t=t||(e=>e),n.reduce((e,n)=>{const i=t(n);return e.concat(i)},[])}function V(e,t,n){return new Promise((i,r)=>{function o(){e.removeListener(n,s),i()}function s(){e.removeListener(t,o),r()}e.once(t,o),e.once(n,s)})}function W(e,t){const n=t.map(e=>"audio/"+e.toLowerCase());return e.sort((e,t)=>{const i=n.indexOf(e.mimeType.toLowerCase()),r=n.indexOf(t.mimeType.toLowerCase());return(i>=0?i:Number.MAX_VALUE)-(r>=0?r:Number.MAX_VALUE)})}D.prototype.toString=function(){return`Twilio.Exception: ${this.message}`};const B=D,q={audioinput:"Audio Input",audiooutput:"Audio Output"};class G extends i.EventEmitter{get audioConstraints(){return this._audioConstraints}get inputDevice(){return this._inputDevice}get inputStream(){return this._localProcessedStream||this._selectedInputDeviceStream}get processedStream(){return this._log.warn("AudioHelper#processedStream is deprecated. Please use AudioHelper#localProcessedStream instead."),this._localProcessedStream}get localProcessedStream(){return this._localProcessedStream}get remoteProcessedStream(){return this._remoteProcessedStream}constructor(e,t,n){super(),this.availableInputDevices=new Map,this.availableOutputDevices=new Map,this._audioConstraints=null,this._defaultInputDeviceStream=null,this._enabledSounds={[Ye.SoundName.Disconnect]:!0,[Ye.SoundName.Incoming]:!0,[Ye.SoundName.Outgoing]:!0},this._inputDevice=null,this._inputDevicePromise=null,this._isPollingInputVolume=!1,this._log=new I("AudioHelper"),this._localProcessedStream=null,this._remoteProcessedStream=null,this._selectedInputDeviceStream=null,this._unknownDeviceIndexes={audioinput:{},audiooutput:{}},this._updateAvailableDevices=()=>this._mediaDevices&&this._enumerateDevices?this._enumerateDevices().then(e=>{this._updateDevices(e.filter(e=>"audiooutput"===e.kind),this.availableOutputDevices,this._removeLostOutput),this._updateDevices(e.filter(e=>"audioinput"===e.kind),this.availableInputDevices,this._removeLostInput);const t=this.availableOutputDevices.get("default")||Array.from(this.availableOutputDevices.values())[0];[this.speakerDevices,this.ringtoneDevices].forEach(e=>{!e.get().size&&this.availableOutputDevices.size&&this.isOutputSelectionSupported&&e.set(t.deviceId).catch(e=>{this._log.warn(`Unable to set audio output devices. ${e}`)})})}):Promise.reject("Enumeration not supported"),this._removeLostInput=e=>{if(!this.inputDevice||this.inputDevice.deviceId!==e.deviceId)return!1;this._destroyLocalProcessedStream(),this._replaceStream(null),this._inputDevice=null,this._maybeStopPollingVolume();const t=this.availableInputDevices.get("default")||Array.from(this.availableInputDevices.values())[0];return t&&this.setInputDevice(t.deviceId),!0},this._removeLostOutput=e=>{const t=this.speakerDevices.delete(e),n=this.ringtoneDevices.delete(e);return t||n},n=Object.assign({AudioContext:"undefined"!=typeof AudioContext&&AudioContext,setSinkId:"undefined"!=typeof HTMLAudioElement&&HTMLAudioElement.prototype.setSinkId},n),this._beforeSetInputDevice=n.beforeSetInputDevice||(()=>Promise.resolve()),this._updateUserOptions(n),this._audioProcessorEventObserver=n.audioProcessorEventObserver,this._mediaDevices=n.mediaDevices||navigator.mediaDevices,this._onActiveInputChanged=t,this._enumerateDevices="function"==typeof n.enumerateDevices?n.enumerateDevices:this._mediaDevices&&this._mediaDevices.enumerateDevices.bind(this._mediaDevices);const i=!(!n.AudioContext&&!n.audioContext),r=!!this._enumerateDevices;n.enabledSounds&&(this._enabledSounds=n.enabledSounds);const o="function"==typeof n.setSinkId;this.isOutputSelectionSupported=r&&o,this.isVolumeSupported=i,this.isVolumeSupported&&(this._audioContext=n.audioContext||n.AudioContext&&new n.AudioContext,this._audioContext&&(this._inputVolumeAnalyser=this._audioContext.createAnalyser(),this._inputVolumeAnalyser.fftSize=32,this._inputVolumeAnalyser.smoothingTimeConstant=.3)),this.ringtoneDevices=new R("ringtone",this.availableOutputDevices,e,this.isOutputSelectionSupported),this.speakerDevices=new R("speaker",this.availableOutputDevices,e,this.isOutputSelectionSupported),this.addListener("newListener",e=>{"inputVolume"===e&&this._maybeStartPollingVolume()}),this.addListener("removeListener",e=>{"inputVolume"===e&&this._maybeStopPollingVolume()}),this.once("newListener",()=>{this.isOutputSelectionSupported||this._log.warn("Warning: This browser does not support audio output selection."),this.isVolumeSupported||this._log.warn("Warning: This browser does not support Twilio's volume indicator feature.")}),r&&this._initializeEnumeration(),navigator&&navigator.permissions&&"function"==typeof navigator.permissions.query?navigator.permissions.query({name:"microphone"}).then(e=>{if("granted"!==e.state){const t=()=>{this._updateAvailableDevices(),this._stopMicrophonePermissionListener()};e.addEventListener("change",t),this._microphonePermissionStatus=e,this._onMicrophonePermissionStatusChanged=t}}).catch(e=>this._log.warn(`Warning: unable to listen for microphone permission changes. ${e}`)):this._log.warn("Warning: current browser does not support permissions API.")}_destroy(){this._stopDefaultInputDeviceStream(),this._stopSelectedInputDeviceStream(),this._destroyLocalProcessedStream(),this._destroyRemoteProcessedStream(),this._maybeStopPollingVolume(),this.removeAllListeners(),this._stopMicrophonePermissionListener(),this._unbind()}_destroyRemoteProcessedStream(){if(this._remoteProcessor&&this._remoteProcessedStream){this._log.info("destroying remote processed stream");const e=this._remoteProcessedStream;this._remoteProcessedStream.getTracks().forEach(e=>e.stop()),this._remoteProcessedStream=null,this._remoteProcessor.destroyProcessedStream(e),this._audioProcessorEventObserver.emit("destroy",!0)}}_getInputDevicePromise(){return this._inputDevicePromise}_getAudioProcessorEventObserver(){return this._audioProcessorEventObserver}_maybeCreateRemoteProcessedStream(e){return this._remoteProcessor?(this._log.info("Creating remote processed stream"),this._remoteProcessor.createProcessedStream(e).then(e=>(this._remoteProcessedStream=e,this._audioProcessorEventObserver.emit("create",!0),this._remoteProcessedStream))):Promise.resolve(e)}_maybeStartPollingVolume(){if(!this.isVolumeSupported||!this.inputStream)return;if(this._updateVolumeSource(),this._isPollingInputVolume||!this._inputVolumeAnalyser)return;const e=this._inputVolumeAnalyser.frequencyBinCount,t=new Uint8Array(e);this._isPollingInputVolume=!0;const n=()=>{if(this._isPollingInputVolume){if(this._inputVolumeAnalyser){this._inputVolumeAnalyser.getByteFrequencyData(t);const e=A(t);this.emit("inputVolume",e/255)}requestAnimationFrame(n)}};requestAnimationFrame(n)}_maybeStopPollingVolume(){this.isVolumeSupported&&(!this._isPollingInputVolume||this.inputStream&&this.listenerCount("inputVolume")||(this._inputVolumeSource&&(this._inputVolumeSource.disconnect(),delete this._inputVolumeSource),this._isPollingInputVolume=!1))}_openDefaultDeviceWithConstraints(e){return this._log.info("Opening default device with constraints",e),this._getUserMedia(e).then(e=>(this._log.info("Opened default device. Updating available devices."),this._updateAvailableDevices().catch(e=>{this._log.warn("Unable to updateAvailableDevices after gUM call",e)}),this._defaultInputDeviceStream=e,this._maybeCreateLocalProcessedStream(e)))}_stopDefaultInputDeviceStream(){this._defaultInputDeviceStream&&(this._log.info("stopping default device stream"),this._defaultInputDeviceStream.getTracks().forEach(e=>e.stop()),this._defaultInputDeviceStream=null,this._destroyLocalProcessedStream())}_unbind(){var e;(null===(e=this._mediaDevices)||void 0===e?void 0:e.removeEventListener)&&this._mediaDevices.removeEventListener("devicechange",this._updateAvailableDevices)}_updateUserOptions(e){"function"==typeof e.enumerateDevices&&(this._enumerateDevices=e.enumerateDevices),"function"==typeof e.getUserMedia&&(this._getUserMedia=e.getUserMedia)}addProcessor(e,t=!1){if(this._log.debug(".addProcessor"),this._localProcessor&&!t)throw new C("Can only have one Local AudioProcessor at a time.");if(this._remoteProcessor&&t)throw new C("Can only have one Remote AudioProcessor at a time.");if("object"!=typeof e||null===e)throw new S("Missing AudioProcessor argument.");if("function"!=typeof e.createProcessedStream)throw new S("Missing createProcessedStream() method.");if("function"!=typeof e.destroyProcessedStream)throw new S("Missing destroyProcessedStream() method.");return t?(this._remoteProcessor=e,this._audioProcessorEventObserver.emit("add",!0),Promise.resolve()):(this._localProcessor=e,this._audioProcessorEventObserver.emit("add",!1),this._restartInputStreams())}disconnect(e){return this._log.debug(".disconnect",e),this._maybeEnableSound(Ye.SoundName.Disconnect,e)}incoming(e){return this._log.debug(".incoming",e),this._maybeEnableSound(Ye.SoundName.Incoming,e)}outgoing(e){return this._log.debug(".outgoing",e),this._maybeEnableSound(Ye.SoundName.Outgoing,e)}removeProcessor(e,t=!1){if(this._log.debug(".removeProcessor"),"object"!=typeof e||null===e)throw new S("Missing AudioProcessor argument.");if(this._localProcessor!==e&&!t)throw new S("Cannot remove a Local AudioProcessor that has not been previously added.");if(this._remoteProcessor!==e&&t)throw new S("Cannot remove a Remote AudioProcessor that has not been previously added.");return t?(this._destroyRemoteProcessedStream(),this._remoteProcessor=null,this._audioProcessorEventObserver.emit("remove",!0),Promise.resolve()):(this._destroyLocalProcessedStream(),this._localProcessor=null,this._audioProcessorEventObserver.emit("remove",!1),this._restartInputStreams())}setAudioConstraints(e){return this._log.debug(".setAudioConstraints",e),this._audioConstraints=Object.assign({},e),delete this._audioConstraints.deviceId,this.inputDevice?this._setInputDevice(this.inputDevice.deviceId,!0):Promise.resolve()}setInputDevice(e){return this._log.debug(".setInputDevice",e),this._setInputDevice(e,!1)}unsetAudioConstraints(){return this._log.debug(".unsetAudioConstraints"),this._audioConstraints=null,this.inputDevice?this._setInputDevice(this.inputDevice.deviceId,!0):Promise.resolve()}unsetInputDevice(){return this._log.debug(".unsetInputDevice",this.inputDevice),this.inputDevice?(this._destroyLocalProcessedStream(),this._onActiveInputChanged(null).then(()=>{this._replaceStream(null),this._inputDevice=null,this._maybeStopPollingVolume()})):Promise.resolve()}_destroyLocalProcessedStream(){if(this._localProcessor&&this._localProcessedStream){this._log.info("destroying local processed stream");const e=this._localProcessedStream;this._localProcessedStream.getTracks().forEach(e=>e.stop()),this._localProcessedStream=null,this._localProcessor.destroyProcessedStream(e),this._audioProcessorEventObserver.emit("destroy",!1)}}_getUnknownDeviceIndex(e){const t=e.deviceId,n=e.kind;let i=this._unknownDeviceIndexes[n][t];return i||(i=Object.keys(this._unknownDeviceIndexes[n]).length+1,this._unknownDeviceIndexes[n][t]=i),i}_initializeEnumeration(){if(!this._mediaDevices||!this._enumerateDevices)throw new C("Enumeration is not supported");this._mediaDevices.addEventListener&&this._mediaDevices.addEventListener("devicechange",this._updateAvailableDevices),this._updateAvailableDevices().then(()=>{this.isOutputSelectionSupported&&Promise.all([this.speakerDevices.set("default"),this.ringtoneDevices.set("default")]).catch(e=>{this._log.warn(`Warning: Unable to set audio output devices. ${e}`)})})}_maybeCreateLocalProcessedStream(e){return this._localProcessor?(this._log.info("Creating local processed stream"),this._localProcessor.createProcessedStream(e).then(e=>(this._localProcessedStream=e,this._audioProcessorEventObserver.emit("create",!1),this._localProcessedStream))):Promise.resolve(e)}_maybeEnableSound(e,t){return void 0!==t&&(this._enabledSounds[e]=t),this._enabledSounds[e]}_replaceStream(e){this._log.info("Replacing with new stream."),this._selectedInputDeviceStream&&(this._log.info("Old stream detected. Stopping tracks."),this._stopSelectedInputDeviceStream()),this._selectedInputDeviceStream=e}_restartInputStreams(){if(this.inputDevice&&this._selectedInputDeviceStream)return this._log.info("Restarting selected input device"),this._setInputDevice(this.inputDevice.deviceId,!0);if(this._defaultInputDeviceStream){const e=this.availableInputDevices.get("default")||Array.from(this.availableInputDevices.values())[0];return this._log.info("Restarting default input device, now becoming selected."),this._setInputDevice(e.deviceId,!0)}return Promise.resolve()}_setInputDevice(e,t){return o(this,void 0,void 0,function*(){return this._inputDevicePromise=(()=>o(this,void 0,void 0,function*(){if(yield this._beforeSetInputDevice(),"string"!=typeof e)return Promise.reject(new S("Must specify the device to set"));const n=this.availableInputDevices.get(e);if(!n)return Promise.reject(new S(`Device not found: ${e}`));if(this._log.info("Setting input device. ID: "+e),this._inputDevice&&this._inputDevice.deviceId===e&&this._selectedInputDeviceStream){if(!t)return Promise.resolve();this._log.info("Same track detected on setInputDevice, stopping old tracks."),this._stopSelectedInputDeviceStream()}this._stopDefaultInputDeviceStream();const i={audio:Object.assign({deviceId:{exact:e}},this.audioConstraints)};return this._log.info("setInputDevice: getting new tracks."),this._getUserMedia(i).then(e=>(this._destroyLocalProcessedStream(),this._maybeCreateLocalProcessedStream(e).then(t=>(this._log.info("setInputDevice: invoking _onActiveInputChanged."),this._onActiveInputChanged(t).then(()=>{this._replaceStream(e),this._inputDevice=n,this._maybeStartPollingVolume()})))))}))().finally(()=>{this._inputDevicePromise=null})})}_stopMicrophonePermissionListener(){var e;(null===(e=this._microphonePermissionStatus)||void 0===e?void 0:e.removeEventListener)&&this._microphonePermissionStatus.removeEventListener("change",this._onMicrophonePermissionStatusChanged)}_stopSelectedInputDeviceStream(){this._selectedInputDeviceStream&&(this._log.info("Stopping selected device stream"),this._selectedInputDeviceStream.getTracks().forEach(e=>e.stop()))}_updateDevices(e,t,n){const i=e.map(e=>e.deviceId),r=Array.from(t.values()).map(e=>e.deviceId),o=[],s=N(r,i);s.forEach(e=>{const i=t.get(e);i&&(t.delete(e),n(i)&&o.push(i))});let a=!1;if(e.forEach(e=>{const n=t.get(e.deviceId),i=this._wrapMediaDeviceInfo(e);n&&n.label===i.label||(t.set(e.deviceId,i),a=!0)}),a||s.length){const e="default",t=this.inputDevice&&this.inputDevice.deviceId===e,n=this._defaultInputDeviceStream&&this.availableInputDevices.get(e);(t||n)&&(this._log.warn("Calling getUserMedia after device change to ensure that the tracks of the active device (default) have not gone stale."),setTimeout(()=>{this._setInputDevice(e,!0)},0)),this._log.debug("#deviceChange",o),this.emit("deviceChange",o)}}_updateVolumeSource(){if(this.inputStream&&this._audioContext&&this._inputVolumeAnalyser){this._inputVolumeSource&&this._inputVolumeSource.disconnect();try{this._inputVolumeSource=this._audioContext.createMediaStreamSource(this.inputStream),this._inputVolumeSource.connect(this._inputVolumeAnalyser)}catch(e){this._log.warn("Unable to update volume source",e),delete this._inputVolumeSource}}}_wrapMediaDeviceInfo(e){const t={deviceId:e.deviceId,groupId:e.groupId,kind:e.kind,label:e.label};if(!t.label)if("default"===t.deviceId)t.label="Default";else{const n=this._getUnknownDeviceIndex(e);t.label=`Unknown ${q[t.kind]} Device ${n}`}return new L(t)}}G||(G={});var Q=G;class K extends i.EventEmitter{constructor(){super(),this._log=new I("AudioProcessorEventObserver"),this._log.info("Creating AudioProcessorEventObserver instance"),this.on("enabled",e=>this._reEmitEvent("enabled",e)),this.on("add",e=>this._reEmitEvent("add",e)),this.on("remove",e=>this._reEmitEvent("remove",e)),this.on("create",e=>this._reEmitEvent("create-processed-stream",e)),this.on("destroy",e=>this._reEmitEvent("destroy-processed-stream",e))}destroy(){this.removeAllListeners()}_reEmitEvent(e,t){this._log.info(`${t?"Remote":"Local"} AudioProcessor:${e}`),this.emit("event",{name:e,group:"audio-processor",isRemote:t})}}const J={dtmf0:[1360,960],dtmf1:[1230,720],dtmf2:[1360,720],dtmf3:[1480,720],dtmf4:[1230,790],dtmf5:[1360,790],dtmf6:[1480,790],dtmf7:[1230,870],dtmf8:[1360,870],dtmf9:[1480,870],dtmfh:[1480,960],dtmfs:[1230,960]};class X{constructor(e){this._context=e,this._gainNodes=[],this._gainNodes=[this._context.createGain(),this._context.createGain()],this._gainNodes.forEach(e=>{e.connect(this._context.destination),e.gain.value=.1,this._gainNodes.push(e)})}cleanup(){this._gainNodes.forEach(e=>{e.disconnect()})}play(e){const t=J[e];if(!t)throw new S("Invalid DTMF sound name");[this._context.createOscillator(),this._context.createOscillator()].forEach((e,n)=>{e.type="sine",e.frequency.value=t[n],e.connect(this._gainNodes[n]),e.start(),e.stop(this._context.currentTime+.1),e.addEventListener("ended",()=>e.disconnect())})}}const Y=function(e,t,n){const i=JSON.stringify(t.body||{}),r=new Headers;t.headers=t.headers||[],Object.entries(t.headers).forEach(([e,t])=>r.append(e,t)),fetch(t.url,{body:i,headers:r,method:e}).then(e=>e.text(),n).then(e=>n(null,e),n)};Y.get=function(e,t){return new this("GET",e,t)},Y.post=function(e,t){return new this("POST",e,t)};class Z extends i.EventEmitter{constructor(e,t,n){if(super(),!(this instanceof Z))return new Z(e,t,n);let i=(n=Object.assign({defaultPayload(){return{}}},n)).defaultPayload;"function"!=typeof i&&(i=()=>Object.assign({},n.defaultPayload));let r=!0;const o=Object.assign({app_name:void 0,app_version:void 0},n.metadata);Object.defineProperties(this,{_defaultPayload:{value:i},_host:{value:n.host,writable:!0},_isEnabled:{get(){return r},set(e){r=e}},_log:{value:new I("EventPublisher")},_request:{value:n.request||Y,writable:!0},_token:{value:t,writable:!0},isEnabled:{enumerable:!0,get(){return r}},metadata:{enumerable:!0,get(){return o}},productName:{enumerable:!0,value:e},token:{enumerable:!0,get(){return this._token}}})}}function ee(e){return{audio_codec:e.codecName,audio_level_in:e.audioInputLevel,audio_level_out:e.audioOutputLevel,bytes_received:e.bytesReceived,bytes_sent:e.bytesSent,call_volume_input:e.inputVolume,call_volume_output:e.outputVolume,jitter:e.jitter,mos:e.mos&&Math.round(100*e.mos)/100,packets_lost:e.packetsLost,packets_lost_fraction:e.packetsLostFraction&&Math.round(100*e.packetsLostFraction)/100,packets_received:e.packetsReceived,rtt:e.rtt,timestamp:new Date(e.timestamp).toISOString(),total_bytes_received:e.totals.bytesReceived,total_bytes_sent:e.totals.bytesSent,total_packets_lost:e.totals.packetsLost,total_packets_received:e.totals.packetsReceived,total_packets_sent:e.totals.packetsSent}}Z.prototype._post=function(e,t,n,i,r,o,s){if(!this.isEnabled&&!s||!this._host)return this._log.debug("Publishing cancelled",JSON.stringify({isEnabled:this.isEnabled,force:s,host:this._host})),Promise.resolve();if(!o||!(o.parameters&&o.parameters.CallSid||o.outboundConnectionId))return o?this._log.debug("Publishing cancelled. Missing connection info",JSON.stringify({outboundConnectionId:o.outboundConnectionId,parameters:o.parameters})):this._log.debug("Publishing cancelled. Missing connection object"),Promise.resolve();const a={group:n,level:t.toUpperCase(),name:i,payload:r&&r.forEach?r.slice(0):Object.assign(this._defaultPayload(o),r),payload_type:"application/json",private:!1,publisher:this.productName,timestamp:(new Date).toISOString()};this.metadata&&(a.publisher_metadata=this.metadata),"EndpointEvents"===e&&this._log.debug("Publishing insights",JSON.stringify({endpointName:e,event:a,force:s,host:this._host}));const l={body:a,headers:{"Content-Type":"application/json","X-Twilio-Token":this.token},url:`https://${this._host}/v4/${e}`};return new Promise((e,t)=>{this._request.post(l,n=>{n?(this.emit("error",n),t(n)):e()})}).catch(e=>{this._log.error(`Unable to post ${n} ${i} event to Insights. Received error: ${e}`)})},Z.prototype.post=function(e,t,n,i,r,o){return this._post("EndpointEvents",e,t,n,i,r,o)},Z.prototype.debug=function(e,t,n,i){return this.post("debug",e,t,n,i)},Z.prototype.info=function(e,t,n,i){return this.post("info",e,t,n,i)},Z.prototype.warn=function(e,t,n,i){return this.post("warning",e,t,n,i)},Z.prototype.error=function(e,t,n,i){return this.post("error",e,t,n,i)},Z.prototype.postMetrics=function(e,t,n,i,r){return new Promise(o=>{const s=n.map(ee).map(e=>Object.assign(e,i));o(this._post("EndpointMetrics","info",e,t,s,r))})},Z.prototype.setHost=function(e){this._host=e},Z.prototype.setToken=function(e){this._token=e},Z.prototype.enable=function(){this._isEnabled=!0},Z.prototype.disable=function(){this._isEnabled=!1};const te="undefined"!=typeof window?window.RTCStatsReport:void 0;function ne(e){if(!(this instanceof ne))return new ne(e);const t=this;Object.defineProperties(this,{_map:{value:e},size:{enumerable:!0,get(){return t._map.size}}}),this[Symbol.iterator]=e[Symbol.iterator]}function ie(e){return{bytesReceived:void 0,bytesSent:void 0,dtlsState:void 0,id:e.id,localCertificateId:e.stat("localCertificateId"),remoteCertificateId:e.stat("remoteCertificateId"),rtcpTransportStatsId:void 0,selectedCandidatePairId:e.stat("selectedCandidatePairId"),timestamp:Date.parse(e.timestamp),type:"transport"}}function re(e,t){return{associateStatsId:void 0,codecId:`codec-${e.id}`,firCount:t?le(e,"googFirsSent"):void 0,id:e.id,isRemote:void 0,mediaType:e.stat("mediaType"),nackCount:le(e,t?"googNacksSent":"googNacksReceived"),pliCount:le(e,t?"googPlisSent":"googPlisReceived"),qpSum:le(e,"qpSum"),sliCount:void 0,ssrc:e.stat("ssrc"),timestamp:Date.parse(e.timestamp),trackId:`track-${e.id}`,transportId:e.stat("transportId")}}function oe(e,t){return{candidateType:ae(e.stat("candidateType")),deleted:void 0,id:e.id,ip:e.stat("ipAddress"),isRemote:t,port:le(e,"portNumber"),priority:ce(e,"priority"),protocol:e.stat("transport"),relayProtocol:void 0,timestamp:Date.parse(e.timestamp),transportId:void 0,type:t?"remote-candidate":"local-candidate",url:void 0}}function se(e){return isNaN(e)||""===e?void 0:parseInt(e,10)/1e3}function ae(e){switch(e){case"peerreflexive":return"prflx";case"serverreflexive":return"srflx";default:return e}}function le(e,t){const n=e.stat(t);return de(e,t)?parseInt(n,10):void 0}function ce(e,t){const n=e.stat(t);return de(e,t)?parseFloat(n):void 0}function ue(e,t){const n=e.stat(t);return de(e,t)?"true"===n||!0===n:void 0}function de(e,t){const n=e.stat(t);return void 0!==n&&""!==n}function he(e,t){return"function"==typeof e.get?e.get(t):e.find(e=>e.id===t)}function pe(e){if(!e)return Promise.reject(new S("PeerConnection is null"));if("function"!=typeof e.getStats)return Promise.reject(new C("WebRTC statistics are unsupported"));let t;try{t=e.getStats()}catch(n){t=new Promise(t=>e.getStats(t)).then(ne.fromRTCStatsResponse)}return t}function fe(e,t){return t=Object.assign({createRTCSample:ve},t),pe(e).then(t.createRTCSample)}function ge(e){return pe(e).then(e=>{const{candidatePairs:t,localCandidates:n,remoteCandidates:i,transport:r}=Array.from(e.values()).reduce((e,t)=>{switch(["candidatePairs","localCandidates","remoteCandidates"].forEach(t=>{e[t]||(e[t]=[])}),t.type){case"candidate-pair":e.candidatePairs.push(t);break;case"local-candidate":e.localCandidates.push(t);break;case"remote-candidate":e.remoteCandidates.push(t);break;case"transport":t.selectedCandidatePairId&&(e.transport=t)}return e},{}),o=t.find(e=>e.selected||r&&e.id===r.selectedCandidatePairId);let s;return o&&(s={localCandidate:n.find(e=>e.id===o.localCandidateId),remoteCandidate:i.find(e=>e.id===o.remoteCandidateId)}),{iceCandidateStats:[...n,...i],selectedIceCandidatePairStats:s}})}function me(){}function ve(e){let t=null;const n=new me;let i;Array.from(e.values()).forEach(r=>{if(r.isRemote)return;const o=r.type.replace("-","");if(i=i||r.timestamp,r.remoteId){const t=he(e,r.remoteId);t&&t.roundTripTime&&(n.rtt=1e3*t.roundTripTime)}switch(o){case"inboundrtp":n.timestamp=n.timestamp||r.timestamp,n.jitter=1e3*r.jitter,n.packetsLost=r.packetsLost,n.packetsReceived=r.packetsReceived,n.bytesReceived=r.bytesReceived;break;case"outboundrtp":if(n.timestamp=r.timestamp,n.packetsSent=r.packetsSent,n.bytesSent=r.bytesSent,r.codecId){const t=he(e,r.codecId);n.codecName=t?t.mimeType&&t.mimeType.match(/(.*\/)?(.*)/)[2]:r.codecId}break;case"transport":t=r.id}}),n.timestamp||(n.timestamp=i);const r=he(e,t);if(!r)return n;const o=he(e,r.selectedCandidatePairId);if(!o)return n;const s=he(e,o.localCandidateId),a=he(e,o.remoteCandidateId);return n.rtt||(n.rtt=o&&1e3*o.currentRoundTripTime),Object.assign(n,{localAddress:s&&(s.address||s.ip),remoteAddress:a&&(a.address||a.ip)}),n}te&&(ne.prototype=Object.create(te.prototype),ne.prototype.constructor=ne),["entries","forEach","get","has","keys","values"].forEach(e=>{ne.prototype[e]=function(...t){return this._map[e](...t)}}),ne.fromArray=function(e){return new ne(e.reduce((e,t)=>(e.set(t.id,t),e),new Map))},ne.fromRTCStatsResponse=function(e){let t;const n=new Map,i=e.result().reduce((e,i)=>{const r=i.id;switch(i.type){case"googCertificate":e.set(r,function(e){return{base64Certificate:e.stat("googDerBase64"),fingerprint:e.stat("googFingerprint"),fingerprintAlgorithm:e.stat("googFingerprintAlgorithm"),id:e.id,issuerCertificateId:e.stat("googIssuerId"),timestamp:Date.parse(e.timestamp),type:"certificate"}}(i));break;case"datachannel":e.set(r,function(e){return{bytesReceived:void 0,bytesSent:void 0,datachannelid:e.stat("datachannelid"),id:e.id,label:e.stat("label"),messagesReceived:void 0,messagesSent:void 0,protocol:e.stat("protocol"),state:e.stat("state"),timestamp:Date.parse(e.timestamp),transportId:e.stat("transportId"),type:"data-channel"}}(i));break;case"googCandidatePair":ue(i,"googActiveConnection")&&(t=r),e.set(r,function(e){return{availableIncomingBitrate:void 0,availableOutgoingBitrate:void 0,bytesReceived:le(e,"bytesReceived"),bytesSent:le(e,"bytesSent"),consentRequestsSent:le(e,"consentRequestsSent"),currentRoundTripTime:se(e.stat("googRtt")),id:e.id,lastPacketReceivedTimestamp:void 0,lastPacketSentTimestamp:void 0,localCandidateId:e.stat("localCandidateId"),nominated:void 0,priority:void 0,readable:void 0,remoteCandidateId:e.stat("remoteCandidateId"),requestsReceived:le(e,"requestsReceived"),requestsSent:le(e,"requestsSent"),responsesReceived:le(e,"responsesReceived"),responsesSent:le(e,"responsesSent"),retransmissionsReceived:void 0,retransmissionsSent:void 0,state:void 0,timestamp:Date.parse(e.timestamp),totalRoundTripTime:void 0,transportId:e.stat("googChannelId"),type:"candidate-pair",writable:ue(e,"googWritable")}}(i));break;case"localcandidate":e.set(r,oe(i,!1));break;case"remotecandidate":e.set(r,oe(i,!0));break;case"ssrc":de(i,"packetsReceived")?e.set(`rtp-${r}`,function(e){const t=re(e,!0);return Object.assign(t,{burstDiscardCount:void 0,burstDiscardRate:void 0,burstLossCount:void 0,burstLossRate:void 0,burstPacketsDiscarded:void 0,burstPacketsLost:void 0,bytesReceived:le(e,"bytesReceived"),fractionLost:void 0,framesDecoded:le(e,"framesDecoded"),gapDiscardRate:void 0,gapLossRate:void 0,jitter:se(e.stat("googJitterReceived")),packetsDiscarded:void 0,packetsLost:le(e,"packetsLost"),packetsReceived:le(e,"packetsReceived"),packetsRepaired:void 0,roundTripTime:se(e.stat("googRtt")),type:"inbound-rtp"}),t}(i)):e.set(`rtp-${r}`,function(e){const t=re(e,!1);return Object.assign(t,{bytesSent:le(e,"bytesSent"),framesEncoded:le(e,"framesEncoded"),packetsSent:le(e,"packetsSent"),remoteTimestamp:void 0,targetBitrate:void 0,type:"outbound-rtp"}),t}(i)),e.set(`track-${r}`,function(e){return{audioLevel:de(e,"audioOutputLevel")?le(e,"audioOutputLevel")/32767:(le(e,"audioInputLevel")||0)/32767,detached:void 0,echoReturnLoss:ce(e,"googEchoCancellationReturnLoss"),echoReturnLossEnhancement:ce(e,"googEchoCancellationReturnLossEnhancement"),ended:void 0,frameHeight:de(e,"googFrameHeightReceived")?le(e,"googFrameHeightReceived"):le(e,"googFrameHeightSent"),frameWidth:de(e,"googFrameWidthReceived")?le(e,"googFrameWidthReceived"):le(e,"googFrameWidthSent"),framesCorrupted:void 0,framesDecoded:le(e,"framesDecoded"),framesDropped:void 0,framesPerSecond:void 0,framesReceived:void 0,framesSent:le(e,"framesEncoded"),fullFramesLost:void 0,id:e.id,kind:e.stat("mediaType"),partialFramesLost:void 0,remoteSource:void 0,ssrcIds:void 0,timestamp:Date.parse(e.timestamp),trackIdentifier:e.stat("googTrackId"),type:"track"}}(i)),e.set(`codec-${r}`,function(e){return{channels:void 0,clockRate:void 0,id:e.id,implementation:void 0,mimeType:`${e.stat("mediaType")}/${e.stat("googCodecName")}`,payloadType:void 0,sdpFmtpLine:void 0,timestamp:Date.parse(e.timestamp),type:"codec"}}(i));break;case"googComponent":const o=ie(i);n.set(o.selectedCandidatePairId,r),e.set(r,ie(i))}return e},new Map);if(t){const e=n.get(t);e&&(i.get(e).dtlsState="connected")}return new ne(i)};class ye extends i.EventEmitter{constructor(e,t){super(),this._hasInsightsErrored=!1,this._log=new I("PreflightTest"),this._networkTiming={},this._options={codecPreferences:[ut.Codec.PCMU,ut.Codec.Opus],edge:"roaming",fakeMicInput:!1,logLevel:"error",signalingTimeoutMs:1e4},this._status=ye.Status.Connecting,Object.assign(this._options,t),this._samples=[],this._warnings=[],this._startTime=Date.now(),this._initDevice(e,Object.assign(Object.assign({},this._options),{fileInputStream:this._options.fakeMicInput?this._getStreamFromFile():void 0}));const n=["codecPreferences","edge","fakeMicInput","logLevel","signalingTimeoutMs"],i=["audioContext","deviceFactory","fileInputStream","getRTCIceCandidateStatsReport","iceServers","rtcConfiguration"];if("object"==typeof t){const e=Object.assign({},t);Object.keys(e).forEach(t=>{n.includes(t)||i.includes(t)||delete e[t],i.includes(t)&&(e[t]=!0)}),this._log.debug(".constructor",JSON.stringify(e))}}stop(){this._log.debug(".stop");const e=new h.CallCancelledError;this._device?(this._device.once(Ye.EventName.Unregistered,()=>this._onFailed(e)),this._device.destroy()):this._onFailed(e)}_emitWarning(e,t,n){const i={name:e,description:t};n&&(i.rtcWarning=n),this._warnings.push(i),this._log.debug(`#${ye.Events.Warning}`,JSON.stringify(i)),this.emit(ye.Events.Warning,i)}_getCallQuality(e){return e>4.2?ye.CallQuality.Excellent:e>=4.1&&e<=4.2?ye.CallQuality.Great:e>=3.7&&e<=4?ye.CallQuality.Good:e>=3.1&&e<=3.6?ye.CallQuality.Fair:ye.CallQuality.Degraded}_getReport(){var e,t,n;const i=this._getRTCStats(),r={start:this._startTime};this._endTime&&(r.end=this._endTime,r.duration=this._endTime-this._startTime);const o={callSid:this._callSid,edge:this._edge,iceCandidateStats:null!==(t=null===(e=this._rtcIceCandidateStatsReport)||void 0===e?void 0:e.iceCandidateStats)&&void 0!==t?t:[],networkTiming:this._networkTiming,samples:this._samples,selectedEdge:this._options.edge,stats:i,testTiming:r,totals:this._getRTCSampleTotals(),warnings:this._warnings},s=null===(n=this._rtcIceCandidateStatsReport)||void 0===n?void 0:n.selectedIceCandidatePairStats;return s&&(o.selectedIceCandidatePairStats=s,o.isTurnRequired="relay"===s.localCandidate.candidateType||"relay"===s.remoteCandidate.candidateType),i&&(o.callQuality=this._getCallQuality(i.mos.average)),o}_getRTCSampleTotals(){if(this._latestSample)return Object.assign({},this._latestSample.totals)}_getRTCStats(){const e=this._samples.findIndex(e=>"number"==typeof e.mos&&e.mos>0),t=e>=0?this._samples.slice(e):[];if(t&&t.length)return["jitter","mos","rtt"].reduce((e,n)=>{const i=t.map(e=>e[n]);return Object.assign(Object.assign({},e),{[n]:{average:Number((i.reduce((e,t)=>e+t)/i.length).toPrecision(5)),max:Math.max(...i),min:Math.min(...i)}})},{})}_getStreamFromFile(){const e=this._options.audioContext;if(!e)throw new C("Cannot fake input audio stream: AudioContext is not supported by this browser.");const t=new Audio(T);t.addEventListener("canplaythrough",()=>t.play()),"function"==typeof t.setAttribute&&t.setAttribute("crossorigin","anonymous");const n=e.createMediaElementSource(t),i=e.createMediaStreamDestination();return n.connect(i),i.stream}_initDevice(e,t){try{this._device=new(t.deviceFactory||Ye)(e,{chunderw:t.chunderw,codecPreferences:t.codecPreferences,edge:t.edge,eventgw:t.eventgw,fileInputStream:t.fileInputStream,logLevel:t.logLevel,preflight:!0}),this._device.once(Ye.EventName.Registered,()=>{this._onDeviceRegistered()}),this._device.once(Ye.EventName.Error,e=>{this._onDeviceError(e)}),this._device.register()}catch(e){return void setTimeout(()=>{this._onFailed(e)})}this._signalingTimeoutTimer=setTimeout(()=>{this._onDeviceError(new g.ConnectionError("WebSocket Connection Timeout"))},t.signalingTimeoutMs)}_onDeviceError(e){this._device.destroy(),this._onFailed(e)}_onDeviceRegistered(){return o(this,void 0,void 0,function*(){if(clearTimeout(this._echoTimer),clearTimeout(this._signalingTimeoutTimer),this._call=yield this._device.connect({rtcConfiguration:this._options.rtcConfiguration}),this._networkTiming.signaling={start:Date.now()},this._setupCallHandlers(this._call),this._edge=this._device.edge||void 0,this._options.fakeMicInput){this._echoTimer=setTimeout(()=>this._device.disconnectAll(),2e4);const e=this._device.audio;e&&(e.disconnect(!1),e.outgoing(!1))}this._call.once("disconnect",()=>{this._device.once(Ye.EventName.Unregistered,()=>this._onUnregistered()),this._device.destroy()}),this._call._publisher.on("error",()=>{this._hasInsightsErrored||this._emitWarning("insights-connection-error","Received an error when attempting to connect to Insights gateway"),this._hasInsightsErrored=!0})})}_onFailed(e){clearTimeout(this._echoTimer),clearTimeout(this._signalingTimeoutTimer),this._releaseHandlers(),this._endTime=Date.now(),this._status=ye.Status.Failed,this._log.debug(`#${ye.Events.Failed}`,e),this.emit(ye.Events.Failed,e)}_onUnregistered(){setTimeout(()=>{this._status!==ye.Status.Failed&&(clearTimeout(this._echoTimer),clearTimeout(this._signalingTimeoutTimer),this._releaseHandlers(),this._endTime=Date.now(),this._status=ye.Status.Completed,this._report=this._getReport(),this._log.debug(`#${ye.Events.Completed}`,JSON.stringify(this._report)),this.emit(ye.Events.Completed,this._report))},10)}_releaseHandlers(){[this._device,this._call].forEach(e=>{e&&e.eventNames().forEach(t=>e.removeAllListeners(t))})}_setupCallHandlers(e){this._options.fakeMicInput&&e.once("volume",()=>{e._mediaHandler.outputs.forEach(e=>e.audio.muted=!0)}),e.on("warning",(e,t)=>{this._emitWarning(e,"Received an RTCWarning. See .rtcWarning for the RTCWarning",t)}),e.once("accept",()=>{this._callSid=e._mediaHandler.callSid,this._status=ye.Status.Connected,this._log.debug(`#${ye.Events.Connected}`),this.emit(ye.Events.Connected)}),e.on("sample",t=>o(this,void 0,void 0,function*(){this._latestSample||(this._rtcIceCandidateStatsReport=yield(this._options.getRTCIceCandidateStatsReport||ge)(e._mediaHandler.version.pc)),this._latestSample=t,this._samples.push(t),this._log.debug(`#${ye.Events.Sample}`,JSON.stringify(t)),this.emit(ye.Events.Sample,t)})),[{reportLabel:"peerConnection",type:"pcconnection"},{reportLabel:"ice",type:"iceconnection"},{reportLabel:"dtls",type:"dtlstransport"},{reportLabel:"signaling",type:"signaling"}].forEach(({type:t,reportLabel:n})=>{const i=`on${t}statechange`,r=e._mediaHandler[i];e._mediaHandler[i]=e=>{const t=this._networkTiming[n]=this._networkTiming[n]||{start:0};"connecting"===e||"checking"===e?t.start=Date.now():"connected"!==e&&"stable"!==e||t.duration||(t.end=Date.now(),t.duration=t.end-t.start),r(e)}})}get callSid(){return this._callSid}get endTime(){return this._endTime}get latestSample(){return this._latestSample}get report(){return this._report}get startTime(){return this._startTime}get status(){return this._status}}!function(e){var t,n,i;(t=e.CallQuality||(e.CallQuality={})).Excellent="excellent",t.Great="great",t.Good="good",t.Fair="fair",t.Degraded="degraded",(n=e.Events||(e.Events={})).Completed="completed",n.Connected="connected",n.Failed="failed",n.Sample="sample",n.Warning="warning",(i=e.Status||(e.Status={})).Connecting="connecting",i.Connected="connected",i.Completed="completed",i.Failed="failed"}(ye||(ye={}));const _e=globalThis.WebSocket;var be,we,Se;!function(e){e.Connecting="connecting",e.Closed="closed",e.Open="open"}(be||(be={}));class ke extends i.EventEmitter{constructor(e,t={}){super(),this.state=be.Closed,this._backoffStartTime={preferred:null,primary:null},this._connectedUri=null,this._log=new I("WSTransport"),this._shouldFallback=!1,this._uriIndex=0,this._moveUriIndex=()=>{this._uriIndex++,this._uriIndex>=this._uris.length&&(this._uriIndex=0)},this._onSocketClose=e=>{if(this._log.error(`Received websocket close event code: ${e.code}. Reason: ${e.reason}`),1006===e.code||1015===e.code){this.emit("error",{code:31005,message:e.reason||"Websocket connection to Twilio's signaling servers were unexpectedly ended. If this is happening consistently, there may be an issue resolving the hostname provided. If a region or an edge is being specified in Device setup, ensure it is valid.",twilioError:new g.ConnectionError});const t=this.state===be.Open||this._previousState===be.Open;!this._shouldFallback&&t||this._moveUriIndex(),this._shouldFallback=!0}this._closeSocket()},this._onSocketError=e=>{this._log.error(`WebSocket received error: ${e.message}`),this.emit("error",{code:31e3,message:e.message||"WSTransport socket error",twilioError:new g.ConnectionDisconnected})},this._onSocketMessage=e=>{if(this._setHeartbeatTimeout(),this._socket&&"\n"===e.data)return this._socket.send("\n"),void this._log.debug("heartbeat");e&&"string"==typeof e.data&&this._log.debug(`Received: ${e.data}`),this.emit("message",e)},this._onSocketOpen=()=>{this._log.info("WebSocket opened successfully."),this._timeOpened=Date.now(),this._shouldFallback=!1,this._setState(be.Open),clearTimeout(this._connectTimeout),this._resetBackoffs(),this._setHeartbeatTimeout(),this.emit("open")},this._options=Object.assign(Object.assign({},ke.defaultConstructorOptions),t),this._uris=e,this._backoff=this._setupBackoffs()}close(){this._log.info("WSTransport.close() called..."),this._close()}open(){this._log.info("WSTransport.open() called..."),!this._socket||this._socket.readyState!==_e.CONNECTING&&this._socket.readyState!==_e.OPEN?this._preferredUri?this._connect(this._preferredUri):this._connect(this._uris[this._uriIndex]):this._log.info("WebSocket already open.")}send(e){if(this._log.debug(`Sending: ${e}`),!this._socket||this._socket.readyState!==_e.OPEN)return this._log.debug("Cannot send message. WebSocket is not open."),!1;try{this._socket.send(e)}catch(e){return this._log.error("Error while sending message:",e.message),this._closeSocket(),!1}return!0}updatePreferredURI(e){this._preferredUri=e}updateURIs(e){"string"==typeof e&&(e=[e]),this._uris=e,this._uriIndex=0}_close(){this._setState(be.Closed),this._closeSocket()}_closeSocket(){clearTimeout(this._connectTimeout),clearTimeout(this._heartbeatTimeout),this._log.info("Closing and cleaning up WebSocket..."),this._socket?(this._socket.removeEventListener("close",this._onSocketClose),this._socket.removeEventListener("error",this._onSocketError),this._socket.removeEventListener("message",this._onSocketMessage),this._socket.removeEventListener("open",this._onSocketOpen),this._socket.readyState!==_e.CONNECTING&&this._socket.readyState!==_e.OPEN||this._socket.close(),this._timeOpened&&Date.now()-this._timeOpened>1e4&&this._resetBackoffs(),this.state!==be.Closed&&this._performBackoff(),delete this._socket,this.emit("close")):this._log.info("No WebSocket to clean up.")}_connect(e,t){this._log.info("number"==typeof t?`Attempting to reconnect (retry #${t})...`:"Attempting to connect..."),this._closeSocket(),this._setState(be.Connecting),this._connectedUri=e;try{this._socket=new this._options.WebSocket(this._connectedUri)}catch(e){return this._log.error("Could not connect to endpoint:",e.message),this._close(),void this.emit("error",{code:31e3,message:e.message||`Could not connect to ${this._connectedUri}`,twilioError:new g.ConnectionDisconnected})}this._socket.addEventListener("close",this._onSocketClose),this._socket.addEventListener("error",this._onSocketError),this._socket.addEventListener("message",this._onSocketMessage),this._socket.addEventListener("open",this._onSocketOpen),delete this._timeOpened,this._connectTimeout=setTimeout(()=>{this._log.info("WebSocket connection attempt timed out."),this._moveUriIndex(),this._closeSocket()},this._options.connectTimeoutMs)}_performBackoff(){this._preferredUri?(this._log.info("Preferred URI set; backing off."),this._backoff.preferred.backoff()):(this._log.info("Preferred URI not set; backing off."),this._backoff.primary.backoff())}_resetBackoffs(){this._backoff.preferred.reset(),this._backoff.primary.reset(),this._backoffStartTime.preferred=null,this._backoffStartTime.primary=null}_setHeartbeatTimeout(){clearTimeout(this._heartbeatTimeout),this._heartbeatTimeout=setTimeout(()=>{this._log.info("No messages received in 15 seconds. Reconnecting..."),this._shouldFallback=!0,this._closeSocket()},15e3)}_setState(e){this._previousState=this.state,this.state=e}_setupBackoffs(){const e={factor:2,jitter:.4,max:this._options.maxPreferredDelayMs,min:100};this._log.info("Initializing preferred transport backoff using config: ",e);const t=new r(e);t.on("backoff",(e,t)=>{this.state!==be.Closed?(this._log.info(`Will attempt to reconnect Websocket to preferred URI in ${t}ms`),0===e&&(this._backoffStartTime.preferred=Date.now(),this._log.info(`Preferred backoff start; ${this._backoffStartTime.preferred}`))):this._log.info("Preferred backoff initiated but transport state is closed; not attempting a connection.")}),t.on("ready",(e,t)=>{if(this.state!==be.Closed){if(null!==this._backoffStartTime.preferred)return Date.now()-this._backoffStartTime.preferred>this._options.maxPreferredDurationMs?(this._log.info("Max preferred backoff attempt time exceeded; falling back to primary backoff."),this._preferredUri=null,void this._backoff.primary.backoff()):"string"!=typeof this._preferredUri?(this._log.info("Preferred URI cleared; falling back to primary backoff."),this._preferredUri=null,void this._backoff.primary.backoff()):void this._connect(this._preferredUri,e+1);this._log.info("Preferred backoff start time invalid; not attempting a connection.")}else this._log.info("Preferred backoff ready but transport state is closed; not attempting a connection.")});const n={factor:2,jitter:.4,max:this._options.maxPrimaryDelayMs,min:this._uris&&this._uris.length>1?Math.floor(4001*Math.random())+1e3:100};this._log.info("Initializing primary transport backoff using config: ",n);const i=new r(n);return i.on("backoff",(e,t)=>{this.state!==be.Closed?(this._log.info(`Will attempt to reconnect WebSocket in ${t}ms`),0===e&&(this._backoffStartTime.primary=Date.now(),this._log.info(`Primary backoff start; ${this._backoffStartTime.primary}`))):this._log.info("Primary backoff initiated but transport state is closed; not attempting a connection.")}),i.on("ready",(e,t)=>{this.state!==be.Closed?null!==this._backoffStartTime.primary?Date.now()-this._backoffStartTime.primary>this._options.maxPrimaryDurationMs?this._log.info("Max primary backoff attempt time exceeded; not attempting a connection."):this._connect(this._uris[this._uriIndex],e+1):this._log.info("Primary backoff start time invalid; not attempting a connection."):this._log.info("Primary backoff ready but transport state is closed; not attempting a connection.")}),{preferred:t,primary:i}}get uri(){return this._connectedUri}}ke.defaultConstructorOptions={WebSocket:_e,connectTimeoutMs:5e3,maxPreferredDelayMs:1e3,maxPreferredDurationMs:15e3,maxPrimaryDelayMs:2e4,maxPrimaryDurationMs:1/0};class Ce extends i.EventEmitter{constructor(e,t,n){if(super(),!(this instanceof Ce))return new Ce(e,t,n);const i={TransportFactory:ke};n=n||{};for(const e in i)e in n||(n[e]=i[e]);this.options=n,this.token=e||"",this.status="disconnected",this.gateway=null,this.region=null,this._messageQueue=[],this._preferredUri=null,this._uris=t,this._handleTransportClose=this._handleTransportClose.bind(this),this._handleTransportError=this._handleTransportError.bind(this),this._handleTransportMessage=this._handleTransportMessage.bind(this),this._handleTransportOpen=this._handleTransportOpen.bind(this),this._log=new I("PStream"),this.on("error",()=>{this._log.warn("Unexpected error handled in pstream")});const r=this;return this.addListener("ready",()=>{r.status="ready"}),this.addListener("offline",()=>{r.status="offline"}),this.addListener("close",()=>{r._log.info('Received "close" from server. Destroying PStream...'),r._destroy()}),this.transport=new this.options.TransportFactory(this._uris,{backoffMaxMs:this.options.backoffMaxMs,maxPreferredDurationMs:this.options.maxPreferredDurationMs}),Object.defineProperties(this,{uri:{enumerable:!0,get(){return this.transport.uri}}}),this.transport.on("close",this._handleTransportClose),this.transport.on("error",this._handleTransportError),this.transport.on("message",this._handleTransportMessage),this.transport.on("open",this._handleTransportOpen),this.transport.open(),this}}function xe(){const e="undefined"!=typeof navigator?navigator:{};return{browser:{platform:e.platform||"unknown",userAgent:e.userAgent||"unknown"},p:"browser",plugin:"rtc",v:E}}Ce.prototype._handleTransportClose=function(){this.emit("transportClose"),"disconnected"!==this.status&&("offline"!==this.status&&this.emit("offline",this),this.status="disconnected")},Ce.prototype._handleTransportError=function(e){e?this.emit("error",void 0!==e.code?{error:e}:e):this.emit("error",{error:{code:31e3,message:"Websocket closed without a provided reason",twilioError:new g.ConnectionDisconnected}})},Ce.prototype._handleTransportMessage=function(e){if(!e||!e.data||"string"!=typeof e.data)return;const{type:t,payload:n={}}=JSON.parse(e.data);this.gateway=n.gateway||this.gateway,this.region=n.region||this.region,"error"===t&&n.error&&(n.error.twilioError=new g.ConnectionError),this.emit(t,n)},Ce.prototype._handleTransportOpen=function(){this.status="connected",this.setToken(this.token),this.emit("transportOpen"),this._messageQueue.splice(0,this._messageQueue.length).forEach(e=>this._publish(...e))},Ce.toString=()=>"[Twilio.PStream class]",Ce.prototype.toString=()=>"[Twilio.PStream instance]",Ce.prototype.setToken=function(e){this._log.info("Setting token and publishing listen"),this.token=e;let t=0;const n=this.options.maxPreferredDurationMs;this._log.info(`maxPreferredDurationMs:${n}`),"number"==typeof n&&n>=0&&(t=Math.min(Math.ceil(n/1e3),30)),this._log.info(`reconnectTimeout:${t}`);const i={browserinfo:xe(),reconnectTimeout:t,token:e};this._publish("listen",i)},Ce.prototype.sendMessage=function(e,t,n="application/json",i,r){const o={callsid:e,content:t,contenttype:n,messagetype:i,voiceeventsid:r};this._publish("message",o,!0)},Ce.prototype.register=function(e){const t={media:e};this._publish("register",t,!0)},Ce.prototype.invite=function(e,t,n){const i={callsid:t,sdp:e,twilio:n?{params:n}:{}};this._publish("invite",i,!0)},Ce.prototype.reconnect=function(e,t,n){const i={callsid:t,reconnect:n,sdp:e,twilio:{}};this._publish("invite",i,!0)},Ce.prototype.answer=function(e,t){this._publish("answer",{sdp:e,callsid:t},!0)},Ce.prototype.dtmf=function(e,t){this._publish("dtmf",{callsid:e,dtmf:t},!0)},Ce.prototype.hangup=function(e,t){const n=t?{callsid:e,message:t}:{callsid:e};this._publish("hangup",n,!0)},Ce.prototype.reject=function(e){this._publish("reject",{callsid:e},!0)},Ce.prototype.reinvite=function(e,t){this._publish("reinvite",{sdp:e,callsid:t},!1)},Ce.prototype._destroy=function(){this.transport.removeListener("close",this._handleTransportClose),this.transport.removeListener("error",this._handleTransportError),this.transport.removeListener("message",this._handleTransportMessage),this.transport.removeListener("open",this._handleTransportOpen),this.transport.close(),this.emit("offline",this)},Ce.prototype.destroy=function(){return this._log.info("PStream.destroy() called..."),this._destroy(),this},Ce.prototype.updatePreferredURI=function(e){this._preferredUri=e,this.transport.updatePreferredURI(e)},Ce.prototype.updateURIs=function(e){this._uris=e,this.transport.updateURIs(this._uris)},Ce.prototype.publish=function(e,t){return this._publish(e,t,!0)},Ce.prototype._publish=function(e,t,n){const i=JSON.stringify({payload:t,type:e,version:"1.6"});this.transport.send(i)||(this.emit("error",{error:{code:31009,message:"No transport available to send or receive messages",twilioError:new h.TransportError}}),n&&this._messageQueue.push([e,t,!0]))},function(e){e.Sydney="sydney",e.SaoPaulo="sao-paulo",e.Dublin="dublin",e.Frankfurt="frankfurt",e.Tokyo="tokyo",e.Singapore="singapore",e.Ashburn="ashburn",e.Umatilla="umatilla",e.Roaming="roaming",e.AshburnIx="ashburn-ix",e.SanJoseIx="san-jose-ix",e.LondonIx="london-ix",e.FrankfurtIx="frankfurt-ix",e.SingaporeIx="singapore-ix",e.SydneyIx="sydney-ix",e.TokyoIx="tokyo-ix"}(we||(we={})),function(e){e.Au1="au1",e.Au1Ix="au1-ix",e.Br1="br1",e.De1="de1",e.De1Ix="de1-ix",e.Gll="gll",e.Ie1="ie1",e.Ie1Ix="ie1-ix",e.Ie1Tnx="ie1-tnx",e.Jp1="jp1",e.Jp1Ix="jp1-ix",e.Sg1="sg1",e.Sg1Ix="sg1-ix",e.Sg1Tnx="sg1-tnx",e.Us1="us1",e.Us1Ix="us1-ix",e.Us1Tnx="us1-tnx",e.Us2="us2",e.Us2Ix="us2-ix",e.Us2Tnx="us2-tnx"}(Se||(Se={}));const Ee={ASIAPAC_SINGAPORE:Se.Sg1,ASIAPAC_SYDNEY:Se.Au1,ASIAPAC_TOKYO:Se.Jp1,EU_FRANKFURT:Se.De1,EU_IRELAND:Se.Ie1,SOUTH_AMERICA_SAO_PAULO:Se.Br1,US_EAST_VIRGINIA:Se.Us1,US_WEST_OREGON:Se.Us2},Pe={[Se.Au1]:we.Sydney,[Se.Br1]:we.SaoPaulo,[Se.Ie1]:we.Dublin,[Se.De1]:we.Frankfurt,[Se.Jp1]:we.Tokyo,[Se.Sg1]:we.Singapore,[Se.Us1]:we.Ashburn,[Se.Us2]:we.Umatilla,[Se.Gll]:we.Roaming,[Se.Us1Ix]:we.AshburnIx,[Se.Us2Ix]:we.SanJoseIx,[Se.Ie1Ix]:we.LondonIx,[Se.De1Ix]:we.FrankfurtIx,[Se.Sg1Ix]:we.SingaporeIx,[Se.Au1Ix]:we.SydneyIx,[Se.Jp1Ix]:we.TokyoIx,[Se.Us1Tnx]:we.AshburnIx,[Se.Us2Tnx]:we.AshburnIx,[Se.Ie1Tnx]:we.LondonIx,[Se.Sg1Tnx]:we.SingaporeIx},Te=we.Roaming;function Ie(e){return`voice-js.${e}.twilio.com`}function Oe(e){return e?`eventgw.${e}.twilio.com`:"eventgw.twilio.com"}function Re(e){return`wss://${e}/signal`}function Le(e){if(e&&"string"!=typeof e&&!Array.isArray(e))throw new S("If `edge` is provided, it must be of type `string` or an array of strings.");let t;return t=e?(Array.isArray(e)?e:[e]).map(e=>Ie(e)):[Ie(Te)],t}const De={0:"PCMU",8:"PCMA"};function Ae(e,t){if("number"!=typeof t||t<6e3||t>51e4)return e;const n=/a=rtpmap:(\d+) opus/m.exec(e),i=n&&n.length?n[1]:111,r=new RegExp(`a=fmtp:${i}`);return e.split("\n").map(e=>r.test(e)?e+`;maxaveragebitrate=${t}`:e).join("\n")}function Ne(e,t){const n=function(e){return e.replace(/\r\n\r\n$/,"\r\n").split("\r\nm=").slice(1).map(e=>`m=${e}`).filter(e=>{const t=new RegExp("m=.*","gm"),n=new RegExp("a=.*","gm");return t.test(e)&&n.test(e)})}(e);return[e.split("\r\nm=")[0]].concat(n.map(e=>{if(!/^m=(audio|video)/.test(e))return e;const n=e.match(/^m=(audio|video)/)[1],i=function(e){return Array.from((t=e,function(e){const t=e.split("\r\n")[0].match(/([0-9]+)/g);return t?t.slice(1).map(e=>parseInt(e,10)):[]}(t).reduce((e,n)=>{const i=new RegExp(`a=rtpmap:${n} ([^/]+)`),r=t.match(i),o=r?r[1].toLowerCase():De[n]?De[n].toLowerCase():"";return e.set(n,o)},new Map))).reduce((e,t)=>{const n=t[0],i=t[1],r=e.get(i)||[];return e.set(i,r.concat(n))},new Map);var t}(e),r=function(e,t){const n=H(t=t.map(e=>e.toLowerCase()),t=>e.get(t)||[]),i=H(N(Array.from(e.keys()),t),t=>e.get(t));return n.concat(i)}(i,t),o=function(e,t){const n=t.split("\r\n");let i=n[0];const r=n.slice(1);return i=i.replace(/([0-9]+\s?)+$/,e.join(" ")),[i].concat(r).join("\r\n")}(r,e),s=i.get("pcma")||[],a=i.get("pcmu")||[];return("audio"===n?new Set(s.concat(a)):new Set).has(r[0])?o.replace(/\r\nb=(AS|TIAS):([0-9]+)/g,""):o})).join("\r\n")}function Me(e){this.log=new I("RTCPC"),"undefined"!=typeof window?e&&e.RTCPeerConnection?this.RTCPeerConnection=e.RTCPeerConnection:"function"==typeof window.RTCPeerConnection?this.RTCPeerConnection=window.RTCPeerConnection:"function"==typeof window.webkitRTCPeerConnection?this.RTCPeerConnection=webkitRTCPeerConnection:"function"==typeof window.mozRTCPeerConnection?(this.RTCPeerConnection=mozRTCPeerConnection,window.RTCSessionDescription=mozRTCSessionDescription,window.RTCIceCandidate=mozRTCIceCandidate):this.log.info("No RTCPeerConnection implementation available"):this.log.info("No RTCPeerConnection implementation available. The window object was not found.")}function je(e,t,n,i){return function(){const r=Array.prototype.slice.call(arguments);return new Promise(n=>{const o=e.apply(t,r);if(i){if("object"!=typeof o||"function"!=typeof o.then)throw new Error;n(o)}else n(o)}).catch(()=>new Promise((i,o)=>{e.apply(t,n?[i,o].concat(r):r.concat([i,o]))}))}}function Fe(e,t){return je(e,t,!0,!0)}function $e(e,t){return je(e,t,!1,!1)}function Ue(t,n,i){if(!t||!n)throw new S("Audiohelper, and pstream are required arguments");if(!(this instanceof Ue))return new Ue(t,n,i);function r(){this._log.warn("Unexpected noop call in peerconnection")}this._log=new I("PeerConnection"),this.onaudio=r,this.onopen=r,this.onerror=r,this.onclose=r,this.ondisconnected=r,this.onfailed=r,this.onconnected=r,this.onreconnected=r,this.onsignalingstatechange=r,this.ondtlstransportstatechange=r,this.onicegatheringfailure=r,this.onicegatheringstatechange=r,this.oniceconnectionstatechange=r,this.onpcconnectionstatechange=r,this.onicecandidate=r,this.onselectedcandidatepairchange=r,this.onvolume=r,this.version=null,this.pstream=n,this.stream=null,this.sinkIds=new Set(["default"]),this.outputs=new Map,this.status="connecting",this.callSid=null,this.isMuted=!1;const o="undefined"!=typeof window&&(window.AudioContext||window.webkitAudioContext);return this._isSinkSupported=!!o&&"undefined"!=typeof HTMLAudioElement&&HTMLAudioElement.prototype.setSinkId,this._audioContext=o&&t._audioContext,this._audioHelper=t,this._audioProcessorEventObserver=t._getAudioProcessorEventObserver(),this._hasIceCandidates=!1,this._hasIceGatheringFailures=!1,this._iceGatheringTimeoutId=null,this._masterAudio=null,this._masterAudioDeviceId=null,this._mediaStreamSource=null,this._dtmfSender=null,this._dtmfSenderUnsupported=!1,this._callEvents=[],this._nextTimeToPublish=Date.now(),this._onAnswerOrRinging=r,this._onHangup=r,this._remoteStream=null,this._shouldManageStream=!0,this._iceState="new",this.options=i=i||{},this.navigator=i.navigator||("undefined"!=typeof navigator?navigator:null),this.util=i.util||e,this.codecPreferences=i.codecPreferences,this._onAudioProcessorAdded=e=>{this._handleAudioProcessorEvent(e,!0)},this._onAudioProcessorRemoved=e=>{this._handleAudioProcessorEvent(e,!1)},this._audioProcessorEventObserver.on("add",this._onAudioProcessorAdded),this._audioProcessorEventObserver.on("remove",this._onAudioProcessorRemoved),this}function ze(e,t){let n;return n=t?new t:"undefined"!=typeof MediaStream?new MediaStream:new webkitMediaStream,e.getAudioTracks().forEach(n.addTrack,n),n}function He(e,t,n){return n._maybeCreateRemoteProcessedStream(t).then(t=>{if(void 0!==e.srcObject)e.srcObject=t;else if(void 0!==e.mozSrcObject)e.mozSrcObject=t;else{if(void 0===e.src)return Promise.reject();{const n=e.options.window||window;e.src=(n.URL||n.webkitURL).createObjectURL(t)}}return Promise.resolve()})}function Ve(t,n){return(n=n||{}).util=n.util||e,n.navigator=n.navigator||("undefined"!=typeof navigator?navigator:null),new Promise((e,i)=>{if(!n.navigator)throw new C("getUserMedia is not supported");switch("function"){case typeof(n.navigator.mediaDevices&&n.navigator.mediaDevices.getUserMedia):return e(n.navigator.mediaDevices.getUserMedia(t));case typeof n.navigator.webkitGetUserMedia:return n.navigator.webkitGetUserMedia(t,e,i);case typeof n.navigator.mozGetUserMedia:return n.navigator.mozGetUserMedia(t,e,i);case typeof n.navigator.getUserMedia:return n.navigator.getUserMedia(t,e,i);default:throw new C("getUserMedia is not supported")}}).catch(e=>{throw n.util.isFirefox()&&"NotReadableError"===e.name?new C("Firefox does not currently support opening multiple audio input trackssimultaneously, even across different tabs.\nRelated Bugzilla thread: https://bugzilla.mozilla.org/show_bug.cgi?id=1299324"):e})}function We(){return`KX${function(){if("object"!=typeof window)throw new C("This platform is not supported.");const{crypto:e}=window;if("object"!=typeof e)throw new C("The `crypto` module is not available on this platform.");if("function"!=typeof e.getRandomValues)throw new C("The function `crypto.getRandomValues` is not available on this platform.");if("function"!=typeof window.Uint8Array)throw new C("The `Uint8Array` module is not available on this platform.");return e.getRandomValues(new window.Uint8Array(16)).reduce((e,t)=>`${e}${t.toString(16).padStart(2,"0")}`,"")}()}`}Me.prototype.create=function(e){this.pc=new this.RTCPeerConnection(e)},Me.prototype.createModernConstraints=e=>{if(void 0===e)return null;const t=Object.assign({},e);return"undefined"==typeof webkitRTCPeerConnection||$()?(void 0!==e.audio&&(t.offerToReceiveAudio=e.audio),void 0!==e.video&&(t.offerToReceiveVideo=e.video)):(t.mandatory={},void 0!==e.audio&&(t.mandatory.OfferToReceiveAudio=e.audio),void 0!==e.video&&(t.mandatory.OfferToReceiveVideo=e.video)),delete t.audio,delete t.video,t},Me.prototype.createOffer=function(e,t,n,i){return t=this.createModernConstraints(t),Fe(this.pc.createOffer,this.pc)(t).then(t=>{if(!this.pc)return Promise.resolve();const n=Ae(t.sdp,e);return $e(this.pc.setLocalDescription,this.pc)(new RTCSessionDescription({sdp:n,type:"offer"}))}).then(n,i)},Me.prototype.createAnswer=function(e,t,n,i){return t=this.createModernConstraints(t),Fe(this.pc.createAnswer,this.pc)(t).then(t=>{if(!this.pc)return Promise.resolve();const n=Ae(t.sdp,e);return $e(this.pc.setLocalDescription,this.pc)(new RTCSessionDescription({sdp:n,type:"answer"}))}).then(n,i)},Me.prototype.processSDP=function(e,t,n,i,r,o){n=Ne(n,t);const s=new RTCSessionDescription({sdp:n,type:"offer"});return $e(this.pc.setRemoteDescription,this.pc)(s).then(()=>{this.createAnswer(e,i,r,o)})},Me.prototype.getSDP=function(){return this.pc.localDescription.sdp},Me.prototype.processAnswer=function(e,t,n,i){return this.pc?(t=Ne(t,e),$e(this.pc.setRemoteDescription,this.pc)(new RTCSessionDescription({sdp:t,type:"answer"})).then(n,i)):Promise.resolve()},Me.test=()=>{if("object"==typeof navigator){const e=navigator.mediaDevices&&navigator.mediaDevices.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.getUserMedia;if($(navigator))return!1;if(e&&"function"==typeof window.RTCPeerConnection)return!0;if(e&&"function"==typeof window.webkitRTCPeerConnection)return!0;if(e&&"function"==typeof window.mozRTCPeerConnection){try{if("function"!=typeof(new window.mozRTCPeerConnection).getLocalStreams)return!1}catch(e){return!1}return!0}if("undefined"!=typeof RTCIceGatherer)return!0}return!1},Ue.prototype.uri=function(){return this._uri},Ue.prototype.openDefaultDeviceWithConstraints=function(e){return this._audioHelper._openDefaultDeviceWithConstraints(e).then(this._setInputTracksFromStream.bind(this,!1))},Ue.prototype.setInputTracksFromStream=function(e){const t=this;return this._setInputTracksFromStream(!0,e).then(()=>{t._shouldManageStream=!1})},Ue.prototype._createAnalyser=(e,t)=>{t=Object.assign({fftSize:32,smoothingTimeConstant:.3},t);const n=e.createAnalyser();for(const e in t)n[e]=t[e];return n},Ue.prototype._setVolumeHandler=function(e){this.onvolume=e},Ue.prototype._startPollingVolume=function(){if(!this._audioContext||!this.stream||!this._remoteStream)return;const e=this._audioContext,t=(this._inputAnalyser=this._createAnalyser(e)).frequencyBinCount,n=new Uint8Array(t);this._inputAnalyser2=this._createAnalyser(e,{maxDecibels:0,minDecibels:-127,smoothingTimeConstant:0});const i=(this._outputAnalyser=this._createAnalyser(e)).frequencyBinCount,r=new Uint8Array(i);this._outputAnalyser2=this._createAnalyser(e,{maxDecibels:0,minDecibels:-127,smoothingTimeConstant:0}),this._updateInputStreamSource(this.stream),this._updateOutputStreamSource(this._remoteStream);const o=this;setTimeout(function e(){if(!o._audioContext)return;if("closed"===o.status)return o._inputAnalyser.disconnect(),o._outputAnalyser.disconnect(),o._inputAnalyser2.disconnect(),void o._outputAnalyser2.disconnect();o._inputAnalyser.getByteFrequencyData(n);const t=o.util.average(n);o._inputAnalyser2.getByteFrequencyData(n);const i=o.util.average(n);o._outputAnalyser.getByteFrequencyData(r);const s=o.util.average(r);o._outputAnalyser2.getByteFrequencyData(r);const a=o.util.average(r);o.onvolume(t/255,s/255,i,a),setTimeout(e,50)},50)},Ue.prototype._stopStream=function(){this._shouldManageStream&&this._audioHelper._stopDefaultInputDeviceStream()},Ue.prototype._updateInputStreamSource=function(e){this._inputStreamSource&&this._inputStreamSource.disconnect();try{this._inputStreamSource=this._audioContext.createMediaStreamSource(e),this._inputStreamSource.connect(this._inputAnalyser),this._inputStreamSource.connect(this._inputAnalyser2)}catch(e){this._log.warn("Unable to update input MediaStreamSource",e),this._inputStreamSource=null}},Ue.prototype._updateOutputStreamSource=function(e){this._outputStreamSource&&this._outputStreamSource.disconnect();try{this._outputStreamSource=this._audioContext.createMediaStreamSource(e),this._outputStreamSource.connect(this._outputAnalyser),this._outputStreamSource.connect(this._outputAnalyser2)}catch(e){this._log.warn("Unable to update output MediaStreamSource",e),this._outputStreamSource=null}},Ue.prototype._setInputTracksFromStream=function(e,t){if(!t)return Promise.reject(new S("Can not set input stream to null while in a call"));if(!t.getAudioTracks().length)return Promise.reject(new S("Supplied input stream has no audio tracks"));const n=this.stream,i=()=>(this.mute(this.isMuted),Promise.resolve(this.stream));return n?(this._shouldManageStream&&this._stopStream(),this._sender||(this._sender=this.version.pc.getSenders()[0]),this._sender.replaceTrack(t.getAudioTracks()[0]).then(()=>(this._updateInputStreamSource(t),this.stream=e?ze(t,this.options.MediaStream):t,i()))):(this.stream=e?ze(t,this.options.MediaStream):t,i())},Ue.prototype._onInputDevicesChanged=function(){this.stream&&this.stream.getAudioTracks().every(e=>"ended"===e.readyState)&&this._shouldManageStream&&this.openDefaultDeviceWithConstraints({audio:!0})},Ue.prototype._onIceGatheringFailure=function(e){this._hasIceGatheringFailures=!0,this.onicegatheringfailure(e)},Ue.prototype._onMediaConnectionStateChange=function(e){const t=this._iceState;if(t===e||"connected"!==e&&"disconnected"!==e&&"failed"!==e)return;let n;switch(this._iceState=e,e){case"connected":"disconnected"===t||"failed"===t?(n="ICE liveliness check succeeded. Connection with Twilio restored",this._log.info(n),this.onreconnected(n)):(n="Media connection established.",this._log.info(n),this.onconnected(n)),this._stopIceGatheringTimeout(),this._hasIceGatheringFailures=!1;break;case"disconnected":n="ICE liveliness check failed. May be having trouble connecting to Twilio",this._log.warn(n),this.ondisconnected(n);break;case"failed":n="Connection with Twilio was interrupted.",this._log.warn(n),this.onfailed(n)}},Ue.prototype._setSinkIds=function(e){return this._isSinkSupported?(this.sinkIds=new Set(e.forEach?e:[e]),this.version?this._updateAudioOutputs():Promise.resolve()):Promise.reject(new C("Audio output selection is not supported by this browser"))},Ue.prototype._startIceGatheringTimeout=function(){this._stopIceGatheringTimeout(),this._iceGatheringTimeoutId=setTimeout(()=>{this._onIceGatheringFailure("timeout")},15e3)},Ue.prototype._stopIceGatheringTimeout=function(){clearInterval(this._iceGatheringTimeoutId)},Ue.prototype._updateAudioOutputs=function(){const e=Array.from(this.sinkIds).filter(function(e){return!this.outputs.has(e)},this),t=Array.from(this.outputs.keys()).filter(function(e){return!this.sinkIds.has(e)},this),n=this,i=e.map(this._createAudioOutput,this);return Promise.all(i).then(()=>Promise.all(t.map(n._removeAudioOutput,n)))},Ue.prototype._createAudio=function(e){const t=new Audio(e);return this.onaudio(t),t},Ue.prototype._createAudioOutput=function(e){let t=null;this._mediaStreamSource&&(t=this._audioContext.createMediaStreamDestination(),this._mediaStreamSource.connect(t));const n=this._createAudio();He(n,t&&t.stream?t.stream:this.pcStream,this._audioHelper).catch(()=>this._log.error("Error attaching stream to element (_createAudioOutput)."));const i=this;return n.setSinkId(e).then(()=>n.play()).then(()=>{i.outputs.set(e,{audio:n,dest:t})})},Ue.prototype._removeAudioOutputs=function(){return this._masterAudio&&void 0!==this._masterAudioDeviceId&&(this._disableOutput(this,this._masterAudioDeviceId),this.outputs.delete(this._masterAudioDeviceId),this._masterAudioDeviceId=null,this._masterAudio.paused||this._masterAudio.pause(),void 0!==this._masterAudio.srcObject?this._masterAudio.srcObject=null:this._masterAudio.src="",this._masterAudio=null),Array.from(this.outputs.keys()).map(this._removeAudioOutput,this)},Ue.prototype._disableOutput=function(e,t){const n=e.outputs.get(t);n&&(n.audio&&(n.audio.pause(),n.audio.src=""),n.dest&&n.dest.disconnect())},Ue.prototype._reassignMasterOutput=function(e,t){const n=e.outputs.get(t);e.outputs.delete(t);const i=this,r=Array.from(e.outputs.keys())[0],o="string"==typeof r?r:"default";return n.audio.setSinkId(o).then(()=>{i._disableOutput(e,o),e.outputs.set(o,n),e._masterAudioDeviceId=o}).catch(function(){e.outputs.set(t,n),i._log.info("Could not reassign master output. Attempted to roll back.")})},Ue.prototype._removeAudioOutput=function(e){return this._masterAudioDeviceId===e?this._reassignMasterOutput(this,e):(this._disableOutput(this,e),this.outputs.delete(e),Promise.resolve())},Ue.prototype._onAddTrack=function(e,t){const n=e._masterAudio=this._createAudio();He(n,t,this._audioHelper).then(()=>n.play()).catch(()=>e._log.error("Error attaching stream to element (_onAddTrack)."));const i=Array.from(e.outputs.keys())[0],r="string"==typeof i?i:"default";e._masterAudioDeviceId=r,e.outputs.set(r,{audio:n});try{e._mediaStreamSource=e._audioContext.createMediaStreamSource(t)}catch(e){this._log.warn("Unable to create a MediaStreamSource from onAddTrack",e),this._mediaStreamSource=null}e.pcStream=t,e._updateAudioOutputs()},Ue.prototype._fallbackOnAddTrack=function(e,t){const n=document&&document.createElement("audio");He(n,t,this._audioHelper).then(()=>n.play()).catch(()=>e._log.error("Error attaching stream to element (_fallbackOnAddTrack).")),e.outputs.set("default",{audio:n})},Ue.prototype._setEncodingParameters=function(e){if(!e||!this._sender||"function"!=typeof this._sender.getParameters||"function"!=typeof this._sender.setParameters)return;const t=this._sender.getParameters();(t.priority||t.encodings&&t.encodings.length)&&(t.priority="high",t.encodings&&t.encodings.length&&t.encodings.forEach(e=>{e.priority="high",e.networkPriority="high"}),this._sender.setParameters(t))},Ue.prototype._setupPeerConnection=function(e){const t=this,n=new(this.options.rtcpcFactory||Me)({RTCPeerConnection:this.options.RTCPeerConnection});var i,r;n.create(e),i=n.pc,r=this.stream,"function"==typeof i.addTrack?r.getAudioTracks().forEach(e=>{i.addTrack(e,r)}):i.addStream(r);const o=RTCRtpReceiver.getCapabilities("audio").codecs;this._log.debug("sorting codecs",o,this.codecPreferences);const s=W(o,this.codecPreferences),[a]=n.pc.getTransceivers();this._log.debug("setting sorted codecs",s),a.setCodecPreferences(s);const l="ontrack"in n.pc?"ontrack":"onaddstream";return n.pc[l]=e=>{const i=t._remoteStream=e.stream||e.streams[0];"function"==typeof n.pc.getSenders&&(this._sender=n.pc.getSenders()[0]),t._isSinkSupported?t._onAddTrack(t,i):t._fallbackOnAddTrack(t,i),t._startPollingVolume()},n},Ue.prototype._maybeSetIceAggressiveNomination=function(e){return this.options.forceAggressiveIceNomination?function(e){return j(window,window.navigator)?e.split("\n").filter(e=>-1===e.indexOf("a=ice-lite")).join("\n"):e}(e):e},Ue.prototype._setupChannel=function(){const e=this.version.pc;this.version.pc.onopen=()=>{this.status="open",this.onopen()},this.version.pc.onstatechange=()=>{this.version.pc&&"stable"===this.version.pc.readyState&&(this.status="open",this.onopen())},this.version.pc.onsignalingstatechange=()=>{const t=e.signalingState;this._log.info(`signalingState is "${t}"`),this.version.pc&&"stable"===this.version.pc.signalingState&&(this.status="open",this.onopen()),this.onsignalingstatechange(e.signalingState)},e.onconnectionstatechange=t=>{let n=e.connectionState;if(!n&&t&&t.target){const e=t.target;n=e.connectionState||e.connectionState_,this._log.info(`pc.connectionState not detected. Using target PC. State=${n}`)}n?this._log.info(`pc.connectionState is "${n}"`):this._log.warn(`onconnectionstatechange detected but state is "${n}"`),this.onpcconnectionstatechange(n),this._onMediaConnectionStateChange(n)},e.onicecandidate=e=>{const{candidate:t}=e;t&&(this._hasIceCandidates=!0,this.onicecandidate(t),this._setupRTCIceTransportListener()),this._log.info(`ICE Candidate: ${JSON.stringify(t)}`)},e.onicegatheringstatechange=()=>{const t=e.iceGatheringState;"gathering"===t?this._startIceGatheringTimeout():"complete"===t&&(this._stopIceGatheringTimeout(),this._hasIceCandidates||this._onIceGatheringFailure("none"),this._hasIceCandidates&&this._hasIceGatheringFailures&&this._startIceGatheringTimeout()),this._log.info(`pc.iceGatheringState is "${e.iceGatheringState}"`),this.onicegatheringstatechange(t)},e.oniceconnectionstatechange=()=>{this._log.info(`pc.iceConnectionState is "${e.iceConnectionState}"`),this.oniceconnectionstatechange(e.iceConnectionState),this._onMediaConnectionStateChange(e.iceConnectionState)}},Ue.prototype._initializeMediaStream=function(e){return"open"!==this.status&&("disconnected"===this.pstream.status?(this.onerror({info:{code:31e3,message:"Cannot establish connection. Client is disconnected",twilioError:new g.ConnectionDisconnected}}),this.close(),!1):(this.version=this._setupPeerConnection(e),this._setupChannel(),!0))},Ue.prototype._removeReconnectionListeners=function(){this.pstream&&(this.pstream.removeListener("answer",this._onAnswerOrRinging),this.pstream.removeListener("hangup",this._onHangup))},Ue.prototype._setupRTCDtlsTransportListener=function(){const e=this.getRTCDtlsTransport();if(!e||e.onstatechange)return;const t=()=>{this._log.info(`dtlsTransportState is "${e.state}"`),this.ondtlstransportstatechange(e.state)};t(),e.onstatechange=t},Ue.prototype._setupRTCIceTransportListener=function(){const e=this._getRTCIceTransport();e&&!e.onselectedcandidatepairchange&&(e.onselectedcandidatepairchange=()=>this.onselectedcandidatepairchange(e.getSelectedCandidatePair()))},Ue.prototype.iceRestart=function(){this._log.info("Attempting to restart ICE..."),this._hasIceCandidates=!1,this.version.createOffer(this.options.maxAverageBitrate,{iceRestart:!0}).then(()=>{this._removeReconnectionListeners(),this._onAnswerOrRinging=e=>{if(this._removeReconnectionListeners(),!e.sdp||"have-local-offer"!==this.version.pc.signalingState){const t=`Invalid state or param during ICE Restart:hasSdp:${!!e.sdp}, signalingState:${this.version.pc.signalingState}`;return void this._log.warn(t)}const t=this._maybeSetIceAggressiveNomination(e.sdp);this._answerSdp=t,"closed"!==this.status&&this.version.processAnswer(this.codecPreferences,t,null,e=>{const t=e&&e.message?e.message:e;this._log.error(`Failed to process answer during ICE Restart. Error: ${t}`)})},this._onHangup=()=>{this._log.info("Received hangup during ICE Restart"),this._removeReconnectionListeners()},this.pstream.on("answer",this._onAnswerOrRinging),this.pstream.on("hangup",this._onHangup),this.pstream.reinvite(this.version.getSDP(),this.callSid)}).catch(e=>{const t=e&&e.message?e.message:e;this._log.error(`Failed to createOffer during ICE Restart. Error: ${t}`),this.onfailed(t)})},Ue.prototype.makeOutgoingCall=function(e,t,n,i,r){if(!this._initializeMediaStream(i))return;const o=this;function s(){o.options&&o._setEncodingParameters(o.options.dscp),r(o.version.pc)}function a(e){const t=e.message||e;o.onerror({info:{code:31e3,message:`Error processing answer: ${t}`,twilioError:new m.ClientRemoteDescFailed}})}this.callSid=n,this._onAnswerOrRinging=e=>{if(!e.sdp)return;const t=this._maybeSetIceAggressiveNomination(e.sdp);o._answerSdp=t,"closed"!==o.status&&o.version.processAnswer(this.codecPreferences,t,s,a),o.pstream.removeListener("answer",o._onAnswerOrRinging),o.pstream.removeListener("ringing",o._onAnswerOrRinging)},this.pstream.on("answer",this._onAnswerOrRinging),this.pstream.on("ringing",this._onAnswerOrRinging),this.version.createOffer(this.options.maxAverageBitrate,{audio:!0},function(){"closed"!==o.status&&(t?o.pstream.reconnect(o.version.getSDP(),o.callSid,t):o.pstream.invite(o.version.getSDP(),o.callSid,e),o._setupRTCDtlsTransportListener())},function(e){const t=e.message||e;o.onerror({info:{code:31e3,message:`Error creating the offer: ${t}`,twilioError:new m.ClientLocalDescFailed}})})},Ue.prototype.answerIncomingCall=function(e,t,n,i){if(!this._initializeMediaStream(n))return;t=this._maybeSetIceAggressiveNomination(t),this._answerSdp=t.replace(/^a=setup:actpass$/gm,"a=setup:passive"),this.callSid=e;const r=this;this.version.processSDP(this.options.maxAverageBitrate,this.codecPreferences,t,{audio:!0},function(){"closed"!==r.status&&(r.pstream.answer(r.version.getSDP(),e),r.options&&r._setEncodingParameters(r.options.dscp),i(r.version.pc),r._setupRTCDtlsTransportListener())},function(e){const t=e.message||e;r.onerror({info:{code:31e3,message:`Error creating the answer: ${t}`,twilioError:new m.ClientRemoteDescFailed}})})},Ue.prototype.close=function(){this.version&&this.version.pc&&("closed"!==this.version.pc.signalingState&&this.version.pc.close(),this.version.pc=null),this.stream&&(this.mute(!1),this._stopStream()),this.stream=null,this._removeReconnectionListeners(),this._stopIceGatheringTimeout(),this._audioHelper._destroyRemoteProcessedStream(),this._audioProcessorEventObserver.removeListener("add",this._onAudioProcessorAdded),this._audioProcessorEventObserver.removeListener("remove",this._onAudioProcessorRemoved),Promise.all(this._removeAudioOutputs()).catch(()=>{}),this._mediaStreamSource&&this._mediaStreamSource.disconnect(),this._inputAnalyser&&this._inputAnalyser.disconnect(),this._outputAnalyser&&this._outputAnalyser.disconnect(),this._inputAnalyser2&&this._inputAnalyser2.disconnect(),this._outputAnalyser2&&this._outputAnalyser2.disconnect(),this.status="closed",this.onclose()},Ue.prototype.reject=function(e){this.callSid=e},Ue.prototype.ignore=function(e){this.callSid=e},Ue.prototype.mute=function(e){this.isMuted=e,this.stream&&(this._sender&&this._sender.track?this._sender.track.enabled=!e:("function"==typeof this.stream.getAudioTracks?this.stream.getAudioTracks():this.stream.audioTracks).forEach(t=>{t.enabled=!e}))},Ue.prototype.getOrCreateDTMFSender=function(){if(this._dtmfSender||this._dtmfSenderUnsupported)return this._dtmfSender||null;const e=this,t=this.version.pc;if(!t)return this._log.warn("No RTCPeerConnection available to call createDTMFSender on"),null;if("function"==typeof t.getSenders&&("function"==typeof RTCDTMFSender||"function"==typeof RTCDtmfSender)){const e=t.getSenders().find(e=>e.dtmf);if(e)return this._log.info("Using RTCRtpSender#dtmf"),this._dtmfSender=e.dtmf,this._dtmfSender}if("function"==typeof t.createDTMFSender&&"function"==typeof t.getLocalStreams){const n=t.getLocalStreams().map(t=>{const n=e._getAudioTracks(t);return n&&n[0]})[0];return n?(this._log.info("Creating RTCDTMFSender"),this._dtmfSender=t.createDTMFSender(n),this._dtmfSender):(this._log.warn("No local audio MediaStreamTrack available on the RTCPeerConnection to pass to createDTMFSender"),null)}return this._log.info("RTCPeerConnection does not support RTCDTMFSender"),this._dtmfSenderUnsupported=!0,null},Ue.prototype.getRTCDtlsTransport=function(){const e=this.version&&this.version.pc&&"function"==typeof this.version.pc.getSenders&&this.version.pc.getSenders()[0];return e&&e.transport||null},Ue.prototype._canStopMediaStreamTrack=()=>"function"==typeof MediaStreamTrack.prototype.stop,Ue.prototype._getAudioTracks=e=>"function"==typeof e.getAudioTracks?e.getAudioTracks():e.audioTracks,Ue.prototype._getRTCIceTransport=function(){const e=this.getRTCDtlsTransport();return e&&e.iceTransport||null},Ue.protocol=Me.test()?new Me:null,Ue.prototype._handleAudioProcessorEvent=function(e,t){if(!e||!this._remoteStream)return;let n=null;this._masterAudio?(this._log.info("Setting audio source for master audio."),n=this._masterAudio):(this._log.info("No master audio. Setting audio source for default audio output."),n=this.outputs.get("default").audio),He(n,this._remoteStream,this._audioHelper).then(()=>{const e=t?"Successfully updated audio source with processed stream":"Successfully reverted audio source to original stream";this._log.info(e),n.paused&&(this._log.info("Resuming audio playback"),n.play())}).catch(()=>{const e=t?"Failed to update audio source":"Failed to revert audio source";this._log.error(e)})},Ue.enabled=Me.test();class Be{constructor(){this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}get promise(){return this._promise}reject(e){this._reject(e)}resolve(e){this._resolve(e)}}class qe{constructor(){this._operations=[]}enqueue(e){const t=!!this._operations.length,n=new Be;return this._operations.push({deferred:n,callback:e}),t||this._processQueue(),n.promise}_processQueue(){return o(this,void 0,void 0,function*(){for(;this._operations.length;){const{deferred:e,callback:t}=this._operations[0];let n,i,r;try{n=yield t(),r=!0}catch(e){i=e}this._operations.shift(),r?e.resolve(n):e.reject(i)}})}}class Ge{get reject(){return this._reject}get resolve(){return this._resolve}constructor(){this.promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}}class Qe{constructor(){this._eventEmitter=new i.EventEmitter}addEventListener(e,t){return this._eventEmitter.addListener(e,t)}dispatchEvent(e,...t){return this._eventEmitter.emit(e,...t)}removeEventListener(e,t){return this._eventEmitter.removeListener(e,t)}}class Ke extends Qe{get destination(){return this._destination}get loop(){return this._loop}set loop(e){const t=this;e||!this.loop||this.paused||this._audioNode.addEventListener("ended",function e(){t._audioNode.removeEventListener("ended",e),t.pause()}),this._loop=e}get muted(){return 0===this._gainNode.gain.value}set muted(e){this._gainNode.gain.value=e?0:1}get paused(){return null===this._audioNode}get src(){return this._src}set src(e){this._load(e)}get srcObject(){return this._audioElement.srcObject}set srcObject(e){this._audioElement.srcObject=e}get sinkId(){return this._sinkId}constructor(e,t={},n={}){super(),this._audioNode=null,this._loop=!1,this._pendingPlayDeferreds=[],this._sinkId="default",this._src="","string"!=typeof t&&(n=t),this._audioContext=e,this._audioElement=new(n.AudioFactory||Audio),this._bufferPromise=this._createPlayDeferred().promise,this._destination=this._audioContext.destination,this._gainNode=this._audioContext.createGain(),this._gainNode.connect(this._destination),this._XMLHttpRequest=n.XMLHttpRequestFactory||XMLHttpRequest,this.addEventListener("canplaythrough",()=>{this._resolvePlayDeferreds()}),"string"==typeof t&&(this.src=t)}load(){this._load(this._src)}pause(){this.paused||(this._audioElement.pause(),this._audioNode.stop(),this._audioNode.disconnect(this._gainNode),this._audioNode=null,this._rejectPlayDeferreds(new Error("The play() request was interrupted by a call to pause().")))}play(){return o(this,void 0,void 0,function*(){if(!this.paused){if(yield this._bufferPromise,!this.paused)return;throw new Error("The play() request was interrupted by a call to pause().")}this._audioNode=this._audioContext.createBufferSource(),this._audioNode.loop=this.loop,this._audioNode.addEventListener("ended",()=>{this._audioNode&&this._audioNode.loop||this.dispatchEvent("ended")});const e=yield this._bufferPromise;if(this.paused)throw new Error("The play() request was interrupted by a call to pause().");if(this._audioNode.buffer=e,this._audioNode.connect(this._gainNode),this._audioNode.start(),this._audioElement.srcObject)return this._audioElement.play()})}setSinkId(e){return o(this,void 0,void 0,function*(){if("function"!=typeof this._audioElement.setSinkId)throw new Error("This browser does not support setSinkId.");if(e!==this.sinkId){if("default"===e)return this.paused||this._gainNode.disconnect(this._destination),this._audioElement.srcObject=null,this._destination=this._audioContext.destination,this._gainNode.connect(this._destination),void(this._sinkId=e);yield this._audioElement.setSinkId(e),this._audioElement.srcObject||(this._gainNode.disconnect(this._audioContext.destination),this._destination=this._audioContext.createMediaStreamDestination(),this._audioElement.srcObject=this._destination.stream,this._sinkId=e,this._gainNode.connect(this._destination))}})}_createPlayDeferred(){const e=new Ge;return this._pendingPlayDeferreds.push(e),e}_load(e){this._src&&this._src!==e&&this.pause(),this._src=e,this._bufferPromise=new Promise((t,n)=>o(this,void 0,void 0,function*(){if(!e)return this._createPlayDeferred().promise;const n=yield function(e,t,n){return o(this,void 0,void 0,function*(){const i=new t;i.open("GET",n,!0),i.responseType="arraybuffer";const r=yield new Promise(e=>{i.addEventListener("load",e),i.send()});try{return e.decodeAudioData(r.target.response)}catch(t){return new Promise(t=>{e.decodeAudioData(r.target.response,t)})}})}(this._audioContext,this._XMLHttpRequest,e);this.dispatchEvent("canplaythrough"),t(n)}))}_rejectPlayDeferreds(e){const t=this._pendingPlayDeferreds;t.splice(0,t.length).forEach(({reject:t})=>t(e))}_resolvePlayDeferreds(e){const t=this._pendingPlayDeferreds;t.splice(0,t.length).forEach(({resolve:t})=>t(e))}}function Je(e,t,n){if(!(this instanceof Je))return new Je(e,t,n);if(!e||!t)throw new S("name and url are required arguments");(n=Object.assign({AudioFactory:"undefined"!=typeof Audio?Audio:null,maxDuration:0,shouldLoop:!1},n)).AudioPlayer=n.audioContext?Ke.bind(Ke,n.audioContext):n.AudioFactory,Object.defineProperties(this,{_Audio:{value:n.AudioPlayer},_activeEls:{value:new Map},_isSinkSupported:{value:null!==n.AudioFactory&&"function"==typeof n.AudioFactory.prototype.setSinkId},_maxDuration:{value:n.maxDuration},_maxDurationTimeout:{value:null,writable:!0},_operations:{value:new qe},_playPromise:{value:null,writable:!0},_shouldLoop:{value:n.shouldLoop},_sinkIds:{value:["default"]},isPlaying:{enumerable:!0,get(){return!!this._playPromise}},name:{enumerable:!0,value:e},url:{enumerable:!0,value:t}}),this._Audio&&this._play(!0,!1)}function Xe(e){e&&(e.pause(),e.src="",e.srcObject=null,e.load())}Je.prototype._playAudioElement=function(e,t,n){const i=this._activeEls.get(e);if(!i)throw new S(`sinkId: "${e}" doesn't have an audio element`);return i.muted=!!t,i.loop=!!n,i.play().then(()=>i).catch(t=>{throw Xe(i),this._activeEls.delete(e),t})},Je.prototype._play=function(e,t){this.isPlaying&&this._stop(),this._maxDuration>0&&(this._maxDurationTimeout=setTimeout(this._stop.bind(this),this._maxDuration)),t="boolean"==typeof t?t:this._shouldLoop;const n=this;return this._playPromise=Promise.all(this._sinkIds.map(function(i){if(!n._Audio)return Promise.resolve();let r=n._activeEls.get(i);return r?n._playAudioElement(i,e,t):(r=new n._Audio(n.url),"function"==typeof r.setAttribute&&r.setAttribute("crossorigin","anonymous"),new Promise(e=>{r.addEventListener("canplaythrough",e)}).then(()=>(n._isSinkSupported?r.setSinkId(i):Promise.resolve()).then(function(){return n._activeEls.set(i,r),n._playPromise?n._playAudioElement(i,e,t):Promise.resolve()})))}))},Je.prototype._stop=function(){this._activeEls.forEach((e,t)=>{this._sinkIds.includes(t)?(e.pause(),e.currentTime=0):(Xe(e),this._activeEls.delete(t))}),clearTimeout(this._maxDurationTimeout),this._playPromise=null,this._maxDurationTimeout=null},Je.prototype.setSinkIds=function(e){this._isSinkSupported&&(e=e.forEach?e:[e],[].splice.apply(this._sinkIds,[0,this._sinkIds.length].concat(e)))},Je.prototype.stop=function(){this._operations.enqueue(()=>(this._stop(),Promise.resolve()))},Je.prototype.play=function(){return this._operations.enqueue(()=>this._play())};class Ye extends i.EventEmitter{static get audioContext(){return Ye._audioContext}static get extension(){const e="undefined"!=typeof document?document.createElement("audio"):{canPlayType:!1};let t,n;try{t=e.canPlayType&&!!e.canPlayType("audio/mpeg").replace(/no/,"")}catch(e){t=!1}try{n=e.canPlayType&&!!e.canPlayType("audio/ogg;codecs='vorbis'").replace(/no/,"")}catch(e){n=!1}return n&&!t?"ogg":"mp3"}static get isSupported(){return Me.test()}static get packageName(){return x}static runPreflight(e,t){return new ye(e,Object.assign({audioContext:Ye._getOrCreateAudioContext()},t))}static toString(){return"[Twilio.Device class]"}static get version(){return E}static _getOrCreateAudioContext(){return Ye._audioContext||("undefined"!=typeof AudioContext?Ye._audioContext=new AudioContext:"undefined"!=typeof webkitAudioContext&&(Ye._audioContext=new webkitAudioContext)),Ye._audioContext}constructor(e,t={}){if(super(),this._activeCall=null,this._audio=null,this._audioProcessorEventObserver=null,this._callInputStream=null,this._calls=[],this._callSinkIds=["default"],this._chunderURIs=[],this._defaultOptions={allowIncomingWhileBusy:!1,closeProtection:!1,codecPreferences:[ut.Codec.PCMU,ut.Codec.Opus],dscp:!0,enableImprovedSignalingErrorPrecision:!1,forceAggressiveIceNomination:!1,logLevel:v.levels.ERROR,maxCallSignalingTimeoutMs:0,preflight:!1,sounds:{},tokenRefreshMs:1e4,voiceEventSidGenerator:We},this._edge=null,this._home=null,this._identity=null,this._log=new I("Device"),this._makeCallPromise=null,this._options={},this._preferredURI=null,this._publisher=null,this._region=null,this._regTimer=null,this._shouldReRegister=!1,this._soundcache=new Map,this._state=Ye.State.Unregistered,this._stateEventMapping={[Ye.State.Destroyed]:Ye.EventName.Destroyed,[Ye.State.Unregistered]:Ye.EventName.Unregistered,[Ye.State.Registering]:Ye.EventName.Registering,[Ye.State.Registered]:Ye.EventName.Registered},this._stream=null,this._streamConnectedPromise=null,this._tokenWillExpireTimeout=null,this._createDefaultPayload=e=>{const t={aggressive_nomination:this._options.forceAggressiveIceNomination,browser_extension:this._isBrowserExtension,dscp:!!this._options.dscp,ice_restart_enabled:!0,platform:"undefined"!=typeof RTCIceGatherer?"ORTC":"WebRTC",sdk_version:E};function n(e,n){n&&(t[e]=n)}if(e){const i=e.parameters.CallSid;n("call_sid",/^TJ/.test(i)?void 0:i),n("temp_call_sid",e.outboundConnectionId),n("audio_codec",e.codec),t.direction=e.direction}return n("gateway",this._stream&&this._stream.gateway),n("region",this._stream&&this._stream.region),t},this._onSignalingClose=()=>{this._stream=null,this._streamConnectedPromise=null},this._onSignalingConnected=e=>{var t;const n=function(e){return Ee[e]||null}(e.region);if(this._edge=e.edge||Pe[n]||e.region,this._region=n||e.region,this._home=e.home,null===(t=this._publisher)||void 0===t||t.setHost(Oe(e.home)),e.token&&(this._identity=e.token.identity,"number"==typeof e.token.ttl&&"number"==typeof this._options.tokenRefreshMs)){const t=1e3*e.token.ttl,n=Math.max(0,t-this._options.tokenRefreshMs);this._tokenWillExpireTimeout=setTimeout(()=>{this._log.debug("#tokenWillExpire"),this.emit("tokenWillExpire",this),this._tokenWillExpireTimeout&&(clearTimeout(this._tokenWillExpireTimeout),this._tokenWillExpireTimeout=null)},n)}const i=this._getChunderws()||Le(this._edge);if(i.length>0){const[e]=i;this._preferredURI=Re(e)}else this._log.warn("Could not parse a preferred URI from the stream#connected event.");this._shouldReRegister&&this.register()},this._onSignalingError=e=>{if("object"!=typeof e)return void this._log.warn("Invalid signaling error payload",e);const{error:t,callsid:n,voiceeventsid:i}=e;if("object"!=typeof t||i)return void this._log.warn("Ignoring signaling error payload",{originalError:t,voiceeventsid:i});const r="string"==typeof n&&this._findCall(n)||void 0,{code:o,message:s}=t;let{twilioError:a}=t;if("number"==typeof o)if(31201===o)a=new l.AuthenticationFailed(t);else if(31204===o)a=new l.AccessTokenInvalid(t);else if(31205===o)this._stopRegistrationTimer(),a=new l.AccessTokenExpired(t);else{const e=w(!!this._options.enableImprovedSignalingErrorPrecision,o);void 0!==e&&(a=new e(t))}a||(this._log.error("Unknown signaling error: ",t),a=new h.UnknownError(s,t)),this._log.error("Received error: ",a),this._log.debug("#error",t),this.emit(Ye.EventName.Error,a,r)},this._onSignalingInvite=e=>o(this,void 0,void 0,function*(){var t;const n=!!this._activeCall;if(n&&!this._options.allowIncomingWhileBusy)return void this._log.info("Device busy; ignoring incoming invite");if(!e.callsid||!e.sdp)return this._log.debug("#error",e),void this.emit(Ye.EventName.Error,new u.BadRequest("Malformed invite from gateway"));const i=e.parameters||{};i.CallSid=i.CallSid||e.callsid;const r=Object.assign({},z(i.Params));let o;this._makeCallPromise=this._makeCall(r,{callParameters:i,enableImprovedSignalingErrorPrecision:!!this._options.enableImprovedSignalingErrorPrecision,offerSdp:e.sdp,reconnectToken:e.reconnect,voiceEventSidGenerator:this._options.voiceEventSidGenerator});try{o=yield this._makeCallPromise}finally{this._makeCallPromise=null}this._calls.push(o),o.once("accept",()=>{this._soundcache.get(Ye.SoundName.Incoming).stop(),this._publishNetworkChange()});const s=(null===(t=this._audio)||void 0===t?void 0:t.incoming())&&!n?()=>this._soundcache.get(Ye.SoundName.Incoming).play():()=>Promise.resolve();this._showIncomingCall(o,s)}),this._onSignalingOffline=()=>{this._log.info("Stream is offline"),this._edge=null,this._region=null,this._shouldReRegister=this.state!==Ye.State.Unregistered,this._setState(Ye.State.Unregistered)},this._onSignalingReady=()=>{this._log.info("Stream is ready"),this._setState(Ye.State.Registered)},this._publishNetworkChange=()=>{this._activeCall&&this._networkInformation&&this._publisher.info("network-information","network-change",{connection_type:this._networkInformation.type,downlink:this._networkInformation.downlink,downlinkMax:this._networkInformation.downlinkMax,effective_type:this._networkInformation.effectiveType,rtt:this._networkInformation.rtt},this._activeCall)},this._updateInputStream=e=>{const t=this._activeCall;return t&&!e?Promise.reject(new k("Cannot unset input device while a call is in progress.")):(this._callInputStream=e,t?t._setInputTracksFromStream(e):Promise.resolve())},this._updateSinkIds=(e,t)=>("ringtone"===e?this._updateRingtoneSinkIds(t):this._updateSpeakerSinkIds(t)).then(()=>{this._publisher.info("audio",`${e}-devices-set`,{audio_device_ids:t},this._activeCall)},n=>{throw this._publisher.error("audio",`${e}-devices-set-failed`,{audio_device_ids:t,message:n.message},this._activeCall),n}),this._setupLoglevel(t.logLevel),this._logOptions("constructor",t),this.updateToken(e),$())throw new C("Microsoft Edge Legacy (https://support.microsoft.com/en-us/help/4533505/what-is-microsoft-edge-legacy) is deprecated and will not be able to connect to Twilio to make or receive calls after September 1st, 2020. Please see this documentation for a list of supported browsers https://www.twilio.com/docs/voice/client/javascript#supported-browsers");if(!Ye.isSupported&&t.ignoreBrowserSupport){if(window&&window.location&&"http:"===window.location.protocol)throw new C("twilio.js wasn't able to find WebRTC browser support. This is most likely because this page is served over http rather than https, which does not support WebRTC in many browsers. Please load this page over https and try again.");throw new C("twilio.js 1.3+ SDKs require WebRTC browser support. For more information, see <https://www.twilio.com/docs/api/client/twilio-js>. If you have any questions about this announcement, please contact Twilio Support at <help@twilio.com>.")}const n=globalThis,i=n.msBrowser||n.browser||n.chrome;if(this._isBrowserExtension=!!i&&!!i.runtime&&!!i.runtime.id||!!n.safari&&!!n.safari.extension,this._isBrowserExtension&&this._log.info("Running as browser extension."),navigator){const e=navigator;this._networkInformation=e.connection||e.mozConnection||e.webkitConnection}this._networkInformation&&"function"==typeof this._networkInformation.addEventListener&&this._networkInformation.addEventListener("change",this._publishNetworkChange),Ye._getOrCreateAudioContext(),Ye._audioContext&&(Ye._dialtonePlayer||(Ye._dialtonePlayer=new X(Ye._audioContext))),this._boundDestroy=this.destroy.bind(this),this._boundConfirmClose=this._confirmClose.bind(this),"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("unload",this._boundDestroy),window.addEventListener("pagehide",this._boundDestroy)),this.updateOptions(t)}get audio(){return this._audio}connect(){return o(this,arguments,void 0,function*(e={}){if(this._log.debug(".connect",JSON.stringify(e)),this._throwIfDestroyed(),this._activeCall)throw new k("A Call is already active");let t,n,i;if(e.connectToken){try{const r=JSON.parse(decodeURIComponent(atob(e.connectToken)));t=r.customParameters,n=r.parameters,i=r.signalingReconnectToken}catch(e){throw new S("Cannot parse connectToken")}if(!n||!n.CallSid||!i)throw new S("Invalid connectToken")}let r=!1,o={};const s={enableImprovedSignalingErrorPrecision:!!this._options.enableImprovedSignalingErrorPrecision,rtcConfiguration:e.rtcConfiguration,voiceEventSidGenerator:this._options.voiceEventSidGenerator};let a;i&&n?(r=!0,s.callParameters=n,s.reconnectCallSid=n.CallSid,s.reconnectToken=i,o=t||o):o=e.params||o,this._makeCallPromise=this._makeCall(o,s,r);try{a=this._activeCall=yield this._makeCallPromise}finally{this._makeCallPromise=null}return this._calls.splice(0).forEach(e=>e.ignore()),this._soundcache.get(Ye.SoundName.Incoming).stop(),a.accept({rtcConstraints:e.rtcConstraints}),this._publishNetworkChange(),a})}get calls(){return this._calls}destroy(){var e;this._log.debug(".destroy"),this._log.debug("Rejecting any incoming calls"),this._calls.slice(0).forEach(e=>e.reject()),this.disconnectAll(),this._stopRegistrationTimer(),this._destroyStream(),this._destroyAudioHelper(),null===(e=this._audioProcessorEventObserver)||void 0===e||e.destroy(),this._destroyPublisher(),this._networkInformation&&"function"==typeof this._networkInformation.removeEventListener&&this._networkInformation.removeEventListener("change",this._publishNetworkChange),"undefined"!=typeof window&&window.removeEventListener&&(window.removeEventListener("beforeunload",this._boundConfirmClose),window.removeEventListener("unload",this._boundDestroy),window.removeEventListener("pagehide",this._boundDestroy)),this._setState(Ye.State.Destroyed),i.EventEmitter.prototype.removeAllListeners.call(this)}disconnectAll(){this._log.debug(".disconnectAll"),this._calls.splice(0).forEach(e=>e.disconnect()),this._activeCall&&this._activeCall.disconnect()}get edge(){return this._edge}get home(){return this._home}get identity(){return this._identity}get isBusy(){return!!this._activeCall}register(){return o(this,void 0,void 0,function*(){if(this._log.debug(".register"),this.state!==Ye.State.Unregistered)throw new k(`Attempt to register when device is in state "${this.state}". Must be "${Ye.State.Unregistered}".`);this._shouldReRegister=!1,this._setState(Ye.State.Registering),yield this._streamConnectedPromise||this._setupStream(),yield this._sendPresence(!0),yield V(this,Ye.State.Registered,Ye.State.Unregistered)})}get state(){return this._state}get token(){return this._token}toString(){return"[Twilio.Device instance]"}unregister(){return o(this,void 0,void 0,function*(){if(this._log.debug(".unregister"),this.state!==Ye.State.Registered)throw new k(`Attempt to unregister when device is in state "${this.state}". Must be "${Ye.State.Registered}".`);this._shouldReRegister=!1;const e=yield this._streamConnectedPromise,t=new Promise(t=>{e.on("offline",t)});yield this._sendPresence(!1),yield t})}updateOptions(e={}){if(this._logOptions("updateOptions",e),this.state===Ye.State.Destroyed)throw new k(`Attempt to "updateOptions" when device is in state "${this.state}".`);this._options=Object.assign(Object.assign(Object.assign({},this._defaultOptions),this._options),e);const t=new Set(this._chunderURIs),n=this._chunderURIs=(this._getChunderws()||Le(this._options.edge)).map(Re);let i=t.size!==n.length;if(!i)for(const e of n)if(!t.has(e)){i=!0;break}if(this.isBusy&&i)throw new k("Cannot change Edge while on an active Call");this._setupLoglevel(this._options.logLevel);for(const e of Object.keys(Ye._defaultSounds)){const t=Ye._defaultSounds[e],n=`${P}/${t.filename}.${Ye.extension}?cache=${E}`,i=this._options.sounds&&this._options.sounds[e]||n,r=new(this._options.Sound||Je)(e,i,{audioContext:this._options.disableAudioContextSounds?null:Ye.audioContext,maxDuration:t.maxDuration,shouldLoop:t.shouldLoop});this._soundcache.set(e,r)}this._setupAudioHelper(),this._setupPublisher(),i&&this._streamConnectedPromise&&this._setupStream(),"undefined"!=typeof window&&"function"==typeof window.addEventListener&&this._options.closeProtection&&(window.removeEventListener("beforeunload",this._boundConfirmClose),window.addEventListener("beforeunload",this._boundConfirmClose))}updateToken(e){if(this._log.debug(".updateToken"),this.state===Ye.State.Destroyed)throw new k(`Attempt to "updateToken" when device is in state "${this.state}".`);if("string"!=typeof e)throw new S('Parameter "token" must be of type "string".');this._token=e,this._stream&&this._stream.setToken(this._token),this._publisher&&this._publisher.setToken(this._token)}_confirmClose(e){if(!this._activeCall)return"";const t=this._options.closeProtection||!1,n="string"!=typeof t?"A call is currently in-progress. Leaving or reloading this page will end the call.":t;return(e||window.event).returnValue=n,n}_destroyAudioHelper(){this._audio&&(this._audio._destroy(),this._audio=null)}_destroyPublisher(){this._publisher&&(this._publisher=null)}_destroyStream(){this._stream&&(this._stream.removeListener("close",this._onSignalingClose),this._stream.removeListener("connected",this._onSignalingConnected),this._stream.removeListener("error",this._onSignalingError),this._stream.removeListener("invite",this._onSignalingInvite),this._stream.removeListener("offline",this._onSignalingOffline),this._stream.removeListener("ready",this._onSignalingReady),this._stream.destroy(),this._stream=null),this._onSignalingOffline(),this._streamConnectedPromise=null}_findCall(e){return this._calls.find(t=>t.parameters.CallSid===e||t.outboundConnectionId===e)||null}_getChunderws(){return"string"==typeof this._options.chunderw?[this._options.chunderw]:Array.isArray(this._options.chunderw)?this._options.chunderw:null}_logOptions(e,t={}){const n=["allowIncomingWhileBusy","appName","appVersion","closeProtection","codecPreferences","disableAudioContextSounds","dscp","edge","enableImprovedSignalingErrorPrecision","forceAggressiveIceNomination","logLevel","maxAverageBitrate","maxCallSignalingTimeoutMs","sounds","tokenRefreshMs"],i=["RTCPeerConnection","enumerateDevices","getUserMedia","MediaStream"];if("object"==typeof t){const r=Object.assign({},t);Object.keys(r).forEach(e=>{n.includes(e)||i.includes(e)||delete r[e],i.includes(e)&&(r[e]=!0)}),this._log.debug(`.${e}`,JSON.stringify(r))}}_makeCall(e,t){return o(this,arguments,void 0,function*(e,t,n=!1){var i;const r=null===(i=this._audio)||void 0===i?void 0:i._getInputDevicePromise();r&&(this._log.debug("inputDevicePromise detected, waiting..."),yield r,this._log.debug("inputDevicePromise resolved"));const o={audioHelper:this._audio,onIgnore:()=>{this._soundcache.get(Ye.SoundName.Incoming).stop()},pstream:yield this._streamConnectedPromise||this._setupStream(),publisher:this._publisher,soundcache:this._soundcache};t=Object.assign({MediaStream:this._options.MediaStream,RTCPeerConnection:this._options.RTCPeerConnection,beforeAccept:e=>{this._activeCall&&this._activeCall!==e&&(this._activeCall.disconnect(),this._removeCall(this._activeCall))},codecPreferences:this._options.codecPreferences,customSounds:this._options.sounds,dialtonePlayer:Ye._dialtonePlayer,dscp:this._options.dscp,forceAggressiveIceNomination:this._options.forceAggressiveIceNomination,getInputStream:()=>this._options.fileInputStream||this._callInputStream,getSinkIds:()=>this._callSinkIds,maxAverageBitrate:this._options.maxAverageBitrate,preflight:this._options.preflight,rtcConstraints:this._options.rtcConstraints,shouldPlayDisconnect:()=>{var e;return null===(e=this._audio)||void 0===e?void 0:e.disconnect()},twimlParams:e,voiceEventSidGenerator:this._options.voiceEventSidGenerator},t);const s=()=>{this._stream?null===this._activeCall&&0===this._calls.length&&this._stream.updatePreferredURI(null):this._log.warn("UnsetPreferredUri called without a stream")},a=new(this._options.Call||ut)(o,t);return this._publisher.info("settings","init",{MediaStream:!!this._options.MediaStream,RTCPeerConnection:!!this._options.RTCPeerConnection,enumerateDevices:!!this._options.enumerateDevices,getUserMedia:!!this._options.getUserMedia},a),a.once("accept",()=>{var e,t,i,r,o;this._stream.updatePreferredURI(this._preferredURI),this._removeCall(a),this._activeCall=a,this._audio&&this._audio._maybeStartPollingVolume(),a.direction===ut.CallDirection.Outgoing&&(null===(e=this._audio)||void 0===e?void 0:e.outgoing())&&!n&&this._soundcache.get(Ye.SoundName.Outgoing).play();const s={edge:this._edge||this._region};this._options.edge&&(s.selected_edge=Array.isArray(this._options.edge)?this._options.edge:[this._options.edge]),this._publisher.info("settings","edge",s,a),(null===(t=this._audio)||void 0===t?void 0:t.localProcessedStream)&&(null===(i=this._audioProcessorEventObserver)||void 0===i||i.emit("enabled",!1)),(null===(r=this._audio)||void 0===r?void 0:r.remoteProcessedStream)&&(null===(o=this._audioProcessorEventObserver)||void 0===o||o.emit("enabled",!0))}),a.addListener("error",e=>{"closed"===a.status()&&(this._removeCall(a),s()),this._audio&&this._audio._maybeStopPollingVolume(),this._maybeStopIncomingSound()}),a.once("cancel",()=>{this._log.info(`Canceled: ${a.parameters.CallSid}`),this._removeCall(a),s(),this._audio&&this._audio._maybeStopPollingVolume(),this._maybeStopIncomingSound()}),a.once("disconnect",()=>{this._audio&&this._audio._maybeStopPollingVolume(),this._removeCall(a),s(),this._maybeStopIncomingSound()}),a.once("reject",()=>{this._log.info(`Rejected: ${a.parameters.CallSid}`),this._audio&&this._audio._maybeStopPollingVolume(),this._removeCall(a),s(),this._maybeStopIncomingSound()}),a.on("transportClose",()=>{a.status()===ut.State.Pending&&(this._audio&&this._audio._maybeStopPollingVolume(),this._removeCall(a),this._maybeStopIncomingSound())}),a})}_maybeStopIncomingSound(){this._calls.length||this._soundcache.get(Ye.SoundName.Incoming).stop()}_removeCall(e){this._activeCall===e&&(this._activeCall=null,this._makeCallPromise=null);for(let t=this._calls.length-1;t>=0;t--)e===this._calls[t]&&this._calls.splice(t,1)}_sendPresence(e){return o(this,void 0,void 0,function*(){const t=yield this._streamConnectedPromise;t&&(t.register({audio:e}),e?this._startRegistrationTimer():this._stopRegistrationTimer())})}_setState(e){if(e===this.state)return;this._state=e;const t=this._stateEventMapping[e];this._log.debug(`#${t}`),this.emit(t)}_setupAudioHelper(){this._audioProcessorEventObserver||(this._audioProcessorEventObserver=new K,this._audioProcessorEventObserver.on("event",({name:e,group:t,isRemote:n})=>{this._publisher.info(t,e,{is_remote:n},this._activeCall)}));const e={audioContext:Ye.audioContext,audioProcessorEventObserver:this._audioProcessorEventObserver,beforeSetInputDevice:()=>this._makeCallPromise?(this._log.debug("beforeSetInputDevice pause detected"),this._makeCallPromise):(this._log.debug("beforeSetInputDevice pause not detected, setting default"),Promise.resolve()),enumerateDevices:this._options.enumerateDevices,getUserMedia:this._options.getUserMedia||Ve};if(this._audio)return this._log.info("Found existing audio helper; updating options..."),void this._audio._updateUserOptions(e);this._audio=new(this._options.AudioHelper||Q)(this._updateSinkIds,this._updateInputStream,e),this._audio.on("deviceChange",e=>{const t=this._activeCall,n=e.map(e=>e.deviceId);this._publisher.info("audio","device-change",{lost_active_device_ids:n},t),t&&t._mediaHandler._onInputDevicesChanged()})}_setupLoglevel(e){const t="number"==typeof e||"string"==typeof e?e:v.levels.ERROR;this._log.setDefaultLevel(t),this._log.info("Set logger default level to",t)}_setupPublisher(){this._publisher&&(this._log.info("Found existing publisher; destroying..."),this._destroyPublisher());const e={defaultPayload:this._createDefaultPayload,metadata:{app_name:this._options.appName,app_version:this._options.appVersion}};return this._options.eventgw&&(e.host=this._options.eventgw),this._home&&(e.host=Oe(this._home)),this._publisher=new(this._options.Publisher||Z)("twilio-js-sdk",this.token,e),!1===this._options.publishEvents?this._publisher.disable():this._publisher.on("error",e=>{this._log.warn("Cannot connect to insights.",e)}),this._publisher}_setupStream(){return this._stream&&(this._log.info("Found existing stream; destroying..."),this._destroyStream()),this._log.info("Setting up VSP"),this._stream=new(this._options.PStream||Ce)(this.token,this._chunderURIs,{backoffMaxMs:this._options.backoffMaxMs,maxPreferredDurationMs:this._options.maxCallSignalingTimeoutMs}),this._stream.addListener("close",this._onSignalingClose),this._stream.addListener("connected",this._onSignalingConnected),this._stream.addListener("error",this._onSignalingError),this._stream.addListener("invite",this._onSignalingInvite),this._stream.addListener("offline",this._onSignalingOffline),this._stream.addListener("ready",this._onSignalingReady),this._streamConnectedPromise=V(this._stream,"connected","close").then(()=>this._stream)}_showIncomingCall(e,t){let n;return Promise.race([t(),new Promise((e,t)=>{n=setTimeout(()=>{t(new Error("Playing incoming ringtone took too long; it might not play. Continuing execution..."))},2e3)})]).catch(e=>{this._log.warn(e.message)}).then(()=>{clearTimeout(n),this._log.debug("#incoming",JSON.stringify({customParameters:e.customParameters,parameters:e.parameters})),this.emit(Ye.EventName.Incoming,e)})}_startRegistrationTimer(){this._stopRegistrationTimer(),this._regTimer=setTimeout(()=>{this._sendPresence(!0)},3e4)}_stopRegistrationTimer(){this._regTimer&&clearTimeout(this._regTimer)}_throwIfDestroyed(){if(this.state===Ye.State.Destroyed)throw new k("Device has been destroyed.")}_updateRingtoneSinkIds(e){return Promise.resolve(this._soundcache.get(Ye.SoundName.Incoming).setSinkIds(e))}_updateSpeakerSinkIds(e){Array.from(this._soundcache.entries()).filter(e=>e[0]!==Ye.SoundName.Incoming).forEach(t=>t[1].setSinkIds(e)),this._callSinkIds=e;const t=this._activeCall;return t?t._setSinkIds(e):Promise.resolve()}}Ye._defaultSounds={disconnect:{filename:"disconnect",maxDuration:3e3},dtmf0:{filename:"dtmf-0",maxDuration:1e3},dtmf1:{filename:"dtmf-1",maxDuration:1e3},dtmf2:{filename:"dtmf-2",maxDuration:1e3},dtmf3:{filename:"dtmf-3",maxDuration:1e3},dtmf4:{filename:"dtmf-4",maxDuration:1e3},dtmf5:{filename:"dtmf-5",maxDuration:1e3},dtmf6:{filename:"dtmf-6",maxDuration:1e3},dtmf7:{filename:"dtmf-7",maxDuration:1e3},dtmf8:{filename:"dtmf-8",maxDuration:1e3},dtmf9:{filename:"dtmf-9",maxDuration:1e3},dtmfh:{filename:"dtmf-hash",maxDuration:1e3},dtmfs:{filename:"dtmf-star",maxDuration:1e3},incoming:{filename:"incoming",shouldLoop:!0},outgoing:{filename:"outgoing",maxDuration:3e3}},function(e){var t,n,i;(t=e.EventName||(e.EventName={})).Error="error",t.Incoming="incoming",t.Destroyed="destroyed",t.Unregistered="unregistered",t.Registering="registering",t.Registered="registered",t.TokenWillExpire="tokenWillExpire",(n=e.State||(e.State={})).Destroyed="destroyed",n.Unregistered="unregistered",n.Registering="registering",n.Registered="registered",(i=e.SoundName||(e.SoundName={})).Incoming="incoming",i.Outgoing="outgoing",i.Disconnect="disconnect",i.Dtmf0="dtmf0",i.Dtmf1="dtmf1",i.Dtmf2="dtmf2",i.Dtmf3="dtmf3",i.Dtmf4="dtmf4",i.Dtmf5="dtmf5",i.Dtmf6="dtmf6",i.Dtmf7="dtmf7",i.Dtmf8="dtmf8",i.Dtmf9="dtmf9",i.DtmfS="dtmfs",i.DtmfH="dtmfh"}(Ye||(Ye={}));class Ze{constructor(e,t=!1){let n;this.deleted=!1;const i=e.candidate.split("network-cost ");i[1]&&(n=parseInt(i[1],10)),this.candidateType=e.type,this.ip=e.ip||e.address,this.isRemote=t,this.networkCost=n,this.port=e.port,this.priority=e.priority,this.protocol=e.protocol,this.relatedAddress=e.relatedAddress,this.relatedPort=e.relatedPort,this.tcpType=e.tcpType,this.transportId=e.sdpMid}toPayload(){return{candidate_type:this.candidateType,deleted:this.deleted,ip:this.ip,is_remote:this.isRemote,"network-cost":this.networkCost,port:this.port,priority:this.priority,protocol:this.protocol,related_address:this.relatedAddress,related_port:this.relatedPort,tcp_type:this.tcpType,transport_id:this.transportId}}}const et=94.768;function tt(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)&&e>=0}var nt={calculate:function(e,t,n){if("number"!=typeof e||"number"!=typeof t||"number"!=typeof n||!tt(e)||!tt(t)||!tt(n))return null;const i=e+2*t+10;let r=0;switch(!0){case i<160:r=et-i/40;break;case i<1e3:r=et-(i-120)/10}return r=1==n<=r/2.5?Math.max(r-2.5*n,6.52):0,1+.035*r+7e-6*r*(r-60)*(100-r)},isNonNegativeNumber:tt};const it={audioInputLevel:{minStandardDeviation:327.67,sampleCount:10},audioOutputLevel:{minStandardDeviation:327.67,sampleCount:10},bytesReceived:{clearCount:2,min:1,raiseCount:3,sampleCount:3},bytesSent:{clearCount:2,min:1,raiseCount:3,sampleCount:3},jitter:{max:30},mos:{min:3},packetsLostFraction:[{max:1},{clearValue:1,maxAverage:3,sampleCount:7}],rtt:{max:400}};class rt extends i.EventEmitter{constructor(e){super(),this._activeWarnings=new Map,this._currentStreaks=new Map,this._inputVolumes=[],this._outputVolumes=[],this._sampleBuffer=[],this._supplementalSampleBuffers={audioInputLevel:[],audioOutputLevel:[]},this._warningsEnabled=!0,e=e||{},this._getRTCStats=e.getRTCStats||fe,this._mos=e.Mos||nt,this._peerConnection=e.peerConnection,this._thresholds=Object.assign(Object.assign({},it),e.thresholds);const t=Object.values(this._thresholds).map(e=>e.sampleCount).filter(e=>!!e);this._maxSampleCount=Math.max(5,...t),this._peerConnection&&this.enable(this._peerConnection)}addVolumes(e,t){this._inputVolumes.push(e),this._outputVolumes.push(t)}disable(){return this._sampleInterval&&(clearInterval(this._sampleInterval),delete this._sampleInterval),this}disableWarnings(){return this._warningsEnabled&&this._activeWarnings.clear(),this._warningsEnabled=!1,this}enable(e){if(e){if(this._peerConnection&&e!==this._peerConnection)throw new S("Attempted to replace an existing PeerConnection in StatsMonitor.enable");this._peerConnection=e}if(!this._peerConnection)throw new S("Can not enable StatsMonitor without a PeerConnection");return this._sampleInterval=this._sampleInterval||setInterval(this._fetchSample.bind(this),1e3),this}enableWarnings(){return this._warningsEnabled=!0,this}hasActiveWarning(e,t){const n=`${e}:${t}`;return!!this._activeWarnings.get(n)}_addSample(e){const t=this._sampleBuffer;t.push(e),t.length>this._maxSampleCount&&t.splice(0,t.length-this._maxSampleCount)}_clearWarning(e,t,n){const i=`${e}:${t}`,r=this._activeWarnings.get(i);!r||Date.now()-r.timeRaised<5e3||(this._activeWarnings.delete(i),this.emit("warning-cleared",Object.assign(Object.assign({},n),{name:e,threshold:{name:t,value:this._thresholds[e][t]}})))}_createSample(e,t){const n=t&&t.totals.bytesSent||0,i=t&&t.totals.bytesReceived||0,r=t&&t.totals.packetsSent||0,o=t&&t.totals.packetsReceived||0,s=t&&t.totals.packetsLost||0,a=e.bytesSent-n,l=e.bytesReceived-i,c=e.packetsSent-r,u=e.packetsReceived-o,d=e.packetsLost-s,h=u+d,p=h>0?d/h*100:0,f=e.packetsReceived+e.packetsLost,g=f>0?e.packetsLost/f*100:100,m="number"!=typeof e.rtt&&t?t.rtt:e.rtt,v=this._inputVolumes.splice(0);this._supplementalSampleBuffers.audioInputLevel.push(v);const y=this._outputVolumes.splice(0);return this._supplementalSampleBuffers.audioOutputLevel.push(y),{audioInputLevel:Math.round(A(v)),audioOutputLevel:Math.round(A(y)),bytesReceived:l,bytesSent:a,codecName:e.codecName,jitter:e.jitter,mos:this._mos.calculate(m,e.jitter,t&&p),packetsLost:d,packetsLostFraction:p,packetsReceived:u,packetsSent:c,rtt:m,timestamp:e.timestamp,totals:{bytesReceived:e.bytesReceived,bytesSent:e.bytesSent,packetsLost:e.packetsLost,packetsLostFraction:g,packetsReceived:e.packetsReceived,packetsSent:e.packetsSent}}}_fetchSample(){this._getSample().then(e=>{this._addSample(e),this._raiseWarnings(),this.emit("sample",e)}).catch(e=>{this.disable(),this.emit("error",e)})}_getSample(){return this._getRTCStats(this._peerConnection).then(e=>{let t=null;return this._sampleBuffer.length&&(t=this._sampleBuffer[this._sampleBuffer.length-1]),this._createSample(e,t)})}_raiseWarning(e,t,n){const i=`${e}:${t}`;if(this._activeWarnings.has(i))return;this._activeWarnings.set(i,{timeRaised:Date.now()});const r=this._thresholds[e];let o;if(Array.isArray(r)){const e=r.find(e=>t in e);e&&(o=e[t])}else o=this._thresholds[e][t];this.emit("warning",Object.assign(Object.assign({},n),{name:e,threshold:{name:t,value:o}}))}_raiseWarnings(){this._warningsEnabled&&Object.keys(this._thresholds).forEach(e=>this._raiseWarningsForStat(e))}_raiseWarningsForStat(e){(Array.isArray(this._thresholds[e])?this._thresholds[e]:[this._thresholds[e]]).forEach(t=>{const n=this._sampleBuffer,i=t.clearCount||0,r=t.raiseCount||3,o=t.sampleCount||this._maxSampleCount;let s=n.slice(-o);const a=s.map(t=>t[e]);if(a.some(e=>null==e))return;let l;if("number"==typeof t.max&&(l=function(e,t){return t.reduce((t,n)=>t+(n>e?1:0),0)}(t.max,a),l>=r?this._raiseWarning(e,"max",{values:a,samples:s}):l<=i&&this._clearWarning(e,"max",{values:a,samples:s})),"number"==typeof t.min&&(l=function(e,t){return t.reduce((t,n)=>t+(n<e?1:0),0)}(t.min,a),l>=r?this._raiseWarning(e,"min",{values:a,samples:s}):l<=i&&this._clearWarning(e,"min",{values:a,samples:s})),"number"==typeof t.maxDuration&&n.length>1){s=n.slice(-2);const i=s[0][e],r=s[1][e],o=this._currentStreaks.get(e)||0,a=i===r?o+1:0;this._currentStreaks.set(e,a),a>=t.maxDuration?this._raiseWarning(e,"maxDuration",{value:a}):0===a&&this._clearWarning(e,"maxDuration",{value:o})}if("number"==typeof t.minStandardDeviation){const n=this._supplementalSampleBuffers[e];if(!n||n.length<t.sampleCount)return;n.length>t.sampleCount&&n.splice(0,n.length-t.sampleCount);const i=function(e){if(e.length<=0)return null;const t=e.reduce((e,t)=>e+t,0)/e.length,n=e.map(e=>Math.pow(e-t,2));return Math.sqrt(n.reduce((e,t)=>e+t,0)/n.length)}(function(e){return e.reduce((e,t)=>[...e,...t],[])}(n.slice(-o)));if("number"!=typeof i)return;i<t.minStandardDeviation?this._raiseWarning(e,"minStandardDeviation",{value:i}):this._clearWarning(e,"minStandardDeviation",{value:i})}[["maxAverage",(e,t)=>e>t],["minAverage",(e,t)=>e<t]].forEach(([n,i])=>{if("number"==typeof t[n]&&a.length>=o){const r=A(a);i(r,t[n])?this._raiseWarning(e,n,{values:a,samples:s}):i(r,t.clearValue||t[n])||this._clearWarning(e,n,{values:a,samples:s})}})})}}const ot={factor:1.1,jitter:.5,max:3e4,min:1},st={disconnect:!0,info:{code:31003,message:"Connection with Twilio was interrupted.",twilioError:new m.ConnectionError}},at={packetsLostFraction:{max:"packet-loss",maxAverage:"packets-lost-fraction"}},lt={audioInputLevel:"audio-input-level",audioOutputLevel:"audio-output-level",bytesReceived:"bytes-received",bytesSent:"bytes-sent",jitter:"jitter",mos:"mos",rtt:"rtt"},ct={max:"high-",maxAverage:"high-",maxDuration:"constant-",min:"low-",minStandardDeviation:"constant-"};class ut extends i.EventEmitter{get direction(){return this._direction}get codec(){return this._codec}get connectToken(){const e=this._signalingReconnectToken,t=this.parameters&&this.parameters.CallSid?this.parameters.CallSid:void 0;if(!e||!t)return;const n=this.customParameters&&"function"==typeof this.customParameters.keys?Array.from(this.customParameters.keys()).reduce((e,t)=>(e[t]=this.customParameters.get(t),e),{}):{},i=this.parameters||{};return btoa(encodeURIComponent(JSON.stringify({customParameters:n,parameters:i,signalingReconnectToken:e})))}constructor(e,t){super(),this.parameters={},this._inputVolumeStreak=0,this._isAnswered=!1,this._isCancelled=!1,this._isRejected=!1,this._latestInputVolume=0,this._latestOutputVolume=0,this._log=new I("Call"),this._mediaStatus=ut.State.Pending,this._messages=new Map,this._metricsSamples=[],this._options={MediaHandler:Ue,MediaStream:null,enableImprovedSignalingErrorPrecision:!1,offerSdp:null,shouldPlayDisconnect:()=>!0,voiceEventSidGenerator:We},this._outputVolumeStreak=0,this._shouldSendHangup=!0,this._signalingStatus=ut.State.Pending,this._soundcache=new Map,this._status=ut.State.Pending,this._wasConnected=!1,this.toString=()=>"[Twilio.Call instance]",this._emitWarning=(e,t,n,i,r,o)=>{const s=`${e}warning${r?"-cleared":"-raised"}`;if("constant-audio-input-level"===t&&this.isMuted())return;let a=r?"info":"warning";"constant-audio-output-level"===t&&(a="info");const l={threshold:n};if(i&&(i instanceof Array?l.values=i.map(e=>"number"==typeof e?Math.round(100*e)/100:i):l.value=i),this._publisher.post(a,s,t,{data:l},this),"constant-audio-output-level"!==t){const e=r?"warning-cleared":"warning";this._log.debug(`#${e}`,t),this.emit(e,t,o&&!r?o:null)}},this._onAck=e=>{const{acktype:t,callsid:n,voiceeventsid:i}=e;this.parameters.CallSid===n?"message"===t&&this._onMessageSent(i):this._log.warn(`Received ack from a different callsid: ${n}`)},this._onAnswer=e=>{"string"==typeof e.reconnect&&(this._signalingReconnectToken=e.reconnect),this._isAnswered&&this._status!==ut.State.Reconnecting||(this._setCallSid(e),this._isAnswered=!0,this._maybeTransitionToOpen())},this._onCancel=e=>{const t=e.callsid;this.parameters.CallSid===t&&(this._isCancelled=!0,this._publisher.info("connection","cancel",null,this),this._cleanupEventListeners(),this._mediaHandler.close(),this._status=ut.State.Closed,this._log.debug("#cancel"),this.emit("cancel"),this._pstream.removeListener("cancel",this._onCancel))},this._onConnected=()=>{this._log.info("Received connected from pstream"),this._signalingReconnectToken&&this._mediaHandler.version&&this._pstream.reconnect(this._mediaHandler.version.getSDP(),this.parameters.CallSid,this._signalingReconnectToken)},this._onHangup=e=>{if(this.status()!==ut.State.Closed){if(e.callsid&&(this.parameters.CallSid||this.outboundConnectionId)){if(e.callsid!==this.parameters.CallSid&&e.callsid!==this.outboundConnectionId)return}else if(e.callsid)return;if(this._log.info("Received HANGUP from gateway"),e.error){const t=e.error.code,n=w(this._options.enableImprovedSignalingErrorPrecision,t),i=void 0!==n?new n(e.error.message):new h.ConnectionError("Error sent from gateway in HANGUP",e.error);this._log.error("Received an error from the gateway:",i),this._log.debug("#error",i),this.emit("error",i)}this._shouldSendHangup=!1,this._publisher.info("connection","disconnected-by-remote",null,this),this._disconnect(null,!0),this._cleanupEventListeners()}},this._onMediaFailure=e=>{const{ConnectionDisconnected:t,ConnectionFailed:n,IceGatheringFailed:i,LowBytes:r}=ut.MediaFailure,o=e===n||e===i;if(!j(window,window.navigator)&&e===n)return this._mediaHandler.onerror(st);if(this._mediaStatus===ut.State.Reconnecting){if(o){if(Date.now()-this._mediaReconnectStartTime>ot.max)return this._log.warn("Exceeded max ICE retries"),this._mediaHandler.onerror(st);try{this._mediaReconnectBackoff.backoff()}catch(e){if(!e.message||"Backoff in progress."!==e.message)throw e}}return}const s=this._mediaHandler.version.pc,a=s&&"disconnected"===s.iceConnectionState,l=this._monitor.hasActiveWarning("bytesSent","min")||this._monitor.hasActiveWarning("bytesReceived","min");if(e===r&&a||e===t&&l||o){const e=new m.ConnectionError("Media connection failed.");this._log.warn("ICE Connection disconnected."),this._publisher.warn("connection","error",e,this),this._publisher.info("connection","reconnecting",null,this),this._mediaReconnectStartTime=Date.now(),this._status=ut.State.Reconnecting,this._mediaStatus=ut.State.Reconnecting,this._mediaReconnectBackoff.reset(),this._mediaReconnectBackoff.backoff(),this._log.debug("#reconnecting"),this.emit("reconnecting",e)}},this._onMediaReconnected=()=>{this._mediaStatus===ut.State.Reconnecting&&(this._log.info("ICE Connection reestablished."),this._mediaStatus=ut.State.Open,this._signalingStatus===ut.State.Open&&(this._publisher.info("connection","reconnected",null,this),this._log.debug("#reconnected"),this.emit("reconnected"),this._status=ut.State.Open))},this._onMessageReceived=e=>{const{callsid:t,content:n,contenttype:i,messagetype:r,voiceeventsid:o}=e;if(this.parameters.CallSid!==t)return void this._log.warn(`Received a message from a different callsid: ${t}`);const s={content:n,contentType:i,messageType:r,voiceEventSid:o};this._publisher.info("call-message",r,{content_type:i,event_type:"received",voice_event_sid:o},this),this._log.debug("#messageReceived",JSON.stringify(s)),this.emit("messageReceived",s)},this._onMessageSent=e=>{if(!this._messages.has(e))return void this._log.warn(`Received a messageSent with a voiceEventSid that doesn't exists: ${e}`);const t=this._messages.get(e);this._messages.delete(e),this._publisher.info("call-message",null==t?void 0:t.messageType,{content_type:null==t?void 0:t.contentType,event_type:"sent",voice_event_sid:e},this),this._log.debug("#messageSent",JSON.stringify(t)),this.emit("messageSent",t)},this._onRinging=e=>{if(this._setCallSid(e),this._status!==ut.State.Connecting&&this._status!==ut.State.Ringing)return;const t=!!e.sdp;this._status=ut.State.Ringing,this._publisher.info("connection","outgoing-ringing",{hasEarlyMedia:t},this),this._log.debug("#ringing"),this.emit("ringing",t)},this._onRTCSample=e=>{const t=Object.assign(Object.assign({},e),{inputVolume:this._latestInputVolume,outputVolume:this._latestOutputVolume});this._codec=t.codecName,this._metricsSamples.push(t),this._metricsSamples.length>=10&&this._publishMetrics(),this.emit("sample",e)},this._onSignalingError=e=>{const{callsid:t,voiceeventsid:n,error:i}=e;if(this.parameters.CallSid===t){if(n&&this._messages.has(n)){let t;this._messages.delete(n),this._log.warn("Received an error while sending a message.",e),this._publisher.error("call-message","error",{code:i.code,message:i.message,voice_event_sid:n},this);const r=w(!!this._options.enableImprovedSignalingErrorPrecision,i.code);void 0!==r&&(t=new r(i)),t||(this._log.error("Unknown Call Message Error: ",i),t=new h.UnknownError(i.message,i)),this._log.debug("#error",i,t),this.emit("error",t)}}else this._log.warn(`Received an error from a different callsid: ${t}`)},this._onSignalingReconnected=()=>{this._signalingStatus===ut.State.Reconnecting&&(this._log.info("Signaling Connection reestablished."),this._signalingStatus=ut.State.Open,this._mediaStatus===ut.State.Open&&(this._publisher.info("connection","reconnected",null,this),this._log.debug("#reconnected"),this.emit("reconnected"),this._status=ut.State.Open))},this._onTransportClose=()=>{this._log.error("Received transportClose from pstream"),this._log.debug("#transportClose"),this.emit("transportClose"),this._signalingReconnectToken?(this._status=ut.State.Reconnecting,this._signalingStatus=ut.State.Reconnecting,this._publisher.info("connection","reconnecting",null,this),this._log.debug("#reconnecting"),this.emit("reconnecting",new g.ConnectionDisconnected)):(this._status=ut.State.Closed,this._signalingStatus=ut.State.Closed)},this._reemitWarning=(e,t)=>{const n=/^audio/.test(e.name)?"audio-level-":"network-quality-",i=ct[e.threshold.name];let r;e.name in at?r=at[e.name][e.threshold.name]:e.name in lt&&(r=lt[e.name]);const o=i+r;this._emitWarning(n,o,e.threshold.value,e.values||e.value,t,e)},this._reemitWarningCleared=e=>{this._reemitWarning(e,!0)},this._soundcache=e.soundcache,"function"==typeof e.onIgnore&&(this._onIgnore=e.onIgnore);const n=t&&t.twimlParams||{};this.customParameters=new Map(Object.entries(n).map(([e,t])=>[e,String(t)])),Object.assign(this._options,t),this._options.callParameters&&(this.parameters=this._options.callParameters),this._options.reconnectToken&&(this._signalingReconnectToken=this._options.reconnectToken),this._voiceEventSidGenerator=this._options.voiceEventSidGenerator||We,this._direction=this.parameters.CallSid&&!this._options.reconnectCallSid?ut.CallDirection.Incoming:ut.CallDirection.Outgoing,this.parameters?this.callerInfo=this.parameters.StirStatus?{isVerified:"TN-Validation-Passed-A"===this.parameters.StirStatus}:null:this.callerInfo=null,this._mediaReconnectBackoff=new r(ot),this._mediaReconnectBackoff.on("ready",()=>this._mediaHandler.iceRestart()),this.outboundConnectionId="TJSxxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)});const i=this._publisher=e.publisher;this._direction===ut.CallDirection.Incoming?i.info("connection","incoming",null,this):i.info("connection","outgoing",{preflight:this._options.preflight,reconnect:!!this._options.reconnectCallSid},this);const o=this._monitor=new(this._options.StatsMonitor||rt);o.on("sample",this._onRTCSample),o.disableWarnings(),setTimeout(()=>o.enableWarnings(),5e3),o.on("warning",(e,t)=>{"bytesSent"!==e.name&&"bytesReceived"!==e.name||this._onMediaFailure(ut.MediaFailure.LowBytes),this._reemitWarning(e,t)}),o.on("warning-cleared",e=>{this._reemitWarningCleared(e)}),this._mediaHandler=new this._options.MediaHandler(e.audioHelper,e.pstream,{MediaStream:this._options.MediaStream,RTCPeerConnection:this._options.RTCPeerConnection,codecPreferences:this._options.codecPreferences,dscp:this._options.dscp,forceAggressiveIceNomination:this._options.forceAggressiveIceNomination,maxAverageBitrate:this._options.maxAverageBitrate}),this.on("volume",(e,t)=>{this._inputVolumeStreak=this._checkVolume(e,this._inputVolumeStreak,this._latestInputVolume,"input"),this._outputVolumeStreak=this._checkVolume(t,this._outputVolumeStreak,this._latestOutputVolume,"output"),this._latestInputVolume=e,this._latestOutputVolume=t}),this._mediaHandler.onaudio=e=>{this._log.debug("#audio"),this.emit("audio",e)},this._mediaHandler.onvolume=(e,t,n,i)=>{o.addVolumes(n/255*32767,i/255*32767),this.emit("volume",e,t)},this._mediaHandler.ondtlstransportstatechange=e=>{const t="failed"===e?"error":"debug";this._publisher.post(t,"dtls-transport-state",e,null,this)},this._mediaHandler.onpcconnectionstatechange=e=>{let t="debug";const n=this._mediaHandler.getRTCDtlsTransport();"failed"===e&&(t=n&&"failed"===n.state?"error":"warning"),this._publisher.post(t,"pc-connection-state",e,null,this)},this._mediaHandler.onicecandidate=e=>{const t=new Ze(e).toPayload();this._publisher.debug("ice-candidate","ice-candidate",t,this)},this._mediaHandler.onselectedcandidatepairchange=e=>{const t=new Ze(e.local).toPayload(),n=new Ze(e.remote,!0).toPayload();this._publisher.debug("ice-candidate","selected-ice-candidate-pair",{local_candidate:t,remote_candidate:n},this)},this._mediaHandler.oniceconnectionstatechange=e=>{const t="failed"===e?"error":"debug";this._publisher.post(t,"ice-connection-state",e,null,this)},this._mediaHandler.onicegatheringfailure=e=>{this._publisher.warn("ice-gathering-state",e,null,this),this._onMediaFailure(ut.MediaFailure.IceGatheringFailed)},this._mediaHandler.onicegatheringstatechange=e=>{this._publisher.debug("ice-gathering-state",e,null,this)},this._mediaHandler.onsignalingstatechange=e=>{this._publisher.debug("signaling-state",e,null,this)},this._mediaHandler.ondisconnected=e=>{this._log.warn(e),this._publisher.warn("network-quality-warning-raised","ice-connectivity-lost",{message:e},this),this._log.debug("#warning","ice-connectivity-lost"),this.emit("warning","ice-connectivity-lost"),this._onMediaFailure(ut.MediaFailure.ConnectionDisconnected)},this._mediaHandler.onfailed=e=>{this._onMediaFailure(ut.MediaFailure.ConnectionFailed)},this._mediaHandler.onconnected=()=>{this._status===ut.State.Reconnecting&&this._onMediaReconnected()},this._mediaHandler.onreconnected=e=>{this._log.info(e),this._publisher.info("network-quality-warning-cleared","ice-connectivity-lost",{message:e},this),this._log.debug("#warning-cleared","ice-connectivity-lost"),this.emit("warning-cleared","ice-connectivity-lost"),this._onMediaReconnected()},this._mediaHandler.onerror=e=>{!0===e.disconnect&&this._disconnect(e.info&&e.info.message);const t=e.info.twilioError||new h.UnknownError(e.info.message);this._log.error("Received an error from MediaStream:",e),this._log.debug("#error",t),this.emit("error",t)},this._mediaHandler.onopen=()=>{this._status!==ut.State.Open&&this._status!==ut.State.Reconnecting&&(this._status===ut.State.Ringing||this._status===ut.State.Connecting?(this.mute(this._mediaHandler.isMuted),this._mediaStatus=ut.State.Open,this._maybeTransitionToOpen()):this._mediaHandler.close())},this._mediaHandler.onclose=()=>{this._status=ut.State.Closed,this._options.shouldPlayDisconnect&&this._options.shouldPlayDisconnect()&&!this._isCancelled&&!this._isRejected&&this._soundcache.get(Ye.SoundName.Disconnect).play(),o.disable(),this._publishMetrics(),this._isCancelled||this._isRejected||(this._log.debug("#disconnect"),this.emit("disconnect",this))},this._pstream=e.pstream,this._pstream.on("ack",this._onAck),this._pstream.on("cancel",this._onCancel),this._pstream.on("error",this._onSignalingError),this._pstream.on("ringing",this._onRinging),this._pstream.on("transportClose",this._onTransportClose),this._pstream.on("connected",this._onConnected),this._pstream.on("message",this._onMessageReceived),this.on("error",e=>{this._publisher.error("connection","error",{code:e.code,message:e.message},this),this._pstream&&"disconnected"===this._pstream.status&&this._cleanupEventListeners()}),this.on("disconnect",()=>{this._cleanupEventListeners()})}_setInputTracksFromStream(e){return this._mediaHandler.setInputTracksFromStream(e)}_setSinkIds(e){return this._mediaHandler._setSinkIds(e)}accept(e){if(this._log.debug(".accept",e),this._status!==ut.State.Pending)return void this._log.debug(`.accept noop. status is '${this._status}'`);const t=(e=e||{}).rtcConfiguration||this._options.rtcConfiguration,n=e.rtcConstraints||this._options.rtcConstraints||{},i={audio:void 0===n.audio||n.audio};this._status=ut.State.Connecting;const r=()=>{if(this._status!==ut.State.Connecting)return this._cleanupEventListeners(),void this._mediaHandler.close();const e=e=>{const t=this._direction===ut.CallDirection.Incoming?"accepted-by-local":"accepted-by-remote";this._publisher.info("connection",t,null,this);const{codecName:n,codecParams:i}=function(e){const[,t,n]=/a=rtpmap:(\d+) (\S+)/m.exec(e)||[null,"",""],i=new RegExp(`a=fmtp:${t} (\\S+)`,"m"),[,r]=i.exec(e)||[null,""];return{codecName:n,codecParams:r}}(this._mediaHandler.version.getSDP());this._publisher.info("settings","codec",{codec_params:i,selected_codec:n},this),this._monitor.enable(e)},n="function"==typeof this._options.getSinkIds&&this._options.getSinkIds();if(Array.isArray(n)&&this._mediaHandler._setSinkIds(n).catch(()=>{}),this._pstream.addListener("hangup",this._onHangup),this._direction===ut.CallDirection.Incoming)this._isAnswered=!0,this._pstream.on("answer",this._onAnswer),this._mediaHandler.answerIncomingCall(this.parameters.CallSid,this._options.offerSdp,t,e);else{const n=Array.from(this.customParameters.entries()).map(e=>`${encodeURIComponent(e[0])}=${encodeURIComponent(e[1])}`).join("&");this._pstream.on("answer",this._onAnswer),this._mediaHandler.makeOutgoingCall(n,this._signalingReconnectToken,this._options.reconnectCallSid||this.outboundConnectionId,t,e)}};this._options.beforeAccept&&this._options.beforeAccept(this);const o="function"==typeof this._options.getInputStream&&this._options.getInputStream();(o?this._mediaHandler.setInputTracksFromStream(o):this._mediaHandler.openDefaultDeviceWithConstraints(i)).then(()=>{this._publisher.info("get-user-media","succeeded",{data:{audioConstraints:i}},this),r()},e=>{let t;31208===e.code||-1!==["PermissionDeniedError","NotAllowedError"].indexOf(e.name)?(t=new f.PermissionDeniedError,this._publisher.error("get-user-media","denied",{data:{audioConstraints:i,error:e}},this)):(t=new f.AcquisitionFailedError,this._publisher.error("get-user-media","failed",{data:{audioConstraints:i,error:e}},this)),this._disconnect(),this._log.debug("#error",e),this.emit("error",t)})}disconnect(){this._log.debug(".disconnect"),this._disconnect()}getLocalStream(){return this._mediaHandler&&this._mediaHandler.stream}getRemoteStream(){return this._mediaHandler&&this._mediaHandler._remoteStream}ignore(){this._log.debug(".ignore"),this._status===ut.State.Pending?(this._status=ut.State.Closed,this._mediaHandler.ignore(this.parameters.CallSid),this._publisher.info("connection","ignored-by-local",null,this),this._onIgnore&&this._onIgnore()):this._log.debug(`.ignore noop. status is '${this._status}'`)}isMuted(){return this._mediaHandler.isMuted}mute(e=!0){this._log.debug(".mute",e);const t=this._mediaHandler.isMuted;this._mediaHandler.mute(e);const n=this._mediaHandler.isMuted;t!==n&&(this._publisher.info("connection",n?"muted":"unmuted",null,this),this._log.debug("#mute",n),this.emit("mute",n,this))}postFeedback(e,t){if(null==e)return this._postFeedbackDeclined();if(!Object.values(ut.FeedbackScore).includes(e))throw new S(`Feedback score must be one of: ${Object.values(ut.FeedbackScore)}`);if(null!=t&&!Object.values(ut.FeedbackIssue).includes(t))throw new S(`Feedback issue must be one of: ${Object.values(ut.FeedbackIssue)}`);return this._publisher.info("feedback","received",{issue_name:t,quality_score:e},this,!0)}reject(){this._log.debug(".reject"),this._status===ut.State.Pending?(this._isRejected=!0,this._pstream.reject(this.parameters.CallSid),this._mediaHandler.reject(this.parameters.CallSid),this._publisher.info("connection","rejected-by-local",null,this),this._cleanupEventListeners(),this._mediaHandler.close(),this._status=ut.State.Closed,this._log.debug("#reject"),this.emit("reject")):this._log.debug(`.reject noop. status is '${this._status}'`)}sendDigits(e){if(this._log.debug(".sendDigits",e),e.match(/[^0-9*#w]/))throw new S("Illegal character passed into sendDigits");const t=this._options.customSounds||{},n=[];e.split("").forEach(e=>{let t="w"!==e?`dtmf${e}`:"";"dtmf*"===t&&(t="dtmfs"),"dtmf#"===t&&(t="dtmfh"),n.push(t)});const i=()=>{const e=n.shift();e&&(this._options.dialtonePlayer&&!t[e]?this._options.dialtonePlayer.play(e):this._soundcache.get(e).play()),n.length&&setTimeout(()=>i(),200)};i();const r=this._mediaHandler.getOrCreateDTMFSender();if(r){if(!("canInsertDTMF"in r)||r.canInsertDTMF)return this._log.info("Sending digits using RTCDTMFSender"),void function e(t){if(!t.length)return;const n=t.shift();n&&n.length&&r.insertDTMF(n,160,70),setTimeout(e.bind(null,t),500)}(e.split("w"));this._log.info("RTCDTMFSender cannot insert DTMF")}if(this._log.info("Sending digits over PStream"),null!==this._pstream&&"disconnected"!==this._pstream.status)this._pstream.dtmf(this.parameters.CallSid,e);else{const e=new h.ConnectionError("Could not send DTMF: Signaling channel is disconnected");this._log.debug("#error",e),this.emit("error",e)}}sendMessage(e){this._log.debug(".sendMessage",JSON.stringify(e));const{content:t,contentType:n,messageType:i}=e;if(null==t)throw new S("`content` is empty");if("string"!=typeof i)throw new S("`messageType` must be a string.");if(0===i.length)throw new S("`messageType` must be a non-empty string.");if(null===this._pstream)throw new k("Could not send CallMessage; Signaling channel is disconnected");const r=this.parameters.CallSid;if(void 0===this.parameters.CallSid)throw new k("Could not send CallMessage; Call has no CallSid");const o=this._voiceEventSidGenerator();return this._messages.set(o,{content:t,contentType:n,messageType:i,voiceEventSid:o}),this._pstream.sendMessage(r,t,n,i,o),o}status(){return this._status}_checkVolume(e,t,n,i){const r=t>=10;let o=0;return n===e&&(o=t),o>=10?this._emitWarning("audio-level-",`constant-audio-${i}-level`,10,o,!1):r&&this._emitWarning("audio-level-",`constant-audio-${i}-level`,10,o,!0),o}_cleanupEventListeners(){const e=()=>{this._pstream&&(this._pstream.removeListener("ack",this._onAck),this._pstream.removeListener("answer",this._onAnswer),this._pstream.removeListener("cancel",this._onCancel),this._pstream.removeListener("error",this._onSignalingError),this._pstream.removeListener("hangup",this._onHangup),this._pstream.removeListener("ringing",this._onRinging),this._pstream.removeListener("transportClose",this._onTransportClose),this._pstream.removeListener("connected",this._onConnected),this._pstream.removeListener("message",this._onMessageReceived))};e(),setTimeout(e,0)}_createMetricPayload(){const e={call_sid:this.parameters.CallSid,dscp:!!this._options.dscp,sdk_version:E};return this._options.gateway&&(e.gateway=this._options.gateway),e.direction=this._direction,e}_disconnect(e,t){if(e="string"==typeof e?e:null,this._status===ut.State.Open||this._status===ut.State.Connecting||this._status===ut.State.Reconnecting||this._status===ut.State.Ringing){if(this._log.info("Disconnecting..."),null!==this._pstream&&"disconnected"!==this._pstream.status&&this._shouldSendHangup){const t=this.parameters.CallSid||this.outboundConnectionId;t&&this._pstream.hangup(t,e)}this._cleanupEventListeners(),this._mediaHandler.close(),t||this._publisher.info("connection","disconnected-by-local",null,this)}}_maybeTransitionToOpen(){this._wasConnected,this._isAnswered&&(this._onSignalingReconnected(),this._signalingStatus=ut.State.Open,this._mediaHandler&&"open"===this._mediaHandler.status&&(this._status=ut.State.Open,this._wasConnected||(this._wasConnected=!0,this._log.debug("#accept"),this.emit("accept",this))))}_postFeedbackDeclined(){return this._publisher.info("feedback","received-none",null,this,!0)}_publishMetrics(){0!==this._metricsSamples.length&&this._publisher.postMetrics("quality-metrics-samples","metrics-sample",this._metricsSamples.splice(0),this._createMetricPayload(),this).catch(e=>{this._log.warn("Unable to post metrics to Insights. Received error:",e)})}_setCallSid(e){const t=e.callsid;t&&(this.parameters.CallSid=t,this._mediaHandler.callSid=t)}}ut.toString=()=>"[Twilio.Call class]",function(e){var t,n,i,r,o,s,a;(t=e.State||(e.State={})).Closed="closed",t.Connecting="connecting",t.Open="open",t.Pending="pending",t.Reconnecting="reconnecting",t.Ringing="ringing",(n=e.FeedbackIssue||(e.FeedbackIssue={})).AudioLatency="audio-latency",n.ChoppyAudio="choppy-audio",n.DroppedCall="dropped-call",n.Echo="echo",n.NoisyCall="noisy-call",n.OneWayAudio="one-way-audio",(i=e.FeedbackScore||(e.FeedbackScore={}))[i.One=1]="One",i[i.Two=2]="Two",i[i.Three=3]="Three",i[i.Four=4]="Four",i[i.Five=5]="Five",(r=e.CallDirection||(e.CallDirection={})).Incoming="INCOMING",r.Outgoing="OUTGOING",(o=e.Codec||(e.Codec={})).Opus="opus",o.PCMU="pcmu",(s=e.IceGatheringFailureReason||(e.IceGatheringFailureReason={})).None="none",s.Timeout="timeout",(a=e.MediaFailure||(e.MediaFailure={})).ConnectionDisconnected="ConnectionDisconnected",a.ConnectionFailed="ConnectionFailed",a.IceGatheringFailed="IceGatheringFailed",a.LowBytes="LowBytes"}(ut||(ut={}));var dt=s(7810),ht=s(4140),pt=s(4922);function ft({title:e,titleId:t,...n},i){return dt.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},n),e?dt.createElement("title",{id:t},e):null,dt.createElement("path",{d:"M8.25 4.5a3.75 3.75 0 1 1 7.5 0v8.25a3.75 3.75 0 1 1-7.5 0V4.5Z"}),dt.createElement("path",{d:"M6 10.5a.75.75 0 0 1 .75.75v1.5a5.25 5.25 0 1 0 10.5 0v-1.5a.75.75 0 0 1 1.5 0v1.5a6.751 6.751 0 0 1-6 6.709v2.291h3a.75.75 0 0 1 0 1.5h-7.5a.75.75 0 0 1 0-1.5h3v-2.291a6.751 6.751 0 0 1-6-6.709v-1.5A.75.75 0 0 1 6 10.5Z"}))}var gt=dt.forwardRef(ft);function mt({title:e,titleId:t,...n},i){return dt.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},n),e?dt.createElement("title",{id:t},e):null,dt.createElement("path",{fillRule:"evenodd",d:"M15.22 3.22a.75.75 0 0 1 1.06 0L18 4.94l1.72-1.72a.75.75 0 1 1 1.06 1.06L19.06 6l1.72 1.72a.75.75 0 0 1-1.06 1.06L18 7.06l-1.72 1.72a.75.75 0 1 1-1.06-1.06L16.94 6l-1.72-1.72a.75.75 0 0 1 0-1.06ZM1.5 4.5a3 3 0 0 1 3-3h1.372c.86 0 1.61.586 1.819 1.42l1.105 4.423a1.875 1.875 0 0 1-.694 1.955l-1.293.97c-.135.101-.164.249-.126.352a11.285 11.285 0 0 0 6.697 6.697c.103.038.25.009.352-.126l.97-1.293a1.875 1.875 0 0 1 1.955-.694l4.423 1.105c.834.209 1.42.959 1.42 1.82V19.5a3 3 0 0 1-3 3h-2.25C8.552 22.5 1.5 15.448 1.5 6.75V4.5Z",clipRule:"evenodd"}))}var vt=dt.forwardRef(mt);s(3121),Object.create(null);const yt={},_t=(e,t,n,i)=>{kt(n)&&yt[n]||(kt(n)&&(yt[n]=new Date),((e,t,n,i)=>{const r=[n,{code:t,...i||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(r,"warn","react-i18next::",!0);kt(r[0])&&(r[0]=`react-i18next:: ${r[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...r):console?.warn&&console.warn(...r)})(e,t,n,i))},bt=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},wt=(e,t,n)=>{e.loadNamespaces(t,bt(e,n))},St=(e,t,n,i)=>{if(kt(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return wt(e,n,i);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,bt(e,i))},kt=e=>"string"==typeof e,Ct=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,xt={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Et=e=>xt[e];let Pt,Tt={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(Ct,Et)};const It={type:"3rdParty",init(e){((e={})=>{Tt={...Tt,...e}})(e.options.react),(e=>{Pt=e})(e)}},Ot=(0,dt.createContext)();class Rt{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Lt=(e,t,n,i)=>e.getFixedT(t,n,i),Dt=(e,t={})=>{const{i18n:n}=t,{i18n:i,defaultNS:r}=(0,dt.useContext)(Ot)||{},o=n||i||Pt;if(o&&!o.reportNamespaces&&(o.reportNamespaces=new Rt),!o){_t(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const e=(e,t)=>{return kt(t)?t:"object"==typeof(n=t)&&null!==n&&kt(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}o.options.react?.wait&&_t(o,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const s={...Tt,...o.options.react,...t},{useSuspense:a,keyPrefix:l}=s;let c=e||r||o.options?.defaultNS;c=kt(c)?[c]:c||["translation"],o.reportNamespaces.addUsedNamespaces?.(c);const u=(o.isInitialized||o.initializedStoreOnce)&&c.every(e=>((e,t,n={})=>t.languages&&t.languages.length?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,i)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!i(t.isLanguageChangingTo,e))return!1}}):(_t(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0))(e,o,s)),d=((e,t,n,i)=>(0,dt.useCallback)(Lt(e,t,n,i),[e,t,n,i]))(o,t.lng||null,"fallback"===s.nsMode?c:c[0],l),h=()=>d,p=()=>Lt(o,t.lng||null,"fallback"===s.nsMode?c:c[0],l),[f,g]=(0,dt.useState)(h);let m=c.join();t.lng&&(m=`${t.lng}${m}`);const v=((e,t)=>{const n=(0,dt.useRef)();return(0,dt.useEffect)(()=>{n.current=e},[e,t]),n.current})(m),y=(0,dt.useRef)(!0);(0,dt.useEffect)(()=>{const{bindI18n:e,bindI18nStore:n}=s;y.current=!0,u||a||(t.lng?St(o,t.lng,c,()=>{y.current&&g(p)}):wt(o,c,()=>{y.current&&g(p)})),u&&v&&v!==m&&y.current&&g(p);const i=()=>{y.current&&g(p)};return e&&o?.on(e,i),n&&o?.store.on(n,i),()=>{y.current=!1,o&&e&&e?.split(" ").forEach(e=>o.off(e,i)),n&&o&&n.split(" ").forEach(e=>o.store.off(e,i))}},[o,m]),(0,dt.useEffect)(()=>{y.current&&u&&g(h)},[o,l,u]);const _=[f,o,u];if(_.t=f,_.i18n=o,_.ready=u,u)return _;if(!u&&!a)return _;throw new Promise(e=>{t.lng?St(o,t.lng,c,()=>e()):wt(o,c,()=>e())})},At=e=>{const t="number"==typeof e?e:0,n=Number.isFinite(t)?Math.max(0,Math.floor(t)):0,i=Math.floor(n/60),r=n%60;return`${String(i).padStart(2,"0")}:${String(r).padStart(2,"0")}`},Nt=({audioLevel:e,isMuted:t=!1})=>{const n=(0,dt.useRef)(0),[i,r]=(0,dt.useState)(0);(0,dt.useEffect)(()=>{const t=5*e*.3+.7*n.current;(Math.abs(t-n.current)>.02||e<.005)&&(n.current=t,r(t))},[e]);const o=Math.min(1,Math.max(0,i)),s=i>.03;return(0,pt.jsx)("div",{className:"flex h-9 w-9 items-center justify-center gap-[2px]",children:[.4,.7,1,.7,.4].map((e,n)=>{const i=s?Math.max(.25,Math.min(.95,.25+o*e*.7)):.15;return(0,pt.jsx)("span",{className:"h-5 w-[2px] origin-center rounded-full transition-transform duration-150 "+(t?"bg-slate-400":"bg-emerald-500"),style:{transform:`scaleY(${i})`,opacity:s?.7+.3*o:.4}},n)})})},Mt=()=>(0,pt.jsx)("svg",{className:"h-[18px] w-[18px]",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,pt.jsx)("path",{d:"M20.01 15.38c-1.23 0-2.42-.2-3.53-.56-.35-.12-.74-.03-1.01.24l-1.57 1.97c-2.83-1.35-5.48-3.9-6.89-6.83l1.95-1.66c.27-.28.35-.67.24-1.02-.37-1.11-.56-2.3-.56-3.53 0-.54-.45-.99-.99-.99H4.19C3.65 3 3 3.24 3 3.99 3 13.28 10.73 21 20.01 21c.71 0 .99-.63.99-1.18v-3.45c0-.54-.45-.99-.99-.99z"})}),jt=()=>(0,pt.jsx)("svg",{className:"h-[18px] w-[18px]",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,xmlns:"http://www.w3.org/2000/svg",children:(0,pt.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),Ft=()=>(0,pt.jsxs)("div",{className:"relative h-5 w-5",children:[(0,pt.jsx)(gt,{className:"h-5 w-5"}),(0,pt.jsx)("svg",{className:"absolute inset-0 h-5 w-5",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,pt.jsx)("path",{d:"M3 3L17 17",stroke:"currentColor",strokeWidth:2.5,strokeLinecap:"round"})})]}),$t=()=>(0,pt.jsxs)("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,pt.jsx)("circle",{cx:"6",cy:"5",r:"1.5"}),(0,pt.jsx)("circle",{cx:"12",cy:"5",r:"1.5"}),(0,pt.jsx)("circle",{cx:"18",cy:"5",r:"1.5"}),(0,pt.jsx)("circle",{cx:"6",cy:"10",r:"1.5"}),(0,pt.jsx)("circle",{cx:"12",cy:"10",r:"1.5"}),(0,pt.jsx)("circle",{cx:"18",cy:"10",r:"1.5"}),(0,pt.jsx)("circle",{cx:"6",cy:"15",r:"1.5"}),(0,pt.jsx)("circle",{cx:"12",cy:"15",r:"1.5"}),(0,pt.jsx)("circle",{cx:"18",cy:"15",r:"1.5"}),(0,pt.jsx)("circle",{cx:"12",cy:"20",r:"1.5"})]}),Ut=[["1","2","3"],["4","5","6"],["7","8","9"],["*","0","#"]],zt=({onSendDigits:e})=>{const{t:t}=Dt(),[n,i]=(0,dt.useState)(null);return(0,pt.jsx)("div",{className:"grid grid-cols-3 gap-2 rounded-xl border border-slate-200/80 bg-white/90 p-3 shadow-sm backdrop-blur-md dark:border-slate-700/50 dark:bg-slate-900/80",role:"group","aria-label":t("audio_widget.dtmf.label"),children:Ut.flat().map(t=>(0,pt.jsx)("button",{type:"button",onClick:()=>(t=>{e(t),i(t),setTimeout(()=>i(null),150)})(t),className:"flex h-11 w-11 items-center justify-center rounded-lg text-base font-semibold transition-all duration-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sky-400 focus-visible:ring-offset-1 active:scale-95 "+(n===t?"bg-sky-100 text-sky-700 dark:bg-sky-500/20 dark:text-sky-300":"bg-slate-100 text-slate-700 hover:bg-slate-200 dark:bg-slate-700/50 dark:text-slate-200 dark:hover:bg-slate-700"),"aria-label":t,children:t},t))})},Ht=({onStartCall:e,onEndCall:t,onToggleMute:n,isMuted:i,onSendDigits:r,onEvent:o})=>{const{t:s}=Dt(),[a,l]=(0,dt.useState)("idle"),[c,u]=(0,dt.useState)(""),[d,h]=(0,dt.useState)(""),[p,f]=(0,dt.useState)(0),[g,m]=(0,dt.useState)(!1),[v,y]=(0,dt.useState)(!1),[_,b]=(0,dt.useState)(0),[w,S]=(0,dt.useState)(!1),[k,C]=(0,dt.useState)(!1),x=(0,dt.useRef)(null),E=(0,dt.useRef)(null),P=(0,dt.useRef)(null),T=(0,dt.useRef)(null),I=(0,dt.useRef)(null);(0,dt.useEffect)(()=>("connected"===a&&T.current?I.current=window.setInterval(()=>{T.current&&b(Math.floor((Date.now()-T.current)/1e3))},1e3):I.current&&(clearInterval(I.current),I.current=null),()=>{I.current&&clearInterval(I.current)}),[a]),(0,dt.useEffect)(()=>{const e=o("any",({state:e,message:t,data:n})=>{switch(e){case"audio-level":{const e=null!=n?n:t;let i;i="number"==typeof e?e:"string"==typeof e?parseFloat(e):Number(e),Number.isNaN(i)||f(Math.max(0,i));break}case"warning":t&&(h(t),x.current&&clearTimeout(x.current),x.current=window.setTimeout(()=>{h(""),x.current=null},5e3));break;case"warning-cleared":h(""),x.current&&(clearTimeout(x.current),x.current=null);break;case"remote-audio":E.current&&(clearTimeout(E.current),E.current=null),P.current&&(clearTimeout(P.current),P.current=null),m(!1),y(!1);break;case"error":l("error"),u(t||s("audio_widget.errors.generic")),m(!1),y(!1),b(0),T.current=null,P.current&&(clearTimeout(P.current),P.current=null),setTimeout(()=>{l("idle"),u("")},3e3)}});return()=>{e(),x.current&&clearTimeout(x.current)}},[o,s]),(0,dt.useEffect)(()=>"connected"!==a?(E.current&&(clearTimeout(E.current),E.current=null),P.current&&(clearTimeout(P.current),P.current=null),void queueMicrotask(()=>{g&&m(!1),v&&y(!1)})):p>.04?(queueMicrotask(()=>{v||y(!0),g&&m(!1)}),E.current&&(clearTimeout(E.current),E.current=null),void(P.current&&(clearTimeout(P.current),P.current=null))):void(!v||g||E.current||(E.current=window.setTimeout(()=>{m(!0),E.current=null},1400))),[p,a,v,g]),(0,dt.useEffect)(()=>()=>{E.current&&clearTimeout(E.current),P.current&&clearTimeout(P.current)},[]),(0,dt.useEffect)(()=>{g?(P.current&&clearTimeout(P.current),P.current=window.setTimeout(()=>{m(!1),y(!1),P.current=null},4e3)):P.current&&(clearTimeout(P.current),P.current=null)},[g]);const O="connecting"===a,R="error"===a?"bg-rose-50/80 text-rose-600 border border-rose-200/60 shadow-[0_2px_8px_rgba(244,63,94,0.12)] dark:bg-rose-500/15 dark:text-rose-300 dark:border-rose-500/30":"connected"===a?"bg-emerald-50/80 text-emerald-600 border border-emerald-200/60 shadow-[0_2px_8px_rgba(16,185,129,0.15)] hover:bg-gradient-to-br hover:from-red-500 hover:to-red-600 hover:text-white hover:border-red-500/20 hover:shadow-[0_6px_20px_rgba(239,68,68,0.35)] dark:bg-emerald-500/15 dark:text-emerald-300 dark:border-emerald-500/30 dark:hover:from-red-600 dark:hover:to-red-700 transition-colors":"connecting"===a?"bg-sky-50/80 text-sky-600 border border-sky-200/60 shadow-[0_2px_8px_rgba(14,165,233,0.12)] dark:bg-sky-500/15 dark:text-sky-300 dark:border-sky-500/30":"bg-gradient-to-br from-emerald-500 to-emerald-600 text-white border border-emerald-500/20 shadow-[0_4px_14px_rgba(16,185,129,0.25)] hover:shadow-[0_6px_20px_rgba(16,185,129,0.35)] dark:from-emerald-600 dark:to-emerald-700 dark:border-emerald-500/30",L="error"===a?"border-t-rose-400/60 border-r-rose-300/30 border-b-transparent border-l-transparent":g?"border-t-sky-400/60 border-r-sky-300/30 border-b-transparent border-l-transparent":"border-t-sky-500/60 border-r-sky-400/30 border-b-transparent border-l-transparent",D=s("idle"===a?"audio_widget.status.ready":"connecting"===a?"audio_widget.status.connecting":"connected"===a?g?"audio_widget.status.thinking":"audio_widget.status.on_call":"audio_widget.status.error"),A="error"===a?"text-rose-500 dark:text-rose-400":"connected"===a?"text-emerald-500 dark:text-emerald-400":"connecting"===a?"text-sky-500 dark:text-sky-400":"text-slate-500 dark:text-slate-400",N=s("idle"===a||"error"===a?"audio_widget.actions.start":"connecting"===a?"audio_widget.actions.cancel":"audio_widget.actions.end"),M="idle"===a?s("audio_widget.sr.ready"):"connecting"===a?s("audio_widget.sr.connecting"):"connected"===a?s(g?"audio_widget.sr.connected_thinking":"audio_widget.sr.connected"):c?s("audio_widget.sr.error_with_message",{message:c}):s("audio_widget.sr.error");return(0,pt.jsxs)("div",{className:"relative font-sans text-slate-800 antialiased dark:text-slate-100",children:[d&&(0,pt.jsx)("div",{className:"absolute -top-14 left-1/2 w-max max-w-[18rem] -translate-x-1/2 rounded-full bg-amber-100/90 px-4 py-2 text-xs font-medium text-amber-800 shadow-lg shadow-amber-200/70 ring-1 ring-amber-300 backdrop-blur dark:bg-amber-500/15 dark:text-amber-200 dark:ring-amber-400/40",role:"status","aria-live":"polite",children:d}),(0,pt.jsxs)("div",{className:"inline-flex min-w-[260px] items-center gap-3 rounded-2xl border border-slate-200/80 bg-white/90 px-5 py-3.5 shadow-sm backdrop-blur-md backdrop-saturate-150 transition-all duration-200 hover:shadow-md dark:border-slate-700/50 dark:bg-slate-900/80 dark:shadow-xl dark:shadow-slate-950/30",children:[(0,pt.jsxs)("button",{type:"button",onClick:()=>{"idle"!==a&&"error"!==a?(E.current&&(clearTimeout(E.current),E.current=null),I.current&&(clearInterval(I.current),I.current=null),t(),l("idle"),f(0),m(!1),y(!1),b(0),S(!1),C(!1),T.current=null,P.current&&(clearTimeout(P.current),P.current=null)):(async()=>{try{l("connecting"),u(""),f(0),m(!1),y(!1),b(0),T.current=null,await e(),l("connected"),T.current=Date.now(),b(0)}catch(e){l("error"),m(!1),y(!1),u(e instanceof Error?e.message:s("audio_widget.errors.start_failed")),b(0),T.current=null}})()},className:`group relative flex h-12 w-12 shrink-0 items-center justify-center rounded-full transition-all duration-200 hover:scale-[1.05] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sky-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white active:scale-[0.98] dark:focus-visible:ring-offset-slate-950 ${R}`,"aria-label":N,title:"error"===a&&c?c:D,children:[(0,pt.jsx)("span",{className:"sr-only",children:M}),"connected"===a?(0,pt.jsxs)(pt.Fragment,{children:[(0,pt.jsx)("div",{className:"absolute inset-0 flex items-center justify-center transition-opacity duration-200 group-hover:opacity-0",children:(0,pt.jsx)(Nt,{audioLevel:p,isMuted:w})}),(0,pt.jsx)("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 transition-opacity duration-200 group-hover:opacity-100",children:(0,pt.jsx)(vt,{className:"h-5 w-5"})})]}):"error"===a?(0,pt.jsx)(jt,{}):(0,pt.jsx)(Mt,{}),O?(0,pt.jsx)("span",{className:`pointer-events-none absolute inset-[-4px] rounded-full border border-transparent ${L} animate-spin`}):null]}),"connected"===a&&(0,pt.jsx)("button",{type:"button",onClick:()=>{n(),S(i())},className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-full transition-all duration-200 hover:scale-105 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 active:scale-95 "+(w?"bg-amber-100 text-amber-700 hover:bg-amber-200 focus-visible:ring-amber-400 dark:bg-amber-500/20 dark:text-amber-300 dark:hover:bg-amber-500/30":"bg-slate-100 text-slate-600 hover:bg-slate-200 focus-visible:ring-slate-400 dark:bg-slate-700/50 dark:text-slate-300 dark:hover:bg-slate-700"),"aria-label":s(w?"audio_widget.mute.unmute_microphone":"audio_widget.mute.mute_microphone"),title:s(w?"audio_widget.mute.unmute":"audio_widget.mute.mute"),children:w?(0,pt.jsx)(Ft,{}):(0,pt.jsx)(gt,{className:"h-5 w-5"})}),"connected"===a&&(0,pt.jsxs)("div",{className:"relative shrink-0",children:[(0,pt.jsx)("button",{type:"button",onClick:()=>C(e=>!e),className:"flex h-12 w-12 items-center justify-center rounded-full transition-all duration-200 hover:scale-105 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 active:scale-95 "+(k?"bg-sky-100 text-sky-700 hover:bg-sky-200 focus-visible:ring-sky-400 dark:bg-sky-500/20 dark:text-sky-300 dark:hover:bg-sky-500/30":"bg-slate-100 text-slate-600 hover:bg-slate-200 focus-visible:ring-slate-400 dark:bg-slate-700/50 dark:text-slate-300 dark:hover:bg-slate-700"),"aria-label":s("audio_widget.dtmf.toggle"),title:s("audio_widget.dtmf.toggle"),"aria-expanded":k,children:(0,pt.jsx)($t,{})}),k&&(0,pt.jsx)("div",{className:"absolute bottom-full left-1/2 mb-5 w-max -translate-x-1/2",children:(0,pt.jsx)(zt,{onSendDigits:r})})]}),(0,pt.jsxs)("div",{className:"relative flex flex-col gap-1 overflow-hidden leading-tight",children:[(0,pt.jsx)("span",{className:`relative z-10 text-[0.65rem] font-medium uppercase tracking-[0.25em] ${A} transition-colors duration-200`,children:D}),"connected"===a&&(0,pt.jsx)("span",{className:"animate-in fade-in slide-in-from-bottom-1 relative z-10 font-mono text-[0.8rem] text-slate-600 transition-all duration-500 dark:text-slate-400",children:At(_)})]})]})]})};var Vt;!function(e){e.AUDIO_LEVEL="audio-level",e.WARNING="warning",e.WARNING_CLEARED="warning-cleared",e.REMOTE_AUDIO="remote-audio",e.ERROR="error"}(Vt||(Vt={}));const Wt={"high-rtt":"High network latency detected","low-mos":"Poor call quality detected","high-jitter":"Network instability detected","high-packet-loss":"Packet loss detected","constant-audio-input-level":"Microphone may be muted","constant-audio-output-level":"Remote audio unchanged"};class Bt{constructor(e,t){this.analyserNode=null,this.localAudioSource=null,this.audioLevelAnimationId=null,this.audioLevelContext=null,this.onLevelUpdate=e,this.log=t}start(e){try{this.audioLevelContext=new AudioContext,this.localAudioSource=this.audioLevelContext.createMediaStreamSource(e),this.analyserNode=this.audioLevelContext.createAnalyser(),this.analyserNode.fftSize=256,this.analyserNode.smoothingTimeConstant=.3,this.localAudioSource.connect(this.analyserNode);const t=new Float32Array(this.analyserNode.fftSize),n=()=>{if(!this.analyserNode)return void this.stop();this.analyserNode.getFloatTimeDomainData(t);let e=0;for(const n of t)e+=n*n;const i=Math.sqrt(e/t.length),r=Math.min(1,10*i),o=r>.01?r:0;this.onLevelUpdate(o.toFixed(3)),this.audioLevelAnimationId=requestAnimationFrame(n)};n()}catch(e){const t=e instanceof Error?e.message:"Unknown error";this.log(`Failed to start audio level monitoring: ${t}`,e)}}stop(){if(null!==this.audioLevelAnimationId&&(cancelAnimationFrame(this.audioLevelAnimationId),this.audioLevelAnimationId=null),this.localAudioSource){try{this.localAudioSource.disconnect()}catch(e){const t=e instanceof Error?e.message:"Unknown error";this.log(`Error disconnecting audio source: ${t}`,e)}this.localAudioSource=null}this.audioLevelContext&&(this.audioLevelContext.close().catch(e=>{const t=e instanceof Error?e.message:"Unknown error";this.log(`Error closing audio level context: ${t}`,e)}),this.audioLevelContext=null),this.analyserNode=null,this.onLevelUpdate("0")}}class qt{constructor(e){this.twilioDevice=null,this.activeCall=null,this.iceServers=[],this.widgetContainer=null,this.widgetRoot=null,this.audioMonitor=null,this.eventListeners=new Map,this.config={host:e.host||"https://channels.moveo.ai",integrationId:e.integrationId},this.log=n()(`moveo:audio:controller:${e.integrationId}`)}async init(){return await this.validateIntegration(),this.createWidgetContainer(),this.renderWidget(),this.log("AudioController initialized"),this}async validateIntegration(){const e=`${this.config.host}/v1/twiliovoice/${encodeURIComponent(this.config.integrationId)}`;try{const t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}});if(t.ok)return void this.log("Integration validated using twiliovoice endpoint");if(404===t.status){this.log("Twiliovoice endpoint not found, trying legacy web endpoint");const e=`${this.config.host}/v1/web/${encodeURIComponent(this.config.integrationId)}`,t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}});if(t.ok)return void this.log("Integration validated using legacy web endpoint (backward compatibility)");if(404===t.status)throw new Error(`Integration ID "${this.config.integrationId}" was not found.`);throw new Error(`Unable to validate integration (status ${t.status} ${t.statusText}).`)}throw new Error(`Unable to validate integration (status ${t.status} ${t.statusText}).`)}catch(e){if(e instanceof Error){if(e.message.includes("Integration ID")||e.message.includes("Unable to validate"))throw e;throw new Error(`Failed to validate integration "${this.config.integrationId}": ${e.message}`)}throw new Error(`Failed to validate integration "${this.config.integrationId}": Unknown error`)}}createWidgetContainer(){this.widgetContainer=document.createElement("div"),this.widgetContainer.id="moveo-audio-widget",this.widgetContainer.style.position="fixed",this.widgetContainer.style.zIndex="2147483647",this.widgetContainer.style.bottom="20px",this.widgetContainer.style.right="20px",document.body.appendChild(this.widgetContainer)}renderWidget(){if(!this.widgetContainer)throw new Error("Widget container not created");this.widgetRoot=(0,ht.H)(this.widgetContainer),this.widgetRoot.render((0,dt.createElement)(Ht,{onStartCall:this.startCall.bind(this),onEndCall:this.endCall.bind(this),onToggleMute:this.toggleMute.bind(this),isMuted:this.isMuted.bind(this),onSendDigits:this.sendDigits.bind(this),onEvent:this.on.bind(this)}))}async getAccessToken(){try{const e=`${this.config.host}/v1/twiliovoice/${this.config.integrationId}/token`,t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}});if(!t.ok)throw new Error(`Failed to get token: ${t.status} ${t.statusText}`);const n=await t.json();if(!n.token)throw new Error("Token not found in response");return this.log("Token obtained",{identity:n.identity}),n}catch(e){throw this.handleError(e,"Token fetch failed"),e}}async initializeTwilioDevice(){try{const e=await this.getAccessToken();e.ice_servers&&(this.iceServers=e.ice_servers);const t={codecPreferences:[ut.Codec.Opus,ut.Codec.PCMU],logLevel:1};return this.twilioDevice=new Ye(e.token,t),this.setupDeviceEventListeners(),this.log("Twilio Device initialized with browser default audio settings"),this.twilioDevice}catch(e){throw this.handleError(e,"Twilio Device initialization failed"),e}}setupDeviceEventListeners(){this.twilioDevice&&(this.twilioDevice.on("error",e=>{const t=this.handleError(e,"Device error");this.emit(Vt.ERROR,t)}),this.twilioDevice.on("disconnect",e=>{var t;this.log("Call disconnected",{callSid:null===(t=null==e?void 0:e.parameters)||void 0===t?void 0:t.CallSid}),this.activeCall=null}))}setupCallEventListeners(e){e.on("accept",()=>{this.log("Call accepted");const t=e.getLocalStream();t&&(this.audioMonitor=new Bt(e=>this.emit(Vt.AUDIO_LEVEL,e,Number(e)),this.log),this.audioMonitor.start(t))}),e.on("disconnect",()=>{var e;null===(e=this.audioMonitor)||void 0===e||e.stop(),this.audioMonitor=null}),e.on("volume",(e,t)=>{t>.02&&this.emit(Vt.REMOTE_AUDIO,t.toFixed(3),t)}),e.on("error",e=>{var t;const n=this.handleError(e,"Call error");null===(t=this.audioMonitor)||void 0===t||t.stop(),this.audioMonitor=null,this.emit(Vt.ERROR,n)}),e.on("warning",(e,t)=>{this.log(`Call quality warning: ${e}`,t);const n=Wt[e]||`Call quality issue: ${e}`;this.emit(Vt.WARNING,n)}),e.on("warning-cleared",e=>{this.log(`Call quality warning cleared: ${e}`),this.emit(Vt.WARNING_CLEARED,e)})}handleError(e,t){const n=e instanceof Error?e.message:"Unknown error";return this.log(`${t}: ${n}`,e),n}emit(e,t,n){const i={state:e,message:t,data:n};this.emitEvent(e,i)}async startCall(){var e;try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(e=>e.stop()),this.twilioDevice||await this.initializeTwilioDevice();const t=await this.twilioDevice.connect({params:{integration_id:this.config.integrationId},rtcConfiguration:{iceServers:this.iceServers}});this.activeCall=t,this.setupCallEventListeners(t),this.log("Call initiated",{callSid:null===(e=t.parameters)||void 0===e?void 0:e.CallSid,status:t.status()})}catch(e){const t=this.handleError(e,"Failed to start call");throw this.emit(Vt.ERROR,t),e}}endCall(){try{this.activeCall?this.activeCall.disconnect():this.twilioDevice&&this.twilioDevice.disconnectAll()}catch(e){this.handleError(e,"Error ending call")}}toggleMute(){try{if(this.activeCall){const e=this.activeCall.isMuted();this.activeCall.mute(!e),this.log(e?"Call unmuted":"Call muted")}}catch(e){this.handleError(e,"Error toggling mute")}}isMuted(){var e,t;return null!==(t=null===(e=this.activeCall)||void 0===e?void 0:e.isMuted())&&void 0!==t&&t}sendDigits(e){this.activeCall&&(this.activeCall.sendDigits(e),this.log("DTMF sent",{digits:e}))}destroy(){var e;null===(e=this.audioMonitor)||void 0===e||e.stop(),this.audioMonitor=null,this.eventListeners.clear(),this.activeCall&&this.activeCall.disconnect(),this.twilioDevice&&(this.twilioDevice.destroy(),this.twilioDevice=null),this.widgetRoot&&(this.widgetRoot.unmount(),this.widgetRoot=null),this.widgetContainer&&(document.body.removeChild(this.widgetContainer),this.widgetContainer=null)}on(e,t){var n;const i=null!==(n=this.eventListeners.get(e))&&void 0!==n?n:new Set;return i.add(t),this.eventListeners.set(e,i),()=>this.off(e,t)}off(e,t){const n=this.eventListeners.get(e);n&&(n.delete(t),0===n.size&&this.eventListeners.delete(e))}emitEvent(e,t){const n=e=>{const n=this.eventListeners.get(e);n&&0!==n.size&&n.forEach(n=>{try{n(t)}catch(t){const n=t instanceof Error?t.message:"Unknown listener error";this.log(`Listener error for event "${e}": ${n}`,t)}})};n(e),n("any")}}const Gt=e=>"string"==typeof e,Qt=()=>{let e,t;const n=new Promise((n,i)=>{e=n,t=i});return n.resolve=e,n.reject=t,n},Kt=e=>null==e?"":""+e,Jt=/###/g,Xt=e=>e&&e.indexOf("###")>-1?e.replace(Jt,"."):e,Yt=e=>!e||Gt(e),Zt=(e,t,n)=>{const i=Gt(t)?t.split("."):t;let r=0;for(;r<i.length-1;){if(Yt(e))return{};const t=Xt(i[r]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++r}return Yt(e)?{}:{obj:e,k:Xt(i[r])}},en=(e,t,n)=>{const{obj:i,k:r}=Zt(e,t,Object);if(void 0!==i||1===t.length)return void(i[r]=n);let o=t[t.length-1],s=t.slice(0,t.length-1),a=Zt(e,s,Object);for(;void 0===a.obj&&s.length;)o=`${s[s.length-1]}.${o}`,s=s.slice(0,s.length-1),a=Zt(e,s,Object),a?.obj&&void 0!==a.obj[`${a.k}.${o}`]&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=n},tn=(e,t)=>{const{obj:n,k:i}=Zt(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,i))return n[i]},nn=(e,t,n)=>{for(const i in t)"__proto__"!==i&&"constructor"!==i&&(i in e?Gt(e[i])||e[i]instanceof String||Gt(t[i])||t[i]instanceof String?n&&(e[i]=t[i]):nn(e[i],t[i],n):e[i]=t[i]);return e},rn=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var on={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const sn=e=>Gt(e)?e.replace(/[&<>"'\/]/g,e=>on[e]):e,an=[" ",",","?","!",";"],ln=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),cn=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const i=t.split(n);let r=e;for(let e=0;e<i.length;){if(!r||"object"!=typeof r)return;let t,o="";for(let s=e;s<i.length;++s)if(s!==e&&(o+=n),o+=i[s],t=r[o],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&s<i.length-1)continue;e+=s-e+1;break}r=t}return r},un=e=>e?.replace("_","-"),dn={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class hn{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||dn,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,i){return i&&!this.debug?null:(Gt(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new hn(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new hn(this.logger,e)}}var pn=new hn;class fn{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){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let i=0;i<n;i++)e(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([n,i])=>{for(let r=0;r<i;r++)n.apply(n,[e,...t])})}}class gn extends fn{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,i={}){const r=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,o=void 0!==i.ignoreJSONStructure?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;e.indexOf(".")>-1?s=e.split("."):(s=[e,t],n&&(Array.isArray(n)?s.push(...n):Gt(n)&&r?s.push(...n.split(r)):s.push(n)));const a=tn(this.data,s);return!a&&!t&&!n&&e.indexOf(".")>-1&&(e=s[0],t=s[1],n=s.slice(2).join(".")),!a&&o&&Gt(n)?cn(this.data?.[e]?.[t],n,r):a}addResource(e,t,n,i,r={silent:!1}){const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator;let s=[e,t];n&&(s=s.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(s=e.split("."),i=t,t=s[1]),this.addNamespaces(t),en(this.data,s,i),r.silent||this.emit("added",e,t,n,i)}addResources(e,t,n,i={silent:!1}){for(const i in n)(Gt(n[i])||Array.isArray(n[i]))&&this.addResource(e,t,i,n[i],{silent:!0});i.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,i,r,o={silent:!1,skipCopy:!1}){let s=[e,t];e.indexOf(".")>-1&&(s=e.split("."),i=n,n=t,t=s[1]),this.addNamespaces(t);let a=tn(this.data,s)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?nn(a,n,r):a={...a,...n},en(this.data,s,a),o.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 mn={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,i,r){return e.forEach(e=>{t=this.processors[e]?.process(t,n,i,r)??t}),t}};const vn=Symbol("i18next/PATH_KEY");function yn(e,t){const{[vn]:n}=e(function(){const e=[],t=Object.create(null);let n;return t.get=(i,r)=>(n?.revoke?.(),r===vn?e:(e.push(r),n=Proxy.revocable(i,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}());return n.join(t?.keySeparator??".")}const _n={},bn=e=>!Gt(e)&&"boolean"!=typeof e&&"number"!=typeof e;class wn extends fn{constructor(e,t={}){var n,i;super(),n=e,i=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach(e=>{n[e]&&(i[e]=n[e])}),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=pn.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(null==e)return!1;const i=this.resolve(e,n);if(void 0===i?.res)return!1;const r=bn(i.res);return!1!==n.returnObjects||!r}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let r=t.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,s=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const i=an.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===i.length)return!0;const r=ln.getRegExp(`(${i.map(e=>"?"===e?"\\?":e).join("|")})`);let o=!r.test(e);if(!o){const t=e.indexOf(n);t>0&&!r.test(e.substring(0,t))&&(o=!0)}return o})(e,n,i));if(o&&!s){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:Gt(r)?[r]:r};const o=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(o[0])>-1)&&(r=o.shift()),e=o.join(i)}return{key:e,namespaces:Gt(r)?[r]:r}}translate(e,t,n){let i="object"==typeof t?{...t}:t;if("object"!=typeof i&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof i&&(i={...i}),i||(i={}),null==e)return"";"function"==typeof e&&(e=yn(e,{...this.options,...i})),Array.isArray(e)||(e=[String(e)]);const r=void 0!==i.returnDetails?i.returnDetails:this.options.returnDetails,o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,{key:s,namespaces:a}=this.extractFromKey(e[e.length-1],i),l=a[a.length-1];let c=void 0!==i.nsSeparator?i.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");const u=i.lng||this.language,d=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===u?.toLowerCase())return d?r?{res:`${l}${c}${s}`,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${c}${s}`:r?{res:s,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;const h=this.resolve(e,i);let p=h?.res;const f=h?.usedKey||s,g=h?.exactUsedKey||s,m=void 0!==i.joinArrays?i.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,y=void 0!==i.count&&!Gt(i.count),_=wn.hasDefaultValue(i),b=y?this.pluralResolver.getSuffix(u,i.count,i):"",w=i.ordinal&&y?this.pluralResolver.getSuffix(u,i.count,{ordinal:!1}):"",S=y&&!i.ordinal&&0===i.count,k=S&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${b}`]||i[`defaultValue${w}`]||i.defaultValue;let C=p;v&&!p&&_&&(C=k);const x=bn(C),E=Object.prototype.toString.apply(C);if(!(v&&C&&x&&["[object Number]","[object Function]","[object RegExp]"].indexOf(E)<0)||Gt(m)&&Array.isArray(C))if(v&&Gt(m)&&Array.isArray(p))p=p.join(m),p&&(p=this.extendTranslation(p,e,i,n));else{let t=!1,r=!1;!this.isValidLookup(p)&&_&&(t=!0,p=k),this.isValidLookup(p)||(r=!0,p=s);const a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&r?void 0:p,d=_&&k!==p&&this.options.updateMissing;if(r||t||d){if(this.logger.log(d?"updateKey":"missingKey",u,l,s,d?k:p),o){const e=this.resolve(s,{...i,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,i.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);const n=(e,t,n)=>{const r=_&&n!==p?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,d,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,d,i),this.emit("missingKey",e,l,t,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&y?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,i);S&&i[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||k)})}):n(e,s,k))}p=this.extendTranslation(p,e,i,h,n),r&&p===s&&this.options.appendNamespaceToMissingKey&&(p=`${l}${c}${s}`),(r||t)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${c}${s}`:s,t?p:void 0,i))}else{if(!i.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(f,C,{...i,ns:a}):`key '${s} (${this.language})' returned an object instead of string.`;return r?(h.res=e,h.usedParams=this.getUsedParamsDetails(i),h):e}if(o){const e=Array.isArray(C),t=e?[]:{},n=e?g:f;for(const e in C)if(Object.prototype.hasOwnProperty.call(C,e)){const r=`${n}${o}${e}`;t[e]=_&&!p?this.translate(r,{...i,defaultValue:bn(k)?k[e]:void 0,joinArrays:!1,ns:a}):this.translate(r,{...i,joinArrays:!1,ns:a}),t[e]===r&&(t[e]=C[e])}p=t}}return r?(h.res=p,h.usedParams=this.getUsedParamsDetails(i),h):p}extendTranslation(e,t,n,i,r){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const o=Gt(e)&&(void 0!==n?.interpolation?.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(o){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let a=n.replace&&!Gt(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),e=this.interpolator.interpolate(e,a,n.lng||this.language||i.usedLng,n),o){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(n.nest=!1)}!n.lng&&i&&i.res&&(n.lng=this.language||i.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>r?.[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 o=n.postProcess||this.options.postProcess,s=Gt(o)?[o]:o;return null!=e&&s?.length&&!1!==n.applyPostProcessor&&(e=mn.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,i,r,o,s;return Gt(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(n))return;const a=this.extractFromKey(e,t),l=a.key;i=l;let c=a.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const u=void 0!==t.count&&!Gt(t.count),d=u&&!t.ordinal&&0===t.count,h=void 0!==t.context&&(Gt(t.context)||"number"==typeof t.context)&&""!==t.context,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);c.forEach(e=>{this.isValidLookup(n)||(s=e,_n[`${p[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(s)||(_n[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${i}" for languages "${p.join(", ")}" won't get resolved as namespace "${s}" 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(i=>{if(this.isValidLookup(n))return;o=i;const s=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(s,l,i,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(i,t.count,t));const n=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&0===e.indexOf(r)&&s.push(l+e.replace(r,this.options.pluralSeparator)),s.push(l+e),d&&s.push(l+n)),h){const i=`${l}${this.options.contextSeparator||"_"}${t.context}`;s.push(i),u&&(t.ordinal&&0===e.indexOf(r)&&s.push(i+e.replace(r,this.options.pluralSeparator)),s.push(i+e),d&&s.push(i+n))}}let a;for(;a=s.pop();)this.isValidLookup(n)||(r=a,n=this.getResource(i,e,a,t))}))})}),{res:n,usedKey:i,exactUsedKey:r,usedLng:o,usedNS:s}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n,i={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,i):this.resourceStore.getResource(e,t,n,i)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!Gt(e.replace);let i=n?e.replace:e;if(n&&void 0!==e.count&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const e of t)delete i[e]}return i}static hasDefaultValue(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}class Sn{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=pn.create("languageUtils")}getScriptPartFromCode(e){if(!(e=un(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=un(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Gt(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}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 i=this.getLanguagePartFromCode(e);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(e=>e===i?e:e.indexOf("-")<0&&i.indexOf("-")<0?void 0:e.indexOf("-")>0&&i.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===i||0===e.indexOf(i)&&i.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)),Gt(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),i=[],r=e=>{e&&(this.isSupportedCode(e)?i.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return Gt(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&r(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&r(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&r(this.getLanguagePartFromCode(e))):Gt(e)&&r(this.formatLanguageCode(e)),n.forEach(e=>{i.indexOf(e)<0&&r(this.formatLanguageCode(e))}),i}}const kn={zero:0,one:1,two:2,few:3,many:4,other:5},Cn={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class xn{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=pn.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=un("dev"===e?"en":e),i=t.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:n,type:i});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];let o;try{o=new Intl.PluralRules(n,{type:i})}catch(n){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Cn;if(!e.match(/-|_/))return Cn;const i=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(i,t)}return this.pluralRulesCache[r]=o,o}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)=>kn[e]-kn[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){const i=this.getRule(e,n);return i?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const En=(e,t,n,i=".",r=!0)=>{let o=((e,t,n)=>{const i=tn(e,n);return void 0!==i?i:tn(t,n)})(e,t,n);return!o&&r&&Gt(n)&&(o=cn(e,n,i),void 0===o&&(o=cn(t,n,i))),o},Pn=e=>e.replace(/\$/g,"$$$$");class Tn{constructor(e={}){this.logger=pn.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:i,prefix:r,prefixEscaped:o,suffix:s,suffixEscaped:a,formatSeparator:l,unescapeSuffix:c,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:h,nestingSuffix:p,nestingSuffixEscaped:f,nestingOptionsSeparator:g,maxReplaces:m,alwaysFormat:v}=e.interpolation;this.escape=void 0!==t?t:sn,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==i&&i,this.prefix=r?rn(r):o||"{{",this.suffix=s?rn(s):a||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?rn(d):h||rn("$t("),this.nestingSuffix=p?rn(p):f||rn(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==v&&v,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,i){let r,o,s;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const r=En(t,a,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(r,void 0,n,{...i,...t,interpolationkey:e}):r}const r=e.split(this.formatSeparator),o=r.shift().trim(),s=r.join(this.formatSeparator).trim();return this.format(En(t,a,o,this.options.keySeparator,this.options.ignoreJSONStructure),s,n,{...i,...t,interpolationkey:o})};this.resetRegExp();const c=i?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=void 0!==i?.interpolation?.skipOnVariables?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Pn(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Pn(this.escape(e)):Pn(e)}].forEach(t=>{for(s=0;r=t.regex.exec(e);){const n=r[1].trim();if(o=l(n),void 0===o)if("function"==typeof c){const t=c(e,r,i);o=Gt(t)?t:""}else if(i&&Object.prototype.hasOwnProperty.call(i,n))o="";else{if(u){o=r[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),o=""}else Gt(o)||this.useRawValueToEscape||(o=Kt(o));const a=t.safeValue(o);if(e=e.replace(r[0],a),u?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=r[0].length):t.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,t,n={}){let i,r,o;const s=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const i=e.split(new RegExp(`${n}[ ]*{`));let r=`{${i[1]}`;e=i[0],r=this.interpolate(r,o);const s=r.match(/'/g),a=r.match(/"/g);((s?.length??0)%2==0&&!a||a.length%2!=0)&&(r=r.replace(/'/g,'"'));try{o=JSON.parse(r),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${r}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;i=this.nestingRegexp.exec(e);){let a=[];o={...n},o=o.replace&&!Gt(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const l=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(-1!==l&&(a=i[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),i[1]=i[1].slice(0,l)),r=t(s.call(this,i[1].trim(),o),o),r&&i[0]===e&&!Gt(r))return r;Gt(r)||(r=Kt(r)),r||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),r=""),a.length&&(r=a.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:i[1].trim()}),r.trim())),e=e.replace(i[0],r),this.regexp.lastIndex=0}return e}}const In=e=>{const t={};return(n,i,r)=>{let o=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(o={...o,[r.interpolationkey]:void 0});const s=i+JSON.stringify(o);let a=t[s];return a||(a=e(un(i),r),t[s]=a),a(n)}},On=e=>(t,n,i)=>e(un(n),i)(t);class Rn{constructor(e={}){this.logger=pn.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?In:On;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()]=In(t)}format(e,t,n,i={}){const r=t.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&r[0].indexOf(")")<0&&r.find(e=>e.indexOf(")")>-1)){const e=r.findIndex(e=>e.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,e)].join(this.formatSeparator)}return r.reduce((e,t)=>{const{formatName:r,formatOptions:o}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const i=e.split("(");t=i[0].toLowerCase().trim();const r=i[1].substring(0,i[1].length-1);"currency"===t&&r.indexOf(":")<0?n.currency||(n.currency=r.trim()):"relativetime"===t&&r.indexOf(":")<0?n.range||(n.range=r.trim()):r.split(";").forEach(e=>{if(e){const[t,...i]=e.split(":"),r=i.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();n[o]||(n[o]=r),"false"===r&&(n[o]=!1),"true"===r&&(n[o]=!0),isNaN(r)||(n[o]=parseInt(r,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[r]){let t=e;try{const s=i?.formatParams?.[i.interpolationkey]||{},a=s.locale||s.lng||i.locale||i.lng||n;t=this.formats[r](e,a,{...o,...i,...s})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${r}`),e},e)}}class Ln extends fn{constructor(e,t,n,i={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=pn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,i.backend,i)}queueLoad(e,t,n,i){const r={},o={},s={},a={};return e.forEach(e=>{let i=!0;t.forEach(t=>{const s=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[s]=2:this.state[s]<0||(1===this.state[s]?void 0===o[s]&&(o[s]=!0):(this.state[s]=1,i=!1,void 0===o[s]&&(o[s]=!0),void 0===r[s]&&(r[s]=!0),void 0===a[t]&&(a[t]=!0)))}),i||(s[e]=!0)}),(Object.keys(r).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(a)}}loaded(e,t,n){const i=e.split("|"),r=i[0],o=i[1];t&&this.emit("failedLoading",r,o,t),!t&&n&&this.store.addResourceBundle(r,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const s={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:i,k:r}=Zt(e,t,Object);i[r]=i[r]||[],i[r].push(n)})(n.loaded,[r],o),((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=>{s[e]||(s[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===s[e][t]&&(s[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,i=0,r=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:r,callback:o});this.readingCalls++;const s=(s,a)=>{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)}s&&a&&i<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,i+1,2*r,o)},r):o(s,a)},a=this.backend[n].bind(this.backend);if(2!==a.length)return a(e,t,s);try{const n=a(e,t);n&&"function"==typeof n.then?n.then(e=>s(null,e)).catch(s):s(null,n)}catch(e){s(e)}}prepareLoading(e,t,n={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();Gt(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Gt(t)&&(t=[t]);const r=this.queueLoad(e,t,n,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.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("|"),i=n[0],r=n[1];this.read(i,r,"read",void 0,void 0,(n,o)=>{n&&this.logger.warn(`${t}loading namespace ${r} for language ${i} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${r} for language ${i}`,o),this.loaded(e,n,o)})}saveMissing(e,t,n,i,r,o={},s=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(this.backend?.create){const a={...o,isUpdate:r},l=this.backend.create.bind(this.backend);if(l.length<6)try{let r;r=5===l.length?l(e,t,n,i,a):l(e,t,n,i),r&&"function"==typeof r.then?r.then(e=>s(null,e)).catch(s):s(null,r)}catch(e){s(e)}else l(e,t,n,i,s,a)}e&&e[0]&&this.store.addResource(e[0],t,n,i)}}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 Dn=()=>({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]),Gt(e[1])&&(t.defaultValue=e[1]),Gt(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}),An=e=>(Gt(e.ns)&&(e.ns=[e.ns]),Gt(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Gt(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),Nn=()=>{};class Mn extends fn{constructor(e={},t){var n;if(super(),this.options=An(e),this.services={},this.logger=pn,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&&(Gt(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=Dn();this.options={...n,...this.options,...An(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),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);const i=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?pn.init(i(this.modules.logger),this.options):pn.init(null,this.options),e=this.modules.formatter?this.modules.formatter:Rn;const t=new Sn(this.options);this.store=new gn(this.options.resources,this.options);const r=this.services;r.logger=pn,r.resourceStore=this.store,r.languageUtils=t,r.pluralResolver=new xn(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||(r.formatter=i(e),r.formatter.init&&r.formatter.init(r,this.options),this.options.interpolation.format=r.formatter.format.bind(r.formatter)),r.interpolator=new Tn(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},r.backendConnector=new Ln(i(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(r.languageDetector=i(this.modules.languageDetector),r.languageDetector.init&&r.languageDetector.init(r,this.options.detection,this.options)),this.modules.i18nFormat&&(r.i18nFormat=i(this.modules.i18nFormat),r.i18nFormat.init&&r.i18nFormat.init(this)),this.translator=new wn(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=Nn),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 r=Qt(),o=()=>{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),r.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?o():setTimeout(o,0),r}loadResources(e,t=Nn){let n=t;const i=Gt(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===i?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return n();const e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};i?t(i):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 i=Qt();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=Nn),this.services.backendConnector.reload(e,t,e=>{i.resolve(),n(e)}),i}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&&mn.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=Qt();this.emit("languageChanging",e);const i=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},r=(r,o)=>{o?this.isLanguageChangingTo===e&&(i(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(r,(...e)=>this.t(...e))},o=t=>{e||t||!this.services.languageDetector||(t=[]);const n=Gt(t)?t:t&&t[0],o=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(Gt(t)?[t]:t);o&&(this.language||i(o),this.translator.language||this.translator.changeLanguage(o),this.services.languageDetector?.cacheUserLanguage?.(o)),this.loadResources(o,e=>{r(e,o)})};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(o):this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),n}getFixedT(e,t,n){const i=(e,t,...r)=>{let o;o="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(r)):{...t},o.lng=o.lng||i.lng,o.lngs=o.lngs||i.lngs,o.ns=o.ns||i.ns,""!==o.keyPrefix&&(o.keyPrefix=o.keyPrefix||n||i.keyPrefix);const s=this.options.keySeparator||".";let a;return o.keyPrefix&&Array.isArray(e)?a=e.map(e=>("function"==typeof e&&(e=yn(e,{...this.options,...t})),`${o.keyPrefix}${s}${e}`)):("function"==typeof e&&(e=yn(e,{...this.options,...t})),a=o.keyPrefix?`${o.keyPrefix}${s}${e}`:e),this.t(a,o)};return Gt(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}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],i=!!this.options&&this.options.fallbackLng,r=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const o=(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,o);if(void 0!==e)return e}return!(!this.hasResourceBundle(n,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!o(n,e)||i&&!o(r,e)))}loadNamespaces(e,t){const n=Qt();return this.options.ns?(Gt(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=Qt();Gt(e)&&(e=[e]);const i=this.options.preload||[],r=e.filter(e=>i.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return r.length?(this.options.preload=i.concat(r),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(e){}const t=this.services?.languageUtils||new Sn(Dn());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){const n=new Mn(e,t);return n.createInstance=Mn.createInstance,n}cloneInstance(e={},t=Nn){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},r=new Mn(i);if(void 0===e.debug&&void 0===e.prefix||(r.logger=r.logger.clone(e)),["store","services","language"].forEach(e=>{r[e]=this[e]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},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,i)=>(n[i]={...e[t][i]},n),e[t]),e),{});r.store=new gn(e,i),r.services.resourceStore=r.store}return e.interpolation&&(r.services.interpolator=new Tn(i)),r.translator=new wn(r.services,i),r.translator.on("*",(e,...t)=>{r.emit(e,...t)}),r.init(i,t),r.translator.options=i,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const jn=Mn.createInstance(),{slice:Fn,forEach:$n}=(jn.createInstance,jn.dir,jn.init,jn.loadResources,jn.reloadResources,jn.use,jn.changeLanguage,jn.getFixedT,jn.t,jn.exists,jn.setDefaultNamespace,jn.hasLoadedNamespace,jn.loadNamespaces,jn.loadLanguages,[]),Un=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,zn={create(e,t,n,i){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+60*n*1e3)),i&&(r.domain=i),document.cookie=function(e,t){const n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"};let i=`${e}=${encodeURIComponent(t)}`;if(n.maxAge>0){const e=n.maxAge-0;if(Number.isNaN(e))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(e)}`}if(n.domain){if(!Un.test(n.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${n.domain}`}if(n.path){if(!Un.test(n.path))throw new TypeError("option path is invalid");i+=`; Path=${n.path}`}if(n.expires){if("function"!=typeof n.expires.toUTCString)throw new TypeError("option expires is invalid");i+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(i+="; HttpOnly"),n.secure&&(i+="; Secure"),n.sameSite)switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(i+="; Partitioned"),i}(e,t,r)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let e=0;e<n.length;e++){let i=n[e];for(;" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return i.substring(t.length,i.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var Hn={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&"undefined"!=typeof document)return zn.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:i,cookieDomain:r,cookieOptions:o}=t;n&&"undefined"!=typeof document&&zn.create(n,e,i,r,o)}},Vn={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 i=e.substring(1).split("&");for(let e=0;e<i.length;e++){const r=i[e].indexOf("=");r>0&&i[e].substring(0,r)===n&&(t=i[e].substring(r+1))}}return t}},Wn={name:"hash",lookup(e){let t,{lookupHash:n,lookupFromHashIndex:i}=e;if("undefined"!=typeof window){const{hash:e}=window.location;if(e&&e.length>2){const r=e.substring(1);if(n){const e=r.split("&");for(let i=0;i<e.length;i++){const r=e[i].indexOf("=");r>0&&e[i].substring(0,r)===n&&(t=e[i].substring(r+1))}}if(t)return t;if(!t&&i>-1){const t=e.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(t))return;const n="number"==typeof i?i:0;return t[n]?.replace("/","")}}}return t}};let Bn=null;const qn=()=>{if(null!==Bn)return Bn;try{if(Bn="undefined"!=typeof window&&null!==window.localStorage,!Bn)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){Bn=!1}return Bn};var Gn={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&qn())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&qn()&&window.localStorage.setItem(n,e)}};let Qn=null;const Kn=()=>{if(null!==Qn)return Qn;try{if(Qn="undefined"!=typeof window&&null!==window.sessionStorage,!Qn)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){Qn=!1}return Qn};var Jn={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Kn())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Kn()&&window.sessionStorage.setItem(n,e)}},Xn={name:"navigator",lookup(e){const t=[];if("undefined"!=typeof navigator){const{languages:e,userLanguage:n,language:i}=navigator;if(e)for(let n=0;n<e.length;n++)t.push(e[n]);n&&t.push(n),i&&t.push(i)}return t.length>0?t:void 0}},Yn={name:"htmlTag",lookup(e){let t,{htmlTag:n}=e;const i=n||("undefined"!=typeof document?document.documentElement:null);return i&&"function"==typeof i.getAttribute&&(t=i.getAttribute("lang")),t}},Zn={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 i="number"==typeof t?t:0;return n[i]?.replace("/","")}},ei={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n="number"==typeof t?t+1:1,i="undefined"!=typeof window&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(i)return i[n]}};let ti=!1;try{document.cookie,ti=!0}catch(ki){}const ni=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];ti||ni.splice(1,1);class ii{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 $n.call(Fn.call(arguments,1),t=>{if(t)for(const n in t)void 0===e[n]&&(e[n]=t[n])}),e}(t,this.options||{},{order:ni,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(Hn),this.addDetector(Vn),this.addDetector(Gn),this.addDetector(Jn),this.addDetector(Xn),this.addDetector(Yn),this.addDetector(Zn),this.addDetector(ei),this.addDetector(Wn)}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)}))}}function ri(e){return ri="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ri(e)}function oi(){return"function"==typeof XMLHttpRequest||"object"===("undefined"==typeof XMLHttpRequest?"undefined":ri(XMLHttpRequest))}function si(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function ai(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?si(Object(n),!0).forEach(function(t){li(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):si(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function li(e,t,n){return(t=function(e){var t=function(e){if("object"!=ci(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ci(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ci(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ci(e){return ci="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ci(e)}ii.type="languageDetector";var ui,di,hi="function"==typeof fetch?fetch:void 0;if(void 0!==s.g&&s.g.fetch?hi=s.g.fetch:"undefined"!=typeof window&&window.fetch&&(hi=window.fetch),oi()&&(void 0!==s.g&&s.g.XMLHttpRequest?ui=s.g.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(ui=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&(void 0!==s.g&&s.g.ActiveXObject?di=s.g.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(di=window.ActiveXObject)),"function"!=typeof hi&&(hi=void 0),!hi&&!ui&&!di)try{s.e(147).then(s.t.bind(s,1147,19)).then(function(e){hi=e.default}).catch(function(){})}catch(ki){}var pi=function(e,t){if(t&&"object"===ci(t)){var n="";for(var i in t)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t[i]);if(!n)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+n.slice(1)}return e},fi=function(e,t,n,i){var r=function(e){if(!e.ok)return n(e.statusText||"Error",{status:e.status});e.text().then(function(t){n(null,{status:e.status,data:t})}).catch(n)};if(i){var o=i(e,t);if(o instanceof Promise)return void o.then(r).catch(n)}"function"==typeof fetch?fetch(e,t).then(r).catch(n):hi(e,t).then(r).catch(n)},gi=!1,mi=function(e,t,n,i){return"function"==typeof n&&(i=n,n=void 0),i=i||function(){},hi&&0!==t.indexOf("file:")?function(e,t,n,i){e.queryStringParams&&(t=pi(t,e.queryStringParams));var r=ai({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);"undefined"==typeof window&&void 0!==s.g&&void 0!==s.g.process&&s.g.process.versions&&s.g.process.versions.node&&(r["User-Agent"]="i18next-http-backend (node/".concat(s.g.process.version,"; ").concat(s.g.process.platform," ").concat(s.g.process.arch,")")),n&&(r["Content-Type"]="application/json");var o="function"==typeof e.requestOptions?e.requestOptions(n):e.requestOptions,a=ai({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:r},gi?{}:o),l="function"==typeof e.alternateFetch&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{fi(t,a,i,l)}catch(e){if(!o||0===Object.keys(o).length||!e.message||e.message.indexOf("not implemented")<0)return i(e);try{Object.keys(o).forEach(function(e){delete a[e]}),fi(t,a,i,l),gi=!0}catch(e){i(e)}}}(e,t,n,i):oi()||"function"==typeof ActiveXObject?function(e,t,n,i){n&&"object"===ci(n)&&(n=pi("",n).slice(1)),e.queryStringParams&&(t=pi(t,e.queryStringParams));try{var r=ui?new ui:new di("MSXML2.XMLHTTP.3.0");r.open(n?"POST":"GET",t,1),e.crossDomain||r.setRequestHeader("X-Requested-With","XMLHttpRequest"),r.withCredentials=!!e.withCredentials,n&&r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.overrideMimeType&&r.overrideMimeType("application/json");var o=e.customHeaders;if(o="function"==typeof o?o():o)for(var s in o)r.setRequestHeader(s,o[s]);r.onreadystatechange=function(){r.readyState>3&&i(r.status>=400?r.statusText:null,{status:r.status,data:r.responseText})},r.send(n)}catch(e){console&&console.log(e)}}(e,t,n,i):void i(new Error("No fetch and no xhr implementation found!"))};function vi(e){return vi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vi(e)}function yi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function _i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yi(Object(n),!0).forEach(function(t){wi(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yi(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function bi(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Si(i.key),i)}}function wi(e,t,n){return(t=Si(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Si(e){var t=function(e){if("object"!=vi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=vi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==vi(t)?t:t+""}var ki,Ci,xi=(ki=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.services=t,this.options=n,this.allOptions=i,this.type="backend",this.init(t,n,i)},Ci=[{key:"init",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.services=e,this.options=_i(_i(_i({},{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,n){return wi({},t,n||"")},parseLoadPayload:function(e,t){},request:mi,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}),this.options||{}),n),this.allOptions=i,this.services&&this.options.reloadInterval){var r=setInterval(function(){return t.reload()},this.options.reloadInterval);"object"===vi(r)&&"function"==typeof r.unref&&r.unref()}}},{key:"readMulti",value:function(e,t,n){this._readAny(e,e,t,t,n)}},{key:"read",value:function(e,t,n){this._readAny([e],e,[t],t,n)}},{key:"_readAny",value:function(e,t,n,i,r){var o,s=this,a=this.options.loadPath;"function"==typeof this.options.loadPath&&(a=this.options.loadPath(e,n)),(a=function(e){return!!e&&"function"==typeof e.then}(o=a)?o:Promise.resolve(o)).then(function(o){if(!o)return r(null,{});var a=s.services.interpolator.interpolate(o,{lng:e.join("+"),ns:n.join("+")});s.loadUrl(a,r,t,i)})}},{key:"loadUrl",value:function(e,t,n,i){var r=this,o="string"==typeof n?[n]:n,s="string"==typeof i?[i]:i,a=this.options.parseLoadPayload(o,s);this.options.request(this.options,e,a,function(o,s){if(s&&(s.status>=500&&s.status<600||!s.status))return t("failed loading "+e+"; status code: "+s.status,!0);if(s&&s.status>=400&&s.status<500)return t("failed loading "+e+"; status code: "+s.status,!1);if(!s&&o&&o.message){var a=o.message.toLowerCase();if(["failed","fetch","network","load"].find(function(e){return a.indexOf(e)>-1}))return t("failed loading "+e+": "+o.message,!0)}if(o)return t(o,!1);var l,c;try{l="string"==typeof s.data?r.options.parse(s.data,n,i):s.data}catch(t){c="failed parsing "+e+" to json"}if(c)return t(c,!1);t(null,l)})}},{key:"create",value:function(e,t,n,i,r){var o=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var s=this.options.parsePayload(t,n,i),a=0,l=[],c=[];e.forEach(function(n){var i=o.options.addPath;"function"==typeof o.options.addPath&&(i=o.options.addPath(n,t));var u=o.services.interpolator.interpolate(i,{lng:n,ns:t});o.options.request(o.options,u,s,function(t,n){a+=1,l.push(t),c.push(n),a===e.length&&"function"==typeof r&&r(l,c)})})}}},{key:"reload",value:function(){var e=this,t=this.services,n=t.backendConnector,i=t.languageUtils,r=t.logger,o=n.language;if(!o||"cimode"!==o.toLowerCase()){var s=[],a=function(e){i.toResolveHierarchy(e).forEach(function(e){s.indexOf(e)<0&&s.push(e)})};a(o),this.allOptions.preload&&this.allOptions.preload.forEach(function(e){return a(e)}),s.forEach(function(t){e.allOptions.ns.forEach(function(e){n.read(t,e,"read",null,null,function(i,o){i&&r.warn("loading namespace ".concat(e," for language ").concat(t," failed"),i),!i&&o&&r.log("loaded namespace ".concat(e," for language ").concat(t),o),n.loaded("".concat(t,"|").concat(e),i,o)})})})}}}],Ci&&bi(ki.prototype,Ci),Object.defineProperty(ki,"prototype",{writable:!1}),ki);xi.type="backend";var Ei=xi;jn.use(ii).use(It).use(Ei).init({supportedLngs:Object.keys({en:"English",el:"Ελληνικά",es:"Español",pt:"Português","pt-br":"Português brasileiro",it:"Italiano",fr:"Français",da:"Dansk",de:"Deutsch",ro:"Română",bg:"Български",cs:"Čeština",pl:"Polski",id:"Bahasa Indonesia",me:"Montenegrin",nl:"Nederlands","nl-be":"Nederlands (België)",sr:"Српски",sv:"Svenska",ru:"Русский",sq:"Shqip",ar:"العربية",ja:"日本語",zh:"中文",tr:"Türkçe",tl:"Tagalog"}),load:"all",backend:{loadPath:"/public/locales/{{lng}}.json"},fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1},detection:{order:["cookie","localStorage","navigator"],lookupCookie:"moveo_web_client_language",lookupLocalStorage:"moveo_web_client_language",caches:["localStorage","cookie"]}});const Pi=n()("moveo:audio:main"),Ti=async e=>{if(Pi("MoveoAudio.init() called with config",e),!e.integrationId){const e=new Error("integrationId is required in config");throw Pi("Initialization failed: integrationId is required",e),e}Pi("Creating AudioController instance");const t=new qt(e);return Pi("Initializing AudioController"),await t.init(),Pi("MoveoAudio initialization complete"),t};var Ii=Object.assign(Ti,{init:Ti,AudioController:qt})}(),a.default}()});
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("MoveoAudio",[],t):"object"==typeof exports?exports.MoveoAudio=t():e.MoveoAudio=t()}(this,function(){return function(){var e={1364:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r}).join("")},t.i=function(e,r,n,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(n)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);n&&a[d[0]]||(void 0!==i&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=i),r&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=r):d[2]=r),o&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=o):d[4]="".concat(o)),t.push(d))}},t}},1613:function(e,t){"use strict";function r(e,t){var r=e.length;e.push(t);e:for(;0<r;){var n=r-1>>>1,o=e[n];if(!(0<i(o,t)))break e;e[n]=t,e[r]=o,r=n}}function n(e){return 0===e.length?null:e[0]}function o(e){if(0===e.length)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var n=0,o=e.length,a=o>>>1;n<a;){var s=2*(n+1)-1,l=e[s],c=s+1,d=e[c];if(0>i(l,r))c<o&&0>i(d,l)?(e[n]=d,e[c]=r,n=c):(e[n]=l,e[s]=r,n=s);else{if(!(c<o&&0>i(d,r)))break e;e[n]=d,e[c]=r,n=c}}}return t}function i(e,t){var r=e.sortIndex-t.sortIndex;return 0!==r?r:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],d=[],u=1,h=null,p=3,g=!1,A=!1,f=!1,m="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,C="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=n(d);null!==t;){if(null===t.callback)o(d);else{if(!(t.startTime<=e))break;o(d),t.sortIndex=t.expirationTime,r(c,t)}t=n(d)}}function b(e){if(f=!1,w(e),!A)if(null!==n(c))A=!0,O(y);else{var t=n(d);null!==t&&R(b,t.startTime-e)}}function y(e,r){A=!1,f&&(f=!1,v(S),S=-1),g=!0;var i=p;try{for(w(r),h=n(c);null!==h&&(!(h.expirationTime>r)||e&&!T());){var a=h.callback;if("function"==typeof a){h.callback=null,p=h.priorityLevel;var s=a(h.expirationTime<=r);r=t.unstable_now(),"function"==typeof s?h.callback=s:h===n(c)&&o(c),w(r)}else o(c);h=n(c)}if(null!==h)var l=!0;else{var u=n(d);null!==u&&R(b,u.startTime-r),l=!1}return l}finally{h=null,p=i,g=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k,x=!1,_=null,S=-1,B=5,E=-1;function T(){return!(t.unstable_now()-E<B)}function P(){if(null!==_){var e=t.unstable_now();E=e;var r=!0;try{r=_(!0,e)}finally{r?k():(x=!1,_=null)}}else x=!1}if("function"==typeof C)k=function(){C(P)};else if("undefined"!=typeof MessageChannel){var I=new MessageChannel,D=I.port2;I.port1.onmessage=P,k=function(){D.postMessage(null)}}else k=function(){m(P,0)};function O(e){_=e,x||(x=!0,k())}function R(e,r){S=m(function(){e(t.unstable_now())},r)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){A||g||(A=!0,O(y))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return n(c)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var r=p;p=t;try{return e()}finally{p=r}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=p;p=e;try{return t()}finally{p=r}},t.unstable_scheduleCallback=function(e,o,i){var a=t.unstable_now();switch(i="object"==typeof i&&null!==i&&"number"==typeof(i=i.delay)&&0<i?a+i:a,e){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 e={id:u++,callback:o,priorityLevel:e,startTime:i,expirationTime:s=i+s,sortIndex:-1},i>a?(e.sortIndex=i,r(d,e),null===n(c)&&e===n(d)&&(f?(v(S),S=-1):f=!0,R(b,i-a))):(e.sortIndex=s,r(c,e),A||g||(A=!0,O(y))),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=p;return function(){var r=p;p=t;try{return e.apply(this,arguments)}finally{p=r}}}},1931:function(e,t,r){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))}),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(4582)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},2155:function(e){"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var o=void 0!==r.layer;o&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,o&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var i=r.sourceMap;i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},2328:function(e,t,r){"use strict";e.exports=r(1613)},2483:function(e,t,r){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=r(7045)},3121:function(e){e.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}},3394:function(e,t,r){"use strict";var n=r(7810),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var n,i={},c=null,d=null;for(n in void 0!==r&&(c=""+r),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(d=t.ref),t)a.call(t,n)&&!l.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===i[n]&&(i[n]=t[n]);return{$$typeof:o,type:e,key:c,ref:d,props:i,_owner:s.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},3667:function(e,t,r){var n,o;!function(){"use strict";n=function(){var e=function(){},t="undefined",r=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"],o={},i=null;function a(e,t){var r=e[t];if("function"==typeof r.bind)return r.bind(e);try{return Function.prototype.bind.call(r,e)}catch(t){return function(){return Function.prototype.apply.apply(r,[e,arguments])}}}function s(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(){for(var r=this.getLevel(),o=0;o<n.length;o++){var i=n[o];this[i]=o<r?e:this.methodFactory(i,r,this.name)}if(this.log=this.debug,typeof console===t&&r<this.levels.SILENT)return"No console available for logging"}function c(e){return function(){typeof console!==t&&(l.call(this),this[e].apply(this,arguments))}}function d(n,o,i){return function(n){return"debug"===n&&(n="log"),typeof console!==t&&("trace"===n&&r?s:void 0!==console[n]?a(console,n):void 0!==console.log?a(console,"log"):e)}(n)||c.apply(this,arguments)}function u(e,r){var a,s,c,u=this,h="loglevel";function p(){var e;if(typeof window!==t&&h){try{e=window.localStorage[h]}catch(e){}if(typeof e===t)try{var r=window.document.cookie,n=encodeURIComponent(h),o=r.indexOf(n+"=");-1!==o&&(e=/^([^;]+)/.exec(r.slice(o+n.length+1))[1])}catch(e){}return void 0===u.levels[e]&&(e=void 0),e}}function g(e){var t=e;if("string"==typeof t&&void 0!==u.levels[t.toUpperCase()]&&(t=u.levels[t.toUpperCase()]),"number"==typeof t&&t>=0&&t<=u.levels.SILENT)return t;throw new TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?h+=":"+e:"symbol"==typeof e&&(h=void 0),u.name=e,u.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},u.methodFactory=r||d,u.getLevel=function(){return null!=c?c:null!=s?s:a},u.setLevel=function(e,r){return c=g(e),!1!==r&&function(e){var r=(n[e]||"silent").toUpperCase();if(typeof window!==t&&h){try{return void(window.localStorage[h]=r)}catch(e){}try{window.document.cookie=encodeURIComponent(h)+"="+r+";"}catch(e){}}}(c),l.call(u)},u.setDefaultLevel=function(e){s=g(e),p()||u.setLevel(e,!1)},u.resetLevel=function(){c=null,function(){if(typeof window!==t&&h){try{window.localStorage.removeItem(h)}catch(e){}try{window.document.cookie=encodeURIComponent(h)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}(),l.call(u)},u.enableAll=function(e){u.setLevel(u.levels.TRACE,e)},u.disableAll=function(e){u.setLevel(u.levels.SILENT,e)},u.rebuild=function(){if(i!==u&&(a=g(i.getLevel())),l.call(u),i===u)for(var e in o)o[e].rebuild()},a=g(i?i.getLevel():"WARN");var A=p();null!=A&&(c=g(A)),l.call(u)}(i=new u).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=o[e];return t||(t=o[e]=new u(e,i.methodFactory)),t};var h=typeof window!==t?window.log:void 0;return i.noConflict=function(){return typeof window!==t&&window.log===i&&(window.log=h),i},i.getLoggers=function(){return o},i.default=i,i},void 0===(o=n.call(t,r,t,e))||(e.exports=o)}()},4140:function(e,t,r){"use strict";var n=r(2483);t.H=n.createRoot,n.hydrateRoot},4511:function(e,t,r){"use strict";var n=r(5516),o=r.n(n),i=r(1364),a=r.n(i)()(o());a.push([e.id,"@import url(https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap);"]),a.push([e.id,'/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-green-500:oklch(72.3% .219 149.579);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-950:oklch(26.2% .051 172.552);--color-sky-50:oklch(97.7% .013 236.62);--color-sky-100:oklch(95.1% .026 236.824);--color-sky-200:oklch(90.1% .058 230.902);--color-sky-300:oklch(82.8% .111 230.318);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-500:oklch(68.5% .169 237.323);--color-sky-600:oklch(58.8% .158 241.966);--color-sky-700:oklch(50% .134 242.749);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-900:oklch(37.9% .146 265.522);--color-purple-600:oklch(55.8% .288 302.321);--color-rose-50:oklch(96.9% .015 12.422);--color-rose-200:oklch(89.2% .058 10.001);--color-rose-300:oklch(81% .117 11.638);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-600:oklch(58.6% .253 17.585);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-3xs:16rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-2xl:42rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height:calc(1.5/1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--text-5xl:3rem;--text-5xl--line-height:1;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--leading-tight:1.25;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:Inter,system-ui,-apple-system,sans-serif}}@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-\\[-4px\\]{inset:-4px}.-top-3{top:calc(var(--spacing)*-3)}.-top-14{top:calc(var(--spacing)*-14)}.-top-\\[28px\\]{top:-28px}.top-0{top:calc(var(--spacing)*0)}.top-3{top:calc(var(--spacing)*3)}.top-\\[50\\%\\]{top:50%}.-right-0\\.5{right:calc(var(--spacing)*-.5)}.-right-2{right:calc(var(--spacing)*-2)}.right-0{right:calc(var(--spacing)*0)}.right-3{right:calc(var(--spacing)*3)}.right-4{right:calc(var(--spacing)*4)}.right-auto{right:auto}.-bottom-3{bottom:calc(var(--spacing)*-3)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-1{bottom:calc(var(--spacing)*1)}.bottom-2{bottom:calc(var(--spacing)*2)}.bottom-3{bottom:calc(var(--spacing)*3)}.bottom-16{bottom:calc(var(--spacing)*16)}.bottom-30{bottom:calc(var(--spacing)*30)}.bottom-40{bottom:calc(var(--spacing)*40)}.bottom-\\[calc\\(100\\%\\+40px\\)\\]{bottom:calc(100% + 40px)}.bottom-full{bottom:100%}.-left-2{left:calc(var(--spacing)*-2)}.left-0{left:calc(var(--spacing)*0)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.left-4{left:calc(var(--spacing)*4)}.left-\\[50\\%\\]{left:50%}.z-0{z-index:0}.z-1{z-index:1}.z-10{z-index:10}.z-50{z-index:50}.z-1100{z-index:1100}.clear-both{clear:both}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.m-0{margin:calc(var(--spacing)*0)}.m-2{margin:calc(var(--spacing)*2)}.-mx-1{margin-inline:calc(var(--spacing)*-1)}.mx-3{margin-inline:calc(var(--spacing)*3)}.mx-5{margin-inline:calc(var(--spacing)*5)}.mx-8{margin-inline:calc(var(--spacing)*8)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing)*1)}.-mt-4{margin-top:calc(var(--spacing)*-4)}.mt-0{margin-top:calc(var(--spacing)*0)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-6{margin-top:calc(var(--spacing)*6)}.mt-8{margin-top:calc(var(--spacing)*8)}.mt-\\[var\\(--moveo-new-header-height\\)\\]{margin-top:var(--moveo-new-header-height)}.mt-auto{margin-top:auto}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-auto{margin-right:auto}.mb-0{margin-bottom:calc(var(--spacing)*0)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-20{margin-bottom:calc(var(--spacing)*20)}.-ml-1{margin-left:calc(var(--spacing)*-1)}.-ml-4{margin-left:calc(var(--spacing)*-4)}.ml-0{margin-left:calc(var(--spacing)*0)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-5{margin-left:calc(var(--spacing)*5)}.ml-6{margin-left:calc(var(--spacing)*6)}.ml-auto{margin-left:auto}.box-border{box-sizing:border-box}.box-content{box-sizing:content-box}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.size-3\\.5{width:calc(var(--spacing)*3.5);height:calc(var(--spacing)*3.5)}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-8{width:calc(var(--spacing)*8);height:calc(var(--spacing)*8)}.size-full{width:100%;height:100%}.h-\\(--moveo-chat-height\\){height:var(--moveo-chat-height)}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2\\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-11{height:calc(var(--spacing)*11)}.h-12{height:calc(var(--spacing)*12)}.h-14{height:calc(var(--spacing)*14)}.h-40{height:calc(var(--spacing)*40)}.h-45{height:calc(var(--spacing)*45)}.h-96{height:calc(var(--spacing)*96)}.h-\\[18px\\]{height:18px}.h-\\[28px\\]{height:28px}.h-\\[42px\\]{height:42px}.h-\\[44px\\]{height:44px}.h-\\[72px\\]{height:72px}.h-\\[78vh\\]{height:78vh}.h-\\[82px\\]{height:82px}.h-\\[222px\\]{height:222px}.h-\\[254px\\]{height:254px}.h-\\[282px\\]{height:282px}.h-\\[386px\\]{height:386px}.h-\\[calc\\(100\\%-44px\\)\\]{height:calc(100% - 44px)}.h-\\[var\\(--moveo-chat-height\\)\\]{height:var(--moveo-chat-height)}.h-\\[var\\(--moveo-modal-tall-height\\)\\]{height:var(--moveo-modal-tall-height)}.h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-px{height:1px}.max-h-\\(--radix-select-content-available-height\\){max-height:var(--radix-select-content-available-height)}.max-h-18{max-height:calc(var(--spacing)*18)}.max-h-40{max-height:calc(var(--spacing)*40)}.max-h-50{max-height:calc(var(--spacing)*50)}.max-h-\\[88px\\]{max-height:88px}.max-h-\\[400px\\]{max-height:400px}.max-h-\\[calc\\(100\\%-68px\\)\\]{max-height:calc(100% - 68px)}.max-h-\\[calc\\(100vh-16px\\)\\]{max-height:calc(100vh - 16px)}.max-h-\\[calc\\(100vh-80px\\)\\]{max-height:calc(100vh - 80px)}.max-h-full{max-height:100%}.max-h-screen{max-height:100vh}.min-h-8{min-height:calc(var(--spacing)*8)}.min-h-24{min-height:calc(var(--spacing)*24)}.min-h-\\[calc\\(100\\%-44px\\)\\]{min-height:calc(100% - 44px)}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-\\(--moveo-expanded-chat-width\\){width:var(--moveo-expanded-chat-width)}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2\\.5{width:calc(var(--spacing)*2.5)}.w-3{width:calc(var(--spacing)*3)}.w-3xs{width:var(--container-3xs)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-11{width:calc(var(--spacing)*11)}.w-12{width:calc(var(--spacing)*12)}.w-32{width:calc(var(--spacing)*32)}.w-72{width:calc(var(--spacing)*72)}.w-\\[2px\\]{width:2px}.w-\\[18px\\]{width:18px}.w-\\[28px\\]{width:28px}.w-\\[42px\\]{width:42px}.w-\\[328px\\]{width:328px}.w-\\[calc\\(100\\%\\+48px\\)\\]{width:calc(100% + 48px)}.w-\\[calc\\(100\\%-24px\\)\\]{width:calc(100% - 24px)}.w-\\[calc\\(100\\%-40px\\)\\]{width:calc(100% - 40px)}.w-\\[var\\(--moveo-chat-width\\)\\]{width:var(--moveo-chat-width)}.w-\\[var\\(--moveo-expanded-chat-width\\)\\]{width:var(--moveo-expanded-chat-width)}.w-\\[var\\(--moveo-modal-tall-width\\)\\]{width:var(--moveo-modal-tall-width)}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-sm{width:var(--container-sm)}.w-xs{width:var(--container-xs)}.max-w-2xl{max-width:var(--container-2xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-18{max-width:calc(var(--spacing)*18)}.max-w-\\[18rem\\]{max-width:18rem}.max-w-\\[200px\\]{max-width:200px}.max-w-fit{max-width:-moz-fit-content;max-width:fit-content}.max-w-full{max-width:100%}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-7{min-width:calc(var(--spacing)*7)}.min-w-20{min-width:calc(var(--spacing)*20)}.min-w-24{min-width:calc(var(--spacing)*24)}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[156px\\]{min-width:156px}.min-w-\\[260px\\]{min-width:260px}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.min-w-auto{min-width:auto}.min-w-fit{min-width:-moz-fit-content;min-width:fit-content}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-\\[130px\\]{flex-basis:130px}.basis-\\[336px\\]{flex-basis:336px}.basis-\\[400px\\]{flex-basis:400px}.basis-full{flex-basis:100%}.origin-\\(--radix-popover-content-transform-origin\\){transform-origin:var(--radix-popover-content-transform-origin)}.origin-\\(--radix-select-content-transform-origin\\){transform-origin:var(--radix-select-content-transform-origin)}.origin-center{transform-origin:50%}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1/2*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-6{--tw-translate-x:calc(var(--spacing)*-6);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-12{--tw-translate-x:calc(var(--spacing)*-12);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-6{--tw-translate-x:calc(var(--spacing)*6);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-\\[-50\\%\\]{--tw-translate-x:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-0\\.5{--tw-translate-y:calc(var(--spacing)*-.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-2{--tw-translate-y:calc(var(--spacing)*2);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-4{--tw-translate-y:calc(var(--spacing)*4);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\\[-50\\%\\]{--tw-translate-y:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-\\[fadeIn_0\\.3s_forwards\\]{animation:.3s forwards fadeIn}.animate-\\[slide-in-up_0\\.2s_ease-out\\]{animation:.2s ease-out slide-in-up}.animate-\\[typing_1\\.2s_ease-in-out_infinite\\]{animation:1.2s ease-in-out infinite typing}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize{resize:both}.scroll-my-1{scroll-margin-block:calc(var(--spacing)*1)}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-\\[36px_16px_36px\\]{grid-template-columns:36px 16px 36px}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:calc(var(--spacing)*0)}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-12{gap:calc(var(--spacing)*12)}.gap-\\[2px\\]{gap:2px}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\(--moveo-border-radius-base\\){border-radius:var(--moveo-border-radius-base)}.rounded-\\(--moveo-new-border-radius-base\\){border-radius:var(--moveo-new-border-radius-base)}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-\\[var\\(--moveo-border-radius-base\\)\\]{border-radius:var(--moveo-border-radius-base)}.rounded-\\[var\\(--moveo-new-border-radius-base\\)\\]{border-radius:var(--moveo-new-border-radius-base)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-none{border-radius:0}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t-xl{border-top-left-radius:var(--radius-xl);border-top-right-radius:var(--radius-xl)}.rounded-l-lg{border-top-left-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.rounded-r-lg{border-top-right-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-none{--tw-border-style:none;border-style:none}.border-emerald-200\\/60{border-color:#a4f4cf99}@supports (color:color-mix(in lab, red, red)){.border-emerald-200\\/60{border-color:color-mix(in oklab,var(--color-emerald-200)60%,transparent)}}.border-emerald-500\\/20{border-color:#00bb7f33}@supports (color:color-mix(in lab, red, red)){.border-emerald-500\\/20{border-color:color-mix(in oklab,var(--color-emerald-500)20%,transparent)}}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-700{border-color:var(--color-gray-700)}.border-rose-200\\/60{border-color:#ffccd399}@supports (color:color-mix(in lab, red, red)){.border-rose-200\\/60{border-color:color-mix(in oklab,var(--color-rose-200)60%,transparent)}}.border-sky-200\\/60{border-color:#b8e6fe99}@supports (color:color-mix(in lab, red, red)){.border-sky-200\\/60{border-color:color-mix(in oklab,var(--color-sky-200)60%,transparent)}}.border-slate-200\\/80{border-color:#e2e8f0cc}@supports (color:color-mix(in lab, red, red)){.border-slate-200\\/80{border-color:color-mix(in oklab,var(--color-slate-200)80%,transparent)}}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.border-t-rose-400\\/60{border-top-color:#ff667f99}@supports (color:color-mix(in lab, red, red)){.border-t-rose-400\\/60{border-top-color:color-mix(in oklab,var(--color-rose-400)60%,transparent)}}.border-t-sky-400\\/60{border-top-color:#00bcfe99}@supports (color:color-mix(in lab, red, red)){.border-t-sky-400\\/60{border-top-color:color-mix(in oklab,var(--color-sky-400)60%,transparent)}}.border-t-sky-500\\/60{border-top-color:#00a5ef99}@supports (color:color-mix(in lab, red, red)){.border-t-sky-500\\/60{border-top-color:color-mix(in oklab,var(--color-sky-500)60%,transparent)}}.border-t-transparent{border-top-color:#0000}.border-r-rose-300\\/30{border-right-color:#ffa2ae4d}@supports (color:color-mix(in lab, red, red)){.border-r-rose-300\\/30{border-right-color:color-mix(in oklab,var(--color-rose-300)30%,transparent)}}.border-r-sky-300\\/30{border-right-color:#77d4ff4d}@supports (color:color-mix(in lab, red, red)){.border-r-sky-300\\/30{border-right-color:color-mix(in oklab,var(--color-sky-300)30%,transparent)}}.border-r-sky-400\\/30{border-right-color:#00bcfe4d}@supports (color:color-mix(in lab, red, red)){.border-r-sky-400\\/30{border-right-color:color-mix(in oklab,var(--color-sky-400)30%,transparent)}}.border-b-transparent{border-bottom-color:#0000}.border-l-transparent{border-left-color:#0000}.bg-\\(--color-launcher-background\\,var\\(--color-accent\\)\\){background-color:var(--color-launcher-background,var(--color-accent))}.bg-\\(--color-opening-message-background\\,var\\(--color-accent\\)\\){background-color:var(--color-opening-message-background,var(--color-accent))}.bg-\\[var\\(--background\\)\\]{background-color:var(--background)}.bg-\\[var\\(--moveo-header-background\\)\\]{background-color:var(--moveo-header-background)}.bg-\\[var\\(--moveo-header-background\\,var\\(--color-accent\\)\\)\\]{background-color:var(--moveo-header-background,var(--color-accent))}.bg-\\[var\\(--nbg-bg\\)\\]{background-color:var(--nbg-bg)}.bg-\\[var\\(--text-03\\)\\]{background-color:var(--text-03)}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-100\\/90{background-color:#fef3c6e6}@supports (color:color-mix(in lab, red, red)){.bg-amber-100\\/90{background-color:color-mix(in oklab,var(--color-amber-100)90%,transparent)}}.bg-black{background-color:var(--color-black)}.bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab, red, red)){.bg-black\\/40{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-emerald-50\\/80{background-color:#ecfdf5cc}@supports (color:color-mix(in lab, red, red)){.bg-emerald-50\\/80{background-color:color-mix(in oklab,var(--color-emerald-50)80%,transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-green-500{background-color:var(--color-green-500)}.bg-red-500{background-color:var(--color-red-500)}.bg-rose-50\\/80{background-color:#fff1f2cc}@supports (color:color-mix(in lab, red, red)){.bg-rose-50\\/80{background-color:color-mix(in oklab,var(--color-rose-50)80%,transparent)}}.bg-sky-50\\/80{background-color:#f0f9ffcc}@supports (color:color-mix(in lab, red, red)){.bg-sky-50\\/80{background-color:color-mix(in oklab,var(--color-sky-50)80%,transparent)}}.bg-sky-100{background-color:var(--color-sky-100)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-400{background-color:var(--color-slate-400)}.bg-transparent{background-color:#0000}.bg-white\\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab, red, red)){.bg-white\\/90{background-color:color-mix(in oklab,var(--color-white)90%,transparent)}}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-emerald-500{--tw-gradient-from:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-emerald-600{--tw-gradient-to:var(--color-emerald-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-white{--tw-gradient-to:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.bg-contain{background-size:contain}.bg-right{background-position:100%}.bg-no-repeat{background-repeat:no-repeat}.fill-\\(--color-launcher-background\\,var\\(--color-accent\\)\\){fill:var(--color-launcher-background,var(--color-accent))}.fill-\\(--color-launcher-foreground\\,var\\(--color-background\\)\\){fill:var(--color-launcher-foreground,var(--color-background))}.stroke-\\(--color-launcher-foreground\\,var\\(--color-background\\)\\){stroke:var(--color-launcher-foreground,var(--color-background))}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:calc(var(--spacing)*0)}.p-0\\.5{padding:calc(var(--spacing)*.5)}.p-1{padding:calc(var(--spacing)*1)}.p-1\\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.p-px{padding:1px}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-3\\.5{padding-block:calc(var(--spacing)*3.5)}.py-16{padding-block:calc(var(--spacing)*16)}.pt-1\\.5{padding-top:calc(var(--spacing)*1.5)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-\\[var\\(--moveo-new-header-height\\)\\]{padding-top:var(--moveo-new-header-height)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-4{padding-right:calc(var(--spacing)*4)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pb-10{padding-bottom:calc(var(--spacing)*10)}.pb-14{padding-bottom:calc(var(--spacing)*14)}.pb-\\[40px\\]{padding-bottom:40px}.pl-0{padding-left:calc(var(--spacing)*0)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-2{padding-left:calc(var(--spacing)*2)}.pl-3{padding-left:calc(var(--spacing)*3)}.pl-4{padding-left:calc(var(--spacing)*4)}.pl-8{padding-left:calc(var(--spacing)*8)}.text-center{text-align:center}.text-left{text-align:left}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:Inter,system-ui,-apple-system,sans-serif}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[0\\.8rem\\]{font-size:.8rem}.text-\\[0\\.65rem\\]{font-size:.65rem}.leading-4{--tw-leading:calc(var(--spacing)*4);line-height:calc(var(--spacing)*4)}.leading-5{--tw-leading:calc(var(--spacing)*5);line-height:calc(var(--spacing)*5)}.leading-6{--tw-leading:calc(var(--spacing)*6);line-height:calc(var(--spacing)*6)}.leading-7{--tw-leading:calc(var(--spacing)*7);line-height:calc(var(--spacing)*7)}.leading-8{--tw-leading:calc(var(--spacing)*8);line-height:calc(var(--spacing)*8)}.leading-none{--tw-leading:1;line-height:1}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[0\\.25em\\]{--tw-tracking:.25em;letter-spacing:.25em}.text-wrap{text-wrap:wrap}.break-words,.wrap-break-word{overflow-wrap:break-word}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.text-\\(--color-launcher-foreground\\,var\\(--color-background\\)\\){color:var(--color-launcher-foreground,var(--color-background))}.text-\\(--color-opening-message-foreground\\,var\\(--color-text-primary-foreground\\)\\){color:var(--color-opening-message-foreground,var(--color-text-primary-foreground))}.text-\\[var\\(--moveo-header-text-color\\,var\\(--color-accent\\)\\)\\]{color:var(--moveo-header-text-color,var(--color-accent))}.text-\\[var\\(--moveo-header-text-color\\,var\\(--color-element-primary-foreground\\)\\)\\]{color:var(--moveo-header-text-color,var(--color-element-primary-foreground))}.text-\\[var\\(--moveo-header-text-color\\,var\\(--color-foreground\\)\\)\\]{color:var(--moveo-header-text-color,var(--color-foreground))}.text-\\[var\\(--moveo-header-text-color\\,var\\(--color-text-primary-foreground\\)\\)\\]{color:var(--moveo-header-text-color,var(--color-text-primary-foreground))}.text-\\[var\\(--moveo-header-text-color\\,white\\)\\]{color:var(--moveo-header-text-color,white)}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-amber-800{color:var(--color-amber-800)}.text-current{color:currentColor}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-gray-600{color:var(--color-gray-600)}.text-gray-800{color:var(--color-gray-800)}.text-rose-500{color:var(--color-rose-500)}.text-rose-600{color:var(--color-rose-600)}.text-sky-500{color:var(--color-sky-500)}.text-sky-600{color:var(--color-sky-600)}.text-sky-700{color:var(--color-sky-700)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.no-underline{text-decoration-line:none}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow-\\[0_2px_8px_rgba\\(0\\,0\\,0\\,0\\.15\\)\\]{--tw-shadow:0 2px 8px var(--tw-shadow-color,#00000026);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_2px_8px_rgba\\(14\\,165\\,233\\,0\\.12\\)\\]{--tw-shadow:0 2px 8px var(--tw-shadow-color,#0ea5e91f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_2px_8px_rgba\\(16\\,185\\,129\\,0\\.15\\)\\]{--tw-shadow:0 2px 8px var(--tw-shadow-color,#10b98126);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_2px_8px_rgba\\(244\\,63\\,94\\,0\\.12\\)\\]{--tw-shadow:0 2px 8px var(--tw-shadow-color,#f43f5e1f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_4px_14px_rgba\\(16\\,185\\,129\\,0\\.25\\)\\]{--tw-shadow:0 4px 14px var(--tw-shadow-color,#10b98140);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[var\\(--moveo-shadow-bubble\\)\\]{--tw-shadow:var(--moveo-shadow-bubble);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-amber-200\\/70{--tw-shadow-color:#fee685b3}@supports (color:color-mix(in lab, red, red)){.shadow-amber-200\\/70{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-amber-200)70%,transparent)var(--tw-shadow-alpha),transparent)}}.ring-amber-300{--tw-ring-color:var(--color-amber-300)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[20px\\]{--tw-backdrop-blur:blur(20px);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-saturate-150{--tw-backdrop-saturate:saturate(150%);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[color\\,box-shadow\\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[width\\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-none{transition-property:none}.delay-500{transition-delay:.5s}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-250{--tw-duration:.25s;transition-duration:.25s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-2000{--tw-duration:2s;transition-duration:2s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.will-change-transform{will-change:transform}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.\\[-ms-overflow-style\\:none\\]{-ms-overflow-style:none}.\\[animation-delay\\:0\\.2s\\]{animation-delay:.2s}.\\[animation-delay\\:0\\.4s\\]{animation-delay:.4s}.\\[animation-delay\\:0s\\]{animation-delay:0s}.\\[animation-fill-mode\\:forwards\\]{animation-fill-mode:forwards}.\\[scrollbar-width\\:none\\]{scrollbar-width:none}@media (hover:hover){.group-hover\\:opacity-0:is(:where(.group):hover *){opacity:0}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.file\\:inline-flex::file-selector-button{display:inline-flex}.file\\:h-7::file-selector-button{height:calc(var(--spacing)*7)}.file\\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\\:bg-transparent::file-selector-button{background-color:#0000}.file\\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}@media (hover:hover){.hover\\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\\:scale-\\[1\\.05\\]:hover{scale:1.05}.hover\\:border-red-500\\/20:hover{border-color:#fb2c3633}@supports (color:color-mix(in lab, red, red)){.hover\\:border-red-500\\/20:hover{border-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.hover\\:bg-amber-200:hover{background-color:var(--color-amber-200)}.hover\\:bg-gray-700\\/50:hover{background-color:#36415380}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-gray-700\\/50:hover{background-color:color-mix(in oklab,var(--color-gray-700)50%,transparent)}}.hover\\:bg-sky-200:hover{background-color:var(--color-sky-200)}.hover\\:bg-slate-200:hover{background-color:var(--color-slate-200)}.hover\\:bg-white\\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-white\\/10:hover{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.hover\\:bg-gradient-to-br:hover{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.hover\\:from-red-500:hover{--tw-gradient-from:var(--color-red-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hover\\:to-red-600:hover{--tw-gradient-to:var(--color-red-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hover\\:text-\\[var\\(--color-accent\\)\\]:hover{color:var(--color-accent)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:shadow-\\[0_6px_20px_rgba\\(16\\,185\\,129\\,0\\.35\\)\\]:hover{--tw-shadow:0 6px 20px var(--tw-shadow-color,#10b98159);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\\:shadow-\\[0_6px_20px_rgba\\(239\\,68\\,68\\,0\\.35\\)\\]:hover{--tw-shadow:0 6px 20px var(--tw-shadow-color,#ef444459);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\\:shadow-sm:hover{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\\:brightness-\\[0\\.92\\]:hover{--tw-brightness:brightness(.92);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.hover\\:backdrop-blur-sm:hover{--tw-backdrop-blur:blur(var(--blur-sm));backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-\\[3px\\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-amber-400:focus-visible{--tw-ring-color:var(--color-amber-400)}.focus-visible\\:ring-sky-400:focus-visible{--tw-ring-color:var(--color-sky-400)}.focus-visible\\:ring-slate-400:focus-visible{--tw-ring-color:var(--color-slate-400)}.focus-visible\\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\\:ring-offset-white:focus-visible{--tw-ring-offset-color:var(--color-white)}.focus-visible\\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.active\\:scale-\\[0\\.98\\]:active{scale:.98}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[placeholder\\]\\:text-sm[data-placeholder]{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.data-\\[placeholder\\]\\:leading-5[data-placeholder]{--tw-leading:calc(var(--spacing)*5);line-height:calc(var(--spacing)*5)}.data-\\[placeholder\\]\\:font-normal[data-placeholder]{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1>*)[data-slot=select-value]{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:flex>*)[data-slot=select-value]{display:flex}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:items-center>*)[data-slot=select-value]{align-items:center}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:gap-2>*)[data-slot=select-value]{gap:calc(var(--spacing)*2)}@media (min-width:40rem){.sm\\:block{display:block}.sm\\:flex-row{flex-direction:row}.sm\\:justify-end{justify-content:flex-end}.sm\\:text-left{text-align:left}.sm\\:text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.sm\\:text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}}@media (min-width:48rem){.md\\:flex-row{flex-direction:row}.md\\:items-center{align-items:center}.md\\:px-12{padding-inline:calc(var(--spacing)*12)}.md\\:text-left{text-align:left}.md\\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media (min-width:64rem){.lg\\:gap-16{gap:calc(var(--spacing)*16)}}.dark\\:border-emerald-500\\/30:is(.dark *){border-color:#00bb7f4d}@supports (color:color-mix(in lab, red, red)){.dark\\:border-emerald-500\\/30:is(.dark *){border-color:color-mix(in oklab,var(--color-emerald-500)30%,transparent)}}.dark\\:border-rose-500\\/30:is(.dark *){border-color:#ff23574d}@supports (color:color-mix(in lab, red, red)){.dark\\:border-rose-500\\/30:is(.dark *){border-color:color-mix(in oklab,var(--color-rose-500)30%,transparent)}}.dark\\:border-sky-500\\/30:is(.dark *){border-color:#00a5ef4d}@supports (color:color-mix(in lab, red, red)){.dark\\:border-sky-500\\/30:is(.dark *){border-color:color-mix(in oklab,var(--color-sky-500)30%,transparent)}}.dark\\:border-slate-700\\/50:is(.dark *){border-color:#31415880}@supports (color:color-mix(in lab, red, red)){.dark\\:border-slate-700\\/50:is(.dark *){border-color:color-mix(in oklab,var(--color-slate-700)50%,transparent)}}.dark\\:bg-amber-500\\/15:is(.dark *){background-color:#f99c0026}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-amber-500\\/15:is(.dark *){background-color:color-mix(in oklab,var(--color-amber-500)15%,transparent)}}.dark\\:bg-amber-500\\/20:is(.dark *){background-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-amber-500\\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}}.dark\\:bg-emerald-500\\/15:is(.dark *){background-color:#00bb7f26}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-emerald-500\\/15:is(.dark *){background-color:color-mix(in oklab,var(--color-emerald-500)15%,transparent)}}.dark\\:bg-rose-500\\/15:is(.dark *){background-color:#ff235726}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-rose-500\\/15:is(.dark *){background-color:color-mix(in oklab,var(--color-rose-500)15%,transparent)}}.dark\\:bg-sky-500\\/15:is(.dark *){background-color:#00a5ef26}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-sky-500\\/15:is(.dark *){background-color:color-mix(in oklab,var(--color-sky-500)15%,transparent)}}.dark\\:bg-sky-500\\/20:is(.dark *){background-color:#00a5ef33}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-sky-500\\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-sky-500)20%,transparent)}}.dark\\:bg-slate-700\\/50:is(.dark *){background-color:#31415880}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-slate-700\\/50:is(.dark *){background-color:color-mix(in oklab,var(--color-slate-700)50%,transparent)}}.dark\\:bg-slate-900\\/80:is(.dark *){background-color:#0f172bcc}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-slate-900\\/80:is(.dark *){background-color:color-mix(in oklab,var(--color-slate-900)80%,transparent)}}.dark\\:from-emerald-600:is(.dark *){--tw-gradient-from:var(--color-emerald-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.dark\\:to-emerald-700:is(.dark *){--tw-gradient-to:var(--color-emerald-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.dark\\:to-slate-950:is(.dark *){--tw-gradient-to:var(--color-slate-950);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.dark\\:text-amber-200:is(.dark *){color:var(--color-amber-200)}.dark\\:text-amber-300:is(.dark *){color:var(--color-amber-300)}.dark\\:text-emerald-300:is(.dark *){color:var(--color-emerald-300)}.dark\\:text-emerald-400:is(.dark *){color:var(--color-emerald-400)}.dark\\:text-rose-300:is(.dark *){color:var(--color-rose-300)}.dark\\:text-rose-400:is(.dark *){color:var(--color-rose-400)}.dark\\:text-sky-300:is(.dark *){color:var(--color-sky-300)}.dark\\:text-sky-400:is(.dark *){color:var(--color-sky-400)}.dark\\:text-slate-100:is(.dark *){color:var(--color-slate-100)}.dark\\:text-slate-200:is(.dark *){color:var(--color-slate-200)}.dark\\:text-slate-300:is(.dark *){color:var(--color-slate-300)}.dark\\:text-slate-400:is(.dark *){color:var(--color-slate-400)}.dark\\:shadow-xl:is(.dark *){--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.dark\\:shadow-slate-950\\/30:is(.dark *){--tw-shadow-color:#0206184d}@supports (color:color-mix(in lab, red, red)){.dark\\:shadow-slate-950\\/30:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-slate-950)30%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\\:ring-amber-400\\/40:is(.dark *){--tw-ring-color:#fcbb0066}@supports (color:color-mix(in lab, red, red)){.dark\\:ring-amber-400\\/40:is(.dark *){--tw-ring-color:color-mix(in oklab,var(--color-amber-400)40%,transparent)}}@media (hover:hover){.dark\\:hover\\:bg-amber-500\\/30:is(.dark *):hover{background-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.dark\\:hover\\:bg-amber-500\\/30:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-amber-500)30%,transparent)}}.dark\\:hover\\:bg-sky-500\\/30:is(.dark *):hover{background-color:#00a5ef4d}@supports (color:color-mix(in lab, red, red)){.dark\\:hover\\:bg-sky-500\\/30:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-sky-500)30%,transparent)}}.dark\\:hover\\:bg-slate-700:is(.dark *):hover{background-color:var(--color-slate-700)}.dark\\:hover\\:from-red-600:is(.dark *):hover{--tw-gradient-from:var(--color-red-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.dark\\:hover\\:to-red-700:is(.dark *):hover{--tw-gradient-to:var(--color-red-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}}.dark\\:focus-visible\\:ring-offset-slate-950:is(.dark *):focus-visible{--tw-ring-offset-color:var(--color-slate-950)}.\\[\\&_a\\]\\:cursor-pointer a{cursor:pointer}.\\[\\&_a\\:hover\\]\\:underline a:hover{text-decoration-line:underline}.\\[\\&_a\\>\\*\\]\\:pointer-events-none a>*{pointer-events:none}.\\[\\&_p\\]\\:max-w-md p{max-width:var(--container-md)}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:size-4 svg{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\\[\\&_svg\\]\\:h-6 svg{height:calc(var(--spacing)*6)}.\\[\\&_svg\\]\\:w-6 svg{width:calc(var(--spacing)*6)}.\\[\\&_svg\\]\\:flex-shrink-0 svg,.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\\'size-\\\'\\]\\)\\]\\:size-4 svg:not([class*=size-]){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\\[\\&\\:\\:-webkit-scrollbar\\]\\:hidden::-webkit-scrollbar{display:none}:is(.\\*\\:\\[span\\]\\:last\\:flex>*):is(span):last-child{display:flex}:is(.\\*\\:\\[span\\]\\:last\\:items-center>*):is(span):last-child{align-items:center}:is(.\\*\\:\\[span\\]\\:last\\:gap-2>*):is(span):last-child{gap:calc(var(--spacing)*2)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}\n',"",{version:3,sources:["webpack://./src/audio.css"],names:[],mappings:"AAAA,iEAAiE,CAC0B,kBAAkB,kIAAoI,4BAA4B,kBAAkB,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,qBAAqB,CAAC,qBAAqB,CAAC,qBAAqB,CAAC,mBAAmB,CAAC,mBAAmB,CAAC,sBAAsB,CAAC,sBAAsB,CAAC,uBAAuB,CAAC,8BAA8B,CAAC,wBAAwB,CAAC,uBAAuB,CAAC,sBAAsB,CAAC,2BAA2B,CAAC,+BAA+B,CAAC,8BAA8B,CAAC,8BAA8B,CAAC,8BAA8B,CAAC,oBAAoB,CAAC,wBAAwB,CAAC,qBAAqB,CAAC,qBAAqB,CAAC,yBAAyB,CAAC,sBAAsB,CAAC,2BAA2B,CAAC,+BAA+B,CAAC,4BAA4B,CAAC,uBAAuB,CAAC,0BAA0B,CAAC,6BAA6B,CAAC,gCAAgC,CAAC,uBAAuB,CAAC,0BAA0B,CAAC,2BAA2B,CAAC,iCAAiC,CAAC,wBAAwB,CAAC,iBAAiB,CAAC,uBAAuB,CAAC,qBAAqB,CAAC,sBAAsB,CAAC,uBAAuB,CAAC,mBAAmB,CAAC,oBAAoB,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,wBAAwB,CAAC,8BAA8B,CAAC,2BAA2B,CAAC,6BAA6B,CAAC,0BAA0B,CAAC,gCAAgC,CAAC,8BAA8B,CAAC,+BAA+B,CAAC,gCAAgC,CAAC,4BAA4B,CAAC,6BAA6B,CAAC,8BAA8B,CAAC,2BAA2B,CAAC,qBAAqB,CAAC,iBAAiB,CAAC,cAAc,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,CAAC,aAAa,YAAY,uGAAuG,CAAC,wCAAwC,CAAC,wCAAwC,CAAC,wCAAwC,CAAC,wCAAwC,CAAC,wCAAwC,CAAC,wCAAwC,CAAC,wCAAwC,CAAC,yCAAyC,CAAC,0CAA0C,CAAC,yCAAyC,CAAC,0CAA0C,CAAC,0CAA0C,CAAC,yCAAyC,CAAC,0CAA0C,CAAC,0CAA0C,CAAC,0CAA0C,CAAC,0CAA0C,CAAC,2CAA2C,CAAC,4CAA4C,CAAC,4CAA4C,CAAC,6CAA6C,CAAC,6CAA6C,CAAC,2CAA2C,CAAC,6CAA6C,CAAC,6CAA6C,CAAC,6CAA6C,CAAC,uCAAuC,CAAC,yCAAyC,CAAC,yCAAyC,CAAC,yCAAyC,CAAC,wCAAwC,CAAC,yCAAyC,CAAC,yCAAyC,CAAC,uCAAuC,CAAC,0CAA0C,CAAC,0CAA0C,CAAC,0CAA0C,CAAC,0CAA0C,CAAC,0CAA0C,CAAC,0CAA0C,CAAC,4CAA4C,CAAC,wCAAwC,CAAC,yCAAyC,CAAC,uCAAuC,CAAC,yCAAyC,CAAC,yCAAyC,CAAC,yCAAyC,CAAC,0CAA0C,CAAC,2CAA2C,CAAC,2CAA2C,CAAC,2CAA2C,CAAC,0CAA0C,CAAC,2CAA2C,CAAC,2CAA2C,CAAC,2CAA2C,CAAC,2CAA2C,CAAC,2CAA2C,CAAC,2CAA2C,CAAC,0CAA0C,CAAC,0CAA0C,CAAC,yCAAyC,CAAC,0CAA0C,CAAC,0CAA0C,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,oBAAoB,CAAC,oBAAoB,CAAC,qBAAqB,CAAC,qBAAqB,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,iBAAiB,CAAC,sCAAsC,CAAC,gBAAgB,CAAC,oCAAoC,CAAC,kBAAkB,CAAC,uCAAuC,CAAC,iBAAiB,CAAC,sCAAsC,CAAC,iBAAiB,CAAC,mCAAmC,CAAC,kBAAkB,CAAC,sCAAsC,CAAC,eAAe,CAAC,yBAAyB,CAAC,wBAAwB,CAAC,wBAAwB,CAAC,0BAA0B,CAAC,oBAAoB,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,iCAAiC,CAAC,qCAAqC,CAAC,sCAAsC,CAAC,aAAa,CAAC,cAAc,CAAC,kCAAkC,CAAC,4DAA4D,CAAC,8DAA8D,CAAC,CAAC,iBAAiB,qBAAqB,mBAAmB,CAAC,qBAAqB,mBAAmB,CAAC,SAAS,kBAAkB,CAAC,SAAS,oBAAoB,CAAC,kBAAkB,CAAC,cAAc,CAAC,SAAS,CAAC,UAAU,CAAC,WAAW,CAAC,SAAS,CAAC,iBAAiB,CAAC,eAAe,CAAC,UAAU,iBAAiB,CAAC,OAAO,cAAc,CAAC,UAAU,iBAAiB,CAAC,QAAQ,eAAe,CAAC,QAAQ,eAAe,CAAC,SAAS,4BAA4B,CAAC,gBAAgB,UAAU,CAAC,QAAQ,2BAA2B,CAAC,SAAS,4BAA4B,CAAC,eAAe,SAAS,CAAC,OAAO,0BAA0B,CAAC,OAAO,0BAA0B,CAAC,cAAc,OAAO,CAAC,aAAa,8BAA8B,CAAC,UAAU,6BAA6B,CAAC,SAAS,4BAA4B,CAAC,SAAS,4BAA4B,CAAC,SAAS,4BAA4B,CAAC,YAAY,UAAU,CAAC,WAAW,8BAA8B,CAAC,UAAU,6BAA6B,CAAC,UAAU,6BAA6B,CAAC,UAAU,6BAA6B,CAAC,UAAU,6BAA6B,CAAC,WAAW,8BAA8B,CAAC,WAAW,8BAA8B,CAAC,WAAW,8BAA8B,CAAC,gCAAgC,wBAAwB,CAAC,aAAa,WAAW,CAAC,SAAS,4BAA4B,CAAC,QAAQ,2BAA2B,CAAC,WAAW,QAAQ,CAAC,QAAQ,2BAA2B,CAAC,QAAQ,2BAA2B,CAAC,eAAe,QAAQ,CAAC,KAAK,SAAS,CAAC,KAAK,SAAS,CAAC,MAAM,UAAU,CAAC,MAAM,UAAU,CAAC,QAAQ,YAAY,CAAC,YAAY,UAAU,CAAC,WAAW,UAAU,CAAC,yBAAyB,WAAW,eAAe,CAAC,CAAC,yBAAyB,WAAW,eAAe,CAAC,CAAC,yBAAyB,WAAW,eAAe,CAAC,CAAC,yBAAyB,WAAW,eAAe,CAAC,CAAC,yBAAyB,WAAW,eAAe,CAAC,CAAC,KAAK,6BAA6B,CAAC,KAAK,6BAA6B,CAAC,OAAO,qCAAqC,CAAC,MAAM,oCAAoC,CAAC,MAAM,oCAAoC,CAAC,MAAM,oCAAoC,CAAC,SAAS,kBAAkB,CAAC,MAAM,mCAAmC,CAAC,OAAO,kCAAkC,CAAC,MAAM,iCAAiC,CAAC,MAAM,iCAAiC,CAAC,SAAS,mCAAmC,CAAC,MAAM,iCAAiC,CAAC,MAAM,iCAAiC,CAAC,MAAM,iCAAiC,CAAC,MAAM,iCAAiC,CAAC,MAAM,iCAAiC,CAAC,yCAAyC,yCAAyC,CAAC,SAAS,eAAe,CAAC,MAAM,mCAAmC,CAAC,SAAS,iBAAiB,CAAC,MAAM,oCAAoC,CAAC,MAAM,oCAAoC,CAAC,SAAS,sCAAsC,CAAC,MAAM,oCAAoC,CAAC,MAAM,oCAAoC,CAAC,MAAM,oCAAoC,CAAC,MAAM,oCAAoC,CAAC,MAAM,oCAAoC,CAAC,OAAO,qCAAqC,CAAC,OAAO,mCAAmC,CAAC,OAAO,mCAAmC,CAAC,MAAM,kCAAkC,CAAC,MAAM,kCAAkC,CAAC,MAAM,kCAAkC,CAAC,MAAM,kCAAkC,CAAC,MAAM,kCAAkC,CAAC,SAAS,gBAAgB,CAAC,YAAY,qBAAqB,CAAC,aAAa,sBAAsB,CAAC,cAAc,oBAAoB,CAAC,2BAA2B,CAAC,mBAAmB,CAAC,eAAe,CAAC,OAAO,aAAa,CAAC,UAAU,gBAAgB,CAAC,MAAM,YAAY,CAAC,MAAM,YAAY,CAAC,QAAQ,YAAY,CAAC,QAAQ,cAAc,CAAC,cAAc,oBAAoB,CAAC,aAAa,mBAAmB,CAAC,OAAO,aAAa,CAAC,WAAW,8BAA8B,CAAC,+BAA+B,CAAC,QAAQ,4BAA4B,CAAC,6BAA6B,CAAC,QAAQ,4BAA4B,CAAC,6BAA6B,CAAC,WAAW,UAAU,CAAC,WAAW,CAAC,2BAA2B,+BAA+B,CAAC,QAAQ,+BAA+B,CAAC,QAAQ,+BAA+B,CAAC,KAAK,6BAA6B,CAAC,KAAK,6BAA6B,CAAC,KAAK,6BAA6B,CAAC,KAAK,6BAA6B,CAAC,KAAK,6BAA6B,CAAC,KAAK,6BAA6B,CAAC,KAAK,6BAA6B,CAAC,MAAM,8BAA8B,CAAC,MAAM,8BAA8B,CAAC,MAAM,8BAA8B,CAAC,MAAM,8BAA8B,CAAC,MAAM,8BAA8B,CAAC,MAAM,8BAA8B,CAAC,MAAM,8BAA8B,CAAC,YAAY,WAAW,CAAC,YAAY,WAAW,CAAC,YAAY,WAAW,CAAC,YAAY,WAAW,CAAC,YAAY,WAAW,CAAC,YAAY,WAAW,CAAC,YAAY,WAAW,CAAC,aAAa,YAAY,CAAC,aAAa,YAAY,CAAC,aAAa,YAAY,CAAC,aAAa,YAAY,CAAC,0BAA0B,wBAAwB,CAAC,kCAAkC,+BAA+B,CAAC,wCAAwC,qCAAqC,CAAC,4CAA4C,yCAAyC,CAAC,QAAQ,WAAW,CAAC,OAAO,uBAAiB,CAAjB,kBAAkB,CAAC,QAAQ,WAAW,CAAC,MAAM,UAAU,CAAC,mDAAmD,uDAAuD,CAAC,UAAU,kCAAkC,CAAC,UAAU,kCAAkC,CAAC,UAAU,kCAAkC,CAAC,gBAAgB,eAAe,CAAC,iBAAiB,gBAAgB,CAAC,8BAA8B,4BAA4B,CAAC,8BAA8B,6BAA6B,CAAC,8BAA8B,6BAA6B,CAAC,YAAY,eAAe,CAAC,cAAc,gBAAgB,CAAC,SAAS,iCAAiC,CAAC,UAAU,kCAAkC,CAAC,8BAA8B,4BAA4B,CAAC,YAAY,eAAe,CAAC,cAAc,gBAAgB,CAAC,mCAAmC,sCAAsC,CAAC,QAAQ,8BAA8B,CAAC,QAAQ,8BAA8B,CAAC,KAAK,4BAA4B,CAAC,OAAO,0BAA0B,CAAC,KAAK,4BAA4B,CAAC,KAAK,4BAA4B,CAAC,KAAK,4BAA4B,CAAC,KAAK,4BAA4B,CAAC,KAAK,4BAA4B,CAAC,KAAK,4BAA4B,CAAC,MAAM,6BAA6B,CAAC,MAAM,6BAA6B,CAAC,MAAM,6BAA6B,CAAC,MAAM,6BAA6B,CAAC,MAAM,6BAA6B,CAAC,WAAW,SAAS,CAAC,YAAY,UAAU,CAAC,YAAY,UAAU,CAAC,YAAY,UAAU,CAAC,aAAa,WAAW,CAAC,2BAA2B,uBAAuB,CAAC,0BAA0B,uBAAuB,CAAC,0BAA0B,uBAAuB,CAAC,iCAAiC,6BAA6B,CAAC,0CAA0C,sCAAsC,CAAC,uCAAuC,mCAAmC,CAAC,QAAQ,UAAU,CAAC,OAAO,sBAAgB,CAAhB,iBAAiB,CAAC,QAAQ,UAAU,CAAC,OAAO,sBAAgB,CAAhB,iBAAiB,CAAC,MAAM,yBAAyB,CAAC,MAAM,yBAAyB,CAAC,WAAW,8BAA8B,CAAC,WAAW,8BAA8B,CAAC,UAAU,iCAAiC,CAAC,iBAAiB,eAAe,CAAC,iBAAiB,eAAe,CAAC,WAAW,0BAAoB,CAApB,qBAAqB,CAAC,YAAY,cAAc,CAAC,UAAU,6BAA6B,CAAC,UAAU,6BAA6B,CAAC,UAAU,6BAA6B,CAAC,SAAS,gCAAgC,CAAC,SAAS,gCAAgC,CAAC,UAAU,iCAAiC,CAAC,UAAU,iCAAiC,CAAC,gBAAgB,cAAc,CAAC,iBAAiB,eAAe,CAAC,iBAAiB,eAAe,CAAC,+CAA+C,2CAA2C,CAAC,YAAY,cAAc,CAAC,WAAW,0BAAoB,CAApB,qBAAqB,CAAC,QAAQ,MAAM,CAAC,yBAAyB,aAAa,CAAC,iBAAiB,WAAW,CAAC,QAAQ,WAAW,CAAC,iBAAiB,gBAAgB,CAAC,iBAAiB,gBAAgB,CAAC,iBAAiB,gBAAgB,CAAC,YAAY,eAAe,CAAC,qDAAqD,8DAA8D,CAAC,oDAAoD,6DAA6D,CAAC,eAAe,oBAAoB,CAAC,mBAAmB,wCAAwC,CAAC,oDAAoD,CAAC,gBAAgB,wCAAwC,CAAC,oDAAoD,CAAC,iBAAiB,yCAAyC,CAAC,oDAAoD,CAAC,eAAe,uCAAuC,CAAC,oDAAoD,CAAC,uBAAuB,qBAAqB,CAAC,oDAAoD,CAAC,mBAAmB,yCAAyC,CAAC,oDAAoD,CAAC,eAAe,uCAAuC,CAAC,oDAAoD,CAAC,eAAe,uCAAuC,CAAC,oDAAoD,CAAC,eAAe,uCAAuC,CAAC,oDAAoD,CAAC,uBAAuB,qBAAqB,CAAC,oDAAoD,CAAC,WAAW,qGAAqG,CAAC,mCAAmC,6BAA6B,CAAC,wCAAwC,kCAAkC,CAAC,+CAA+C,0CAA0C,CAAC,cAAc,6BAA6B,CAAC,gBAAgB,cAAc,CAAC,gBAAgB,cAAc,CAAC,YAAY,iBAAiB,CAAC,QAAQ,WAAW,CAAC,aAAa,0CAA0C,CAAC,WAAW,oBAAoB,CAAC,iBAAiB,uBAAc,CAAd,oBAAc,CAAd,eAAe,CAAC,aAAa,6CAA6C,CAAC,aAAa,6CAA6C,CAAC,8BAA8B,oCAAoC,CAAC,UAAU,qBAAqB,CAAC,kBAAkB,6BAA6B,CAAC,WAAW,cAAc,CAAC,cAAc,kBAAkB,CAAC,WAAW,oBAAoB,CAAC,aAAa,sBAAsB,CAAC,iBAAiB,6BAA6B,CAAC,gBAAgB,sBAAsB,CAAC,aAAa,wBAAwB,CAAC,OAAO,0BAA0B,CAAC,OAAO,0BAA0B,CAAC,OAAO,0BAA0B,CAAC,OAAO,0BAA0B,CAAC,OAAO,0BAA0B,CAAC,QAAQ,2BAA2B,CAAC,aAAa,OAAO,CAAC,qCAAqC,sBAAsB,CAAC,yEAAyE,CAAC,iFAAiF,CAAC,qCAAqC,sBAAsB,CAAC,0EAA0E,CAAC,kFAAkF,CAAC,YAAY,qBAAqB,CAAC,UAAU,sBAAsB,CAAC,kBAAkB,CAAC,eAAe,CAAC,eAAe,aAAa,CAAC,iBAAiB,eAAe,CAAC,mBAAmB,iBAAiB,CAAC,iBAAiB,eAAe,CAAC,SAAS,oBAAoB,CAAC,wCAAwC,6CAA6C,CAAC,4CAA4C,iDAAiD,CAAC,aAAa,+BAA+B,CAAC,iBAAiB,iBAAiB,CAAC,qBAAqB,qBAAqB,CAAC,+CAA+C,6CAA6C,CAAC,mDAAmD,iDAAiD,CAAC,cAAc,0BAA0B,CAAC,YAAY,8BAA8B,CAAC,YAAY,8BAA8B,CAAC,cAAc,eAAe,CAAC,YAAY,8BAA8B,CAAC,YAAY,8BAA8B,CAAC,cAAc,uCAAuC,CAAC,wCAAwC,CAAC,cAAc,uCAAuC,CAAC,0CAA0C,CAAC,cAAc,wCAAwC,CAAC,2CAA2C,CAAC,QAAQ,mCAAmC,CAAC,gBAAgB,CAAC,UAAU,mCAAmC,CAAC,cAAc,CAAC,UAAU,mCAAmC,CAAC,gBAAgB,CAAC,UAAU,uCAAuC,CAAC,oBAAoB,CAAC,UAAU,0CAA0C,CAAC,uBAAuB,CAAC,UAAU,wCAAwC,CAAC,qBAAqB,CAAC,aAAa,sBAAsB,CAAC,iBAAiB,CAAC,wBAAwB,sBAAsB,CAAC,8CAA8C,wBAAwB,wEAAwE,CAAC,CAAC,wBAAwB,sBAAsB,CAAC,8CAA8C,wBAAwB,wEAAwE,CAAC,CAAC,iBAAiB,kCAAkC,CAAC,iBAAiB,kCAAkC,CAAC,qBAAqB,sBAAsB,CAAC,8CAA8C,qBAAqB,qEAAqE,CAAC,CAAC,oBAAoB,sBAAsB,CAAC,8CAA8C,oBAAoB,oEAAoE,CAAC,CAAC,sBAAsB,sBAAsB,CAAC,8CAA8C,sBAAsB,sEAAsE,CAAC,CAAC,oBAAoB,kBAAkB,CAAC,cAAc,+BAA+B,CAAC,uBAAuB,0BAA0B,CAAC,8CAA8C,uBAAuB,yEAAyE,CAAC,CAAC,sBAAsB,0BAA0B,CAAC,8CAA8C,sBAAsB,wEAAwE,CAAC,CAAC,sBAAsB,0BAA0B,CAAC,8CAA8C,sBAAsB,wEAAwE,CAAC,CAAC,sBAAsB,sBAAsB,CAAC,uBAAuB,4BAA4B,CAAC,8CAA8C,uBAAuB,2EAA2E,CAAC,CAAC,sBAAsB,4BAA4B,CAAC,8CAA8C,sBAAsB,0EAA0E,CAAC,CAAC,sBAAsB,4BAA4B,CAAC,8CAA8C,sBAAsB,0EAA0E,CAAC,CAAC,sBAAsB,yBAAyB,CAAC,sBAAsB,uBAAuB,CAAC,2DAA2D,qEAAqE,CAAC,kEAAkE,4EAA4E,CAAC,4BAA4B,kCAAkC,CAAC,yCAAyC,+CAA+C,CAAC,gEAAgE,mEAAmE,CAAC,wBAAwB,8BAA8B,CAAC,yBAAyB,+BAA+B,CAAC,cAAc,uCAAuC,CAAC,kBAAkB,0BAA0B,CAAC,8CAA8C,kBAAkB,0EAA0E,CAAC,CAAC,UAAU,mCAAmC,CAAC,cAAc,sBAAsB,CAAC,8CAA8C,cAAc,sEAAsE,CAAC,CAAC,cAAc,0BAA0B,CAAC,8CAA8C,cAAc,sEAAsE,CAAC,CAAC,mBAAmB,0BAA0B,CAAC,8CAA8C,mBAAmB,2EAA2E,CAAC,CAAC,gBAAgB,yCAAyC,CAAC,aAAa,sCAAsC,CAAC,cAAc,uCAAuC,CAAC,YAAY,qCAAqC,CAAC,gBAAgB,0BAA0B,CAAC,8CAA8C,gBAAgB,wEAAwE,CAAC,CAAC,eAAe,0BAA0B,CAAC,8CAA8C,eAAe,uEAAuE,CAAC,CAAC,YAAY,qCAAqC,CAAC,cAAc,uCAAuC,CAAC,cAAc,uCAAuC,CAAC,gBAAgB,sBAAsB,CAAC,cAAc,0BAA0B,CAAC,8CAA8C,cAAc,sEAAsE,CAAC,CAAC,kBAAkB,yCAAyC,CAAC,0DAA0D,CAAC,mBAAmB,+CAA+C,CAAC,0DAA0D,CAAC,kBAAkB,2CAA2C,CAAC,wLAAwL,CAAC,gBAAgB,yCAAyC,CAAC,wLAAwL,CAAC,UAAU,mCAAmC,CAAC,wLAAwL,CAAC,YAAY,uBAAuB,CAAC,UAAU,wBAAwB,CAAC,cAAc,2BAA2B,CAAC,6DAA6D,yDAAyD,CAAC,iEAAiE,6DAA6D,CAAC,mEAAmE,+DAA+D,CAAC,gBAAgB,qBAAiB,CAAjB,kBAAkB,CAAC,cAAc,mBAAe,CAAf,gBAAgB,CAAC,KAAK,8BAA8B,CAAC,QAAQ,+BAA+B,CAAC,KAAK,8BAA8B,CAAC,QAAQ,gCAAgC,CAAC,KAAK,8BAA8B,CAAC,KAAK,8BAA8B,CAAC,KAAK,8BAA8B,CAAC,KAAK,8BAA8B,CAAC,MAAM,WAAW,CAAC,MAAM,qCAAqC,CAAC,MAAM,qCAAqC,CAAC,MAAM,qCAAqC,CAAC,MAAM,qCAAqC,CAAC,MAAM,qCAAqC,CAAC,MAAM,qCAAqC,CAAC,MAAM,oCAAoC,CAAC,SAAS,sCAAsC,CAAC,MAAM,oCAAoC,CAAC,SAAS,sCAAsC,CAAC,MAAM,oCAAoC,CAAC,SAAS,sCAAsC,CAAC,OAAO,qCAAqC,CAAC,SAAS,oCAAoC,CAAC,MAAM,kCAAkC,CAAC,MAAM,kCAAkC,CAAC,MAAM,kCAAkC,CAAC,yCAAyC,0CAA0C,CAAC,MAAM,oCAAoC,CAAC,MAAM,oCAAoC,CAAC,MAAM,qCAAqC,CAAC,MAAM,qCAAqC,CAAC,MAAM,qCAAqC,CAAC,OAAO,sCAAsC,CAAC,OAAO,sCAAsC,CAAC,aAAa,mBAAmB,CAAC,MAAM,mCAAmC,CAAC,MAAM,mCAAmC,CAAC,MAAM,mCAAmC,CAAC,MAAM,mCAAmC,CAAC,MAAM,mCAAmC,CAAC,MAAM,mCAAmC,CAAC,aAAa,iBAAiB,CAAC,WAAW,eAAe,CAAC,cAAc,qBAAqB,CAAC,WAAW,4BAA4B,CAAC,WAAW,oDAAoD,CAAC,UAAU,yBAAyB,CAAC,0DAA0D,CAAC,UAAU,yBAAyB,CAAC,0DAA0D,CAAC,WAAW,0BAA0B,CAAC,2DAA2D,CAAC,SAAS,wBAAwB,CAAC,yDAAyD,CAAC,SAAS,wBAAwB,CAAC,yDAAyD,CAAC,SAAS,wBAAwB,CAAC,yDAAyD,CAAC,kBAAkB,eAAe,CAAC,mBAAmB,gBAAgB,CAAC,WAAW,mCAAmC,CAAC,kCAAkC,CAAC,WAAW,mCAAmC,CAAC,kCAAkC,CAAC,WAAW,mCAAmC,CAAC,kCAAkC,CAAC,WAAW,mCAAmC,CAAC,kCAAkC,CAAC,WAAW,mCAAmC,CAAC,kCAAkC,CAAC,cAAc,cAAc,CAAC,aAAa,CAAC,eAAe,iCAAiC,CAAC,gCAAgC,CAAC,aAAa,0CAA0C,CAAC,qCAAqC,CAAC,aAAa,0CAA0C,CAAC,qCAAqC,CAAC,eAAe,4CAA4C,CAAC,uCAAuC,CAAC,sBAAsB,mBAAmB,CAAC,oBAAoB,CAAC,WAAW,cAAc,CAAC,8BAA8B,wBAAwB,CAAC,eAAe,sBAAsB,CAAC,mBAAmB,kBAAkB,CAAC,mBAAmB,kBAAkB,CAAC,iEAAiE,8DAA8D,CAAC,qFAAqF,kFAAkF,CAAC,kEAAkE,wDAAwD,CAAC,sFAAsF,4EAA4E,CAAC,sEAAsE,4DAA4D,CAAC,mFAAmF,yEAAyE,CAAC,kDAAkD,0CAA0C,CAAC,gBAAgB,4BAA4B,CAAC,gBAAgB,4BAA4B,CAAC,gBAAgB,4BAA4B,CAAC,cAAc,kBAAkB,CAAC,kBAAkB,8BAA8B,CAAC,kBAAkB,8BAA8B,CAAC,eAAe,2BAA2B,CAAC,eAAe,2BAA2B,CAAC,eAAe,2BAA2B,CAAC,eAAe,2BAA2B,CAAC,cAAc,0BAA0B,CAAC,cAAc,0BAA0B,CAAC,cAAc,0BAA0B,CAAC,gBAAgB,4BAA4B,CAAC,gBAAgB,4BAA4B,CAAC,gBAAgB,4BAA4B,CAAC,gBAAgB,4BAA4B,CAAC,gBAAgB,4BAA4B,CAAC,YAAY,wBAAwB,CAAC,YAAY,yBAAyB,CAAC,WAAW,wBAAwB,CAAC,WAAW,wBAAwB,CAAC,QAAQ,iBAAiB,CAAC,cAAc,yBAAyB,CAAC,aAAa,kCAAkC,CAAC,iCAAiC,CAAC,WAAW,SAAS,CAAC,YAAY,UAAU,CAAC,YAAY,UAAU,CAAC,YAAY,UAAU,CAAC,aAAa,SAAS,CAAC,6CAA6C,sDAAsD,CAAC,iIAAiI,CAAC,kDAAkD,sDAAsD,CAAC,iIAAiI,CAAC,kDAAkD,sDAAsD,CAAC,iIAAiI,CAAC,iDAAiD,sDAAsD,CAAC,iIAAiI,CAAC,mDAAmD,uDAAuD,CAAC,iIAAiI,CAAC,yCAAyC,sCAAsC,CAAC,iIAAiI,CAAC,WAAW,6GAA6G,CAAC,iIAAiI,CAAC,WAAW,2GAA2G,CAAC,iIAAiI,CAAC,WAAW,wGAAwG,CAAC,iIAAiI,CAAC,WAAW,8GAA8G,CAAC,iIAAiI,CAAC,WAAW,wDAAwD,CAAC,iIAAiI,CAAC,cAAc,oHAAoH,CAAC,iIAAiI,CAAC,sBAAsB,2BAA2B,CAAC,8CAA8C,sBAAsB,iIAAiI,CAAC,CAAC,gBAAgB,sCAAsC,CAAC,gBAAgB,uBAAuB,CAAC,kBAAkB,CAAC,8BAA8B,gBAAgB,kBAAkB,CAAC,uBAAuB,CAAC,CAAC,SAAS,qCAAqC,CAAC,iBAAiB,CAAC,QAAQ,iLAAiL,CAAC,eAAe,4BAA4B,CAAiR,uQAAuQ,CAAC,wBAAwB,6BAA6B,CAAiR,uQAAuQ,CAAC,kBAAkB,uCAAuC,CAAiR,uQAAuQ,CAAC,uBAAuB,qCAAqC,CAAiR,uQAAuQ,CAAC,YAAY,0RAAkT,CAAC,mFAAmF,CAAC,yEAAyE,CAAC,kCAAkC,oCAAoC,CAAC,mFAAmF,CAAC,yEAAyE,CAAC,sBAAsB,yBAAyB,CAAC,mFAAmF,CAAC,yEAAyE,CAAC,gBAAgB,uBAAuB,CAAC,mFAAmF,CAAC,yEAAyE,CAAC,mBAAmB,6JAA6J,CAAC,mFAAmF,CAAC,yEAAyE,CAAC,oBAAoB,2BAA2B,CAAC,mFAAmF,CAAC,yEAAyE,CAAC,mBAAmB,8BAA8B,CAAC,mFAAmF,CAAC,yEAAyE,CAAC,sBAAsB,oDAAoD,CAAC,mFAAmF,CAAC,yEAAyE,CAAC,iBAAiB,wBAAwB,CAAC,WAAW,oBAAoB,CAAC,cAAc,iBAAiB,CAAC,uBAAuB,CAAC,cAAc,kBAAkB,CAAC,wBAAwB,CAAC,cAAc,iBAAiB,CAAC,uBAAuB,CAAC,cAAc,kBAAkB,CAAC,wBAAwB,CAAC,cAAc,iBAAiB,CAAC,uBAAuB,CAAC,cAAc,iBAAiB,CAAC,uBAAuB,CAAC,eAAe,gBAAgB,CAAC,sBAAsB,CAAC,aAAa,4BAA4B,CAAC,6CAA6C,CAAC,UAAU,yBAAyB,CAAC,0CAA0C,CAAC,uBAAuB,qBAAqB,CAAC,cAAc,uBAAuB,CAAC,kBAAkB,CAAC,aAAa,wBAAwB,CAAC,qBAAe,CAAf,gBAAgB,CAAC,8BAA8B,uBAAuB,CAAC,4BAA4B,mBAAmB,CAAC,4BAA4B,mBAAmB,CAAC,yBAAyB,kBAAkB,CAAC,mCAAmC,4BAA4B,CAAC,2BAA2B,oBAAoB,CAAC,qBAAqB,mDAAmD,SAAS,CAAC,qDAAqD,SAAS,CAAC,CAAC,yCAAyC,mBAAmB,CAAC,iCAAiC,6BAA6B,CAAC,sCAAsC,mCAAmC,CAAC,cAAc,CAAC,4CAA4C,sBAAsB,CAAC,qCAAqC,wBAAwB,CAAC,yDAAyD,CAAC,yCAAyC,0CAA0C,CAAC,qCAAqC,CAAC,qBAAqB,wBAAwB,iBAAiB,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,wCAAwC,CAAC,wBAAwB,iBAAiB,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,wCAAwC,CAAC,8BAA8B,UAAU,CAAC,iCAAiC,sBAAsB,CAAC,8CAA8C,iCAAiC,oEAAoE,CAAC,CAAC,2BAA2B,uCAAuC,CAAC,8BAA8B,0BAA0B,CAAC,8CAA8C,8BAA8B,yEAAyE,CAAC,CAAC,yBAAyB,qCAAqC,CAAC,2BAA2B,uCAAuC,CAAC,2BAA2B,0BAA0B,CAAC,8CAA8C,2BAA2B,sEAAsE,CAAC,CAAC,gCAAgC,+CAA+C,CAAC,0DAA0D,CAAC,2BAA2B,uCAAuC,CAAC,wLAAwL,CAAC,yBAAyB,qCAAqC,CAAC,wLAAwL,CAAC,6CAA6C,yBAAyB,CAAC,yBAAyB,wBAAwB,CAAC,wBAAwB,8BAA8B,CAAC,gEAAgE,uDAAuD,CAAC,iIAAiI,CAAC,+DAA+D,uDAAuD,CAAC,iIAAiI,CAAC,wBAAwB,6GAA6G,CAAC,iIAAiI,CAAC,wBAAwB,2GAA2G,CAAC,iIAAiI,CAAC,wBAAwB,wGAAwG,CAAC,iIAAiI,CAAC,mCAAmC,+BAA+B,CAAC,iLAAiL,CAAC,+BAA+B,uCAAuC,CAAiR,uQAAuQ,CAAC,CAAC,qCAAqC,oHAAoH,CAAC,iIAAiI,CAAC,2CAA2C,oHAAoH,CAAC,iIAAiI,CAAC,6CAA6C,sCAAsC,CAAC,2CAA2C,oCAAoC,CAAC,6CAA6C,sCAAsC,CAAC,4CAA4C,0BAA0B,CAAC,yGAAyG,CAAC,4CAA4C,0BAA0B,CAAC,yGAAyG,CAAC,gDAAgD,yCAAyC,CAAC,wCAAwC,qCAAqC,CAAC,iBAAiB,CAAC,2CAA2C,uBAAuB,CAAC,kBAAkB,CAAC,yBAAyB,gBAAgB,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,wCAAwC,CAAC,gCAAgC,SAAS,CAAC,wCAAwC,mBAAmB,CAAC,uCAAuC,kBAAkB,CAAC,+BAA+B,UAAU,CAAC,uDAAuD,mBAAmB,CAAC,8CAA8C,UAAU,CAAC,iDAAiD,wBAAwB,CAAC,yDAAyD,CAAC,mDAAmD,mCAAmC,CAAC,kCAAkC,CAAC,qDAAqD,0CAA0C,CAAC,qCAAqC,CAAC,wDAAwD,uCAAuC,CAAC,oDAAoD,CAAC,qDAAqD,wCAAwC,CAAC,oDAAoD,CAAC,sDAAsD,uCAAuC,CAAC,oDAAoD,CAAC,mDAAmD,wCAAwC,CAAC,oDAAoD,CAAC,8EAA8E,oBAAoB,CAAC,2BAA2B,CAAC,mBAAmB,CAAC,eAAe,CAAC,sEAAsE,YAAY,CAAC,8EAA8E,kBAAkB,CAAC,uEAAuE,0BAA0B,CAAC,yBAAyB,WAAW,aAAa,CAAC,cAAc,kBAAkB,CAAC,iBAAiB,wBAAwB,CAAC,eAAe,eAAe,CAAC,cAAc,yBAAyB,CAAC,0DAA0D,CAAC,aAAa,wBAAwB,CAAC,yDAAyD,CAAC,CAAC,yBAAyB,cAAc,kBAAkB,CAAC,kBAAkB,kBAAkB,CAAC,WAAW,sCAAsC,CAAC,eAAe,eAAe,CAAC,aAAa,wBAAwB,CAAC,yDAAyD,CAAC,CAAC,yBAAyB,YAAY,2BAA2B,CAAC,CAAC,0CAA0C,sBAAsB,CAAC,8CAA8C,0CAA0C,wEAAwE,CAAC,CAAC,uCAAuC,sBAAsB,CAAC,8CAA8C,uCAAuC,qEAAqE,CAAC,CAAC,sCAAsC,sBAAsB,CAAC,8CAA8C,sCAAsC,oEAAoE,CAAC,CAAC,wCAAwC,sBAAsB,CAAC,8CAA8C,wCAAwC,sEAAsE,CAAC,CAAC,oCAAoC,0BAA0B,CAAC,8CAA8C,oCAAoC,0EAA0E,CAAC,CAAC,oCAAoC,0BAA0B,CAAC,8CAA8C,oCAAoC,0EAA0E,CAAC,CAAC,sCAAsC,0BAA0B,CAAC,8CAA8C,sCAAsC,4EAA4E,CAAC,CAAC,mCAAmC,0BAA0B,CAAC,8CAA8C,mCAAmC,yEAAyE,CAAC,CAAC,kCAAkC,0BAA0B,CAAC,8CAA8C,kCAAkC,wEAAwE,CAAC,CAAC,kCAAkC,0BAA0B,CAAC,8CAA8C,kCAAkC,wEAAwE,CAAC,CAAC,oCAAoC,0BAA0B,CAAC,8CAA8C,oCAAoC,0EAA0E,CAAC,CAAC,oCAAoC,0BAA0B,CAAC,8CAA8C,oCAAoC,0EAA0E,CAAC,CAAC,oCAAoC,2CAA2C,CAAC,wLAAwL,CAAC,kCAAkC,yCAAyC,CAAC,wLAAwL,CAAC,gCAAgC,uCAAuC,CAAC,wLAAwL,CAAC,kCAAkC,4BAA4B,CAAC,kCAAkC,4BAA4B,CAAC,oCAAoC,8BAA8B,CAAC,oCAAoC,8BAA8B,CAAC,iCAAiC,2BAA2B,CAAC,iCAAiC,2BAA2B,CAAC,gCAAgC,0BAA0B,CAAC,gCAAgC,0BAA0B,CAAC,kCAAkC,4BAA4B,CAAC,kCAAkC,4BAA4B,CAAC,kCAAkC,4BAA4B,CAAC,kCAAkC,4BAA4B,CAAC,6BAA6B,8GAA8G,CAAC,iIAAiI,CAAC,wCAAwC,2BAA2B,CAAC,8CAA8C,wCAAwC,iIAAiI,CAAC,CAAC,sCAAsC,yBAAyB,CAAC,8CAA8C,sCAAsC,yEAAyE,CAAC,CAAC,qBAAqB,iDAAiD,0BAA0B,CAAC,8CAA8C,iDAAiD,0EAA0E,CAAC,CAAC,+CAA+C,0BAA0B,CAAC,8CAA8C,+CAA+C,wEAAwE,CAAC,CAAC,6CAA6C,uCAAuC,CAAC,6CAA6C,uCAAuC,CAAC,wLAAwL,CAAC,2CAA2C,qCAAqC,CAAC,wLAAwL,CAAC,CAAC,sEAAsE,6CAA6C,CAAC,4BAA4B,cAAc,CAAC,oCAAoC,8BAA8B,CAAC,uCAAuC,mBAAmB,CAAC,sBAAsB,6BAA6B,CAAC,qCAAqC,mBAAmB,CAAC,wBAAwB,4BAA4B,CAAC,6BAA6B,CAAC,qBAAqB,6BAA6B,CAAC,qBAAqB,4BAA4B,CAAC,yDAAyD,aAAa,CAAC,2EAA2E,4BAA4B,CAAC,6BAA6B,CAAC,wDAAwD,YAAY,CAAC,qDAAqD,YAAY,CAAC,6DAA6D,kBAAkB,CAAC,sDAAsD,0BAA0B,CAAC,CAAC,2BAA2B,UAAU,CAAC,cAAc,CAAC,eAAe,CAAC,2BAA2B,UAAU,CAAC,cAAc,CAAC,eAAe,CAAC,2BAA2B,UAAU,CAAC,cAAc,CAAC,eAAe,CAAC,wBAAwB,UAAU,CAAC,cAAc,CAAC,wBAAwB,UAAU,CAAC,cAAc,CAAC,wBAAwB,UAAU,CAAC,cAAc,CAAC,sBAAsB,UAAU,CAAC,cAAc,CAAC,sBAAsB,UAAU,CAAC,cAAc,CAAC,+BAA+B,UAAU,CAAC,cAAc,CAAC,eAAe,CAAC,+BAA+B,UAAU,CAAC,cAAc,CAAC,eAAe,CAAC,4BAA4B,UAAU,CAAC,cAAc,CAAC,mBAAmB,CAAC,iCAAiC,UAAU,CAAC,cAAc,CAAC,6BAA6B,gBAAgB,CAAC,cAAc,CAAC,mBAAmB,CAAC,4BAA4B,gBAAgB,CAAC,cAAc,CAAC,mBAAmB,CAAC,2BAA2B,gBAAgB,CAAC,cAAc,CAAC,mBAAmB,CAAC,8BAA8B,UAAU,CAAC,cAAc,CAAC,kCAAkC,UAAU,CAAC,cAAc,CAAC,sCAAsC,4BAA4B,CAAC,cAAc,CAAC,gBAAgB,CAAC,qCAAqC,4BAA4B,CAAC,cAAc,CAAC,iBAAiB,CAAC,oCAAoC,4BAA4B,CAAC,cAAc,CAAC,kBAAkB,CAAC,uBAAuB,UAAU,CAAC,cAAc,CAAC,2BAA2B,UAAU,CAAC,cAAc,CAAC,wBAAwB,UAAU,CAAC,cAAc,CAAC,sBAAsB,UAAU,CAAC,cAAc,CAAC,uBAAuB,CAAC,4BAA4B,UAAU,CAAC,cAAc,CAAC,4BAA4B,qBAAqB,CAAC,cAAc,CAAC,kBAAkB,CAAC,4BAA4B,UAAU,CAAC,cAAc,CAAC,uBAAuB,CAAC,kCAAkC,UAAU,CAAC,cAAc,CAAC,kCAAkC,qBAAqB,CAAC,cAAc,CAAC,kBAAkB,CAAC,0BAA0B,UAAU,CAAC,cAAc,CAAC,2BAA2B,UAAU,CAAC,cAAc,CAAC,uBAAuB,CAAC,gCAAgC,UAAU,CAAC,cAAc,CAAC,iCAAiC,UAAU,CAAC,cAAc,CAAC,uBAAuB,CAAC,0BAA0B,UAAU,CAAC,cAAc,CAAC,iCAAiC,iBAAiB,CAAC,cAAc,CAAC,eAAe,CAAC,iCAAiC,UAAU,CAAC,cAAc,CAAC,kBAAkB,CAAC,kCAAkC,UAAU,CAAC,cAAc,CAAC,uBAAuB,CAAC,6BAA6B,UAAU,CAAC,cAAc,CAAC,mBAAmB,CAAC,oBAAoB,UAAU,CAAC,cAAc,CAAC,0BAA0B,UAAU,CAAC,cAAc,CAAC,wBAAwB,UAAU,CAAC,cAAc,CAAC,yBAAyB,UAAU,CAAC,cAAc,CAAC,0BAA0B,UAAU,CAAC,cAAc,CAAC,sBAAsB,UAAU,CAAC,cAAc,CAAC,uBAAuB,UAAU,CAAC,cAAc,CAAC,wBAAwB,UAAU,CAAC,cAAc,CAAC,qBAAqB,UAAU,CAAC,cAAc,CAAC,2BAA2B,UAAU,CAAC,cAAc,CAAC,iCAAiC,UAAU,CAAC,cAAc,CAAC,iCAAiC,qBAAqB,CAAC,cAAc,CAAC,kBAAkB,CAAC,gCAAgC,UAAU,CAAC,cAAc,CAAC,6BAA6B,UAAU,CAAC,cAAc,CAAC,mCAAmC,UAAU,CAAC,cAAc,CAAC,iCAAiC,UAAU,CAAC,cAAc,CAAC,kCAAkC,UAAU,CAAC,cAAc,CAAC,mCAAmC,UAAU,CAAC,cAAc,CAAC,+BAA+B,UAAU,CAAC,cAAc,CAAC,gCAAgC,UAAU,CAAC,cAAc,CAAC,iCAAiC,UAAU,CAAC,cAAc,CAAC,8BAA8B,UAAU,CAAC,cAAc,CAAC,wBAAwB,UAAU,CAAC,cAAc,CAAC,oBAAoB,UAAU,CAAC,cAAc,CAAC,uBAAuB,UAAU,CAAC,cAAc,CAAC,eAAe,CAAC,uBAAuB,UAAU,CAAC,cAAc,CAAC,eAAe,CAAC,uBAAuB,UAAU,CAAC,cAAc,CAAC,eAAe,CAAC,gBAAgB,GAAG,wBAAwB,CAAC",sourcesContent:['/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */\n@import "https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap";@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-green-500:oklch(72.3% .219 149.579);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-950:oklch(26.2% .051 172.552);--color-sky-50:oklch(97.7% .013 236.62);--color-sky-100:oklch(95.1% .026 236.824);--color-sky-200:oklch(90.1% .058 230.902);--color-sky-300:oklch(82.8% .111 230.318);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-500:oklch(68.5% .169 237.323);--color-sky-600:oklch(58.8% .158 241.966);--color-sky-700:oklch(50% .134 242.749);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-900:oklch(37.9% .146 265.522);--color-purple-600:oklch(55.8% .288 302.321);--color-rose-50:oklch(96.9% .015 12.422);--color-rose-200:oklch(89.2% .058 10.001);--color-rose-300:oklch(81% .117 11.638);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-600:oklch(58.6% .253 17.585);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-3xs:16rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-2xl:42rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height:calc(1.5/1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--text-5xl:3rem;--text-5xl--line-height:1;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--leading-tight:1.25;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:Inter,system-ui,-apple-system,sans-serif}}@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-\\[-4px\\]{inset:-4px}.-top-3{top:calc(var(--spacing)*-3)}.-top-14{top:calc(var(--spacing)*-14)}.-top-\\[28px\\]{top:-28px}.top-0{top:calc(var(--spacing)*0)}.top-3{top:calc(var(--spacing)*3)}.top-\\[50\\%\\]{top:50%}.-right-0\\.5{right:calc(var(--spacing)*-.5)}.-right-2{right:calc(var(--spacing)*-2)}.right-0{right:calc(var(--spacing)*0)}.right-3{right:calc(var(--spacing)*3)}.right-4{right:calc(var(--spacing)*4)}.right-auto{right:auto}.-bottom-3{bottom:calc(var(--spacing)*-3)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-1{bottom:calc(var(--spacing)*1)}.bottom-2{bottom:calc(var(--spacing)*2)}.bottom-3{bottom:calc(var(--spacing)*3)}.bottom-16{bottom:calc(var(--spacing)*16)}.bottom-30{bottom:calc(var(--spacing)*30)}.bottom-40{bottom:calc(var(--spacing)*40)}.bottom-\\[calc\\(100\\%\\+40px\\)\\]{bottom:calc(100% + 40px)}.bottom-full{bottom:100%}.-left-2{left:calc(var(--spacing)*-2)}.left-0{left:calc(var(--spacing)*0)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.left-4{left:calc(var(--spacing)*4)}.left-\\[50\\%\\]{left:50%}.z-0{z-index:0}.z-1{z-index:1}.z-10{z-index:10}.z-50{z-index:50}.z-1100{z-index:1100}.clear-both{clear:both}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.m-0{margin:calc(var(--spacing)*0)}.m-2{margin:calc(var(--spacing)*2)}.-mx-1{margin-inline:calc(var(--spacing)*-1)}.mx-3{margin-inline:calc(var(--spacing)*3)}.mx-5{margin-inline:calc(var(--spacing)*5)}.mx-8{margin-inline:calc(var(--spacing)*8)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing)*1)}.-mt-4{margin-top:calc(var(--spacing)*-4)}.mt-0{margin-top:calc(var(--spacing)*0)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-6{margin-top:calc(var(--spacing)*6)}.mt-8{margin-top:calc(var(--spacing)*8)}.mt-\\[var\\(--moveo-new-header-height\\)\\]{margin-top:var(--moveo-new-header-height)}.mt-auto{margin-top:auto}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-auto{margin-right:auto}.mb-0{margin-bottom:calc(var(--spacing)*0)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-20{margin-bottom:calc(var(--spacing)*20)}.-ml-1{margin-left:calc(var(--spacing)*-1)}.-ml-4{margin-left:calc(var(--spacing)*-4)}.ml-0{margin-left:calc(var(--spacing)*0)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-5{margin-left:calc(var(--spacing)*5)}.ml-6{margin-left:calc(var(--spacing)*6)}.ml-auto{margin-left:auto}.box-border{box-sizing:border-box}.box-content{box-sizing:content-box}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.size-3\\.5{width:calc(var(--spacing)*3.5);height:calc(var(--spacing)*3.5)}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-8{width:calc(var(--spacing)*8);height:calc(var(--spacing)*8)}.size-full{width:100%;height:100%}.h-\\(--moveo-chat-height\\){height:var(--moveo-chat-height)}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2\\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-11{height:calc(var(--spacing)*11)}.h-12{height:calc(var(--spacing)*12)}.h-14{height:calc(var(--spacing)*14)}.h-40{height:calc(var(--spacing)*40)}.h-45{height:calc(var(--spacing)*45)}.h-96{height:calc(var(--spacing)*96)}.h-\\[18px\\]{height:18px}.h-\\[28px\\]{height:28px}.h-\\[42px\\]{height:42px}.h-\\[44px\\]{height:44px}.h-\\[72px\\]{height:72px}.h-\\[78vh\\]{height:78vh}.h-\\[82px\\]{height:82px}.h-\\[222px\\]{height:222px}.h-\\[254px\\]{height:254px}.h-\\[282px\\]{height:282px}.h-\\[386px\\]{height:386px}.h-\\[calc\\(100\\%-44px\\)\\]{height:calc(100% - 44px)}.h-\\[var\\(--moveo-chat-height\\)\\]{height:var(--moveo-chat-height)}.h-\\[var\\(--moveo-modal-tall-height\\)\\]{height:var(--moveo-modal-tall-height)}.h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-fit{height:fit-content}.h-full{height:100%}.h-px{height:1px}.max-h-\\(--radix-select-content-available-height\\){max-height:var(--radix-select-content-available-height)}.max-h-18{max-height:calc(var(--spacing)*18)}.max-h-40{max-height:calc(var(--spacing)*40)}.max-h-50{max-height:calc(var(--spacing)*50)}.max-h-\\[88px\\]{max-height:88px}.max-h-\\[400px\\]{max-height:400px}.max-h-\\[calc\\(100\\%-68px\\)\\]{max-height:calc(100% - 68px)}.max-h-\\[calc\\(100vh-16px\\)\\]{max-height:calc(100vh - 16px)}.max-h-\\[calc\\(100vh-80px\\)\\]{max-height:calc(100vh - 80px)}.max-h-full{max-height:100%}.max-h-screen{max-height:100vh}.min-h-8{min-height:calc(var(--spacing)*8)}.min-h-24{min-height:calc(var(--spacing)*24)}.min-h-\\[calc\\(100\\%-44px\\)\\]{min-height:calc(100% - 44px)}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-\\(--moveo-expanded-chat-width\\){width:var(--moveo-expanded-chat-width)}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2\\.5{width:calc(var(--spacing)*2.5)}.w-3{width:calc(var(--spacing)*3)}.w-3xs{width:var(--container-3xs)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-11{width:calc(var(--spacing)*11)}.w-12{width:calc(var(--spacing)*12)}.w-32{width:calc(var(--spacing)*32)}.w-72{width:calc(var(--spacing)*72)}.w-\\[2px\\]{width:2px}.w-\\[18px\\]{width:18px}.w-\\[28px\\]{width:28px}.w-\\[42px\\]{width:42px}.w-\\[328px\\]{width:328px}.w-\\[calc\\(100\\%\\+48px\\)\\]{width:calc(100% + 48px)}.w-\\[calc\\(100\\%-24px\\)\\]{width:calc(100% - 24px)}.w-\\[calc\\(100\\%-40px\\)\\]{width:calc(100% - 40px)}.w-\\[var\\(--moveo-chat-width\\)\\]{width:var(--moveo-chat-width)}.w-\\[var\\(--moveo-expanded-chat-width\\)\\]{width:var(--moveo-expanded-chat-width)}.w-\\[var\\(--moveo-modal-tall-width\\)\\]{width:var(--moveo-modal-tall-width)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-max{width:max-content}.w-sm{width:var(--container-sm)}.w-xs{width:var(--container-xs)}.max-w-2xl{max-width:var(--container-2xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-18{max-width:calc(var(--spacing)*18)}.max-w-\\[18rem\\]{max-width:18rem}.max-w-\\[200px\\]{max-width:200px}.max-w-fit{max-width:fit-content}.max-w-full{max-width:100%}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-7{min-width:calc(var(--spacing)*7)}.min-w-20{min-width:calc(var(--spacing)*20)}.min-w-24{min-width:calc(var(--spacing)*24)}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[156px\\]{min-width:156px}.min-w-\\[260px\\]{min-width:260px}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.min-w-auto{min-width:auto}.min-w-fit{min-width:fit-content}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-\\[130px\\]{flex-basis:130px}.basis-\\[336px\\]{flex-basis:336px}.basis-\\[400px\\]{flex-basis:400px}.basis-full{flex-basis:100%}.origin-\\(--radix-popover-content-transform-origin\\){transform-origin:var(--radix-popover-content-transform-origin)}.origin-\\(--radix-select-content-transform-origin\\){transform-origin:var(--radix-select-content-transform-origin)}.origin-center{transform-origin:50%}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1/2*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-6{--tw-translate-x:calc(var(--spacing)*-6);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-12{--tw-translate-x:calc(var(--spacing)*-12);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-6{--tw-translate-x:calc(var(--spacing)*6);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-\\[-50\\%\\]{--tw-translate-x:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-0\\.5{--tw-translate-y:calc(var(--spacing)*-.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-2{--tw-translate-y:calc(var(--spacing)*2);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-4{--tw-translate-y:calc(var(--spacing)*4);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\\[-50\\%\\]{--tw-translate-y:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-\\[fadeIn_0\\.3s_forwards\\]{animation:.3s forwards fadeIn}.animate-\\[slide-in-up_0\\.2s_ease-out\\]{animation:.2s ease-out slide-in-up}.animate-\\[typing_1\\.2s_ease-in-out_infinite\\]{animation:1.2s ease-in-out infinite typing}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize{resize:both}.scroll-my-1{scroll-margin-block:calc(var(--spacing)*1)}.list-none{list-style-type:none}.appearance-none{appearance:none}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-\\[36px_16px_36px\\]{grid-template-columns:36px 16px 36px}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:calc(var(--spacing)*0)}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-12{gap:calc(var(--spacing)*12)}.gap-\\[2px\\]{gap:2px}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\(--moveo-border-radius-base\\){border-radius:var(--moveo-border-radius-base)}.rounded-\\(--moveo-new-border-radius-base\\){border-radius:var(--moveo-new-border-radius-base)}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-\\[var\\(--moveo-border-radius-base\\)\\]{border-radius:var(--moveo-border-radius-base)}.rounded-\\[var\\(--moveo-new-border-radius-base\\)\\]{border-radius:var(--moveo-new-border-radius-base)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-none{border-radius:0}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t-xl{border-top-left-radius:var(--radius-xl);border-top-right-radius:var(--radius-xl)}.rounded-l-lg{border-top-left-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.rounded-r-lg{border-top-right-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-none{--tw-border-style:none;border-style:none}.border-emerald-200\\/60{border-color:#a4f4cf99}@supports (color:color-mix(in lab, red, red)){.border-emerald-200\\/60{border-color:color-mix(in oklab,var(--color-emerald-200)60%,transparent)}}.border-emerald-500\\/20{border-color:#00bb7f33}@supports (color:color-mix(in lab, red, red)){.border-emerald-500\\/20{border-color:color-mix(in oklab,var(--color-emerald-500)20%,transparent)}}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-700{border-color:var(--color-gray-700)}.border-rose-200\\/60{border-color:#ffccd399}@supports (color:color-mix(in lab, red, red)){.border-rose-200\\/60{border-color:color-mix(in oklab,var(--color-rose-200)60%,transparent)}}.border-sky-200\\/60{border-color:#b8e6fe99}@supports (color:color-mix(in lab, red, red)){.border-sky-200\\/60{border-color:color-mix(in oklab,var(--color-sky-200)60%,transparent)}}.border-slate-200\\/80{border-color:#e2e8f0cc}@supports (color:color-mix(in lab, red, red)){.border-slate-200\\/80{border-color:color-mix(in oklab,var(--color-slate-200)80%,transparent)}}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.border-t-rose-400\\/60{border-top-color:#ff667f99}@supports (color:color-mix(in lab, red, red)){.border-t-rose-400\\/60{border-top-color:color-mix(in oklab,var(--color-rose-400)60%,transparent)}}.border-t-sky-400\\/60{border-top-color:#00bcfe99}@supports (color:color-mix(in lab, red, red)){.border-t-sky-400\\/60{border-top-color:color-mix(in oklab,var(--color-sky-400)60%,transparent)}}.border-t-sky-500\\/60{border-top-color:#00a5ef99}@supports (color:color-mix(in lab, red, red)){.border-t-sky-500\\/60{border-top-color:color-mix(in oklab,var(--color-sky-500)60%,transparent)}}.border-t-transparent{border-top-color:#0000}.border-r-rose-300\\/30{border-right-color:#ffa2ae4d}@supports (color:color-mix(in lab, red, red)){.border-r-rose-300\\/30{border-right-color:color-mix(in oklab,var(--color-rose-300)30%,transparent)}}.border-r-sky-300\\/30{border-right-color:#77d4ff4d}@supports (color:color-mix(in lab, red, red)){.border-r-sky-300\\/30{border-right-color:color-mix(in oklab,var(--color-sky-300)30%,transparent)}}.border-r-sky-400\\/30{border-right-color:#00bcfe4d}@supports (color:color-mix(in lab, red, red)){.border-r-sky-400\\/30{border-right-color:color-mix(in oklab,var(--color-sky-400)30%,transparent)}}.border-b-transparent{border-bottom-color:#0000}.border-l-transparent{border-left-color:#0000}.bg-\\(--color-launcher-background\\,var\\(--color-accent\\)\\){background-color:var(--color-launcher-background,var(--color-accent))}.bg-\\(--color-opening-message-background\\,var\\(--color-accent\\)\\){background-color:var(--color-opening-message-background,var(--color-accent))}.bg-\\[var\\(--background\\)\\]{background-color:var(--background)}.bg-\\[var\\(--moveo-header-background\\)\\]{background-color:var(--moveo-header-background)}.bg-\\[var\\(--moveo-header-background\\,var\\(--color-accent\\)\\)\\]{background-color:var(--moveo-header-background,var(--color-accent))}.bg-\\[var\\(--nbg-bg\\)\\]{background-color:var(--nbg-bg)}.bg-\\[var\\(--text-03\\)\\]{background-color:var(--text-03)}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-100\\/90{background-color:#fef3c6e6}@supports (color:color-mix(in lab, red, red)){.bg-amber-100\\/90{background-color:color-mix(in oklab,var(--color-amber-100)90%,transparent)}}.bg-black{background-color:var(--color-black)}.bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab, red, red)){.bg-black\\/40{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-emerald-50\\/80{background-color:#ecfdf5cc}@supports (color:color-mix(in lab, red, red)){.bg-emerald-50\\/80{background-color:color-mix(in oklab,var(--color-emerald-50)80%,transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-green-500{background-color:var(--color-green-500)}.bg-red-500{background-color:var(--color-red-500)}.bg-rose-50\\/80{background-color:#fff1f2cc}@supports (color:color-mix(in lab, red, red)){.bg-rose-50\\/80{background-color:color-mix(in oklab,var(--color-rose-50)80%,transparent)}}.bg-sky-50\\/80{background-color:#f0f9ffcc}@supports (color:color-mix(in lab, red, red)){.bg-sky-50\\/80{background-color:color-mix(in oklab,var(--color-sky-50)80%,transparent)}}.bg-sky-100{background-color:var(--color-sky-100)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-400{background-color:var(--color-slate-400)}.bg-transparent{background-color:#0000}.bg-white\\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab, red, red)){.bg-white\\/90{background-color:color-mix(in oklab,var(--color-white)90%,transparent)}}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-emerald-500{--tw-gradient-from:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-emerald-600{--tw-gradient-to:var(--color-emerald-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-white{--tw-gradient-to:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.bg-contain{background-size:contain}.bg-right{background-position:100%}.bg-no-repeat{background-repeat:no-repeat}.fill-\\(--color-launcher-background\\,var\\(--color-accent\\)\\){fill:var(--color-launcher-background,var(--color-accent))}.fill-\\(--color-launcher-foreground\\,var\\(--color-background\\)\\){fill:var(--color-launcher-foreground,var(--color-background))}.stroke-\\(--color-launcher-foreground\\,var\\(--color-background\\)\\){stroke:var(--color-launcher-foreground,var(--color-background))}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:calc(var(--spacing)*0)}.p-0\\.5{padding:calc(var(--spacing)*.5)}.p-1{padding:calc(var(--spacing)*1)}.p-1\\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.p-px{padding:1px}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-3\\.5{padding-block:calc(var(--spacing)*3.5)}.py-16{padding-block:calc(var(--spacing)*16)}.pt-1\\.5{padding-top:calc(var(--spacing)*1.5)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-\\[var\\(--moveo-new-header-height\\)\\]{padding-top:var(--moveo-new-header-height)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-4{padding-right:calc(var(--spacing)*4)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pb-10{padding-bottom:calc(var(--spacing)*10)}.pb-14{padding-bottom:calc(var(--spacing)*14)}.pb-\\[40px\\]{padding-bottom:40px}.pl-0{padding-left:calc(var(--spacing)*0)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-2{padding-left:calc(var(--spacing)*2)}.pl-3{padding-left:calc(var(--spacing)*3)}.pl-4{padding-left:calc(var(--spacing)*4)}.pl-8{padding-left:calc(var(--spacing)*8)}.text-center{text-align:center}.text-left{text-align:left}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:Inter,system-ui,-apple-system,sans-serif}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[0\\.8rem\\]{font-size:.8rem}.text-\\[0\\.65rem\\]{font-size:.65rem}.leading-4{--tw-leading:calc(var(--spacing)*4);line-height:calc(var(--spacing)*4)}.leading-5{--tw-leading:calc(var(--spacing)*5);line-height:calc(var(--spacing)*5)}.leading-6{--tw-leading:calc(var(--spacing)*6);line-height:calc(var(--spacing)*6)}.leading-7{--tw-leading:calc(var(--spacing)*7);line-height:calc(var(--spacing)*7)}.leading-8{--tw-leading:calc(var(--spacing)*8);line-height:calc(var(--spacing)*8)}.leading-none{--tw-leading:1;line-height:1}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[0\\.25em\\]{--tw-tracking:.25em;letter-spacing:.25em}.text-wrap{text-wrap:wrap}.break-words,.wrap-break-word{overflow-wrap:break-word}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.text-\\(--color-launcher-foreground\\,var\\(--color-background\\)\\){color:var(--color-launcher-foreground,var(--color-background))}.text-\\(--color-opening-message-foreground\\,var\\(--color-text-primary-foreground\\)\\){color:var(--color-opening-message-foreground,var(--color-text-primary-foreground))}.text-\\[var\\(--moveo-header-text-color\\,var\\(--color-accent\\)\\)\\]{color:var(--moveo-header-text-color,var(--color-accent))}.text-\\[var\\(--moveo-header-text-color\\,var\\(--color-element-primary-foreground\\)\\)\\]{color:var(--moveo-header-text-color,var(--color-element-primary-foreground))}.text-\\[var\\(--moveo-header-text-color\\,var\\(--color-foreground\\)\\)\\]{color:var(--moveo-header-text-color,var(--color-foreground))}.text-\\[var\\(--moveo-header-text-color\\,var\\(--color-text-primary-foreground\\)\\)\\]{color:var(--moveo-header-text-color,var(--color-text-primary-foreground))}.text-\\[var\\(--moveo-header-text-color\\,white\\)\\]{color:var(--moveo-header-text-color,white)}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-amber-800{color:var(--color-amber-800)}.text-current{color:currentColor}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-gray-600{color:var(--color-gray-600)}.text-gray-800{color:var(--color-gray-800)}.text-rose-500{color:var(--color-rose-500)}.text-rose-600{color:var(--color-rose-600)}.text-sky-500{color:var(--color-sky-500)}.text-sky-600{color:var(--color-sky-600)}.text-sky-700{color:var(--color-sky-700)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.no-underline{text-decoration-line:none}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow-\\[0_2px_8px_rgba\\(0\\,0\\,0\\,0\\.15\\)\\]{--tw-shadow:0 2px 8px var(--tw-shadow-color,#00000026);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_2px_8px_rgba\\(14\\,165\\,233\\,0\\.12\\)\\]{--tw-shadow:0 2px 8px var(--tw-shadow-color,#0ea5e91f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_2px_8px_rgba\\(16\\,185\\,129\\,0\\.15\\)\\]{--tw-shadow:0 2px 8px var(--tw-shadow-color,#10b98126);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_2px_8px_rgba\\(244\\,63\\,94\\,0\\.12\\)\\]{--tw-shadow:0 2px 8px var(--tw-shadow-color,#f43f5e1f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_4px_14px_rgba\\(16\\,185\\,129\\,0\\.25\\)\\]{--tw-shadow:0 4px 14px var(--tw-shadow-color,#10b98140);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[var\\(--moveo-shadow-bubble\\)\\]{--tw-shadow:var(--moveo-shadow-bubble);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-amber-200\\/70{--tw-shadow-color:#fee685b3}@supports (color:color-mix(in lab, red, red)){.shadow-amber-200\\/70{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-amber-200)70%,transparent)var(--tw-shadow-alpha),transparent)}}.ring-amber-300{--tw-ring-color:var(--color-amber-300)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[20px\\]{--tw-backdrop-blur:blur(20px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-saturate-150{--tw-backdrop-saturate:saturate(150%);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[color\\,box-shadow\\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[width\\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-none{transition-property:none}.delay-500{transition-delay:.5s}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-250{--tw-duration:.25s;transition-duration:.25s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-2000{--tw-duration:2s;transition-duration:2s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.will-change-transform{will-change:transform}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\\[-ms-overflow-style\\:none\\]{-ms-overflow-style:none}.\\[animation-delay\\:0\\.2s\\]{animation-delay:.2s}.\\[animation-delay\\:0\\.4s\\]{animation-delay:.4s}.\\[animation-delay\\:0s\\]{animation-delay:0s}.\\[animation-fill-mode\\:forwards\\]{animation-fill-mode:forwards}.\\[scrollbar-width\\:none\\]{scrollbar-width:none}@media (hover:hover){.group-hover\\:opacity-0:is(:where(.group):hover *){opacity:0}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.file\\:inline-flex::file-selector-button{display:inline-flex}.file\\:h-7::file-selector-button{height:calc(var(--spacing)*7)}.file\\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\\:bg-transparent::file-selector-button{background-color:#0000}.file\\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}@media (hover:hover){.hover\\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\\:scale-\\[1\\.05\\]:hover{scale:1.05}.hover\\:border-red-500\\/20:hover{border-color:#fb2c3633}@supports (color:color-mix(in lab, red, red)){.hover\\:border-red-500\\/20:hover{border-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.hover\\:bg-amber-200:hover{background-color:var(--color-amber-200)}.hover\\:bg-gray-700\\/50:hover{background-color:#36415380}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-gray-700\\/50:hover{background-color:color-mix(in oklab,var(--color-gray-700)50%,transparent)}}.hover\\:bg-sky-200:hover{background-color:var(--color-sky-200)}.hover\\:bg-slate-200:hover{background-color:var(--color-slate-200)}.hover\\:bg-white\\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-white\\/10:hover{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.hover\\:bg-gradient-to-br:hover{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.hover\\:from-red-500:hover{--tw-gradient-from:var(--color-red-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hover\\:to-red-600:hover{--tw-gradient-to:var(--color-red-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hover\\:text-\\[var\\(--color-accent\\)\\]:hover{color:var(--color-accent)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:shadow-\\[0_6px_20px_rgba\\(16\\,185\\,129\\,0\\.35\\)\\]:hover{--tw-shadow:0 6px 20px var(--tw-shadow-color,#10b98159);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\\:shadow-\\[0_6px_20px_rgba\\(239\\,68\\,68\\,0\\.35\\)\\]:hover{--tw-shadow:0 6px 20px var(--tw-shadow-color,#ef444459);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\\:shadow-sm:hover{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\\:brightness-\\[0\\.92\\]:hover{--tw-brightness:brightness(.92);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.hover\\:backdrop-blur-sm:hover{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-\\[3px\\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-amber-400:focus-visible{--tw-ring-color:var(--color-amber-400)}.focus-visible\\:ring-sky-400:focus-visible{--tw-ring-color:var(--color-sky-400)}.focus-visible\\:ring-slate-400:focus-visible{--tw-ring-color:var(--color-slate-400)}.focus-visible\\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\\:ring-offset-white:focus-visible{--tw-ring-offset-color:var(--color-white)}.focus-visible\\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.active\\:scale-\\[0\\.98\\]:active{scale:.98}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[placeholder\\]\\:text-sm[data-placeholder]{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.data-\\[placeholder\\]\\:leading-5[data-placeholder]{--tw-leading:calc(var(--spacing)*5);line-height:calc(var(--spacing)*5)}.data-\\[placeholder\\]\\:font-normal[data-placeholder]{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1>*)[data-slot=select-value]{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:flex>*)[data-slot=select-value]{display:flex}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:items-center>*)[data-slot=select-value]{align-items:center}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:gap-2>*)[data-slot=select-value]{gap:calc(var(--spacing)*2)}@media (min-width:40rem){.sm\\:block{display:block}.sm\\:flex-row{flex-direction:row}.sm\\:justify-end{justify-content:flex-end}.sm\\:text-left{text-align:left}.sm\\:text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.sm\\:text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}}@media (min-width:48rem){.md\\:flex-row{flex-direction:row}.md\\:items-center{align-items:center}.md\\:px-12{padding-inline:calc(var(--spacing)*12)}.md\\:text-left{text-align:left}.md\\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media (min-width:64rem){.lg\\:gap-16{gap:calc(var(--spacing)*16)}}.dark\\:border-emerald-500\\/30:is(.dark *){border-color:#00bb7f4d}@supports (color:color-mix(in lab, red, red)){.dark\\:border-emerald-500\\/30:is(.dark *){border-color:color-mix(in oklab,var(--color-emerald-500)30%,transparent)}}.dark\\:border-rose-500\\/30:is(.dark *){border-color:#ff23574d}@supports (color:color-mix(in lab, red, red)){.dark\\:border-rose-500\\/30:is(.dark *){border-color:color-mix(in oklab,var(--color-rose-500)30%,transparent)}}.dark\\:border-sky-500\\/30:is(.dark *){border-color:#00a5ef4d}@supports (color:color-mix(in lab, red, red)){.dark\\:border-sky-500\\/30:is(.dark *){border-color:color-mix(in oklab,var(--color-sky-500)30%,transparent)}}.dark\\:border-slate-700\\/50:is(.dark *){border-color:#31415880}@supports (color:color-mix(in lab, red, red)){.dark\\:border-slate-700\\/50:is(.dark *){border-color:color-mix(in oklab,var(--color-slate-700)50%,transparent)}}.dark\\:bg-amber-500\\/15:is(.dark *){background-color:#f99c0026}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-amber-500\\/15:is(.dark *){background-color:color-mix(in oklab,var(--color-amber-500)15%,transparent)}}.dark\\:bg-amber-500\\/20:is(.dark *){background-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-amber-500\\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}}.dark\\:bg-emerald-500\\/15:is(.dark *){background-color:#00bb7f26}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-emerald-500\\/15:is(.dark *){background-color:color-mix(in oklab,var(--color-emerald-500)15%,transparent)}}.dark\\:bg-rose-500\\/15:is(.dark *){background-color:#ff235726}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-rose-500\\/15:is(.dark *){background-color:color-mix(in oklab,var(--color-rose-500)15%,transparent)}}.dark\\:bg-sky-500\\/15:is(.dark *){background-color:#00a5ef26}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-sky-500\\/15:is(.dark *){background-color:color-mix(in oklab,var(--color-sky-500)15%,transparent)}}.dark\\:bg-sky-500\\/20:is(.dark *){background-color:#00a5ef33}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-sky-500\\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-sky-500)20%,transparent)}}.dark\\:bg-slate-700\\/50:is(.dark *){background-color:#31415880}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-slate-700\\/50:is(.dark *){background-color:color-mix(in oklab,var(--color-slate-700)50%,transparent)}}.dark\\:bg-slate-900\\/80:is(.dark *){background-color:#0f172bcc}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-slate-900\\/80:is(.dark *){background-color:color-mix(in oklab,var(--color-slate-900)80%,transparent)}}.dark\\:from-emerald-600:is(.dark *){--tw-gradient-from:var(--color-emerald-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.dark\\:to-emerald-700:is(.dark *){--tw-gradient-to:var(--color-emerald-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.dark\\:to-slate-950:is(.dark *){--tw-gradient-to:var(--color-slate-950);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.dark\\:text-amber-200:is(.dark *){color:var(--color-amber-200)}.dark\\:text-amber-300:is(.dark *){color:var(--color-amber-300)}.dark\\:text-emerald-300:is(.dark *){color:var(--color-emerald-300)}.dark\\:text-emerald-400:is(.dark *){color:var(--color-emerald-400)}.dark\\:text-rose-300:is(.dark *){color:var(--color-rose-300)}.dark\\:text-rose-400:is(.dark *){color:var(--color-rose-400)}.dark\\:text-sky-300:is(.dark *){color:var(--color-sky-300)}.dark\\:text-sky-400:is(.dark *){color:var(--color-sky-400)}.dark\\:text-slate-100:is(.dark *){color:var(--color-slate-100)}.dark\\:text-slate-200:is(.dark *){color:var(--color-slate-200)}.dark\\:text-slate-300:is(.dark *){color:var(--color-slate-300)}.dark\\:text-slate-400:is(.dark *){color:var(--color-slate-400)}.dark\\:shadow-xl:is(.dark *){--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.dark\\:shadow-slate-950\\/30:is(.dark *){--tw-shadow-color:#0206184d}@supports (color:color-mix(in lab, red, red)){.dark\\:shadow-slate-950\\/30:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-slate-950)30%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\\:ring-amber-400\\/40:is(.dark *){--tw-ring-color:#fcbb0066}@supports (color:color-mix(in lab, red, red)){.dark\\:ring-amber-400\\/40:is(.dark *){--tw-ring-color:color-mix(in oklab,var(--color-amber-400)40%,transparent)}}@media (hover:hover){.dark\\:hover\\:bg-amber-500\\/30:is(.dark *):hover{background-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.dark\\:hover\\:bg-amber-500\\/30:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-amber-500)30%,transparent)}}.dark\\:hover\\:bg-sky-500\\/30:is(.dark *):hover{background-color:#00a5ef4d}@supports (color:color-mix(in lab, red, red)){.dark\\:hover\\:bg-sky-500\\/30:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-sky-500)30%,transparent)}}.dark\\:hover\\:bg-slate-700:is(.dark *):hover{background-color:var(--color-slate-700)}.dark\\:hover\\:from-red-600:is(.dark *):hover{--tw-gradient-from:var(--color-red-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.dark\\:hover\\:to-red-700:is(.dark *):hover{--tw-gradient-to:var(--color-red-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}}.dark\\:focus-visible\\:ring-offset-slate-950:is(.dark *):focus-visible{--tw-ring-offset-color:var(--color-slate-950)}.\\[\\&_a\\]\\:cursor-pointer a{cursor:pointer}.\\[\\&_a\\:hover\\]\\:underline a:hover{text-decoration-line:underline}.\\[\\&_a\\>\\*\\]\\:pointer-events-none a>*{pointer-events:none}.\\[\\&_p\\]\\:max-w-md p{max-width:var(--container-md)}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:size-4 svg{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\\[\\&_svg\\]\\:h-6 svg{height:calc(var(--spacing)*6)}.\\[\\&_svg\\]\\:w-6 svg{width:calc(var(--spacing)*6)}.\\[\\&_svg\\]\\:flex-shrink-0 svg,.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\\'size-\\\'\\]\\)\\]\\:size-4 svg:not([class*=size-]){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\\[\\&\\:\\:-webkit-scrollbar\\]\\:hidden::-webkit-scrollbar{display:none}:is(.\\*\\:\\[span\\]\\:last\\:flex>*):is(span):last-child{display:flex}:is(.\\*\\:\\[span\\]\\:last\\:items-center>*):is(span):last-child{align-items:center}:is(.\\*\\:\\[span\\]\\:last\\:gap-2>*):is(span):last-child{gap:calc(var(--spacing)*2)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}'],sourceRoot:""}]),t.A=a},4582:function(e,t,r){e.exports=function(e){function t(e){let r,o,i,a=null;function s(...e){if(!s.enabled)return;const n=s,o=Number(new Date),i=o-(r||o);n.diff=i,n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,o)=>{if("%%"===r)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];r=i.call(n,t),e.splice(a,1),a--}return r}),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function o(e,t){let r=0,n=0,o=-1,i=0;for(;r<e.length;)if(n<t.length&&(t[n]===e[r]||"*"===t[n]))"*"===t[n]?(o=n,i=r,n++):(r++,n++);else{if(-1===o)return!1;n=o+1,i++,r=i}for(;n<t.length&&"*"===t[n];)n++;return n===t.length}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of r)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const r of t.skips)if(o(e,r))return!1;for(const r of t.names)if(o(e,r))return!0;return!1},t.humanize=r(6151),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(r=>{t[r]=e[r]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},4785:function(e){"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise(function(r,n){function o(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),r([].slice.call(arguments))}A(e,t,i,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&A(e,"error",t,{once:!0})}(e,o)})},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function c(e,t,r,n){var o,i,a,c;if(s(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),a=i[t]),void 0===a)a=i[t]=r,++e._eventsCount;else if("function"==typeof a?a=i[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(o=l(e))>0&&a.length>o&&!a.warned){a.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=a.length,c=d,console&&console.warn&&console.warn(c)}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=d.bind(n);return o.listener=r,n.wrapFn=o,o}function h(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(o):g(o,o.length)}function p(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function g(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function A(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function o(i){n.once&&e.removeEventListener(t,o),r(i)})}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return l(this)},i.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=i[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else{var c=l.length,d=g(l,c);for(r=0;r<c;++r)n(d[r],this,t)}return!0},i.prototype.addListener=function(e,t){return c(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return c(this,e,t,!0)},i.prototype.once=function(e,t){return s(t),this.on(e,u(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,u(this,e,t)),this},i.prototype.removeListener=function(e,t){var r,n,o,i,a;if(s(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){a=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},i.prototype.listeners=function(e){return h(this,e,!0)},i.prototype.rawListeners=function(e){return h(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},i.prototype.listenerCount=p,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},4922:function(e,t,r){"use strict";e.exports=r(3394)},5516:function(e){"use strict";e.exports=function(e){var t=e[1],r=e[3];if(!r)return t;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),i="/*# ".concat(o," */");return[t].concat([i]).join("\n")}return[t].join("\n")}},5677:function(e,t){"use strict";var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator,g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,f={};function m(e,t,r){this.props=e,this.context=t,this.refs=f,this.updater=r||g}function v(){}function C(e,t,r){this.props=e,this.context=t,this.refs=f,this.updater=r||g}m.prototype.isReactComponent={},m.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")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=m.prototype;var w=C.prototype=new v;w.constructor=C,A(w,m.prototype),w.isPureReactComponent=!0;var b=Array.isArray,y=Object.prototype.hasOwnProperty,k={current:null},x={key:!0,ref:!0,__self:!0,__source:!0};function _(e,t,n){var o,i={},a=null,s=null;if(null!=t)for(o in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)y.call(t,o)&&!x.hasOwnProperty(o)&&(i[o]=t[o]);var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){for(var c=Array(l),d=0;d<l;d++)c[d]=arguments[d+2];i.children=c}if(e&&e.defaultProps)for(o in l=e.defaultProps)void 0===i[o]&&(i[o]=l[o]);return{$$typeof:r,type:e,key:a,ref:s,props:i,_owner:k.current}}function S(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var B=/\/+/g;function E(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 T(e,t,o,i,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case r:case n:l=!0}}if(l)return a=a(l=e),e=""===i?"."+E(l,0):i,b(a)?(o="",null!=e&&(o=e.replace(B,"$&/")+"/"),T(a,t,o,"",function(e){return e})):null!=a&&(S(a)&&(a=function(e,t){return{$$typeof:r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,o+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(B,"$&/")+"/")+e)),t.push(a)),1;if(l=0,i=""===i?".":i+":",b(e))for(var c=0;c<e.length;c++){var d=i+E(s=e[c],c);l+=T(s,t,o,d,a)}else if(d=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"==typeof d)for(e=d.call(e),c=0;!(s=e.next()).done;)l+=T(s=s.value,t,o,d=i+E(s,c++),a);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function P(e,t,r){if(null==e)return e;var n=[],o=0;return T(e,n,"","",function(e){return t.call(r,e,o++)}),n}function I(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 D={current:null},O={transition:null},R={ReactCurrentDispatcher:D,ReactCurrentBatchConfig:O,ReactCurrentOwner:k};function L(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:P,forEach:function(e,t,r){P(e,function(){t.apply(this,arguments)},r)},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(!S(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=m,t.Fragment=o,t.Profiler=a,t.PureComponent=C,t.StrictMode=i,t.Suspense=d,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R,t.act=L,t.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=A({},e.props),i=e.key,a=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,s=k.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)y.call(t,c)&&!x.hasOwnProperty(c)&&(o[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)o.children=n;else if(1<c){l=Array(c);for(var d=0;d<c;d++)l[d]=arguments[d+2];o.children=l}return{$$typeof:r,type:e.type,key:i,ref:a,props:o,_owner:s}},t.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},t.createElement=_,t.createFactory=function(e){var t=_.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=S,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:I}},t.memo=function(e,t){return{$$typeof:u,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=O.transition;O.transition={};try{e()}finally{O.transition=t}},t.unstable_act=L,t.useCallback=function(e,t){return D.current.useCallback(e,t)},t.useContext=function(e){return D.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return D.current.useDeferredValue(e)},t.useEffect=function(e,t){return D.current.useEffect(e,t)},t.useId=function(){return D.current.useId()},t.useImperativeHandle=function(e,t,r){return D.current.useImperativeHandle(e,t,r)},t.useInsertionEffect=function(e,t){return D.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return D.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return D.current.useMemo(e,t)},t.useReducer=function(e,t,r){return D.current.useReducer(e,t,r)},t.useRef=function(e){return D.current.useRef(e)},t.useState=function(e){return D.current.useState(e)},t.useSyncExternalStore=function(e,t,r){return D.current.useSyncExternalStore(e,t,r)},t.useTransition=function(){return D.current.useTransition()},t.version="18.3.1"},6151:function(e){var t=1e3,r=60*t,n=60*r,o=24*n,i=7*o;function a(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}e.exports=function(e,s){s=s||{};var l,c,d=typeof e;if("string"===d&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var s=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return s*i;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*n;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===d&&isFinite(e))return s.long?(l=e,(c=Math.abs(l))>=o?a(l,c,o,"day"):c>=n?a(l,c,n,"hour"):c>=r?a(l,c,r,"minute"):c>=t?a(l,c,t,"second"):l+" ms"):function(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=n?Math.round(e/n)+"h":i>=r?Math.round(e/r)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},6186:function(e){"use strict";var t=[];function r(e){for(var r=-1,n=0;n<t.length;n++)if(t[n].identifier===e){r=n;break}return r}function n(e,n){for(var i={},a=[],s=0;s<e.length;s++){var l=e[s],c=n.base?l[0]+n.base:l[0],d=i[c]||0,u="".concat(c," ").concat(d);i[c]=d+1;var h=r(u),p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==h)t[h].references++,t[h].updater(p);else{var g=o(p,n);n.byIndex=s,t.splice(s,0,{identifier:u,updater:g,references:1})}a.push(u)}return a}function o(e,t){var r=t.domAPI(t);return r.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;r.update(e=t)}else r.remove()}}e.exports=function(e,o){var i=n(e=e||[],o=o||{});return function(e){e=e||[];for(var a=0;a<i.length;a++){var s=r(i[a]);t[s].references--}for(var l=n(e,o),c=0;c<i.length;c++){var d=r(i[c]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}i=l}}},7045:function(e,t,r){"use strict";var n=r(7810),o=r(2328);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);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 a=new Set,s={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(s[e]=t,e=0;e<t.length;e++)a.add(t[e])}var d=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),u=Object.prototype.hasOwnProperty,h=/^[: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]*$/,p={},g={};function A(e,t,r,n,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var f={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){f[e]=new A(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];f[t]=new A(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){f[e]=new A(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){f[e]=new A(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){f[e]=new A(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){f[e]=new A(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){f[e]=new A(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){f[e]=new A(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){f[e]=new A(e,5,!1,e.toLowerCase(),null,!1,!1)});var m=/[\-:]([a-z])/g;function v(e){return e[1].toUpperCase()}function C(e,t,r,n){var o=f.hasOwnProperty(t)?f[t]:null;(null!==o?0!==o.type:n||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,r,n){if(null==t||function(e,t,r,n){if(null!==r&&0===r.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!n&&(null!==r?!r.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,r,n))return!0;if(n)return!1;if(null!==r)switch(r.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,r,o,n)&&(r=null),n||null===o?function(e){return!!u.call(g,e)||!u.call(p,e)&&(h.test(e)?g[e]=!0:(p[e]=!0,!1))}(t)&&(null===r?e.removeAttribute(t):e.setAttribute(t,""+r)):o.mustUseProperty?e[o.propertyName]=null===r?3!==o.type&&"":r:(t=o.attributeName,n=o.attributeNamespace,null===r?e.removeAttribute(t):(r=3===(o=o.type)||4===o&&!0===r?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}"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);f[t]=new A(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);f[t]=new A(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);f[t]=new A(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){f[e]=new A(e,1,!1,e.toLowerCase(),null,!1,!1)}),f.xlinkHref=new A("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){f[e]=new A(e,1,!1,e.toLowerCase(),null,!0,!0)});var w=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,b=Symbol.for("react.element"),y=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),S=Symbol.for("react.provider"),B=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),D=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var O=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var R=Symbol.iterator;function L(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=R&&e[R]||e["@@iterator"])?e:null}var M,N=Object.assign;function U(e){if(void 0===M)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);M=t&&t[1]||""}return"\n"+M+e}var j=!1;function F(e,t){if(!e||j)return"";j=!0;var r=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(e){var n=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){n=e}e.call(t.prototype)}else{try{throw Error()}catch(e){n=e}e()}}catch(t){if(t&&n&&"string"==typeof t.stack){for(var o=t.stack.split("\n"),i=n.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{j=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?U(e):""}function $(e){switch(e.tag){case 5:return U(e.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return F(e.type,!1);case 11:return F(e.type.render,!1);case 1:return F(e.type,!0);default:return""}}function z(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 k:return"Fragment";case y:return"Portal";case _:return"Profiler";case x:return"StrictMode";case T:return"Suspense";case P:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case B:return(e.displayName||"Context")+".Consumer";case S:return(e._context.displayName||"Context")+".Provider";case E:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case I:return null!==(t=e.displayName||null)?t:z(e.type)||"Memo";case D:t=e._payload,e=e._init;try{return z(e(t))}catch(e){}}return null}function W(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 z(t);case 8:return t===x?"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 V(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function H(e){e._valueTracker||(e._valueTracker=function(e){var t=V(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==r&&"function"==typeof r.get&&"function"==typeof r.set){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){n=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=V(e)?e.checked?"true":"false":e.value),(e=n)!==r&&(t.setValue(e),!0)}function Y(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 K(e,t){var r=t.checked;return N({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=r?r:e._wrapperState.initialChecked})}function G(e,t){var r=null==t.defaultValue?"":t.defaultValue,n=null!=t.checked?t.checked:t.defaultChecked;r=q(null!=t.value?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function J(e,t){null!=(t=t.checked)&&C(e,"checked",t,!1)}function X(e,t){J(e,t);var r=q(t.value),n=t.type;if(null!=r)"number"===n?(0===r&&""===e.value||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if("submit"===n||"reset"===n)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,r):t.hasOwnProperty("defaultValue")&&ee(e,t.type,q(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Z(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!("submit"!==n&&"reset"!==n||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}""!==(r=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==r&&(e.name=r)}function ee(e,t,r){"number"===t&&Y(e.ownerDocument)===e||(null==r?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var te=Array.isArray;function re(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o<r.length;o++)t["$"+r[o]]=!0;for(r=0;r<e.length;r++)o=t.hasOwnProperty("$"+e[r].value),e[r].selected!==o&&(e[r].selected=o),o&&n&&(e[r].defaultSelected=!0)}else{for(r=""+q(r),t=null,o=0;o<e.length;o++){if(e[o].value===r)return e[o].selected=!0,void(n&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function ne(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(i(91));return N({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function oe(e,t){var r=t.value;if(null==r){if(r=t.children,t=t.defaultValue,null!=r){if(null!=t)throw Error(i(92));if(te(r)){if(1<r.length)throw Error(i(93));r=r[0]}t=r}null==t&&(t=""),r=t}e._wrapperState={initialValue:q(r)}}function ie(e,t){var r=q(t.value),n=q(t.defaultValue);null!=r&&((r=""+r)!==e.value&&(e.value=r),null==t.defaultValue&&e.defaultValue!==r&&(e.defaultValue=r)),null!=n&&(e.defaultValue=""+n)}function ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(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 le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,de,ue=(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,r,n){MSApp.execUnsafeLocalFunction(function(){return de(e,t)})}:de);function he(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&3===r.nodeType)return void(r.nodeValue=t)}e.textContent=t}var pe={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 Ae(e,t,r){return null==t||"boolean"==typeof t||""===t?"":r||"number"!=typeof t||0===t||pe.hasOwnProperty(e)&&pe[e]?(""+t).trim():t+"px"}function fe(e,t){for(var r in e=e.style,t)if(t.hasOwnProperty(r)){var n=0===r.indexOf("--"),o=Ae(r,t[r],n);"float"===r&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}Object.keys(pe).forEach(function(e){ge.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pe[t]=pe[e]})});var me=N({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ve(e,t){if(t){if(me[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(i(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(i(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(i(62))}}function Ce(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 be(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var ye=null,ke=null,xe=null;function _e(e){if(e=wo(e)){if("function"!=typeof ye)throw Error(i(280));var t=e.stateNode;t&&(t=yo(t),ye(e.stateNode,e.type,t))}}function Se(e){ke?xe?xe.push(e):xe=[e]:ke=e}function Be(){if(ke){var e=ke,t=xe;if(xe=ke=null,_e(e),t)for(e=0;e<t.length;e++)_e(t[e])}}function Ee(e,t){return e(t)}function Te(){}var Pe=!1;function Ie(e,t,r){if(Pe)return e(t,r);Pe=!0;try{return Ee(e,t,r)}finally{Pe=!1,(null!==ke||null!==xe)&&(Te(),Be())}}function De(e,t){var r=e.stateNode;if(null===r)return null;var n=yo(r);if(null===n)return null;r=n[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":(n=!n.disabled)||(n=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!n;break e;default:e=!1}if(e)return null;if(r&&"function"!=typeof r)throw Error(i(231,t,typeof r));return r}var Oe=!1;if(d)try{var Re={};Object.defineProperty(Re,"passive",{get:function(){Oe=!0}}),window.addEventListener("test",Re,Re),window.removeEventListener("test",Re,Re)}catch(de){Oe=!1}function Le(e,t,r,n,o,i,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(e){this.onError(e)}}var Me=!1,Ne=null,Ue=!1,je=null,Fe={onError:function(e){Me=!0,Ne=e}};function $e(e,t,r,n,o,i,a,s,l){Me=!1,Ne=null,Le.apply(Fe,arguments)}function ze(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(r=t.return),e=t.return}while(e)}return 3===t.tag?r:null}function We(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 qe(e){if(ze(e)!==e)throw Error(i(188))}function Ve(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=ze(e)))throw Error(i(188));return t!==e?null:e}for(var r=e,n=t;;){var o=r.return;if(null===o)break;var a=o.alternate;if(null===a){if(null!==(n=o.return)){r=n;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===r)return qe(o),e;if(a===n)return qe(o),t;a=a.sibling}throw Error(i(188))}if(r.return!==n.return)r=o,n=a;else{for(var s=!1,l=o.child;l;){if(l===r){s=!0,r=o,n=a;break}if(l===n){s=!0,n=o,r=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===r){s=!0,r=a,n=o;break}if(l===n){s=!0,n=a,r=o;break}l=l.sibling}if(!s)throw Error(i(189))}}if(r.alternate!==n)throw Error(i(190))}if(3!==r.tag)throw Error(i(188));return r.stateNode.current===r?e:t}(e))?He(e):null}function He(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=He(e);if(null!==t)return t;e=e.sibling}return null}var Qe=o.unstable_scheduleCallback,Ye=o.unstable_cancelCallback,Ke=o.unstable_shouldYield,Ge=o.unstable_requestPaint,Je=o.unstable_now,Xe=o.unstable_getCurrentPriorityLevel,Ze=o.unstable_ImmediatePriority,et=o.unstable_UserBlockingPriority,tt=o.unstable_NormalPriority,rt=o.unstable_LowPriority,nt=o.unstable_IdlePriority,ot=null,it=null,at=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(st(e)/lt|0)|0},st=Math.log,lt=Math.LN2,ct=64,dt=4194304;function ut(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 ht(e,t){var r=e.pendingLanes;if(0===r)return 0;var n=0,o=e.suspendedLanes,i=e.pingedLanes,a=268435455&r;if(0!==a){var s=a&~o;0!==s?n=ut(s):0!==(i&=a)&&(n=ut(i))}else 0!==(a=r&~o)?n=ut(a):0!==i&&(n=ut(i));if(0===n)return 0;if(0!==t&&t!==n&&0===(t&o)&&((o=n&-n)>=(i=t&-t)||16===o&&4194240&i))return t;if(4&n&&(n|=16&r),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=n;0<t;)o=1<<(r=31-at(t)),n|=e[r],t&=~o;return n}function pt(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 gt(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function At(){var e=ct;return!(4194240&(ct<<=1))&&(ct=64),e}function ft(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function mt(e,t,r){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-at(t)]=r}function vt(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-at(r),o=1<<n;o&t|e[n]&t&&(e[n]|=t),r&=~o}}var Ct=0;function wt(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var bt,yt,kt,xt,_t,St=!1,Bt=[],Et=null,Tt=null,Pt=null,It=new Map,Dt=new Map,Ot=[],Rt="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 Lt(e,t){switch(e){case"focusin":case"focusout":Et=null;break;case"dragenter":case"dragleave":Tt=null;break;case"mouseover":case"mouseout":Pt=null;break;case"pointerover":case"pointerout":It.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dt.delete(t.pointerId)}}function Mt(e,t,r,n,o,i){return null===e||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[o]},null!==t&&null!==(t=wo(t))&&yt(t),e):(e.eventSystemFlags|=n,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function Nt(e){var t=Co(e.target);if(null!==t){var r=ze(t);if(null!==r)if(13===(t=r.tag)){if(null!==(t=We(r)))return e.blockedOn=t,void _t(e.priority,function(){kt(r)})}else if(3===t&&r.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===r.tag?r.stateNode.containerInfo:null)}e.blockedOn=null}function Ut(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var r=Kt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==r)return null!==(t=wo(r))&&yt(t),e.blockedOn=r,!1;var n=new(r=e.nativeEvent).constructor(r.type,r);we=n,r.target.dispatchEvent(n),we=null,t.shift()}return!0}function jt(e,t,r){Ut(e)&&r.delete(t)}function Ft(){St=!1,null!==Et&&Ut(Et)&&(Et=null),null!==Tt&&Ut(Tt)&&(Tt=null),null!==Pt&&Ut(Pt)&&(Pt=null),It.forEach(jt),Dt.forEach(jt)}function $t(e,t){e.blockedOn===t&&(e.blockedOn=null,St||(St=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Ft)))}function zt(e){function t(t){return $t(t,e)}if(0<Bt.length){$t(Bt[0],e);for(var r=1;r<Bt.length;r++){var n=Bt[r];n.blockedOn===e&&(n.blockedOn=null)}}for(null!==Et&&$t(Et,e),null!==Tt&&$t(Tt,e),null!==Pt&&$t(Pt,e),It.forEach(t),Dt.forEach(t),r=0;r<Ot.length;r++)(n=Ot[r]).blockedOn===e&&(n.blockedOn=null);for(;0<Ot.length&&null===(r=Ot[0]).blockedOn;)Nt(r),null===r.blockedOn&&Ot.shift()}var Wt=w.ReactCurrentBatchConfig,qt=!0;function Vt(e,t,r,n){var o=Ct,i=Wt.transition;Wt.transition=null;try{Ct=1,Qt(e,t,r,n)}finally{Ct=o,Wt.transition=i}}function Ht(e,t,r,n){var o=Ct,i=Wt.transition;Wt.transition=null;try{Ct=4,Qt(e,t,r,n)}finally{Ct=o,Wt.transition=i}}function Qt(e,t,r,n){if(qt){var o=Kt(e,t,r,n);if(null===o)qn(e,t,n,Yt,r),Lt(e,n);else if(function(e,t,r,n,o){switch(t){case"focusin":return Et=Mt(Et,e,t,r,n,o),!0;case"dragenter":return Tt=Mt(Tt,e,t,r,n,o),!0;case"mouseover":return Pt=Mt(Pt,e,t,r,n,o),!0;case"pointerover":var i=o.pointerId;return It.set(i,Mt(It.get(i)||null,e,t,r,n,o)),!0;case"gotpointercapture":return i=o.pointerId,Dt.set(i,Mt(Dt.get(i)||null,e,t,r,n,o)),!0}return!1}(o,e,t,r,n))n.stopPropagation();else if(Lt(e,n),4&t&&-1<Rt.indexOf(e)){for(;null!==o;){var i=wo(o);if(null!==i&&bt(i),null===(i=Kt(e,t,r,n))&&qn(e,t,n,Yt,r),i===o)break;o=i}null!==o&&n.stopPropagation()}else qn(e,t,n,null,r)}}var Yt=null;function Kt(e,t,r,n){if(Yt=null,null!==(e=Co(e=be(n))))if(null===(t=ze(e)))e=null;else if(13===(r=t.tag)){if(null!==(e=We(t)))return e;e=null}else if(3===r){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Yt=e,null}function Gt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Xe()){case Ze:return 1;case et:return 4;case tt:case rt:return 16;case nt:return 536870912;default:return 16}default:return 16}}var Jt=null,Xt=null,Zt=null;function er(){if(Zt)return Zt;var e,t,r=Xt,n=r.length,o="value"in Jt?Jt.value:Jt.textContent,i=o.length;for(e=0;e<n&&r[e]===o[e];e++);var a=n-e;for(t=1;t<=a&&r[n-t]===o[i-t];t++);return Zt=o.slice(e,1<t?1-t:void 0)}function tr(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 rr(){return!0}function nr(){return!1}function or(e){function t(t,r,n,o,i){for(var a in this._reactName=t,this._targetInst=n,this.type=r,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)?rr:nr,this.isPropagationStopped=nr,this}return N(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=rr)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=rr)},persist:function(){},isPersistent:rr}),t}var ir,ar,sr,lr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cr=or(lr),dr=N({},lr,{view:0,detail:0}),ur=or(dr),hr=N({},dr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xr,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!==sr&&(sr&&"mousemove"===e.type?(ir=e.screenX-sr.screenX,ar=e.screenY-sr.screenY):ar=ir=0,sr=e),ir)},movementY:function(e){return"movementY"in e?e.movementY:ar}}),pr=or(hr),gr=or(N({},hr,{dataTransfer:0})),Ar=or(N({},dr,{relatedTarget:0})),fr=or(N({},lr,{animationName:0,elapsedTime:0,pseudoElement:0})),mr=N({},lr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vr=or(mr),Cr=or(N({},lr,{data:0})),wr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},br={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"},yr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=yr[e])&&!!t[e]}function xr(){return kr}var _r=N({},dr,{key:function(e){if(e.key){var t=wr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tr(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?br[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xr,charCode:function(e){return"keypress"===e.type?tr(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tr(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Sr=or(_r),Br=or(N({},hr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Er=or(N({},dr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xr})),Tr=or(N({},lr,{propertyName:0,elapsedTime:0,pseudoElement:0})),Pr=N({},hr,{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}),Ir=or(Pr),Dr=[9,13,27,32],Or=d&&"CompositionEvent"in window,Rr=null;d&&"documentMode"in document&&(Rr=document.documentMode);var Lr=d&&"TextEvent"in window&&!Rr,Mr=d&&(!Or||Rr&&8<Rr&&11>=Rr),Nr=String.fromCharCode(32),Ur=!1;function jr(e,t){switch(e){case"keyup":return-1!==Dr.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fr(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var $r=!1,zr={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 Wr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!zr[e.type]:"textarea"===t}function qr(e,t,r,n){Se(n),0<(t=Hn(t,"onChange")).length&&(r=new cr("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Vr=null,Hr=null;function Qr(e){Un(e,0)}function Yr(e){if(Q(bo(e)))return e}function Kr(e,t){if("change"===e)return t}var Gr=!1;if(d){var Jr;if(d){var Xr="oninput"in document;if(!Xr){var Zr=document.createElement("div");Zr.setAttribute("oninput","return;"),Xr="function"==typeof Zr.oninput}Jr=Xr}else Jr=!1;Gr=Jr&&(!document.documentMode||9<document.documentMode)}function en(){Vr&&(Vr.detachEvent("onpropertychange",tn),Hr=Vr=null)}function tn(e){if("value"===e.propertyName&&Yr(Hr)){var t=[];qr(t,Hr,e,be(e)),Ie(Qr,t)}}function rn(e,t,r){"focusin"===e?(en(),Hr=r,(Vr=t).attachEvent("onpropertychange",tn)):"focusout"===e&&en()}function nn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Yr(Hr)}function on(e,t){if("click"===e)return Yr(t)}function an(e,t){if("input"===e||"change"===e)return Yr(t)}var sn="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function ln(e,t){if(sn(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var o=r[n];if(!u.call(t,o)||!sn(e[o],t[o]))return!1}return!0}function cn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function dn(e,t){var r,n=cn(e);for(e=0;n;){if(3===n.nodeType){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=cn(n)}}function un(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?un(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hn(){for(var e=window,t=Y();t instanceof e.HTMLIFrameElement;){try{var r="string"==typeof t.contentWindow.location.href}catch(e){r=!1}if(!r)break;t=Y((e=t.contentWindow).document)}return t}function pn(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 gn(e){var t=hn(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&un(r.ownerDocument.documentElement,r)){if(null!==n&&pn(r))if(t=n.start,void 0===(e=n.end)&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if((e=(t=r.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=r.textContent.length,i=Math.min(n.start,o);n=void 0===n.end?i:Math.min(n.end,o),!e.extend&&i>n&&(o=n,n=i,i=o),o=dn(r,i);var a=dn(r,n);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>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=r;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof r.focus&&r.focus(),r=0;r<t.length;r++)(e=t[r]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var An=d&&"documentMode"in document&&11>=document.documentMode,fn=null,mn=null,vn=null,Cn=!1;function wn(e,t,r){var n=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;Cn||null==fn||fn!==Y(n)||(n="selectionStart"in(n=fn)&&pn(n)?{start:n.selectionStart,end:n.selectionEnd}:{anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},vn&&ln(vn,n)||(vn=n,0<(n=Hn(mn,"onSelect")).length&&(t=new cr("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=fn)))}function bn(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var yn={animationend:bn("Animation","AnimationEnd"),animationiteration:bn("Animation","AnimationIteration"),animationstart:bn("Animation","AnimationStart"),transitionend:bn("Transition","TransitionEnd")},kn={},xn={};function _n(e){if(kn[e])return kn[e];if(!yn[e])return e;var t,r=yn[e];for(t in r)if(r.hasOwnProperty(t)&&t in xn)return kn[e]=r[t];return e}d&&(xn=document.createElement("div").style,"AnimationEvent"in window||(delete yn.animationend.animation,delete yn.animationiteration.animation,delete yn.animationstart.animation),"TransitionEvent"in window||delete yn.transitionend.transition);var Sn=_n("animationend"),Bn=_n("animationiteration"),En=_n("animationstart"),Tn=_n("transitionend"),Pn=new Map,In="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 Dn(e,t){Pn.set(e,t),l(t,[e])}for(var On=0;On<In.length;On++){var Rn=In[On];Dn(Rn.toLowerCase(),"on"+(Rn[0].toUpperCase()+Rn.slice(1)))}Dn(Sn,"onAnimationEnd"),Dn(Bn,"onAnimationIteration"),Dn(En,"onAnimationStart"),Dn("dblclick","onDoubleClick"),Dn("focusin","onFocus"),Dn("focusout","onBlur"),Dn(Tn,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ln="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(" "),Mn=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ln));function Nn(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,function(e,t,r,n,o,a,s,l,c){if($e.apply(this,arguments),Me){if(!Me)throw Error(i(198));var d=Ne;Me=!1,Ne=null,Ue||(Ue=!0,je=d)}}(n,t,void 0,e),e.currentTarget=null}function Un(e,t){t=!!(4&t);for(var r=0;r<e.length;r++){var n=e[r],o=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var a=n.length-1;0<=a;a--){var s=n[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==i&&o.isPropagationStopped())break e;Nn(o,s,c),i=l}else for(a=0;a<n.length;a++){if(l=(s=n[a]).instance,c=s.currentTarget,s=s.listener,l!==i&&o.isPropagationStopped())break e;Nn(o,s,c),i=l}}}if(Ue)throw e=je,Ue=!1,je=null,e}function jn(e,t){var r=t[fo];void 0===r&&(r=t[fo]=new Set);var n=e+"__bubble";r.has(n)||(Wn(t,e,2,!1),r.add(n))}function Fn(e,t,r){var n=0;t&&(n|=4),Wn(r,e,n,t)}var $n="_reactListening"+Math.random().toString(36).slice(2);function zn(e){if(!e[$n]){e[$n]=!0,a.forEach(function(t){"selectionchange"!==t&&(Mn.has(t)||Fn(t,!1,e),Fn(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[$n]||(t[$n]=!0,Fn("selectionchange",!1,t))}}function Wn(e,t,r,n){switch(Gt(t)){case 1:var o=Vt;break;case 4:o=Ht;break;default:o=Qt}r=o.bind(null,t,r,e),o=void 0,!Oe||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),n?void 0!==o?e.addEventListener(t,r,{capture:!0,passive:o}):e.addEventListener(t,r,!0):void 0!==o?e.addEventListener(t,r,{passive:o}):e.addEventListener(t,r,!1)}function qn(e,t,r,n,o){var i=n;if(!(1&t||2&t||null===n))e:for(;;){if(null===n)return;var a=n.tag;if(3===a||4===a){var s=n.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===a)for(a=n.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){n=i=a;continue e}s=s.parentNode}}n=n.return}Ie(function(){var n=i,o=be(r),a=[];e:{var s=Pn.get(e);if(void 0!==s){var l=cr,c=e;switch(e){case"keypress":if(0===tr(r))break e;case"keydown":case"keyup":l=Sr;break;case"focusin":c="focus",l=Ar;break;case"focusout":c="blur",l=Ar;break;case"beforeblur":case"afterblur":l=Ar;break;case"click":if(2===r.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=pr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=gr;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Er;break;case Sn:case Bn:case En:l=fr;break;case Tn:l=Tr;break;case"scroll":l=ur;break;case"wheel":l=Ir;break;case"copy":case"cut":case"paste":l=vr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Br}var d=!!(4&t),u=!d&&"scroll"===e,h=d?null!==s?s+"Capture":null:s;d=[];for(var p,g=n;null!==g;){var A=(p=g).stateNode;if(5===p.tag&&null!==A&&(p=A,null!==h&&null!=(A=De(g,h))&&d.push(Vn(g,A,p))),u)break;g=g.return}0<d.length&&(s=new l(s,c,null,r,o),a.push({event:s,listeners:d}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||r===we||!(c=r.relatedTarget||r.fromElement)||!Co(c)&&!c[Ao])&&(l||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=n,null!==(c=(c=r.relatedTarget||r.toElement)?Co(c):null)&&(c!==(u=ze(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=n),l!==c)){if(d=pr,A="onMouseLeave",h="onMouseEnter",g="mouse","pointerout"!==e&&"pointerover"!==e||(d=Br,A="onPointerLeave",h="onPointerEnter",g="pointer"),u=null==l?s:bo(l),p=null==c?s:bo(c),(s=new d(A,g+"leave",l,r,o)).target=u,s.relatedTarget=p,A=null,Co(o)===n&&((d=new d(h,g+"enter",c,r,o)).target=p,d.relatedTarget=u,A=d),u=A,l&&c)e:{for(h=c,g=0,p=d=l;p;p=Qn(p))g++;for(p=0,A=h;A;A=Qn(A))p++;for(;0<g-p;)d=Qn(d),g--;for(;0<p-g;)h=Qn(h),p--;for(;g--;){if(d===h||null!==h&&d===h.alternate)break e;d=Qn(d),h=Qn(h)}d=null}else d=null;null!==l&&Yn(a,s,l,d,!1),null!==c&&null!==u&&Yn(a,u,c,d,!0)}if("select"===(l=(s=n?bo(n):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var f=Kr;else if(Wr(s))if(Gr)f=an;else{f=nn;var m=rn}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(f=on);switch(f&&(f=f(e,n))?qr(a,f,r,o):(m&&m(e,s,n),"focusout"===e&&(m=s._wrapperState)&&m.controlled&&"number"===s.type&&ee(s,"number",s.value)),m=n?bo(n):window,e){case"focusin":(Wr(m)||"true"===m.contentEditable)&&(fn=m,mn=n,vn=null);break;case"focusout":vn=mn=fn=null;break;case"mousedown":Cn=!0;break;case"contextmenu":case"mouseup":case"dragend":Cn=!1,wn(a,r,o);break;case"selectionchange":if(An)break;case"keydown":case"keyup":wn(a,r,o)}var v;if(Or)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else $r?jr(e,r)&&(C="onCompositionEnd"):"keydown"===e&&229===r.keyCode&&(C="onCompositionStart");C&&(Mr&&"ko"!==r.locale&&($r||"onCompositionStart"!==C?"onCompositionEnd"===C&&$r&&(v=er()):(Xt="value"in(Jt=o)?Jt.value:Jt.textContent,$r=!0)),0<(m=Hn(n,C)).length&&(C=new Cr(C,e,null,r,o),a.push({event:C,listeners:m}),(v||null!==(v=Fr(r)))&&(C.data=v))),(v=Lr?function(e,t){switch(e){case"compositionend":return Fr(t);case"keypress":return 32!==t.which?null:(Ur=!0,Nr);case"textInput":return(e=t.data)===Nr&&Ur?null:e;default:return null}}(e,r):function(e,t){if($r)return"compositionend"===e||!Or&&jr(e,t)?(e=er(),Zt=Xt=Jt=null,$r=!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 Mr&&"ko"!==t.locale?null:t.data}}(e,r))&&0<(n=Hn(n,"onBeforeInput")).length&&(o=new Cr("onBeforeInput","beforeinput",null,r,o),a.push({event:o,listeners:n}),o.data=v)}Un(a,t)})}function Vn(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Hn(e,t){for(var r=t+"Capture",n=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=De(e,r))&&n.unshift(Vn(e,i,o)),null!=(i=De(e,t))&&n.push(Vn(e,i,o))),e=e.return}return n}function Qn(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Yn(e,t,r,n,o){for(var i=t._reactName,a=[];null!==r&&r!==n;){var s=r,l=s.alternate,c=s.stateNode;if(null!==l&&l===n)break;5===s.tag&&null!==c&&(s=c,o?null!=(l=De(r,i))&&a.unshift(Vn(r,l,s)):o||null!=(l=De(r,i))&&a.push(Vn(r,l,s))),r=r.return}0!==a.length&&e.push({event:t,listeners:a})}var Kn=/\r\n?/g,Gn=/\u0000|\uFFFD/g;function Jn(e){return("string"==typeof e?e:""+e).replace(Kn,"\n").replace(Gn,"")}function Xn(e,t,r){if(t=Jn(t),Jn(e)!==t&&r)throw Error(i(425))}function Zn(){}var eo=null,to=null;function ro(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var no="function"==typeof setTimeout?setTimeout:void 0,oo="function"==typeof clearTimeout?clearTimeout:void 0,io="function"==typeof Promise?Promise:void 0,ao="function"==typeof queueMicrotask?queueMicrotask:void 0!==io?function(e){return io.resolve(null).then(e).catch(so)}:no;function so(e){setTimeout(function(){throw e})}function lo(e,t){var r=t,n=0;do{var o=r.nextSibling;if(e.removeChild(r),o&&8===o.nodeType)if("/$"===(r=o.data)){if(0===n)return e.removeChild(o),void zt(t);n--}else"$"!==r&&"$?"!==r&&"$!"!==r||n++;r=o}while(r);zt(t)}function co(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 uo(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var r=e.data;if("$"===r||"$!"===r||"$?"===r){if(0===t)return e;t--}else"/$"===r&&t++}e=e.previousSibling}return null}var ho=Math.random().toString(36).slice(2),po="__reactFiber$"+ho,go="__reactProps$"+ho,Ao="__reactContainer$"+ho,fo="__reactEvents$"+ho,mo="__reactListeners$"+ho,vo="__reactHandles$"+ho;function Co(e){var t=e[po];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Ao]||r[po]){if(r=t.alternate,null!==t.child||null!==r&&null!==r.child)for(e=uo(e);null!==e;){if(r=e[po])return r;e=uo(e)}return t}r=(e=r).parentNode}return null}function wo(e){return!(e=e[po]||e[Ao])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function bo(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(i(33))}function yo(e){return e[go]||null}var ko=[],xo=-1;function _o(e){return{current:e}}function So(e){0>xo||(e.current=ko[xo],ko[xo]=null,xo--)}function Bo(e,t){xo++,ko[xo]=e.current,e.current=t}var Eo={},To=_o(Eo),Po=_o(!1),Io=Eo;function Do(e,t){var r=e.type.contextTypes;if(!r)return Eo;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in r)i[o]=t[o];return n&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Oo(e){return null!=e.childContextTypes}function Ro(){So(Po),So(To)}function Lo(e,t,r){if(To.current!==Eo)throw Error(i(168));Bo(To,t),Bo(Po,r)}function Mo(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,"function"!=typeof n.getChildContext)return r;for(var o in n=n.getChildContext())if(!(o in t))throw Error(i(108,W(e)||"Unknown",o));return N({},r,n)}function No(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Eo,Io=To.current,Bo(To,e),Bo(Po,Po.current),!0}function Uo(e,t,r){var n=e.stateNode;if(!n)throw Error(i(169));r?(e=Mo(e,t,Io),n.__reactInternalMemoizedMergedChildContext=e,So(Po),So(To),Bo(To,e)):So(Po),Bo(Po,r)}var jo=null,Fo=!1,$o=!1;function zo(e){null===jo?jo=[e]:jo.push(e)}function Wo(){if(!$o&&null!==jo){$o=!0;var e=0,t=Ct;try{var r=jo;for(Ct=1;e<r.length;e++){var n=r[e];do{n=n(!0)}while(null!==n)}jo=null,Fo=!1}catch(t){throw null!==jo&&(jo=jo.slice(e+1)),Qe(Ze,Wo),t}finally{Ct=t,$o=!1}}return null}var qo=[],Vo=0,Ho=null,Qo=0,Yo=[],Ko=0,Go=null,Jo=1,Xo="";function Zo(e,t){qo[Vo++]=Qo,qo[Vo++]=Ho,Ho=e,Qo=t}function ei(e,t,r){Yo[Ko++]=Jo,Yo[Ko++]=Xo,Yo[Ko++]=Go,Go=e;var n=Jo;e=Xo;var o=32-at(n)-1;n&=~(1<<o),r+=1;var i=32-at(t)+o;if(30<i){var a=o-o%5;i=(n&(1<<a)-1).toString(32),n>>=a,o-=a,Jo=1<<32-at(t)+o|r<<o|n,Xo=i+e}else Jo=1<<i|r<<o|n,Xo=e}function ti(e){null!==e.return&&(Zo(e,1),ei(e,1,0))}function ri(e){for(;e===Ho;)Ho=qo[--Vo],qo[Vo]=null,Qo=qo[--Vo],qo[Vo]=null;for(;e===Go;)Go=Yo[--Ko],Yo[Ko]=null,Xo=Yo[--Ko],Yo[Ko]=null,Jo=Yo[--Ko],Yo[Ko]=null}var ni=null,oi=null,ii=!1,ai=null;function si(e,t){var r=Ic(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,null===(t=e.deletions)?(e.deletions=[r],e.flags|=16):t.push(r)}function li(e,t){switch(e.tag){case 5:var r=e.type;return null!==(t=1!==t.nodeType||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ni=e,oi=co(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ni=e,oi=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(r=null!==Go?{id:Jo,overflow:Xo}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},(r=Ic(18,null,null,0)).stateNode=t,r.return=e,e.child=r,ni=e,oi=null,!0);default:return!1}}function ci(e){return!(!(1&e.mode)||128&e.flags)}function di(e){if(ii){var t=oi;if(t){var r=t;if(!li(e,t)){if(ci(e))throw Error(i(418));t=co(r.nextSibling);var n=ni;t&&li(e,t)?si(n,r):(e.flags=-4097&e.flags|2,ii=!1,ni=e)}}else{if(ci(e))throw Error(i(418));e.flags=-4097&e.flags|2,ii=!1,ni=e}}}function ui(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ni=e}function hi(e){if(e!==ni)return!1;if(!ii)return ui(e),ii=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ro(e.type,e.memoizedProps)),t&&(t=oi)){if(ci(e))throw pi(),Error(i(418));for(;t;)si(e,t),t=co(t.nextSibling)}if(ui(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var r=e.data;if("/$"===r){if(0===t){oi=co(e.nextSibling);break e}t--}else"$"!==r&&"$!"!==r&&"$?"!==r||t++}e=e.nextSibling}oi=null}}else oi=ni?co(e.stateNode.nextSibling):null;return!0}function pi(){for(var e=oi;e;)e=co(e.nextSibling)}function gi(){oi=ni=null,ii=!1}function Ai(e){null===ai?ai=[e]:ai.push(e)}var fi=w.ReactCurrentBatchConfig;function mi(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(i(309));var n=r.stateNode}if(!n)throw Error(i(147,e));var o=n,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=o.refs;null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!=typeof e)throw Error(i(284));if(!r._owner)throw Error(i(290,e))}return e}function vi(e,t){throw e=Object.prototype.toString.call(t),Error(i(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ci(e){return(0,e._init)(e._payload)}function wi(e){function t(t,r){if(e){var n=t.deletions;null===n?(t.deletions=[r],t.flags|=16):n.push(r)}}function r(r,n){if(!e)return null;for(;null!==n;)t(r,n),n=n.sibling;return null}function n(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 o(e,t){return(e=Oc(e,t)).index=0,e.sibling=null,e}function a(t,r,n){return t.index=n,e?null!==(n=t.alternate)?(n=n.index)<r?(t.flags|=2,r):n:(t.flags|=2,r):(t.flags|=1048576,r)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,r,n){return null===t||6!==t.tag?((t=Nc(r,e.mode,n)).return=e,t):((t=o(t,r)).return=e,t)}function c(e,t,r,n){var i=r.type;return i===k?u(e,t,r.props.children,n,r.key):null!==t&&(t.elementType===i||"object"==typeof i&&null!==i&&i.$$typeof===D&&Ci(i)===t.type)?((n=o(t,r.props)).ref=mi(e,t,r),n.return=e,n):((n=Rc(r.type,r.key,r.props,null,e.mode,n)).ref=mi(e,t,r),n.return=e,n)}function d(e,t,r,n){return null===t||4!==t.tag||t.stateNode.containerInfo!==r.containerInfo||t.stateNode.implementation!==r.implementation?((t=Uc(r,e.mode,n)).return=e,t):((t=o(t,r.children||[])).return=e,t)}function u(e,t,r,n,i){return null===t||7!==t.tag?((t=Lc(r,e.mode,n,i)).return=e,t):((t=o(t,r)).return=e,t)}function h(e,t,r){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Nc(""+t,e.mode,r)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case b:return(r=Rc(t.type,t.key,t.props,null,e.mode,r)).ref=mi(e,null,t),r.return=e,r;case y:return(t=Uc(t,e.mode,r)).return=e,t;case D:return h(e,(0,t._init)(t._payload),r)}if(te(t)||L(t))return(t=Lc(t,e.mode,r,null)).return=e,t;vi(e,t)}return null}function p(e,t,r,n){var o=null!==t?t.key:null;if("string"==typeof r&&""!==r||"number"==typeof r)return null!==o?null:l(e,t,""+r,n);if("object"==typeof r&&null!==r){switch(r.$$typeof){case b:return r.key===o?c(e,t,r,n):null;case y:return r.key===o?d(e,t,r,n):null;case D:return p(e,t,(o=r._init)(r._payload),n)}if(te(r)||L(r))return null!==o?null:u(e,t,r,n,null);vi(e,r)}return null}function g(e,t,r,n,o){if("string"==typeof n&&""!==n||"number"==typeof n)return l(t,e=e.get(r)||null,""+n,o);if("object"==typeof n&&null!==n){switch(n.$$typeof){case b:return c(t,e=e.get(null===n.key?r:n.key)||null,n,o);case y:return d(t,e=e.get(null===n.key?r:n.key)||null,n,o);case D:return g(e,t,r,(0,n._init)(n._payload),o)}if(te(n)||L(n))return u(t,e=e.get(r)||null,n,o,null);vi(t,n)}return null}function A(o,i,s,l){for(var c=null,d=null,u=i,A=i=0,f=null;null!==u&&A<s.length;A++){u.index>A?(f=u,u=null):f=u.sibling;var m=p(o,u,s[A],l);if(null===m){null===u&&(u=f);break}e&&u&&null===m.alternate&&t(o,u),i=a(m,i,A),null===d?c=m:d.sibling=m,d=m,u=f}if(A===s.length)return r(o,u),ii&&Zo(o,A),c;if(null===u){for(;A<s.length;A++)null!==(u=h(o,s[A],l))&&(i=a(u,i,A),null===d?c=u:d.sibling=u,d=u);return ii&&Zo(o,A),c}for(u=n(o,u);A<s.length;A++)null!==(f=g(u,o,A,s[A],l))&&(e&&null!==f.alternate&&u.delete(null===f.key?A:f.key),i=a(f,i,A),null===d?c=f:d.sibling=f,d=f);return e&&u.forEach(function(e){return t(o,e)}),ii&&Zo(o,A),c}function f(o,s,l,c){var d=L(l);if("function"!=typeof d)throw Error(i(150));if(null==(l=d.call(l)))throw Error(i(151));for(var u=d=null,A=s,f=s=0,m=null,v=l.next();null!==A&&!v.done;f++,v=l.next()){A.index>f?(m=A,A=null):m=A.sibling;var C=p(o,A,v.value,c);if(null===C){null===A&&(A=m);break}e&&A&&null===C.alternate&&t(o,A),s=a(C,s,f),null===u?d=C:u.sibling=C,u=C,A=m}if(v.done)return r(o,A),ii&&Zo(o,f),d;if(null===A){for(;!v.done;f++,v=l.next())null!==(v=h(o,v.value,c))&&(s=a(v,s,f),null===u?d=v:u.sibling=v,u=v);return ii&&Zo(o,f),d}for(A=n(o,A);!v.done;f++,v=l.next())null!==(v=g(A,o,f,v.value,c))&&(e&&null!==v.alternate&&A.delete(null===v.key?f:v.key),s=a(v,s,f),null===u?d=v:u.sibling=v,u=v);return e&&A.forEach(function(e){return t(o,e)}),ii&&Zo(o,f),d}return function e(n,i,a,l){if("object"==typeof a&&null!==a&&a.type===k&&null===a.key&&(a=a.props.children),"object"==typeof a&&null!==a){switch(a.$$typeof){case b:e:{for(var c=a.key,d=i;null!==d;){if(d.key===c){if((c=a.type)===k){if(7===d.tag){r(n,d.sibling),(i=o(d,a.props.children)).return=n,n=i;break e}}else if(d.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===D&&Ci(c)===d.type){r(n,d.sibling),(i=o(d,a.props)).ref=mi(n,d,a),i.return=n,n=i;break e}r(n,d);break}t(n,d),d=d.sibling}a.type===k?((i=Lc(a.props.children,n.mode,l,a.key)).return=n,n=i):((l=Rc(a.type,a.key,a.props,null,n.mode,l)).ref=mi(n,i,a),l.return=n,n=l)}return s(n);case y:e:{for(d=a.key;null!==i;){if(i.key===d){if(4===i.tag&&i.stateNode.containerInfo===a.containerInfo&&i.stateNode.implementation===a.implementation){r(n,i.sibling),(i=o(i,a.children||[])).return=n,n=i;break e}r(n,i);break}t(n,i),i=i.sibling}(i=Uc(a,n.mode,l)).return=n,n=i}return s(n);case D:return e(n,i,(d=a._init)(a._payload),l)}if(te(a))return A(n,i,a,l);if(L(a))return f(n,i,a,l);vi(n,a)}return"string"==typeof a&&""!==a||"number"==typeof a?(a=""+a,null!==i&&6===i.tag?(r(n,i.sibling),(i=o(i,a)).return=n,n=i):(r(n,i),(i=Nc(a,n.mode,l)).return=n,n=i),s(n)):r(n,i)}}var bi=wi(!0),yi=wi(!1),ki=_o(null),xi=null,_i=null,Si=null;function Bi(){Si=_i=xi=null}function Ei(e){var t=ki.current;So(ki),e._currentValue=t}function Ti(e,t,r){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==n&&(n.childLanes|=t)):null!==n&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Pi(e,t){xi=e,Si=_i=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(Cs=!0),e.firstContext=null)}function Ii(e){var t=e._currentValue;if(Si!==e)if(e={context:e,memoizedValue:t,next:null},null===_i){if(null===xi)throw Error(i(308));_i=e,xi.dependencies={lanes:0,firstContext:e}}else _i=_i.next=e;return t}var Di=null;function Oi(e){null===Di?Di=[e]:Di.push(e)}function Ri(e,t,r,n){var o=t.interleaved;return null===o?(r.next=r,Oi(t)):(r.next=o.next,o.next=r),t.interleaved=r,Li(e,n)}function Li(e,t){e.lanes|=t;var r=e.alternate;for(null!==r&&(r.lanes|=t),r=e,e=e.return;null!==e;)e.childLanes|=t,null!==(r=e.alternate)&&(r.childLanes|=t),r=e,e=e.return;return 3===r.tag?r.stateNode:null}var Mi=!1;function Ni(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ui(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 ji(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Fi(e,t,r){var n=e.updateQueue;if(null===n)return null;if(n=n.shared,2&El){var o=n.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),n.pending=t,Li(e,r)}return null===(o=n.interleaved)?(t.next=t,Oi(n)):(t.next=o.next,o.next=t),n.interleaved=t,Li(e,r)}function $i(e,t,r){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&r)){var n=t.lanes;r|=n&=e.pendingLanes,t.lanes=r,vt(e,r)}}function zi(e,t){var r=e.updateQueue,n=e.alternate;if(null!==n&&r===(n=n.updateQueue)){var o=null,i=null;if(null!==(r=r.firstBaseUpdate)){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};null===i?o=i=a:i=i.next=a,r=r.next}while(null!==r);null===i?o=i=t:i=i.next=t}else o=i=t;return r={baseState:n.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:n.shared,effects:n.effects},void(e.updateQueue=r)}null===(e=r.lastBaseUpdate)?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Wi(e,t,r,n){var o=e.updateQueue;Mi=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var l=s,c=l.next;l.next=null,null===a?i=c:a.next=c,a=l;var d=e.alternate;null!==d&&(s=(d=d.updateQueue).lastBaseUpdate)!==a&&(null===s?d.firstBaseUpdate=c:s.next=c,d.lastBaseUpdate=l)}if(null!==i){var u=o.baseState;for(a=0,d=c=l=null,s=i;;){var h=s.lane,p=s.eventTime;if((n&h)===h){null!==d&&(d=d.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var g=e,A=s;switch(h=t,p=r,A.tag){case 1:if("function"==typeof(g=A.payload)){u=g.call(p,u,h);break e}u=g;break e;case 3:g.flags=-65537&g.flags|128;case 0:if(null==(h="function"==typeof(g=A.payload)?g.call(p,u,h):g))break e;u=N({},u,h);break e;case 2:Mi=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(h=o.effects)?o.effects=[s]:h.push(s))}else p={eventTime:p,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===d?(c=d=p,l=u):d=d.next=p,a|=h;if(null===(s=s.next)){if(null===(s=o.shared.pending))break;s=(h=s).next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}if(null===d&&(l=u),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=d,null!==(t=o.shared.interleaved)){o=t;do{a|=o.lane,o=o.next}while(o!==t)}else null===i&&(o.shared.lanes=0);Ml|=a,e.lanes=a,e.memoizedState=u}}function qi(e,t,r){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var n=e[t],o=n.callback;if(null!==o){if(n.callback=null,n=r,"function"!=typeof o)throw Error(i(191,o));o.call(n)}}}var Vi={},Hi=_o(Vi),Qi=_o(Vi),Yi=_o(Vi);function Ki(e){if(e===Vi)throw Error(i(174));return e}function Gi(e,t){switch(Bo(Yi,t),Bo(Qi,e),Bo(Hi,Vi),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}So(Hi),Bo(Hi,t)}function Ji(){So(Hi),So(Qi),So(Yi)}function Xi(e){Ki(Yi.current);var t=Ki(Hi.current),r=le(t,e.type);t!==r&&(Bo(Qi,e),Bo(Hi,r))}function Zi(e){Qi.current===e&&(So(Hi),So(Qi))}var ea=_o(0);function ta(e){for(var t=e;null!==t;){if(13===t.tag){var r=t.memoizedState;if(null!==r&&(null===(r=r.dehydrated)||"$?"===r.data||"$!"===r.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ra=[];function na(){for(var e=0;e<ra.length;e++)ra[e]._workInProgressVersionPrimary=null;ra.length=0}var oa=w.ReactCurrentDispatcher,ia=w.ReactCurrentBatchConfig,aa=0,sa=null,la=null,ca=null,da=!1,ua=!1,ha=0,pa=0;function ga(){throw Error(i(321))}function Aa(e,t){if(null===t)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!sn(e[r],t[r]))return!1;return!0}function fa(e,t,r,n,o,a){if(aa=a,sa=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,oa.current=null===e||null===e.memoizedState?Za:es,e=r(n,o),ua){a=0;do{if(ua=!1,ha=0,25<=a)throw Error(i(301));a+=1,ca=la=null,t.updateQueue=null,oa.current=ts,e=r(n,o)}while(ua)}if(oa.current=Xa,t=null!==la&&null!==la.next,aa=0,ca=la=sa=null,da=!1,t)throw Error(i(300));return e}function ma(){var e=0!==ha;return ha=0,e}function va(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ca?sa.memoizedState=ca=e:ca=ca.next=e,ca}function Ca(){if(null===la){var e=sa.alternate;e=null!==e?e.memoizedState:null}else e=la.next;var t=null===ca?sa.memoizedState:ca.next;if(null!==t)ca=t,la=e;else{if(null===e)throw Error(i(310));e={memoizedState:(la=e).memoizedState,baseState:la.baseState,baseQueue:la.baseQueue,queue:la.queue,next:null},null===ca?sa.memoizedState=ca=e:ca=ca.next=e}return ca}function wa(e,t){return"function"==typeof t?t(e):t}function ba(e){var t=Ca(),r=t.queue;if(null===r)throw Error(i(311));r.lastRenderedReducer=e;var n=la,o=n.baseQueue,a=r.pending;if(null!==a){if(null!==o){var s=o.next;o.next=a.next,a.next=s}n.baseQueue=o=a,r.pending=null}if(null!==o){a=o.next,n=n.baseState;var l=s=null,c=null,d=a;do{var u=d.lane;if((aa&u)===u)null!==c&&(c=c.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),n=d.hasEagerState?d.eagerState:e(n,d.action);else{var h={lane:u,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};null===c?(l=c=h,s=n):c=c.next=h,sa.lanes|=u,Ml|=u}d=d.next}while(null!==d&&d!==a);null===c?s=n:c.next=l,sn(n,t.memoizedState)||(Cs=!0),t.memoizedState=n,t.baseState=s,t.baseQueue=c,r.lastRenderedState=n}if(null!==(e=r.interleaved)){o=e;do{a=o.lane,sa.lanes|=a,Ml|=a,o=o.next}while(o!==e)}else null===o&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function ya(e){var t=Ca(),r=t.queue;if(null===r)throw Error(i(311));r.lastRenderedReducer=e;var n=r.dispatch,o=r.pending,a=t.memoizedState;if(null!==o){r.pending=null;var s=o=o.next;do{a=e(a,s.action),s=s.next}while(s!==o);sn(a,t.memoizedState)||(Cs=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),r.lastRenderedState=a}return[a,n]}function ka(){}function xa(e,t){var r=sa,n=Ca(),o=t(),a=!sn(n.memoizedState,o);if(a&&(n.memoizedState=o,Cs=!0),n=n.queue,Ma(Ba.bind(null,r,n,e),[e]),n.getSnapshot!==t||a||null!==ca&&1&ca.memoizedState.tag){if(r.flags|=2048,Ia(9,Sa.bind(null,r,n,o,t),void 0,null),null===Tl)throw Error(i(349));30&aa||_a(r,t,o)}return o}function _a(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},null===(t=sa.updateQueue)?(t={lastEffect:null,stores:null},sa.updateQueue=t,t.stores=[e]):null===(r=t.stores)?t.stores=[e]:r.push(e)}function Sa(e,t,r,n){t.value=r,t.getSnapshot=n,Ea(t)&&Ta(e)}function Ba(e,t,r){return r(function(){Ea(t)&&Ta(e)})}function Ea(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!sn(e,r)}catch(e){return!0}}function Ta(e){var t=Li(e,1);null!==t&&rc(t,e,1,-1)}function Pa(e){var t=va();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:wa,lastRenderedState:e},t.queue=e,e=e.dispatch=Ya.bind(null,sa,e),[t.memoizedState,e]}function Ia(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},null===(t=sa.updateQueue)?(t={lastEffect:null,stores:null},sa.updateQueue=t,t.lastEffect=e.next=e):null===(r=t.lastEffect)?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e),e}function Da(){return Ca().memoizedState}function Oa(e,t,r,n){var o=va();sa.flags|=e,o.memoizedState=Ia(1|t,r,void 0,void 0===n?null:n)}function Ra(e,t,r,n){var o=Ca();n=void 0===n?null:n;var i=void 0;if(null!==la){var a=la.memoizedState;if(i=a.destroy,null!==n&&Aa(n,a.deps))return void(o.memoizedState=Ia(t,r,i,n))}sa.flags|=e,o.memoizedState=Ia(1|t,r,i,n)}function La(e,t){return Oa(8390656,8,e,t)}function Ma(e,t){return Ra(2048,8,e,t)}function Na(e,t){return Ra(4,2,e,t)}function Ua(e,t){return Ra(4,4,e,t)}function ja(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 Fa(e,t,r){return r=null!=r?r.concat([e]):null,Ra(4,4,ja.bind(null,t,e),r)}function $a(){}function za(e,t){var r=Ca();t=void 0===t?null:t;var n=r.memoizedState;return null!==n&&null!==t&&Aa(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function Wa(e,t){var r=Ca();t=void 0===t?null:t;var n=r.memoizedState;return null!==n&&null!==t&&Aa(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function qa(e,t,r){return 21&aa?(sn(r,t)||(r=At(),sa.lanes|=r,Ml|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Cs=!0),e.memoizedState=r)}function Va(e,t){var r=Ct;Ct=0!==r&&4>r?r:4,e(!0);var n=ia.transition;ia.transition={};try{e(!1),t()}finally{Ct=r,ia.transition=n}}function Ha(){return Ca().memoizedState}function Qa(e,t,r){var n=tc(e);r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Ka(e)?Ga(t,r):null!==(r=Ri(e,t,r,n))&&(rc(r,e,n,ec()),Ja(r,t,n))}function Ya(e,t,r){var n=tc(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Ka(e))Ga(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,r);if(o.hasEagerState=!0,o.eagerState=s,sn(s,a)){var l=t.interleaved;return null===l?(o.next=o,Oi(t)):(o.next=l.next,l.next=o),void(t.interleaved=o)}}catch(e){}null!==(r=Ri(e,t,o,n))&&(rc(r,e,n,o=ec()),Ja(r,t,n))}}function Ka(e){var t=e.alternate;return e===sa||null!==t&&t===sa}function Ga(e,t){ua=da=!0;var r=e.pending;null===r?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Ja(e,t,r){if(4194240&r){var n=t.lanes;r|=n&=e.pendingLanes,t.lanes=r,vt(e,r)}}var Xa={readContext:Ii,useCallback:ga,useContext:ga,useEffect:ga,useImperativeHandle:ga,useInsertionEffect:ga,useLayoutEffect:ga,useMemo:ga,useReducer:ga,useRef:ga,useState:ga,useDebugValue:ga,useDeferredValue:ga,useTransition:ga,useMutableSource:ga,useSyncExternalStore:ga,useId:ga,unstable_isNewReconciler:!1},Za={readContext:Ii,useCallback:function(e,t){return va().memoizedState=[e,void 0===t?null:t],e},useContext:Ii,useEffect:La,useImperativeHandle:function(e,t,r){return r=null!=r?r.concat([e]):null,Oa(4194308,4,ja.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Oa(4194308,4,e,t)},useInsertionEffect:function(e,t){return Oa(4,2,e,t)},useMemo:function(e,t){var r=va();return t=void 0===t?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=va();return t=void 0!==r?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=Qa.bind(null,sa,e),[n.memoizedState,e]},useRef:function(e){return e={current:e},va().memoizedState=e},useState:Pa,useDebugValue:$a,useDeferredValue:function(e){return va().memoizedState=e},useTransition:function(){var e=Pa(!1),t=e[0];return e=Va.bind(null,e[1]),va().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=sa,o=va();if(ii){if(void 0===r)throw Error(i(407));r=r()}else{if(r=t(),null===Tl)throw Error(i(349));30&aa||_a(n,t,r)}o.memoizedState=r;var a={value:r,getSnapshot:t};return o.queue=a,La(Ba.bind(null,n,a,e),[e]),n.flags|=2048,Ia(9,Sa.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=va(),t=Tl.identifierPrefix;if(ii){var r=Xo;t=":"+t+"R"+(r=(Jo&~(1<<32-at(Jo)-1)).toString(32)+r),0<(r=ha++)&&(t+="H"+r.toString(32)),t+=":"}else t=":"+t+"r"+(r=pa++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},es={readContext:Ii,useCallback:za,useContext:Ii,useEffect:Ma,useImperativeHandle:Fa,useInsertionEffect:Na,useLayoutEffect:Ua,useMemo:Wa,useReducer:ba,useRef:Da,useState:function(){return ba(wa)},useDebugValue:$a,useDeferredValue:function(e){return qa(Ca(),la.memoizedState,e)},useTransition:function(){return[ba(wa)[0],Ca().memoizedState]},useMutableSource:ka,useSyncExternalStore:xa,useId:Ha,unstable_isNewReconciler:!1},ts={readContext:Ii,useCallback:za,useContext:Ii,useEffect:Ma,useImperativeHandle:Fa,useInsertionEffect:Na,useLayoutEffect:Ua,useMemo:Wa,useReducer:ya,useRef:Da,useState:function(){return ya(wa)},useDebugValue:$a,useDeferredValue:function(e){var t=Ca();return null===la?t.memoizedState=e:qa(t,la.memoizedState,e)},useTransition:function(){return[ya(wa)[0],Ca().memoizedState]},useMutableSource:ka,useSyncExternalStore:xa,useId:Ha,unstable_isNewReconciler:!1};function rs(e,t){if(e&&e.defaultProps){for(var r in t=N({},t),e=e.defaultProps)void 0===t[r]&&(t[r]=e[r]);return t}return t}function ns(e,t,r,n){r=null==(r=r(n,t=e.memoizedState))?t:N({},t,r),e.memoizedState=r,0===e.lanes&&(e.updateQueue.baseState=r)}var os={isMounted:function(e){return!!(e=e._reactInternals)&&ze(e)===e},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=ec(),o=tc(e),i=ji(n,o);i.payload=t,null!=r&&(i.callback=r),null!==(t=Fi(e,i,o))&&(rc(t,e,o,n),$i(t,e,o))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=ec(),o=tc(e),i=ji(n,o);i.tag=1,i.payload=t,null!=r&&(i.callback=r),null!==(t=Fi(e,i,o))&&(rc(t,e,o,n),$i(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=ec(),n=tc(e),o=ji(r,n);o.tag=2,null!=t&&(o.callback=t),null!==(t=Fi(e,o,n))&&(rc(t,e,n,r),$i(t,e,n))}};function is(e,t,r,n,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(n,i,a):!(t.prototype&&t.prototype.isPureReactComponent&&ln(r,n)&&ln(o,i))}function as(e,t,r){var n=!1,o=Eo,i=t.contextType;return"object"==typeof i&&null!==i?i=Ii(i):(o=Oo(t)?Io:To.current,i=(n=null!=(n=t.contextTypes))?Do(e,o):Eo),t=new t(r,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=os,e.stateNode=t,t._reactInternals=e,n&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function ss(e,t,r,n){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(r,n),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&os.enqueueReplaceState(t,t.state,null)}function ls(e,t,r,n){var o=e.stateNode;o.props=r,o.state=e.memoizedState,o.refs={},Ni(e);var i=t.contextType;"object"==typeof i&&null!==i?o.context=Ii(i):(i=Oo(t)?Io:To.current,o.context=Do(e,i)),o.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(ns(e,t,i,r),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&&os.enqueueReplaceState(o,o.state,null),Wi(e,r,o,n),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4194308)}function cs(e,t){try{var r="",n=t;do{r+=$(n),n=n.return}while(n);var o=r}catch(e){o="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:o,digest:null}}function ds(e,t,r){return{value:e,source:null,stack:null!=r?r:null,digest:null!=t?t:null}}function us(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var hs="function"==typeof WeakMap?WeakMap:Map;function ps(e,t,r){(r=ji(-1,r)).tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){ql||(ql=!0,Vl=n),us(0,t)},r}function gs(e,t,r){(r=ji(-1,r)).tag=3;var n=e.type.getDerivedStateFromError;if("function"==typeof n){var o=t.value;r.payload=function(){return n(o)},r.callback=function(){us(0,t)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(r.callback=function(){us(0,t),"function"!=typeof n&&(null===Hl?Hl=new Set([this]):Hl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),r}function As(e,t,r){var n=e.pingCache;if(null===n){n=e.pingCache=new hs;var o=new Set;n.set(t,o)}else void 0===(o=n.get(t))&&(o=new Set,n.set(t,o));o.has(r)||(o.add(r),e=_c.bind(null,e,t,r),t.then(e,e))}function fs(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 ms(e,t,r,n,o){return 1&e.mode?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,1===r.tag&&(null===r.alternate?r.tag=17:((t=ji(-1,1)).tag=2,Fi(r,t,1))),r.lanes|=1),e)}var vs=w.ReactCurrentOwner,Cs=!1;function ws(e,t,r,n){t.child=null===e?yi(t,null,r,n):bi(t,e.child,r,n)}function bs(e,t,r,n,o){r=r.render;var i=t.ref;return Pi(t,o),n=fa(e,t,r,n,i,o),r=ma(),null===e||Cs?(ii&&r&&ti(t),t.flags|=1,ws(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,qs(e,t,o))}function ys(e,t,r,n,o){if(null===e){var i=r.type;return"function"!=typeof i||Dc(i)||void 0!==i.defaultProps||null!==r.compare||void 0!==r.defaultProps?((e=Rc(r.type,null,n,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,ks(e,t,i,n,o))}if(i=e.child,0===(e.lanes&o)){var a=i.memoizedProps;if((r=null!==(r=r.compare)?r:ln)(a,n)&&e.ref===t.ref)return qs(e,t,o)}return t.flags|=1,(e=Oc(i,n)).ref=t.ref,e.return=t,t.child=e}function ks(e,t,r,n,o){if(null!==e){var i=e.memoizedProps;if(ln(i,n)&&e.ref===t.ref){if(Cs=!1,t.pendingProps=n=i,0===(e.lanes&o))return t.lanes=e.lanes,qs(e,t,o);131072&e.flags&&(Cs=!0)}}return Ss(e,t,r,n,o)}function xs(e,t,r){var n=t.pendingProps,o=n.children,i=null!==e?e.memoizedState:null;if("hidden"===n.mode)if(1&t.mode){if(!(1073741824&r))return e=null!==i?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Bo(Ol,Dl),Dl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=null!==i?i.baseLanes:r,Bo(Ol,Dl),Dl|=n}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Bo(Ol,Dl),Dl|=r;else null!==i?(n=i.baseLanes|r,t.memoizedState=null):n=r,Bo(Ol,Dl),Dl|=n;return ws(e,t,o,r),t.child}function _s(e,t){var r=t.ref;(null===e&&null!==r||null!==e&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Ss(e,t,r,n,o){var i=Oo(r)?Io:To.current;return i=Do(t,i),Pi(t,o),r=fa(e,t,r,n,i,o),n=ma(),null===e||Cs?(ii&&n&&ti(t),t.flags|=1,ws(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,qs(e,t,o))}function Bs(e,t,r,n,o){if(Oo(r)){var i=!0;No(t)}else i=!1;if(Pi(t,o),null===t.stateNode)Ws(e,t),as(t,r,n),ls(t,r,n,o),n=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=r.contextType;c="object"==typeof c&&null!==c?Ii(c):Do(t,c=Oo(r)?Io:To.current);var d=r.getDerivedStateFromProps,u="function"==typeof d||"function"==typeof a.getSnapshotBeforeUpdate;u||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==n||l!==c)&&ss(t,a,n,c),Mi=!1;var h=t.memoizedState;a.state=h,Wi(t,n,a,o),l=t.memoizedState,s!==n||h!==l||Po.current||Mi?("function"==typeof d&&(ns(t,r,d,n),l=t.memoizedState),(s=Mi||is(t,r,s,n,h,l,c))?(u||"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=n,t.memoizedState=l),a.props=n,a.state=l,a.context=c,n=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),n=!1)}else{a=t.stateNode,Ui(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:rs(t.type,s),a.props=c,u=t.pendingProps,h=a.context,l="object"==typeof(l=r.contextType)&&null!==l?Ii(l):Do(t,l=Oo(r)?Io:To.current);var p=r.getDerivedStateFromProps;(d="function"==typeof p||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==u||h!==l)&&ss(t,a,n,l),Mi=!1,h=t.memoizedState,a.state=h,Wi(t,n,a,o);var g=t.memoizedState;s!==u||h!==g||Po.current||Mi?("function"==typeof p&&(ns(t,r,p,n),g=t.memoizedState),(c=Mi||is(t,r,c,n,h,g,l)||!1)?(d||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(n,g,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(n,g,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=g),a.props=n,a.state=g,a.context=l,n=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),n=!1)}return Es(e,t,r,n,i,o)}function Es(e,t,r,n,o,i){_s(e,t);var a=!!(128&t.flags);if(!n&&!a)return o&&Uo(t,r,!1),qs(e,t,i);n=t.stateNode,vs.current=t;var s=a&&"function"!=typeof r.getDerivedStateFromError?null:n.render();return t.flags|=1,null!==e&&a?(t.child=bi(t,e.child,null,i),t.child=bi(t,null,s,i)):ws(e,t,s,i),t.memoizedState=n.state,o&&Uo(t,r,!0),t.child}function Ts(e){var t=e.stateNode;t.pendingContext?Lo(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Lo(0,t.context,!1),Gi(e,t.containerInfo)}function Ps(e,t,r,n,o){return gi(),Ai(o),t.flags|=256,ws(e,t,r,n),t.child}var Is,Ds,Os,Rs,Ls={dehydrated:null,treeContext:null,retryLane:0};function Ms(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ns(e,t,r){var n,o=t.pendingProps,a=ea.current,s=!1,l=!!(128&t.flags);if((n=l)||(n=(null===e||null!==e.memoizedState)&&!!(2&a)),n?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Bo(ea,1&a),null===e)return di(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=o.children,e=o.fallback,s?(o=t.mode,s=t.child,l={mode:"hidden",children:l},1&o||null===s?s=Mc(l,o,0,null):(s.childLanes=0,s.pendingProps=l),e=Lc(e,o,r,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Ms(r),t.memoizedState=Ls,e):Us(t,l));if(null!==(a=e.memoizedState)&&null!==(n=a.dehydrated))return function(e,t,r,n,o,a,s){if(r)return 256&t.flags?(t.flags&=-257,js(e,t,s,n=ds(Error(i(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=n.fallback,o=t.mode,n=Mc({mode:"visible",children:n.children},o,0,null),(a=Lc(a,o,s,null)).flags|=2,n.return=t,a.return=t,n.sibling=a,t.child=n,1&t.mode&&bi(t,e.child,null,s),t.child.memoizedState=Ms(s),t.memoizedState=Ls,a);if(!(1&t.mode))return js(e,t,s,null);if("$!"===o.data){if(n=o.nextSibling&&o.nextSibling.dataset)var l=n.dgst;return n=l,js(e,t,s,n=ds(a=Error(i(419)),n,void 0))}if(l=0!==(s&e.childLanes),Cs||l){if(null!==(n=Tl)){switch(s&-s){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!==(o&(n.suspendedLanes|s))?0:o)&&o!==a.retryLane&&(a.retryLane=o,Li(e,o),rc(n,e,o,-1))}return Ac(),js(e,t,s,n=ds(Error(i(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Bc.bind(null,e),o._reactRetry=t,null):(e=a.treeContext,oi=co(o.nextSibling),ni=t,ii=!0,ai=null,null!==e&&(Yo[Ko++]=Jo,Yo[Ko++]=Xo,Yo[Ko++]=Go,Jo=e.id,Xo=e.overflow,Go=t),(t=Us(t,n.children)).flags|=4096,t)}(e,t,l,o,n,a,r);if(s){s=o.fallback,l=t.mode,n=(a=e.child).sibling;var c={mode:"hidden",children:o.children};return 1&l||t.child===a?(o=Oc(a,c)).subtreeFlags=14680064&a.subtreeFlags:((o=t.child).childLanes=0,o.pendingProps=c,t.deletions=null),null!==n?s=Oc(n,s):(s=Lc(s,l,r,null)).flags|=2,s.return=t,o.return=t,o.sibling=s,t.child=o,o=s,s=t.child,l=null===(l=e.child.memoizedState)?Ms(r):{baseLanes:l.baseLanes|r,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~r,t.memoizedState=Ls,o}return e=(s=e.child).sibling,o=Oc(s,{mode:"visible",children:o.children}),!(1&t.mode)&&(o.lanes=r),o.return=t,o.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=o,t.memoizedState=null,o}function Us(e,t){return(t=Mc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function js(e,t,r,n){return null!==n&&Ai(n),bi(t,e.child,null,r),(e=Us(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Fs(e,t,r){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),Ti(e.return,t,r)}function $s(e,t,r,n,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=o)}function zs(e,t,r){var n=t.pendingProps,o=n.revealOrder,i=n.tail;if(ws(e,t,n.children,r),2&(n=ea.current))n=1&n|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&&Fs(e,r,t);else if(19===e.tag)Fs(e,r,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}n&=1}if(Bo(ea,n),1&t.mode)switch(o){case"forwards":for(r=t.child,o=null;null!==r;)null!==(e=r.alternate)&&null===ta(e)&&(o=r),r=r.sibling;null===(r=o)?(o=t.child,t.child=null):(o=r.sibling,r.sibling=null),$s(t,!1,o,r,i);break;case"backwards":for(r=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===ta(e)){t.child=o;break}e=o.sibling,o.sibling=r,r=o,o=e}$s(t,!0,r,null,i);break;case"together":$s(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Ws(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),Ml|=t.lanes,0===(r&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(i(153));if(null!==t.child){for(r=Oc(e=t.child,e.pendingProps),t.child=r,r.return=t;null!==e.sibling;)e=e.sibling,(r=r.sibling=Oc(e,e.pendingProps)).return=t;r.sibling=null}return t.child}function Vs(e,t){if(!ii)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;null!==t;)null!==t.alternate&&(r=t),t=t.sibling;null===r?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;null!==r;)null!==r.alternate&&(n=r),r=r.sibling;null===n?t||null===e.tail?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Hs(e){var t=null!==e.alternate&&e.alternate.child===e.child,r=0,n=0;if(t)for(var o=e.child;null!==o;)r|=o.lanes|o.childLanes,n|=14680064&o.subtreeFlags,n|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags,n|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function Qs(e,t,r){var n=t.pendingProps;switch(ri(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Hs(t),null;case 1:case 17:return Oo(t.type)&&Ro(),Hs(t),null;case 3:return n=t.stateNode,Ji(),So(Po),So(To),na(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(hi(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==ai&&(ac(ai),ai=null))),Ds(e,t),Hs(t),null;case 5:Zi(t);var o=Ki(Yi.current);if(r=t.type,null!==e&&null!=t.stateNode)Os(e,t,r,n,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(null===t.stateNode)throw Error(i(166));return Hs(t),null}if(e=Ki(Hi.current),hi(t)){n=t.stateNode,r=t.type;var a=t.memoizedProps;switch(n[po]=t,n[go]=a,e=!!(1&t.mode),r){case"dialog":jn("cancel",n),jn("close",n);break;case"iframe":case"object":case"embed":jn("load",n);break;case"video":case"audio":for(o=0;o<Ln.length;o++)jn(Ln[o],n);break;case"source":jn("error",n);break;case"img":case"image":case"link":jn("error",n),jn("load",n);break;case"details":jn("toggle",n);break;case"input":G(n,a),jn("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!a.multiple},jn("invalid",n);break;case"textarea":oe(n,a),jn("invalid",n)}for(var l in ve(r,a),o=null,a)if(a.hasOwnProperty(l)){var c=a[l];"children"===l?"string"==typeof c?n.textContent!==c&&(!0!==a.suppressHydrationWarning&&Xn(n.textContent,c,e),o=["children",c]):"number"==typeof c&&n.textContent!==""+c&&(!0!==a.suppressHydrationWarning&&Xn(n.textContent,c,e),o=["children",""+c]):s.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&jn("scroll",n)}switch(r){case"input":H(n),Z(n,a,!0);break;case"textarea":H(n),ae(n);break;case"select":case"option":break;default:"function"==typeof a.onClick&&(n.onclick=Zn)}n=o,t.updateQueue=n,null!==n&&(t.flags|=4)}else{l=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(r)),"http://www.w3.org/1999/xhtml"===e?"script"===r?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof n.is?e=l.createElement(r,{is:n.is}):(e=l.createElement(r),"select"===r&&(l=e,n.multiple?l.multiple=!0:n.size&&(l.size=n.size))):e=l.createElementNS(e,r),e[po]=t,e[go]=n,Is(e,t,!1,!1),t.stateNode=e;e:{switch(l=Ce(r,n),r){case"dialog":jn("cancel",e),jn("close",e),o=n;break;case"iframe":case"object":case"embed":jn("load",e),o=n;break;case"video":case"audio":for(o=0;o<Ln.length;o++)jn(Ln[o],e);o=n;break;case"source":jn("error",e),o=n;break;case"img":case"image":case"link":jn("error",e),jn("load",e),o=n;break;case"details":jn("toggle",e),o=n;break;case"input":G(e,n),o=K(e,n),jn("invalid",e);break;case"option":default:o=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},o=N({},n,{value:void 0}),jn("invalid",e);break;case"textarea":oe(e,n),o=ne(e,n),jn("invalid",e)}for(a in ve(r,o),c=o)if(c.hasOwnProperty(a)){var d=c[a];"style"===a?fe(e,d):"dangerouslySetInnerHTML"===a?null!=(d=d?d.__html:void 0)&&ue(e,d):"children"===a?"string"==typeof d?("textarea"!==r||""!==d)&&he(e,d):"number"==typeof d&&he(e,""+d):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(s.hasOwnProperty(a)?null!=d&&"onScroll"===a&&jn("scroll",e):null!=d&&C(e,a,d,l))}switch(r){case"input":H(e),Z(e,n,!1);break;case"textarea":H(e),ae(e);break;case"option":null!=n.value&&e.setAttribute("value",""+q(n.value));break;case"select":e.multiple=!!n.multiple,null!=(a=n.value)?re(e,!!n.multiple,a,!1):null!=n.defaultValue&&re(e,!!n.multiple,n.defaultValue,!0);break;default:"function"==typeof o.onClick&&(e.onclick=Zn)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Hs(t),null;case 6:if(e&&null!=t.stateNode)Rs(e,t,e.memoizedProps,n);else{if("string"!=typeof n&&null===t.stateNode)throw Error(i(166));if(r=Ki(Yi.current),Ki(Hi.current),hi(t)){if(n=t.stateNode,r=t.memoizedProps,n[po]=t,(a=n.nodeValue!==r)&&null!==(e=ni))switch(e.tag){case 3:Xn(n.nodeValue,r,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Xn(n.nodeValue,r,!!(1&e.mode))}a&&(t.flags|=4)}else(n=(9===r.nodeType?r:r.ownerDocument).createTextNode(n))[po]=t,t.stateNode=n}return Hs(t),null;case 13:if(So(ea),n=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ii&&null!==oi&&1&t.mode&&!(128&t.flags))pi(),gi(),t.flags|=98560,a=!1;else if(a=hi(t),null!==n&&null!==n.dehydrated){if(null===e){if(!a)throw Error(i(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(i(317));a[po]=t}else gi(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Hs(t),a=!1}else null!==ai&&(ac(ai),ai=null),a=!0;if(!a)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=r,t):((n=null!==n)!=(null!==e&&null!==e.memoizedState)&&n&&(t.child.flags|=8192,1&t.mode&&(null===e||1&ea.current?0===Rl&&(Rl=3):Ac())),null!==t.updateQueue&&(t.flags|=4),Hs(t),null);case 4:return Ji(),Ds(e,t),null===e&&zn(t.stateNode.containerInfo),Hs(t),null;case 10:return Ei(t.type._context),Hs(t),null;case 19:if(So(ea),null===(a=t.memoizedState))return Hs(t),null;if(n=!!(128&t.flags),null===(l=a.rendering))if(n)Vs(a,!1);else{if(0!==Rl||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(l=ta(e))){for(t.flags|=128,Vs(a,!1),null!==(n=l.updateQueue)&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;null!==r;)e=n,(a=r).flags&=14680066,null===(l=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=l.childLanes,a.lanes=l.lanes,a.child=l.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=l.memoizedProps,a.memoizedState=l.memoizedState,a.updateQueue=l.updateQueue,a.type=l.type,e=l.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Bo(ea,1&ea.current|2),t.child}e=e.sibling}null!==a.tail&&Je()>zl&&(t.flags|=128,n=!0,Vs(a,!1),t.lanes=4194304)}else{if(!n)if(null!==(e=ta(l))){if(t.flags|=128,n=!0,null!==(r=e.updateQueue)&&(t.updateQueue=r,t.flags|=4),Vs(a,!0),null===a.tail&&"hidden"===a.tailMode&&!l.alternate&&!ii)return Hs(t),null}else 2*Je()-a.renderingStartTime>zl&&1073741824!==r&&(t.flags|=128,n=!0,Vs(a,!1),t.lanes=4194304);a.isBackwards?(l.sibling=t.child,t.child=l):(null!==(r=a.last)?r.sibling=l:t.child=l,a.last=l)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Je(),t.sibling=null,r=ea.current,Bo(ea,n?1&r|2:1&r),t):(Hs(t),null);case 22:case 23:return uc(),n=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==n&&(t.flags|=8192),n&&1&t.mode?!!(1073741824&Dl)&&(Hs(t),6&t.subtreeFlags&&(t.flags|=8192)):Hs(t),null;case 24:case 25:return null}throw Error(i(156,t.tag))}function Ys(e,t){switch(ri(t),t.tag){case 1:return Oo(t.type)&&Ro(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Ji(),So(Po),So(To),na(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Zi(t),null;case 13:if(So(ea),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(i(340));gi()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return So(ea),null;case 4:return Ji(),null;case 10:return Ei(t.type._context),null;case 22:case 23:return uc(),null;default:return null}}Is=function(e,t){for(var r=t.child;null!==r;){if(5===r.tag||6===r.tag)e.appendChild(r.stateNode);else if(4!==r.tag&&null!==r.child){r.child.return=r,r=r.child;continue}if(r===t)break;for(;null===r.sibling;){if(null===r.return||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},Ds=function(){},Os=function(e,t,r,n){var o=e.memoizedProps;if(o!==n){e=t.stateNode,Ki(Hi.current);var i,a=null;switch(r){case"input":o=K(e,o),n=K(e,n),a=[];break;case"select":o=N({},o,{value:void 0}),n=N({},n,{value:void 0}),a=[];break;case"textarea":o=ne(e,o),n=ne(e,n),a=[];break;default:"function"!=typeof o.onClick&&"function"==typeof n.onClick&&(e.onclick=Zn)}for(d in ve(r,n),r=null,o)if(!n.hasOwnProperty(d)&&o.hasOwnProperty(d)&&null!=o[d])if("style"===d){var l=o[d];for(i in l)l.hasOwnProperty(i)&&(r||(r={}),r[i]="")}else"dangerouslySetInnerHTML"!==d&&"children"!==d&&"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&"autoFocus"!==d&&(s.hasOwnProperty(d)?a||(a=[]):(a=a||[]).push(d,null));for(d in n){var c=n[d];if(l=null!=o?o[d]:void 0,n.hasOwnProperty(d)&&c!==l&&(null!=c||null!=l))if("style"===d)if(l){for(i in l)!l.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(r||(r={}),r[i]="");for(i in c)c.hasOwnProperty(i)&&l[i]!==c[i]&&(r||(r={}),r[i]=c[i])}else r||(a||(a=[]),a.push(d,r)),r=c;else"dangerouslySetInnerHTML"===d?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(a=a||[]).push(d,c)):"children"===d?"string"!=typeof c&&"number"!=typeof c||(a=a||[]).push(d,""+c):"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&(s.hasOwnProperty(d)?(null!=c&&"onScroll"===d&&jn("scroll",e),a||l===c||(a=[])):(a=a||[]).push(d,c))}r&&(a=a||[]).push("style",r);var d=a;(t.updateQueue=d)&&(t.flags|=4)}},Rs=function(e,t,r,n){r!==n&&(t.flags|=4)};var Ks=!1,Gs=!1,Js="function"==typeof WeakSet?WeakSet:Set,Xs=null;function Zs(e,t){var r=e.ref;if(null!==r)if("function"==typeof r)try{r(null)}catch(r){xc(e,t,r)}else r.current=null}function el(e,t,r){try{r()}catch(r){xc(e,t,r)}}var tl=!1;function rl(e,t,r){var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var o=n=n.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,void 0!==i&&el(t,r,i)}o=o.next}while(o!==n)}}function nl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function ol(e){var t=e.ref;if(null!==t){var r=e.stateNode;e.tag,e=r,"function"==typeof t?t(e):t.current=e}}function il(e){var t=e.alternate;null!==t&&(e.alternate=null,il(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&(delete t[po],delete t[go],delete t[fo],delete t[mo],delete t[vo]),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function al(e){return 5===e.tag||3===e.tag||4===e.tag}function sl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||al(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 ll(e,t,r){var n=e.tag;if(5===n||6===n)e=e.stateNode,t?8===r.nodeType?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(8===r.nodeType?(t=r.parentNode).insertBefore(e,r):(t=r).appendChild(e),null!=(r=r._reactRootContainer)||null!==t.onclick||(t.onclick=Zn));else if(4!==n&&null!==(e=e.child))for(ll(e,t,r),e=e.sibling;null!==e;)ll(e,t,r),e=e.sibling}function cl(e,t,r){var n=e.tag;if(5===n||6===n)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(4!==n&&null!==(e=e.child))for(cl(e,t,r),e=e.sibling;null!==e;)cl(e,t,r),e=e.sibling}var dl=null,ul=!1;function hl(e,t,r){for(r=r.child;null!==r;)pl(e,t,r),r=r.sibling}function pl(e,t,r){if(it&&"function"==typeof it.onCommitFiberUnmount)try{it.onCommitFiberUnmount(ot,r)}catch(e){}switch(r.tag){case 5:Gs||Zs(r,t);case 6:var n=dl,o=ul;dl=null,hl(e,t,r),ul=o,null!==(dl=n)&&(ul?(e=dl,r=r.stateNode,8===e.nodeType?e.parentNode.removeChild(r):e.removeChild(r)):dl.removeChild(r.stateNode));break;case 18:null!==dl&&(ul?(e=dl,r=r.stateNode,8===e.nodeType?lo(e.parentNode,r):1===e.nodeType&&lo(e,r),zt(e)):lo(dl,r.stateNode));break;case 4:n=dl,o=ul,dl=r.stateNode.containerInfo,ul=!0,hl(e,t,r),dl=n,ul=o;break;case 0:case 11:case 14:case 15:if(!Gs&&null!==(n=r.updateQueue)&&null!==(n=n.lastEffect)){o=n=n.next;do{var i=o,a=i.destroy;i=i.tag,void 0!==a&&(2&i||4&i)&&el(r,t,a),o=o.next}while(o!==n)}hl(e,t,r);break;case 1:if(!Gs&&(Zs(r,t),"function"==typeof(n=r.stateNode).componentWillUnmount))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(e){xc(r,t,e)}hl(e,t,r);break;case 21:hl(e,t,r);break;case 22:1&r.mode?(Gs=(n=Gs)||null!==r.memoizedState,hl(e,t,r),Gs=n):hl(e,t,r);break;default:hl(e,t,r)}}function gl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var r=e.stateNode;null===r&&(r=e.stateNode=new Js),t.forEach(function(t){var n=Ec.bind(null,e,t);r.has(t)||(r.add(t),t.then(n,n))})}}function Al(e,t){var r=t.deletions;if(null!==r)for(var n=0;n<r.length;n++){var o=r[n];try{var a=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:dl=l.stateNode,ul=!1;break e;case 3:case 4:dl=l.stateNode.containerInfo,ul=!0;break e}l=l.return}if(null===dl)throw Error(i(160));pl(a,s,o),dl=null,ul=!1;var c=o.alternate;null!==c&&(c.return=null),o.return=null}catch(e){xc(o,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)fl(t,e),t=t.sibling}function fl(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Al(t,e),ml(e),4&n){try{rl(3,e,e.return),nl(3,e)}catch(t){xc(e,e.return,t)}try{rl(5,e,e.return)}catch(t){xc(e,e.return,t)}}break;case 1:Al(t,e),ml(e),512&n&&null!==r&&Zs(r,r.return);break;case 5:if(Al(t,e),ml(e),512&n&&null!==r&&Zs(r,r.return),32&e.flags){var o=e.stateNode;try{he(o,"")}catch(t){xc(e,e.return,t)}}if(4&n&&null!=(o=e.stateNode)){var a=e.memoizedProps,s=null!==r?r.memoizedProps:a,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===a.type&&null!=a.name&&J(o,a),Ce(l,s);var d=Ce(l,a);for(s=0;s<c.length;s+=2){var u=c[s],h=c[s+1];"style"===u?fe(o,h):"dangerouslySetInnerHTML"===u?ue(o,h):"children"===u?he(o,h):C(o,u,h,d)}switch(l){case"input":X(o,a);break;case"textarea":ie(o,a);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!a.multiple;var g=a.value;null!=g?re(o,!!a.multiple,g,!1):p!==!!a.multiple&&(null!=a.defaultValue?re(o,!!a.multiple,a.defaultValue,!0):re(o,!!a.multiple,a.multiple?[]:"",!1))}o[go]=a}catch(t){xc(e,e.return,t)}}break;case 6:if(Al(t,e),ml(e),4&n){if(null===e.stateNode)throw Error(i(162));o=e.stateNode,a=e.memoizedProps;try{o.nodeValue=a}catch(t){xc(e,e.return,t)}}break;case 3:if(Al(t,e),ml(e),4&n&&null!==r&&r.memoizedState.isDehydrated)try{zt(t.containerInfo)}catch(t){xc(e,e.return,t)}break;case 4:default:Al(t,e),ml(e);break;case 13:Al(t,e),ml(e),8192&(o=e.child).flags&&(a=null!==o.memoizedState,o.stateNode.isHidden=a,!a||null!==o.alternate&&null!==o.alternate.memoizedState||($l=Je())),4&n&&gl(e);break;case 22:if(u=null!==r&&null!==r.memoizedState,1&e.mode?(Gs=(d=Gs)||u,Al(t,e),Gs=d):Al(t,e),ml(e),8192&n){if(d=null!==e.memoizedState,(e.stateNode.isHidden=d)&&!u&&1&e.mode)for(Xs=e,u=e.child;null!==u;){for(h=Xs=u;null!==Xs;){switch(g=(p=Xs).child,p.tag){case 0:case 11:case 14:case 15:rl(4,p,p.return);break;case 1:Zs(p,p.return);var A=p.stateNode;if("function"==typeof A.componentWillUnmount){n=p,r=p.return;try{t=n,A.props=t.memoizedProps,A.state=t.memoizedState,A.componentWillUnmount()}catch(e){xc(n,r,e)}}break;case 5:Zs(p,p.return);break;case 22:if(null!==p.memoizedState){bl(h);continue}}null!==g?(g.return=p,Xs=g):bl(h)}u=u.sibling}e:for(u=null,h=e;;){if(5===h.tag){if(null===u){u=h;try{o=h.stateNode,d?"function"==typeof(a=o.style).setProperty?a.setProperty("display","none","important"):a.display="none":(l=h.stateNode,s=null!=(c=h.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,l.style.display=Ae("display",s))}catch(t){xc(e,e.return,t)}}}else if(6===h.tag){if(null===u)try{h.stateNode.nodeValue=d?"":h.memoizedProps}catch(t){xc(e,e.return,t)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;u===h&&(u=null),h=h.return}u===h&&(u=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:Al(t,e),ml(e),4&n&&gl(e);case 21:}}function ml(e){var t=e.flags;if(2&t){try{e:{for(var r=e.return;null!==r;){if(al(r)){var n=r;break e}r=r.return}throw Error(i(160))}switch(n.tag){case 5:var o=n.stateNode;32&n.flags&&(he(o,""),n.flags&=-33),cl(e,sl(e),o);break;case 3:case 4:var a=n.stateNode.containerInfo;ll(e,sl(e),a);break;default:throw Error(i(161))}}catch(t){xc(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function vl(e,t,r){Xs=e,Cl(e,t,r)}function Cl(e,t,r){for(var n=!!(1&e.mode);null!==Xs;){var o=Xs,i=o.child;if(22===o.tag&&n){var a=null!==o.memoizedState||Ks;if(!a){var s=o.alternate,l=null!==s&&null!==s.memoizedState||Gs;s=Ks;var c=Gs;if(Ks=a,(Gs=l)&&!c)for(Xs=o;null!==Xs;)l=(a=Xs).child,22===a.tag&&null!==a.memoizedState?yl(o):null!==l?(l.return=a,Xs=l):yl(o);for(;null!==i;)Xs=i,Cl(i,t,r),i=i.sibling;Xs=o,Ks=s,Gs=c}wl(e)}else 8772&o.subtreeFlags&&null!==i?(i.return=o,Xs=i):wl(e)}}function wl(e){for(;null!==Xs;){var t=Xs;if(8772&t.flags){var r=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Gs||nl(5,t);break;case 1:var n=t.stateNode;if(4&t.flags&&!Gs)if(null===r)n.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:rs(t.type,r.memoizedProps);n.componentDidUpdate(o,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&qi(t,a,n);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}qi(t,s,r)}break;case 5:var l=t.stateNode;if(null===r&&4&t.flags){r=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var d=t.alternate;if(null!==d){var u=d.memoizedState;if(null!==u){var h=u.dehydrated;null!==h&&zt(h)}}}break;default:throw Error(i(163))}Gs||512&t.flags&&ol(t)}catch(e){xc(t,t.return,e)}}if(t===e){Xs=null;break}if(null!==(r=t.sibling)){r.return=t.return,Xs=r;break}Xs=t.return}}function bl(e){for(;null!==Xs;){var t=Xs;if(t===e){Xs=null;break}var r=t.sibling;if(null!==r){r.return=t.return,Xs=r;break}Xs=t.return}}function yl(e){for(;null!==Xs;){var t=Xs;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{nl(4,t)}catch(e){xc(t,r,e)}break;case 1:var n=t.stateNode;if("function"==typeof n.componentDidMount){var o=t.return;try{n.componentDidMount()}catch(e){xc(t,o,e)}}var i=t.return;try{ol(t)}catch(e){xc(t,i,e)}break;case 5:var a=t.return;try{ol(t)}catch(e){xc(t,a,e)}}}catch(e){xc(t,t.return,e)}if(t===e){Xs=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Xs=s;break}Xs=t.return}}var kl,xl=Math.ceil,_l=w.ReactCurrentDispatcher,Sl=w.ReactCurrentOwner,Bl=w.ReactCurrentBatchConfig,El=0,Tl=null,Pl=null,Il=0,Dl=0,Ol=_o(0),Rl=0,Ll=null,Ml=0,Nl=0,Ul=0,jl=null,Fl=null,$l=0,zl=1/0,Wl=null,ql=!1,Vl=null,Hl=null,Ql=!1,Yl=null,Kl=0,Gl=0,Jl=null,Xl=-1,Zl=0;function ec(){return 6&El?Je():-1!==Xl?Xl:Xl=Je()}function tc(e){return 1&e.mode?2&El&&0!==Il?Il&-Il:null!==fi.transition?(0===Zl&&(Zl=At()),Zl):0!==(e=Ct)?e:e=void 0===(e=window.event)?16:Gt(e.type):1}function rc(e,t,r,n){if(50<Gl)throw Gl=0,Jl=null,Error(i(185));mt(e,r,n),2&El&&e===Tl||(e===Tl&&(!(2&El)&&(Nl|=r),4===Rl&&sc(e,Il)),nc(e,n),1===r&&0===El&&!(1&t.mode)&&(zl=Je()+500,Fo&&Wo()))}function nc(e,t){var r=e.callbackNode;!function(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-at(i),s=1<<a,l=o[a];-1===l?0!==(s&r)&&0===(s&n)||(o[a]=pt(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}}(e,t);var n=ht(e,e===Tl?Il:0);if(0===n)null!==r&&Ye(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(null!=r&&Ye(r),1===t)0===e.tag?function(e){Fo=!0,zo(e)}(lc.bind(null,e)):zo(lc.bind(null,e)),ao(function(){!(6&El)&&Wo()}),r=null;else{switch(wt(n)){case 1:r=Ze;break;case 4:r=et;break;case 16:default:r=tt;break;case 536870912:r=nt}r=Tc(r,oc.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function oc(e,t){if(Xl=-1,Zl=0,6&El)throw Error(i(327));var r=e.callbackNode;if(yc()&&e.callbackNode!==r)return null;var n=ht(e,e===Tl?Il:0);if(0===n)return null;if(30&n||0!==(n&e.expiredLanes)||t)t=fc(e,n);else{t=n;var o=El;El|=2;var a=gc();for(Tl===e&&Il===t||(Wl=null,zl=Je()+500,hc(e,t));;)try{vc();break}catch(t){pc(e,t)}Bi(),_l.current=a,El=o,null!==Pl?t=0:(Tl=null,Il=0,t=Rl)}if(0!==t){if(2===t&&0!==(o=gt(e))&&(n=o,t=ic(e,o)),1===t)throw r=Ll,hc(e,0),sc(e,n),nc(e,Je()),r;if(6===t)sc(e,n);else{if(o=e.current.alternate,!(30&n||function(e){for(var t=e;;){if(16384&t.flags){var r=t.updateQueue;if(null!==r&&null!==(r=r.stores))for(var n=0;n<r.length;n++){var o=r[n],i=o.getSnapshot;o=o.value;try{if(!sn(i(),o))return!1}catch(e){return!1}}}if(r=t.child,16384&t.subtreeFlags&&null!==r)r.return=t,t=r;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}(o)||(t=fc(e,n),2===t&&(a=gt(e),0!==a&&(n=a,t=ic(e,a))),1!==t)))throw r=Ll,hc(e,0),sc(e,n),nc(e,Je()),r;switch(e.finishedWork=o,e.finishedLanes=n,t){case 0:case 1:throw Error(i(345));case 2:case 5:bc(e,Fl,Wl);break;case 3:if(sc(e,n),(130023424&n)===n&&10<(t=$l+500-Je())){if(0!==ht(e,0))break;if(((o=e.suspendedLanes)&n)!==n){ec(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=no(bc.bind(null,e,Fl,Wl),t);break}bc(e,Fl,Wl);break;case 4:if(sc(e,n),(4194240&n)===n)break;for(t=e.eventTimes,o=-1;0<n;){var s=31-at(n);a=1<<s,(s=t[s])>o&&(o=s),n&=~a}if(n=o,10<(n=(120>(n=Je()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*xl(n/1960))-n)){e.timeoutHandle=no(bc.bind(null,e,Fl,Wl),n);break}bc(e,Fl,Wl);break;default:throw Error(i(329))}}}return nc(e,Je()),e.callbackNode===r?oc.bind(null,e):null}function ic(e,t){var r=jl;return e.current.memoizedState.isDehydrated&&(hc(e,t).flags|=256),2!==(e=fc(e,t))&&(t=Fl,Fl=r,null!==t&&ac(t)),e}function ac(e){null===Fl?Fl=e:Fl.push.apply(Fl,e)}function sc(e,t){for(t&=~Ul,t&=~Nl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-at(t),n=1<<r;e[r]=-1,t&=~n}}function lc(e){if(6&El)throw Error(i(327));yc();var t=ht(e,0);if(!(1&t))return nc(e,Je()),null;var r=fc(e,t);if(0!==e.tag&&2===r){var n=gt(e);0!==n&&(t=n,r=ic(e,n))}if(1===r)throw r=Ll,hc(e,0),sc(e,t),nc(e,Je()),r;if(6===r)throw Error(i(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,bc(e,Fl,Wl),nc(e,Je()),null}function cc(e,t){var r=El;El|=1;try{return e(t)}finally{0===(El=r)&&(zl=Je()+500,Fo&&Wo())}}function dc(e){null!==Yl&&0===Yl.tag&&!(6&El)&&yc();var t=El;El|=1;var r=Bl.transition,n=Ct;try{if(Bl.transition=null,Ct=1,e)return e()}finally{Ct=n,Bl.transition=r,!(6&(El=t))&&Wo()}}function uc(){Dl=Ol.current,So(Ol)}function hc(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(-1!==r&&(e.timeoutHandle=-1,oo(r)),null!==Pl)for(r=Pl.return;null!==r;){var n=r;switch(ri(n),n.tag){case 1:null!=(n=n.type.childContextTypes)&&Ro();break;case 3:Ji(),So(Po),So(To),na();break;case 5:Zi(n);break;case 4:Ji();break;case 13:case 19:So(ea);break;case 10:Ei(n.type._context);break;case 22:case 23:uc()}r=r.return}if(Tl=e,Pl=e=Oc(e.current,null),Il=Dl=t,Rl=0,Ll=null,Ul=Nl=Ml=0,Fl=jl=null,null!==Di){for(t=0;t<Di.length;t++)if(null!==(n=(r=Di[t]).interleaved)){r.interleaved=null;var o=n.next,i=r.pending;if(null!==i){var a=i.next;i.next=o,n.next=a}r.pending=n}Di=null}return e}function pc(e,t){for(;;){var r=Pl;try{if(Bi(),oa.current=Xa,da){for(var n=sa.memoizedState;null!==n;){var o=n.queue;null!==o&&(o.pending=null),n=n.next}da=!1}if(aa=0,ca=la=sa=null,ua=!1,ha=0,Sl.current=null,null===r||null===r.return){Rl=1,Ll=t,Pl=null;break}e:{var a=e,s=r.return,l=r,c=t;if(t=Il,l.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var d=c,u=l,h=u.tag;if(!(1&u.mode||0!==h&&11!==h&&15!==h)){var p=u.alternate;p?(u.updateQueue=p.updateQueue,u.memoizedState=p.memoizedState,u.lanes=p.lanes):(u.updateQueue=null,u.memoizedState=null)}var g=fs(s);if(null!==g){g.flags&=-257,ms(g,s,l,0,t),1&g.mode&&As(a,d,t),c=d;var A=(t=g).updateQueue;if(null===A){var f=new Set;f.add(c),t.updateQueue=f}else A.add(c);break e}if(!(1&t)){As(a,d,t),Ac();break e}c=Error(i(426))}else if(ii&&1&l.mode){var m=fs(s);if(null!==m){!(65536&m.flags)&&(m.flags|=256),ms(m,s,l,0,t),Ai(cs(c,l));break e}}a=c=cs(c,l),4!==Rl&&(Rl=2),null===jl?jl=[a]:jl.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,zi(a,ps(0,c,t));break e;case 1:l=c;var v=a.type,C=a.stateNode;if(!(128&a.flags||"function"!=typeof v.getDerivedStateFromError&&(null===C||"function"!=typeof C.componentDidCatch||null!==Hl&&Hl.has(C)))){a.flags|=65536,t&=-t,a.lanes|=t,zi(a,gs(a,l,t));break e}}a=a.return}while(null!==a)}wc(r)}catch(e){t=e,Pl===r&&null!==r&&(Pl=r=r.return);continue}break}}function gc(){var e=_l.current;return _l.current=Xa,null===e?Xa:e}function Ac(){0!==Rl&&3!==Rl&&2!==Rl||(Rl=4),null===Tl||!(268435455&Ml)&&!(268435455&Nl)||sc(Tl,Il)}function fc(e,t){var r=El;El|=2;var n=gc();for(Tl===e&&Il===t||(Wl=null,hc(e,t));;)try{mc();break}catch(t){pc(e,t)}if(Bi(),El=r,_l.current=n,null!==Pl)throw Error(i(261));return Tl=null,Il=0,Rl}function mc(){for(;null!==Pl;)Cc(Pl)}function vc(){for(;null!==Pl&&!Ke();)Cc(Pl)}function Cc(e){var t=kl(e.alternate,e,Dl);e.memoizedProps=e.pendingProps,null===t?wc(e):Pl=t,Sl.current=null}function wc(e){var t=e;do{var r=t.alternate;if(e=t.return,32768&t.flags){if(null!==(r=Ys(r,t)))return r.flags&=32767,void(Pl=r);if(null===e)return Rl=6,void(Pl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(r=Qs(r,t,Dl)))return void(Pl=r);if(null!==(t=t.sibling))return void(Pl=t);Pl=t=e}while(null!==t);0===Rl&&(Rl=5)}function bc(e,t,r){var n=Ct,o=Bl.transition;try{Bl.transition=null,Ct=1,function(e,t,r,n){do{yc()}while(null!==Yl);if(6&El)throw Error(i(327));r=e.finishedWork;var o=e.finishedLanes;if(null===r)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(function(e,t){var r=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 n=e.eventTimes;for(e=e.expirationTimes;0<r;){var o=31-at(r),i=1<<o;t[o]=0,n[o]=-1,e[o]=-1,r&=~i}}(e,a),e===Tl&&(Pl=Tl=null,Il=0),!(2064&r.subtreeFlags)&&!(2064&r.flags)||Ql||(Ql=!0,Tc(tt,function(){return yc(),null})),a=!!(15990&r.flags),15990&r.subtreeFlags||a){a=Bl.transition,Bl.transition=null;var s=Ct;Ct=1;var l=El;El|=4,Sl.current=null,function(e,t){if(eo=qt,pn(e=hn())){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{var n=(r=(r=e.ownerDocument)&&r.defaultView||window).getSelection&&r.getSelection();if(n&&0!==n.rangeCount){r=n.anchorNode;var o=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch(e){r=null;break e}var s=0,l=-1,c=-1,d=0,u=0,h=e,p=null;t:for(;;){for(var g;h!==r||0!==o&&3!==h.nodeType||(l=s+o),h!==a||0!==n&&3!==h.nodeType||(c=s+n),3===h.nodeType&&(s+=h.nodeValue.length),null!==(g=h.firstChild);)p=h,h=g;for(;;){if(h===e)break t;if(p===r&&++d===o&&(l=s),p===a&&++u===n&&(c=s),null!==(g=h.nextSibling))break;p=(h=p).parentNode}h=g}r=-1===l||-1===c?null:{start:l,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(to={focusedElem:e,selectionRange:r},qt=!1,Xs=t;null!==Xs;)if(e=(t=Xs).child,1028&t.subtreeFlags&&null!==e)e.return=t,Xs=e;else for(;null!==Xs;){t=Xs;try{var A=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!==A){var f=A.memoizedProps,m=A.memoizedState,v=t.stateNode,C=v.getSnapshotBeforeUpdate(t.elementType===t.type?f:rs(t.type,f),m);v.__reactInternalSnapshotBeforeUpdate=C}break;case 3:var w=t.stateNode.containerInfo;1===w.nodeType?w.textContent="":9===w.nodeType&&w.documentElement&&w.removeChild(w.documentElement);break;default:throw Error(i(163))}}catch(e){xc(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Xs=e;break}Xs=t.return}A=tl,tl=!1}(e,r),fl(r,e),gn(to),qt=!!eo,to=eo=null,e.current=r,vl(r,e,o),Ge(),El=l,Ct=s,Bl.transition=a}else e.current=r;if(Ql&&(Ql=!1,Yl=e,Kl=o),0===(a=e.pendingLanes)&&(Hl=null),function(e){if(it&&"function"==typeof it.onCommitFiberRoot)try{it.onCommitFiberRoot(ot,e,void 0,!(128&~e.current.flags))}catch(e){}}(r.stateNode),nc(e,Je()),null!==t)for(n=e.onRecoverableError,r=0;r<t.length;r++)n((o=t[r]).value,{componentStack:o.stack,digest:o.digest});if(ql)throw ql=!1,e=Vl,Vl=null,e;!!(1&Kl)&&0!==e.tag&&yc(),1&(a=e.pendingLanes)?e===Jl?Gl++:(Gl=0,Jl=e):Gl=0,Wo()}(e,t,r,n)}finally{Bl.transition=o,Ct=n}return null}function yc(){if(null!==Yl){var e=wt(Kl),t=Bl.transition,r=Ct;try{if(Bl.transition=null,Ct=16>e?16:e,null===Yl)var n=!1;else{if(e=Yl,Yl=null,Kl=0,6&El)throw Error(i(331));var o=El;for(El|=4,Xs=e.current;null!==Xs;){var a=Xs,s=a.child;if(16&Xs.flags){var l=a.deletions;if(null!==l){for(var c=0;c<l.length;c++){var d=l[c];for(Xs=d;null!==Xs;){var u=Xs;switch(u.tag){case 0:case 11:case 15:rl(8,u,a)}var h=u.child;if(null!==h)h.return=u,Xs=h;else for(;null!==Xs;){var p=(u=Xs).sibling,g=u.return;if(il(u),u===d){Xs=null;break}if(null!==p){p.return=g,Xs=p;break}Xs=g}}}var A=a.alternate;if(null!==A){var f=A.child;if(null!==f){A.child=null;do{var m=f.sibling;f.sibling=null,f=m}while(null!==f)}}Xs=a}}if(2064&a.subtreeFlags&&null!==s)s.return=a,Xs=s;else e:for(;null!==Xs;){if(2048&(a=Xs).flags)switch(a.tag){case 0:case 11:case 15:rl(9,a,a.return)}var v=a.sibling;if(null!==v){v.return=a.return,Xs=v;break e}Xs=a.return}}var C=e.current;for(Xs=C;null!==Xs;){var w=(s=Xs).child;if(2064&s.subtreeFlags&&null!==w)w.return=s,Xs=w;else e:for(s=C;null!==Xs;){if(2048&(l=Xs).flags)try{switch(l.tag){case 0:case 11:case 15:nl(9,l)}}catch(e){xc(l,l.return,e)}if(l===s){Xs=null;break e}var b=l.sibling;if(null!==b){b.return=l.return,Xs=b;break e}Xs=l.return}}if(El=o,Wo(),it&&"function"==typeof it.onPostCommitFiberRoot)try{it.onPostCommitFiberRoot(ot,e)}catch(e){}n=!0}return n}finally{Ct=r,Bl.transition=t}}return!1}function kc(e,t,r){e=Fi(e,t=ps(0,t=cs(r,t),1),1),t=ec(),null!==e&&(mt(e,1,t),nc(e,t))}function xc(e,t,r){if(3===e.tag)kc(e,e,r);else for(;null!==t;){if(3===t.tag){kc(t,e,r);break}if(1===t.tag){var n=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof n.componentDidCatch&&(null===Hl||!Hl.has(n))){t=Fi(t,e=gs(t,e=cs(r,e),1),1),e=ec(),null!==t&&(mt(t,1,e),nc(t,e));break}}t=t.return}}function _c(e,t,r){var n=e.pingCache;null!==n&&n.delete(t),t=ec(),e.pingedLanes|=e.suspendedLanes&r,Tl===e&&(Il&r)===r&&(4===Rl||3===Rl&&(130023424&Il)===Il&&500>Je()-$l?hc(e,0):Ul|=r),nc(e,t)}function Sc(e,t){0===t&&(1&e.mode?(t=dt,!(130023424&(dt<<=1))&&(dt=4194304)):t=1);var r=ec();null!==(e=Li(e,t))&&(mt(e,t,r),nc(e,r))}function Bc(e){var t=e.memoizedState,r=0;null!==t&&(r=t.retryLane),Sc(e,r)}function Ec(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;null!==o&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(i(314))}null!==n&&n.delete(t),Sc(e,r)}function Tc(e,t){return Qe(e,t)}function Pc(e,t,r,n){this.tag=e,this.key=r,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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ic(e,t,r,n){return new Pc(e,t,r,n)}function Dc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Oc(e,t){var r=e.alternate;return null===r?((r=Ic(e.tag,t,e.key,e.mode)).elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=14680064&e.flags,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Rc(e,t,r,n,o,a){var s=2;if(n=e,"function"==typeof e)Dc(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case k:return Lc(r.children,o,a,t);case x:s=8,o|=8;break;case _:return(e=Ic(12,r,t,2|o)).elementType=_,e.lanes=a,e;case T:return(e=Ic(13,r,t,o)).elementType=T,e.lanes=a,e;case P:return(e=Ic(19,r,t,o)).elementType=P,e.lanes=a,e;case O:return Mc(r,o,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case S:s=10;break e;case B:s=9;break e;case E:s=11;break e;case I:s=14;break e;case D:s=16,n=null;break e}throw Error(i(130,null==e?e:typeof e,""))}return(t=Ic(s,r,t,o)).elementType=e,t.type=n,t.lanes=a,t}function Lc(e,t,r,n){return(e=Ic(7,e,n,t)).lanes=r,e}function Mc(e,t,r,n){return(e=Ic(22,e,n,t)).elementType=O,e.lanes=r,e.stateNode={isHidden:!1},e}function Nc(e,t,r){return(e=Ic(6,e,null,t)).lanes=r,e}function Uc(e,t,r){return(t=Ic(4,null!==e.children?e.children:[],e.key,t)).lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function jc(e,t,r,n,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=ft(0),this.expirationTimes=ft(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ft(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Fc(e,t,r,n,o,i,a,s,l){return e=new jc(e,t,r,s,l),1===t?(t=1,!0===i&&(t|=8)):t=0,i=Ic(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ni(i),e}function $c(e){if(!e)return Eo;e:{if(ze(e=e._reactInternals)!==e||1!==e.tag)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Oo(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(i(171))}if(1===e.tag){var r=e.type;if(Oo(r))return Mo(e,r,t)}return t}function zc(e,t,r,n,o,i,a,s,l){return(e=Fc(r,n,!0,e,0,i,0,s,l)).context=$c(null),r=e.current,(i=ji(n=ec(),o=tc(r))).callback=null!=t?t:null,Fi(r,i,o),e.current.lanes=o,mt(e,o,n),nc(e,n),e}function Wc(e,t,r,n){var o=t.current,i=ec(),a=tc(o);return r=$c(r),null===t.context?t.context=r:t.pendingContext=r,(t=ji(i,a)).payload={element:e},null!==(n=void 0===n?null:n)&&(t.callback=n),null!==(e=Fi(o,t,a))&&(rc(e,o,a,i),$i(e,o,a)),a}function qc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Vc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var r=e.retryLane;e.retryLane=0!==r&&r<t?r:t}}function Hc(e,t){Vc(e,t),(e=e.alternate)&&Vc(e,t)}kl=function(e,t,r){if(null!==e)if(e.memoizedProps!==t.pendingProps||Po.current)Cs=!0;else{if(0===(e.lanes&r)&&!(128&t.flags))return Cs=!1,function(e,t,r){switch(t.tag){case 3:Ts(t),gi();break;case 5:Xi(t);break;case 1:Oo(t.type)&&No(t);break;case 4:Gi(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,o=t.memoizedProps.value;Bo(ki,n._currentValue),n._currentValue=o;break;case 13:if(null!==(n=t.memoizedState))return null!==n.dehydrated?(Bo(ea,1&ea.current),t.flags|=128,null):0!==(r&t.child.childLanes)?Ns(e,t,r):(Bo(ea,1&ea.current),null!==(e=qs(e,t,r))?e.sibling:null);Bo(ea,1&ea.current);break;case 19:if(n=0!==(r&t.childLanes),128&e.flags){if(n)return zs(e,t,r);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),Bo(ea,ea.current),n)break;return null;case 22:case 23:return t.lanes=0,xs(e,t,r)}return qs(e,t,r)}(e,t,r);Cs=!!(131072&e.flags)}else Cs=!1,ii&&1048576&t.flags&&ei(t,Qo,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Ws(e,t),e=t.pendingProps;var o=Do(t,To.current);Pi(t,r),o=fa(null,t,n,e,o,r);var a=ma();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Oo(n)?(a=!0,No(t)):a=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Ni(t),o.updater=os,t.stateNode=o,o._reactInternals=t,ls(t,n,e,r),t=Es(null,t,n,!0,a,r)):(t.tag=0,ii&&a&&ti(t),ws(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Ws(e,t),e=t.pendingProps,n=(o=n._init)(n._payload),t.type=n,o=t.tag=function(e){if("function"==typeof e)return Dc(e)?1:0;if(null!=e){if((e=e.$$typeof)===E)return 11;if(e===I)return 14}return 2}(n),e=rs(n,e),o){case 0:t=Ss(null,t,n,e,r);break e;case 1:t=Bs(null,t,n,e,r);break e;case 11:t=bs(null,t,n,e,r);break e;case 14:t=ys(null,t,n,rs(n.type,e),r);break e}throw Error(i(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,Ss(e,t,n,o=t.elementType===n?o:rs(n,o),r);case 1:return n=t.type,o=t.pendingProps,Bs(e,t,n,o=t.elementType===n?o:rs(n,o),r);case 3:e:{if(Ts(t),null===e)throw Error(i(387));n=t.pendingProps,o=(a=t.memoizedState).element,Ui(e,t),Wi(t,n,null,r);var s=t.memoizedState;if(n=s.element,a.isDehydrated){if(a={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Ps(e,t,n,r,o=cs(Error(i(423)),t));break e}if(n!==o){t=Ps(e,t,n,r,o=cs(Error(i(424)),t));break e}for(oi=co(t.stateNode.containerInfo.firstChild),ni=t,ii=!0,ai=null,r=yi(t,null,n,r),t.child=r;r;)r.flags=-3&r.flags|4096,r=r.sibling}else{if(gi(),n===o){t=qs(e,t,r);break e}ws(e,t,n,r)}t=t.child}return t;case 5:return Xi(t),null===e&&di(t),n=t.type,o=t.pendingProps,a=null!==e?e.memoizedProps:null,s=o.children,ro(n,o)?s=null:null!==a&&ro(n,a)&&(t.flags|=32),_s(e,t),ws(e,t,s,r),t.child;case 6:return null===e&&di(t),null;case 13:return Ns(e,t,r);case 4:return Gi(t,t.stateNode.containerInfo),n=t.pendingProps,null===e?t.child=bi(t,null,n,r):ws(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,bs(e,t,n,o=t.elementType===n?o:rs(n,o),r);case 7:return ws(e,t,t.pendingProps,r),t.child;case 8:case 12:return ws(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,a=t.memoizedProps,s=o.value,Bo(ki,n._currentValue),n._currentValue=s,null!==a)if(sn(a.value,s)){if(a.children===o.children&&!Po.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 c=l.firstContext;null!==c;){if(c.context===n){if(1===a.tag){(c=ji(-1,r&-r)).tag=2;var d=a.updateQueue;if(null!==d){var u=(d=d.shared).pending;null===u?c.next=c:(c.next=u.next,u.next=c),d.pending=c}}a.lanes|=r,null!==(c=a.alternate)&&(c.lanes|=r),Ti(a.return,r,t),l.lanes|=r;break}c=c.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(i(341));s.lanes|=r,null!==(l=s.alternate)&&(l.lanes|=r),Ti(s,r,t),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}ws(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,Pi(t,r),n=n(o=Ii(o)),t.flags|=1,ws(e,t,n,r),t.child;case 14:return o=rs(n=t.type,t.pendingProps),ys(e,t,n,o=rs(n.type,o),r);case 15:return ks(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:rs(n,o),Ws(e,t),t.tag=1,Oo(n)?(e=!0,No(t)):e=!1,Pi(t,r),as(t,n,o),ls(t,n,o,r),Es(null,t,n,!0,e,r);case 19:return zs(e,t,r);case 22:return xs(e,t,r)}throw Error(i(156,t.tag))};var Qc="function"==typeof reportError?reportError:function(e){console.error(e)};function Yc(e){this._internalRoot=e}function Kc(e){this._internalRoot=e}function Gc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Jc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Xc(){}function Zc(e,t,r,n,o){var i=r._reactRootContainer;if(i){var a=i;if("function"==typeof o){var s=o;o=function(){var e=qc(a);s.call(e)}}Wc(t,a,e,o)}else a=function(e,t,r,n,o){if(o){if("function"==typeof n){var i=n;n=function(){var e=qc(a);i.call(e)}}var a=zc(t,n,e,0,null,!1,0,"",Xc);return e._reactRootContainer=a,e[Ao]=a.current,zn(8===e.nodeType?e.parentNode:e),dc(),a}for(;o=e.lastChild;)e.removeChild(o);if("function"==typeof n){var s=n;n=function(){var e=qc(l);s.call(e)}}var l=Fc(e,0,!1,null,0,!1,0,"",Xc);return e._reactRootContainer=l,e[Ao]=l.current,zn(8===e.nodeType?e.parentNode:e),dc(function(){Wc(t,l,r,n)}),l}(r,t,e,o,n);return qc(a)}Kc.prototype.render=Yc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(i(409));Wc(e,t,null,null)},Kc.prototype.unmount=Yc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;dc(function(){Wc(null,e,null,null)}),t[Ao]=null}},Kc.prototype.unstable_scheduleHydration=function(e){if(e){var t=xt();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Ot.length&&0!==t&&t<Ot[r].priority;r++);Ot.splice(r,0,e),0===r&&Nt(e)}},bt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=ut(t.pendingLanes);0!==r&&(vt(t,1|r),nc(t,Je()),!(6&El)&&(zl=Je()+500,Wo()))}break;case 13:dc(function(){var t=Li(e,1);if(null!==t){var r=ec();rc(t,e,1,r)}}),Hc(e,1)}},yt=function(e){if(13===e.tag){var t=Li(e,134217728);null!==t&&rc(t,e,134217728,ec()),Hc(e,134217728)}},kt=function(e){if(13===e.tag){var t=tc(e),r=Li(e,t);null!==r&&rc(r,e,t,ec()),Hc(e,t)}},xt=function(){return Ct},_t=function(e,t){var r=Ct;try{return Ct=e,t()}finally{Ct=r}},ye=function(e,t,r){switch(t){case"input":if(X(e,r),t=r.name,"radio"===r.type&&null!=t){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var o=yo(n);if(!o)throw Error(i(90));Q(n),X(n,o)}}}break;case"textarea":ie(e,r);break;case"select":null!=(t=r.value)&&re(e,!!r.multiple,t,!1)}},Ee=cc,Te=dc;var ed={usingClientEntryPoint:!1,Events:[wo,bo,yo,Se,Be,cc]},td={findFiberByHostInstance:Co,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},rd={bundleType:td.bundleType,version:td.version,rendererPackageName:td.rendererPackageName,rendererConfig:td.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=Ve(e))?null:e.stateNode},findFiberByHostInstance:td.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 nd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!nd.isDisabled&&nd.supportsFiber)try{ot=nd.inject(rd),it=nd}catch(de){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ed,t.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Gc(t))throw Error(i(200));return function(e,t,r){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:y,key:null==n?null:""+n,children:e,containerInfo:t,implementation:r}}(e,t,null,r)},t.createRoot=function(e,t){if(!Gc(e))throw Error(i(299));var r=!1,n="",o=Qc;return null!=t&&(!0===t.unstable_strictMode&&(r=!0),void 0!==t.identifierPrefix&&(n=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Fc(e,1,!1,null,0,r,0,n,o),e[Ao]=t.current,zn(8===e.nodeType?e.parentNode:e),new Yc(t)},t.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(i(188));throw e=Object.keys(e).join(","),Error(i(268,e))}return null===(e=Ve(t))?null:e.stateNode},t.flushSync=function(e){return dc(e)},t.hydrate=function(e,t,r){if(!Jc(t))throw Error(i(200));return Zc(null,e,t,!0,r)},t.hydrateRoot=function(e,t,r){if(!Gc(e))throw Error(i(405));var n=null!=r&&r.hydratedSources||null,o=!1,a="",s=Qc;if(null!=r&&(!0===r.unstable_strictMode&&(o=!0),void 0!==r.identifierPrefix&&(a=r.identifierPrefix),void 0!==r.onRecoverableError&&(s=r.onRecoverableError)),t=zc(t,null,e,1,null!=r?r:null,o,0,a,s),e[Ao]=t.current,zn(e),n)for(e=0;e<n.length;e++)o=(o=(r=n[e])._getVersion)(r._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[r,o]:t.mutableSourceEagerHydrationData.push(r,o);return new Kc(t)},t.render=function(e,t,r){if(!Jc(t))throw Error(i(200));return Zc(null,e,t,!1,r)},t.unmountComponentAtNode=function(e){if(!Jc(e))throw Error(i(40));return!!e._reactRootContainer&&(dc(function(){Zc(null,null,e,!1,function(){e._reactRootContainer=null,e[Ao]=null})}),!0)},t.unstable_batchedUpdates=cc,t.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Jc(r))throw Error(i(200));if(null==e||void 0===e._reactInternals)throw Error(i(38));return Zc(e,t,r,!1,n)},t.version="18.3.1-next-f1338f8080-20240426"},7433:function(e){"use strict";var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},7810:function(e,t,r){"use strict";e.exports=r(5677)},8626:function(e,t,r){"use strict";e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},8990:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},9827:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nc=void 0;var n={};return function(){"use strict";r.d(n,{default:function(){return wn}});var e={};r.r(e),r.d(e,{Exception:function(){return V},average:function(){return R},difference:function(){return L},flatMap:function(){return z},isChrome:function(){return N},isElectron:function(){return M},isFirefox:function(){return U},isLegacyEdge:function(){return j},isSafari:function(){return F},promisifyEvents:function(){return W},queryToJson:function(){return $},sortByMimeTypes:function(){return q}});var t=r(1931),o=r.n(t),i=r(4785);class a extends i.EventEmitter{constructor(e){super(),Object.defineProperties(this,{_attempts:{value:0,writable:!0},_duration:{enumerable:!1,get(){let e=this._min*Math.pow(this._factor,this._attempts);if(this._jitter){const t=Math.random(),r=Math.floor(t*this._jitter*e);e=1&Math.floor(10*t)?e+r:e-r}return 0|Math.min(e,this._max)}},_factor:{value:e.factor||2},_jitter:{value:e.jitter>0&&e.jitter<=1?e.jitter:0},_max:{value:e.max||1e4},_min:{value:e.min||100},_timeoutID:{value:null,writable:!0}})}backoff(){const e=this._duration;this._timeoutID&&(clearTimeout(this._timeoutID),this._timeoutID=null),this.emit("backoff",this._attempts,e),this._timeoutID=setTimeout(()=>{this.emit("ready",this._attempts,e),this._attempts++},e)}reset(){this._attempts=0,this._timeoutID&&(clearTimeout(this._timeoutID),this._timeoutID=null)}}function s(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}l((n=n.apply(e,t||[])).next())})}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var l,c,d,u,h,p,g,A,f,m=r(3667);class v extends Error{constructor(e,t){super(),Object.setPrototypeOf(this,v.prototype);const r="string"==typeof e?e:this.explanation,n="object"==typeof e?e:t;this.message=`${this.name} (${this.code}): ${r}`,this.originalError=n}}!function(e){e.AccessTokenInvalid=class extends v{constructor(t,r){super(t,r),this.causes=[],this.code=20101,this.description="Invalid access token",this.explanation="Twilio was unable to validate your Access Token",this.name="AccessTokenInvalid",this.solutions=[],Object.setPrototypeOf(this,e.AccessTokenInvalid.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}},e.AccessTokenExpired=class extends v{constructor(t,r){super(t,r),this.causes=[],this.code=20104,this.description="Access token expired or expiration date invalid",this.explanation="The Access Token provided to the Twilio API has expired, the expiration time specified in the token was invalid, or the expiration time specified was too far in the future",this.name="AccessTokenExpired",this.solutions=[],Object.setPrototypeOf(this,e.AccessTokenExpired.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}},e.AuthenticationFailed=class extends v{constructor(t,r){super(t,r),this.causes=[],this.code=20151,this.description="Authentication Failed",this.explanation="The Authentication with the provided JWT failed",this.name="AuthenticationFailed",this.solutions=[],Object.setPrototypeOf(this,e.AuthenticationFailed.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}}}(l||(l={})),function(e){e.AccessTokenSignatureValidationFailed=class extends v{constructor(t,r){super(t,r),this.causes=["The access token has an invalid Account SID, API Key, or API Key Secret."],this.code=31202,this.description="Signature validation failed.",this.explanation="The provided access token failed signature validation.",this.name="AccessTokenSignatureValidationFailed",this.solutions=["Ensure the Account SID, API Key, and API Key Secret are valid when generating your access token."],Object.setPrototypeOf(this,e.AccessTokenSignatureValidationFailed.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}}}(c||(c={})),function(e){e.BadRequest=class extends v{constructor(t,r){super(t,r),this.causes=[],this.code=31400,this.description="Bad Request (HTTP/SIP)",this.explanation="The request could not be understood due to malformed syntax.",this.name="BadRequest",this.solutions=[],Object.setPrototypeOf(this,e.BadRequest.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}},e.NotFound=class extends v{constructor(t,r){super(t,r),this.causes=["The outbound call was made to an invalid phone number.","The TwiML application sid is missing a Voice URL."],this.code=31404,this.description="Not Found (HTTP/SIP)",this.explanation="The server has not found anything matching the request.",this.name="NotFound",this.solutions=["Ensure the phone number dialed is valid.","Ensure the TwiML application is configured correctly with a Voice URL link."],Object.setPrototypeOf(this,e.NotFound.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}},e.TemporarilyUnavailable=class extends v{constructor(t,r){super(t,r),this.causes=[],this.code=31480,this.description="Temporarily Unavailable (SIP)",this.explanation="The callee is currently unavailable.",this.name="TemporarilyUnavailable",this.solutions=[],Object.setPrototypeOf(this,e.TemporarilyUnavailable.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}},e.BusyHere=class extends v{constructor(t,r){super(t,r),this.causes=[],this.code=31486,this.description="Busy Here (SIP)",this.explanation="The callee is busy.",this.name="BusyHere",this.solutions=[],Object.setPrototypeOf(this,e.BusyHere.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}}}(d||(d={})),function(e){e.Decline=class extends v{constructor(t,r){super(t,r),this.causes=[],this.code=31603,this.description="Decline (SIP)",this.explanation="The callee does not wish to participate in the call.",this.name="Decline",this.solutions=[],Object.setPrototypeOf(this,e.Decline.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}}}(u||(u={})),function(e){e.UnknownError=class extends v{constructor(t,r){super(t,r),this.causes=[],this.code=31e3,this.description="Unknown Error",this.explanation="An unknown error has occurred. See error details for more information.",this.name="UnknownError",this.solutions=[],Object.setPrototypeOf(this,e.UnknownError.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}},e.ApplicationNotFoundError=class extends v{constructor(t,r){super(t,r),this.causes=[],this.code=31001,this.description="Application Not Found",this.explanation="",this.name="ApplicationNotFoundError",this.solutions=[],Object.setPrototypeOf(this,e.ApplicationNotFoundError.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}},e.ConnectionDeclinedError=class extends v{constructor(t,r){super(t,r),this.causes=[],this.code=31002,this.description="Connection Declined",this.explanation="",this.name="ConnectionDeclinedError",this.solutions=[],Object.setPrototypeOf(this,e.ConnectionDeclinedError.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}},e.ConnectionTimeoutError=class extends v{constructor(t,r){super(t,r),this.causes=[],this.code=31003,this.description="Connection Timeout",this.explanation="The server could not produce a response within a suitable amount of time.",this.name="ConnectionTimeoutError",this.solutions=[],Object.setPrototypeOf(this,e.ConnectionTimeoutError.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}},e.ConnectionError=class extends v{constructor(t,r){super(t,r),this.causes=[],this.code=31005,this.description="Connection error",this.explanation="A connection error occurred during the call",this.name="ConnectionError",this.solutions=[],Object.setPrototypeOf(this,e.ConnectionError.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}},e.CallCancelledError=class extends v{constructor(t,r){super(t,r),this.causes=["The incoming call was cancelled because it was not answered in time or it was accepted/rejected by another application instance registered with the same identity."],this.code=31008,this.description="Call cancelled",this.explanation="Unable to answer because the call has ended",this.name="CallCancelledError",this.solutions=[],Object.setPrototypeOf(this,e.CallCancelledError.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}},e.TransportError=class extends v{constructor(t,r){super(t,r),this.causes=[],this.code=31009,this.description="Transport error",this.explanation="No transport available to send or receive messages",this.name="TransportError",this.solutions=[],Object.setPrototypeOf(this,e.TransportError.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}}}(h||(h={})),function(e){e.MalformedRequestError=class extends v{constructor(t,r){super(t,r),this.causes=["Invalid content or MessageType passed to sendMessage method."],this.code=31100,this.description="The request had malformed syntax.",this.explanation="The request could not be understood due to malformed syntax.",this.name="MalformedRequestError",this.solutions=["Ensure content and MessageType passed to sendMessage method are valid."],Object.setPrototypeOf(this,e.MalformedRequestError.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}},e.MissingParameterArrayError=class extends v{constructor(t,r){super(t,r),this.causes=[],this.code=31101,this.description="Missing parameter array in request",this.explanation="",this.name="MissingParameterArrayError",this.solutions=[],Object.setPrototypeOf(this,e.MissingParameterArrayError.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}},e.AuthorizationTokenMissingError=class extends v{constructor(t,r){super(t,r),this.causes=[],this.code=31102,this.description="Authorization token missing in request.",this.explanation="",this.name="AuthorizationTokenMissingError",this.solutions=[],Object.setPrototypeOf(this,e.AuthorizationTokenMissingError.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}},e.MaxParameterLengthExceededError=class extends v{constructor(t,r){super(t,r),this.causes=[],this.code=31103,this.description="Maximum parameter length has been exceeded.",this.explanation="Length of parameters cannot exceed MAX_PARAM_LENGTH.",this.name="MaxParameterLengthExceededError",this.solutions=[],Object.setPrototypeOf(this,e.MaxParameterLengthExceededError.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}},e.InvalidBridgeTokenError=class extends v{constructor(t,r){super(t,r),this.causes=[],this.code=31104,this.description="Invalid bridge token",this.explanation="",this.name="InvalidBridgeTokenError",this.solutions=[],Object.setPrototypeOf(this,e.InvalidBridgeTokenError.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}},e.InvalidClientNameError=class extends v{constructor(t,r){super(t,r),this.causes=["Client name contains invalid characters."],this.code=31105,this.description="Invalid client name",this.explanation="Client name should not contain control, space, delims, or unwise characters.",this.name="InvalidClientNameError",this.solutions=["Make sure that client name does not contain any of the invalid characters."],Object.setPrototypeOf(this,e.InvalidClientNameError.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}},e.ReconnectParameterInvalidError=class extends v{constructor(t,r){super(t,r),this.causes=[],this.code=31107,this.description="The reconnect parameter is invalid",this.explanation="",this.name="ReconnectParameterInvalidError",this.solutions=[],Object.setPrototypeOf(this,e.ReconnectParameterInvalidError.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}}}(p||(p={})),function(e){e.AuthorizationError=class extends v{constructor(t,r){super(t,r),this.causes=[],this.code=31201,this.description="Authorization error",this.explanation="The request requires user authentication. The server understood the request, but is refusing to fulfill it.",this.name="AuthorizationError",this.solutions=[],Object.setPrototypeOf(this,e.AuthorizationError.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}},e.NoValidAccountError=class extends v{constructor(t,r){super(t,r),this.causes=[],this.code=31203,this.description="No valid account",this.explanation="",this.name="NoValidAccountError",this.solutions=[],Object.setPrototypeOf(this,e.NoValidAccountError.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}},e.InvalidJWTTokenError=class extends v{constructor(t,r){super(t,r),this.causes=[],this.code=31204,this.description="Invalid JWT token",this.explanation="",this.name="InvalidJWTTokenError",this.solutions=[],Object.setPrototypeOf(this,e.InvalidJWTTokenError.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}},e.JWTTokenExpiredError=class extends v{constructor(t,r){super(t,r),this.causes=[],this.code=31205,this.description="JWT token expired",this.explanation="",this.name="JWTTokenExpiredError",this.solutions=[],Object.setPrototypeOf(this,e.JWTTokenExpiredError.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}},e.RateExceededError=class extends v{constructor(t,r){super(t,r),this.causes=["Rate limit exceeded."],this.code=31206,this.description="Rate exceeded authorized limit.",this.explanation="The request performed exceeds the authorized limit.",this.name="RateExceededError",this.solutions=["Ensure message send rate does not exceed authorized limits."],Object.setPrototypeOf(this,e.RateExceededError.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}},e.JWTTokenExpirationTooLongError=class extends v{constructor(t,r){super(t,r),this.causes=[],this.code=31207,this.description="JWT token expiration too long",this.explanation="",this.name="JWTTokenExpirationTooLongError",this.solutions=[],Object.setPrototypeOf(this,e.JWTTokenExpirationTooLongError.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}},e.ReconnectAttemptError=class extends v{constructor(t,r){super(t,r),this.causes=[],this.code=31209,this.description="Reconnect attempt is not authorized.",this.explanation="",this.name="ReconnectAttemptError",this.solutions=[],Object.setPrototypeOf(this,e.ReconnectAttemptError.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}},e.CallMessageEventTypeInvalidError=class extends v{constructor(t,r){super(t,r),this.causes=["The Call Message Event Type is invalid and is not understood by Twilio Voice."],this.code=31210,this.description="Call Message Event Type is invalid.",this.explanation="The Call Message Event Type is invalid and is not understood by Twilio Voice.",this.name="CallMessageEventTypeInvalidError",this.solutions=["Ensure the Call Message Event Type is Valid and understood by Twilio Voice and try again."],Object.setPrototypeOf(this,e.CallMessageEventTypeInvalidError.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}},e.PayloadSizeExceededError=class extends v{constructor(t,r){super(t,r),this.causes=["The payload size of Call Message Event exceeds the authorized limit."],this.code=31212,this.description="Call Message Event Payload size exceeded authorized limit.",this.explanation="The request performed to send a Call Message Event exceeds the payload size authorized limit",this.name="PayloadSizeExceededError",this.solutions=["Reduce payload size of Call Message Event to be within the authorized limit and try again."],Object.setPrototypeOf(this,e.PayloadSizeExceededError.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}}}(l||(l={})),function(e){e.PermissionDeniedError=class extends v{constructor(t,r){super(t,r),this.causes=["The user denied the getUserMedia request.","The browser denied the getUserMedia request."],this.code=31401,this.description="UserMedia Permission Denied Error",this.explanation="The browser or end-user denied permissions to user media. Therefore we were unable to acquire input audio.",this.name="PermissionDeniedError",this.solutions=["The user should accept the request next time prompted. If the browser saved the deny, the user should change that permission in their browser.","The user should to verify that the browser has permission to access the microphone at this address."],Object.setPrototypeOf(this,e.PermissionDeniedError.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}},e.AcquisitionFailedError=class extends v{constructor(t,r){super(t,r),this.causes=["NotFoundError - The deviceID specified was not found.","The getUserMedia constraints were overconstrained and no devices matched."],this.code=31402,this.description="UserMedia Acquisition Failed Error",this.explanation="The browser and end-user allowed permissions, however getting the media failed. Usually this is due to bad constraints, but can sometimes fail due to browser, OS or hardware issues.",this.name="AcquisitionFailedError",this.solutions=["Ensure the deviceID being specified exists.","Try acquiring media with fewer constraints."],Object.setPrototypeOf(this,e.AcquisitionFailedError.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}}}(g||(g={})),function(e){e.ConnectionError=class extends v{constructor(t,r){super(t,r),this.causes=[],this.code=53e3,this.description="Signaling connection error",this.explanation="Raised whenever a signaling connection error occurs that is not covered by a more specific error code.",this.name="ConnectionError",this.solutions=[],Object.setPrototypeOf(this,e.ConnectionError.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}},e.ConnectionDisconnected=class extends v{constructor(t,r){super(t,r),this.causes=["The device running your application lost its Internet connection."],this.code=53001,this.description="Signaling connection disconnected",this.explanation="Raised whenever the signaling connection is unexpectedly disconnected.",this.name="ConnectionDisconnected",this.solutions=["Ensure the device running your application has access to a stable Internet connection."],Object.setPrototypeOf(this,e.ConnectionDisconnected.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}}}(A||(A={})),function(e){e.ClientLocalDescFailed=class extends v{constructor(t,r){super(t,r),this.causes=["The Client may not be using a supported WebRTC implementation.","The Client may not have the necessary resources to create or apply a new media description."],this.code=53400,this.description="Client is unable to create or apply a local media description",this.explanation="Raised whenever a Client is unable to create or apply a local media description.",this.name="ClientLocalDescFailed",this.solutions=["If you are experiencing this error using the JavaScript SDK, ensure you are running it with a supported WebRTC implementation."],Object.setPrototypeOf(this,e.ClientLocalDescFailed.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}},e.ClientRemoteDescFailed=class extends v{constructor(t,r){super(t,r),this.causes=["The Client may not be using a supported WebRTC implementation.","The Client may be connecting peer-to-peer with another Participant that is not using a supported WebRTC implementation.","The Client may not have the necessary resources to apply a new media description."],this.code=53402,this.description="Client is unable to apply a remote media description",this.explanation="Raised whenever the Client receives a remote media description but is unable to apply it.",this.name="ClientRemoteDescFailed",this.solutions=["If you are experiencing this error using the JavaScript SDK, ensure you are running it with a supported WebRTC implementation."],Object.setPrototypeOf(this,e.ClientRemoteDescFailed.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}},e.ConnectionError=class extends v{constructor(t,r){super(t,r),this.causes=["The Client was unable to establish a media connection.","A media connection which was active failed liveliness checks."],this.code=53405,this.description="Media connection failed",this.explanation="Raised by the Client or Server whenever a media connection fails.",this.name="ConnectionError",this.solutions=["If the problem persists, try connecting to another region.","Check your Client's network connectivity.","If you've provided custom ICE Servers then ensure that the URLs and credentials are valid."],Object.setPrototypeOf(this,e.ConnectionError.prototype);const n="string"==typeof t?t:this.explanation,o="object"==typeof t?t:r;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=o}}}(f||(f={}));const C=new Map([[20101,l.AccessTokenInvalid],[20104,l.AccessTokenExpired],[20151,l.AuthenticationFailed],[31202,c.AccessTokenSignatureValidationFailed],[31400,d.BadRequest],[31404,d.NotFound],[31480,d.TemporarilyUnavailable],[31486,d.BusyHere],[31603,u.Decline],[31e3,h.UnknownError],[31001,h.ApplicationNotFoundError],[31002,h.ConnectionDeclinedError],[31003,h.ConnectionTimeoutError],[31005,h.ConnectionError],[31008,h.CallCancelledError],[31009,h.TransportError],[31100,p.MalformedRequestError],[31101,p.MissingParameterArrayError],[31102,p.AuthorizationTokenMissingError],[31103,p.MaxParameterLengthExceededError],[31104,p.InvalidBridgeTokenError],[31105,p.InvalidClientNameError],[31107,p.ReconnectParameterInvalidError],[31201,l.AuthorizationError],[31203,l.NoValidAccountError],[31204,l.InvalidJWTTokenError],[31205,l.JWTTokenExpiredError],[31206,l.RateExceededError],[31207,l.JWTTokenExpirationTooLongError],[31209,l.ReconnectAttemptError],[31210,l.CallMessageEventTypeInvalidError],[31212,l.PayloadSizeExceededError],[31401,g.PermissionDeniedError],[31402,g.AcquisitionFailedError],[53e3,A.ConnectionError],[53001,A.ConnectionDisconnected],[53400,f.ClientLocalDescFailed],[53402,f.ClientRemoteDescFailed],[53405,f.ConnectionError]]);Object.freeze(C);const w=new Set([31001,31002,31003,31101,31102,31103,31104,31105,31107,31201,31202,31203,31204,31205,31207,31404,31480,31486,31603]);function b(e,t){var r;if("number"==typeof t&&(r=t,C.has(r)))return!e&&w.has(t)?void 0:function(e){const t=C.get(e);if(!t)throw new y(`Error code ${e} not found`);return t}(t)}class y extends Error{constructor(e){super(e),this.name="InvalidArgumentError"}}class k extends Error{constructor(e){super(e),this.name="InvalidStateError"}}class x extends Error{constructor(e){super(e),this.name="NotSupportedError"}}const _="@twilio/voice-sdk",S="2.17.0",B="https://sdk.twilio.com/js/client/sounds/releases/1.0.0",E=`${B}/cowbell.mp3?cache=${S}`;class T{static getLogLevelInstance(e){if(!T.loglevelInstance)try{T.loglevelInstance=(e&&e.LogLevelModule?e.LogLevelModule:m).getLogger(_)}catch(e){console.warn("Cannot create custom logger"),T.loglevelInstance=console}return T.loglevelInstance}constructor(e,t){this._log=T.getLogLevelInstance(t),this._prefix=`[TwilioVoice][${e}]`}debug(...e){this._log.debug(this._prefix,...e)}error(...e){this._log.error(this._prefix,...e)}info(...e){this._log.info(this._prefix,...e)}setDefaultLevel(e){this._log.setDefaultLevel?this._log.setDefaultLevel(e):console.warn("Logger cannot setDefaultLevel")}warn(...e){this._log.warn(this._prefix,...e)}}T.levels=m.levels,T.getLogLevelInstance();const P=`${B}/outgoing.mp3`;class I{constructor(e,t,r,n){this._name=e,this._availableDevices=t,this._beforeChange=r,this._isSupported=n,this._activeDevices=new Set,this._log=new T("OutputDeviceCollection")}delete(e){this._log.debug(".delete",e);const t=!!this._activeDevices.delete(e),r=this._availableDevices.get("default")||Array.from(this._availableDevices.values())[0];!this._activeDevices.size&&r&&this._activeDevices.add(r);const n=Array.from(this._activeDevices.values()).map(e=>e.deviceId);return this._beforeChange(this._name,n),!!t}get(){return this._activeDevices}set(e){if(this._log.debug(".set",e),!this._isSupported)return Promise.reject(new x("This browser does not support audio output selection"));const t=Array.isArray(e)?e:[e];if(!t.length)return Promise.reject(new y("Must specify at least one device to set"));const r=[],n=t.map(e=>{const t=this._availableDevices.get(e);return t||r.push(e),t});return r.length?Promise.reject(new y(`Devices not found: ${r.join(", ")}`)):new Promise(e=>{e(this._beforeChange(this._name,t))}).then(()=>{this._activeDevices.clear(),n.forEach(this._activeDevices.add,this._activeDevices)})}test(e=P){return this._isSupported?this._activeDevices.size?Promise.all(Array.from(this._activeDevices).map(t=>{let r;return new Promise(t=>{r=new Audio(e),r.oncanplay=t}).then(()=>r.setSinkId(t.deviceId).then(()=>r.play()))})):Promise.reject(new k("No active output devices to test")):Promise.reject(new x("This browser does not support audio output selection"))}}class D{constructor(e){Object.defineProperties(this,{deviceId:{get(){return e.deviceId}},groupId:{get(){return e.groupId}},kind:{get(){return e.kind}},label:{get(){return e.label}}})}}function O(e){if(!(this instanceof O))return new O(e);this.message=e}function R(e){return e&&e.length?e.reduce((e,t)=>e+t)/e.length:0}function L(e,t,r){r=r||(e=>e);const n=new Set(t.map(r));return e.filter(e=>!n.has(r(e)))}function M(e){return!!e.userAgent.match("Electron")}function N(e,t){const r=!!t.userAgent.match("CriOS"),n=!!t.userAgent.match("HeadlessChrome"),o=void 0!==e.chrome&&"Google Inc."===t.vendor&&-1===t.userAgent.indexOf("OPR")&&-1===t.userAgent.indexOf("Edge");return r||M(t)||o||n}function U(e){return!!(e=e||("undefined"==typeof window?r.g.navigator:window.navigator))&&"string"==typeof e.userAgent&&/firefox|fxios/i.test(e.userAgent)}function j(e){return!!(e=e||("undefined"==typeof window?r.g.navigator:window.navigator))&&"string"==typeof e.userAgent&&/edge\/\d+/i.test(e.userAgent)}function F(e){return!!e.vendor&&-1!==e.vendor.indexOf("Apple")&&e.userAgent&&-1===e.userAgent.indexOf("CriOS")&&-1===e.userAgent.indexOf("FxiOS")}function $(e){return e?e.split("&").reduce((e,t)=>{const r=t.split("="),n=r[0],o=decodeURIComponent((r[1]||"").replace(/\+/g,"%20"));return n&&(e[n]=o),e},{}):""}function z(e,t){const r=e instanceof Map||e instanceof Set?Array.from(e.values()):e;return t=t||(e=>e),r.reduce((e,r)=>{const n=t(r);return e.concat(n)},[])}function W(e,t,r){return new Promise((n,o)=>{function i(){e.removeListener(r,a),n()}function a(){e.removeListener(t,i),o()}e.once(t,i),e.once(r,a)})}function q(e,t){const r=t.map(e=>"audio/"+e.toLowerCase());return e.sort((e,t)=>{const n=r.indexOf(e.mimeType.toLowerCase()),o=r.indexOf(t.mimeType.toLowerCase());return(n>=0?n:Number.MAX_VALUE)-(o>=0?o:Number.MAX_VALUE)})}O.prototype.toString=function(){return`Twilio.Exception: ${this.message}`};const V=O,H={audioinput:"Audio Input",audiooutput:"Audio Output"};class Q extends i.EventEmitter{get audioConstraints(){return this._audioConstraints}get inputDevice(){return this._inputDevice}get inputStream(){return this._localProcessedStream||this._selectedInputDeviceStream}get processedStream(){return this._log.warn("AudioHelper#processedStream is deprecated. Please use AudioHelper#localProcessedStream instead."),this._localProcessedStream}get localProcessedStream(){return this._localProcessedStream}get remoteProcessedStream(){return this._remoteProcessedStream}constructor(e,t,r){super(),this.availableInputDevices=new Map,this.availableOutputDevices=new Map,this._audioConstraints=null,this._defaultInputDeviceStream=null,this._enabledSounds={[Xe.SoundName.Disconnect]:!0,[Xe.SoundName.Incoming]:!0,[Xe.SoundName.Outgoing]:!0},this._inputDevice=null,this._inputDevicePromise=null,this._isPollingInputVolume=!1,this._log=new T("AudioHelper"),this._localProcessedStream=null,this._remoteProcessedStream=null,this._selectedInputDeviceStream=null,this._unknownDeviceIndexes={audioinput:{},audiooutput:{}},this._updateAvailableDevices=()=>this._mediaDevices&&this._enumerateDevices?this._enumerateDevices().then(e=>{this._updateDevices(e.filter(e=>"audiooutput"===e.kind),this.availableOutputDevices,this._removeLostOutput),this._updateDevices(e.filter(e=>"audioinput"===e.kind),this.availableInputDevices,this._removeLostInput);const t=this.availableOutputDevices.get("default")||Array.from(this.availableOutputDevices.values())[0];[this.speakerDevices,this.ringtoneDevices].forEach(e=>{!e.get().size&&this.availableOutputDevices.size&&this.isOutputSelectionSupported&&e.set(t.deviceId).catch(e=>{this._log.warn(`Unable to set audio output devices. ${e}`)})})}):Promise.reject("Enumeration not supported"),this._removeLostInput=e=>{if(!this.inputDevice||this.inputDevice.deviceId!==e.deviceId)return!1;this._destroyLocalProcessedStream(),this._replaceStream(null),this._inputDevice=null,this._maybeStopPollingVolume();const t=this.availableInputDevices.get("default")||Array.from(this.availableInputDevices.values())[0];return t&&this.setInputDevice(t.deviceId),!0},this._removeLostOutput=e=>{const t=this.speakerDevices.delete(e),r=this.ringtoneDevices.delete(e);return t||r},r=Object.assign({AudioContext:"undefined"!=typeof AudioContext&&AudioContext,setSinkId:"undefined"!=typeof HTMLAudioElement&&HTMLAudioElement.prototype.setSinkId},r),this._beforeSetInputDevice=r.beforeSetInputDevice||(()=>Promise.resolve()),this._updateUserOptions(r),this._audioProcessorEventObserver=r.audioProcessorEventObserver,this._mediaDevices=r.mediaDevices||navigator.mediaDevices,this._onActiveInputChanged=t,this._enumerateDevices="function"==typeof r.enumerateDevices?r.enumerateDevices:this._mediaDevices&&this._mediaDevices.enumerateDevices.bind(this._mediaDevices);const n=!(!r.AudioContext&&!r.audioContext),o=!!this._enumerateDevices;r.enabledSounds&&(this._enabledSounds=r.enabledSounds);const i="function"==typeof r.setSinkId;this.isOutputSelectionSupported=o&&i,this.isVolumeSupported=n,this.isVolumeSupported&&(this._audioContext=r.audioContext||r.AudioContext&&new r.AudioContext,this._audioContext&&(this._inputVolumeAnalyser=this._audioContext.createAnalyser(),this._inputVolumeAnalyser.fftSize=32,this._inputVolumeAnalyser.smoothingTimeConstant=.3)),this.ringtoneDevices=new I("ringtone",this.availableOutputDevices,e,this.isOutputSelectionSupported),this.speakerDevices=new I("speaker",this.availableOutputDevices,e,this.isOutputSelectionSupported),this.addListener("newListener",e=>{"inputVolume"===e&&this._maybeStartPollingVolume()}),this.addListener("removeListener",e=>{"inputVolume"===e&&this._maybeStopPollingVolume()}),this.once("newListener",()=>{this.isOutputSelectionSupported||this._log.warn("Warning: This browser does not support audio output selection."),this.isVolumeSupported||this._log.warn("Warning: This browser does not support Twilio's volume indicator feature.")}),o&&this._initializeEnumeration(),navigator&&navigator.permissions&&"function"==typeof navigator.permissions.query?navigator.permissions.query({name:"microphone"}).then(e=>{if("granted"!==e.state){const t=()=>{this._updateAvailableDevices(),this._stopMicrophonePermissionListener()};e.addEventListener("change",t),this._microphonePermissionStatus=e,this._onMicrophonePermissionStatusChanged=t}}).catch(e=>this._log.warn(`Warning: unable to listen for microphone permission changes. ${e}`)):this._log.warn("Warning: current browser does not support permissions API.")}_destroy(){this._stopDefaultInputDeviceStream(),this._stopSelectedInputDeviceStream(),this._destroyLocalProcessedStream(),this._destroyRemoteProcessedStream(),this._maybeStopPollingVolume(),this.removeAllListeners(),this._stopMicrophonePermissionListener(),this._unbind()}_destroyRemoteProcessedStream(){if(this._remoteProcessor&&this._remoteProcessedStream){this._log.info("destroying remote processed stream");const e=this._remoteProcessedStream;this._remoteProcessedStream.getTracks().forEach(e=>e.stop()),this._remoteProcessedStream=null,this._remoteProcessor.destroyProcessedStream(e),this._audioProcessorEventObserver.emit("destroy",!0)}}_getInputDevicePromise(){return this._inputDevicePromise}_getAudioProcessorEventObserver(){return this._audioProcessorEventObserver}_maybeCreateRemoteProcessedStream(e){return this._remoteProcessor?(this._log.info("Creating remote processed stream"),this._remoteProcessor.createProcessedStream(e).then(e=>(this._remoteProcessedStream=e,this._audioProcessorEventObserver.emit("create",!0),this._remoteProcessedStream))):Promise.resolve(e)}_maybeStartPollingVolume(){if(!this.isVolumeSupported||!this.inputStream)return;if(this._updateVolumeSource(),this._isPollingInputVolume||!this._inputVolumeAnalyser)return;const e=this._inputVolumeAnalyser.frequencyBinCount,t=new Uint8Array(e);this._isPollingInputVolume=!0;const r=()=>{if(this._isPollingInputVolume){if(this._inputVolumeAnalyser){this._inputVolumeAnalyser.getByteFrequencyData(t);const e=R(t);this.emit("inputVolume",e/255)}requestAnimationFrame(r)}};requestAnimationFrame(r)}_maybeStopPollingVolume(){this.isVolumeSupported&&(!this._isPollingInputVolume||this.inputStream&&this.listenerCount("inputVolume")||(this._inputVolumeSource&&(this._inputVolumeSource.disconnect(),delete this._inputVolumeSource),this._isPollingInputVolume=!1))}_openDefaultDeviceWithConstraints(e){return this._log.info("Opening default device with constraints",e),this._getUserMedia(e).then(e=>(this._log.info("Opened default device. Updating available devices."),this._updateAvailableDevices().catch(e=>{this._log.warn("Unable to updateAvailableDevices after gUM call",e)}),this._defaultInputDeviceStream=e,this._maybeCreateLocalProcessedStream(e)))}_stopDefaultInputDeviceStream(){this._defaultInputDeviceStream&&(this._log.info("stopping default device stream"),this._defaultInputDeviceStream.getTracks().forEach(e=>e.stop()),this._defaultInputDeviceStream=null,this._destroyLocalProcessedStream())}_unbind(){var e;(null===(e=this._mediaDevices)||void 0===e?void 0:e.removeEventListener)&&this._mediaDevices.removeEventListener("devicechange",this._updateAvailableDevices)}_updateUserOptions(e){"function"==typeof e.enumerateDevices&&(this._enumerateDevices=e.enumerateDevices),"function"==typeof e.getUserMedia&&(this._getUserMedia=e.getUserMedia)}addProcessor(e,t=!1){if(this._log.debug(".addProcessor"),this._localProcessor&&!t)throw new x("Can only have one Local AudioProcessor at a time.");if(this._remoteProcessor&&t)throw new x("Can only have one Remote AudioProcessor at a time.");if("object"!=typeof e||null===e)throw new y("Missing AudioProcessor argument.");if("function"!=typeof e.createProcessedStream)throw new y("Missing createProcessedStream() method.");if("function"!=typeof e.destroyProcessedStream)throw new y("Missing destroyProcessedStream() method.");return t?(this._remoteProcessor=e,this._audioProcessorEventObserver.emit("add",!0),Promise.resolve()):(this._localProcessor=e,this._audioProcessorEventObserver.emit("add",!1),this._restartInputStreams())}disconnect(e){return this._log.debug(".disconnect",e),this._maybeEnableSound(Xe.SoundName.Disconnect,e)}incoming(e){return this._log.debug(".incoming",e),this._maybeEnableSound(Xe.SoundName.Incoming,e)}outgoing(e){return this._log.debug(".outgoing",e),this._maybeEnableSound(Xe.SoundName.Outgoing,e)}removeProcessor(e,t=!1){if(this._log.debug(".removeProcessor"),"object"!=typeof e||null===e)throw new y("Missing AudioProcessor argument.");if(this._localProcessor!==e&&!t)throw new y("Cannot remove a Local AudioProcessor that has not been previously added.");if(this._remoteProcessor!==e&&t)throw new y("Cannot remove a Remote AudioProcessor that has not been previously added.");return t?(this._destroyRemoteProcessedStream(),this._remoteProcessor=null,this._audioProcessorEventObserver.emit("remove",!0),Promise.resolve()):(this._destroyLocalProcessedStream(),this._localProcessor=null,this._audioProcessorEventObserver.emit("remove",!1),this._restartInputStreams())}setAudioConstraints(e){return this._log.debug(".setAudioConstraints",e),this._audioConstraints=Object.assign({},e),delete this._audioConstraints.deviceId,this.inputDevice?this._setInputDevice(this.inputDevice.deviceId,!0):Promise.resolve()}setInputDevice(e){return this._log.debug(".setInputDevice",e),this._setInputDevice(e,!1)}unsetAudioConstraints(){return this._log.debug(".unsetAudioConstraints"),this._audioConstraints=null,this.inputDevice?this._setInputDevice(this.inputDevice.deviceId,!0):Promise.resolve()}unsetInputDevice(){return this._log.debug(".unsetInputDevice",this.inputDevice),this.inputDevice?(this._destroyLocalProcessedStream(),this._onActiveInputChanged(null).then(()=>{this._replaceStream(null),this._inputDevice=null,this._maybeStopPollingVolume()})):Promise.resolve()}_destroyLocalProcessedStream(){if(this._localProcessor&&this._localProcessedStream){this._log.info("destroying local processed stream");const e=this._localProcessedStream;this._localProcessedStream.getTracks().forEach(e=>e.stop()),this._localProcessedStream=null,this._localProcessor.destroyProcessedStream(e),this._audioProcessorEventObserver.emit("destroy",!1)}}_getUnknownDeviceIndex(e){const t=e.deviceId,r=e.kind;let n=this._unknownDeviceIndexes[r][t];return n||(n=Object.keys(this._unknownDeviceIndexes[r]).length+1,this._unknownDeviceIndexes[r][t]=n),n}_initializeEnumeration(){if(!this._mediaDevices||!this._enumerateDevices)throw new x("Enumeration is not supported");this._mediaDevices.addEventListener&&this._mediaDevices.addEventListener("devicechange",this._updateAvailableDevices),this._updateAvailableDevices().then(()=>{this.isOutputSelectionSupported&&Promise.all([this.speakerDevices.set("default"),this.ringtoneDevices.set("default")]).catch(e=>{this._log.warn(`Warning: Unable to set audio output devices. ${e}`)})})}_maybeCreateLocalProcessedStream(e){return this._localProcessor?(this._log.info("Creating local processed stream"),this._localProcessor.createProcessedStream(e).then(e=>(this._localProcessedStream=e,this._audioProcessorEventObserver.emit("create",!1),this._localProcessedStream))):Promise.resolve(e)}_maybeEnableSound(e,t){return void 0!==t&&(this._enabledSounds[e]=t),this._enabledSounds[e]}_replaceStream(e){this._log.info("Replacing with new stream."),this._selectedInputDeviceStream&&(this._log.info("Old stream detected. Stopping tracks."),this._stopSelectedInputDeviceStream()),this._selectedInputDeviceStream=e}_restartInputStreams(){if(this.inputDevice&&this._selectedInputDeviceStream)return this._log.info("Restarting selected input device"),this._setInputDevice(this.inputDevice.deviceId,!0);if(this._defaultInputDeviceStream){const e=this.availableInputDevices.get("default")||Array.from(this.availableInputDevices.values())[0];return this._log.info("Restarting default input device, now becoming selected."),this._setInputDevice(e.deviceId,!0)}return Promise.resolve()}_setInputDevice(e,t){return s(this,void 0,void 0,function*(){return this._inputDevicePromise=(()=>s(this,void 0,void 0,function*(){if(yield this._beforeSetInputDevice(),"string"!=typeof e)return Promise.reject(new y("Must specify the device to set"));const r=this.availableInputDevices.get(e);if(!r)return Promise.reject(new y(`Device not found: ${e}`));if(this._log.info("Setting input device. ID: "+e),this._inputDevice&&this._inputDevice.deviceId===e&&this._selectedInputDeviceStream){if(!t)return Promise.resolve();this._log.info("Same track detected on setInputDevice, stopping old tracks."),this._stopSelectedInputDeviceStream()}this._stopDefaultInputDeviceStream();const n={audio:Object.assign({deviceId:{exact:e}},this.audioConstraints)};return this._log.info("setInputDevice: getting new tracks."),this._getUserMedia(n).then(e=>(this._destroyLocalProcessedStream(),this._maybeCreateLocalProcessedStream(e).then(t=>(this._log.info("setInputDevice: invoking _onActiveInputChanged."),this._onActiveInputChanged(t).then(()=>{this._replaceStream(e),this._inputDevice=r,this._maybeStartPollingVolume()})))))}))().finally(()=>{this._inputDevicePromise=null})})}_stopMicrophonePermissionListener(){var e;(null===(e=this._microphonePermissionStatus)||void 0===e?void 0:e.removeEventListener)&&this._microphonePermissionStatus.removeEventListener("change",this._onMicrophonePermissionStatusChanged)}_stopSelectedInputDeviceStream(){this._selectedInputDeviceStream&&(this._log.info("Stopping selected device stream"),this._selectedInputDeviceStream.getTracks().forEach(e=>e.stop()))}_updateDevices(e,t,r){const n=e.map(e=>e.deviceId),o=Array.from(t.values()).map(e=>e.deviceId),i=[],a=L(o,n);a.forEach(e=>{const n=t.get(e);n&&(t.delete(e),r(n)&&i.push(n))});let s=!1;if(e.forEach(e=>{const r=t.get(e.deviceId),n=this._wrapMediaDeviceInfo(e);r&&r.label===n.label||(t.set(e.deviceId,n),s=!0)}),s||a.length){const e="default",t=this.inputDevice&&this.inputDevice.deviceId===e,r=this._defaultInputDeviceStream&&this.availableInputDevices.get(e);(t||r)&&(this._log.warn("Calling getUserMedia after device change to ensure that the tracks of the active device (default) have not gone stale."),setTimeout(()=>{this._setInputDevice(e,!0)},0)),this._log.debug("#deviceChange",i),this.emit("deviceChange",i)}}_updateVolumeSource(){if(this.inputStream&&this._audioContext&&this._inputVolumeAnalyser){this._inputVolumeSource&&this._inputVolumeSource.disconnect();try{this._inputVolumeSource=this._audioContext.createMediaStreamSource(this.inputStream),this._inputVolumeSource.connect(this._inputVolumeAnalyser)}catch(e){this._log.warn("Unable to update volume source",e),delete this._inputVolumeSource}}}_wrapMediaDeviceInfo(e){const t={deviceId:e.deviceId,groupId:e.groupId,kind:e.kind,label:e.label};if(!t.label)if("default"===t.deviceId)t.label="Default";else{const r=this._getUnknownDeviceIndex(e);t.label=`Unknown ${H[t.kind]} Device ${r}`}return new D(t)}}Q||(Q={});var Y=Q;class K extends i.EventEmitter{constructor(){super(),this._log=new T("AudioProcessorEventObserver"),this._log.info("Creating AudioProcessorEventObserver instance"),this.on("enabled",e=>this._reEmitEvent("enabled",e)),this.on("add",e=>this._reEmitEvent("add",e)),this.on("remove",e=>this._reEmitEvent("remove",e)),this.on("create",e=>this._reEmitEvent("create-processed-stream",e)),this.on("destroy",e=>this._reEmitEvent("destroy-processed-stream",e))}destroy(){this.removeAllListeners()}_reEmitEvent(e,t){this._log.info(`${t?"Remote":"Local"} AudioProcessor:${e}`),this.emit("event",{name:e,group:"audio-processor",isRemote:t})}}const G={dtmf0:[1360,960],dtmf1:[1230,720],dtmf2:[1360,720],dtmf3:[1480,720],dtmf4:[1230,790],dtmf5:[1360,790],dtmf6:[1480,790],dtmf7:[1230,870],dtmf8:[1360,870],dtmf9:[1480,870],dtmfh:[1480,960],dtmfs:[1230,960]};class J{constructor(e){this._context=e,this._gainNodes=[],this._gainNodes=[this._context.createGain(),this._context.createGain()],this._gainNodes.forEach(e=>{e.connect(this._context.destination),e.gain.value=.1,this._gainNodes.push(e)})}cleanup(){this._gainNodes.forEach(e=>{e.disconnect()})}play(e){const t=G[e];if(!t)throw new y("Invalid DTMF sound name");[this._context.createOscillator(),this._context.createOscillator()].forEach((e,r)=>{e.type="sine",e.frequency.value=t[r],e.connect(this._gainNodes[r]),e.start(),e.stop(this._context.currentTime+.1),e.addEventListener("ended",()=>e.disconnect())})}}const X=function(e,t,r){const n=JSON.stringify(t.body||{}),o=new Headers;t.headers=t.headers||[],Object.entries(t.headers).forEach(([e,t])=>o.append(e,t)),fetch(t.url,{body:n,headers:o,method:e}).then(e=>e.text(),r).then(e=>r(null,e),r)};X.get=function(e,t){return new this("GET",e,t)},X.post=function(e,t){return new this("POST",e,t)};class Z extends i.EventEmitter{constructor(e,t,r){if(super(),!(this instanceof Z))return new Z(e,t,r);let n=(r=Object.assign({defaultPayload(){return{}}},r)).defaultPayload;"function"!=typeof n&&(n=()=>Object.assign({},r.defaultPayload));let o=!0;const i=Object.assign({app_name:void 0,app_version:void 0},r.metadata);Object.defineProperties(this,{_defaultPayload:{value:n},_host:{value:r.host,writable:!0},_isEnabled:{get(){return o},set(e){o=e}},_log:{value:new T("EventPublisher")},_request:{value:r.request||X,writable:!0},_token:{value:t,writable:!0},isEnabled:{enumerable:!0,get(){return o}},metadata:{enumerable:!0,get(){return i}},productName:{enumerable:!0,value:e},token:{enumerable:!0,get(){return this._token}}})}}function ee(e){return{audio_codec:e.codecName,audio_level_in:e.audioInputLevel,audio_level_out:e.audioOutputLevel,bytes_received:e.bytesReceived,bytes_sent:e.bytesSent,call_volume_input:e.inputVolume,call_volume_output:e.outputVolume,jitter:e.jitter,mos:e.mos&&Math.round(100*e.mos)/100,packets_lost:e.packetsLost,packets_lost_fraction:e.packetsLostFraction&&Math.round(100*e.packetsLostFraction)/100,packets_received:e.packetsReceived,rtt:e.rtt,timestamp:new Date(e.timestamp).toISOString(),total_bytes_received:e.totals.bytesReceived,total_bytes_sent:e.totals.bytesSent,total_packets_lost:e.totals.packetsLost,total_packets_received:e.totals.packetsReceived,total_packets_sent:e.totals.packetsSent}}Z.prototype._post=function(e,t,r,n,o,i,a){if(!this.isEnabled&&!a||!this._host)return this._log.debug("Publishing cancelled",JSON.stringify({isEnabled:this.isEnabled,force:a,host:this._host})),Promise.resolve();if(!i||!(i.parameters&&i.parameters.CallSid||i.outboundConnectionId))return i?this._log.debug("Publishing cancelled. Missing connection info",JSON.stringify({outboundConnectionId:i.outboundConnectionId,parameters:i.parameters})):this._log.debug("Publishing cancelled. Missing connection object"),Promise.resolve();const s={group:r,level:t.toUpperCase(),name:n,payload:o&&o.forEach?o.slice(0):Object.assign(this._defaultPayload(i),o),payload_type:"application/json",private:!1,publisher:this.productName,timestamp:(new Date).toISOString()};this.metadata&&(s.publisher_metadata=this.metadata),"EndpointEvents"===e&&this._log.debug("Publishing insights",JSON.stringify({endpointName:e,event:s,force:a,host:this._host}));const l={body:s,headers:{"Content-Type":"application/json","X-Twilio-Token":this.token},url:`https://${this._host}/v4/${e}`};return new Promise((e,t)=>{this._request.post(l,r=>{r?(this.emit("error",r),t(r)):e()})}).catch(e=>{this._log.error(`Unable to post ${r} ${n} event to Insights. Received error: ${e}`)})},Z.prototype.post=function(e,t,r,n,o,i){return this._post("EndpointEvents",e,t,r,n,o,i)},Z.prototype.debug=function(e,t,r,n){return this.post("debug",e,t,r,n)},Z.prototype.info=function(e,t,r,n){return this.post("info",e,t,r,n)},Z.prototype.warn=function(e,t,r,n){return this.post("warning",e,t,r,n)},Z.prototype.error=function(e,t,r,n){return this.post("error",e,t,r,n)},Z.prototype.postMetrics=function(e,t,r,n,o){return new Promise(i=>{const a=r.map(ee).map(e=>Object.assign(e,n));i(this._post("EndpointMetrics","info",e,t,a,o))})},Z.prototype.setHost=function(e){this._host=e},Z.prototype.setToken=function(e){this._token=e},Z.prototype.enable=function(){this._isEnabled=!0},Z.prototype.disable=function(){this._isEnabled=!1};const te="undefined"!=typeof window?window.RTCStatsReport:void 0;function re(e){if(!(this instanceof re))return new re(e);const t=this;Object.defineProperties(this,{_map:{value:e},size:{enumerable:!0,get(){return t._map.size}}}),this[Symbol.iterator]=e[Symbol.iterator]}function ne(e){return{bytesReceived:void 0,bytesSent:void 0,dtlsState:void 0,id:e.id,localCertificateId:e.stat("localCertificateId"),remoteCertificateId:e.stat("remoteCertificateId"),rtcpTransportStatsId:void 0,selectedCandidatePairId:e.stat("selectedCandidatePairId"),timestamp:Date.parse(e.timestamp),type:"transport"}}function oe(e,t){return{associateStatsId:void 0,codecId:`codec-${e.id}`,firCount:t?le(e,"googFirsSent"):void 0,id:e.id,isRemote:void 0,mediaType:e.stat("mediaType"),nackCount:le(e,t?"googNacksSent":"googNacksReceived"),pliCount:le(e,t?"googPlisSent":"googPlisReceived"),qpSum:le(e,"qpSum"),sliCount:void 0,ssrc:e.stat("ssrc"),timestamp:Date.parse(e.timestamp),trackId:`track-${e.id}`,transportId:e.stat("transportId")}}function ie(e,t){return{candidateType:se(e.stat("candidateType")),deleted:void 0,id:e.id,ip:e.stat("ipAddress"),isRemote:t,port:le(e,"portNumber"),priority:ce(e,"priority"),protocol:e.stat("transport"),relayProtocol:void 0,timestamp:Date.parse(e.timestamp),transportId:void 0,type:t?"remote-candidate":"local-candidate",url:void 0}}function ae(e){return isNaN(e)||""===e?void 0:parseInt(e,10)/1e3}function se(e){switch(e){case"peerreflexive":return"prflx";case"serverreflexive":return"srflx";default:return e}}function le(e,t){const r=e.stat(t);return ue(e,t)?parseInt(r,10):void 0}function ce(e,t){const r=e.stat(t);return ue(e,t)?parseFloat(r):void 0}function de(e,t){const r=e.stat(t);return ue(e,t)?"true"===r||!0===r:void 0}function ue(e,t){const r=e.stat(t);return void 0!==r&&""!==r}function he(e,t){return"function"==typeof e.get?e.get(t):e.find(e=>e.id===t)}function pe(e){if(!e)return Promise.reject(new y("PeerConnection is null"));if("function"!=typeof e.getStats)return Promise.reject(new x("WebRTC statistics are unsupported"));let t;try{t=e.getStats()}catch(r){t=new Promise(t=>e.getStats(t)).then(re.fromRTCStatsResponse)}return t}function ge(e,t){return t=Object.assign({createRTCSample:me},t),pe(e).then(t.createRTCSample)}function Ae(e){return pe(e).then(e=>{const{candidatePairs:t,localCandidates:r,remoteCandidates:n,transport:o}=Array.from(e.values()).reduce((e,t)=>{switch(["candidatePairs","localCandidates","remoteCandidates"].forEach(t=>{e[t]||(e[t]=[])}),t.type){case"candidate-pair":e.candidatePairs.push(t);break;case"local-candidate":e.localCandidates.push(t);break;case"remote-candidate":e.remoteCandidates.push(t);break;case"transport":t.selectedCandidatePairId&&(e.transport=t)}return e},{}),i=t.find(e=>e.selected||o&&e.id===o.selectedCandidatePairId);let a;return i&&(a={localCandidate:r.find(e=>e.id===i.localCandidateId),remoteCandidate:n.find(e=>e.id===i.remoteCandidateId)}),{iceCandidateStats:[...r,...n],selectedIceCandidatePairStats:a}})}function fe(){}function me(e){let t=null;const r=new fe;let n;Array.from(e.values()).forEach(o=>{if(o.isRemote)return;const i=o.type.replace("-","");if(n=n||o.timestamp,o.remoteId){const t=he(e,o.remoteId);t&&t.roundTripTime&&(r.rtt=1e3*t.roundTripTime)}switch(i){case"inboundrtp":r.timestamp=r.timestamp||o.timestamp,r.jitter=1e3*o.jitter,r.packetsLost=o.packetsLost,r.packetsReceived=o.packetsReceived,r.bytesReceived=o.bytesReceived;break;case"outboundrtp":if(r.timestamp=o.timestamp,r.packetsSent=o.packetsSent,r.bytesSent=o.bytesSent,o.codecId){const t=he(e,o.codecId);r.codecName=t?t.mimeType&&t.mimeType.match(/(.*\/)?(.*)/)[2]:o.codecId}break;case"transport":t=o.id}}),r.timestamp||(r.timestamp=n);const o=he(e,t);if(!o)return r;const i=he(e,o.selectedCandidatePairId);if(!i)return r;const a=he(e,i.localCandidateId),s=he(e,i.remoteCandidateId);return r.rtt||(r.rtt=i&&1e3*i.currentRoundTripTime),Object.assign(r,{localAddress:a&&(a.address||a.ip),remoteAddress:s&&(s.address||s.ip)}),r}te&&(re.prototype=Object.create(te.prototype),re.prototype.constructor=re),["entries","forEach","get","has","keys","values"].forEach(e=>{re.prototype[e]=function(...t){return this._map[e](...t)}}),re.fromArray=function(e){return new re(e.reduce((e,t)=>(e.set(t.id,t),e),new Map))},re.fromRTCStatsResponse=function(e){let t;const r=new Map,n=e.result().reduce((e,n)=>{const o=n.id;switch(n.type){case"googCertificate":e.set(o,function(e){return{base64Certificate:e.stat("googDerBase64"),fingerprint:e.stat("googFingerprint"),fingerprintAlgorithm:e.stat("googFingerprintAlgorithm"),id:e.id,issuerCertificateId:e.stat("googIssuerId"),timestamp:Date.parse(e.timestamp),type:"certificate"}}(n));break;case"datachannel":e.set(o,function(e){return{bytesReceived:void 0,bytesSent:void 0,datachannelid:e.stat("datachannelid"),id:e.id,label:e.stat("label"),messagesReceived:void 0,messagesSent:void 0,protocol:e.stat("protocol"),state:e.stat("state"),timestamp:Date.parse(e.timestamp),transportId:e.stat("transportId"),type:"data-channel"}}(n));break;case"googCandidatePair":de(n,"googActiveConnection")&&(t=o),e.set(o,function(e){return{availableIncomingBitrate:void 0,availableOutgoingBitrate:void 0,bytesReceived:le(e,"bytesReceived"),bytesSent:le(e,"bytesSent"),consentRequestsSent:le(e,"consentRequestsSent"),currentRoundTripTime:ae(e.stat("googRtt")),id:e.id,lastPacketReceivedTimestamp:void 0,lastPacketSentTimestamp:void 0,localCandidateId:e.stat("localCandidateId"),nominated:void 0,priority:void 0,readable:void 0,remoteCandidateId:e.stat("remoteCandidateId"),requestsReceived:le(e,"requestsReceived"),requestsSent:le(e,"requestsSent"),responsesReceived:le(e,"responsesReceived"),responsesSent:le(e,"responsesSent"),retransmissionsReceived:void 0,retransmissionsSent:void 0,state:void 0,timestamp:Date.parse(e.timestamp),totalRoundTripTime:void 0,transportId:e.stat("googChannelId"),type:"candidate-pair",writable:de(e,"googWritable")}}(n));break;case"localcandidate":e.set(o,ie(n,!1));break;case"remotecandidate":e.set(o,ie(n,!0));break;case"ssrc":ue(n,"packetsReceived")?e.set(`rtp-${o}`,function(e){const t=oe(e,!0);return Object.assign(t,{burstDiscardCount:void 0,burstDiscardRate:void 0,burstLossCount:void 0,burstLossRate:void 0,burstPacketsDiscarded:void 0,burstPacketsLost:void 0,bytesReceived:le(e,"bytesReceived"),fractionLost:void 0,framesDecoded:le(e,"framesDecoded"),gapDiscardRate:void 0,gapLossRate:void 0,jitter:ae(e.stat("googJitterReceived")),packetsDiscarded:void 0,packetsLost:le(e,"packetsLost"),packetsReceived:le(e,"packetsReceived"),packetsRepaired:void 0,roundTripTime:ae(e.stat("googRtt")),type:"inbound-rtp"}),t}(n)):e.set(`rtp-${o}`,function(e){const t=oe(e,!1);return Object.assign(t,{bytesSent:le(e,"bytesSent"),framesEncoded:le(e,"framesEncoded"),packetsSent:le(e,"packetsSent"),remoteTimestamp:void 0,targetBitrate:void 0,type:"outbound-rtp"}),t}(n)),e.set(`track-${o}`,function(e){return{audioLevel:ue(e,"audioOutputLevel")?le(e,"audioOutputLevel")/32767:(le(e,"audioInputLevel")||0)/32767,detached:void 0,echoReturnLoss:ce(e,"googEchoCancellationReturnLoss"),echoReturnLossEnhancement:ce(e,"googEchoCancellationReturnLossEnhancement"),ended:void 0,frameHeight:ue(e,"googFrameHeightReceived")?le(e,"googFrameHeightReceived"):le(e,"googFrameHeightSent"),frameWidth:ue(e,"googFrameWidthReceived")?le(e,"googFrameWidthReceived"):le(e,"googFrameWidthSent"),framesCorrupted:void 0,framesDecoded:le(e,"framesDecoded"),framesDropped:void 0,framesPerSecond:void 0,framesReceived:void 0,framesSent:le(e,"framesEncoded"),fullFramesLost:void 0,id:e.id,kind:e.stat("mediaType"),partialFramesLost:void 0,remoteSource:void 0,ssrcIds:void 0,timestamp:Date.parse(e.timestamp),trackIdentifier:e.stat("googTrackId"),type:"track"}}(n)),e.set(`codec-${o}`,function(e){return{channels:void 0,clockRate:void 0,id:e.id,implementation:void 0,mimeType:`${e.stat("mediaType")}/${e.stat("googCodecName")}`,payloadType:void 0,sdpFmtpLine:void 0,timestamp:Date.parse(e.timestamp),type:"codec"}}(n));break;case"googComponent":const i=ne(n);r.set(i.selectedCandidatePairId,o),e.set(o,ne(n))}return e},new Map);if(t){const e=r.get(t);e&&(n.get(e).dtlsState="connected")}return new re(n)};class ve extends i.EventEmitter{constructor(e,t){super(),this._hasInsightsErrored=!1,this._log=new T("PreflightTest"),this._networkTiming={},this._options={codecPreferences:[dt.Codec.PCMU,dt.Codec.Opus],edge:"roaming",fakeMicInput:!1,logLevel:"error",signalingTimeoutMs:1e4},this._status=ve.Status.Connecting,Object.assign(this._options,t),this._samples=[],this._warnings=[],this._startTime=Date.now(),this._initDevice(e,Object.assign(Object.assign({},this._options),{fileInputStream:this._options.fakeMicInput?this._getStreamFromFile():void 0}));const r=["codecPreferences","edge","fakeMicInput","logLevel","signalingTimeoutMs"],n=["audioContext","deviceFactory","fileInputStream","getRTCIceCandidateStatsReport","iceServers","rtcConfiguration"];if("object"==typeof t){const e=Object.assign({},t);Object.keys(e).forEach(t=>{r.includes(t)||n.includes(t)||delete e[t],n.includes(t)&&(e[t]=!0)}),this._log.debug(".constructor",JSON.stringify(e))}}stop(){this._log.debug(".stop");const e=new h.CallCancelledError;this._device?(this._device.once(Xe.EventName.Unregistered,()=>this._onFailed(e)),this._device.destroy()):this._onFailed(e)}_emitWarning(e,t,r){const n={name:e,description:t};r&&(n.rtcWarning=r),this._warnings.push(n),this._log.debug(`#${ve.Events.Warning}`,JSON.stringify(n)),this.emit(ve.Events.Warning,n)}_getCallQuality(e){return e>4.2?ve.CallQuality.Excellent:e>=4.1&&e<=4.2?ve.CallQuality.Great:e>=3.7&&e<=4?ve.CallQuality.Good:e>=3.1&&e<=3.6?ve.CallQuality.Fair:ve.CallQuality.Degraded}_getReport(){var e,t,r;const n=this._getRTCStats(),o={start:this._startTime};this._endTime&&(o.end=this._endTime,o.duration=this._endTime-this._startTime);const i={callSid:this._callSid,edge:this._edge,iceCandidateStats:null!==(t=null===(e=this._rtcIceCandidateStatsReport)||void 0===e?void 0:e.iceCandidateStats)&&void 0!==t?t:[],networkTiming:this._networkTiming,samples:this._samples,selectedEdge:this._options.edge,stats:n,testTiming:o,totals:this._getRTCSampleTotals(),warnings:this._warnings},a=null===(r=this._rtcIceCandidateStatsReport)||void 0===r?void 0:r.selectedIceCandidatePairStats;return a&&(i.selectedIceCandidatePairStats=a,i.isTurnRequired="relay"===a.localCandidate.candidateType||"relay"===a.remoteCandidate.candidateType),n&&(i.callQuality=this._getCallQuality(n.mos.average)),i}_getRTCSampleTotals(){if(this._latestSample)return Object.assign({},this._latestSample.totals)}_getRTCStats(){const e=this._samples.findIndex(e=>"number"==typeof e.mos&&e.mos>0),t=e>=0?this._samples.slice(e):[];if(t&&t.length)return["jitter","mos","rtt"].reduce((e,r)=>{const n=t.map(e=>e[r]);return Object.assign(Object.assign({},e),{[r]:{average:Number((n.reduce((e,t)=>e+t)/n.length).toPrecision(5)),max:Math.max(...n),min:Math.min(...n)}})},{})}_getStreamFromFile(){const e=this._options.audioContext;if(!e)throw new x("Cannot fake input audio stream: AudioContext is not supported by this browser.");const t=new Audio(E);t.addEventListener("canplaythrough",()=>t.play()),"function"==typeof t.setAttribute&&t.setAttribute("crossorigin","anonymous");const r=e.createMediaElementSource(t),n=e.createMediaStreamDestination();return r.connect(n),n.stream}_initDevice(e,t){try{this._device=new(t.deviceFactory||Xe)(e,{chunderw:t.chunderw,codecPreferences:t.codecPreferences,edge:t.edge,eventgw:t.eventgw,fileInputStream:t.fileInputStream,logLevel:t.logLevel,preflight:!0}),this._device.once(Xe.EventName.Registered,()=>{this._onDeviceRegistered()}),this._device.once(Xe.EventName.Error,e=>{this._onDeviceError(e)}),this._device.register()}catch(e){return void setTimeout(()=>{this._onFailed(e)})}this._signalingTimeoutTimer=setTimeout(()=>{this._onDeviceError(new A.ConnectionError("WebSocket Connection Timeout"))},t.signalingTimeoutMs)}_onDeviceError(e){this._device.destroy(),this._onFailed(e)}_onDeviceRegistered(){return s(this,void 0,void 0,function*(){if(clearTimeout(this._echoTimer),clearTimeout(this._signalingTimeoutTimer),this._call=yield this._device.connect({rtcConfiguration:this._options.rtcConfiguration}),this._networkTiming.signaling={start:Date.now()},this._setupCallHandlers(this._call),this._edge=this._device.edge||void 0,this._options.fakeMicInput){this._echoTimer=setTimeout(()=>this._device.disconnectAll(),2e4);const e=this._device.audio;e&&(e.disconnect(!1),e.outgoing(!1))}this._call.once("disconnect",()=>{this._device.once(Xe.EventName.Unregistered,()=>this._onUnregistered()),this._device.destroy()}),this._call._publisher.on("error",()=>{this._hasInsightsErrored||this._emitWarning("insights-connection-error","Received an error when attempting to connect to Insights gateway"),this._hasInsightsErrored=!0})})}_onFailed(e){clearTimeout(this._echoTimer),clearTimeout(this._signalingTimeoutTimer),this._releaseHandlers(),this._endTime=Date.now(),this._status=ve.Status.Failed,this._log.debug(`#${ve.Events.Failed}`,e),this.emit(ve.Events.Failed,e)}_onUnregistered(){setTimeout(()=>{this._status!==ve.Status.Failed&&(clearTimeout(this._echoTimer),clearTimeout(this._signalingTimeoutTimer),this._releaseHandlers(),this._endTime=Date.now(),this._status=ve.Status.Completed,this._report=this._getReport(),this._log.debug(`#${ve.Events.Completed}`,JSON.stringify(this._report)),this.emit(ve.Events.Completed,this._report))},10)}_releaseHandlers(){[this._device,this._call].forEach(e=>{e&&e.eventNames().forEach(t=>e.removeAllListeners(t))})}_setupCallHandlers(e){this._options.fakeMicInput&&e.once("volume",()=>{e._mediaHandler.outputs.forEach(e=>e.audio.muted=!0)}),e.on("warning",(e,t)=>{this._emitWarning(e,"Received an RTCWarning. See .rtcWarning for the RTCWarning",t)}),e.once("accept",()=>{this._callSid=e._mediaHandler.callSid,this._status=ve.Status.Connected,this._log.debug(`#${ve.Events.Connected}`),this.emit(ve.Events.Connected)}),e.on("sample",t=>s(this,void 0,void 0,function*(){this._latestSample||(this._rtcIceCandidateStatsReport=yield(this._options.getRTCIceCandidateStatsReport||Ae)(e._mediaHandler.version.pc)),this._latestSample=t,this._samples.push(t),this._log.debug(`#${ve.Events.Sample}`,JSON.stringify(t)),this.emit(ve.Events.Sample,t)})),[{reportLabel:"peerConnection",type:"pcconnection"},{reportLabel:"ice",type:"iceconnection"},{reportLabel:"dtls",type:"dtlstransport"},{reportLabel:"signaling",type:"signaling"}].forEach(({type:t,reportLabel:r})=>{const n=`on${t}statechange`,o=e._mediaHandler[n];e._mediaHandler[n]=e=>{const t=this._networkTiming[r]=this._networkTiming[r]||{start:0};"connecting"===e||"checking"===e?t.start=Date.now():"connected"!==e&&"stable"!==e||t.duration||(t.end=Date.now(),t.duration=t.end-t.start),o(e)}})}get callSid(){return this._callSid}get endTime(){return this._endTime}get latestSample(){return this._latestSample}get report(){return this._report}get startTime(){return this._startTime}get status(){return this._status}}!function(e){var t,r,n;(t=e.CallQuality||(e.CallQuality={})).Excellent="excellent",t.Great="great",t.Good="good",t.Fair="fair",t.Degraded="degraded",(r=e.Events||(e.Events={})).Completed="completed",r.Connected="connected",r.Failed="failed",r.Sample="sample",r.Warning="warning",(n=e.Status||(e.Status={})).Connecting="connecting",n.Connected="connected",n.Completed="completed",n.Failed="failed"}(ve||(ve={}));const Ce=globalThis.WebSocket;var we,be,ye;!function(e){e.Connecting="connecting",e.Closed="closed",e.Open="open"}(we||(we={}));class ke extends i.EventEmitter{constructor(e,t={}){super(),this.state=we.Closed,this._backoffStartTime={preferred:null,primary:null},this._connectedUri=null,this._log=new T("WSTransport"),this._shouldFallback=!1,this._uriIndex=0,this._moveUriIndex=()=>{this._uriIndex++,this._uriIndex>=this._uris.length&&(this._uriIndex=0)},this._onSocketClose=e=>{if(this._log.error(`Received websocket close event code: ${e.code}. Reason: ${e.reason}`),1006===e.code||1015===e.code){this.emit("error",{code:31005,message:e.reason||"Websocket connection to Twilio's signaling servers were unexpectedly ended. If this is happening consistently, there may be an issue resolving the hostname provided. If a region or an edge is being specified in Device setup, ensure it is valid.",twilioError:new A.ConnectionError});const t=this.state===we.Open||this._previousState===we.Open;!this._shouldFallback&&t||this._moveUriIndex(),this._shouldFallback=!0}this._closeSocket()},this._onSocketError=e=>{this._log.error(`WebSocket received error: ${e.message}`),this.emit("error",{code:31e3,message:e.message||"WSTransport socket error",twilioError:new A.ConnectionDisconnected})},this._onSocketMessage=e=>{if(this._setHeartbeatTimeout(),this._socket&&"\n"===e.data)return this._socket.send("\n"),void this._log.debug("heartbeat");e&&"string"==typeof e.data&&this._log.debug(`Received: ${e.data}`),this.emit("message",e)},this._onSocketOpen=()=>{this._log.info("WebSocket opened successfully."),this._timeOpened=Date.now(),this._shouldFallback=!1,this._setState(we.Open),clearTimeout(this._connectTimeout),this._resetBackoffs(),this._setHeartbeatTimeout(),this.emit("open")},this._options=Object.assign(Object.assign({},ke.defaultConstructorOptions),t),this._uris=e,this._backoff=this._setupBackoffs()}close(){this._log.info("WSTransport.close() called..."),this._close()}open(){this._log.info("WSTransport.open() called..."),!this._socket||this._socket.readyState!==Ce.CONNECTING&&this._socket.readyState!==Ce.OPEN?this._preferredUri?this._connect(this._preferredUri):this._connect(this._uris[this._uriIndex]):this._log.info("WebSocket already open.")}send(e){if(this._log.debug(`Sending: ${e}`),!this._socket||this._socket.readyState!==Ce.OPEN)return this._log.debug("Cannot send message. WebSocket is not open."),!1;try{this._socket.send(e)}catch(e){return this._log.error("Error while sending message:",e.message),this._closeSocket(),!1}return!0}updatePreferredURI(e){this._preferredUri=e}updateURIs(e){"string"==typeof e&&(e=[e]),this._uris=e,this._uriIndex=0}_close(){this._setState(we.Closed),this._closeSocket()}_closeSocket(){clearTimeout(this._connectTimeout),clearTimeout(this._heartbeatTimeout),this._log.info("Closing and cleaning up WebSocket..."),this._socket?(this._socket.removeEventListener("close",this._onSocketClose),this._socket.removeEventListener("error",this._onSocketError),this._socket.removeEventListener("message",this._onSocketMessage),this._socket.removeEventListener("open",this._onSocketOpen),this._socket.readyState!==Ce.CONNECTING&&this._socket.readyState!==Ce.OPEN||this._socket.close(),this._timeOpened&&Date.now()-this._timeOpened>1e4&&this._resetBackoffs(),this.state!==we.Closed&&this._performBackoff(),delete this._socket,this.emit("close")):this._log.info("No WebSocket to clean up.")}_connect(e,t){this._log.info("number"==typeof t?`Attempting to reconnect (retry #${t})...`:"Attempting to connect..."),this._closeSocket(),this._setState(we.Connecting),this._connectedUri=e;try{this._socket=new this._options.WebSocket(this._connectedUri)}catch(e){return this._log.error("Could not connect to endpoint:",e.message),this._close(),void this.emit("error",{code:31e3,message:e.message||`Could not connect to ${this._connectedUri}`,twilioError:new A.ConnectionDisconnected})}this._socket.addEventListener("close",this._onSocketClose),this._socket.addEventListener("error",this._onSocketError),this._socket.addEventListener("message",this._onSocketMessage),this._socket.addEventListener("open",this._onSocketOpen),delete this._timeOpened,this._connectTimeout=setTimeout(()=>{this._log.info("WebSocket connection attempt timed out."),this._moveUriIndex(),this._closeSocket()},this._options.connectTimeoutMs)}_performBackoff(){this._preferredUri?(this._log.info("Preferred URI set; backing off."),this._backoff.preferred.backoff()):(this._log.info("Preferred URI not set; backing off."),this._backoff.primary.backoff())}_resetBackoffs(){this._backoff.preferred.reset(),this._backoff.primary.reset(),this._backoffStartTime.preferred=null,this._backoffStartTime.primary=null}_setHeartbeatTimeout(){clearTimeout(this._heartbeatTimeout),this._heartbeatTimeout=setTimeout(()=>{this._log.info("No messages received in 15 seconds. Reconnecting..."),this._shouldFallback=!0,this._closeSocket()},15e3)}_setState(e){this._previousState=this.state,this.state=e}_setupBackoffs(){const e={factor:2,jitter:.4,max:this._options.maxPreferredDelayMs,min:100};this._log.info("Initializing preferred transport backoff using config: ",e);const t=new a(e);t.on("backoff",(e,t)=>{this.state!==we.Closed?(this._log.info(`Will attempt to reconnect Websocket to preferred URI in ${t}ms`),0===e&&(this._backoffStartTime.preferred=Date.now(),this._log.info(`Preferred backoff start; ${this._backoffStartTime.preferred}`))):this._log.info("Preferred backoff initiated but transport state is closed; not attempting a connection.")}),t.on("ready",(e,t)=>{if(this.state!==we.Closed){if(null!==this._backoffStartTime.preferred)return Date.now()-this._backoffStartTime.preferred>this._options.maxPreferredDurationMs?(this._log.info("Max preferred backoff attempt time exceeded; falling back to primary backoff."),this._preferredUri=null,void this._backoff.primary.backoff()):"string"!=typeof this._preferredUri?(this._log.info("Preferred URI cleared; falling back to primary backoff."),this._preferredUri=null,void this._backoff.primary.backoff()):void this._connect(this._preferredUri,e+1);this._log.info("Preferred backoff start time invalid; not attempting a connection.")}else this._log.info("Preferred backoff ready but transport state is closed; not attempting a connection.")});const r={factor:2,jitter:.4,max:this._options.maxPrimaryDelayMs,min:this._uris&&this._uris.length>1?Math.floor(4001*Math.random())+1e3:100};this._log.info("Initializing primary transport backoff using config: ",r);const n=new a(r);return n.on("backoff",(e,t)=>{this.state!==we.Closed?(this._log.info(`Will attempt to reconnect WebSocket in ${t}ms`),0===e&&(this._backoffStartTime.primary=Date.now(),this._log.info(`Primary backoff start; ${this._backoffStartTime.primary}`))):this._log.info("Primary backoff initiated but transport state is closed; not attempting a connection.")}),n.on("ready",(e,t)=>{this.state!==we.Closed?null!==this._backoffStartTime.primary?Date.now()-this._backoffStartTime.primary>this._options.maxPrimaryDurationMs?this._log.info("Max primary backoff attempt time exceeded; not attempting a connection."):this._connect(this._uris[this._uriIndex],e+1):this._log.info("Primary backoff start time invalid; not attempting a connection."):this._log.info("Primary backoff ready but transport state is closed; not attempting a connection.")}),{preferred:t,primary:n}}get uri(){return this._connectedUri}}ke.defaultConstructorOptions={WebSocket:Ce,connectTimeoutMs:5e3,maxPreferredDelayMs:1e3,maxPreferredDurationMs:15e3,maxPrimaryDelayMs:2e4,maxPrimaryDurationMs:1/0};class xe extends i.EventEmitter{constructor(e,t,r){if(super(),!(this instanceof xe))return new xe(e,t,r);const n={TransportFactory:ke};r=r||{};for(const e in n)e in r||(r[e]=n[e]);this.options=r,this.token=e||"",this.status="disconnected",this.gateway=null,this.region=null,this._messageQueue=[],this._preferredUri=null,this._uris=t,this._handleTransportClose=this._handleTransportClose.bind(this),this._handleTransportError=this._handleTransportError.bind(this),this._handleTransportMessage=this._handleTransportMessage.bind(this),this._handleTransportOpen=this._handleTransportOpen.bind(this),this._log=new T("PStream"),this.on("error",()=>{this._log.warn("Unexpected error handled in pstream")});const o=this;return this.addListener("ready",()=>{o.status="ready"}),this.addListener("offline",()=>{o.status="offline"}),this.addListener("close",()=>{o._log.info('Received "close" from server. Destroying PStream...'),o._destroy()}),this.transport=new this.options.TransportFactory(this._uris,{backoffMaxMs:this.options.backoffMaxMs,maxPreferredDurationMs:this.options.maxPreferredDurationMs}),Object.defineProperties(this,{uri:{enumerable:!0,get(){return this.transport.uri}}}),this.transport.on("close",this._handleTransportClose),this.transport.on("error",this._handleTransportError),this.transport.on("message",this._handleTransportMessage),this.transport.on("open",this._handleTransportOpen),this.transport.open(),this}}function _e(){const e="undefined"!=typeof navigator?navigator:{};return{browser:{platform:e.platform||"unknown",userAgent:e.userAgent||"unknown"},p:"browser",plugin:"rtc",v:S}}xe.prototype._handleTransportClose=function(){this.emit("transportClose"),"disconnected"!==this.status&&("offline"!==this.status&&this.emit("offline",this),this.status="disconnected")},xe.prototype._handleTransportError=function(e){e?this.emit("error",void 0!==e.code?{error:e}:e):this.emit("error",{error:{code:31e3,message:"Websocket closed without a provided reason",twilioError:new A.ConnectionDisconnected}})},xe.prototype._handleTransportMessage=function(e){if(!e||!e.data||"string"!=typeof e.data)return;const{type:t,payload:r={}}=JSON.parse(e.data);this.gateway=r.gateway||this.gateway,this.region=r.region||this.region,"error"===t&&r.error&&(r.error.twilioError=new A.ConnectionError),this.emit(t,r)},xe.prototype._handleTransportOpen=function(){this.status="connected",this.setToken(this.token),this.emit("transportOpen"),this._messageQueue.splice(0,this._messageQueue.length).forEach(e=>this._publish(...e))},xe.toString=()=>"[Twilio.PStream class]",xe.prototype.toString=()=>"[Twilio.PStream instance]",xe.prototype.setToken=function(e){this._log.info("Setting token and publishing listen"),this.token=e;let t=0;const r=this.options.maxPreferredDurationMs;this._log.info(`maxPreferredDurationMs:${r}`),"number"==typeof r&&r>=0&&(t=Math.min(Math.ceil(r/1e3),30)),this._log.info(`reconnectTimeout:${t}`);const n={browserinfo:_e(),reconnectTimeout:t,token:e};this._publish("listen",n)},xe.prototype.sendMessage=function(e,t,r="application/json",n,o){const i={callsid:e,content:t,contenttype:r,messagetype:n,voiceeventsid:o};this._publish("message",i,!0)},xe.prototype.register=function(e){const t={media:e};this._publish("register",t,!0)},xe.prototype.invite=function(e,t,r){const n={callsid:t,sdp:e,twilio:r?{params:r}:{}};this._publish("invite",n,!0)},xe.prototype.reconnect=function(e,t,r){const n={callsid:t,reconnect:r,sdp:e,twilio:{}};this._publish("invite",n,!0)},xe.prototype.answer=function(e,t){this._publish("answer",{sdp:e,callsid:t},!0)},xe.prototype.dtmf=function(e,t){this._publish("dtmf",{callsid:e,dtmf:t},!0)},xe.prototype.hangup=function(e,t){const r=t?{callsid:e,message:t}:{callsid:e};this._publish("hangup",r,!0)},xe.prototype.reject=function(e){this._publish("reject",{callsid:e},!0)},xe.prototype.reinvite=function(e,t){this._publish("reinvite",{sdp:e,callsid:t},!1)},xe.prototype._destroy=function(){this.transport.removeListener("close",this._handleTransportClose),this.transport.removeListener("error",this._handleTransportError),this.transport.removeListener("message",this._handleTransportMessage),this.transport.removeListener("open",this._handleTransportOpen),this.transport.close(),this.emit("offline",this)},xe.prototype.destroy=function(){return this._log.info("PStream.destroy() called..."),this._destroy(),this},xe.prototype.updatePreferredURI=function(e){this._preferredUri=e,this.transport.updatePreferredURI(e)},xe.prototype.updateURIs=function(e){this._uris=e,this.transport.updateURIs(this._uris)},xe.prototype.publish=function(e,t){return this._publish(e,t,!0)},xe.prototype._publish=function(e,t,r){const n=JSON.stringify({payload:t,type:e,version:"1.6"});this.transport.send(n)||(this.emit("error",{error:{code:31009,message:"No transport available to send or receive messages",twilioError:new h.TransportError}}),r&&this._messageQueue.push([e,t,!0]))},function(e){e.Sydney="sydney",e.SaoPaulo="sao-paulo",e.Dublin="dublin",e.Frankfurt="frankfurt",e.Tokyo="tokyo",e.Singapore="singapore",e.Ashburn="ashburn",e.Umatilla="umatilla",e.Roaming="roaming",e.AshburnIx="ashburn-ix",e.SanJoseIx="san-jose-ix",e.LondonIx="london-ix",e.FrankfurtIx="frankfurt-ix",e.SingaporeIx="singapore-ix",e.SydneyIx="sydney-ix",e.TokyoIx="tokyo-ix"}(be||(be={})),function(e){e.Au1="au1",e.Au1Ix="au1-ix",e.Br1="br1",e.De1="de1",e.De1Ix="de1-ix",e.Gll="gll",e.Ie1="ie1",e.Ie1Ix="ie1-ix",e.Ie1Tnx="ie1-tnx",e.Jp1="jp1",e.Jp1Ix="jp1-ix",e.Sg1="sg1",e.Sg1Ix="sg1-ix",e.Sg1Tnx="sg1-tnx",e.Us1="us1",e.Us1Ix="us1-ix",e.Us1Tnx="us1-tnx",e.Us2="us2",e.Us2Ix="us2-ix",e.Us2Tnx="us2-tnx"}(ye||(ye={}));const Se={ASIAPAC_SINGAPORE:ye.Sg1,ASIAPAC_SYDNEY:ye.Au1,ASIAPAC_TOKYO:ye.Jp1,EU_FRANKFURT:ye.De1,EU_IRELAND:ye.Ie1,SOUTH_AMERICA_SAO_PAULO:ye.Br1,US_EAST_VIRGINIA:ye.Us1,US_WEST_OREGON:ye.Us2},Be={[ye.Au1]:be.Sydney,[ye.Br1]:be.SaoPaulo,[ye.Ie1]:be.Dublin,[ye.De1]:be.Frankfurt,[ye.Jp1]:be.Tokyo,[ye.Sg1]:be.Singapore,[ye.Us1]:be.Ashburn,[ye.Us2]:be.Umatilla,[ye.Gll]:be.Roaming,[ye.Us1Ix]:be.AshburnIx,[ye.Us2Ix]:be.SanJoseIx,[ye.Ie1Ix]:be.LondonIx,[ye.De1Ix]:be.FrankfurtIx,[ye.Sg1Ix]:be.SingaporeIx,[ye.Au1Ix]:be.SydneyIx,[ye.Jp1Ix]:be.TokyoIx,[ye.Us1Tnx]:be.AshburnIx,[ye.Us2Tnx]:be.AshburnIx,[ye.Ie1Tnx]:be.LondonIx,[ye.Sg1Tnx]:be.SingaporeIx},Ee=be.Roaming;function Te(e){return`voice-js.${e}.twilio.com`}function Pe(e){return e?`eventgw.${e}.twilio.com`:"eventgw.twilio.com"}function Ie(e){return`wss://${e}/signal`}function De(e){if(e&&"string"!=typeof e&&!Array.isArray(e))throw new y("If `edge` is provided, it must be of type `string` or an array of strings.");let t;return t=e?(Array.isArray(e)?e:[e]).map(e=>Te(e)):[Te(Ee)],t}const Oe={0:"PCMU",8:"PCMA"};function Re(e,t){if("number"!=typeof t||t<6e3||t>51e4)return e;const r=/a=rtpmap:(\d+) opus/m.exec(e),n=r&&r.length?r[1]:111,o=new RegExp(`a=fmtp:${n}`);return e.split("\n").map(e=>o.test(e)?e+`;maxaveragebitrate=${t}`:e).join("\n")}function Le(e,t){const r=function(e){return e.replace(/\r\n\r\n$/,"\r\n").split("\r\nm=").slice(1).map(e=>`m=${e}`).filter(e=>{const t=new RegExp("m=.*","gm"),r=new RegExp("a=.*","gm");return t.test(e)&&r.test(e)})}(e);return[e.split("\r\nm=")[0]].concat(r.map(e=>{if(!/^m=(audio|video)/.test(e))return e;const r=e.match(/^m=(audio|video)/)[1],n=function(e){return Array.from((t=e,function(e){const t=e.split("\r\n")[0].match(/([0-9]+)/g);return t?t.slice(1).map(e=>parseInt(e,10)):[]}(t).reduce((e,r)=>{const n=new RegExp(`a=rtpmap:${r} ([^/]+)`),o=t.match(n),i=o?o[1].toLowerCase():Oe[r]?Oe[r].toLowerCase():"";return e.set(r,i)},new Map))).reduce((e,t)=>{const r=t[0],n=t[1],o=e.get(n)||[];return e.set(n,o.concat(r))},new Map);var t}(e),o=function(e,t){const r=z(t=t.map(e=>e.toLowerCase()),t=>e.get(t)||[]),n=z(L(Array.from(e.keys()),t),t=>e.get(t));return r.concat(n)}(n,t),i=function(e,t){const r=t.split("\r\n");let n=r[0];const o=r.slice(1);return n=n.replace(/([0-9]+\s?)+$/,e.join(" ")),[n].concat(o).join("\r\n")}(o,e),a=n.get("pcma")||[],s=n.get("pcmu")||[];return("audio"===r?new Set(a.concat(s)):new Set).has(o[0])?i.replace(/\r\nb=(AS|TIAS):([0-9]+)/g,""):i})).join("\r\n")}function Me(e){this.log=new T("RTCPC"),"undefined"!=typeof window?e&&e.RTCPeerConnection?this.RTCPeerConnection=e.RTCPeerConnection:"function"==typeof window.RTCPeerConnection?this.RTCPeerConnection=window.RTCPeerConnection:"function"==typeof window.webkitRTCPeerConnection?this.RTCPeerConnection=webkitRTCPeerConnection:"function"==typeof window.mozRTCPeerConnection?(this.RTCPeerConnection=mozRTCPeerConnection,window.RTCSessionDescription=mozRTCSessionDescription,window.RTCIceCandidate=mozRTCIceCandidate):this.log.info("No RTCPeerConnection implementation available"):this.log.info("No RTCPeerConnection implementation available. The window object was not found.")}function Ne(e,t,r,n){return function(){const o=Array.prototype.slice.call(arguments);return new Promise(r=>{const i=e.apply(t,o);if(n){if("object"!=typeof i||"function"!=typeof i.then)throw new Error;r(i)}else r(i)}).catch(()=>new Promise((n,i)=>{e.apply(t,r?[n,i].concat(o):o.concat([n,i]))}))}}function Ue(e,t){return Ne(e,t,!0,!0)}function je(e,t){return Ne(e,t,!1,!1)}function Fe(t,r,n){if(!t||!r)throw new y("Audiohelper, and pstream are required arguments");if(!(this instanceof Fe))return new Fe(t,r,n);function o(){this._log.warn("Unexpected noop call in peerconnection")}this._log=new T("PeerConnection"),this.onaudio=o,this.onopen=o,this.onerror=o,this.onclose=o,this.ondisconnected=o,this.onfailed=o,this.onconnected=o,this.onreconnected=o,this.onsignalingstatechange=o,this.ondtlstransportstatechange=o,this.onicegatheringfailure=o,this.onicegatheringstatechange=o,this.oniceconnectionstatechange=o,this.onpcconnectionstatechange=o,this.onicecandidate=o,this.onselectedcandidatepairchange=o,this.onvolume=o,this.version=null,this.pstream=r,this.stream=null,this.sinkIds=new Set(["default"]),this.outputs=new Map,this.status="connecting",this.callSid=null,this.isMuted=!1;const i="undefined"!=typeof window&&(window.AudioContext||window.webkitAudioContext);return this._isSinkSupported=!!i&&"undefined"!=typeof HTMLAudioElement&&HTMLAudioElement.prototype.setSinkId,this._audioContext=i&&t._audioContext,this._audioHelper=t,this._audioProcessorEventObserver=t._getAudioProcessorEventObserver(),this._hasIceCandidates=!1,this._hasIceGatheringFailures=!1,this._iceGatheringTimeoutId=null,this._masterAudio=null,this._masterAudioDeviceId=null,this._mediaStreamSource=null,this._dtmfSender=null,this._dtmfSenderUnsupported=!1,this._callEvents=[],this._nextTimeToPublish=Date.now(),this._onAnswerOrRinging=o,this._onHangup=o,this._remoteStream=null,this._shouldManageStream=!0,this._iceState="new",this.options=n=n||{},this.navigator=n.navigator||("undefined"!=typeof navigator?navigator:null),this.util=n.util||e,this.codecPreferences=n.codecPreferences,this._onAudioProcessorAdded=e=>{this._handleAudioProcessorEvent(e,!0)},this._onAudioProcessorRemoved=e=>{this._handleAudioProcessorEvent(e,!1)},this._audioProcessorEventObserver.on("add",this._onAudioProcessorAdded),this._audioProcessorEventObserver.on("remove",this._onAudioProcessorRemoved),this}function $e(e,t){let r;return r=t?new t:"undefined"!=typeof MediaStream?new MediaStream:new webkitMediaStream,e.getAudioTracks().forEach(r.addTrack,r),r}function ze(e,t,r){return r._maybeCreateRemoteProcessedStream(t).then(t=>{if(void 0!==e.srcObject)e.srcObject=t;else if(void 0!==e.mozSrcObject)e.mozSrcObject=t;else{if(void 0===e.src)return Promise.reject();{const r=e.options.window||window;e.src=(r.URL||r.webkitURL).createObjectURL(t)}}return Promise.resolve()})}function We(t,r){return(r=r||{}).util=r.util||e,r.navigator=r.navigator||("undefined"!=typeof navigator?navigator:null),new Promise((e,n)=>{if(!r.navigator)throw new x("getUserMedia is not supported");switch("function"){case typeof(r.navigator.mediaDevices&&r.navigator.mediaDevices.getUserMedia):return e(r.navigator.mediaDevices.getUserMedia(t));case typeof r.navigator.webkitGetUserMedia:return r.navigator.webkitGetUserMedia(t,e,n);case typeof r.navigator.mozGetUserMedia:return r.navigator.mozGetUserMedia(t,e,n);case typeof r.navigator.getUserMedia:return r.navigator.getUserMedia(t,e,n);default:throw new x("getUserMedia is not supported")}}).catch(e=>{throw r.util.isFirefox()&&"NotReadableError"===e.name?new x("Firefox does not currently support opening multiple audio input trackssimultaneously, even across different tabs.\nRelated Bugzilla thread: https://bugzilla.mozilla.org/show_bug.cgi?id=1299324"):e})}function qe(){return`KX${function(){if("object"!=typeof window)throw new x("This platform is not supported.");const{crypto:e}=window;if("object"!=typeof e)throw new x("The `crypto` module is not available on this platform.");if("function"!=typeof e.getRandomValues)throw new x("The function `crypto.getRandomValues` is not available on this platform.");if("function"!=typeof window.Uint8Array)throw new x("The `Uint8Array` module is not available on this platform.");return e.getRandomValues(new window.Uint8Array(16)).reduce((e,t)=>`${e}${t.toString(16).padStart(2,"0")}`,"")}()}`}Me.prototype.create=function(e){this.pc=new this.RTCPeerConnection(e)},Me.prototype.createModernConstraints=e=>{if(void 0===e)return null;const t=Object.assign({},e);return"undefined"==typeof webkitRTCPeerConnection||j()?(void 0!==e.audio&&(t.offerToReceiveAudio=e.audio),void 0!==e.video&&(t.offerToReceiveVideo=e.video)):(t.mandatory={},void 0!==e.audio&&(t.mandatory.OfferToReceiveAudio=e.audio),void 0!==e.video&&(t.mandatory.OfferToReceiveVideo=e.video)),delete t.audio,delete t.video,t},Me.prototype.createOffer=function(e,t,r,n){return t=this.createModernConstraints(t),Ue(this.pc.createOffer,this.pc)(t).then(t=>{if(!this.pc)return Promise.resolve();const r=Re(t.sdp,e);return je(this.pc.setLocalDescription,this.pc)(new RTCSessionDescription({sdp:r,type:"offer"}))}).then(r,n)},Me.prototype.createAnswer=function(e,t,r,n){return t=this.createModernConstraints(t),Ue(this.pc.createAnswer,this.pc)(t).then(t=>{if(!this.pc)return Promise.resolve();const r=Re(t.sdp,e);return je(this.pc.setLocalDescription,this.pc)(new RTCSessionDescription({sdp:r,type:"answer"}))}).then(r,n)},Me.prototype.processSDP=function(e,t,r,n,o,i){r=Le(r,t);const a=new RTCSessionDescription({sdp:r,type:"offer"});return je(this.pc.setRemoteDescription,this.pc)(a).then(()=>{this.createAnswer(e,n,o,i)})},Me.prototype.getSDP=function(){return this.pc.localDescription.sdp},Me.prototype.processAnswer=function(e,t,r,n){return this.pc?(t=Le(t,e),je(this.pc.setRemoteDescription,this.pc)(new RTCSessionDescription({sdp:t,type:"answer"})).then(r,n)):Promise.resolve()},Me.test=()=>{if("object"==typeof navigator){const e=navigator.mediaDevices&&navigator.mediaDevices.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.getUserMedia;if(j(navigator))return!1;if(e&&"function"==typeof window.RTCPeerConnection)return!0;if(e&&"function"==typeof window.webkitRTCPeerConnection)return!0;if(e&&"function"==typeof window.mozRTCPeerConnection){try{if("function"!=typeof(new window.mozRTCPeerConnection).getLocalStreams)return!1}catch(e){return!1}return!0}if("undefined"!=typeof RTCIceGatherer)return!0}return!1},Fe.prototype.uri=function(){return this._uri},Fe.prototype.openDefaultDeviceWithConstraints=function(e){return this._audioHelper._openDefaultDeviceWithConstraints(e).then(this._setInputTracksFromStream.bind(this,!1))},Fe.prototype.setInputTracksFromStream=function(e){const t=this;return this._setInputTracksFromStream(!0,e).then(()=>{t._shouldManageStream=!1})},Fe.prototype._createAnalyser=(e,t)=>{t=Object.assign({fftSize:32,smoothingTimeConstant:.3},t);const r=e.createAnalyser();for(const e in t)r[e]=t[e];return r},Fe.prototype._setVolumeHandler=function(e){this.onvolume=e},Fe.prototype._startPollingVolume=function(){if(!this._audioContext||!this.stream||!this._remoteStream)return;const e=this._audioContext,t=(this._inputAnalyser=this._createAnalyser(e)).frequencyBinCount,r=new Uint8Array(t);this._inputAnalyser2=this._createAnalyser(e,{maxDecibels:0,minDecibels:-127,smoothingTimeConstant:0});const n=(this._outputAnalyser=this._createAnalyser(e)).frequencyBinCount,o=new Uint8Array(n);this._outputAnalyser2=this._createAnalyser(e,{maxDecibels:0,minDecibels:-127,smoothingTimeConstant:0}),this._updateInputStreamSource(this.stream),this._updateOutputStreamSource(this._remoteStream);const i=this;setTimeout(function e(){if(!i._audioContext)return;if("closed"===i.status)return i._inputAnalyser.disconnect(),i._outputAnalyser.disconnect(),i._inputAnalyser2.disconnect(),void i._outputAnalyser2.disconnect();i._inputAnalyser.getByteFrequencyData(r);const t=i.util.average(r);i._inputAnalyser2.getByteFrequencyData(r);const n=i.util.average(r);i._outputAnalyser.getByteFrequencyData(o);const a=i.util.average(o);i._outputAnalyser2.getByteFrequencyData(o);const s=i.util.average(o);i.onvolume(t/255,a/255,n,s),setTimeout(e,50)},50)},Fe.prototype._stopStream=function(){this._shouldManageStream&&this._audioHelper._stopDefaultInputDeviceStream()},Fe.prototype._updateInputStreamSource=function(e){this._inputStreamSource&&this._inputStreamSource.disconnect();try{this._inputStreamSource=this._audioContext.createMediaStreamSource(e),this._inputStreamSource.connect(this._inputAnalyser),this._inputStreamSource.connect(this._inputAnalyser2)}catch(e){this._log.warn("Unable to update input MediaStreamSource",e),this._inputStreamSource=null}},Fe.prototype._updateOutputStreamSource=function(e){this._outputStreamSource&&this._outputStreamSource.disconnect();try{this._outputStreamSource=this._audioContext.createMediaStreamSource(e),this._outputStreamSource.connect(this._outputAnalyser),this._outputStreamSource.connect(this._outputAnalyser2)}catch(e){this._log.warn("Unable to update output MediaStreamSource",e),this._outputStreamSource=null}},Fe.prototype._setInputTracksFromStream=function(e,t){if(!t)return Promise.reject(new y("Can not set input stream to null while in a call"));if(!t.getAudioTracks().length)return Promise.reject(new y("Supplied input stream has no audio tracks"));const r=this.stream,n=()=>(this.mute(this.isMuted),Promise.resolve(this.stream));return r?(this._shouldManageStream&&this._stopStream(),this._sender||(this._sender=this.version.pc.getSenders()[0]),this._sender.replaceTrack(t.getAudioTracks()[0]).then(()=>(this._updateInputStreamSource(t),this.stream=e?$e(t,this.options.MediaStream):t,n()))):(this.stream=e?$e(t,this.options.MediaStream):t,n())},Fe.prototype._onInputDevicesChanged=function(){this.stream&&this.stream.getAudioTracks().every(e=>"ended"===e.readyState)&&this._shouldManageStream&&this.openDefaultDeviceWithConstraints({audio:!0})},Fe.prototype._onIceGatheringFailure=function(e){this._hasIceGatheringFailures=!0,this.onicegatheringfailure(e)},Fe.prototype._onMediaConnectionStateChange=function(e){const t=this._iceState;if(t===e||"connected"!==e&&"disconnected"!==e&&"failed"!==e)return;let r;switch(this._iceState=e,e){case"connected":"disconnected"===t||"failed"===t?(r="ICE liveliness check succeeded. Connection with Twilio restored",this._log.info(r),this.onreconnected(r)):(r="Media connection established.",this._log.info(r),this.onconnected(r)),this._stopIceGatheringTimeout(),this._hasIceGatheringFailures=!1;break;case"disconnected":r="ICE liveliness check failed. May be having trouble connecting to Twilio",this._log.warn(r),this.ondisconnected(r);break;case"failed":r="Connection with Twilio was interrupted.",this._log.warn(r),this.onfailed(r)}},Fe.prototype._setSinkIds=function(e){return this._isSinkSupported?(this.sinkIds=new Set(e.forEach?e:[e]),this.version?this._updateAudioOutputs():Promise.resolve()):Promise.reject(new x("Audio output selection is not supported by this browser"))},Fe.prototype._startIceGatheringTimeout=function(){this._stopIceGatheringTimeout(),this._iceGatheringTimeoutId=setTimeout(()=>{this._onIceGatheringFailure("timeout")},15e3)},Fe.prototype._stopIceGatheringTimeout=function(){clearInterval(this._iceGatheringTimeoutId)},Fe.prototype._updateAudioOutputs=function(){const e=Array.from(this.sinkIds).filter(function(e){return!this.outputs.has(e)},this),t=Array.from(this.outputs.keys()).filter(function(e){return!this.sinkIds.has(e)},this),r=this,n=e.map(this._createAudioOutput,this);return Promise.all(n).then(()=>Promise.all(t.map(r._removeAudioOutput,r)))},Fe.prototype._createAudio=function(e){const t=new Audio(e);return this.onaudio(t),t},Fe.prototype._createAudioOutput=function(e){let t=null;this._mediaStreamSource&&(t=this._audioContext.createMediaStreamDestination(),this._mediaStreamSource.connect(t));const r=this._createAudio();ze(r,t&&t.stream?t.stream:this.pcStream,this._audioHelper).catch(()=>this._log.error("Error attaching stream to element (_createAudioOutput)."));const n=this;return r.setSinkId(e).then(()=>r.play()).then(()=>{n.outputs.set(e,{audio:r,dest:t})})},Fe.prototype._removeAudioOutputs=function(){return this._masterAudio&&void 0!==this._masterAudioDeviceId&&(this._disableOutput(this,this._masterAudioDeviceId),this.outputs.delete(this._masterAudioDeviceId),this._masterAudioDeviceId=null,this._masterAudio.paused||this._masterAudio.pause(),void 0!==this._masterAudio.srcObject?this._masterAudio.srcObject=null:this._masterAudio.src="",this._masterAudio=null),Array.from(this.outputs.keys()).map(this._removeAudioOutput,this)},Fe.prototype._disableOutput=function(e,t){const r=e.outputs.get(t);r&&(r.audio&&(r.audio.pause(),r.audio.src=""),r.dest&&r.dest.disconnect())},Fe.prototype._reassignMasterOutput=function(e,t){const r=e.outputs.get(t);e.outputs.delete(t);const n=this,o=Array.from(e.outputs.keys())[0],i="string"==typeof o?o:"default";return r.audio.setSinkId(i).then(()=>{n._disableOutput(e,i),e.outputs.set(i,r),e._masterAudioDeviceId=i}).catch(function(){e.outputs.set(t,r),n._log.info("Could not reassign master output. Attempted to roll back.")})},Fe.prototype._removeAudioOutput=function(e){return this._masterAudioDeviceId===e?this._reassignMasterOutput(this,e):(this._disableOutput(this,e),this.outputs.delete(e),Promise.resolve())},Fe.prototype._onAddTrack=function(e,t){const r=e._masterAudio=this._createAudio();ze(r,t,this._audioHelper).then(()=>r.play()).catch(()=>e._log.error("Error attaching stream to element (_onAddTrack)."));const n=Array.from(e.outputs.keys())[0],o="string"==typeof n?n:"default";e._masterAudioDeviceId=o,e.outputs.set(o,{audio:r});try{e._mediaStreamSource=e._audioContext.createMediaStreamSource(t)}catch(e){this._log.warn("Unable to create a MediaStreamSource from onAddTrack",e),this._mediaStreamSource=null}e.pcStream=t,e._updateAudioOutputs()},Fe.prototype._fallbackOnAddTrack=function(e,t){const r=document&&document.createElement("audio");ze(r,t,this._audioHelper).then(()=>r.play()).catch(()=>e._log.error("Error attaching stream to element (_fallbackOnAddTrack).")),e.outputs.set("default",{audio:r})},Fe.prototype._setEncodingParameters=function(e){if(!e||!this._sender||"function"!=typeof this._sender.getParameters||"function"!=typeof this._sender.setParameters)return;const t=this._sender.getParameters();(t.priority||t.encodings&&t.encodings.length)&&(t.priority="high",t.encodings&&t.encodings.length&&t.encodings.forEach(e=>{e.priority="high",e.networkPriority="high"}),this._sender.setParameters(t))},Fe.prototype._setupPeerConnection=function(e){const t=this,r=new(this.options.rtcpcFactory||Me)({RTCPeerConnection:this.options.RTCPeerConnection});var n,o;r.create(e),n=r.pc,o=this.stream,"function"==typeof n.addTrack?o.getAudioTracks().forEach(e=>{n.addTrack(e,o)}):n.addStream(o);const i=RTCRtpReceiver.getCapabilities("audio").codecs;this._log.debug("sorting codecs",i,this.codecPreferences);const a=q(i,this.codecPreferences),[s]=r.pc.getTransceivers();this._log.debug("setting sorted codecs",a),s.setCodecPreferences(a);const l="ontrack"in r.pc?"ontrack":"onaddstream";return r.pc[l]=e=>{const n=t._remoteStream=e.stream||e.streams[0];"function"==typeof r.pc.getSenders&&(this._sender=r.pc.getSenders()[0]),t._isSinkSupported?t._onAddTrack(t,n):t._fallbackOnAddTrack(t,n),t._startPollingVolume()},r},Fe.prototype._maybeSetIceAggressiveNomination=function(e){return this.options.forceAggressiveIceNomination?function(e){return N(window,window.navigator)?e.split("\n").filter(e=>-1===e.indexOf("a=ice-lite")).join("\n"):e}(e):e},Fe.prototype._setupChannel=function(){const e=this.version.pc;this.version.pc.onopen=()=>{this.status="open",this.onopen()},this.version.pc.onstatechange=()=>{this.version.pc&&"stable"===this.version.pc.readyState&&(this.status="open",this.onopen())},this.version.pc.onsignalingstatechange=()=>{const t=e.signalingState;this._log.info(`signalingState is "${t}"`),this.version.pc&&"stable"===this.version.pc.signalingState&&(this.status="open",this.onopen()),this.onsignalingstatechange(e.signalingState)},e.onconnectionstatechange=t=>{let r=e.connectionState;if(!r&&t&&t.target){const e=t.target;r=e.connectionState||e.connectionState_,this._log.info(`pc.connectionState not detected. Using target PC. State=${r}`)}r?this._log.info(`pc.connectionState is "${r}"`):this._log.warn(`onconnectionstatechange detected but state is "${r}"`),this.onpcconnectionstatechange(r),this._onMediaConnectionStateChange(r)},e.onicecandidate=e=>{const{candidate:t}=e;t&&(this._hasIceCandidates=!0,this.onicecandidate(t),this._setupRTCIceTransportListener()),this._log.info(`ICE Candidate: ${JSON.stringify(t)}`)},e.onicegatheringstatechange=()=>{const t=e.iceGatheringState;"gathering"===t?this._startIceGatheringTimeout():"complete"===t&&(this._stopIceGatheringTimeout(),this._hasIceCandidates||this._onIceGatheringFailure("none"),this._hasIceCandidates&&this._hasIceGatheringFailures&&this._startIceGatheringTimeout()),this._log.info(`pc.iceGatheringState is "${e.iceGatheringState}"`),this.onicegatheringstatechange(t)},e.oniceconnectionstatechange=()=>{this._log.info(`pc.iceConnectionState is "${e.iceConnectionState}"`),this.oniceconnectionstatechange(e.iceConnectionState),this._onMediaConnectionStateChange(e.iceConnectionState)}},Fe.prototype._initializeMediaStream=function(e){return"open"!==this.status&&("disconnected"===this.pstream.status?(this.onerror({info:{code:31e3,message:"Cannot establish connection. Client is disconnected",twilioError:new A.ConnectionDisconnected}}),this.close(),!1):(this.version=this._setupPeerConnection(e),this._setupChannel(),!0))},Fe.prototype._removeReconnectionListeners=function(){this.pstream&&(this.pstream.removeListener("answer",this._onAnswerOrRinging),this.pstream.removeListener("hangup",this._onHangup))},Fe.prototype._setupRTCDtlsTransportListener=function(){const e=this.getRTCDtlsTransport();if(!e||e.onstatechange)return;const t=()=>{this._log.info(`dtlsTransportState is "${e.state}"`),this.ondtlstransportstatechange(e.state)};t(),e.onstatechange=t},Fe.prototype._setupRTCIceTransportListener=function(){const e=this._getRTCIceTransport();e&&!e.onselectedcandidatepairchange&&(e.onselectedcandidatepairchange=()=>this.onselectedcandidatepairchange(e.getSelectedCandidatePair()))},Fe.prototype.iceRestart=function(){this._log.info("Attempting to restart ICE..."),this._hasIceCandidates=!1,this.version.createOffer(this.options.maxAverageBitrate,{iceRestart:!0}).then(()=>{this._removeReconnectionListeners(),this._onAnswerOrRinging=e=>{if(this._removeReconnectionListeners(),!e.sdp||"have-local-offer"!==this.version.pc.signalingState){const t=`Invalid state or param during ICE Restart:hasSdp:${!!e.sdp}, signalingState:${this.version.pc.signalingState}`;return void this._log.warn(t)}const t=this._maybeSetIceAggressiveNomination(e.sdp);this._answerSdp=t,"closed"!==this.status&&this.version.processAnswer(this.codecPreferences,t,null,e=>{const t=e&&e.message?e.message:e;this._log.error(`Failed to process answer during ICE Restart. Error: ${t}`)})},this._onHangup=()=>{this._log.info("Received hangup during ICE Restart"),this._removeReconnectionListeners()},this.pstream.on("answer",this._onAnswerOrRinging),this.pstream.on("hangup",this._onHangup),this.pstream.reinvite(this.version.getSDP(),this.callSid)}).catch(e=>{const t=e&&e.message?e.message:e;this._log.error(`Failed to createOffer during ICE Restart. Error: ${t}`),this.onfailed(t)})},Fe.prototype.makeOutgoingCall=function(e,t,r,n,o){if(!this._initializeMediaStream(n))return;const i=this;function a(){i.options&&i._setEncodingParameters(i.options.dscp),o(i.version.pc)}function s(e){const t=e.message||e;i.onerror({info:{code:31e3,message:`Error processing answer: ${t}`,twilioError:new f.ClientRemoteDescFailed}})}this.callSid=r,this._onAnswerOrRinging=e=>{if(!e.sdp)return;const t=this._maybeSetIceAggressiveNomination(e.sdp);i._answerSdp=t,"closed"!==i.status&&i.version.processAnswer(this.codecPreferences,t,a,s),i.pstream.removeListener("answer",i._onAnswerOrRinging),i.pstream.removeListener("ringing",i._onAnswerOrRinging)},this.pstream.on("answer",this._onAnswerOrRinging),this.pstream.on("ringing",this._onAnswerOrRinging),this.version.createOffer(this.options.maxAverageBitrate,{audio:!0},function(){"closed"!==i.status&&(t?i.pstream.reconnect(i.version.getSDP(),i.callSid,t):i.pstream.invite(i.version.getSDP(),i.callSid,e),i._setupRTCDtlsTransportListener())},function(e){const t=e.message||e;i.onerror({info:{code:31e3,message:`Error creating the offer: ${t}`,twilioError:new f.ClientLocalDescFailed}})})},Fe.prototype.answerIncomingCall=function(e,t,r,n){if(!this._initializeMediaStream(r))return;t=this._maybeSetIceAggressiveNomination(t),this._answerSdp=t.replace(/^a=setup:actpass$/gm,"a=setup:passive"),this.callSid=e;const o=this;this.version.processSDP(this.options.maxAverageBitrate,this.codecPreferences,t,{audio:!0},function(){"closed"!==o.status&&(o.pstream.answer(o.version.getSDP(),e),o.options&&o._setEncodingParameters(o.options.dscp),n(o.version.pc),o._setupRTCDtlsTransportListener())},function(e){const t=e.message||e;o.onerror({info:{code:31e3,message:`Error creating the answer: ${t}`,twilioError:new f.ClientRemoteDescFailed}})})},Fe.prototype.close=function(){this.version&&this.version.pc&&("closed"!==this.version.pc.signalingState&&this.version.pc.close(),this.version.pc=null),this.stream&&(this.mute(!1),this._stopStream()),this.stream=null,this._removeReconnectionListeners(),this._stopIceGatheringTimeout(),this._audioHelper._destroyRemoteProcessedStream(),this._audioProcessorEventObserver.removeListener("add",this._onAudioProcessorAdded),this._audioProcessorEventObserver.removeListener("remove",this._onAudioProcessorRemoved),Promise.all(this._removeAudioOutputs()).catch(()=>{}),this._mediaStreamSource&&this._mediaStreamSource.disconnect(),this._inputAnalyser&&this._inputAnalyser.disconnect(),this._outputAnalyser&&this._outputAnalyser.disconnect(),this._inputAnalyser2&&this._inputAnalyser2.disconnect(),this._outputAnalyser2&&this._outputAnalyser2.disconnect(),this.status="closed",this.onclose()},Fe.prototype.reject=function(e){this.callSid=e},Fe.prototype.ignore=function(e){this.callSid=e},Fe.prototype.mute=function(e){this.isMuted=e,this.stream&&(this._sender&&this._sender.track?this._sender.track.enabled=!e:("function"==typeof this.stream.getAudioTracks?this.stream.getAudioTracks():this.stream.audioTracks).forEach(t=>{t.enabled=!e}))},Fe.prototype.getOrCreateDTMFSender=function(){if(this._dtmfSender||this._dtmfSenderUnsupported)return this._dtmfSender||null;const e=this,t=this.version.pc;if(!t)return this._log.warn("No RTCPeerConnection available to call createDTMFSender on"),null;if("function"==typeof t.getSenders&&("function"==typeof RTCDTMFSender||"function"==typeof RTCDtmfSender)){const e=t.getSenders().find(e=>e.dtmf);if(e)return this._log.info("Using RTCRtpSender#dtmf"),this._dtmfSender=e.dtmf,this._dtmfSender}if("function"==typeof t.createDTMFSender&&"function"==typeof t.getLocalStreams){const r=t.getLocalStreams().map(t=>{const r=e._getAudioTracks(t);return r&&r[0]})[0];return r?(this._log.info("Creating RTCDTMFSender"),this._dtmfSender=t.createDTMFSender(r),this._dtmfSender):(this._log.warn("No local audio MediaStreamTrack available on the RTCPeerConnection to pass to createDTMFSender"),null)}return this._log.info("RTCPeerConnection does not support RTCDTMFSender"),this._dtmfSenderUnsupported=!0,null},Fe.prototype.getRTCDtlsTransport=function(){const e=this.version&&this.version.pc&&"function"==typeof this.version.pc.getSenders&&this.version.pc.getSenders()[0];return e&&e.transport||null},Fe.prototype._canStopMediaStreamTrack=()=>"function"==typeof MediaStreamTrack.prototype.stop,Fe.prototype._getAudioTracks=e=>"function"==typeof e.getAudioTracks?e.getAudioTracks():e.audioTracks,Fe.prototype._getRTCIceTransport=function(){const e=this.getRTCDtlsTransport();return e&&e.iceTransport||null},Fe.protocol=Me.test()?new Me:null,Fe.prototype._handleAudioProcessorEvent=function(e,t){if(!e||!this._remoteStream)return;let r=null;this._masterAudio?(this._log.info("Setting audio source for master audio."),r=this._masterAudio):(this._log.info("No master audio. Setting audio source for default audio output."),r=this.outputs.get("default").audio),ze(r,this._remoteStream,this._audioHelper).then(()=>{const e=t?"Successfully updated audio source with processed stream":"Successfully reverted audio source to original stream";this._log.info(e),r.paused&&(this._log.info("Resuming audio playback"),r.play())}).catch(()=>{const e=t?"Failed to update audio source":"Failed to revert audio source";this._log.error(e)})},Fe.enabled=Me.test();class Ve{constructor(){this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}get promise(){return this._promise}reject(e){this._reject(e)}resolve(e){this._resolve(e)}}class He{constructor(){this._operations=[]}enqueue(e){const t=!!this._operations.length,r=new Ve;return this._operations.push({deferred:r,callback:e}),t||this._processQueue(),r.promise}_processQueue(){return s(this,void 0,void 0,function*(){for(;this._operations.length;){const{deferred:e,callback:t}=this._operations[0];let r,n,o;try{r=yield t(),o=!0}catch(e){n=e}this._operations.shift(),o?e.resolve(r):e.reject(n)}})}}class Qe{get reject(){return this._reject}get resolve(){return this._resolve}constructor(){this.promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}}class Ye{constructor(){this._eventEmitter=new i.EventEmitter}addEventListener(e,t){return this._eventEmitter.addListener(e,t)}dispatchEvent(e,...t){return this._eventEmitter.emit(e,...t)}removeEventListener(e,t){return this._eventEmitter.removeListener(e,t)}}class Ke extends Ye{get destination(){return this._destination}get loop(){return this._loop}set loop(e){const t=this;e||!this.loop||this.paused||this._audioNode.addEventListener("ended",function e(){t._audioNode.removeEventListener("ended",e),t.pause()}),this._loop=e}get muted(){return 0===this._gainNode.gain.value}set muted(e){this._gainNode.gain.value=e?0:1}get paused(){return null===this._audioNode}get src(){return this._src}set src(e){this._load(e)}get srcObject(){return this._audioElement.srcObject}set srcObject(e){this._audioElement.srcObject=e}get sinkId(){return this._sinkId}constructor(e,t={},r={}){super(),this._audioNode=null,this._loop=!1,this._pendingPlayDeferreds=[],this._sinkId="default",this._src="","string"!=typeof t&&(r=t),this._audioContext=e,this._audioElement=new(r.AudioFactory||Audio),this._bufferPromise=this._createPlayDeferred().promise,this._destination=this._audioContext.destination,this._gainNode=this._audioContext.createGain(),this._gainNode.connect(this._destination),this._XMLHttpRequest=r.XMLHttpRequestFactory||XMLHttpRequest,this.addEventListener("canplaythrough",()=>{this._resolvePlayDeferreds()}),"string"==typeof t&&(this.src=t)}load(){this._load(this._src)}pause(){this.paused||(this._audioElement.pause(),this._audioNode.stop(),this._audioNode.disconnect(this._gainNode),this._audioNode=null,this._rejectPlayDeferreds(new Error("The play() request was interrupted by a call to pause().")))}play(){return s(this,void 0,void 0,function*(){if(!this.paused){if(yield this._bufferPromise,!this.paused)return;throw new Error("The play() request was interrupted by a call to pause().")}this._audioNode=this._audioContext.createBufferSource(),this._audioNode.loop=this.loop,this._audioNode.addEventListener("ended",()=>{this._audioNode&&this._audioNode.loop||this.dispatchEvent("ended")});const e=yield this._bufferPromise;if(this.paused)throw new Error("The play() request was interrupted by a call to pause().");if(this._audioNode.buffer=e,this._audioNode.connect(this._gainNode),this._audioNode.start(),this._audioElement.srcObject)return this._audioElement.play()})}setSinkId(e){return s(this,void 0,void 0,function*(){if("function"!=typeof this._audioElement.setSinkId)throw new Error("This browser does not support setSinkId.");if(e!==this.sinkId){if("default"===e)return this.paused||this._gainNode.disconnect(this._destination),this._audioElement.srcObject=null,this._destination=this._audioContext.destination,this._gainNode.connect(this._destination),void(this._sinkId=e);yield this._audioElement.setSinkId(e),this._audioElement.srcObject||(this._gainNode.disconnect(this._audioContext.destination),this._destination=this._audioContext.createMediaStreamDestination(),this._audioElement.srcObject=this._destination.stream,this._sinkId=e,this._gainNode.connect(this._destination))}})}_createPlayDeferred(){const e=new Qe;return this._pendingPlayDeferreds.push(e),e}_load(e){this._src&&this._src!==e&&this.pause(),this._src=e,this._bufferPromise=new Promise((t,r)=>s(this,void 0,void 0,function*(){if(!e)return this._createPlayDeferred().promise;const r=yield function(e,t,r){return s(this,void 0,void 0,function*(){const n=new t;n.open("GET",r,!0),n.responseType="arraybuffer";const o=yield new Promise(e=>{n.addEventListener("load",e),n.send()});try{return e.decodeAudioData(o.target.response)}catch(t){return new Promise(t=>{e.decodeAudioData(o.target.response,t)})}})}(this._audioContext,this._XMLHttpRequest,e);this.dispatchEvent("canplaythrough"),t(r)}))}_rejectPlayDeferreds(e){const t=this._pendingPlayDeferreds;t.splice(0,t.length).forEach(({reject:t})=>t(e))}_resolvePlayDeferreds(e){const t=this._pendingPlayDeferreds;t.splice(0,t.length).forEach(({resolve:t})=>t(e))}}function Ge(e,t,r){if(!(this instanceof Ge))return new Ge(e,t,r);if(!e||!t)throw new y("name and url are required arguments");(r=Object.assign({AudioFactory:"undefined"!=typeof Audio?Audio:null,maxDuration:0,shouldLoop:!1},r)).AudioPlayer=r.audioContext?Ke.bind(Ke,r.audioContext):r.AudioFactory,Object.defineProperties(this,{_Audio:{value:r.AudioPlayer},_activeEls:{value:new Map},_isSinkSupported:{value:null!==r.AudioFactory&&"function"==typeof r.AudioFactory.prototype.setSinkId},_maxDuration:{value:r.maxDuration},_maxDurationTimeout:{value:null,writable:!0},_operations:{value:new He},_playPromise:{value:null,writable:!0},_shouldLoop:{value:r.shouldLoop},_sinkIds:{value:["default"]},isPlaying:{enumerable:!0,get(){return!!this._playPromise}},name:{enumerable:!0,value:e},url:{enumerable:!0,value:t}}),this._Audio&&this._play(!0,!1)}function Je(e){e&&(e.pause(),e.src="",e.srcObject=null,e.load())}Ge.prototype._playAudioElement=function(e,t,r){const n=this._activeEls.get(e);if(!n)throw new y(`sinkId: "${e}" doesn't have an audio element`);return n.muted=!!t,n.loop=!!r,n.play().then(()=>n).catch(t=>{throw Je(n),this._activeEls.delete(e),t})},Ge.prototype._play=function(e,t){this.isPlaying&&this._stop(),this._maxDuration>0&&(this._maxDurationTimeout=setTimeout(this._stop.bind(this),this._maxDuration)),t="boolean"==typeof t?t:this._shouldLoop;const r=this;return this._playPromise=Promise.all(this._sinkIds.map(function(n){if(!r._Audio)return Promise.resolve();let o=r._activeEls.get(n);return o?r._playAudioElement(n,e,t):(o=new r._Audio(r.url),"function"==typeof o.setAttribute&&o.setAttribute("crossorigin","anonymous"),new Promise(e=>{o.addEventListener("canplaythrough",e)}).then(()=>(r._isSinkSupported?o.setSinkId(n):Promise.resolve()).then(function(){return r._activeEls.set(n,o),r._playPromise?r._playAudioElement(n,e,t):Promise.resolve()})))}))},Ge.prototype._stop=function(){this._activeEls.forEach((e,t)=>{this._sinkIds.includes(t)?(e.pause(),e.currentTime=0):(Je(e),this._activeEls.delete(t))}),clearTimeout(this._maxDurationTimeout),this._playPromise=null,this._maxDurationTimeout=null},Ge.prototype.setSinkIds=function(e){this._isSinkSupported&&(e=e.forEach?e:[e],[].splice.apply(this._sinkIds,[0,this._sinkIds.length].concat(e)))},Ge.prototype.stop=function(){this._operations.enqueue(()=>(this._stop(),Promise.resolve()))},Ge.prototype.play=function(){return this._operations.enqueue(()=>this._play())};class Xe extends i.EventEmitter{static get audioContext(){return Xe._audioContext}static get extension(){const e="undefined"!=typeof document?document.createElement("audio"):{canPlayType:!1};let t,r;try{t=e.canPlayType&&!!e.canPlayType("audio/mpeg").replace(/no/,"")}catch(e){t=!1}try{r=e.canPlayType&&!!e.canPlayType("audio/ogg;codecs='vorbis'").replace(/no/,"")}catch(e){r=!1}return r&&!t?"ogg":"mp3"}static get isSupported(){return Me.test()}static get packageName(){return _}static runPreflight(e,t){return new ve(e,Object.assign({audioContext:Xe._getOrCreateAudioContext()},t))}static toString(){return"[Twilio.Device class]"}static get version(){return S}static _getOrCreateAudioContext(){return Xe._audioContext||("undefined"!=typeof AudioContext?Xe._audioContext=new AudioContext:"undefined"!=typeof webkitAudioContext&&(Xe._audioContext=new webkitAudioContext)),Xe._audioContext}constructor(e,t={}){if(super(),this._activeCall=null,this._audio=null,this._audioProcessorEventObserver=null,this._callInputStream=null,this._calls=[],this._callSinkIds=["default"],this._chunderURIs=[],this._defaultOptions={allowIncomingWhileBusy:!1,closeProtection:!1,codecPreferences:[dt.Codec.PCMU,dt.Codec.Opus],dscp:!0,enableImprovedSignalingErrorPrecision:!1,forceAggressiveIceNomination:!1,logLevel:m.levels.ERROR,maxCallSignalingTimeoutMs:0,preflight:!1,sounds:{},tokenRefreshMs:1e4,voiceEventSidGenerator:qe},this._edge=null,this._home=null,this._identity=null,this._log=new T("Device"),this._makeCallPromise=null,this._options={},this._preferredURI=null,this._publisher=null,this._region=null,this._regTimer=null,this._shouldReRegister=!1,this._soundcache=new Map,this._state=Xe.State.Unregistered,this._stateEventMapping={[Xe.State.Destroyed]:Xe.EventName.Destroyed,[Xe.State.Unregistered]:Xe.EventName.Unregistered,[Xe.State.Registering]:Xe.EventName.Registering,[Xe.State.Registered]:Xe.EventName.Registered},this._stream=null,this._streamConnectedPromise=null,this._tokenWillExpireTimeout=null,this._createDefaultPayload=e=>{const t={aggressive_nomination:this._options.forceAggressiveIceNomination,browser_extension:this._isBrowserExtension,dscp:!!this._options.dscp,ice_restart_enabled:!0,platform:"undefined"!=typeof RTCIceGatherer?"ORTC":"WebRTC",sdk_version:S};function r(e,r){r&&(t[e]=r)}if(e){const n=e.parameters.CallSid;r("call_sid",/^TJ/.test(n)?void 0:n),r("temp_call_sid",e.outboundConnectionId),r("audio_codec",e.codec),t.direction=e.direction}return r("gateway",this._stream&&this._stream.gateway),r("region",this._stream&&this._stream.region),t},this._onSignalingClose=()=>{this._stream=null,this._streamConnectedPromise=null},this._onSignalingConnected=e=>{var t;const r=function(e){return Se[e]||null}(e.region);if(this._edge=e.edge||Be[r]||e.region,this._region=r||e.region,this._home=e.home,null===(t=this._publisher)||void 0===t||t.setHost(Pe(e.home)),e.token&&(this._identity=e.token.identity,"number"==typeof e.token.ttl&&"number"==typeof this._options.tokenRefreshMs)){const t=1e3*e.token.ttl,r=Math.max(0,t-this._options.tokenRefreshMs);this._tokenWillExpireTimeout=setTimeout(()=>{this._log.debug("#tokenWillExpire"),this.emit("tokenWillExpire",this),this._tokenWillExpireTimeout&&(clearTimeout(this._tokenWillExpireTimeout),this._tokenWillExpireTimeout=null)},r)}const n=this._getChunderws()||De(this._edge);if(n.length>0){const[e]=n;this._preferredURI=Ie(e)}else this._log.warn("Could not parse a preferred URI from the stream#connected event.");this._shouldReRegister&&this.register()},this._onSignalingError=e=>{if("object"!=typeof e)return void this._log.warn("Invalid signaling error payload",e);const{error:t,callsid:r,voiceeventsid:n}=e;if("object"!=typeof t||n)return void this._log.warn("Ignoring signaling error payload",{originalError:t,voiceeventsid:n});const o="string"==typeof r&&this._findCall(r)||void 0,{code:i,message:a}=t;let{twilioError:s}=t;if("number"==typeof i)if(31201===i)s=new l.AuthenticationFailed(t);else if(31204===i)s=new l.AccessTokenInvalid(t);else if(31205===i)this._stopRegistrationTimer(),s=new l.AccessTokenExpired(t);else{const e=b(!!this._options.enableImprovedSignalingErrorPrecision,i);void 0!==e&&(s=new e(t))}s||(this._log.error("Unknown signaling error: ",t),s=new h.UnknownError(a,t)),this._log.error("Received error: ",s),this._log.debug("#error",t),this.emit(Xe.EventName.Error,s,o)},this._onSignalingInvite=e=>s(this,void 0,void 0,function*(){var t;const r=!!this._activeCall;if(r&&!this._options.allowIncomingWhileBusy)return void this._log.info("Device busy; ignoring incoming invite");if(!e.callsid||!e.sdp)return this._log.debug("#error",e),void this.emit(Xe.EventName.Error,new d.BadRequest("Malformed invite from gateway"));const n=e.parameters||{};n.CallSid=n.CallSid||e.callsid;const o=Object.assign({},$(n.Params));let i;this._makeCallPromise=this._makeCall(o,{callParameters:n,enableImprovedSignalingErrorPrecision:!!this._options.enableImprovedSignalingErrorPrecision,offerSdp:e.sdp,reconnectToken:e.reconnect,voiceEventSidGenerator:this._options.voiceEventSidGenerator});try{i=yield this._makeCallPromise}finally{this._makeCallPromise=null}this._calls.push(i),i.once("accept",()=>{this._soundcache.get(Xe.SoundName.Incoming).stop(),this._publishNetworkChange()});const a=(null===(t=this._audio)||void 0===t?void 0:t.incoming())&&!r?()=>this._soundcache.get(Xe.SoundName.Incoming).play():()=>Promise.resolve();this._showIncomingCall(i,a)}),this._onSignalingOffline=()=>{this._log.info("Stream is offline"),this._edge=null,this._region=null,this._shouldReRegister=this.state!==Xe.State.Unregistered,this._setState(Xe.State.Unregistered)},this._onSignalingReady=()=>{this._log.info("Stream is ready"),this._setState(Xe.State.Registered)},this._publishNetworkChange=()=>{this._activeCall&&this._networkInformation&&this._publisher.info("network-information","network-change",{connection_type:this._networkInformation.type,downlink:this._networkInformation.downlink,downlinkMax:this._networkInformation.downlinkMax,effective_type:this._networkInformation.effectiveType,rtt:this._networkInformation.rtt},this._activeCall)},this._updateInputStream=e=>{const t=this._activeCall;return t&&!e?Promise.reject(new k("Cannot unset input device while a call is in progress.")):(this._callInputStream=e,t?t._setInputTracksFromStream(e):Promise.resolve())},this._updateSinkIds=(e,t)=>("ringtone"===e?this._updateRingtoneSinkIds(t):this._updateSpeakerSinkIds(t)).then(()=>{this._publisher.info("audio",`${e}-devices-set`,{audio_device_ids:t},this._activeCall)},r=>{throw this._publisher.error("audio",`${e}-devices-set-failed`,{audio_device_ids:t,message:r.message},this._activeCall),r}),this._setupLoglevel(t.logLevel),this._logOptions("constructor",t),this.updateToken(e),j())throw new x("Microsoft Edge Legacy (https://support.microsoft.com/en-us/help/4533505/what-is-microsoft-edge-legacy) is deprecated and will not be able to connect to Twilio to make or receive calls after September 1st, 2020. Please see this documentation for a list of supported browsers https://www.twilio.com/docs/voice/client/javascript#supported-browsers");if(!Xe.isSupported&&t.ignoreBrowserSupport){if(window&&window.location&&"http:"===window.location.protocol)throw new x("twilio.js wasn't able to find WebRTC browser support. This is most likely because this page is served over http rather than https, which does not support WebRTC in many browsers. Please load this page over https and try again.");throw new x("twilio.js 1.3+ SDKs require WebRTC browser support. For more information, see <https://www.twilio.com/docs/api/client/twilio-js>. If you have any questions about this announcement, please contact Twilio Support at <help@twilio.com>.")}const r=globalThis,n=r.msBrowser||r.browser||r.chrome;if(this._isBrowserExtension=!!n&&!!n.runtime&&!!n.runtime.id||!!r.safari&&!!r.safari.extension,this._isBrowserExtension&&this._log.info("Running as browser extension."),navigator){const e=navigator;this._networkInformation=e.connection||e.mozConnection||e.webkitConnection}this._networkInformation&&"function"==typeof this._networkInformation.addEventListener&&this._networkInformation.addEventListener("change",this._publishNetworkChange),Xe._getOrCreateAudioContext(),Xe._audioContext&&(Xe._dialtonePlayer||(Xe._dialtonePlayer=new J(Xe._audioContext))),this._boundDestroy=this.destroy.bind(this),this._boundConfirmClose=this._confirmClose.bind(this),"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("unload",this._boundDestroy),window.addEventListener("pagehide",this._boundDestroy)),this.updateOptions(t)}get audio(){return this._audio}connect(){return s(this,arguments,void 0,function*(e={}){if(this._log.debug(".connect",JSON.stringify(e)),this._throwIfDestroyed(),this._activeCall)throw new k("A Call is already active");let t,r,n;if(e.connectToken){try{const o=JSON.parse(decodeURIComponent(atob(e.connectToken)));t=o.customParameters,r=o.parameters,n=o.signalingReconnectToken}catch(e){throw new y("Cannot parse connectToken")}if(!r||!r.CallSid||!n)throw new y("Invalid connectToken")}let o=!1,i={};const a={enableImprovedSignalingErrorPrecision:!!this._options.enableImprovedSignalingErrorPrecision,rtcConfiguration:e.rtcConfiguration,voiceEventSidGenerator:this._options.voiceEventSidGenerator};let s;n&&r?(o=!0,a.callParameters=r,a.reconnectCallSid=r.CallSid,a.reconnectToken=n,i=t||i):i=e.params||i,this._makeCallPromise=this._makeCall(i,a,o);try{s=this._activeCall=yield this._makeCallPromise}finally{this._makeCallPromise=null}return this._calls.splice(0).forEach(e=>e.ignore()),this._soundcache.get(Xe.SoundName.Incoming).stop(),s.accept({rtcConstraints:e.rtcConstraints}),this._publishNetworkChange(),s})}get calls(){return this._calls}destroy(){var e;this._log.debug(".destroy"),this._log.debug("Rejecting any incoming calls"),this._calls.slice(0).forEach(e=>e.reject()),this.disconnectAll(),this._stopRegistrationTimer(),this._destroyStream(),this._destroyAudioHelper(),null===(e=this._audioProcessorEventObserver)||void 0===e||e.destroy(),this._destroyPublisher(),this._networkInformation&&"function"==typeof this._networkInformation.removeEventListener&&this._networkInformation.removeEventListener("change",this._publishNetworkChange),"undefined"!=typeof window&&window.removeEventListener&&(window.removeEventListener("beforeunload",this._boundConfirmClose),window.removeEventListener("unload",this._boundDestroy),window.removeEventListener("pagehide",this._boundDestroy)),this._setState(Xe.State.Destroyed),i.EventEmitter.prototype.removeAllListeners.call(this)}disconnectAll(){this._log.debug(".disconnectAll"),this._calls.splice(0).forEach(e=>e.disconnect()),this._activeCall&&this._activeCall.disconnect()}get edge(){return this._edge}get home(){return this._home}get identity(){return this._identity}get isBusy(){return!!this._activeCall}register(){return s(this,void 0,void 0,function*(){if(this._log.debug(".register"),this.state!==Xe.State.Unregistered)throw new k(`Attempt to register when device is in state "${this.state}". Must be "${Xe.State.Unregistered}".`);this._shouldReRegister=!1,this._setState(Xe.State.Registering),yield this._streamConnectedPromise||this._setupStream(),yield this._sendPresence(!0),yield W(this,Xe.State.Registered,Xe.State.Unregistered)})}get state(){return this._state}get token(){return this._token}toString(){return"[Twilio.Device instance]"}unregister(){return s(this,void 0,void 0,function*(){if(this._log.debug(".unregister"),this.state!==Xe.State.Registered)throw new k(`Attempt to unregister when device is in state "${this.state}". Must be "${Xe.State.Registered}".`);this._shouldReRegister=!1;const e=yield this._streamConnectedPromise,t=new Promise(t=>{e.on("offline",t)});yield this._sendPresence(!1),yield t})}updateOptions(e={}){if(this._logOptions("updateOptions",e),this.state===Xe.State.Destroyed)throw new k(`Attempt to "updateOptions" when device is in state "${this.state}".`);this._options=Object.assign(Object.assign(Object.assign({},this._defaultOptions),this._options),e);const t=new Set(this._chunderURIs),r=this._chunderURIs=(this._getChunderws()||De(this._options.edge)).map(Ie);let n=t.size!==r.length;if(!n)for(const e of r)if(!t.has(e)){n=!0;break}if(this.isBusy&&n)throw new k("Cannot change Edge while on an active Call");this._setupLoglevel(this._options.logLevel);for(const e of Object.keys(Xe._defaultSounds)){const t=Xe._defaultSounds[e],r=`${B}/${t.filename}.${Xe.extension}?cache=${S}`,n=this._options.sounds&&this._options.sounds[e]||r,o=new(this._options.Sound||Ge)(e,n,{audioContext:this._options.disableAudioContextSounds?null:Xe.audioContext,maxDuration:t.maxDuration,shouldLoop:t.shouldLoop});this._soundcache.set(e,o)}this._setupAudioHelper(),this._setupPublisher(),n&&this._streamConnectedPromise&&this._setupStream(),"undefined"!=typeof window&&"function"==typeof window.addEventListener&&this._options.closeProtection&&(window.removeEventListener("beforeunload",this._boundConfirmClose),window.addEventListener("beforeunload",this._boundConfirmClose))}updateToken(e){if(this._log.debug(".updateToken"),this.state===Xe.State.Destroyed)throw new k(`Attempt to "updateToken" when device is in state "${this.state}".`);if("string"!=typeof e)throw new y('Parameter "token" must be of type "string".');this._token=e,this._stream&&this._stream.setToken(this._token),this._publisher&&this._publisher.setToken(this._token)}_confirmClose(e){if(!this._activeCall)return"";const t=this._options.closeProtection||!1,r="string"!=typeof t?"A call is currently in-progress. Leaving or reloading this page will end the call.":t;return(e||window.event).returnValue=r,r}_destroyAudioHelper(){this._audio&&(this._audio._destroy(),this._audio=null)}_destroyPublisher(){this._publisher&&(this._publisher=null)}_destroyStream(){this._stream&&(this._stream.removeListener("close",this._onSignalingClose),this._stream.removeListener("connected",this._onSignalingConnected),this._stream.removeListener("error",this._onSignalingError),this._stream.removeListener("invite",this._onSignalingInvite),this._stream.removeListener("offline",this._onSignalingOffline),this._stream.removeListener("ready",this._onSignalingReady),this._stream.destroy(),this._stream=null),this._onSignalingOffline(),this._streamConnectedPromise=null}_findCall(e){return this._calls.find(t=>t.parameters.CallSid===e||t.outboundConnectionId===e)||null}_getChunderws(){return"string"==typeof this._options.chunderw?[this._options.chunderw]:Array.isArray(this._options.chunderw)?this._options.chunderw:null}_logOptions(e,t={}){const r=["allowIncomingWhileBusy","appName","appVersion","closeProtection","codecPreferences","disableAudioContextSounds","dscp","edge","enableImprovedSignalingErrorPrecision","forceAggressiveIceNomination","logLevel","maxAverageBitrate","maxCallSignalingTimeoutMs","sounds","tokenRefreshMs"],n=["RTCPeerConnection","enumerateDevices","getUserMedia","MediaStream"];if("object"==typeof t){const o=Object.assign({},t);Object.keys(o).forEach(e=>{r.includes(e)||n.includes(e)||delete o[e],n.includes(e)&&(o[e]=!0)}),this._log.debug(`.${e}`,JSON.stringify(o))}}_makeCall(e,t){return s(this,arguments,void 0,function*(e,t,r=!1){var n;const o=null===(n=this._audio)||void 0===n?void 0:n._getInputDevicePromise();o&&(this._log.debug("inputDevicePromise detected, waiting..."),yield o,this._log.debug("inputDevicePromise resolved"));const i={audioHelper:this._audio,onIgnore:()=>{this._soundcache.get(Xe.SoundName.Incoming).stop()},pstream:yield this._streamConnectedPromise||this._setupStream(),publisher:this._publisher,soundcache:this._soundcache};t=Object.assign({MediaStream:this._options.MediaStream,RTCPeerConnection:this._options.RTCPeerConnection,beforeAccept:e=>{this._activeCall&&this._activeCall!==e&&(this._activeCall.disconnect(),this._removeCall(this._activeCall))},codecPreferences:this._options.codecPreferences,customSounds:this._options.sounds,dialtonePlayer:Xe._dialtonePlayer,dscp:this._options.dscp,forceAggressiveIceNomination:this._options.forceAggressiveIceNomination,getInputStream:()=>this._options.fileInputStream||this._callInputStream,getSinkIds:()=>this._callSinkIds,maxAverageBitrate:this._options.maxAverageBitrate,preflight:this._options.preflight,rtcConstraints:this._options.rtcConstraints,shouldPlayDisconnect:()=>{var e;return null===(e=this._audio)||void 0===e?void 0:e.disconnect()},twimlParams:e,voiceEventSidGenerator:this._options.voiceEventSidGenerator},t);const a=()=>{this._stream?null===this._activeCall&&0===this._calls.length&&this._stream.updatePreferredURI(null):this._log.warn("UnsetPreferredUri called without a stream")},s=new(this._options.Call||dt)(i,t);return this._publisher.info("settings","init",{MediaStream:!!this._options.MediaStream,RTCPeerConnection:!!this._options.RTCPeerConnection,enumerateDevices:!!this._options.enumerateDevices,getUserMedia:!!this._options.getUserMedia},s),s.once("accept",()=>{var e,t,n,o,i;this._stream.updatePreferredURI(this._preferredURI),this._removeCall(s),this._activeCall=s,this._audio&&this._audio._maybeStartPollingVolume(),s.direction===dt.CallDirection.Outgoing&&(null===(e=this._audio)||void 0===e?void 0:e.outgoing())&&!r&&this._soundcache.get(Xe.SoundName.Outgoing).play();const a={edge:this._edge||this._region};this._options.edge&&(a.selected_edge=Array.isArray(this._options.edge)?this._options.edge:[this._options.edge]),this._publisher.info("settings","edge",a,s),(null===(t=this._audio)||void 0===t?void 0:t.localProcessedStream)&&(null===(n=this._audioProcessorEventObserver)||void 0===n||n.emit("enabled",!1)),(null===(o=this._audio)||void 0===o?void 0:o.remoteProcessedStream)&&(null===(i=this._audioProcessorEventObserver)||void 0===i||i.emit("enabled",!0))}),s.addListener("error",e=>{"closed"===s.status()&&(this._removeCall(s),a()),this._audio&&this._audio._maybeStopPollingVolume(),this._maybeStopIncomingSound()}),s.once("cancel",()=>{this._log.info(`Canceled: ${s.parameters.CallSid}`),this._removeCall(s),a(),this._audio&&this._audio._maybeStopPollingVolume(),this._maybeStopIncomingSound()}),s.once("disconnect",()=>{this._audio&&this._audio._maybeStopPollingVolume(),this._removeCall(s),a(),this._maybeStopIncomingSound()}),s.once("reject",()=>{this._log.info(`Rejected: ${s.parameters.CallSid}`),this._audio&&this._audio._maybeStopPollingVolume(),this._removeCall(s),a(),this._maybeStopIncomingSound()}),s.on("transportClose",()=>{s.status()===dt.State.Pending&&(this._audio&&this._audio._maybeStopPollingVolume(),this._removeCall(s),this._maybeStopIncomingSound())}),s})}_maybeStopIncomingSound(){this._calls.length||this._soundcache.get(Xe.SoundName.Incoming).stop()}_removeCall(e){this._activeCall===e&&(this._activeCall=null,this._makeCallPromise=null);for(let t=this._calls.length-1;t>=0;t--)e===this._calls[t]&&this._calls.splice(t,1)}_sendPresence(e){return s(this,void 0,void 0,function*(){const t=yield this._streamConnectedPromise;t&&(t.register({audio:e}),e?this._startRegistrationTimer():this._stopRegistrationTimer())})}_setState(e){if(e===this.state)return;this._state=e;const t=this._stateEventMapping[e];this._log.debug(`#${t}`),this.emit(t)}_setupAudioHelper(){this._audioProcessorEventObserver||(this._audioProcessorEventObserver=new K,this._audioProcessorEventObserver.on("event",({name:e,group:t,isRemote:r})=>{this._publisher.info(t,e,{is_remote:r},this._activeCall)}));const e={audioContext:Xe.audioContext,audioProcessorEventObserver:this._audioProcessorEventObserver,beforeSetInputDevice:()=>this._makeCallPromise?(this._log.debug("beforeSetInputDevice pause detected"),this._makeCallPromise):(this._log.debug("beforeSetInputDevice pause not detected, setting default"),Promise.resolve()),enumerateDevices:this._options.enumerateDevices,getUserMedia:this._options.getUserMedia||We};if(this._audio)return this._log.info("Found existing audio helper; updating options..."),void this._audio._updateUserOptions(e);this._audio=new(this._options.AudioHelper||Y)(this._updateSinkIds,this._updateInputStream,e),this._audio.on("deviceChange",e=>{const t=this._activeCall,r=e.map(e=>e.deviceId);this._publisher.info("audio","device-change",{lost_active_device_ids:r},t),t&&t._mediaHandler._onInputDevicesChanged()})}_setupLoglevel(e){const t="number"==typeof e||"string"==typeof e?e:m.levels.ERROR;this._log.setDefaultLevel(t),this._log.info("Set logger default level to",t)}_setupPublisher(){this._publisher&&(this._log.info("Found existing publisher; destroying..."),this._destroyPublisher());const e={defaultPayload:this._createDefaultPayload,metadata:{app_name:this._options.appName,app_version:this._options.appVersion}};return this._options.eventgw&&(e.host=this._options.eventgw),this._home&&(e.host=Pe(this._home)),this._publisher=new(this._options.Publisher||Z)("twilio-js-sdk",this.token,e),!1===this._options.publishEvents?this._publisher.disable():this._publisher.on("error",e=>{this._log.warn("Cannot connect to insights.",e)}),this._publisher}_setupStream(){return this._stream&&(this._log.info("Found existing stream; destroying..."),this._destroyStream()),this._log.info("Setting up VSP"),this._stream=new(this._options.PStream||xe)(this.token,this._chunderURIs,{backoffMaxMs:this._options.backoffMaxMs,maxPreferredDurationMs:this._options.maxCallSignalingTimeoutMs}),this._stream.addListener("close",this._onSignalingClose),this._stream.addListener("connected",this._onSignalingConnected),this._stream.addListener("error",this._onSignalingError),this._stream.addListener("invite",this._onSignalingInvite),this._stream.addListener("offline",this._onSignalingOffline),this._stream.addListener("ready",this._onSignalingReady),this._streamConnectedPromise=W(this._stream,"connected","close").then(()=>this._stream)}_showIncomingCall(e,t){let r;return Promise.race([t(),new Promise((e,t)=>{r=setTimeout(()=>{t(new Error("Playing incoming ringtone took too long; it might not play. Continuing execution..."))},2e3)})]).catch(e=>{this._log.warn(e.message)}).then(()=>{clearTimeout(r),this._log.debug("#incoming",JSON.stringify({customParameters:e.customParameters,parameters:e.parameters})),this.emit(Xe.EventName.Incoming,e)})}_startRegistrationTimer(){this._stopRegistrationTimer(),this._regTimer=setTimeout(()=>{this._sendPresence(!0)},3e4)}_stopRegistrationTimer(){this._regTimer&&clearTimeout(this._regTimer)}_throwIfDestroyed(){if(this.state===Xe.State.Destroyed)throw new k("Device has been destroyed.")}_updateRingtoneSinkIds(e){return Promise.resolve(this._soundcache.get(Xe.SoundName.Incoming).setSinkIds(e))}_updateSpeakerSinkIds(e){Array.from(this._soundcache.entries()).filter(e=>e[0]!==Xe.SoundName.Incoming).forEach(t=>t[1].setSinkIds(e)),this._callSinkIds=e;const t=this._activeCall;return t?t._setSinkIds(e):Promise.resolve()}}Xe._defaultSounds={disconnect:{filename:"disconnect",maxDuration:3e3},dtmf0:{filename:"dtmf-0",maxDuration:1e3},dtmf1:{filename:"dtmf-1",maxDuration:1e3},dtmf2:{filename:"dtmf-2",maxDuration:1e3},dtmf3:{filename:"dtmf-3",maxDuration:1e3},dtmf4:{filename:"dtmf-4",maxDuration:1e3},dtmf5:{filename:"dtmf-5",maxDuration:1e3},dtmf6:{filename:"dtmf-6",maxDuration:1e3},dtmf7:{filename:"dtmf-7",maxDuration:1e3},dtmf8:{filename:"dtmf-8",maxDuration:1e3},dtmf9:{filename:"dtmf-9",maxDuration:1e3},dtmfh:{filename:"dtmf-hash",maxDuration:1e3},dtmfs:{filename:"dtmf-star",maxDuration:1e3},incoming:{filename:"incoming",shouldLoop:!0},outgoing:{filename:"outgoing",maxDuration:3e3}},function(e){var t,r,n;(t=e.EventName||(e.EventName={})).Error="error",t.Incoming="incoming",t.Destroyed="destroyed",t.Unregistered="unregistered",t.Registering="registering",t.Registered="registered",t.TokenWillExpire="tokenWillExpire",(r=e.State||(e.State={})).Destroyed="destroyed",r.Unregistered="unregistered",r.Registering="registering",r.Registered="registered",(n=e.SoundName||(e.SoundName={})).Incoming="incoming",n.Outgoing="outgoing",n.Disconnect="disconnect",n.Dtmf0="dtmf0",n.Dtmf1="dtmf1",n.Dtmf2="dtmf2",n.Dtmf3="dtmf3",n.Dtmf4="dtmf4",n.Dtmf5="dtmf5",n.Dtmf6="dtmf6",n.Dtmf7="dtmf7",n.Dtmf8="dtmf8",n.Dtmf9="dtmf9",n.DtmfS="dtmfs",n.DtmfH="dtmfh"}(Xe||(Xe={}));class Ze{constructor(e,t=!1){let r;this.deleted=!1;const n=e.candidate.split("network-cost ");n[1]&&(r=parseInt(n[1],10)),this.candidateType=e.type,this.ip=e.ip||e.address,this.isRemote=t,this.networkCost=r,this.port=e.port,this.priority=e.priority,this.protocol=e.protocol,this.relatedAddress=e.relatedAddress,this.relatedPort=e.relatedPort,this.tcpType=e.tcpType,this.transportId=e.sdpMid}toPayload(){return{candidate_type:this.candidateType,deleted:this.deleted,ip:this.ip,is_remote:this.isRemote,"network-cost":this.networkCost,port:this.port,priority:this.priority,protocol:this.protocol,related_address:this.relatedAddress,related_port:this.relatedPort,tcp_type:this.tcpType,transport_id:this.transportId}}}const et=94.768;function tt(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)&&e>=0}var rt={calculate:function(e,t,r){if("number"!=typeof e||"number"!=typeof t||"number"!=typeof r||!tt(e)||!tt(t)||!tt(r))return null;const n=e+2*t+10;let o=0;switch(!0){case n<160:o=et-n/40;break;case n<1e3:o=et-(n-120)/10}return o=1==r<=o/2.5?Math.max(o-2.5*r,6.52):0,1+.035*o+7e-6*o*(o-60)*(100-o)},isNonNegativeNumber:tt};const nt={audioInputLevel:{minStandardDeviation:327.67,sampleCount:10},audioOutputLevel:{minStandardDeviation:327.67,sampleCount:10},bytesReceived:{clearCount:2,min:1,raiseCount:3,sampleCount:3},bytesSent:{clearCount:2,min:1,raiseCount:3,sampleCount:3},jitter:{max:30},mos:{min:3},packetsLostFraction:[{max:1},{clearValue:1,maxAverage:3,sampleCount:7}],rtt:{max:400}};class ot extends i.EventEmitter{constructor(e){super(),this._activeWarnings=new Map,this._currentStreaks=new Map,this._inputVolumes=[],this._outputVolumes=[],this._sampleBuffer=[],this._supplementalSampleBuffers={audioInputLevel:[],audioOutputLevel:[]},this._warningsEnabled=!0,e=e||{},this._getRTCStats=e.getRTCStats||ge,this._mos=e.Mos||rt,this._peerConnection=e.peerConnection,this._thresholds=Object.assign(Object.assign({},nt),e.thresholds);const t=Object.values(this._thresholds).map(e=>e.sampleCount).filter(e=>!!e);this._maxSampleCount=Math.max(5,...t),this._peerConnection&&this.enable(this._peerConnection)}addVolumes(e,t){this._inputVolumes.push(e),this._outputVolumes.push(t)}disable(){return this._sampleInterval&&(clearInterval(this._sampleInterval),delete this._sampleInterval),this}disableWarnings(){return this._warningsEnabled&&this._activeWarnings.clear(),this._warningsEnabled=!1,this}enable(e){if(e){if(this._peerConnection&&e!==this._peerConnection)throw new y("Attempted to replace an existing PeerConnection in StatsMonitor.enable");this._peerConnection=e}if(!this._peerConnection)throw new y("Can not enable StatsMonitor without a PeerConnection");return this._sampleInterval=this._sampleInterval||setInterval(this._fetchSample.bind(this),1e3),this}enableWarnings(){return this._warningsEnabled=!0,this}hasActiveWarning(e,t){const r=`${e}:${t}`;return!!this._activeWarnings.get(r)}_addSample(e){const t=this._sampleBuffer;t.push(e),t.length>this._maxSampleCount&&t.splice(0,t.length-this._maxSampleCount)}_clearWarning(e,t,r){const n=`${e}:${t}`,o=this._activeWarnings.get(n);!o||Date.now()-o.timeRaised<5e3||(this._activeWarnings.delete(n),this.emit("warning-cleared",Object.assign(Object.assign({},r),{name:e,threshold:{name:t,value:this._thresholds[e][t]}})))}_createSample(e,t){const r=t&&t.totals.bytesSent||0,n=t&&t.totals.bytesReceived||0,o=t&&t.totals.packetsSent||0,i=t&&t.totals.packetsReceived||0,a=t&&t.totals.packetsLost||0,s=e.bytesSent-r,l=e.bytesReceived-n,c=e.packetsSent-o,d=e.packetsReceived-i,u=e.packetsLost-a,h=d+u,p=h>0?u/h*100:0,g=e.packetsReceived+e.packetsLost,A=g>0?e.packetsLost/g*100:100,f="number"!=typeof e.rtt&&t?t.rtt:e.rtt,m=this._inputVolumes.splice(0);this._supplementalSampleBuffers.audioInputLevel.push(m);const v=this._outputVolumes.splice(0);return this._supplementalSampleBuffers.audioOutputLevel.push(v),{audioInputLevel:Math.round(R(m)),audioOutputLevel:Math.round(R(v)),bytesReceived:l,bytesSent:s,codecName:e.codecName,jitter:e.jitter,mos:this._mos.calculate(f,e.jitter,t&&p),packetsLost:u,packetsLostFraction:p,packetsReceived:d,packetsSent:c,rtt:f,timestamp:e.timestamp,totals:{bytesReceived:e.bytesReceived,bytesSent:e.bytesSent,packetsLost:e.packetsLost,packetsLostFraction:A,packetsReceived:e.packetsReceived,packetsSent:e.packetsSent}}}_fetchSample(){this._getSample().then(e=>{this._addSample(e),this._raiseWarnings(),this.emit("sample",e)}).catch(e=>{this.disable(),this.emit("error",e)})}_getSample(){return this._getRTCStats(this._peerConnection).then(e=>{let t=null;return this._sampleBuffer.length&&(t=this._sampleBuffer[this._sampleBuffer.length-1]),this._createSample(e,t)})}_raiseWarning(e,t,r){const n=`${e}:${t}`;if(this._activeWarnings.has(n))return;this._activeWarnings.set(n,{timeRaised:Date.now()});const o=this._thresholds[e];let i;if(Array.isArray(o)){const e=o.find(e=>t in e);e&&(i=e[t])}else i=this._thresholds[e][t];this.emit("warning",Object.assign(Object.assign({},r),{name:e,threshold:{name:t,value:i}}))}_raiseWarnings(){this._warningsEnabled&&Object.keys(this._thresholds).forEach(e=>this._raiseWarningsForStat(e))}_raiseWarningsForStat(e){(Array.isArray(this._thresholds[e])?this._thresholds[e]:[this._thresholds[e]]).forEach(t=>{const r=this._sampleBuffer,n=t.clearCount||0,o=t.raiseCount||3,i=t.sampleCount||this._maxSampleCount;let a=r.slice(-i);const s=a.map(t=>t[e]);if(s.some(e=>null==e))return;let l;if("number"==typeof t.max&&(l=function(e,t){return t.reduce((t,r)=>t+(r>e?1:0),0)}(t.max,s),l>=o?this._raiseWarning(e,"max",{values:s,samples:a}):l<=n&&this._clearWarning(e,"max",{values:s,samples:a})),"number"==typeof t.min&&(l=function(e,t){return t.reduce((t,r)=>t+(r<e?1:0),0)}(t.min,s),l>=o?this._raiseWarning(e,"min",{values:s,samples:a}):l<=n&&this._clearWarning(e,"min",{values:s,samples:a})),"number"==typeof t.maxDuration&&r.length>1){a=r.slice(-2);const n=a[0][e],o=a[1][e],i=this._currentStreaks.get(e)||0,s=n===o?i+1:0;this._currentStreaks.set(e,s),s>=t.maxDuration?this._raiseWarning(e,"maxDuration",{value:s}):0===s&&this._clearWarning(e,"maxDuration",{value:i})}if("number"==typeof t.minStandardDeviation){const r=this._supplementalSampleBuffers[e];if(!r||r.length<t.sampleCount)return;r.length>t.sampleCount&&r.splice(0,r.length-t.sampleCount);const n=function(e){if(e.length<=0)return null;const t=e.reduce((e,t)=>e+t,0)/e.length,r=e.map(e=>Math.pow(e-t,2));return Math.sqrt(r.reduce((e,t)=>e+t,0)/r.length)}(function(e){return e.reduce((e,t)=>[...e,...t],[])}(r.slice(-i)));if("number"!=typeof n)return;n<t.minStandardDeviation?this._raiseWarning(e,"minStandardDeviation",{value:n}):this._clearWarning(e,"minStandardDeviation",{value:n})}[["maxAverage",(e,t)=>e>t],["minAverage",(e,t)=>e<t]].forEach(([r,n])=>{if("number"==typeof t[r]&&s.length>=i){const o=R(s);n(o,t[r])?this._raiseWarning(e,r,{values:s,samples:a}):n(o,t.clearValue||t[r])||this._clearWarning(e,r,{values:s,samples:a})}})})}}const it={factor:1.1,jitter:.5,max:3e4,min:1},at={disconnect:!0,info:{code:31003,message:"Connection with Twilio was interrupted.",twilioError:new f.ConnectionError}},st={packetsLostFraction:{max:"packet-loss",maxAverage:"packets-lost-fraction"}},lt={audioInputLevel:"audio-input-level",audioOutputLevel:"audio-output-level",bytesReceived:"bytes-received",bytesSent:"bytes-sent",jitter:"jitter",mos:"mos",rtt:"rtt"},ct={max:"high-",maxAverage:"high-",maxDuration:"constant-",min:"low-",minStandardDeviation:"constant-"};class dt extends i.EventEmitter{get direction(){return this._direction}get codec(){return this._codec}get connectToken(){const e=this._signalingReconnectToken,t=this.parameters&&this.parameters.CallSid?this.parameters.CallSid:void 0;if(!e||!t)return;const r=this.customParameters&&"function"==typeof this.customParameters.keys?Array.from(this.customParameters.keys()).reduce((e,t)=>(e[t]=this.customParameters.get(t),e),{}):{},n=this.parameters||{};return btoa(encodeURIComponent(JSON.stringify({customParameters:r,parameters:n,signalingReconnectToken:e})))}constructor(e,t){super(),this.parameters={},this._inputVolumeStreak=0,this._isAnswered=!1,this._isCancelled=!1,this._isRejected=!1,this._latestInputVolume=0,this._latestOutputVolume=0,this._log=new T("Call"),this._mediaStatus=dt.State.Pending,this._messages=new Map,this._metricsSamples=[],this._options={MediaHandler:Fe,MediaStream:null,enableImprovedSignalingErrorPrecision:!1,offerSdp:null,shouldPlayDisconnect:()=>!0,voiceEventSidGenerator:qe},this._outputVolumeStreak=0,this._shouldSendHangup=!0,this._signalingStatus=dt.State.Pending,this._soundcache=new Map,this._status=dt.State.Pending,this._wasConnected=!1,this.toString=()=>"[Twilio.Call instance]",this._emitWarning=(e,t,r,n,o,i)=>{const a=`${e}warning${o?"-cleared":"-raised"}`;if("constant-audio-input-level"===t&&this.isMuted())return;let s=o?"info":"warning";"constant-audio-output-level"===t&&(s="info");const l={threshold:r};if(n&&(n instanceof Array?l.values=n.map(e=>"number"==typeof e?Math.round(100*e)/100:n):l.value=n),this._publisher.post(s,a,t,{data:l},this),"constant-audio-output-level"!==t){const e=o?"warning-cleared":"warning";this._log.debug(`#${e}`,t),this.emit(e,t,i&&!o?i:null)}},this._onAck=e=>{const{acktype:t,callsid:r,voiceeventsid:n}=e;this.parameters.CallSid===r?"message"===t&&this._onMessageSent(n):this._log.warn(`Received ack from a different callsid: ${r}`)},this._onAnswer=e=>{"string"==typeof e.reconnect&&(this._signalingReconnectToken=e.reconnect),this._isAnswered&&this._status!==dt.State.Reconnecting||(this._setCallSid(e),this._isAnswered=!0,this._maybeTransitionToOpen())},this._onCancel=e=>{const t=e.callsid;this.parameters.CallSid===t&&(this._isCancelled=!0,this._publisher.info("connection","cancel",null,this),this._cleanupEventListeners(),this._mediaHandler.close(),this._status=dt.State.Closed,this._log.debug("#cancel"),this.emit("cancel"),this._pstream.removeListener("cancel",this._onCancel))},this._onConnected=()=>{this._log.info("Received connected from pstream"),this._signalingReconnectToken&&this._mediaHandler.version&&this._pstream.reconnect(this._mediaHandler.version.getSDP(),this.parameters.CallSid,this._signalingReconnectToken)},this._onHangup=e=>{if(this.status()!==dt.State.Closed){if(e.callsid&&(this.parameters.CallSid||this.outboundConnectionId)){if(e.callsid!==this.parameters.CallSid&&e.callsid!==this.outboundConnectionId)return}else if(e.callsid)return;if(this._log.info("Received HANGUP from gateway"),e.error){const t=e.error.code,r=b(this._options.enableImprovedSignalingErrorPrecision,t),n=void 0!==r?new r(e.error.message):new h.ConnectionError("Error sent from gateway in HANGUP",e.error);this._log.error("Received an error from the gateway:",n),this._log.debug("#error",n),this.emit("error",n)}this._shouldSendHangup=!1,this._publisher.info("connection","disconnected-by-remote",null,this),this._disconnect(null,!0),this._cleanupEventListeners()}},this._onMediaFailure=e=>{const{ConnectionDisconnected:t,ConnectionFailed:r,IceGatheringFailed:n,LowBytes:o}=dt.MediaFailure,i=e===r||e===n;if(!N(window,window.navigator)&&e===r)return this._mediaHandler.onerror(at);if(this._mediaStatus===dt.State.Reconnecting){if(i){if(Date.now()-this._mediaReconnectStartTime>it.max)return this._log.warn("Exceeded max ICE retries"),this._mediaHandler.onerror(at);try{this._mediaReconnectBackoff.backoff()}catch(e){if(!e.message||"Backoff in progress."!==e.message)throw e}}return}const a=this._mediaHandler.version.pc,s=a&&"disconnected"===a.iceConnectionState,l=this._monitor.hasActiveWarning("bytesSent","min")||this._monitor.hasActiveWarning("bytesReceived","min");if(e===o&&s||e===t&&l||i){const e=new f.ConnectionError("Media connection failed.");this._log.warn("ICE Connection disconnected."),this._publisher.warn("connection","error",e,this),this._publisher.info("connection","reconnecting",null,this),this._mediaReconnectStartTime=Date.now(),this._status=dt.State.Reconnecting,this._mediaStatus=dt.State.Reconnecting,this._mediaReconnectBackoff.reset(),this._mediaReconnectBackoff.backoff(),this._log.debug("#reconnecting"),this.emit("reconnecting",e)}},this._onMediaReconnected=()=>{this._mediaStatus===dt.State.Reconnecting&&(this._log.info("ICE Connection reestablished."),this._mediaStatus=dt.State.Open,this._signalingStatus===dt.State.Open&&(this._publisher.info("connection","reconnected",null,this),this._log.debug("#reconnected"),this.emit("reconnected"),this._status=dt.State.Open))},this._onMessageReceived=e=>{const{callsid:t,content:r,contenttype:n,messagetype:o,voiceeventsid:i}=e;if(this.parameters.CallSid!==t)return void this._log.warn(`Received a message from a different callsid: ${t}`);const a={content:r,contentType:n,messageType:o,voiceEventSid:i};this._publisher.info("call-message",o,{content_type:n,event_type:"received",voice_event_sid:i},this),this._log.debug("#messageReceived",JSON.stringify(a)),this.emit("messageReceived",a)},this._onMessageSent=e=>{if(!this._messages.has(e))return void this._log.warn(`Received a messageSent with a voiceEventSid that doesn't exists: ${e}`);const t=this._messages.get(e);this._messages.delete(e),this._publisher.info("call-message",null==t?void 0:t.messageType,{content_type:null==t?void 0:t.contentType,event_type:"sent",voice_event_sid:e},this),this._log.debug("#messageSent",JSON.stringify(t)),this.emit("messageSent",t)},this._onRinging=e=>{if(this._setCallSid(e),this._status!==dt.State.Connecting&&this._status!==dt.State.Ringing)return;const t=!!e.sdp;this._status=dt.State.Ringing,this._publisher.info("connection","outgoing-ringing",{hasEarlyMedia:t},this),this._log.debug("#ringing"),this.emit("ringing",t)},this._onRTCSample=e=>{const t=Object.assign(Object.assign({},e),{inputVolume:this._latestInputVolume,outputVolume:this._latestOutputVolume});this._codec=t.codecName,this._metricsSamples.push(t),this._metricsSamples.length>=10&&this._publishMetrics(),this.emit("sample",e)},this._onSignalingError=e=>{const{callsid:t,voiceeventsid:r,error:n}=e;if(this.parameters.CallSid===t){if(r&&this._messages.has(r)){let t;this._messages.delete(r),this._log.warn("Received an error while sending a message.",e),this._publisher.error("call-message","error",{code:n.code,message:n.message,voice_event_sid:r},this);const o=b(!!this._options.enableImprovedSignalingErrorPrecision,n.code);void 0!==o&&(t=new o(n)),t||(this._log.error("Unknown Call Message Error: ",n),t=new h.UnknownError(n.message,n)),this._log.debug("#error",n,t),this.emit("error",t)}}else this._log.warn(`Received an error from a different callsid: ${t}`)},this._onSignalingReconnected=()=>{this._signalingStatus===dt.State.Reconnecting&&(this._log.info("Signaling Connection reestablished."),this._signalingStatus=dt.State.Open,this._mediaStatus===dt.State.Open&&(this._publisher.info("connection","reconnected",null,this),this._log.debug("#reconnected"),this.emit("reconnected"),this._status=dt.State.Open))},this._onTransportClose=()=>{this._log.error("Received transportClose from pstream"),this._log.debug("#transportClose"),this.emit("transportClose"),this._signalingReconnectToken?(this._status=dt.State.Reconnecting,this._signalingStatus=dt.State.Reconnecting,this._publisher.info("connection","reconnecting",null,this),this._log.debug("#reconnecting"),this.emit("reconnecting",new A.ConnectionDisconnected)):(this._status=dt.State.Closed,this._signalingStatus=dt.State.Closed)},this._reemitWarning=(e,t)=>{const r=/^audio/.test(e.name)?"audio-level-":"network-quality-",n=ct[e.threshold.name];let o;e.name in st?o=st[e.name][e.threshold.name]:e.name in lt&&(o=lt[e.name]);const i=n+o;this._emitWarning(r,i,e.threshold.value,e.values||e.value,t,e)},this._reemitWarningCleared=e=>{this._reemitWarning(e,!0)},this._soundcache=e.soundcache,"function"==typeof e.onIgnore&&(this._onIgnore=e.onIgnore);const r=t&&t.twimlParams||{};this.customParameters=new Map(Object.entries(r).map(([e,t])=>[e,String(t)])),Object.assign(this._options,t),this._options.callParameters&&(this.parameters=this._options.callParameters),this._options.reconnectToken&&(this._signalingReconnectToken=this._options.reconnectToken),this._voiceEventSidGenerator=this._options.voiceEventSidGenerator||qe,this._direction=this.parameters.CallSid&&!this._options.reconnectCallSid?dt.CallDirection.Incoming:dt.CallDirection.Outgoing,this.parameters?this.callerInfo=this.parameters.StirStatus?{isVerified:"TN-Validation-Passed-A"===this.parameters.StirStatus}:null:this.callerInfo=null,this._mediaReconnectBackoff=new a(it),this._mediaReconnectBackoff.on("ready",()=>this._mediaHandler.iceRestart()),this.outboundConnectionId="TJSxxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)});const n=this._publisher=e.publisher;this._direction===dt.CallDirection.Incoming?n.info("connection","incoming",null,this):n.info("connection","outgoing",{preflight:this._options.preflight,reconnect:!!this._options.reconnectCallSid},this);const o=this._monitor=new(this._options.StatsMonitor||ot);o.on("sample",this._onRTCSample),o.disableWarnings(),setTimeout(()=>o.enableWarnings(),5e3),o.on("warning",(e,t)=>{"bytesSent"!==e.name&&"bytesReceived"!==e.name||this._onMediaFailure(dt.MediaFailure.LowBytes),this._reemitWarning(e,t)}),o.on("warning-cleared",e=>{this._reemitWarningCleared(e)}),this._mediaHandler=new this._options.MediaHandler(e.audioHelper,e.pstream,{MediaStream:this._options.MediaStream,RTCPeerConnection:this._options.RTCPeerConnection,codecPreferences:this._options.codecPreferences,dscp:this._options.dscp,forceAggressiveIceNomination:this._options.forceAggressiveIceNomination,maxAverageBitrate:this._options.maxAverageBitrate}),this.on("volume",(e,t)=>{this._inputVolumeStreak=this._checkVolume(e,this._inputVolumeStreak,this._latestInputVolume,"input"),this._outputVolumeStreak=this._checkVolume(t,this._outputVolumeStreak,this._latestOutputVolume,"output"),this._latestInputVolume=e,this._latestOutputVolume=t}),this._mediaHandler.onaudio=e=>{this._log.debug("#audio"),this.emit("audio",e)},this._mediaHandler.onvolume=(e,t,r,n)=>{o.addVolumes(r/255*32767,n/255*32767),this.emit("volume",e,t)},this._mediaHandler.ondtlstransportstatechange=e=>{const t="failed"===e?"error":"debug";this._publisher.post(t,"dtls-transport-state",e,null,this)},this._mediaHandler.onpcconnectionstatechange=e=>{let t="debug";const r=this._mediaHandler.getRTCDtlsTransport();"failed"===e&&(t=r&&"failed"===r.state?"error":"warning"),this._publisher.post(t,"pc-connection-state",e,null,this)},this._mediaHandler.onicecandidate=e=>{const t=new Ze(e).toPayload();this._publisher.debug("ice-candidate","ice-candidate",t,this)},this._mediaHandler.onselectedcandidatepairchange=e=>{const t=new Ze(e.local).toPayload(),r=new Ze(e.remote,!0).toPayload();this._publisher.debug("ice-candidate","selected-ice-candidate-pair",{local_candidate:t,remote_candidate:r},this)},this._mediaHandler.oniceconnectionstatechange=e=>{const t="failed"===e?"error":"debug";this._publisher.post(t,"ice-connection-state",e,null,this)},this._mediaHandler.onicegatheringfailure=e=>{this._publisher.warn("ice-gathering-state",e,null,this),this._onMediaFailure(dt.MediaFailure.IceGatheringFailed)},this._mediaHandler.onicegatheringstatechange=e=>{this._publisher.debug("ice-gathering-state",e,null,this)},this._mediaHandler.onsignalingstatechange=e=>{this._publisher.debug("signaling-state",e,null,this)},this._mediaHandler.ondisconnected=e=>{this._log.warn(e),this._publisher.warn("network-quality-warning-raised","ice-connectivity-lost",{message:e},this),this._log.debug("#warning","ice-connectivity-lost"),this.emit("warning","ice-connectivity-lost"),this._onMediaFailure(dt.MediaFailure.ConnectionDisconnected)},this._mediaHandler.onfailed=e=>{this._onMediaFailure(dt.MediaFailure.ConnectionFailed)},this._mediaHandler.onconnected=()=>{this._status===dt.State.Reconnecting&&this._onMediaReconnected()},this._mediaHandler.onreconnected=e=>{this._log.info(e),this._publisher.info("network-quality-warning-cleared","ice-connectivity-lost",{message:e},this),this._log.debug("#warning-cleared","ice-connectivity-lost"),this.emit("warning-cleared","ice-connectivity-lost"),this._onMediaReconnected()},this._mediaHandler.onerror=e=>{!0===e.disconnect&&this._disconnect(e.info&&e.info.message);const t=e.info.twilioError||new h.UnknownError(e.info.message);this._log.error("Received an error from MediaStream:",e),this._log.debug("#error",t),this.emit("error",t)},this._mediaHandler.onopen=()=>{this._status!==dt.State.Open&&this._status!==dt.State.Reconnecting&&(this._status===dt.State.Ringing||this._status===dt.State.Connecting?(this.mute(this._mediaHandler.isMuted),this._mediaStatus=dt.State.Open,this._maybeTransitionToOpen()):this._mediaHandler.close())},this._mediaHandler.onclose=()=>{this._status=dt.State.Closed,this._options.shouldPlayDisconnect&&this._options.shouldPlayDisconnect()&&!this._isCancelled&&!this._isRejected&&this._soundcache.get(Xe.SoundName.Disconnect).play(),o.disable(),this._publishMetrics(),this._isCancelled||this._isRejected||(this._log.debug("#disconnect"),this.emit("disconnect",this))},this._pstream=e.pstream,this._pstream.on("ack",this._onAck),this._pstream.on("cancel",this._onCancel),this._pstream.on("error",this._onSignalingError),this._pstream.on("ringing",this._onRinging),this._pstream.on("transportClose",this._onTransportClose),this._pstream.on("connected",this._onConnected),this._pstream.on("message",this._onMessageReceived),this.on("error",e=>{this._publisher.error("connection","error",{code:e.code,message:e.message},this),this._pstream&&"disconnected"===this._pstream.status&&this._cleanupEventListeners()}),this.on("disconnect",()=>{this._cleanupEventListeners()})}_setInputTracksFromStream(e){return this._mediaHandler.setInputTracksFromStream(e)}_setSinkIds(e){return this._mediaHandler._setSinkIds(e)}accept(e){if(this._log.debug(".accept",e),this._status!==dt.State.Pending)return void this._log.debug(`.accept noop. status is '${this._status}'`);const t=(e=e||{}).rtcConfiguration||this._options.rtcConfiguration,r=e.rtcConstraints||this._options.rtcConstraints||{},n={audio:void 0===r.audio||r.audio};this._status=dt.State.Connecting;const o=()=>{if(this._status!==dt.State.Connecting)return this._cleanupEventListeners(),void this._mediaHandler.close();const e=e=>{const t=this._direction===dt.CallDirection.Incoming?"accepted-by-local":"accepted-by-remote";this._publisher.info("connection",t,null,this);const{codecName:r,codecParams:n}=function(e){const[,t,r]=/a=rtpmap:(\d+) (\S+)/m.exec(e)||[null,"",""],n=new RegExp(`a=fmtp:${t} (\\S+)`,"m"),[,o]=n.exec(e)||[null,""];return{codecName:r,codecParams:o}}(this._mediaHandler.version.getSDP());this._publisher.info("settings","codec",{codec_params:n,selected_codec:r},this),this._monitor.enable(e)},r="function"==typeof this._options.getSinkIds&&this._options.getSinkIds();if(Array.isArray(r)&&this._mediaHandler._setSinkIds(r).catch(()=>{}),this._pstream.addListener("hangup",this._onHangup),this._direction===dt.CallDirection.Incoming)this._isAnswered=!0,this._pstream.on("answer",this._onAnswer),this._mediaHandler.answerIncomingCall(this.parameters.CallSid,this._options.offerSdp,t,e);else{const r=Array.from(this.customParameters.entries()).map(e=>`${encodeURIComponent(e[0])}=${encodeURIComponent(e[1])}`).join("&");this._pstream.on("answer",this._onAnswer),this._mediaHandler.makeOutgoingCall(r,this._signalingReconnectToken,this._options.reconnectCallSid||this.outboundConnectionId,t,e)}};this._options.beforeAccept&&this._options.beforeAccept(this);const i="function"==typeof this._options.getInputStream&&this._options.getInputStream();(i?this._mediaHandler.setInputTracksFromStream(i):this._mediaHandler.openDefaultDeviceWithConstraints(n)).then(()=>{this._publisher.info("get-user-media","succeeded",{data:{audioConstraints:n}},this),o()},e=>{let t;31208===e.code||-1!==["PermissionDeniedError","NotAllowedError"].indexOf(e.name)?(t=new g.PermissionDeniedError,this._publisher.error("get-user-media","denied",{data:{audioConstraints:n,error:e}},this)):(t=new g.AcquisitionFailedError,this._publisher.error("get-user-media","failed",{data:{audioConstraints:n,error:e}},this)),this._disconnect(),this._log.debug("#error",e),this.emit("error",t)})}disconnect(){this._log.debug(".disconnect"),this._disconnect()}getLocalStream(){return this._mediaHandler&&this._mediaHandler.stream}getRemoteStream(){return this._mediaHandler&&this._mediaHandler._remoteStream}ignore(){this._log.debug(".ignore"),this._status===dt.State.Pending?(this._status=dt.State.Closed,this._mediaHandler.ignore(this.parameters.CallSid),this._publisher.info("connection","ignored-by-local",null,this),this._onIgnore&&this._onIgnore()):this._log.debug(`.ignore noop. status is '${this._status}'`)}isMuted(){return this._mediaHandler.isMuted}mute(e=!0){this._log.debug(".mute",e);const t=this._mediaHandler.isMuted;this._mediaHandler.mute(e);const r=this._mediaHandler.isMuted;t!==r&&(this._publisher.info("connection",r?"muted":"unmuted",null,this),this._log.debug("#mute",r),this.emit("mute",r,this))}postFeedback(e,t){if(null==e)return this._postFeedbackDeclined();if(!Object.values(dt.FeedbackScore).includes(e))throw new y(`Feedback score must be one of: ${Object.values(dt.FeedbackScore)}`);if(null!=t&&!Object.values(dt.FeedbackIssue).includes(t))throw new y(`Feedback issue must be one of: ${Object.values(dt.FeedbackIssue)}`);return this._publisher.info("feedback","received",{issue_name:t,quality_score:e},this,!0)}reject(){this._log.debug(".reject"),this._status===dt.State.Pending?(this._isRejected=!0,this._pstream.reject(this.parameters.CallSid),this._mediaHandler.reject(this.parameters.CallSid),this._publisher.info("connection","rejected-by-local",null,this),this._cleanupEventListeners(),this._mediaHandler.close(),this._status=dt.State.Closed,this._log.debug("#reject"),this.emit("reject")):this._log.debug(`.reject noop. status is '${this._status}'`)}sendDigits(e){if(this._log.debug(".sendDigits",e),e.match(/[^0-9*#w]/))throw new y("Illegal character passed into sendDigits");const t=this._options.customSounds||{},r=[];e.split("").forEach(e=>{let t="w"!==e?`dtmf${e}`:"";"dtmf*"===t&&(t="dtmfs"),"dtmf#"===t&&(t="dtmfh"),r.push(t)});const n=()=>{const e=r.shift();e&&(this._options.dialtonePlayer&&!t[e]?this._options.dialtonePlayer.play(e):this._soundcache.get(e).play()),r.length&&setTimeout(()=>n(),200)};n();const o=this._mediaHandler.getOrCreateDTMFSender();if(o){if(!("canInsertDTMF"in o)||o.canInsertDTMF)return this._log.info("Sending digits using RTCDTMFSender"),void function e(t){if(!t.length)return;const r=t.shift();r&&r.length&&o.insertDTMF(r,160,70),setTimeout(e.bind(null,t),500)}(e.split("w"));this._log.info("RTCDTMFSender cannot insert DTMF")}if(this._log.info("Sending digits over PStream"),null!==this._pstream&&"disconnected"!==this._pstream.status)this._pstream.dtmf(this.parameters.CallSid,e);else{const e=new h.ConnectionError("Could not send DTMF: Signaling channel is disconnected");this._log.debug("#error",e),this.emit("error",e)}}sendMessage(e){this._log.debug(".sendMessage",JSON.stringify(e));const{content:t,contentType:r,messageType:n}=e;if(null==t)throw new y("`content` is empty");if("string"!=typeof n)throw new y("`messageType` must be a string.");if(0===n.length)throw new y("`messageType` must be a non-empty string.");if(null===this._pstream)throw new k("Could not send CallMessage; Signaling channel is disconnected");const o=this.parameters.CallSid;if(void 0===this.parameters.CallSid)throw new k("Could not send CallMessage; Call has no CallSid");const i=this._voiceEventSidGenerator();return this._messages.set(i,{content:t,contentType:r,messageType:n,voiceEventSid:i}),this._pstream.sendMessage(o,t,r,n,i),i}status(){return this._status}_checkVolume(e,t,r,n){const o=t>=10;let i=0;return r===e&&(i=t),i>=10?this._emitWarning("audio-level-",`constant-audio-${n}-level`,10,i,!1):o&&this._emitWarning("audio-level-",`constant-audio-${n}-level`,10,i,!0),i}_cleanupEventListeners(){const e=()=>{this._pstream&&(this._pstream.removeListener("ack",this._onAck),this._pstream.removeListener("answer",this._onAnswer),this._pstream.removeListener("cancel",this._onCancel),this._pstream.removeListener("error",this._onSignalingError),this._pstream.removeListener("hangup",this._onHangup),this._pstream.removeListener("ringing",this._onRinging),this._pstream.removeListener("transportClose",this._onTransportClose),this._pstream.removeListener("connected",this._onConnected),this._pstream.removeListener("message",this._onMessageReceived))};e(),setTimeout(e,0)}_createMetricPayload(){const e={call_sid:this.parameters.CallSid,dscp:!!this._options.dscp,sdk_version:S};return this._options.gateway&&(e.gateway=this._options.gateway),e.direction=this._direction,e}_disconnect(e,t){if(e="string"==typeof e?e:null,this._status===dt.State.Open||this._status===dt.State.Connecting||this._status===dt.State.Reconnecting||this._status===dt.State.Ringing){if(this._log.info("Disconnecting..."),null!==this._pstream&&"disconnected"!==this._pstream.status&&this._shouldSendHangup){const t=this.parameters.CallSid||this.outboundConnectionId;t&&this._pstream.hangup(t,e)}this._cleanupEventListeners(),this._mediaHandler.close(),t||this._publisher.info("connection","disconnected-by-local",null,this)}}_maybeTransitionToOpen(){this._wasConnected,this._isAnswered&&(this._onSignalingReconnected(),this._signalingStatus=dt.State.Open,this._mediaHandler&&"open"===this._mediaHandler.status&&(this._status=dt.State.Open,this._wasConnected||(this._wasConnected=!0,this._log.debug("#accept"),this.emit("accept",this))))}_postFeedbackDeclined(){return this._publisher.info("feedback","received-none",null,this,!0)}_publishMetrics(){0!==this._metricsSamples.length&&this._publisher.postMetrics("quality-metrics-samples","metrics-sample",this._metricsSamples.splice(0),this._createMetricPayload(),this).catch(e=>{this._log.warn("Unable to post metrics to Insights. Received error:",e)})}_setCallSid(e){const t=e.callsid;t&&(this.parameters.CallSid=t,this._mediaHandler.callSid=t)}}dt.toString=()=>"[Twilio.Call class]",function(e){var t,r,n,o,i,a,s;(t=e.State||(e.State={})).Closed="closed",t.Connecting="connecting",t.Open="open",t.Pending="pending",t.Reconnecting="reconnecting",t.Ringing="ringing",(r=e.FeedbackIssue||(e.FeedbackIssue={})).AudioLatency="audio-latency",r.ChoppyAudio="choppy-audio",r.DroppedCall="dropped-call",r.Echo="echo",r.NoisyCall="noisy-call",r.OneWayAudio="one-way-audio",(n=e.FeedbackScore||(e.FeedbackScore={}))[n.One=1]="One",n[n.Two=2]="Two",n[n.Three=3]="Three",n[n.Four=4]="Four",n[n.Five=5]="Five",(o=e.CallDirection||(e.CallDirection={})).Incoming="INCOMING",o.Outgoing="OUTGOING",(i=e.Codec||(e.Codec={})).Opus="opus",i.PCMU="pcmu",(a=e.IceGatheringFailureReason||(e.IceGatheringFailureReason={})).None="none",a.Timeout="timeout",(s=e.MediaFailure||(e.MediaFailure={})).ConnectionDisconnected="ConnectionDisconnected",s.ConnectionFailed="ConnectionFailed",s.IceGatheringFailed="IceGatheringFailed",s.LowBytes="LowBytes"}(dt||(dt={}));var ut=r(7810),ht=r(4140),pt=r(4922);function gt({title:e,titleId:t,...r},n){return ut.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?ut.createElement("title",{id:t},e):null,ut.createElement("path",{d:"M8.25 4.5a3.75 3.75 0 1 1 7.5 0v8.25a3.75 3.75 0 1 1-7.5 0V4.5Z"}),ut.createElement("path",{d:"M6 10.5a.75.75 0 0 1 .75.75v1.5a5.25 5.25 0 1 0 10.5 0v-1.5a.75.75 0 0 1 1.5 0v1.5a6.751 6.751 0 0 1-6 6.709v2.291h3a.75.75 0 0 1 0 1.5h-7.5a.75.75 0 0 1 0-1.5h3v-2.291a6.751 6.751 0 0 1-6-6.709v-1.5A.75.75 0 0 1 6 10.5Z"}))}var At=ut.forwardRef(gt);function ft({title:e,titleId:t,...r},n){return ut.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?ut.createElement("title",{id:t},e):null,ut.createElement("path",{fillRule:"evenodd",d:"M15.22 3.22a.75.75 0 0 1 1.06 0L18 4.94l1.72-1.72a.75.75 0 1 1 1.06 1.06L19.06 6l1.72 1.72a.75.75 0 0 1-1.06 1.06L18 7.06l-1.72 1.72a.75.75 0 1 1-1.06-1.06L16.94 6l-1.72-1.72a.75.75 0 0 1 0-1.06ZM1.5 4.5a3 3 0 0 1 3-3h1.372c.86 0 1.61.586 1.819 1.42l1.105 4.423a1.875 1.875 0 0 1-.694 1.955l-1.293.97c-.135.101-.164.249-.126.352a11.285 11.285 0 0 0 6.697 6.697c.103.038.25.009.352-.126l.97-1.293a1.875 1.875 0 0 1 1.955-.694l4.423 1.105c.834.209 1.42.959 1.42 1.82V19.5a3 3 0 0 1-3 3h-2.25C8.552 22.5 1.5 15.448 1.5 6.75V4.5Z",clipRule:"evenodd"}))}var mt=ut.forwardRef(ft);r(3121),Object.create(null);const vt={},Ct=(e,t,r,n)=>{kt(r)&&vt[r]||(kt(r)&&(vt[r]=new Date),((e,t,r,n)=>{const o=[r,{code:t,...n||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(o,"warn","react-i18next::",!0);kt(o[0])&&(o[0]=`react-i18next:: ${o[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...o):console?.warn&&console.warn(...o)})(e,t,r,n))},wt=(e,t)=>()=>{if(e.isInitialized)t();else{const r=()=>{setTimeout(()=>{e.off("initialized",r)},0),t()};e.on("initialized",r)}},bt=(e,t,r)=>{e.loadNamespaces(t,wt(e,r))},yt=(e,t,r,n)=>{if(kt(r)&&(r=[r]),e.options.preload&&e.options.preload.indexOf(t)>-1)return bt(e,r,n);r.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,wt(e,n))},kt=e=>"string"==typeof e,xt=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,_t={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},St=e=>_t[e];let Bt,Et={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(xt,St)};const Tt={type:"3rdParty",init(e){((e={})=>{Et={...Et,...e}})(e.options.react),(e=>{Bt=e})(e)}},Pt=(0,ut.createContext)();class It{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Dt=(e,t,r,n)=>e.getFixedT(t,r,n),Ot=(e,t={})=>{const{i18n:r}=t,{i18n:n,defaultNS:o}=(0,ut.useContext)(Pt)||{},i=r||n||Bt;if(i&&!i.reportNamespaces&&(i.reportNamespaces=new It),!i){Ct(i,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const e=(e,t)=>{return kt(t)?t:"object"==typeof(r=t)&&null!==r&&kt(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e;var r},t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}i.options.react?.wait&&Ct(i,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...Et,...i.options.react,...t},{useSuspense:s,keyPrefix:l}=a;let c=e||o||i.options?.defaultNS;c=kt(c)?[c]:c||["translation"],i.reportNamespaces.addUsedNamespaces?.(c);const d=(i.isInitialized||i.initializedStoreOnce)&&c.every(e=>((e,t,r={})=>t.languages&&t.languages.length?t.hasLoadedNamespace(e,{lng:r.lng,precheck:(t,n)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!n(t.isLanguageChangingTo,e))return!1}}):(Ct(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0))(e,i,a)),u=((e,t,r,n)=>(0,ut.useCallback)(Dt(e,t,r,n),[e,t,r,n]))(i,t.lng||null,"fallback"===a.nsMode?c:c[0],l),h=()=>u,p=()=>Dt(i,t.lng||null,"fallback"===a.nsMode?c:c[0],l),[g,A]=(0,ut.useState)(h);let f=c.join();t.lng&&(f=`${t.lng}${f}`);const m=((e,t)=>{const r=(0,ut.useRef)();return(0,ut.useEffect)(()=>{r.current=e},[e,t]),r.current})(f),v=(0,ut.useRef)(!0);(0,ut.useEffect)(()=>{const{bindI18n:e,bindI18nStore:r}=a;v.current=!0,d||s||(t.lng?yt(i,t.lng,c,()=>{v.current&&A(p)}):bt(i,c,()=>{v.current&&A(p)})),d&&m&&m!==f&&v.current&&A(p);const n=()=>{v.current&&A(p)};return e&&i?.on(e,n),r&&i?.store.on(r,n),()=>{v.current=!1,i&&e&&e?.split(" ").forEach(e=>i.off(e,n)),r&&i&&r.split(" ").forEach(e=>i.store.off(e,n))}},[i,f]),(0,ut.useEffect)(()=>{v.current&&d&&A(h)},[i,l,d]);const C=[g,i,d];if(C.t=g,C.i18n=i,C.ready=d,d)return C;if(!d&&!s)return C;throw new Promise(e=>{t.lng?yt(i,t.lng,c,()=>e()):bt(i,c,()=>e())})},Rt=e=>{const t="number"==typeof e?e:0,r=Number.isFinite(t)?Math.max(0,Math.floor(t)):0,n=Math.floor(r/60),o=r%60;return`${String(n).padStart(2,"0")}:${String(o).padStart(2,"0")}`},Lt=({audioLevel:e,isMuted:t=!1})=>{const r=(0,ut.useRef)(0),[n,o]=(0,ut.useState)(0);(0,ut.useEffect)(()=>{const t=5*e*.3+.7*r.current;(Math.abs(t-r.current)>.02||e<.005)&&(r.current=t,o(t))},[e]);const i=Math.min(1,Math.max(0,n)),a=n>.03;return(0,pt.jsx)("div",{className:"flex h-9 w-9 items-center justify-center gap-[2px]",children:[.4,.7,1,.7,.4].map((e,r)=>{const n=a?Math.max(.25,Math.min(.95,.25+i*e*.7)):.15;return(0,pt.jsx)("span",{className:"h-5 w-[2px] origin-center rounded-full transition-transform duration-150 "+(t?"bg-slate-400":"bg-emerald-500"),style:{transform:`scaleY(${n})`,opacity:a?.7+.3*i:.4}},r)})})},Mt=()=>(0,pt.jsx)("svg",{className:"h-[18px] w-[18px]",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,pt.jsx)("path",{d:"M20.01 15.38c-1.23 0-2.42-.2-3.53-.56-.35-.12-.74-.03-1.01.24l-1.57 1.97c-2.83-1.35-5.48-3.9-6.89-6.83l1.95-1.66c.27-.28.35-.67.24-1.02-.37-1.11-.56-2.3-.56-3.53 0-.54-.45-.99-.99-.99H4.19C3.65 3 3 3.24 3 3.99 3 13.28 10.73 21 20.01 21c.71 0 .99-.63.99-1.18v-3.45c0-.54-.45-.99-.99-.99z"})}),Nt=()=>(0,pt.jsx)("svg",{className:"h-[18px] w-[18px]",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,xmlns:"http://www.w3.org/2000/svg",children:(0,pt.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),Ut=()=>(0,pt.jsxs)("div",{className:"relative h-5 w-5",children:[(0,pt.jsx)(At,{className:"h-5 w-5"}),(0,pt.jsx)("svg",{className:"absolute inset-0 h-5 w-5",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,pt.jsx)("path",{d:"M3 3L17 17",stroke:"currentColor",strokeWidth:2.5,strokeLinecap:"round"})})]}),jt=()=>(0,pt.jsxs)("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,pt.jsx)("circle",{cx:"6",cy:"5",r:"1.5"}),(0,pt.jsx)("circle",{cx:"12",cy:"5",r:"1.5"}),(0,pt.jsx)("circle",{cx:"18",cy:"5",r:"1.5"}),(0,pt.jsx)("circle",{cx:"6",cy:"10",r:"1.5"}),(0,pt.jsx)("circle",{cx:"12",cy:"10",r:"1.5"}),(0,pt.jsx)("circle",{cx:"18",cy:"10",r:"1.5"}),(0,pt.jsx)("circle",{cx:"6",cy:"15",r:"1.5"}),(0,pt.jsx)("circle",{cx:"12",cy:"15",r:"1.5"}),(0,pt.jsx)("circle",{cx:"18",cy:"15",r:"1.5"}),(0,pt.jsx)("circle",{cx:"12",cy:"20",r:"1.5"})]}),Ft=[["1","2","3"],["4","5","6"],["7","8","9"],["*","0","#"]],$t=({onSendDigits:e})=>{const{t:t}=Ot(),[r,n]=(0,ut.useState)(null);return(0,pt.jsx)("div",{className:"grid grid-cols-3 gap-2 rounded-xl border border-slate-200/80 bg-white/90 p-3 shadow-sm backdrop-blur-md dark:border-slate-700/50 dark:bg-slate-900/80",role:"group","aria-label":t("audio_widget.dtmf.label"),children:Ft.flat().map(t=>(0,pt.jsx)("button",{type:"button",onClick:()=>(t=>{e(t),n(t),setTimeout(()=>n(null),150)})(t),className:"flex h-11 w-11 items-center justify-center rounded-lg text-base font-semibold transition-all duration-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sky-400 focus-visible:ring-offset-1 active:scale-95 "+(r===t?"bg-sky-100 text-sky-700 dark:bg-sky-500/20 dark:text-sky-300":"bg-slate-100 text-slate-700 hover:bg-slate-200 dark:bg-slate-700/50 dark:text-slate-200 dark:hover:bg-slate-700"),"aria-label":t,children:t},t))})},zt=({onStartCall:e,onEndCall:t,onToggleMute:r,isMuted:n,onSendDigits:o,onEvent:i})=>{const{t:a}=Ot(),[s,l]=(0,ut.useState)("idle"),[c,d]=(0,ut.useState)(""),[u,h]=(0,ut.useState)(""),[p,g]=(0,ut.useState)(0),[A,f]=(0,ut.useState)(!1),[m,v]=(0,ut.useState)(!1),[C,w]=(0,ut.useState)(0),[b,y]=(0,ut.useState)(!1),[k,x]=(0,ut.useState)(!1),_=(0,ut.useRef)(null),S=(0,ut.useRef)(null),B=(0,ut.useRef)(null),E=(0,ut.useRef)(null),T=(0,ut.useRef)(null);(0,ut.useEffect)(()=>("connected"===s&&E.current?T.current=window.setInterval(()=>{E.current&&w(Math.floor((Date.now()-E.current)/1e3))},1e3):T.current&&(clearInterval(T.current),T.current=null),()=>{T.current&&clearInterval(T.current)}),[s]),(0,ut.useEffect)(()=>{const e=i("any",({state:e,message:t,data:r})=>{switch(e){case"audio-level":{const e=null!=r?r:t;let n;n="number"==typeof e?e:"string"==typeof e?parseFloat(e):Number(e),Number.isNaN(n)||g(Math.max(0,n));break}case"warning":t&&(h(t),_.current&&clearTimeout(_.current),_.current=window.setTimeout(()=>{h(""),_.current=null},5e3));break;case"warning-cleared":h(""),_.current&&(clearTimeout(_.current),_.current=null);break;case"remote-audio":S.current&&(clearTimeout(S.current),S.current=null),B.current&&(clearTimeout(B.current),B.current=null),f(!1),v(!1);break;case"error":l("error"),d(t||a("audio_widget.errors.generic")),f(!1),v(!1),w(0),E.current=null,B.current&&(clearTimeout(B.current),B.current=null),setTimeout(()=>{l("idle"),d("")},3e3)}});return()=>{e(),_.current&&clearTimeout(_.current)}},[i,a]),(0,ut.useEffect)(()=>"connected"!==s?(S.current&&(clearTimeout(S.current),S.current=null),B.current&&(clearTimeout(B.current),B.current=null),void queueMicrotask(()=>{A&&f(!1),m&&v(!1)})):p>.04?(queueMicrotask(()=>{m||v(!0),A&&f(!1)}),S.current&&(clearTimeout(S.current),S.current=null),void(B.current&&(clearTimeout(B.current),B.current=null))):void(!m||A||S.current||(S.current=window.setTimeout(()=>{f(!0),S.current=null},1400))),[p,s,m,A]),(0,ut.useEffect)(()=>()=>{S.current&&clearTimeout(S.current),B.current&&clearTimeout(B.current)},[]),(0,ut.useEffect)(()=>{A?(B.current&&clearTimeout(B.current),B.current=window.setTimeout(()=>{f(!1),v(!1),B.current=null},4e3)):B.current&&(clearTimeout(B.current),B.current=null)},[A]);const P="connecting"===s,I="error"===s?"bg-rose-50/80 text-rose-600 border border-rose-200/60 shadow-[0_2px_8px_rgba(244,63,94,0.12)] dark:bg-rose-500/15 dark:text-rose-300 dark:border-rose-500/30":"connected"===s?"bg-emerald-50/80 text-emerald-600 border border-emerald-200/60 shadow-[0_2px_8px_rgba(16,185,129,0.15)] hover:bg-gradient-to-br hover:from-red-500 hover:to-red-600 hover:text-white hover:border-red-500/20 hover:shadow-[0_6px_20px_rgba(239,68,68,0.35)] dark:bg-emerald-500/15 dark:text-emerald-300 dark:border-emerald-500/30 dark:hover:from-red-600 dark:hover:to-red-700 transition-colors":"connecting"===s?"bg-sky-50/80 text-sky-600 border border-sky-200/60 shadow-[0_2px_8px_rgba(14,165,233,0.12)] dark:bg-sky-500/15 dark:text-sky-300 dark:border-sky-500/30":"bg-gradient-to-br from-emerald-500 to-emerald-600 text-white border border-emerald-500/20 shadow-[0_4px_14px_rgba(16,185,129,0.25)] hover:shadow-[0_6px_20px_rgba(16,185,129,0.35)] dark:from-emerald-600 dark:to-emerald-700 dark:border-emerald-500/30",D="error"===s?"border-t-rose-400/60 border-r-rose-300/30 border-b-transparent border-l-transparent":A?"border-t-sky-400/60 border-r-sky-300/30 border-b-transparent border-l-transparent":"border-t-sky-500/60 border-r-sky-400/30 border-b-transparent border-l-transparent",O=a("idle"===s?"audio_widget.status.ready":"connecting"===s?"audio_widget.status.connecting":"connected"===s?A?"audio_widget.status.thinking":"audio_widget.status.on_call":"audio_widget.status.error"),R="error"===s?"text-rose-500 dark:text-rose-400":"connected"===s?"text-emerald-500 dark:text-emerald-400":"connecting"===s?"text-sky-500 dark:text-sky-400":"text-slate-500 dark:text-slate-400",L=a("idle"===s||"error"===s?"audio_widget.actions.start":"connecting"===s?"audio_widget.actions.cancel":"audio_widget.actions.end"),M="idle"===s?a("audio_widget.sr.ready"):"connecting"===s?a("audio_widget.sr.connecting"):"connected"===s?a(A?"audio_widget.sr.connected_thinking":"audio_widget.sr.connected"):c?a("audio_widget.sr.error_with_message",{message:c}):a("audio_widget.sr.error");return(0,pt.jsxs)("div",{className:"relative font-sans text-slate-800 antialiased dark:text-slate-100",children:[u&&(0,pt.jsx)("div",{className:"absolute -top-14 left-1/2 w-max max-w-[18rem] -translate-x-1/2 rounded-full bg-amber-100/90 px-4 py-2 text-xs font-medium text-amber-800 shadow-lg shadow-amber-200/70 ring-1 ring-amber-300 backdrop-blur dark:bg-amber-500/15 dark:text-amber-200 dark:ring-amber-400/40",role:"status","aria-live":"polite",children:u}),(0,pt.jsxs)("div",{className:"inline-flex min-w-[260px] items-center gap-3 rounded-2xl border border-slate-200/80 bg-white/90 px-5 py-3.5 shadow-sm backdrop-blur-md backdrop-saturate-150 transition-all duration-200 hover:shadow-md dark:border-slate-700/50 dark:bg-slate-900/80 dark:shadow-xl dark:shadow-slate-950/30",children:[(0,pt.jsxs)("button",{type:"button",onClick:()=>{"idle"!==s&&"error"!==s?(S.current&&(clearTimeout(S.current),S.current=null),T.current&&(clearInterval(T.current),T.current=null),t(),l("idle"),g(0),f(!1),v(!1),w(0),y(!1),x(!1),E.current=null,B.current&&(clearTimeout(B.current),B.current=null)):(async()=>{try{l("connecting"),d(""),g(0),f(!1),v(!1),w(0),E.current=null,await e(),l("connected"),E.current=Date.now(),w(0)}catch(e){l("error"),f(!1),v(!1),d(e instanceof Error?e.message:a("audio_widget.errors.start_failed")),w(0),E.current=null}})()},className:`group relative flex h-12 w-12 shrink-0 items-center justify-center rounded-full transition-all duration-200 hover:scale-[1.05] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sky-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white active:scale-[0.98] dark:focus-visible:ring-offset-slate-950 ${I}`,"aria-label":L,title:"error"===s&&c?c:O,children:[(0,pt.jsx)("span",{className:"sr-only",children:M}),"connected"===s?(0,pt.jsxs)(pt.Fragment,{children:[(0,pt.jsx)("div",{className:"absolute inset-0 flex items-center justify-center transition-opacity duration-200 group-hover:opacity-0",children:(0,pt.jsx)(Lt,{audioLevel:p,isMuted:b})}),(0,pt.jsx)("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 transition-opacity duration-200 group-hover:opacity-100",children:(0,pt.jsx)(mt,{className:"h-5 w-5"})})]}):"error"===s?(0,pt.jsx)(Nt,{}):(0,pt.jsx)(Mt,{}),P?(0,pt.jsx)("span",{className:`pointer-events-none absolute inset-[-4px] rounded-full border border-transparent ${D} animate-spin`}):null]}),"connected"===s&&(0,pt.jsx)("button",{type:"button",onClick:()=>{r(),y(n())},className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-full transition-all duration-200 hover:scale-105 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 active:scale-95 "+(b?"bg-amber-100 text-amber-700 hover:bg-amber-200 focus-visible:ring-amber-400 dark:bg-amber-500/20 dark:text-amber-300 dark:hover:bg-amber-500/30":"bg-slate-100 text-slate-600 hover:bg-slate-200 focus-visible:ring-slate-400 dark:bg-slate-700/50 dark:text-slate-300 dark:hover:bg-slate-700"),"aria-label":a(b?"audio_widget.mute.unmute_microphone":"audio_widget.mute.mute_microphone"),title:a(b?"audio_widget.mute.unmute":"audio_widget.mute.mute"),children:b?(0,pt.jsx)(Ut,{}):(0,pt.jsx)(At,{className:"h-5 w-5"})}),"connected"===s&&(0,pt.jsxs)("div",{className:"relative shrink-0",children:[(0,pt.jsx)("button",{type:"button",onClick:()=>x(e=>!e),className:"flex h-12 w-12 items-center justify-center rounded-full transition-all duration-200 hover:scale-105 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 active:scale-95 "+(k?"bg-sky-100 text-sky-700 hover:bg-sky-200 focus-visible:ring-sky-400 dark:bg-sky-500/20 dark:text-sky-300 dark:hover:bg-sky-500/30":"bg-slate-100 text-slate-600 hover:bg-slate-200 focus-visible:ring-slate-400 dark:bg-slate-700/50 dark:text-slate-300 dark:hover:bg-slate-700"),"aria-label":a("audio_widget.dtmf.toggle"),title:a("audio_widget.dtmf.toggle"),"aria-expanded":k,children:(0,pt.jsx)(jt,{})}),k&&(0,pt.jsx)("div",{className:"absolute bottom-full left-1/2 mb-5 w-max -translate-x-1/2",children:(0,pt.jsx)($t,{onSendDigits:o})})]}),(0,pt.jsxs)("div",{className:"relative flex flex-col gap-1 overflow-hidden leading-tight",children:[(0,pt.jsx)("span",{className:`relative z-10 text-[0.65rem] font-medium uppercase tracking-[0.25em] ${R} transition-colors duration-200`,children:O}),"connected"===s&&(0,pt.jsx)("span",{className:"animate-in fade-in slide-in-from-bottom-1 relative z-10 font-mono text-[0.8rem] text-slate-600 transition-all duration-500 dark:text-slate-400",children:Rt(C)})]})]})]})};var Wt;!function(e){e.AUDIO_LEVEL="audio-level",e.WARNING="warning",e.WARNING_CLEARED="warning-cleared",e.REMOTE_AUDIO="remote-audio",e.ERROR="error"}(Wt||(Wt={}));const qt={"high-rtt":"High network latency detected","low-mos":"Poor call quality detected","high-jitter":"Network instability detected","high-packet-loss":"Packet loss detected","constant-audio-input-level":"Microphone may be muted","constant-audio-output-level":"Remote audio unchanged"};class Vt{constructor(e,t){this.analyserNode=null,this.localAudioSource=null,this.audioLevelAnimationId=null,this.audioLevelContext=null,this.onLevelUpdate=e,this.log=t}start(e){try{this.audioLevelContext=new AudioContext,this.localAudioSource=this.audioLevelContext.createMediaStreamSource(e),this.analyserNode=this.audioLevelContext.createAnalyser(),this.analyserNode.fftSize=256,this.analyserNode.smoothingTimeConstant=.3,this.localAudioSource.connect(this.analyserNode);const t=new Float32Array(this.analyserNode.fftSize),r=()=>{if(!this.analyserNode)return void this.stop();this.analyserNode.getFloatTimeDomainData(t);let e=0;for(const r of t)e+=r*r;const n=Math.sqrt(e/t.length),o=Math.min(1,10*n),i=o>.01?o:0;this.onLevelUpdate(i.toFixed(3)),this.audioLevelAnimationId=requestAnimationFrame(r)};r()}catch(e){const t=e instanceof Error?e.message:"Unknown error";this.log(`Failed to start audio level monitoring: ${t}`,e)}}stop(){if(null!==this.audioLevelAnimationId&&(cancelAnimationFrame(this.audioLevelAnimationId),this.audioLevelAnimationId=null),this.localAudioSource){try{this.localAudioSource.disconnect()}catch(e){const t=e instanceof Error?e.message:"Unknown error";this.log(`Error disconnecting audio source: ${t}`,e)}this.localAudioSource=null}this.audioLevelContext&&(this.audioLevelContext.close().catch(e=>{const t=e instanceof Error?e.message:"Unknown error";this.log(`Error closing audio level context: ${t}`,e)}),this.audioLevelContext=null),this.analyserNode=null,this.onLevelUpdate("0")}}class Ht{constructor(e){this.twilioDevice=null,this.activeCall=null,this.iceServers=[],this.widgetContainer=null,this.widgetRoot=null,this.audioMonitor=null,this.eventListeners=new Map,this.config={host:e.host||"https://channels.moveo.ai",integrationId:e.integrationId},this.log=o()(`moveo:audio:controller:${e.integrationId}`)}async init(){return await this.validateIntegration(),this.createWidgetContainer(),this.renderWidget(),this.log("AudioController initialized"),this}async validateIntegration(){const e=`${this.config.host}/v1/twiliovoice/${encodeURIComponent(this.config.integrationId)}`;try{const t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}});if(t.ok)return void this.log("Integration validated using twiliovoice endpoint");if(404===t.status){this.log("Twiliovoice endpoint not found, trying legacy web endpoint");const e=`${this.config.host}/v1/web/${encodeURIComponent(this.config.integrationId)}`,t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}});if(t.ok)return void this.log("Integration validated using legacy web endpoint (backward compatibility)");if(404===t.status)throw new Error(`Integration ID "${this.config.integrationId}" was not found.`);throw new Error(`Unable to validate integration (status ${t.status} ${t.statusText}).`)}throw new Error(`Unable to validate integration (status ${t.status} ${t.statusText}).`)}catch(e){if(e instanceof Error){if(e.message.includes("Integration ID")||e.message.includes("Unable to validate"))throw e;throw new Error(`Failed to validate integration "${this.config.integrationId}": ${e.message}`)}throw new Error(`Failed to validate integration "${this.config.integrationId}": Unknown error`)}}createWidgetContainer(){this.widgetContainer=document.createElement("div"),this.widgetContainer.id="moveo-audio-widget",this.widgetContainer.style.position="fixed",this.widgetContainer.style.zIndex="2147483647",this.widgetContainer.style.bottom="20px",this.widgetContainer.style.right="20px",document.body.appendChild(this.widgetContainer)}renderWidget(){if(!this.widgetContainer)throw new Error("Widget container not created");this.widgetRoot=(0,ht.H)(this.widgetContainer),this.widgetRoot.render((0,ut.createElement)(zt,{onStartCall:this.startCall.bind(this),onEndCall:this.endCall.bind(this),onToggleMute:this.toggleMute.bind(this),isMuted:this.isMuted.bind(this),onSendDigits:this.sendDigits.bind(this),onEvent:this.on.bind(this)}))}async getAccessToken(){try{const e=`${this.config.host}/v1/twiliovoice/${this.config.integrationId}/token`,t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}});if(!t.ok)throw new Error(`Failed to get token: ${t.status} ${t.statusText}`);const r=await t.json();if(!r.token)throw new Error("Token not found in response");return this.log("Token obtained",{identity:r.identity}),r}catch(e){throw this.handleError(e,"Token fetch failed"),e}}async initializeTwilioDevice(){try{const e=await this.getAccessToken();e.ice_servers&&(this.iceServers=e.ice_servers);const t={codecPreferences:[dt.Codec.Opus,dt.Codec.PCMU],logLevel:1};return this.twilioDevice=new Xe(e.token,t),this.setupDeviceEventListeners(),this.log("Twilio Device initialized with browser default audio settings"),this.twilioDevice}catch(e){throw this.handleError(e,"Twilio Device initialization failed"),e}}setupDeviceEventListeners(){this.twilioDevice&&(this.twilioDevice.on("error",e=>{const t=this.handleError(e,"Device error");this.emit(Wt.ERROR,t)}),this.twilioDevice.on("disconnect",e=>{var t;this.log("Call disconnected",{callSid:null===(t=null==e?void 0:e.parameters)||void 0===t?void 0:t.CallSid}),this.activeCall=null}))}setupCallEventListeners(e){e.on("accept",()=>{this.log("Call accepted");const t=e.getLocalStream();t&&(this.audioMonitor=new Vt(e=>this.emit(Wt.AUDIO_LEVEL,e,Number(e)),this.log),this.audioMonitor.start(t))}),e.on("disconnect",()=>{var e;null===(e=this.audioMonitor)||void 0===e||e.stop(),this.audioMonitor=null}),e.on("volume",(e,t)=>{t>.02&&this.emit(Wt.REMOTE_AUDIO,t.toFixed(3),t)}),e.on("error",e=>{var t;const r=this.handleError(e,"Call error");null===(t=this.audioMonitor)||void 0===t||t.stop(),this.audioMonitor=null,this.emit(Wt.ERROR,r)}),e.on("warning",(e,t)=>{this.log(`Call quality warning: ${e}`,t);const r=qt[e]||`Call quality issue: ${e}`;this.emit(Wt.WARNING,r)}),e.on("warning-cleared",e=>{this.log(`Call quality warning cleared: ${e}`),this.emit(Wt.WARNING_CLEARED,e)})}handleError(e,t){const r=e instanceof Error?e.message:"Unknown error";return this.log(`${t}: ${r}`,e),r}emit(e,t,r){const n={state:e,message:t,data:r};this.emitEvent(e,n)}async startCall(){var e;try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(e=>e.stop()),this.twilioDevice||await this.initializeTwilioDevice();const t=await this.twilioDevice.connect({params:{integration_id:this.config.integrationId},rtcConfiguration:{iceServers:this.iceServers}});this.activeCall=t,this.setupCallEventListeners(t),this.log("Call initiated",{callSid:null===(e=t.parameters)||void 0===e?void 0:e.CallSid,status:t.status()})}catch(e){const t=this.handleError(e,"Failed to start call");throw this.emit(Wt.ERROR,t),e}}endCall(){try{this.activeCall?this.activeCall.disconnect():this.twilioDevice&&this.twilioDevice.disconnectAll()}catch(e){this.handleError(e,"Error ending call")}}toggleMute(){try{if(this.activeCall){const e=this.activeCall.isMuted();this.activeCall.mute(!e),this.log(e?"Call unmuted":"Call muted")}}catch(e){this.handleError(e,"Error toggling mute")}}isMuted(){var e,t;return null!==(t=null===(e=this.activeCall)||void 0===e?void 0:e.isMuted())&&void 0!==t&&t}sendDigits(e){this.activeCall&&(this.activeCall.sendDigits(e),this.log("DTMF sent",{digits:e}))}destroy(){var e;null===(e=this.audioMonitor)||void 0===e||e.stop(),this.audioMonitor=null,this.eventListeners.clear(),this.activeCall&&this.activeCall.disconnect(),this.twilioDevice&&(this.twilioDevice.destroy(),this.twilioDevice=null),this.widgetRoot&&(this.widgetRoot.unmount(),this.widgetRoot=null),this.widgetContainer&&(document.body.removeChild(this.widgetContainer),this.widgetContainer=null)}on(e,t){var r;const n=null!==(r=this.eventListeners.get(e))&&void 0!==r?r:new Set;return n.add(t),this.eventListeners.set(e,n),()=>this.off(e,t)}off(e,t){const r=this.eventListeners.get(e);r&&(r.delete(t),0===r.size&&this.eventListeners.delete(e))}emitEvent(e,t){const r=e=>{const r=this.eventListeners.get(e);r&&0!==r.size&&r.forEach(r=>{try{r(t)}catch(t){const r=t instanceof Error?t.message:"Unknown listener error";this.log(`Listener error for event "${e}": ${r}`,t)}})};r(e),r("any")}}const Qt=e=>"string"==typeof e,Yt=()=>{let e,t;const r=new Promise((r,n)=>{e=r,t=n});return r.resolve=e,r.reject=t,r},Kt=e=>null==e?"":""+e,Gt=/###/g,Jt=e=>e&&e.indexOf("###")>-1?e.replace(Gt,"."):e,Xt=e=>!e||Qt(e),Zt=(e,t,r)=>{const n=Qt(t)?t.split("."):t;let o=0;for(;o<n.length-1;){if(Xt(e))return{};const t=Jt(n[o]);!e[t]&&r&&(e[t]=new r),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return Xt(e)?{}:{obj:e,k:Jt(n[o])}},er=(e,t,r)=>{const{obj:n,k:o}=Zt(e,t,Object);if(void 0!==n||1===t.length)return void(n[o]=r);let i=t[t.length-1],a=t.slice(0,t.length-1),s=Zt(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=Zt(e,a,Object),s?.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=r},tr=(e,t)=>{const{obj:r,k:n}=Zt(e,t);if(r&&Object.prototype.hasOwnProperty.call(r,n))return r[n]},rr=(e,t,r)=>{for(const n in t)"__proto__"!==n&&"constructor"!==n&&(n in e?Qt(e[n])||e[n]instanceof String||Qt(t[n])||t[n]instanceof String?r&&(e[n]=t[n]):rr(e[n],t[n],r):e[n]=t[n]);return e},nr=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var or={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const ir=e=>Qt(e)?e.replace(/[&<>"'\/]/g,e=>or[e]):e,ar=[" ",",","?","!",";"],sr=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 r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}(20),lr=(e,t,r=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const n=t.split(r);let o=e;for(let e=0;e<n.length;){if(!o||"object"!=typeof o)return;let t,i="";for(let a=e;a<n.length;++a)if(a!==e&&(i+=r),i+=n[a],t=o[i],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<n.length-1)continue;e+=a-e+1;break}o=t}return o},cr=e=>e?.replace("_","-"),dr={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class ur{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||dr,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,r,n){return n&&!this.debug?null:(Qt(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new ur(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new ur(this.logger,e)}}var hr=new ur;class pr{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const r=this.observers[e].get(t)||0;this.observers[e].set(t,r+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,r])=>{for(let n=0;n<r;n++)e(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([r,n])=>{for(let o=0;o<n;o++)r.apply(r,[e,...t])})}}class gr extends pr{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,r,n={}){const o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,i=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],r&&(Array.isArray(r)?a.push(...r):Qt(r)&&o?a.push(...r.split(o)):a.push(r)));const s=tr(this.data,a);return!s&&!t&&!r&&e.indexOf(".")>-1&&(e=a[0],t=a[1],r=a.slice(2).join(".")),!s&&i&&Qt(r)?lr(this.data?.[e]?.[t],r,o):s}addResource(e,t,r,n,o={silent:!1}){const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[e,t];r&&(a=a.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(a=e.split("."),n=t,t=a[1]),this.addNamespaces(t),er(this.data,a,n),o.silent||this.emit("added",e,t,r,n)}addResources(e,t,r,n={silent:!1}){for(const n in r)(Qt(r[n])||Array.isArray(r[n]))&&this.addResource(e,t,n,r[n],{silent:!0});n.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,n,o,i={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),n=r,r=t,t=a[1]),this.addNamespaces(t);let s=tr(this.data,a)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),n?rr(s,r,o):s={...s,...r},er(this.data,a,s),i.silent||this.emit("added",e,t,r)}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 Ar={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,o){return e.forEach(e=>{t=this.processors[e]?.process(t,r,n,o)??t}),t}};const fr=Symbol("i18next/PATH_KEY");function mr(e,t){const{[fr]:r}=e(function(){const e=[],t=Object.create(null);let r;return t.get=(n,o)=>(r?.revoke?.(),o===fr?e:(e.push(o),r=Proxy.revocable(n,t),r.proxy)),Proxy.revocable(Object.create(null),t).proxy}());return r.join(t?.keySeparator??".")}const vr={},Cr=e=>!Qt(e)&&"boolean"!=typeof e&&"number"!=typeof e;class wr extends pr{constructor(e,t={}){var r,n;super(),r=e,n=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach(e=>{r[e]&&(n[e]=r[e])}),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=hr.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const r={...t};if(null==e)return!1;const n=this.resolve(e,r);if(void 0===n?.res)return!1;const o=Cr(n.res);return!1!==r.returnObjects||!o}extractFromKey(e,t){let r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");const n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=r&&e.indexOf(r)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,r)=>{t=t||"",r=r||"";const n=ar.filter(e=>t.indexOf(e)<0&&r.indexOf(e)<0);if(0===n.length)return!0;const o=sr.getRegExp(`(${n.map(e=>"?"===e?"\\?":e).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(r);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,r,n));if(i&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:Qt(o)?[o]:o};const i=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(n)}return{key:e,namespaces:Qt(o)?[o]:o}}translate(e,t,r){let n="object"==typeof t?{...t}:t;if("object"!=typeof n&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof n&&(n={...n}),n||(n={}),null==e)return"";"function"==typeof e&&(e=mr(e,{...this.options,...n})),Array.isArray(e)||(e=[String(e)]);const o=void 0!==n.returnDetails?n.returnDetails:this.options.returnDetails,i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],n),l=s[s.length-1];let c=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");const d=n.lng||this.language,u=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===d?.toLowerCase())return u?o?{res:`${l}${c}${a}`,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${c}${a}`:o?{res:a,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:a;const h=this.resolve(e,n);let p=h?.res;const g=h?.usedKey||a,A=h?.exactUsedKey||a,f=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject,v=void 0!==n.count&&!Qt(n.count),C=wr.hasDefaultValue(n),w=v?this.pluralResolver.getSuffix(d,n.count,n):"",b=n.ordinal&&v?this.pluralResolver.getSuffix(d,n.count,{ordinal:!1}):"",y=v&&!n.ordinal&&0===n.count,k=y&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${w}`]||n[`defaultValue${b}`]||n.defaultValue;let x=p;m&&!p&&C&&(x=k);const _=Cr(x),S=Object.prototype.toString.apply(x);if(!(m&&x&&_&&["[object Number]","[object Function]","[object RegExp]"].indexOf(S)<0)||Qt(f)&&Array.isArray(x))if(m&&Qt(f)&&Array.isArray(p))p=p.join(f),p&&(p=this.extendTranslation(p,e,n,r));else{let t=!1,o=!1;!this.isValidLookup(p)&&C&&(t=!0,p=k),this.isValidLookup(p)||(o=!0,p=a);const s=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:p,u=C&&k!==p&&this.options.updateMissing;if(o||t||u){if(this.logger.log(u?"updateKey":"missingKey",d,l,a,u?k:p),i){const e=this.resolve(a,{...n,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,n.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(n.lng||this.language):e.push(n.lng||this.language);const r=(e,t,r)=>{const o=C&&r!==p?r:s;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,o,u,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,o,u,n),this.emit("missingKey",e,l,t,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&v?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,n);y&&n[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{r([e],a+t,n[`defaultValue${t}`]||k)})}):r(e,a,k))}p=this.extendTranslation(p,e,n,h,r),o&&p===a&&this.options.appendNamespaceToMissingKey&&(p=`${l}${c}${a}`),(o||t)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${c}${a}`:a,t?p:void 0,n))}else{if(!n.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(g,x,{...n,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(h.res=e,h.usedParams=this.getUsedParamsDetails(n),h):e}if(i){const e=Array.isArray(x),t=e?[]:{},r=e?A:g;for(const e in x)if(Object.prototype.hasOwnProperty.call(x,e)){const o=`${r}${i}${e}`;t[e]=C&&!p?this.translate(o,{...n,defaultValue:Cr(k)?k[e]:void 0,joinArrays:!1,ns:s}):this.translate(o,{...n,joinArrays:!1,ns:s}),t[e]===o&&(t[e]=x[e])}p=t}}return o?(h.res=p,h.usedParams=this.getUsedParamsDetails(n),h):p}extendTranslation(e,t,r,n,o){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const i=Qt(e)&&(void 0!==r?.interpolation?.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(i){const t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let s=r.replace&&!Qt(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,r.lng||this.language||n.usedLng,r),i){const t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(r.nest=!1)}!r.lng&&n&&n.res&&(r.lng=this.language||n.usedLng),!1!==r.nest&&(e=this.interpolator.nest(e,(...e)=>o?.[0]!==e[0]||r.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),r)),r.interpolation&&this.interpolator.reset()}const i=r.postProcess||this.options.postProcess,a=Qt(i)?[i]:i;return null!=e&&a?.length&&!1!==r.applyPostProcessor&&(e=Ar.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e,t={}){let r,n,o,i,a;return Qt(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(r))return;const s=this.extractFromKey(e,t),l=s.key;n=l;let c=s.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const d=void 0!==t.count&&!Qt(t.count),u=d&&!t.ordinal&&0===t.count,h=void 0!==t.context&&(Qt(t.context)||"number"==typeof t.context)&&""!==t.context,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);c.forEach(e=>{this.isValidLookup(r)||(a=e,vr[`${p[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(a)||(vr[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" 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(n=>{if(this.isValidLookup(r))return;i=n;const a=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(a,l,n,e,t);else{let e;d&&(e=this.pluralResolver.getSuffix(n,t.count,t));const r=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(t.ordinal&&0===e.indexOf(o)&&a.push(l+e.replace(o,this.options.pluralSeparator)),a.push(l+e),u&&a.push(l+r)),h){const n=`${l}${this.options.contextSeparator||"_"}${t.context}`;a.push(n),d&&(t.ordinal&&0===e.indexOf(o)&&a.push(n+e.replace(o,this.options.pluralSeparator)),a.push(n+e),u&&a.push(n+r))}}let s;for(;s=a.pop();)this.isValidLookup(r)||(o=s,r=this.getResource(n,e,s,t))}))})}),{res:r,usedKey:n,exactUsedKey:o,usedLng:i,usedNS:a}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,r,n={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!Qt(e.replace);let n=r?e.replace:e;if(r&&void 0!==e.count&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!r){n={...n};for(const e of t)delete n[e]}return n}static hasDefaultValue(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}class br{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=hr.create("languageUtils")}getScriptPartFromCode(e){if(!(e=cr(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=cr(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Qt(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}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 r=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(r)||(t=r)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const r=this.getScriptPartFromCode(e);if(this.isSupportedCode(r))return t=r;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:e.indexOf("-")>0&&n.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.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)),Qt(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}toResolveHierarchy(e,t){const r=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),n=[],o=e=>{e&&(this.isSupportedCode(e)?n.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return Qt(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))):Qt(e)&&o(this.formatLanguageCode(e)),r.forEach(e=>{n.indexOf(e)<0&&o(this.formatLanguageCode(e))}),n}}const yr={zero:0,one:1,two:2,few:3,many:4,other:5},kr={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class xr{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=hr.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const r=cr("dev"===e?"en":e),n=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:n});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(r,{type:n})}catch(r){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),kr;if(!e.match(/-|_/))return kr;const n=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(n,t)}return this.pluralRulesCache[o]=i,i}needsPlural(e,t={}){let r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,r={}){return this.getSuffixes(e,r).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),r?r.resolvedOptions().pluralCategories.sort((e,t)=>yr[e]-yr[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,r={}){const n=this.getRule(e,r);return n?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${n.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,r))}}const _r=(e,t,r,n=".",o=!0)=>{let i=((e,t,r)=>{const n=tr(e,r);return void 0!==n?n:tr(t,r)})(e,t,r);return!i&&o&&Qt(r)&&(i=lr(e,r,n),void 0===i&&(i=lr(t,r,n))),i},Sr=e=>e.replace(/\$/g,"$$$$");class Br{constructor(e={}){this.logger=hr.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:r,useRawValueToEscape:n,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:l,unescapeSuffix:c,unescapePrefix:d,nestingPrefix:u,nestingPrefixEscaped:h,nestingSuffix:p,nestingSuffixEscaped:g,nestingOptionsSeparator:A,maxReplaces:f,alwaysFormat:m}=e.interpolation;this.escape=void 0!==t?t:ir,this.escapeValue=void 0===r||r,this.useRawValueToEscape=void 0!==n&&n,this.prefix=o?nr(o):i||"{{",this.suffix=a?nr(a):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=u?nr(u):h||nr("$t("),this.nestingSuffix=p?nr(p):g||nr(")"),this.nestingOptionsSeparator=A||",",this.maxReplaces=f||1e3,this.alwaysFormat=void 0!==m&&m,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,r,n){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=_r(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,r,{...n,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(_r(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,r,{...n,...t,interpolationkey:i})};this.resetRegExp();const c=n?.missingInterpolationHandler||this.options.missingInterpolationHandler,d=void 0!==n?.interpolation?.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Sr(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Sr(this.escape(e)):Sr(e)}].forEach(t=>{for(a=0;o=t.regex.exec(e);){const r=o[1].trim();if(i=l(r),void 0===i)if("function"==typeof c){const t=c(e,o,n);i=Qt(t)?t:""}else if(n&&Object.prototype.hasOwnProperty.call(n,r))i="";else{if(d){i=o[0];continue}this.logger.warn(`missed to pass in variable ${r} for interpolating ${e}`),i=""}else Qt(i)||this.useRawValueToEscape||(i=Kt(i));const s=t.safeValue(i);if(e=e.replace(o[0],s),d?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t,r={}){let n,o,i;const a=(e,t)=>{const r=this.nestingOptionsSeparator;if(e.indexOf(r)<0)return e;const n=e.split(new RegExp(`${r}[ ]*{`));let o=`{${n[1]}`;e=n[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(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${r}${o}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let s=[];i={...r},i=i.replace&&!Qt(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;const l=/{.*}/.test(n[1])?n[1].lastIndexOf("}")+1:n[1].indexOf(this.formatSeparator);if(-1!==l&&(s=n[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),n[1]=n[1].slice(0,l)),o=t(a.call(this,n[1].trim(),i),i),o&&n[0]===e&&!Qt(o))return o;Qt(o)||(o=Kt(o)),o||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),o=""),s.length&&(o=s.reduce((e,t)=>this.format(e,t,r.lng,{...r,interpolationkey:n[1].trim()}),o.trim())),e=e.replace(n[0],o),this.regexp.lastIndex=0}return e}}const Er=e=>{const t={};return(r,n,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=n+JSON.stringify(i);let s=t[a];return s||(s=e(cr(n),o),t[a]=s),s(r)}},Tr=e=>(t,r,n)=>e(cr(r),n)(t);class Pr{constructor(e={}){this.logger=hr.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const r=t.cacheInBuiltFormats?Er:Tr;this.formats={number:r((e,t)=>{const r=new Intl.NumberFormat(e,{...t});return e=>r.format(e)}),currency:r((e,t)=>{const r=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>r.format(e)}),datetime:r((e,t)=>{const r=new Intl.DateTimeFormat(e,{...t});return e=>r.format(e)}),relativetime:r((e,t)=>{const r=new Intl.RelativeTimeFormat(e,{...t});return e=>r.format(e,t.range||"day")}),list:r((e,t)=>{const r=new Intl.ListFormat(e,{...t});return e=>r.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Er(t)}format(e,t,r,n={}){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)}return o.reduce((e,t)=>{const{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const r={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const o=n[1].substring(0,n[1].length-1);"currency"===t&&o.indexOf(":")<0?r.currency||(r.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?r.range||(r.range=o.trim()):o.split(";").forEach(e=>{if(e){const[t,...n]=e.split(":"),o=n.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();r[i]||(r[i]=o),"false"===o&&(r[i]=!1),"true"===o&&(r[i]=!0),isNaN(o)||(r[i]=parseInt(o,10))}})}return{formatName:t,formatOptions:r}})(t);if(this.formats[o]){let t=e;try{const a=n?.formatParams?.[n.interpolationkey]||{},s=a.locale||a.lng||n.locale||n.lng||r;t=this.formats[o](e,s,{...i,...n,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e},e)}}class Ir extends pr{constructor(e,t,r,n={}){super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=n,this.logger=hr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=n.maxParallelReads||10,this.readingCalls=0,this.maxRetries=n.maxRetries>=0?n.maxRetries:5,this.retryTimeout=n.retryTimeout>=1?n.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,n.backend,n)}queueLoad(e,t,r,n){const o={},i={},a={},s={};return e.forEach(e=>{let n=!0;t.forEach(t=>{const a=`${e}|${t}`;!r.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,n=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===s[t]&&(s[t]=!0)))}),n||(a[e]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,r){const n=e.split("|"),o=n[0],i=n[1];t&&this.emit("failedLoading",o,i,t),!t&&r&&this.store.addResourceBundle(o,i,r,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&r&&(this.state[e]=0);const a={};this.queue.forEach(r=>{((e,t,r)=>{const{obj:n,k:o}=Zt(e,t,Object);n[o]=n[o]||[],n[o].push(r)})(r.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(r,e),t&&r.errors.push(t),0!==r.pendingCount||r.done||(Object.keys(r.loaded).forEach(e=>{a[e]||(a[e]={});const t=r.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,r,n=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:r,tried:n,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&&n<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,r,n+1,2*o,i)},o):i(a,s)},s=this.backend[r].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const r=s(e,t);r&&"function"==typeof r.then?r.then(e=>a(null,e)).catch(a):a(null,r)}catch(e){a(e)}}prepareLoading(e,t,r={},n){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();Qt(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Qt(t)&&(t=[t]);const o=this.queueLoad(e,t,r,n);if(!o.toLoad.length)return o.pending.length||n(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,r){this.prepareLoading(e,t,{},r)}reload(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}loadOne(e,t=""){const r=e.split("|"),n=r[0],o=r[1];this.read(n,o,"read",void 0,void 0,(r,i)=>{r&&this.logger.warn(`${t}loading namespace ${o} for language ${n} failed`,r),!r&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${n}`,i),this.loaded(e,r,i)})}saveMissing(e,t,r,n,o,i={},a=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=r&&""!==r){if(this.backend?.create){const s={...i,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let o;o=5===l.length?l(e,t,r,n,s):l(e,t,r,n),o&&"function"==typeof o.then?o.then(e=>a(null,e)).catch(a):a(null,o)}catch(e){a(e)}else l(e,t,r,n,a,s)}e&&e[0]&&this.store.addResource(e[0],t,r,n)}}else this.logger.warn(`did not save key "${r}" 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 Dr=()=>({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]),Qt(e[1])&&(t.defaultValue=e[1]),Qt(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const r=e[3]||e[2];Object.keys(r).forEach(e=>{t[e]=r[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Or=e=>(Qt(e.ns)&&(e.ns=[e.ns]),Qt(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Qt(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),Rr=()=>{};class Lr extends pr{constructor(e={},t){var r;if(super(),this.options=Or(e),this.services={},this.logger=hr,this.modules={external:[]},r=this,Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(e=>{"function"==typeof r[e]&&(r[e]=r[e].bind(r))}),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&&(Qt(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const r=Dr();this.options={...r,...this.options,...Or(e)},this.options.interpolation={...r.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler);const n=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?hr.init(n(this.modules.logger),this.options):hr.init(null,this.options),e=this.modules.formatter?this.modules.formatter:Pr;const t=new br(this.options);this.store=new gr(this.options.resources,this.options);const o=this.services;o.logger=hr,o.resourceStore=this.store,o.languageUtils=t,o.pluralResolver=new xr(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.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!==r.interpolation.format||(o.formatter=n(e),o.formatter.init&&o.formatter.init(o,this.options),this.options.interpolation.format=o.formatter.format.bind(o.formatter)),o.interpolator=new Br(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new Ir(n(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(o.languageDetector=n(this.modules.languageDetector),o.languageDetector.init&&o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=n(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new wr(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=Rr),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=Yt(),i=()=>{const e=(e,r)=>{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(r),t(e,r)};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=Rr){let r=t;const n=Qt(e)?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===n?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return r();const e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};n?t(n):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),r(e)})}else r(null)}reloadResources(e,t,r){const n=Yt();return"function"==typeof e&&(r=e,e=void 0),"function"==typeof t&&(r=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),r||(r=Rr),this.services.backendConnector.reload(e,t,e=>{n.resolve(),r(e)}),n}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&&Ar.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 r=Yt();this.emit("languageChanging",e);const n=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&&(n(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve((...e)=>this.t(...e)),t&&t(o,(...e)=>this.t(...e))},i=t=>{e||t||!this.services.languageDetector||(t=[]);const r=Qt(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(r)?r:this.services.languageUtils.getBestMatchFromCodes(Qt(t)?[t]:t);i&&(this.language||n(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()),r}getFixedT(e,t,r){const n=(e,t,...o)=>{let i;i="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(o)):{...t},i.lng=i.lng||n.lng,i.lngs=i.lngs||n.lngs,i.ns=i.ns||n.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||r||n.keyPrefix);const a=this.options.keySeparator||".";let s;return i.keyPrefix&&Array.isArray(e)?s=e.map(e=>("function"==typeof e&&(e=mr(e,{...this.options,...t})),`${i.keyPrefix}${a}${e}`)):("function"==typeof e&&(e=mr(e,{...this.options,...t})),s=i.keyPrefix?`${i.keyPrefix}${a}${e}`:e),this.t(s,i)};return Qt(e)?n.lng=e:n.lngs=e,n.ns=t,n.keyPrefix=r,n}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 r=t.lng||this.resolvedLanguage||this.languages[0],n=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;const i=(e,t)=>{const r=this.services.backendConnector.state[`${e}|${t}`];return-1===r||0===r||2===r};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!(!this.hasResourceBundle(r,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!i(r,e)||n&&!i(o,e)))}loadNamespaces(e,t){const r=Yt();return this.options.ns?(Qt(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){const r=Yt();Qt(e)&&(e=[e]);const n=this.options.preload||[],o=e.filter(e=>n.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=n.concat(o),this.loadResources(e=>{r.resolve(),t&&t(e)}),r):(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(e){}const t=this.services?.languageUtils||new br(Dr());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){const r=new Lr(e,t);return r.createInstance=Lr.createInstance,r}cloneInstance(e={},t=Rr){const r=e.forkResourceStore;r&&delete e.forkResourceStore;const n={...this.options,...e,isClone:!0},o=new Lr(n);if(void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e)),["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((r,n)=>(r[n]={...e[t][n]},r),e[t]),e),{});o.store=new gr(e,n),o.services.resourceStore=o.store}return e.interpolation&&(o.services.interpolator=new Br(n)),o.translator=new wr(o.services,n),o.translator.on("*",(e,...t)=>{o.emit(e,...t)}),o.init(n,t),o.translator.options=n,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 Mr=Lr.createInstance(),{slice:Nr,forEach:Ur}=(Mr.createInstance,Mr.dir,Mr.init,Mr.loadResources,Mr.reloadResources,Mr.use,Mr.changeLanguage,Mr.getFixedT,Mr.t,Mr.exists,Mr.setDefaultNamespace,Mr.hasLoadedNamespace,Mr.loadNamespaces,Mr.loadLanguages,[]),jr=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Fr={create(e,t,r,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};r&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+60*r*1e3)),n&&(o.domain=n),document.cookie=function(e,t){const r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"};let n=`${e}=${encodeURIComponent(t)}`;if(r.maxAge>0){const e=r.maxAge-0;if(Number.isNaN(e))throw new Error("maxAge should be a Number");n+=`; Max-Age=${Math.floor(e)}`}if(r.domain){if(!jr.test(r.domain))throw new TypeError("option domain is invalid");n+=`; Domain=${r.domain}`}if(r.path){if(!jr.test(r.path))throw new TypeError("option path is invalid");n+=`; Path=${r.path}`}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");n+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(n+="; HttpOnly"),r.secure&&(n+="; Secure"),r.sameSite)switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:n+="; SameSite=Strict";break;case"lax":n+="; SameSite=Lax";break;case"strict":n+="; SameSite=Strict";break;case"none":n+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(n+="; Partitioned"),n}(e,t,o)},read(e){const t=`${e}=`,r=document.cookie.split(";");for(let e=0;e<r.length;e++){let n=r[e];for(;" "===n.charAt(0);)n=n.substring(1,n.length);if(0===n.indexOf(t))return n.substring(t.length,n.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var $r={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&"undefined"!=typeof document)return Fr.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:r,cookieMinutes:n,cookieDomain:o,cookieOptions:i}=t;r&&"undefined"!=typeof document&&Fr.create(r,e,n,o,i)}},zr={name:"querystring",lookup(e){let t,{lookupQuerystring:r}=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 n=e.substring(1).split("&");for(let e=0;e<n.length;e++){const o=n[e].indexOf("=");o>0&&n[e].substring(0,o)===r&&(t=n[e].substring(o+1))}}return t}},Wr={name:"hash",lookup(e){let t,{lookupHash:r,lookupFromHashIndex:n}=e;if("undefined"!=typeof window){const{hash:e}=window.location;if(e&&e.length>2){const o=e.substring(1);if(r){const e=o.split("&");for(let n=0;n<e.length;n++){const o=e[n].indexOf("=");o>0&&e[n].substring(0,o)===r&&(t=e[n].substring(o+1))}}if(t)return t;if(!t&&n>-1){const t=e.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(t))return;const r="number"==typeof n?n:0;return t[r]?.replace("/","")}}}return t}};let qr=null;const Vr=()=>{if(null!==qr)return qr;try{if(qr="undefined"!=typeof window&&null!==window.localStorage,!qr)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){qr=!1}return qr};var Hr={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&Vr())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:r}=t;r&&Vr()&&window.localStorage.setItem(r,e)}};let Qr=null;const Yr=()=>{if(null!==Qr)return Qr;try{if(Qr="undefined"!=typeof window&&null!==window.sessionStorage,!Qr)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){Qr=!1}return Qr};var Kr={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Yr())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:r}=t;r&&Yr()&&window.sessionStorage.setItem(r,e)}},Gr={name:"navigator",lookup(e){const t=[];if("undefined"!=typeof navigator){const{languages:e,userLanguage:r,language:n}=navigator;if(e)for(let r=0;r<e.length;r++)t.push(e[r]);r&&t.push(r),n&&t.push(n)}return t.length>0?t:void 0}},Jr={name:"htmlTag",lookup(e){let t,{htmlTag:r}=e;const n=r||("undefined"!=typeof document?document.documentElement:null);return n&&"function"==typeof n.getAttribute&&(t=n.getAttribute("lang")),t}},Xr={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if("undefined"==typeof window)return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(r))return;const n="number"==typeof t?t:0;return r[n]?.replace("/","")}},Zr={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const r="number"==typeof t?t+1:1,n="undefined"!=typeof window&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[r]}};let en=!1;try{document.cookie,en=!0}catch(e){}const tn=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];en||tn.splice(1,1);class rn{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]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=function(e){return Ur.call(Nr.call(arguments,1),t=>{if(t)for(const r in t)void 0===e[r]&&(e[r]=t[r])}),e}(t,this.options||{},{order:tn,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=r,this.addDetector($r),this.addDetector(zr),this.addDetector(Hr),this.addDetector(Kr),this.addDetector(Gr),this.addDetector(Jr),this.addDetector(Xr),this.addDetector(Zr),this.addDetector(Wr)}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 r=this.detectors[e].lookup(this.options);r&&"string"==typeof r&&(r=[r]),r&&(t=t.concat(r))}}),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)}))}}rn.type="languageDetector";Mr.createInstance().use(rn).use(Tt).init({resources:{el:{translation:{audio_widget:{actions:{cancel:"Ακύρωση δοκιμαστικής κλήσης ήχου",end:"Τερματισμός δοκιμαστικής κλήσης ήχου",start:"Έναρξη δοκιμαστικής κλήσης ήχου"},errors:{generic:"Παρουσιάστηκε σφάλμα",start_failed:"Δεν ήταν δυνατή η έναρξη της κλήσης"},mute:{mute:"Σίγαση",mute_microphone:"Σίγαση μικροφώνου",unmute:"Κατάργηση σίγασης",unmute_microphone:"Κατάργηση σίγασης μικροφώνου"},sr:{connected:"Η κλήση συνδέθηκε",connected_thinking:"Η κλήση συνδέθηκε, δημιουργία απάντησης",connecting:"Σύνδεση κλήσης",error:"Σφάλμα κλήσης",error_with_message:"Σφάλμα κλήσης: {{message}}",ready:"Έτοιμο για πραγματοποίηση κλήσης"},status:{connecting:"Σύνδεση",error:"Σφάλμα",on_call:"Σε κλήση",ready:"Έτοιμο",thinking:"Σκέφτεται"}}}},en:{translation:{audio_widget:{actions:{cancel:"Cancel audio preview call",end:"End audio preview call",start:"Start audio preview call"},errors:{generic:"An error occurred",start_failed:"Failed to start call"},mute:{mute:"Mute",mute_microphone:"Mute microphone",unmute:"Unmute",unmute_microphone:"Unmute microphone"},sr:{connected:"Call connected",connected_thinking:"Call connected, generating response",connecting:"Connecting call",error:"Call error",error_with_message:"Call error: {{message}}",ready:"Ready to place a call"},status:{connecting:"Connecting",error:"Error",on_call:"On call",ready:"Ready",thinking:"Thinking"}}}},"pt-br":{translation:{audio_widget:{actions:{cancel:"Cancelar chamada de prévia de áudio",end:"Encerrar chamada de prévia de áudio",start:"Iniciar chamada de prévia de áudio"},errors:{generic:"Ocorreu um erro",start_failed:"Não foi possível iniciar a chamada"},mute:{mute:"Silenciar",mute_microphone:"Silenciar microfone",unmute:"Ativar",unmute_microphone:"Ativar microfone"},sr:{connected:"Chamada conectada",connected_thinking:"Chamada conectada, gerando resposta",connecting:"Conectando chamada",error:"Erro na chamada",error_with_message:"Erro na chamada: {{message}}",ready:"Pronto para iniciar uma chamada"},status:{connecting:"Conectando",error:"Erro",on_call:"Em chamada",ready:"Pronto",thinking:"Pensando"}}}}},fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1},detection:{order:["navigator"]}});var nn=r(6186),on=r.n(nn),an=r(2155),sn=r.n(an),ln=r(7433),cn=r.n(ln),dn=r(8626),un=r.n(dn),hn=r(8990),pn=r.n(hn),gn=r(9827),An=r.n(gn),fn=r(4511),mn={};mn.styleTagTransform=An(),mn.setAttributes=un(),mn.insert=cn().bind(null,"head"),mn.domAPI=sn(),mn.insertStyleElement=pn(),on()(fn.A,mn),fn.A&&fn.A.locals&&fn.A.locals;const vn=o()("moveo:audio:main"),Cn=async e=>{if(vn("MoveoAudio.init() called with config",e),!e.integrationId){const e=new Error("integrationId is required in config");throw vn("Initialization failed: integrationId is required",e),e}vn("Creating AudioController instance");const t=new Ht(e);return vn("Initializing AudioController"),await t.init(),vn("MoveoAudio initialization complete"),t};var wn=Object.assign(Cn,{init:Cn,AudioController:Ht})}(),n.default}()});
|
|
3
3
|
//# sourceMappingURL=audio-client.min.js.map
|