1/*! For license information please see main.a593d66a.js.LICENSE.txt */ 2(()=>{var e={872(e,t,n){"use strict";t.__esModule=!0;var r=n(43),i=(s(r),s(n(173))),o=s(n(668));s(n(440));function s(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function l(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=1073741823;t.default=function(e,t){var n,s,d="__create-react-context-"+(0,o.default)()+"__",h=function(e){function n(){var t,r;a(this,n);for(var i=arguments.length,o=Array(i),s=0;s<i;s++)o[s]=arguments[s];return t=r=u(this,e.call.apply(e,[this].concat(o))),r.emitter=function(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter(function(t){return t!==e})},get:function(){return e},set:function(n,r){e=n,t.forEach(function(t){return t(e,r)})}}}(r.props.value),u(r,t)}return l(n,e),n.prototype.getChildContext=function(){var e;return(e={})[d]=this.emitter,e},n.prototype.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n=this.props.value,r=e.value,i=void 0;((o=n)===(s=r)?0!==o||1/o===1/s:o!==o&&s!==s)?i=0:(i="function"===typeof t?t(n,r):c,0!==(i|=0)&&this.emitter.set(e.value,i))}var o,s},n.prototype.render=function(){return this.props.children},n}(r.Component);h.childContextTypes=((n={})[d]=i.default.object.isRequired,n);var p=function(t){function n(){var e,r;a(this,n);for(var i=arguments.length,o=Array(i),s=0;s<i;s++)o[s]=arguments[s];return e=r=u(this,t.call.apply(t,[this].concat(o))),r.state={value:r.getValue()},r.onUpdate=function(e,t){0!==((0|r.observedBits)&t)&&r.setState({value:r.getValue()})},u(r,e)}return l(n,t),n.prototype.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=void 0===t||null===t?c:t},n.prototype.componentDidMount=function(){this.context[d]&&this.context[d].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=void 0===e||null===e?c:e},n.prototype.componentWillUnmount=function(){this.context[d]&&this.context[d].off(this.onUpdate)},n.prototype.getValue=function(){return this.context[d]?this.context[d].get():e},n.prototype.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(r.Component);return p.contextTypes=((s={})[d]=i.default.object,s),{Provider:h,Consumer:p}},e.exports=t.default},524(e,t,n){"use strict";t.__esModule=!0;var r=o(n(43)),i=o(n(872));function o(e){return e&&e.__esModule?e:{default:e}}t.default=r.default.createContext||i.default,e.exports=t.default},240(e){"use strict";var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"===typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},s=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(r in e);return"undefined"===typeof r||t.call(e,r)},a=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,l,c,d=arguments[0],h=1,p=arguments.length,f=!1;for("boolean"===typeof d&&(f=d,d=arguments[1]||{},h=2),(null==d||"object"!==typeof d&&"function"!==typeof d)&&(d={});h<p;++h)if(null!=(t=arguments[h]))for(n in t)r=u(d,n),d!==(i=u(t,n))&&(f&&i&&(s(i)||(l=o(i)))?(l?(l=!1,c=r&&o(r)?r:[]):c=r&&s(r)?r:{},a(d,{name:n,newValue:e(f,c,i)})):"undefined"!==typeof i&&a(d,{name:n,newValue:i}));return d}},122(e){"use strict";e.exports=function e(t,n){if(t===n)return!0;
2if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!==i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!==i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!==i--;){var s=o[i];if(!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n}},668(e){"use strict";var t="__global_unique_id__";e.exports=function(){return globalThis[t]=(globalThis[t]||0)+1}},219(e,t,n){"use strict";var r=n(763),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function u(e){return r.isMemo(e)?s:a[e.$$typeof]||i}a[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[r.Memo]=s;var l=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(f){var i=p(n);i&&i!==f&&e(t,i,r)}var s=c(n);d&&(s=s.concat(d(n)));for(var a=u(t),g=u(n),m=0;m<s.length;++m){var v=s[m];if(!o[v]&&(!r||!r[v])&&(!g||!g[v])&&(!a||!a[v])){var y=h(n,v);try{l(t,v,y)}catch(D){}}}}return t}},983(e,t){"use strict";var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,u=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,f=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,D=n?Symbol.for("react.responder"):60118,_=n?Symbol.for("react.scope"):60119;function b(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case o:case a:case s:case p:return e;default:switch(e=e&&e.$$typeof){case l:case h:case m:case g:case u:return e;default:return t}}case i:return t}}}function w(e){return b(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=l,t.ContextProvider=u,t.Element=r,t.ForwardRef=h,t.Fragment=o,t.Lazy=m,t.Memo=g,t.Portal=i,t.Profiler=a,t.StrictMode=s,t.Suspense=p,t.isAsyncMode=function(e){return w(e)||b(e)===c},t.isConcurrentMode=w,t.isContextConsumer=function(e){return b(e)===l},t.isContextProvider=function(e){return b(e)===u},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return b(e)===h},t.isFragment=function(e){return b(e)===o},t.isLazy=function(e){return b(e)===m},t.isMemo=function(e){return b(e)===g},t.isPortal=function(e){return b(e)===i},t.isProfiler=function(e){return b(e)===a},t.isStrictMode=function(e){return b(e)===s},t.isSuspense=function(e){return b(e)===p},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===o||e===d||e===a||e===s||e===p||e===f||"object"===typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===g||e.$$typeof===u||e.$$typeof===l||e.$$typeof===h||e.$$typeof===y||e.$$typeof===D||e.$$typeof===_||e.$$typeof===v)},t.typeOf=b},763(e,t,n){"use strict";e.exports=n(983)},403(e){var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;
2\s]*/,u=/^\s+|\s+$/g,l="";function c(e){return e?e.replace(u,l):l}e.exports=function(e,u){if("string"!==typeof e)throw new TypeError("First argument must be a string");if(!e)return[];u=u||{};var d=1,h=1;function p(e){var t=e.match(n);t&&(d+=t.length);var r=e.lastIndexOf("\n");h=~r?e.length-r:h+e.length}function f(){var e={line:d,column:h};return function(t){return t.position=new g(e),D(),t}}function g(e){this.start=e,this.end={line:d,column:h},this.source=u.source}g.prototype.content=e;var m=[];function v(t){var n=new Error(u.source+":"+d+":"+h+": "+t);if(n.reason=t,n.filename=u.source,n.line=d,n.column=h,n.source=e,!u.silent)throw n;m.push(n)}function y(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function D(){y(r)}function _(e){var t;for(e=e||[];t=b();)!1!==t&&e.push(t);return e}function b(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;l!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,l===e.charAt(n-1))return v("End of comment missing");var r=e.slice(2,n-2);return h+=2,p(r),e=e.slice(n),h+=2,t({type:"comment",comment:r})}}function w(){var e=f(),n=y(i);if(n){if(b(),!y(o))return v("property missing ':'");var r=y(s),u=e({type:"declaration",property:c(n[0].replace(t,l)),value:r?c(r[0].replace(t,l)):l});return y(a),u}}return D(),function(){var e,t=[];for(_(t);e=w();)!1!==e&&(t.push(e),_(t));return t}()}},740(e){"use strict";e.exports=function(e,t,n,r,i,o,s,a){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,o,s,a],c=0;(u=new Error(t.replace(/%s/g,function(){return l[c++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}}},856(e,t,n){var r,i;!function(o){if(void 0===(i="function"===typeof(r=o)?r.call(t,n,t,e):r)||(e.exports=i),e.exports=o(),!!0){var s=window.Cookies,a=window.Cookies=o();a.noConflict=function(){return window.Cookies=s,a}}}(function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2}
2)+/g,decodeURIComponent)}return function n(r){function i(){}function o(t,n,o){if("undefined"!==typeof document){"number"===typeof(o=e({path:"/"},i.defaults,o)).expires&&(o.expires=new Date(1*new Date+864e5*o.expires)),o.expires=o.expires?o.expires.toUTCString():"";try{var s=JSON.stringify(n);/^[\{\[]/.test(s)&&(n=s)}catch(l){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var a="";for(var u in o)o[u]&&(a+="; "+u,!0!==o[u]&&(a+="="+o[u].split(";")[0]));return document.cookie=t+"="+n+a}}function s(e,n){if("undefined"!==typeof document){for(var i={},o=document.cookie?document.cookie.split("; "):[],s=0;s<o.length;s++){var a=o[s].split("="),u=a.slice(1).join("=");n||'"'!==u.charAt(0)||(u=u.slice(1,-1));try{var l=t(a[0]);if(u=(r.read||r)(u,l)||t(u),n)try{u=JSON.parse(u)}catch(c){}if(i[l]=u,e===l)break}catch(c){}}return e?i[e]:i}}return i.set=o,i.get=function(e){return s(e,!1)},i.getJSON=function(e){return s(e,!0)},i.remove=function(t,n){o(t,"",e(n,{expires:-1}))},i.defaults={},i.withConverter=n,i}(function(){})})},123(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,i){for(var o,s,a=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u<arguments.length;u++){for(var l in o=Object(arguments[u]))n.call(o,l)&&(a[l]=o[l]);if(t){s=t(o);for(var c=0;c<s.length;c++)r.call(o,s[c])&&(a[s[c]]=o[s[c]])}}return a}},497(e,t,n){"use strict";var r=n(218);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,s){if(s!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i}
2;return n.PropTypes=n,n}},173(e,t,n){e.exports=n(497)()},218(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4(e,t,n){"use strict";var r=n(853),i=n(43),o=n(950);function s(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function u(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function l(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function c(e){if(31===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function d(e){if(u(e)!==e)throw Error(s(188))}function h(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=h(e)))return t;e=e.sibling}return null}var p=Object.assign,f=Symbol.for("react.element"),g=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),b=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),S=Symbol.for("react.lazy");Symbol.for("react.scope");var x=Symbol.for("react.activity");Symbol.for("react.legacy_hidden"),Symbol.for("react.tracing_marker");var F=Symbol.for("react.memo_cache_sentinel");Symbol.for("react.view_transition");var A=Symbol.iterator;function T(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=A&&e[A]||e["@@iterator"])?e:null}var I=Symbol.for("react.client.reference");function P(e){if(null==e)return null;if("function"===typeof e)return e.$$typeof===I?null:e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case v:return"Fragment";case D:return"Profiler";case y:return"StrictMode";case E:return"Suspense";case C:return"SuspenseList";case x:return"Activity"}if("object"===typeof e)switch(e.$$typeof){case m:return"Portal";case b:return e.displayName||"Context";case _:return(e._context.displayName||"Context")+".Consumer";case w:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case k:return null!==(t=e.displayName||null)?t:P(e.type)||"Memo";case S:t=e._payload,e=e._init;try{return P(e(t))}catch(n){}}return null}var O=Array.isArray,N=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B={pending:!1,data:null,method:null,action:null},L=[],M=-1;function j(e){return{current:e}}function z(e){0>M||(e.current=L[M],L[M]=null,M--)}function U(e,t){M++,L[M]=e.current,e.current=t}var H,q,W=j(null),$=j(null),V=j(null),G=j(null);function K(e,t){switch(U(V,t),U($,e),U(W,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=yd(t=vd(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}z(W),U(W,e)}function Y(){z(W),z($),z(V)}function J(e){null!==e.memoizedState&&U(G,e);var t=W.current,n=yd(t,e.type);t!==n&&(U($,e),U(W,n))}function Q(e){$.current===e&&(z(W),z($)),G.current===e&&(z(G),ch._currentValue=B)}function X(e){if(void 0===H)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);H=t&&t[1]||"",q=-1<n.stack.indexOf("\n at")?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+H+e+q}var Z=!1;function ee(e,t){if(!e||Z)return"";Z=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(i){var r=i}Reflect.construct(e,[],n)}
vendor: 5,351 bytes, line 2
2else{try{n.call()}catch(o){r=o}e.call(n.prototype)}}else{try{throw Error()}catch(s){r=s}(n=e())&&"function"===typeof n.catch&&n.catch(function(){})}}catch(a){if(a&&r&&"string"===typeof a.stack)return[a.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=r.DetermineComponentFrameRoot(),s=o[0],a=o[1];if(s&&a){var u=s.split("\n"),l=a.split("\n");for(i=r=0;r<u.length&&!u[r].includes("DetermineComponentFrameRoot");)r++;for(;i<l.length&&!l[i].includes("DetermineComponentFrameRoot");)i++;if(r===u.length||i===l.length)for(r=u.length-1,i=l.length-1;1<=r&&0<=i&&u[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(u[r]!==l[i]){if(1!==r||1!==i)do{if(r--,0>--i||u[r]!==l[i]){var c="\n"+u[r].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}}while(1<=r&&0<=i);break}}}finally{Z=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?X(n):""}function te(e,t){switch(e.tag){case 26:case 27:case 5:return X(e.type);case 16:return X("Lazy");case 13:return e.child!==t&&null!==t?X("Suspense Fallback"):X("Suspense");case 19:return X("SuspenseList");case 0:case 15:return ee(e.type,!1);case 11:return ee(e.type.render,!1);case 1:return ee(e.type,!0);case 31:return X("Activity");default:return""}}function ne(e){try{var t="",n=null;do{t+=te(e,n),n=e,e=e.return}while(e);return t}catch(r){return"\nError generating stack: "+r.message+"\n"+r.stack}}var re=Object.prototype.hasOwnProperty,ie=r.unstable_scheduleCallback,oe=r.unstable_cancelCallback,se=r.unstable_shouldYield,ae=r.unstable_requestPaint,ue=r.unstable_now,le=r.unstable_getCurrentPriorityLevel,ce=r.unstable_ImmediatePriority,de=r.unstable_UserBlockingPriority,he=r.unstable_NormalPriority,pe=r.unstable_LowPriority,fe=r.unstable_IdlePriority,ge=r.log,me=r.unstable_setDisableYieldValue,ve=null,ye=null;function De(e){if("function"===typeof ge&&me(e),ye&&"function"===typeof ye.setStrictMode)try{ye.setStrictMode(ve,e)}catch(t){}}var _e=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(be(e)/we|0)|0},be=Math.log,we=Math.LN2;var Ee=256,Ce=262144,ke=4194304;function Se(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function xe(e,t,n){var r=e.pendingLanes;if(0===r)return 0;var i=0,o=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var a=134217727&r;return 0!==a?0!==(r=a&~o)?i=Se(r):0!==(s&=a)?i=Se(s):n||0!==(n=a&~e)&&(i=Se(n)):0!==(a=r&~o)?i=Se(a):0!==s?i=Se(s):n||0!==(n=r&~e)&&(i=Se(n)),0===i?0:0!==t&&t!==i&&0===(t&o)&&((o=i&-i)>=(n=t&-t)||32===o&&0!==(4194048&n))?t:i}function Fe(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function Ae(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Te(){var e=ke;return 0===(62914560&(ke<<=1))&&(ke=4194304),e}function Ie(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Pe(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Oe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-_e(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|261930&n}function Ne(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-_e(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Re(e,t){var n=t&-t;return 0!==((n=0!==(42&n)?1:Be(n))&(e.suspendedLanes|t))?0:n}function Be(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Le(e){return 2<(e&=-e)?8<e?0!==(134217727&e)?32:268435456:8:2}function Me(){var e=R.p;return 0!==e?e:void 0===(e=window.event)?32:Sh(e.type)}function je(e,t){var n=R.p;try{return R.p=e,t()}finally{R.p=n}}var ze=Math.random().toString(36).slice(2),Ue="__reactFiber$"+ze,He="__reactProps$"+ze,qe="__reactContainer$"+ze,We="__reactEvents$"+ze,$e="__reactListeners$"+ze,Ve="__reactHandles$"+ze,Ge="__reactResources$"+ze,Ke="__reactMarker$"+ze;function Ye(e){delete e[Ue],delete e[He],delete e[We],delete e[$e],delete e[Ve]}function Je(e){var t=e[Ue];if(t)return t;for(var n=e.parentNode;n;){if(t=n[qe]||n[Ue]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Bd(e);null!==e;){if(n=e[Ue])return n;
2e=Bd(e)}return t}n=(e=n).parentNode}return null}function Qe(e){if(e=e[Ue]||e[qe]){var t=e.tag;if(5===t||6===t||13===t||31===t||26===t||27===t||3===t)return e}return null}function Xe(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(s(33))}function Ze(e){var t=e[Ge];return t||(t=e[Ge]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function et(e){e[Ke]=!0}var tt=new Set,nt={};function rt(e,t){it(e,t),it(e+"Capture",t)}function it(e,t){for(nt[e]=t,e=0;e<t.length;e++)tt.add(t[e])}var ot=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),st={},at={};function ut(e,t,n){if(i=t,re.call(at,i)||!re.call(st,i)&&(ot.test(i)?at[i]=!0:(st[i]=!0,0)))if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":return void e.removeAttribute(t);case"boolean":var r=t.toLowerCase().slice(0,5);if("data-"!==r&&"aria-"!==r)return void e.removeAttribute(t)}e.setAttribute(t,""+n)}var i}function lt(e,t,n){if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(t)}e.setAttribute(t,""+n)}}function ct(e,t,n,r){if(null===r)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(n)}e.setAttributeNS(t,n,""+r)}}function dt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function ht(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function pt(e){if(!e._valueTracker){var t=ht(e)?"checked":"value";e._valueTracker=function(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&"undefined"!==typeof r&&"function"===typeof r.get&&"function"===typeof r.set){var i=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e,t,""+e[t])}}function ft(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ht(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function gt(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var mt=/[\n"\\]/g;function vt(e){return e.replace(mt,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function yt(e,t,n,r,i,o,s,a){e.name="",null!=s&&"function"!==typeof s&&"symbol"!==typeof s&&"boolean"!==typeof s?e.type=s:e.removeAttribute("type"),null!=t?"number"===s?(0===t&&""===e.value||e.value!=t)&&(e.value=""+dt(t)):e.value!==""+dt(t)&&(e.value=""+dt(t)):"submit"!==s&&"reset"!==s||e.removeAttribute("value"),null!=t?_t(e,s,dt(t)):null!=n?_t(e,s,dt(n)):null!=r&&e.removeAttribute("value"),null==i&&null!=o&&(e.defaultChecked=!!o),null!=i&&(e.checked=i&&"function"!==typeof i&&"symbol"!==typeof i),null!=a&&"function"!==typeof a&&"symbol"!==typeof a&&"boolean"!==typeof a?e.name=""+dt(a):e.removeAttribute("name")}function Dt(e,t,n,r,i,o,s,a){if(null!=o&&"function"!==typeof o&&"symbol"!==typeof o&&"boolean"!==typeof o&&(e.type=o),null!=t||null!=n){if(!("submit"!==o&&"reset"!==o||void 0!==t&&null!==t))return void pt(e);n=null!=n?""+dt(n):"",t=null!=t?""+dt(t):n,a||t===e.value||(e.value=t),e.defaultValue=t}r="function"!==typeof(r=null!=r?r:i)&&"symbol"!==typeof r&&!!r,e.checked=a?e.checked:!!r,e.defaultChecked=!!r,null!=s&&"function"!==typeof s&&"symbol"!==typeof s&&"boolean"!==typeof s&&(e.name=s),pt(e)}function _t(e,t,n){"number"===t&>(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function bt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+dt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function wt(e,t,n){null==t||((t=""+dt(t))!==e.value&&(e.value=t),null!=n)?e.defaultValue=null!=n?""+dt(n):"":e.defaultValue!==t&&(e.defaultValue=t)}function Et(e,t,n,r){if(null==t){if(null!=r){if(null!=n)throw Error(s(92));if(O(r)){if(1<r.length)throw Error(s(93));r=r[0]}n=r}null==n&&(n=""),t=n}n=dt(t),e.defaultValue=n,(r=e.textContent)===n&&""!==r&&null!==r&&(e.value=r),pt(e)}function Ct(e,t){if(t){var n=e.firstChild;
2if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var kt=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function St(e,t,n){var r=0===t.indexOf("--");null==n||"boolean"===typeof n||""===n?r?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":r?e.setProperty(t,n):"number"!==typeof n||0===n||kt.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function xt(e,t,n){if(null!=t&&"object"!==typeof t)throw Error(s(62));if(e=e.style,null!=n){for(var r in n)!n.hasOwnProperty(r)||null!=t&&t.hasOwnProperty(r)||(0===r.indexOf("--")?e.setProperty(r,""):"float"===r?e.cssFloat="":e[r]="");for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&St(e,i,r)}else for(var o in t)t.hasOwnProperty(o)&&St(e,o,t[o])}function Ft(e){if(-1===e.indexOf("-"))return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var At=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode
2-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Tt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function It(e){return Tt.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Pt(){}var Ot=null;function Nt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Rt=null,Bt=null;function Lt(e){var t=Qe(e);if(t&&(e=t.stateNode)){var n=e[He]||null;e:switch(e=t.stateNode,t.type){case"input":if(yt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+vt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[He]||null;if(!i)throw Error(s(90));yt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)(r=n[t]).form===e.form&&ft(r)}break e;case"textarea":wt(e,n.value,n.defaultValue);break e;case"select":null!=(t=n.value)&&bt(e,!!n.multiple,t,!1)}}}var Mt=!1;function jt(e,t,n){if(Mt)return e(t,n);Mt=!0;try{return e(t)}finally{if(Mt=!1,(null!==Rt||null!==Bt)&&(Zl(),Rt&&(t=Rt,e=Bt,Bt=Rt=null,Lt(t),e)))for(t=0;t<e.length;t++)Lt(e[t])}}function zt(e,t){var n=e.stateNode;if(null===n)return null;var r=n[He]||null;if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(s(231,t,typeof n));return n}var Ut=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),Ht=!1;if(Ut)try{var qt={};Object.defineProperty(qt,"passive",{get:function(){Ht=!0}}),window.addEventListener("test",qt,qt),window.removeEventListener("test",qt,qt)}catch(Qh){Ht=!1}var Wt=null,$t=null,Vt=null;function Gt(){if(Vt)return Vt;var e,t,n=$t,r=n.length,i="value"in Wt?Wt.value:Wt.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var s=r-e;for(t=1;t<=s&&n[r-t]===i[o-t];t++);return Vt=i.slice(e,1<t?1-t:void 0)}function Kt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Yt(){return!0}function Jt(){return!1}function Qt(e){function t(t,n,r,i,o){for(var s in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(s)&&(t=e[s],this[s]=t?t(i):i[s]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?Yt:Jt,this.isPropagationStopped=Jt,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Yt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Yt)},persist:function(){},isPersistent:Yt}),t}var Xt,Zt,en,tn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nn=Qt(tn),rn=p({},tn,{view:0,detail:0}),on=Qt(rn),sn=p({},rn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.from
vendor: 4,404 bytes, line 2
2Element===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==en&&(en&&"mousemove"===e.type?(Xt=e.screenX-en.screenX,Zt=e.screenY-en.screenY):Zt=Xt=0,en=e),Xt)},movementY:function(e){return"movementY"in e?e.movementY:Zt}}),an=Qt(sn),un=Qt(p({},sn,{dataTransfer:0})),ln=Qt(p({},rn,{relatedTarget:0})),cn=Qt(p({},tn,{animationName:0,elapsedTime:0,pseudoElement:0})),dn=Qt(p({},tn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),hn=Qt(p({},tn,{data:0})),pn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},fn={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"},gn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=gn[e])&&!!t[e]}function vn(){return mn}var yn=Qt(p({},rn,{key:function(e){if(e.key){var t=pn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Kt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?fn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vn,charCode:function(e){return"keypress"===e.type?Kt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Kt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),Dn=Qt(p({},sn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),_n=Qt(p({},rn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vn})),bn=Qt(p({},tn,{propertyName:0,elapsedTime:0,pseudoElement:0})),wn=Qt(p({},sn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),En=Qt(p({},tn,{newState:0,oldState:0})),Cn=[9,13,27,32],kn=Ut&&"CompositionEvent"in window,Sn=null;Ut&&"documentMode"in document&&(Sn=document.documentMode);var xn=Ut&&"TextEvent"in window&&!Sn,Fn=Ut&&(!kn||Sn&&8<Sn&&11>=Sn),An=String.fromCharCode(32),Tn=!1;function In(e,t){switch(e){case"keyup":return-1!==Cn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Pn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var On=!1;var Nn={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 Rn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Nn[e.type]:"textarea"===t}function Bn(e,t,n,r){Rt?Bt?Bt.push(r):Bt=[r]:Rt=r,0<(t=rd(t,"onChange")).length&&(n=new nn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ln=null,Mn=null;function jn(e){Yc(e,0)}function zn(e){if(ft(Xe(e)))return e}function Un(e,t){if("change"===e)return t}var Hn=!1;if(Ut){var qn;if(Ut){var Wn="oninput"in document;if(!Wn){var $n=document.createElement("div");$n.setAttribute("oninput","return;"),Wn="function"===typeof $n.oninput}qn=Wn}else qn=!1;Hn=qn&&(!document.documentMode||9<document.documentMode)}function Vn(){Ln&&(Ln.detachEvent("onpropertychange",Gn),Mn=Ln=null)}function Gn(e){if("value"===e.propertyName&&zn(Mn)){var t=[];Bn(t,Mn,e,Nt(e)),jt(jn,t)}}function Kn(e,t,n){"focusin"===e?(Vn(),Mn=n,(Ln=t).attachEvent("onpropertychange",Gn)):"focusout"===e&&Vn()}function Yn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return zn(Mn)}function Jn(e,t){if("click"===e)return zn(t)}function Qn(e,t){if("input"===e||"change"===e)return zn(t)}var Xn="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function Zn(e,t){if(Xn(e,t))return!0;
2if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!re.call(t,i)||!Xn(e[i],t[i]))return!1}return!0}function er(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function tr(e,t){var n,r=er(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=er(r)}}function nr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?nr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function rr(e){for(var t=gt((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=gt((e=t.contentWindow).document)}return t}function ir(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var or=Ut&&"documentMode"in document&&11>=document.documentMode,sr=null,ar=null,ur=null,lr=!1;function cr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;lr||null==sr||sr!==gt(r)||("selectionStart"in(r=sr)&&ir(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},ur&&Zn(ur,r)||(ur=r,0<(r=rd(ar,"onSelect")).length&&(t=new nn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=sr)))}function dr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var hr={animationend:dr("Animation","AnimationEnd"),animationiteration:dr("Animation","AnimationIteration"),animationstart:dr("Animation","AnimationStart"),transitionrun:dr("Transition","TransitionRun"),transitionstart:dr("Transition","TransitionStart"),transitioncancel:dr("Transition","TransitionCancel"),transitionend:dr("Transition","TransitionEnd")},pr={},fr={};function gr(e){if(pr[e])return pr[e];if(!hr[e])return e;var t,n=hr[e];for(t in n)if(n.hasOwnProperty(t)&&t in fr)return pr[e]=n[t];return e}Ut&&(fr=document.createElement("div").style,"AnimationEvent"in window||(delete hr.animationend.animation,delete hr.animationiteration.animation,delete hr.animationstart.animation),"TransitionEvent"in window||delete hr.transitionend.transition);var mr=gr("animationend"),vr=gr("animationiteration"),yr=gr("animationstart"),Dr=gr("transitionrun"),_r=gr("transitionstart"),br=gr("transitioncancel"),wr=gr("transitionend"),Er=new Map,Cr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function kr(e,t){Er.set(e,t),rt(t,[e])}Cr.push("scrollEnd");var Sr="function"===typeof reportError?reportError:function(e){if("object"===typeof window&&"function"===typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"===typeof e&&null!==e&&"string"===typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"===typeof process&&"function"===typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},xr=[],Fr=0,Ar=0;function Tr(){for(var e=Fr,t=Ar=Fr=0;t<e;){var n=xr[t];xr[t++]=null;var r=xr[t];xr[t++]=null;var i=xr[t];xr[t++]=null;var o=xr[t];if(xr[t++]=null,null!==r&&null!==i){var s=r.pending;
vendor: 14,000 bytes, line 2
2null===s?i.next=i:(i.next=s.next,s.next=i),r.pending=i}0!==o&&Nr(n,i,o)}}function Ir(e,t,n,r){xr[Fr++]=e,xr[Fr++]=t,xr[Fr++]=n,xr[Fr++]=r,Ar|=r,e.lanes|=r,null!==(e=e.alternate)&&(e.lanes|=r)}function Pr(e,t,n,r){return Ir(e,t,n,r),Rr(e)}function Or(e,t){return Ir(e,null,null,t),Rr(e)}function Nr(e,t,n){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n);for(var i=!1,o=e.return;null!==o;)o.childLanes|=n,null!==(r=o.alternate)&&(r.childLanes|=n),22===o.tag&&(null===(e=o.stateNode)||1&e._visibility||(i=!0)),e=o,o=o.return;return 3===e.tag?(o=e.stateNode,i&&null!==t&&(i=31-_e(n),null===(r=(e=o.hiddenUpdates)[i])?e[i]=[t]:r.push(t),t.lane=536870912|n),o):null}function Rr(e){if(50<Wl)throw Wl=0,$l=null,Error(s(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var Br={};function Lr(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Mr(e,t,n,r){return new Lr(e,t,n,r)}function jr(e){return!(!(e=e.prototype)||!e.isReactComponent)}function zr(e,t){var n=e.alternate;return null===n?((n=Mr(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=65011712&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Ur(e,t){e.flags&=65011714;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Hr(e,t,n,r,i,o){var a=0;if(r=e,"function"===typeof e)jr(e)&&(a=1);else if("string"===typeof e)a=function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!==typeof t.precedence||"string"!==typeof t.href||""===t.href)break;return!0;case"link":if("string"!==typeof t.rel||"string"!==typeof t.href||""===t.href||t.onLoad||t.onError)break;return"stylesheet"!==t.rel||(e=t.disabled,"string"===typeof t.precedence&&null==e);case"script":if(t.async&&"function"!==typeof t.async&&"symbol"!==typeof t.async&&!t.onLoad&&!t.onError&&t.src&&"string"===typeof t.src)return!0}return!1}(e,n,W.current)?26:"html"===e||"head"===e||"body"===e?27:5;else e:switch(e){case x:return(e=Mr(31,n,t,i)).elementType=x,e.lanes=o,e;case v:return qr(n.children,i,o,t);case y:a=8,i|=24;break;case D:return(e=Mr(12,n,t,2|i)).elementType=D,e.lanes=o,e;case E:return(e=Mr(13,n,t,i)).elementType=E,e.lanes=o,e;case C:return(e=Mr(19,n,t,i)).elementType=C,e.lanes=o,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case b:a=10;break e;case _:a=9;break e;case w:a=11;break e;case k:a=14;break e;case S:a=16,r=null;break e}a=29,n=Error(s(130,null===e?"null":typeof e,"")),r=null}return(t=Mr(a,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function qr(e,t,n,r){return(e=Mr(7,e,r,t)).lanes=n,e}function Wr(e,t,n){return(e=Mr(6,e,null,t)).lanes=n,e}function $r(e){var t=Mr(18,null,null,0);return t.stateNode=e,t}function Vr(e,t,n){return(t=Mr(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Gr=new WeakMap;function Kr(e,t){if("object"===typeof e&&null!==e){var n=Gr.get(e);return void 0!==n?n:(t={value:e,source:t,stack:ne(t)},Gr.set(e,t),t)}return{value:e,source:t,stack:ne(t)}}var Yr=[],Jr=0,Qr=null,Xr=0,Zr=[],ei=0,ti=null,ni=1,ri="";function ii(e,t){Yr[Jr++]=Xr,Yr[Jr++]=Qr,Qr=e,Xr=t}function oi(e,t,n){Zr[ei++]=ni,Zr[ei++]=ri,Zr[ei++]=ti,ti=e;var r=ni;e=ri;var i=32-_e(r)-1;r&=~(1<<i),n+=1;var o=32-_e(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,ni=1<<32-_e(t)+i|n<<i|r,ri=o+e}else ni=1<<o|n<<i|r,ri=e}function si(e){null!==e.return&&(ii(e,1),oi(e,1,0))}function ai(e){for(;e===Qr;)Qr=Yr[--Jr],Yr[Jr]=null,Xr=Yr[--Jr],Yr[Jr]=null;for(;e===ti;)ti=Zr[--ei],Zr[ei]=null,ri=Zr[--ei],Zr[ei]=null,ni=Zr[--ei],Zr[ei]=null}function ui(e,t){Zr[ei++]=ni,Zr[ei++]=ri,Zr[ei++]=ti,ni=t.id,ri=t.overflow,ti=e}var li=null,ci=null,di=!1,hi=null,pi=!1,fi=Error(s(519));function gi(e){throw bi(Kr(Error(s(418,1<arguments.length&&void 0!==arguments[1]&&arguments[1]?"text":"HTML","")),e)),fi}function mi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Ue]=e,t[He]=r,n){case"dialog":Jc("cancel",t),Jc("close",t);break;case"iframe":case"object":case"embed":Jc("load",t);break;case"video":case"audio":for(n=0;n<Gc.length;n++)Jc(Gc[n],t);break;case"source":Jc("error",t);break;case"img":case"image":case"link":Jc("error",t),Jc("load",t);break;case"details":Jc("toggle",t);break;case"input":Jc("invalid",t),Dt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Jc("invalid",t);break;case"textarea":Jc("invalid",t),Et(t,r.value,r.defaultValue,r.children)}"string"!==typeof(n=r.children)&&"number"!==typeof n&&"bigint"!==typeof n||t.textContent===""+n||!0===r.suppressHydrationWarning||ld(t.textContent,n)?(null!=r.popover&&(Jc("beforetoggle",t),Jc("toggle",t)),null!=r.onScroll&&Jc("scroll",t),null!=r.onScrollEnd&&Jc("scrollend",t),null!=r.onClick&&(t.onclick=Pt),t=!0):t=!1,t||gi(e,!0)}function vi(e){for(li=e.return;li;)switch(li.tag){case 5:case 31:case 13:return void(pi=!1);case 27:case 3:return void(pi=!0);default:li=li.return}}function yi(e){if(e!==li)return!1;if(!di)return vi(e),di=!0,!1;var t,n=e.tag;if((t=3!==n&&27!==n)&&((t=5===n)&&(t=!("form"!==(t=e.type)&&"button"!==t)||Dd(e.type,e.memoizedProps)),t=!t),t&&ci&&gi(e),vi(e),13===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(s(317));ci=Rd(e)}else if(31===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(s(317));ci=Rd(e)}else 27===n?(n=ci,Sd(e.type)?(e=Nd,Nd=null,ci=e):ci=n):ci=li?Od(e.stateNode.nextSibling):null;return!0}function Di(){ci=li=null,di=!1}function _i(){var e=hi;return null!==e&&(null===Tl?Tl=e:Tl.push.apply(Tl,e),hi=null),e}function bi(e){null===hi?hi=[e]:hi.push(e)}var wi=j(null),Ei=null,Ci=null;function ki(e,t,n){U(wi,t._currentValue),t._currentValue=n}function Si(e){e._currentValue=wi.current,z(wi)}function xi(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Fi(e,t,n,r){var i=e.child;for(null!==i&&(i.return=e);null!==i;){var o=i.dependencies;if(null!==o){var a=i.child;o=o.firstContext;e:for(;null!==o;){var u=o;o=i;for(var l=0;l<t.length;l++)if(u.context===t[l]){o.lanes|=n,null!==(u=o.alternate)&&(u.lanes|=n),xi(o.return,n,e),r||(a=null);break e}o=u.next}}else if(18===i.tag){if(null===(a=i.return))throw Error(s(341));a.lanes|=n,null!==(o=a.alternate)&&(o.lanes|=n),xi(a,n,e),a=null}else a=i.child;if(null!==a)a.return=i;else for(a=i;null!==a;){if(a===e){a=null;break}if(null!==(i=a.sibling)){i.return=a.return,a=i;break}a=a.return}i=a}}function Ai(e,t,n,r){e=null;for(var i=t,o=!1;null!==i;){if(!o)if(0!==(524288&i.flags))o=!0;else if(0!==(262144&i.flags))break;if(10===i.tag){var a=i.alternate;if(null===a)throw Error(s(387));if(null!==(a=a.memoizedProps)){var u=i.type;Xn(i.pendingProps.value,a.value)||(null!==e?e.push(u):e=[u])}}else if(i===G.current){if(null===(a=i.alternate))throw Error(s(387));a.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(null!==e?e.push(ch):e=[ch])}i=i.return}null!==e&&Fi(t,e,n,r),t.flags|=262144}function Ti(e){for(e=e.firstContext;null!==e;){if(!Xn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ii(e){Ei=e,Ci=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function Pi(e){return Ni(Ei,e)}function Oi(e,t){return null===Ei&&Ii(e),Ni(e,t)}function Ni(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},null===Ci){if(null===e)throw Error(s(308));Ci=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ci=Ci.next=t;return n}var Ri="undefined"!==typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Bi=r.unstable_scheduleCallback,Li=r.unstable_NormalPriority,Mi={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ji(){return{controller:new Ri,data:new Map,refCount:0}}function zi(e){e.refCount--,0===e.refCount&&Bi(Li,function(){e.controller.abort()})}var Ui=null,Hi=0,qi=0,Wi=null;function $i(){if(0===--Hi&&null!==Ui){null!==Wi&&(Wi.status="fulfilled");var e=Ui;Ui=null,qi=0,Wi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var Vi=N.S;N.S=function(e,t){Ol=ue(),"object"===typeof t&&null!==t&&"function"===typeof t.then&&function(e,t){if(null===Ui){var n=Ui=[];Hi=0,qi=Hc(),Wi={status:"pending",value:void 0,then:function(e){n.push(e)}}}Hi++,t.then($i,$i)}(0,t),null!==Vi&&Vi(e,t)};var Gi=j(null);function Ki(){var e=Gi.current;return null!==e?e:fl.pooledCache}function Yi(e,t){U(Gi,null===t?Gi.current:t.pool)}function Ji(){var e=Ki();return null===e?null:{parent:Mi._currentValue,pool:e}}var Qi=Error(s(460)),Xi=Error(s(474)),Zi=Error(s(542)),eo={then:function(){}};function to(e){return"fulfilled"===(e=e.status)||"rejected"===e}function no(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(Pt,Pt),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw so(e=t.reason),e;default:if("string"===typeof t.status)t.then(Pt,Pt);else{if(null!==(e=fl)&&100<e.shellSuspendCounter)throw Error(s(482));(e=t).status="pending",e.then(function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}},function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw so(e=t.reason),e}throw io=t,Qi}}function ro(e){try{return(0,e._init)(e._payload)}catch(t){if(null!==t&&"object"===typeof t&&"function"===typeof t.then)throw io=t,Qi;throw t}}var io=null;function oo(){if(null===io)throw Error(s(459));var e=io;return io=null,e}function so(e){if(e===Qi||e===Zi)throw Error(s(483))}var ao=null,uo=0;function lo(e){var t=uo;return uo+=1,null===ao&&(ao=[]),no(ao,e,t)}function co(e,t){t=t.props.ref,e.ref=void 0!==t?t:null}function ho(e,t){if(t.$$typeof===f)throw Error(s(525));throw e=Object.prototype.toString.call(t),Error(s(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function po(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function i(e,t){return(e=zr(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=67108866,n):r:(t.flags|=67108866,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=67108866),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Wr(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function l(e,t,n,r){var o=n.type;return o===v?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"===typeof o&&null!==o&&o.$$typeof===S&&ro(o)===t.type)?(co(t=i(t,n.props),n),t.return=e,t):(co(t=Hr(n.type,n.key,n.props,null,e.mode,r),n),t.return=e,t)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Vr(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,r,o){return null===t||7!==t.tag?((t=qr(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t||"bigint"===typeof t)return(t=Wr(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case g:return co(n=Hr(t.type,t.key,t.props,null,e.mode,n),t),n.return=e,n;case m:return(t=Vr(t,e.mode,n)).return=e,t;case S:return h(e,t=ro(t),n)}if(O(t)||T(t))return(t=qr(t,e.mode,n,null)).return=e,t;if("function"===typeof t.then)return h(e,lo(t),n);if(t.$$typeof===b)return h(e,Oi(e,t),n);ho(e,t)}return null}function p(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n||"bigint"===typeof n)return null!==i?null:u(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case g:return n.key===i?l(e,t,n,r):null;case m:return n.key===i?c(e,t,n,r):null;case S:return p(e,t,n=ro(n),r)}if(O(n)||T(n))return null!==i?null:d(e,t,n,r,null);if("function"===typeof n.then)return p(e,t,lo(n),r);if(n.$$typeof===b)return p(e,t,Oi(e,n),r);ho(e,n)}return null}function f(e,t,n,r,i){if("string"===typeof r&&""!==r||"number"===typeof r||"bigint"===typeof r)return u(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case g:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i);case m:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case S:return f(e,t,n,r=ro(r),i)}if(O(r)||T(r))return d(t,e=e.get(n)||null,r,i,null);if("function"===typeof r.then)return f(e,t,n,lo(r),i);if(r.$$typeof===b)return f(e,t,n,Oi(t,r),i);ho(t,r)}return null}function y(u,l,c,d){if("object"===typeof c&&null!==c&&c.type===v&&null===c.key&&
vendor: 11,718 bytes, line 2
2(c=c.props.children),"object"===typeof c&&null!==c){switch(c.$$typeof){case g:e:{for(var D=c.key;null!==l;){if(l.key===D){if((D=c.type)===v){if(7===l.tag){n(u,l.sibling),(d=i(l,c.props.children)).return=u,u=d;break e}}else if(l.elementType===D||"object"===typeof D&&null!==D&&D.$$typeof===S&&ro(D)===l.type){n(u,l.sibling),co(d=i(l,c.props),c),d.return=u,u=d;break e}n(u,l);break}t(u,l),l=l.sibling}c.type===v?((d=qr(c.props.children,u.mode,d,c.key)).return=u,u=d):(co(d=Hr(c.type,c.key,c.props,null,u.mode,d),c),d.return=u,u=d)}return a(u);case m:e:{for(D=c.key;null!==l;){if(l.key===D){if(4===l.tag&&l.stateNode.containerInfo===c.containerInfo&&l.stateNode.implementation===c.implementation){n(u,l.sibling),(d=i(l,c.children||[])).return=u,u=d;break e}n(u,l);break}t(u,l),l=l.sibling}(d=Vr(c,u.mode,d)).return=u,u=d}return a(u);case S:return y(u,l,c=ro(c),d)}if(O(c))return function(i,s,a,u){for(var l=null,c=null,d=s,g=s=0,m=null;null!==d&&g<a.length;g++){d.index>g?(m=d,d=null):m=d.sibling;var v=p(i,d,a[g],u);if(null===v){null===d&&(d=m);break}e&&d&&null===v.alternate&&t(i,d),s=o(v,s,g),null===c?l=v:c.sibling=v,c=v,d=m}if(g===a.length)return n(i,d),di&&ii(i,g),l;if(null===d){for(;g<a.length;g++)null!==(d=h(i,a[g],u))&&(s=o(d,s,g),null===c?l=d:c.sibling=d,c=d);return di&&ii(i,g),l}for(d=r(d);g<a.length;g++)null!==(m=f(d,i,g,a[g],u))&&(e&&null!==m.alternate&&d.delete(null===m.key?g:m.key),s=o(m,s,g),null===c?l=m:c.sibling=m,c=m);return e&&d.forEach(function(e){return t(i,e)}),di&&ii(i,g),l}(u,l,c,d);if(T(c)){if("function"!==typeof(D=T(c)))throw Error(s(150));return function(i,a,u,l){if(null==u)throw Error(s(151));for(var c=null,d=null,g=a,m=a=0,v=null,y=u.next();null!==g&&!y.done;m++,y=u.next()){g.index>m?(v=g,g=null):v=g.sibling;var D=p(i,g,y.value,l);if(null===D){null===g&&(g=v);break}e&&g&&null===D.alternate&&t(i,g),a=o(D,a,m),null===d?c=D:d.sibling=D,d=D,g=v}if(y.done)return n(i,g),di&&ii(i,m),c;if(null===g){for(;!y.done;m++,y=u.next())null!==(y=h(i,y.value,l))&&(a=o(y,a,m),null===d?c=y:d.sibling=y,d=y);return di&&ii(i,m),c}for(g=r(g);!y.done;m++,y=u.next())null!==(y=f(g,i,m,y.value,l))&&(e&&null!==y.alternate&&g.delete(null===y.key?m:y.key),a=o(y,a,m),null===d?c=y:d.sibling=y,d=y);return e&&g.forEach(function(e){return t(i,e)}),di&&ii(i,m),c}(u,l,c=D.call(c),d)}if("function"===typeof c.then)return y(u,l,lo(c),d);if(c.$$typeof===b)return y(u,l,Oi(u,c),d);ho(u,c)}return"string"===typeof c&&""!==c||"number"===typeof c||"bigint"===typeof c?(c=""+c,null!==l&&6===l.tag?(n(u,l.sibling),(d=i(l,c)).return=u,u=d):(n(u,l),(d=Wr(c,u.mode,d)).return=u,u=d),a(u)):n(u,l)}return function(e,t,n,r){try{uo=0;var i=y(e,t,n,r);return ao=null,i}catch(s){if(s===Qi||s===Zi)throw s;var o=Mr(29,s,null,e.mode);return o.lanes=r,o.return=e,o}}}var fo=po(!0),go=po(!1),mo=!1;function vo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function yo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Do(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function _o(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&pl)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Rr(e),Nr(e,null,n),t}return Ir(e,r,t,n),Rr(e)}function bo(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194048&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Ne(e,n)}}function wo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var s={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===o?i=o=s:o=o.next=s,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Eo=!1;function Co(){if(Eo){if(null!==Wi)throw Wi}}function ko(e,t,n,r){Eo=!1;var i=e.updateQueue;mo=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(null!==a){i.shared.pending=null;var u=a,l=u.next;u.next=null,null===s?o=l:s.next=l,s=u;var c=e.alternate;null!==c&&((a=(c=c.updateQueue).lastBaseUpdate)!==s&&(null===a?c.firstBaseUpdate=l:a.next=l,c.lastBaseUpdate=u))}if(null!==o){var d=i.baseState;for(s=0,c=l=u=null,a=o;;){var h=-536870913&a.lane,f=h!==a.lane;if(f?(ml&h)===h:(r&h)===h){0!==h&&h===qi&&(Eo=!0),null!==c&&(c=c.next={lane:0,tag:a.tag,payload:a.payload,callback:null,next:null});e:{var g=e,m=a;h=t;var v=n;switch(m.tag){case 1:if("function"===typeof(g=m.payload)){d=g.call(v,d,h);break e}d=g;break e;case 3:g.flags=-65537&g.flags|128;case 0:if(null===(h="function"===typeof(g=m.payload)?g.call(v,d,h):g)||void 0===h)break e;d=p({},d,h);break e;case 2:mo=!0}}null!==(h=a.callback)&&(e.flags|=64,f&&(e.flags|=8192),null===(f=i.callbacks)?i.callbacks=[h]:f.push(h))}else f={lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===c?(l=c=f,u=d):c=c.next=f,s|=h;if(null===(a=a.next)){if(null===(a=i.shared.pending))break;a=(f=a).next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}null===c&&(u=d),i.baseState=u,i.firstBaseUpdate=l,i.lastBaseUpdate=c,null===o&&(i.shared.lanes=0),Cl|=s,e.lanes=s,e.memoizedState=d}}function So(e,t){if("function"!==typeof e)throw Error(s(191,e));e.call(t)}function xo(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)So(n[e],t)}var Fo=j(null),Ao=j(0);function To(e,t){U(Ao,e=wl),U(Fo,t),wl=e|t.baseLanes}function Io(){U(Ao,wl),U(Fo,Fo.current)}function Po(){wl=Ao.current,z(Fo),z(Ao)}var Oo=j(null),No=null;function Ro(e){var t=e.alternate;U(zo,1&zo.current),U(Oo,e),null===No&&(null===t||null!==Fo.current||null!==t.memoizedState)&&(No=e)}function Bo(e){U(zo,zo.current),U(Oo,e),null===No&&(No=e)}function Lo(e){22===e.tag?(U(zo,zo.current),U(Oo,e),null===No&&(No=e)):Mo()}function Mo(){U(zo,zo.current),U(Oo,Oo.current)}function jo(e){z(Oo),No===e&&(No=null),z(zo)}var zo=j(0);function Uo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Id(n)||Pd(n)))return t}else if(19!==t.tag||"forwards"!==t.memoizedProps.revealOrder&&"backwards"!==t.memoizedProps.revealOrder&&"unstable_legacy-backwards"!==t.memoizedProps.revealOrder&&"together"!==t.memoizedProps.revealOrder){if(null!==t.child){t.child.return=t,t=t.child;continue}}else if(0!==(128&t.flags))return t;if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ho=0,qo=null,Wo=null,$o=null,Vo=!1,Go=!1,Ko=!1,Yo=0,Jo=0,Qo=null,Xo=0;function Zo(){throw Error(s(321))}function es(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Xn(e[n],t[n]))return!1;return!0}function ts(e,t,n,r,i,o){return Ho=o,qo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=null===e||null===e.memoizedState?ma:va,Ko=!1,o=n(r,i),Ko=!1,Go&&(o=rs(t,n,r,i)),ns(e),o}function ns(e){N.H=ga;var t=null!==Wo&&null!==Wo.next;if(Ho=0,$o=Wo=qo=null,Vo=!1,Jo=0,Qo=null,t)throw Error(s(300));null===e||Oa||null!==(e=e.dependencies)&&Ti(e)&&(Oa=!0)}function rs(e,t,n,r){qo=e;var i=0;do{if(Go&&(Qo=null),Jo=0,Go=!1,25<=i)throw Error(s(301));if(i+=1,$o=Wo=null,null!=e.updateQueue){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,null!=o.memoCache&&(o.memoCache.index=0)}N.H=ya,o=t(n,r)}while(Go);return o}function is(){var e=N.H,t=e.useState()[0];return t="function"===typeof t.then?cs(t):t,e=e.useState()[0],(null!==Wo?Wo.memoizedState:null)!==e&&(qo.flags|=1024),t}function os(){var e=0!==Yo;return Yo=0,e}function ss(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function as(e){if(Vo){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}Vo=!1}Ho=0,$o=Wo=qo=null,Go=!1,Jo=Yo=0,Qo=null}function us(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===$o?qo.memoizedState=$o=e:$o=$o.next=e,$o}function ls(){if(null===Wo){var e=qo.alternate;e=null!==e?e.memoizedState:null}else e=Wo.next;var t=null===$o?qo.memoizedState:$o.next;if(null!==t)$o=t,Wo=e;else{if(null===e){if(null===qo.alternate)throw Error(s(467));throw Error(s(310))}e={memoizedState:(Wo=e).memoizedState,baseState:Wo.baseState,baseQueue:Wo.baseQueue,queue:Wo.queue,next:null},null===$o?qo.memoizedState=$o=e:$o=$o.next=e}return $o}function cs(e){var t=Jo;return Jo+=1,null===Qo&&(Qo=[]),e=no(Qo,e,t),t=qo,null===(null===$o?t.memoizedState:$o.next)&&(t=t.alternate,N.H=null===t||null===t.memoizedState?ma:va),e}function ds(e){if(null!==e&&"object"===typeof e){if("function"===typeof e.then)return cs(e);if(e.$$typeof===b)return Pi(e)}throw Error(s(438,String(e)))}function hs(e){var t=null,n=qo.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var r=qo.alternate;null!==r&&(null!==(r=r.updateQueue)&&(null!=(r=r.memoCache)&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(null==t&&(t={data:[],index:0}),null===n&&(n={lastEffect:null,events:null,stores:null,memoCache:null},qo.updateQueue=n),n.memoCache=t,void 0===(n=t.data[t.index]))for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=F;return t.index++,n}function ps(e,t){return"function"===typeof t?t(e):t}function fs(e){return gs(ls(),Wo,e)}function gs(e,t,n){var r=e.queue;if(null===r)throw Error(s(311));r.lastRenderedReducer=n;var i=e.baseQueue,o=r.pending;if(null!==o){if(null!==i){var a=i.next;i.next=o.next,o.next=a}t.baseQueue=i=o,r.pending=null}if(o=e.baseState,null===i)e.memoizedState=o;else{var u=a=null,l=null,c=t=i.next,d=!1;do{var h=-536870913&c.lane;if(h!==c.lane?(ml&h)===h:(Ho&h)===h){var p=c.revertLane;if(0===p)null!==l&&(l=l.next={lane:0,revertLane:0,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),h===qi&&(d=!0);else{if((Ho&p)===p){c=c.next,p===qi&&(d=!0);continue}h={lane:0,revertLane:c.revertLane,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===l?(u=l=h,a=o):l=l.next=h,qo.lanes|=p,Cl|=p}h=c.action,Ko&&n(o,h),o=c.hasEagerState?c.eagerState:n(o,h)}else p={lane:h,revertLane:c.revertLane,gesture:c.gesture,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===l?(u=l=p,a=o):l=l.next=p,qo.lanes|=h,Cl|=h;c=c.next}while(null!==c&&c!==t);if(null===l?a=o:l.next=u,!Xn(o,e.memoizedState)&&(Oa=!0,d&&null!==(n=Wi)))throw n;e.memoizedState=o,e.baseState=a,e.baseQueue=l,r.lastRenderedState=o}return null===i&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ms(e){var t=ls(),n=t.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var a=i=i.next;do{o=e(o,a.action),a=a.next}while(a!==i);Xn(o,t.memoizedState)||(Oa=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function vs(e,t,n){var r=qo,i=ls(),o=di;if(o){if(void 0===n)throw Error(s(407));n=n()}else n=t();var a=!Xn((Wo||i).memoizedState,n);if(a&&(i.memoizedState=n,Oa=!0),i=i.queue,Hs(_s.bind(null,r,i,e),[e]),i.getSnapshot!==t||a||null!==$o&&1&$o.memoizedState.tag){if(r.flags|=2048,Ls(9,{destroy:void 0},Ds.bind(null,r,i,n,t),null),null===fl)throw Error(s(349));o||0!==(127&Ho)||ys(r,t,n)}return n}function ys(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=qo.updateQueue)?(t={lastEffect:null,events:null,stores:null,memoCache:null},qo.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ds(e,t,n,r){t.value=n,t.getSnapshot=r,bs(t)&&ws(e)}
vendor: 7,696 bytes, line 2
2function _s(e,t,n){return n(function(){bs(t)&&ws(e)})}function bs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Xn(e,n)}catch(r){return!0}}function ws(e){var t=Or(e,2);null!==t&&Kl(t,e,2)}function Es(e){var t=us();if("function"===typeof e){var n=e;if(e=n(),Ko){De(!0);try{n()}finally{De(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ps,lastRenderedState:e},t}function Cs(e,t,n,r){return e.baseState=n,gs(e,Wo,"function"===typeof r?r:ps)}function ks(e,t,n,r,i){if(ha(e))throw Error(s(485));if(null!==(e=t.action)){var o={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};null!==N.T?n(!0):o.isTransition=!1,r(o),null===(n=t.pending)?(o.next=t.pending=o,Ss(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ss(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var o=N.T,s={};N.T=s;try{var a=n(i,r),u=N.S;null!==u&&u(s,a),xs(e,t,a)}catch(l){As(e,t,l)}finally{null!==o&&null!==s.types&&(o.types=s.types),N.T=o}}else try{xs(e,t,o=n(i,r))}catch(c){As(e,t,c)}}function xs(e,t,n){null!==n&&"object"===typeof n&&"function"===typeof n.then?n.then(function(n){Fs(e,t,n)},function(n){return As(e,t,n)}):Fs(e,t,n)}function Fs(e,t,n){t.status="fulfilled",t.value=n,Ts(t),e.state=n,null!==(t=e.pending)&&((n=t.next)===t?e.pending=null:(n=n.next,t.next=n,Ss(e,n)))}function As(e,t,n){var r=e.pending;if(e.pending=null,null!==r){r=r.next;do{t.status="rejected",t.reason=n,Ts(t),t=t.next}while(t!==r)}e.action=null}function Ts(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Is(e,t){return t}function Ps(e,t){if(di){var n=fl.formState;if(null!==n){e:{var r=qo;if(di){if(ci){t:{for(var i=ci,o=pi;8!==i.nodeType;){if(!o){i=null;break t}if(null===(i=Od(i.nextSibling))){i=null;break t}}i="F!"===(o=i.data)||"F"===o?i:null}if(i){ci=Od(i.nextSibling),r="F!"===i.data;break e}}gi(r)}r=!1}r&&(t=n[0])}}return(n=us()).memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Is,lastRenderedState:t},n.queue=r,n=la.bind(null,qo,r),r.dispatch=n,r=Es(!1),o=da.bind(null,qo,!1,r.queue),i={state:t,dispatch:null,action:e,pending:null},(r=us()).queue=i,n=ks.bind(null,qo,i,o,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Os(e){return Ns(ls(),Wo,e)}function Ns(e,t,n){if(t=gs(e,t,Is)[0],e=fs(ps)[0],"object"===typeof t&&null!==t&&"function"===typeof t.then)try{var r=cs(t)}catch(s){if(s===Qi)throw Zi;throw s}else r=t;var i=(t=ls()).queue,o=i.dispatch;return n!==t.memoizedState&&(qo.flags|=2048,Ls(9,{destroy:void 0},Rs.bind(null,i,n),null)),[r,o,e]}function Rs(e,t){e.action=t}function Bs(e){var t=ls(),n=Wo;if(null!==n)return Ns(t,n,e);ls(),t=t.memoizedState;var r=(n=ls()).queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ls(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},null===(t=qo.updateQueue)&&(t={lastEffect:null,events:null,stores:null,memoCache:null},qo.updateQueue=t),null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ms(){return ls().memoizedState}function js(e,t,n,r){var i=us();qo.flags|=e,i.memoizedState=Ls(1|t,{destroy:void 0},n,void 0===r?null:r)}function zs(e,t,n,r){var i=ls();r=void 0===r?null:r;var o=i.memoizedState.inst;null!==Wo&&null!==r&&es(r,Wo.memoizedState.deps)?i.memoizedState=Ls(t,o,n,r):(qo.flags|=e,i.memoizedState=Ls(1|t,o,n,r))}function Us(e,t){js(8390656,8,e,t)}function Hs(e,t){zs(2048,8,e,t)}function qs(e){var t=ls().memoizedState;return function(e){qo.flags|=4;var t=qo.updateQueue;if(null===t)t={lastEffect:null,events:null,stores:null,memoCache:null},qo.updateQueue=t,t.events=[e];else{var n=t.events;null===n?t.events=[e]:n.push(e)}}({ref:t,nextImpl:e}),function(){if(0!==(2&pl))throw Error(s(440));return t.impl.apply(void 0,arguments)}}function Ws(e,t){return zs(4,2,e,t)}function $s(e,t){return zs(4,4,e,t)}function Vs(e,t){if("function"===typeof t){e=e();var n=t(e);return function(){"function"===typeof n?n():t(null)}}if(null!==t&&void 0!==t)return e=e(),t.current=e,function(){t.current=null}}function Gs(e,t,n){n=null!==n&&void 0!==n?n.concat([e]):null,zs(4,4,Vs.bind(null,t,e),n)}function Ks(){}function Ys(e,t){var n=ls();t=void 0===t?null:t;var r=n.memoizedState;return null!==t&&es(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Js(e,t){var n=ls();t=void 0===t?null:t;var r=n.memoizedState;if(null!==t&&es(t,r[1]))return r[0];if(r=e(),Ko){De(!0);try{e()}finally{De(!1)}}return n.memoizedState=[r,t],r}function Qs(e,t,n){return void 0===n||0!==(1073741824&Ho)&&0===(261930&ml)?e.memoizedState=t:(e.memoizedState=n,e=Gl(),qo.lanes|=e,Cl|=e,n)}function Xs(e,t,n,r){return Xn(n,t)?n:null!==Fo.current?(e=Qs(e,n,r),Xn(e,t)||(Oa=!0),e):0===(42&Ho)||0!==(1073741824&Ho)&&0===(261930&ml)?(Oa=!0,e.memoizedState=n):(e=Gl(),qo.lanes|=e,Cl|=e,t)}function Zs(e,t,n,r,i){var o=R.p;R.p=0!==o&&8>o?o:8;var s=N.T,a={};N.T=a,da(e,!1,t,n);try{var u=i(),l=N.S;if(null!==l&&l(a,u),null!==u&&"object"===typeof u&&"function"===typeof u.then)ca(e,t,function(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status="rejected",r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}(u,r),Vl());else ca(e,t,r,Vl())}catch(c){ca(e,t,{then:function(){},status:"rejected",reason:c},Vl())}finally{R.p=o,null!==s&&null!==a.types&&(s.types=a.types),N.T=s}}function ea(){}function ta(e,t,n,r){if(5!==e.tag)throw Error(s(476));var i=na(e).queue;Zs(e,i,t,B,null===n?ea:function(){return ra(e),n(r)})}function na(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:B,baseState:B,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ps,lastRenderedState:B},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ps,lastRenderedState:n},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function ra(e){var t=na(e);null===t.next&&(t=e.alternate.memoizedState),ca(e,t.next.queue,{},Vl())}function ia(){return Pi(ch)}function oa(){return ls().memoizedState}function sa(){return ls().memoizedState}function aa(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=Vl(),r=_o(t,e=Do(n),n);return null!==r&&(Kl(r,t,n),bo(r,t,n)),t={cache:ji()},void(e.payload=t)}t=t.return}}function ua(e,t,n){var r=Vl();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ha(e)?pa(t,n):null!==(n=Pr(e,t,n,r))&&(Kl(n,e,r),fa(n,t,r))}function la(e,t,n){ca(e,t,n,Vl())}function ca(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ha(e))pa(t,i);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(i.hasEagerState=!0,i.eagerState=a,Xn(a,s))return Ir(e,t,i,0),null===fl&&Tr(),!1}catch(u){}if(null!==(n=Pr(e,t,i,r)))return Kl(n,e,r),fa(n,t,r),!0}return!1}function da(e,t,n,r){if(r={lane:2,revertLane:Hc(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ha(e)){if(t)throw Error(s(479))}else null!==(t=Pr(e,n,r,2))&&Kl(t,e,2)}function ha(e){var t=e.alternate;return e===qo||null!==t&&t===qo}function pa(e,t){Go=Vo=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function fa(e,t,n){if(0!==(4194048&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Ne(e,n)}}var ga={readContext:Pi,use:ds,useCallback:Zo,useContext:Zo,useEffect:Zo,useImperativeHandle:Zo,useLayoutEffect:Zo,useInsertionEffect:Zo,useMemo:Zo,useReducer:Zo,useRef
2:Zo,useState:Zo,useDebugValue:Zo,useDeferredValue:Zo,useTransition:Zo,useSyncExternalStore:Zo,useId:Zo,useHostTransitionStatus:Zo,useFormState:Zo,useActionState:Zo,useOptimistic:Zo,useMemoCache:Zo,useCacheRefresh:Zo};ga.useEffectEvent=Zo;var ma={readContext:Pi,use:ds,useCallback:function(e,t){return us().memoizedState=[e,void 0===t?null:t],e},useContext:Pi,useEffect:Us,useImperativeHandle:function(e,t,n){n=null!==n&&void 0!==n?n.concat([e]):null,js(4194308,4,Vs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return js(4194308,4,e,t)},useInsertionEffect:function(e,t){js(4,2,e,t)},useMemo:function(e,t){var n=us();t=void 0===t?null:t;var r=e();if(Ko){De(!0);try{e()}finally{De(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=us();if(void 0!==n){var i=n(t);if(Ko){De(!0);try{n(t)}finally{De(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ua.bind(null,qo,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},us().memoizedState=e},useState:function(e){var t=(e=Es(e)).queue,n=la.bind(null,qo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ks,useDeferredValue:function(e,t){return Qs(us(),e,t)},useTransition:function(){var e=Es(!1);return e=Zs.bind(null,qo,e.queue,!0,!1),us().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=qo,i=us();if(di){if(void 0===n)throw Error(s(407));n=n()}else{if(n=t(),null===fl)throw Error(s(349));0!==(127&ml)||ys(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Us(_s.bind(null,r,o,e),[e]),r.flags|=2048,Ls(9,{destroy:void 0},Ds.bind(null,r,o,n,t),null),n},useId:function(){var e=us(),t=fl.identifierPrefix;if(di){var n=ri;t="_"+t+"R_"+(n=(ni&~(1<<32-_e(ni)-1)).toString(32)+n),0<(n=Yo++)&&(t+="H"+n.toString(32)),t+="_"}else t="_"+t+"r_"+(n=Xo++).toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ia,useFormState:Ps,useActionState:Ps,useOptimistic:function(e){var t=us();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=da.bind(null,qo,!0,n),n.dispatch=t,[e,t]},useMemoCache:hs,useCacheRefresh:function(){return us().memoizedState=aa.bind(null,qo)},useEffectEvent:function(e){var t=us(),n={impl:e};return t.memoizedState=n,function(){if(0!==(2&pl))throw Error(s(440));return n.impl.apply(void 0,arguments)}}},va={readContext:Pi,use:ds,useCallback:Ys,useContext:Pi,useEffect:Hs,useImperativeHandle:Gs,useInsertionEffect:Ws,useLayoutEffect:$s,useMemo:Js,useReducer:fs,useRef:Ms,useState:function(){return fs(ps)},useDebugValue:Ks,useDeferredValue:function(e,t){return Xs(ls(),Wo.memoizedState,e,t)},useTransition:function(){var e=fs(ps)[0],t=ls().memoizedState;return["boolean"===typeof e?e:cs(e),t]},useSyncExternalStore:vs,useId:oa,useHostTransitionStatus:ia,useFormState:Os,useActionState:Os,useOptimistic:function(e,t){return Cs(ls(),0,e,t)},useMemoCache:hs,useCacheRefresh:sa};va.useEffectEvent=qs;var ya={readContext:Pi,use:ds,useCallback:Ys,useContext:Pi,useEffect:Hs,useImperativeHandle:Gs,useInsertionEffect:Ws,useLayoutEffect:$s,useMemo:Js,useReducer:ms,useRef:Ms,useState:function(){return ms(ps)},useDebugValue:Ks,useDeferredValue:function(e,t){var n=ls();return null===Wo?Qs(n,e,t):Xs(n,Wo.memoizedState,e,t)},useTransition:function(){var e=ms(ps)[0],t=ls().memoizedState;return["boolean"===typeof e?e:cs(e),t]},useSyncExternalStore:vs,useId:oa,useHostTransitionStatus:ia,useFormState:Bs,useActionState:Bs,useOptimistic:function(e,t){var n=ls();return null!==Wo?Cs(n,0,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:hs,useCacheRefresh:sa};function Da(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:p({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}ya.useEffectEvent=qs;var _a={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Vl(),i=Do(r);i.payload=t,void 0!==n&&null!==n&&(i.callback=n),null!==(t=_o(e,i,r))&&(Kl(t,e,r),bo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Vl(),i=Do(r);i.tag=1,i.payload=t,void 0!==n&&null!==n&&(i.callback=n),null!==(t=_o(e,i,r))&&(Kl(t,e,r),bo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Vl(),r=Do(n);r.tag=2,void 0!==t&&null!==t&&(r.callback=t),null!==(t=_o(e,r,n))&&(Kl(t,e,n),bo(t,e,n))}};function ba(e,t,n,r,i,o,s){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,s):!t.prototype||!t.prototype.isPureReactComponent||(!Zn(n,r)||!Zn(i,o))}function wa(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&_a.enqueueReplaceState(t,t.state,null)}function Ea(e,t){var n=t;if("ref"in t)for(var r in n={},t)"ref"!==r&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=p({},n)),e)void 0===n[i]&&(n[i]=e[i]);return n}function Ca(e){Sr(e)}function ka(e){console.error(e)}function Sa(e){Sr(e)}function xa(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}
2function Fa(e,t,n){try{(0,e.onCaughtError)(n.value,{componentStack:n.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Aa(e,t,n){return(n=Do(n)).tag=3,n.payload={element:null},n.callback=function(){xa(e,t)},n}function Ta(e){return(e=Do(e)).tag=3,e}function Ia(e,t,n,r){var i=n.type.getDerivedStateFromError;if("function"===typeof i){var o=r.value;e.payload=function(){return i(o)},e.callback=function(){Fa(t,n,r)}}var s=n.stateNode;null!==s&&"function"===typeof s.componentDidCatch&&(e.callback=function(){Fa(t,n,r),"function"!==typeof i&&(null===Bl?Bl=new Set([this]):Bl.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:null!==e?e:""})})}var Pa=Error(s(461)),Oa=!1;function Na(e,t,n,r){t.child=null===e?go(t,null,n,r):fo(t,e.child,n,r)}function Ra(e,t,n,r,i){n=n.render;var o=t.ref;if("ref"in r){var s={};for(var a in r)"ref"!==a&&(s[a]=r[a])}else s=r;return Ii(t),r=ts(e,t,n,s,o,i),a=os(),null===e||Oa?(di&&a&&si(t),t.flags|=1,Na(e,t,r,i),t.child):(ss(e,t,i),iu(e,t,i))}function Ba(e,t,n,r,i){if(null===e){var o=n.type;return"function"!==typeof o||jr(o)||void 0!==o.defaultProps||null!==n.compare?((e=Hr(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,La(e,t,o,r,i))}if(o=e.child,!ou(e,i)){var s=o.memoizedProps;if((n=null!==(n=n.compare)?n:Zn)(s,r)&&e.ref===t.ref)return iu(e,t,i)}return t.flags|=1,(e=zr(o,r)).ref=t.ref,e.return=t,t.child=e}function La(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(Zn(o,r)&&e.ref===t.ref){if(Oa=!1,t.pendingProps=r=o,!ou(e,i))return t.lanes=e.lanes,iu(e,t,i);0!==(131072&e.flags)&&(Oa=!0)}}return Wa(e,t,n,r,i)}function Ma(e,t,n,r){var i=r.children,o=null!==e?e.memoizedState:null;if(null===e&&null===t.stateNode&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),"hidden"===r.mode){if(0!==(128&t.flags)){if(o=null!==o?o.baseLanes|n:n,null!==e){for(r=t.child=e.child,i=0;null!==r;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~o}else r=0,t.child=null;return za(e,t,o,n,r)}if(0===(536870912&n))return r=t.lanes=536870912,za(e,t,null!==o?o.baseLanes|n:n,n,r);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&Yi(0,null!==o?o.cachePool:null),null!==o?To(t,o):Io(),Lo(t)}else null!==o?(Yi(0,o.cachePool),To(t,o),Mo(),t.memoizedState=null):(null!==e&&Yi(0,null),Io(),Mo());return Na(e,t,i,n),t.child}function ja(e,t){return null!==e&&22===e.tag||null!==t.stateNode||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function za(e,t,n,r,i){var o=Ki();return o=null===o?null:{parent:Mi._currentValue,pool:o},t.memoizedState={baseLanes:n,cachePool:o},null!==e&&Yi(0,null),Io(),Lo(t),null!==e&&Ai(e,t,r,!0),t.childLanes=i,null}function Ua(e,t){return(t=Za({mode:t.mode,children:t.children},e.mode)).ref=e.ref,e.child=t,t.return=e,t}function Ha(e,t,n){return fo(t,e.child,null,n),(e=Ua(t,t.pendingProps)).flags|=2,jo(t),t.memoizedState=null,e}function qa(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=4194816);else{if("function"!==typeof n&&"object"!==typeof n)throw Error(s(284));null!==e&&e.ref===n||(t.flags|=4194816)}}function Wa(e,t,n,r,i){return Ii(t),n=ts(e,t,n,r,void 0,i),r=os(),null===e||Oa?(di&&r&&si(t),t.flags|=1,Na(e,t,n,i),t.child):(ss(e,t,i),iu(e,t,i))}function $a(e,t,n,r,i,o){return Ii(t),t.updateQueue=null,n=rs(t,r,n,i),ns(e),r=os(),null===e||Oa?(di&&r&&si(t),t.flags|=1,Na(e,t,n,o),t.child):(ss(e,t,o),iu(e,t,o))}function Va(e,t,n,r,i){if(Ii(t),null===t.stateNode){var o=Br,s=n.contextType;"object"===typeof s&&null!==s&&(o=Pi(s)),o=new n(r,o),t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,o.updater=_a,t.stateNode=o,o._reactInternals=t,(o=t.stateNode).props=r,o.state=t.memoizedState,o.refs={},vo(t),s=n.contextType,o.context="object"===typeof s&&null!==s?Pi(s):Br,o.state=t.memoizedState,"function"===typeof(s=n.getDerivedStateFromProps)&&(Da(t,n,s,r),o.state=t.memoizedState),"function"===typeof n.getDerivedStateFromProps||"function"===typeof o.getSnapshotBeforeUpdate||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||(s=o.state,"function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),s!==o.state&&_a.enqueueReplaceState(o,o.state,null),ko(t,r,o,i),Co(),o.state=t.memoizedState),"function"===typeof o.componentDidMount&&(t.flags|=4194308),r=!0}else if(null===e){o=t.stateNode;var a=t.memoizedProps,u=Ea(n,a);o.props=u;var l=o.context,c=n.contextType;s=Br,"object"===typeof c&&null!==c&&(s=Pi(c));var d=n.getDerivedStateFromProps;c="function"===typeof d||"function"===typeof o.getSnapshotBeforeUpdate,a=t.pendingProps!==a,c||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(a||l!==s)&&wa(t,o,r,s),mo=!1;var h=t.memoizedState;o.state=h,ko(t,r,o,i),Co(),l=t.memoizedState,a||h!==l||mo?("function"===typeof d&&(Da(t,n,d,r),l=t.memoizedState),(u=mo||ba(t,n,u,r,h,l,s))?(c||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||("function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"===typeof o.componentDidMount&&(t.flags|=4194308)):("function"===typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=s,r=u):("function"===typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,yo(e,t),c=Ea(n,s=t.memoizedProps),o.props=c,d=t.pendingProps,h=o.context,l=n.contextType,u=Br,"object"===typeof l&&null!==l&&(u=Pi(l)),(l="function"===typeof(a=n.getDerivedStateFromProps)||"function"===typeof o.getSnapshotBeforeUpdate)||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(s!==d||h!==u)&&wa(t,o,r,u),mo=!1,h=t.memoizedState,o.state=h,ko(t,r,o,i),Co();var p=t.memoizedState;s!==d||h!==p||mo||null!==e&&null!==e.dependencies&&Ti(e.dependencies)?("function"===typeof a&&(Da(t,n,a,r),p=t.memoizedState),(c=mo||ba(t,n,c,r,h,p,u)||null!==e&&null!==e.dependencies&&Ti(e.dependencies))?(l||"function"!==typeof o.UNSAFE_componentWillUpdate&&"function"!==typeof o.componentWillUpdate||("function"===typeof o.componentWillUpdate&&o.componentWillUpdate(r,p,u),"function"===typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,p,u)),"function"===typeof o.componentDidUpdate&&(t.flags|=4),"function"===typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof o.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),o.props=r,o.state=p,o.context=u,r=c):("function"!==typeof o.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return o=r,qa(e,t),r=0!==(128&t.flags),o||r?(o=t.stateNode,n=r&&"function"!==typeof n.getDerivedStateFromError?null:o.render(),t.flags|=1,null!==e&&r?(t.child=fo(t,e.child,null,i),t.child=fo(t,null,n,i)):Na(e,t,n,i),t.memoizedState=o.state,e=t.child):e=iu(e,t,i),e}function Ga(e,t,n,r){return Di(),t.flags|=256,Na(e,t,n,r),t.child}var Ka={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ya(e){return{baseLanes:e,cachePool:Ji()}}function Ja(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=xl),e}
vendor: 4,349 bytes, line 2
2function Qa(e,t,n){var r,i=t.pendingProps,o=!1,a=0!==(128&t.flags);if((r=a)||(r=(null===e||null!==e.memoizedState)&&0!==(2&zo.current)),r&&(o=!0,t.flags&=-129),r=0!==(32&t.flags),t.flags&=-33,null===e){if(di){if(o?Ro(t):Mo(),(e=ci)?null!==(e=null!==(e=Td(e,pi))&&"&"!==e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==ti?{id:ni,overflow:ri}:null,retryLane:536870912,hydrationErrors:null},(n=$r(e)).return=t,t.child=n,li=t,ci=null):e=null,null===e)throw gi(t);return Pd(e)?t.lanes=32:t.lanes=536870912,null}var u=i.children;return i=i.fallback,o?(Mo(),u=Za({mode:"hidden",children:u},o=t.mode),i=qr(i,o,n,null),u.return=t,i.return=t,u.sibling=i,t.child=u,(i=t.child).memoizedState=Ya(n),i.childLanes=Ja(e,r,n),t.memoizedState=Ka,ja(null,i)):(Ro(t),Xa(t,u))}var l=e.memoizedState;if(null!==l&&null!==(u=l.dehydrated)){if(a)256&t.flags?(Ro(t),t.flags&=-257,t=eu(e,t,n)):null!==t.memoizedState?(Mo(),t.child=e.child,t.flags|=128,t=null):(Mo(),u=i.fallback,o=t.mode,i=Za({mode:"visible",children:i.children},o),(u=qr(u,o,n,null)).flags|=2,i.return=t,u.return=t,i.sibling=u,t.child=i,fo(t,e.child,null,n),(i=t.child).memoizedState=Ya(n),i.childLanes=Ja(e,r,n),t.memoizedState=Ka,t=ja(null,i));else if(Ro(t),Pd(u)){if(r=u.nextSibling&&u.nextSibling.dataset)var c=r.dgst;r=c,(i=Error(s(419))).stack="",i.digest=r,bi({value:i,source:null,stack:null}),t=eu(e,t,n)}else if(Oa||Ai(e,t,n,!1),r=0!==(n&e.childLanes),Oa||r){if(null!==(r=fl)&&(0!==(i=Re(r,n))&&i!==l.retryLane))throw l.retryLane=i,Or(e,i),Kl(r,e,i),Pa;Id(u)||sc(),t=eu(e,t,n)}else Id(u)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,ci=Od(u.nextSibling),li=t,di=!0,hi=null,pi=!1,null!==e&&ui(t,e),(t=Xa(t,i.children)).flags|=4096);return t}return o?(Mo(),u=i.fallback,o=t.mode,c=(l=e.child).sibling,(i=zr(l,{mode:"hidden",children:i.children})).subtreeFlags=65011712&l.subtreeFlags,null!==c?u=zr(c,u):(u=qr(u,o,n,null)).flags|=2,u.return=t,i.return=t,i.sibling=u,t.child=i,ja(null,i),i=t.child,null===(u=e.child.memoizedState)?u=Ya(n):(null!==(o=u.cachePool)?(l=Mi._currentValue,o=o.parent!==l?{parent:l,pool:l}:o):o=Ji(),u={baseLanes:u.baseLanes|n,cachePool:o}),i.memoizedState=u,i.childLanes=Ja(e,r,n),t.memoizedState=Ka,ja(e.child,i)):(Ro(t),e=(n=e.child).sibling,(n=zr(n,{mode:"visible",children:i.children})).return=t,n.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function Xa(e,t){return(t=Za({mode:"visible",children:t},e.mode)).return=e,e.child=t}function Za(e,t){return(e=Mr(22,e,null,t)).lanes=0,e}function eu(e,t,n){return fo(t,e.child,null,n),(e=Xa(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function tu(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),xi(e.return,t,n)}function nu(e,t,n,r,i,o){var s=e.memoizedState;null===s?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:o}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i,s.treeForkCount=o)}function ru(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;r=r.children;var s=zo.current,a=0!==(2&s);if(a?(s=1&s|2,t.flags|=128):s&=1,U(zo,s),Na(e,t,r,n),r=di?Xr:0,!a&&null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&tu(e,n,t);else if(19===e.tag)tu(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Uo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),nu(t,!1,i,n,o,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Uo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}nu(t,!0,n,null,o,r);break;case"together":nu(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function iu(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Cl|=t.lanes,0===(n&t.childLanes)){if(null===e)return null;if(Ai(e,t,n,!1),0===(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(s(153));if(null!==t.child){for(n=zr(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;
vendor: 9,778 bytes, line 2
2)e=e.sibling,(n=n.sibling=zr(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function ou(e,t){return 0!==(e.lanes&t)||!(null===(e=e.dependencies)||!Ti(e))}function su(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)Oa=!0;else{if(!ou(e,n)&&0===(128&t.flags))return Oa=!1,function(e,t,n){switch(t.tag){case 3:K(t,t.stateNode.containerInfo),ki(0,Mi,e.memoizedState.cache),Di();break;case 27:case 5:J(t);break;case 4:K(t,t.stateNode.containerInfo);break;case 10:ki(0,t.type,t.memoizedProps.value);break;case 31:if(null!==t.memoizedState)return t.flags|=128,Bo(t),null;break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(Ro(t),t.flags|=128,null):0!==(n&t.child.childLanes)?Qa(e,t,n):(Ro(t),null!==(e=iu(e,t,n))?e.sibling:null);Ro(t);break;case 19:var i=0!==(128&e.flags);if((r=0!==(n&t.childLanes))||(Ai(e,t,n,!1),r=0!==(n&t.childLanes)),i){if(r)return ru(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),U(zo,zo.current),r)break;return null;case 22:return t.lanes=0,Ma(e,t,n,t.pendingProps);case 24:ki(0,Mi,e.memoizedState.cache)}return iu(e,t,n)}(e,t,n);Oa=0!==(131072&e.flags)}else Oa=!1,di&&0!==(1048576&t.flags)&&oi(t,Xr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=ro(t.elementType),t.type=e,"function"!==typeof e){if(void 0!==e&&null!==e){var i=e.$$typeof;if(i===w){t.tag=11,t=Ra(null,t,e,r,n);break e}if(i===k){t.tag=14,t=Ba(null,t,e,r,n);break e}}throw t=P(e)||e,Error(s(306,t,""))}jr(e)?(r=Ea(e,r),t.tag=1,t=Va(null,t,e,r,n)):(t.tag=0,t=Wa(null,t,e,r,n))}return t;case 0:return Wa(e,t,t.type,t.pendingProps,n);case 1:return Va(e,t,r=t.type,i=Ea(r,t.pendingProps),n);case 3:e:{if(K(t,t.stateNode.containerInfo),null===e)throw Error(s(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,yo(e,t),ko(t,r,null,n);var a=t.memoizedState;if(r=a.cache,ki(0,Mi,r),r!==o.cache&&Fi(t,[Mi],n,!0),Co(),r=a.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:a.cache},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Ga(e,t,r,n);break e}if(r!==i){bi(i=Kr(Error(s(424)),t)),t=Ga(e,t,r,n);break e}if(9===(e=t.stateNode.containerInfo).nodeType)e=e.body;else e="HTML"===e.nodeName?e.ownerDocument.body:e;for(ci=Od(e.firstChild),li=t,di=!0,hi=null,pi=!0,n=go(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(Di(),r===i){t=iu(e,t,n);break e}Na(e,t,r,n)}t=t.child}return t;case 26:return qa(e,t),null===e?(n=$d(t.type,null,t.pendingProps,null))?t.memoizedState=n:di||(n=t.type,e=t.pendingProps,(r=md(V.current).createElement(n))[Ue]=t,r[He]=e,hd(r,n,e),et(r),t.stateNode=r):t.memoizedState=$d(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return J(t),null===e&&di&&(r=t.stateNode=Ld(t.type,t.pendingProps,V.current),li=t,pi=!0,i=ci,Sd(t.type)?(Nd=i,ci=Od(r.firstChild)):ci=i),Na(e,t,t.pendingProps.children,n),qa(e,t),null===e&&(t.flags|=4194304),t.child;case 5:return null===e&&di&&((i=r=ci)&&(null!==(r=function(e,t,n,r){for(;1===e.nodeType;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&("INPUT"!==e.nodeName||"hidden"!==e.type))break}else if(r){if(!e[Ke])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(o=e.getAttribute("rel"))&&e.hasAttribute("data-precedence"))break;if(o!==i.rel||e.getAttribute("href")!==(null==i.href||""===i.href?null:i.href)||e.getAttribute("crossorigin")!==(null==i.crossOrigin?null:i.crossOrigin)||e.getAttribute("title")!==(null==i.title?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((o=e.getAttribute("src"))!==(null==i.src?null:i.src)||e.getAttribute("type")!==(null==i.type?null:i.type)||e.getAttribute("crossorigin")!==(null==i.crossOrigin?null:i.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var o=null==i.name?null:""+i.name;if("hidden"===i.type&&e.getAttribute("name")===o)return e}if(null===(e=Od(e.nextSibling)))break}return null}(r,t.type,t.pendingProps,pi))?(t.stateNode=r,li=t,ci=Od(r.firstChild),pi=!1,i=!0):i=!1),i||gi(t)),J(t),i=t.type,o=t.pendingProps,a=null!==e?e.memoizedProps:null,r=o.children,Dd(i,o)?r=null:null!==a&&Dd(i,a)&&(t.flags|=32),null!==t.memoizedState&&(i=ts(e,t,is,null,null,n),ch._currentValue=i),qa(e,t),Na(e,t,r,n),t.child;case 6:return null===e&&di&&((e=n=ci)&&(null!==(n=function(e,t,n){if(""===t)return null;for(;3!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!n)return null;if(null===(e=Od(e.nextSibling)))return null}return e}(n,t.pendingProps,pi))?(t.stateNode=n,li=t,ci=null,e=!0):e=!1),e||gi(t)),null;case 13:return Qa(e,t,n);case 4:return K(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=fo(t,null,r,n):Na(e,t,r,n),t.child;case 11:return Ra(e,t,t.type,t.pendingProps,n);case 7:return Na(e,t,t.pendingProps,n),t.child;case 8:case 12:return Na(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,ki(0,t.type,r.value),Na(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,Ii(t),r=r(i=Pi(i)),t.flags|=1,Na(e,t,r,n),t.child;case 14:return Ba(e,t,t.type,t.pendingProps,n);case 15:return La(e,t,t.type,t.pendingProps,n);case 19:return ru(e,t,n);case 31:return function(e,t,n){var r=t.pendingProps,i=0!==(128&t.flags);if(t.flags&=-129,null===e){if(di){if("hidden"===r.mode)return e=Ua(t,r),t.lanes=536870912,ja(null,e);if(Bo(t),(e=ci)?null!==(e=null!==(e=Td(e,pi))&&"&"===e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==ti?{id:ni,overflow:ri}:null,retryLane:536870912,hydrationErrors:null},(n=$r(e)).return=t,t.child=n,li=t,ci=null):e=null,null===e)throw gi(t);return t.lanes=536870912,null}return Ua(t,r)}var o=e.memoizedState;if(null!==o){var a=o.dehydrated;if(Bo(t),i)if(256&t.flags)t.flags&=-257,t=Ha(e,t,n);else{if(null===t.memoizedState)throw Error(s(558));t.child=e.child,t.flags|=128,t=null}else if(Oa||Ai(e,t,n,!1),i=0!==(n&e.childLanes),Oa||i){if(null!==(r=fl)&&0!==(a=Re(r,n))&&a!==o.retryLane)throw o.retryLane=a,Or(e,a),Kl(r,e,a),Pa;sc(),t=Ha(e,t,n)}else e=o.treeContext,ci=Od(a.nextSibling),li=t,di=!0,hi=null,pi=!1,null!==e&&ui(t,e),(t=Ua(t,r)).flags|=4096;return t}return(e=zr(e.child,{mode:r.mode,children:r.children})).ref=t.ref,t.child=e,e.return=t,e}(e,t,n);case 22:return Ma(e,t,n,t.pendingProps);case 24:return Ii(t),r=Pi(Mi),null===e?(null===(i=Ki())&&(i=fl,o=ji(),i.pooledCache=o,o.refCount++,null!==o&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},vo(t),ki(0,Mi,i)):(0!==(e.lanes&n)&&(yo(e,t),ko(t,null,null,n),Co()),i=e.memoizedState,o=t.memoizedState,i.parent!==r?(i={parent:r,cache:r},t.memoizedState=i,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=i),ki(0,Mi,r)):(r=o.cache,ki(0,Mi,r),r!==i.cache&&Fi(t,[Mi],n,!0))),Na(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function au(e){e.flags|=4}function uu(e,t,n,r,i){if((t=0!==(32&e.mode))&&(t=!1),t){if(e.flags|=16777216,(335544128&i)===i)if(e.stateNode.complete)e.flags|=8192;else{if(!rc())throw io=eo,Xi;e.flags|=8192}}else e.flags&=-16777217}function lu(e,t){if("stylesheet"!==t.type||0!==(4&t.state.loading))e.flags&=-16777217;else if(e.flags|=16777216,!ih(t)){if(!rc())throw io=eo,Xi;e.flags|=8192}}function cu(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?Te():536870912,e.lanes|=t,Fl|=t)}function du(e,t){if(!di)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function hu(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=65011712&i.subtreeFlags,r|=65011712&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function pu(e,t,n){var r=t.pendingProps;switch(ai(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return hu(t),null;case 3:return n=t.stateNode,r=null,null!==e&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Si(Mi),Y(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(yi(t)?au(t):null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,_i())),hu(t),null;case 26:var i=t.type,o=t.memoizedState;return null===e?(au(t),null!==o?(hu(t),lu(t,o)):(hu(t),uu(t,i,0,0,n))):o?o!==e.memoizedState?(au(t),hu(t),lu(t,o)):(hu(t),t.flags&=-16777217):((e=e.memoizedProps)!==r&&au(t),hu(t),uu(t,i,0,0,n)),null;case 27:if(Q(t),n=V.current,i=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&au(t);else{if(!r){if(null===t.stateNode)throw Error(s(166));return hu(t),null}e=W.current,yi(t)?mi(t):(e=Ld(i,r,n),t.stateNode=e,au(t))}return hu(t),null;case 5:if(Q(t),i=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&au(t);else{if(!r){if(null===t.stateNode)throw Error(s(166));return hu(t),null}if(o=W.current,yi(t))mi(t);else{var a=md(V.current);switch(o){case 1:o=a.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:o=a.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":o=a.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":o=a.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":(o=a.createElement("div")).innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o="string"===typeof r.is?a.createElement("select",{is:r.is}
vendor: 36,910 bytes, line 2
2):a.createElement("select"),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o="string"===typeof r.is?a.createElement(i,{is:r.is}):a.createElement(i)}}o[Ue]=t,o[He]=r;e:for(a=t.child;null!==a;){if(5===a.tag||6===a.tag)o.appendChild(a.stateNode);else if(4!==a.tag&&27!==a.tag&&null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;null===a.sibling;){if(null===a.return||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}t.stateNode=o;e:switch(hd(o,i,r),i){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&au(t)}}return hu(t),uu(t,t.type,null===e||e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&au(t);else{if("string"!==typeof r&&null===t.stateNode)throw Error(s(166));if(e=V.current,yi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(i=li))switch(i.tag){case 27:case 5:r=i.memoizedProps}e[Ue]=t,(e=!!(e.nodeValue===n||null!==r&&!0===r.suppressHydrationWarning||ld(e.nodeValue,n)))||gi(t,!0)}else(e=md(e).createTextNode(r))[Ue]=t,t.stateNode=e}return hu(t),null;case 31:if(n=t.memoizedState,null===e||null!==e.memoizedState){if(r=yi(t),null!==n){if(null===e){if(!r)throw Error(s(318));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(s(557));e[Ue]=t}else Di(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;hu(t),e=!1}else n=_i(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return 256&t.flags?(jo(t),t):(jo(t),null);if(0!==(128&t.flags))throw Error(s(558))}return hu(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(i=yi(t),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(s(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(s(317));i[Ue]=t}else Di(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;hu(t),i=!1}else i=_i(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return 256&t.flags?(jo(t),t):(jo(t),null)}return jo(t),0!==(128&t.flags)?(t.lanes=n,t):(n=null!==r,e=null!==e&&null!==e.memoizedState,n&&(i=null,null!==(r=t.child).alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(i=r.alternate.memoizedState.cachePool.pool),o=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),cu(t,t.updateQueue),hu(t),null);case 4:return Y(),null===e&&Zc(t.stateNode.containerInfo),hu(t),null;case 10:return Si(t.type),hu(t),null;case 19:if(z(zo),null===(r=t.memoizedState))return hu(t),null;if(i=0!==(128&t.flags),null===(o=r.rendering))if(i)du(r,!1);else{if(0!==El||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(o=Uo(e))){for(t.flags|=128,du(r,!1),e=o.updateQueue,t.updateQueue=e,cu(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)Ur(n,e),n=n.sibling;return U(zo,1&zo.current|2),di&&ii(t,r.treeForkCount),t.child}e=e.sibling}null!==r.tail&&ue()>Nl&&(t.flags|=128,i=!0,du(r,!1),t.lanes=4194304)}else{if(!i)if(null!==(e=Uo(o))){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,cu(t,e),du(r,!0),null===r.tail&&"hidden"===r.tailMode&&!o.alternate&&!di)return hu(t),null}else 2*ue()-r.renderingStartTime>Nl&&536870912!==n&&(t.flags|=128,i=!0,du(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(null!==(e=r.last)?e.sibling=o:t.child=o,r.last=o)}return null!==r.tail?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ue(),e.sibling=null,n=zo.current,U(zo,i?1&n|2:1&n),di&&ii(t,r.treeForkCount),e):(hu(t),null);case 22:case 23:return jo(t),Po(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?0!==(536870912&n)&&0===(128&t.flags)&&(hu(t),6&t.subtreeFlags&&(t.flags|=8192)):hu(t),null!==(n=t.updateQueue)&&cu(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&z(Gi),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Si(Mi),hu(t),null;case 25:case 30:return null}throw Error(s(156,t.tag))}function fu(e,t){switch(ai(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Si(Mi),Y(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return Q(t),null;case 31:if(null!==t.memoizedState){if(jo(t),null===t.alternate)throw Error(s(340));Di()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(jo(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(s(340));Di()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return z(zo),null;case 4:return Y(),null;case 10:return Si(t.type),null;case 22:case 23:return jo(t),Po(),null!==e&&z(Gi),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return Si(Mi),null;default:return null}}function gu(e,t){switch(ai(t),t.tag){case 3:Si(Mi),Y();break;case 26:case 27:case 5:Q(t);break;case 4:Y();break;case 31:null!==t.memoizedState&&jo(t);break;case 13:jo(t);break;case 19:z(zo);break;case 10:Si(t.type);break;case 22:case 23:jo(t),Po(),null!==e&&z(Gi);break;case 24:Si(Mi)}}function mu(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var o=n.create,s=n.inst;r=o(),s.destroy=r}n=n.next}while(n!==i)}}catch(a){Ec(t,t.return,a)}}function vu(e,t,n){try{var r=t.updateQueue,i=null!==r?r.lastEffect:null;if(null!==i){var o=i.next;r=o;do{if((r.tag&e)===e){var s=r.inst,a=s.destroy;if(void 0!==a){s.destroy=void 0,i=t;var u=n,l=a;try{l()}catch(c){Ec(i,u,c)}}}r=r.next}while(r!==o)}}catch(c){Ec(t,t.return,c)}}function yu(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{xo(t,n)}catch(r){Ec(e,e.return,r)}}}function Du(e,t,n){n.props=Ea(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Ec(e,t,r)}}function _u(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;default:r=e.stateNode}"function"===typeof n?e.refCleanup=n(r):n.current=r}}catch(i){Ec(e,t,i)}}function bu(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"===typeof r)try{r()}catch(i){Ec(e,t,i)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"===typeof n)try{n(null)}catch(o){Ec(e,t,o)}else n.current=null}function wu(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(i){Ec(e,e.return,i)}}function Eu(e,t,n){try{var r=e.stateNode;!function(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,o=null,a=null,u=null,l=null,c=null,d=null;for(f in n){var h=n[f];if(n.hasOwnProperty(f)&&null!=h)switch(f){case"checked":case"value":break;case"defaultValue":l=h;default:r.hasOwnProperty(f)||cd(e,t,f,null,r,h)}}for(var p in r){var f=r[p];if(h=n[p],r.hasOwnProperty(p)&&(null!=f||null!=h))switch(p){case"type":o=f;break;case"name":i=f;break;case"checked":c=f;break;case"defaultChecked":d=f;break;case"value":a=f;break;case"defaultValue":u=f;break;case"children":case"dangerouslySetInnerHTML":if(null!=f)throw Error(s(137,t));break;default:f!==h&&cd(e,t,p,f,r,h)}}return void yt(e,a,u,l,c,d,o,i);case"select":for(o in f=a=u=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&null!=l)switch(o){case"value":break;case"multiple":f=l;default:r.hasOwnProperty(o)||cd(e,t,o,null,r,l)}for(i in r)if(o=r[i],l=n[i],r.hasOwnProperty(i)&&(null!=o||null!=l))switch(i){case"value":p=o;break;case"defaultValue":u=o;break;case"multiple":a=o;default:o!==l&&cd(e,t,i,o,r,l)}return t=u,n=a,r=f,void(null!=p?bt(e,!!n,p,!1):!!r!==!!n&&(null!=t?bt(e,!!n,t,!0):bt(e,!!n,n?[]:"",!1)));case"textarea":for(u in f=p=null,n)if(i=n[u],n.hasOwnProperty(u)&&null!=i&&!r.hasOwnProperty(u))switch(u){case"value":case"children":break;default:cd(e,t,u,null,r,i)}for(a in r)if(i=r[a],o=n[a],r.hasOwnProperty(a)&&(null!=i||null!=o))switch(a){case"value":p=i;break;case"defaultValue":f=i;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=i)throw Error(s(91));break;default:i!==o&&cd(e,t,a,i,r,o)}return void wt(e,p,f);case"option":for(var g in n)if(p=n[g],n.hasOwnProperty(g)&&null!=p&&!r.hasOwnProperty(g))if("selected"===g)e.selected=!1;else cd(e,t,g,null,r,p);for(l in r)if(p=r[l],f=n[l],r.hasOwnProperty(l)&&p!==f&&(null!=p||null!=f))if("selected"===l)e.selected=p&&"function"!==typeof p&&"symbol"!==typeof p;else cd(e,t,l,p,r,f);return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var m in n)p=n[m],n.hasOwnProperty(m)&&null!=p&&!r.hasOwnProperty(m)&&cd(e,t,m,null,r,p);for(c in r)if(p=r[c],f=n[c],r.hasOwnProperty(c)&&p!==f&&(null!=p||null!=f))switch(c){case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(s(137,t));break;default:cd(e,t,c,p,r,f)}return;default:if(Ft(t)){for(var v in n)p=n[v],n.hasOwnProperty(v)&&void 0!==p&&!r.hasOwnProperty(v)&&dd(e,t,v,void 0,r,p);for(d in r)p=r[d],f=n[d],!r.hasOwnProperty(d)||p===f||void 0===p&&void 0===f||dd(e,t,d,p,r,f);return}}for(var y in n)p=n[y],n.hasOwnProperty(y)&&null!=p&&!r.hasOwnProperty(y)&&cd(e,t,y,null,r,p);for(h in r)p=r[h],f=n[h],!r.hasOwnProperty(h)||p===f||null==p&&null==f||cd(e,t,h,p,r,f)}(r,e.type,n,t),r[He]=t}catch(i){Ec(e,e.return,i)}}function Cu(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&Sd(e.type)||4===e.tag}function ku(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Cu(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&Sd(e.type))continue e;if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Su(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?(9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).insertBefore(e,t):((t=9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Pt));else if(4!==r&&(27===r&&Sd(e.type)&&(n=e.stateNode,t=null),null!==(e=e.child)))for(Su(e,t,n),e=e.sibling;null!==e;)Su(e,t,n),e=e.sibling}function xu(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&(27===r&&Sd(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(xu(e,t,n),e=e.sibling;null!==e;)xu(e,t,n),e=e.sibling}function Fu(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);hd(t,r,n),t[Ue]=e,t[He]=n}catch(o){Ec(e,e.return,o)}}var Au=!1,Tu=!1,Iu=!1,Pu="function"===typeof WeakSet?WeakSet:Set,Ou=null;function Nu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Ku(e,n),4&r&&mu(5,n);break;case 1:if(Ku(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(s){Ec(n,n.return,s)}else{var i=Ea(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(a){Ec(n,n.return,a)}}64&r&&yu(n),512&r&&_u(n,n.return);break;case 3:if(Ku(e,n),64&r&&null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:t=n.child.stateNode}try{xo(e,t)}catch(s){Ec(n,n.return,s)}}break;case 27:null===t&&4&r&&Fu(n);case 26:case 5:Ku(e,n),null===t&&4&r&&wu(n),512&r&&_u(n,n.return);break;case 12:Ku(e,n);break;case 31:Ku(e,n),4&r&&zu(e,n);break;case 13:Ku(e,n),4&r&&Uu(e,n),64&r&&(null!==(e=n.memoizedState)&&(null!==(e=e.dehydrated)&&function(e,t){var n=e.ownerDocument;if("$~"===e.data)e._reactRetry=t;else if("$?"!==e.data||"loading"!==n.readyState)t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}(e,n=xc.bind(null,n))));break;case 22:if(!(r=null!==n.memoizedState||Au)){t=null!==t&&null!==t.memoizedState||Tu,i=Au;var o=Tu;Au=r,(Tu=t)&&!o?Ju(e,n,0!==(8772&n.subtreeFlags)):Ku(e,n),Au=i,Tu=o}break;case 30:break;default:Ku(e,n)}}function Ru(e){var t=e.alternate;null!==t&&(e.alternate=null,Ru(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&Ye(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Bu=null,Lu=!1;function Mu(e,t,n){for(n=n.child;null!==n;)ju(e,t,n),n=n.sibling}function ju(e,t,n){if(ye&&"function"===typeof ye.onCommitFiberUnmount)try{ye.onCommitFiberUnmount(ve,n)}catch(o){}switch(n.tag){case 26:Tu||bu(n,t),Mu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:Tu||bu(n,t);var r=Bu,i=Lu;Sd(n.type)&&(Bu=n.stateNode,Lu=!1),Mu(e,t,n),Md(n.stateNode),Bu=r,Lu=i;break;case 5:Tu||bu(n,t);case 6:if(r=Bu,i=Lu,Bu=null,Mu(e,t,n),Lu=i,null!==(Bu=r))if(Lu)try{(9===Bu.nodeType?Bu.body:"HTML"===Bu.nodeName?Bu.ownerDocument.body:Bu).removeChild(n.stateNode)}catch(s){Ec(n,t,s)}else try{Bu.removeChild(n.stateNode)}catch(s){Ec(n,t,s)}break;case 18:null!==Bu&&(Lu?(xd(9===(e=Bu).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,n.stateNode),Wh(e)):xd(Bu,n.stateNode));break;case 4:r=Bu,i=Lu,Bu=n.stateNode.containerInfo,Lu=!0,Mu(e,t,n),Bu=r,Lu=i;break;case 0:case 11:case 14:case 15:vu(2,n,t),Tu||vu(4,n,t),Mu(e,t,n);break;case 1:Tu||(bu(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount&&Du(n,t,r)),Mu(e,t,n);break;case 21:Mu(e,t,n);break;case 22:Tu=(r=Tu)||null!==n.memoizedState,Mu(e,t,n),Tu=r;break;default:Mu(e,t,n)}}function zu(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&null!==(e=e.memoizedState))){e=e.dehydrated;try{Wh(e)}catch(n){Ec(t,t.return,n)}}}function Uu(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&(null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))))try{Wh(e)}catch(n){Ec(t,t.return,n)}}function Hu(e,t){var n=function(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new Pu),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new Pu),t;default:throw Error(s(435,e.tag))}}(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Fc.bind(null,e,t);t.then(r,r)}})}function qu(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r],o=e,a=t,u=a;e:for(;null!==u;){switch(u.tag){case 27:if(Sd(u.type)){Bu=u.stateNode,Lu=!1;break e}break;case 5:Bu=u.stateNode,Lu=!1;break e;case 3:case 4:Bu=u.stateNode.containerInfo,Lu=!0;break e}u=u.return}if(null===Bu)throw Error(s(160));ju(o,a,i),Bu=null,Lu=!1,null!==(o=i.alternate)&&(o.return=null),i.return=null}if(13886&t.subtreeFlags)for(t=t.child;null!==t;)$u(t,e),t=t.sibling}var Wu=null;function $u(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:qu(t,e),Vu(e),4&r&&(vu(3,e,e.return),mu(3,e),vu(5,e,e.return));break;case 1:qu(t,e),Vu(e),512&r&&(Tu||null===n||bu(n,n.return)),64&r&&Au&&(null!==(e=e.updateQueue)&&(null!==(r=e.callbacks)&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===n?r:n.concat(r))));break;case 26:var i=Wu;if(qu(t,e),Vu(e),512&r&&(Tu||null===n||bu(n,n.return)),4&r){var o=null!==n?n.memoizedState:null;if(r=e.memoizedState,null===n)if(null===r)if(null===e.stateNode){e:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(r){case"title":(!(o=i.getElementsByTagName("title")[0])||o[Ke]||o[Ue]||"http://www.w3.org/2000/svg"===o.namespaceURI||o.hasAttribute("itemprop"))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector("head > title"))),hd(o,r,n),o[Ue]=e,et(o),r=o;break e;case"link":var a=nh("link","href",i).get(r+(n.href||""));if(a)for(var u=0;u<a.length;u++)if((o=a[u]).getAttribute("href")===(null==n.href||""===n.href?null:n.href)&&o.getAttribute("rel")===(null==n.rel?null:n.rel)&&o.getAttribute("title")===(null==n.title?null:n.title)&&o.getAttribute("crossorigin")===(null==n.crossOrigin?null:n.crossOrigin)){a.splice(u,1);break t}hd(o=i.createElement(r),r,n),i.head.appendChild(o);break;case"meta":if(a=nh("meta","content",i).get(r+(n.content||"")))for(u=0;u<a.length;u++)if((o=a[u]).getAttribute("content")===(null==n.content?null:""+n.content)&&o.getAttribute("name")===(null==n.name?null:n.name)&&o.getAttribute("property")===(null==n.property?null:n.property)&&o.getAttribute("http-equiv")===(null==n.httpEquiv?null:n.httpEquiv)&&o.getAttribute("charset")===(null==n.charSet?null:n.charSet)){a.splice(u,1);break t}hd(o=i.createElement(r),r,n),i.head.appendChild(o);break;default:throw Error(s(468,r))}o[Ue]=e,et(o),r=o}e.stateNode=r}else rh(i,e.type,e.stateNode);else e.stateNode=Qd(i,r,e.memoizedProps);else o!==r?(null===o?null!==n.stateNode&&(n=n.stateNode).parentNode.removeChild(n):o.count--,null===r?rh(i,e.type,e.stateNode):Qd(i,r,e.memoizedProps)):null===r&&null!==e.stateNode&&Eu(e,e.memoizedProps,n.memoizedProps)}break;case 27:qu(t,e),Vu(e),512&r&&(Tu||null===n||bu(n,n.return)),null!==n&&4&r&&Eu(e,e.memoizedProps,n.memoizedProps);break;case 5:if(qu(t,e),Vu(e),512&r&&(Tu||null===n||bu(n,n.return)),32&e.flags){i=e.stateNode;try{Ct(i,"")}catch(g){Ec(e,e.return,g)}}4&r&&null!=e.stateNode&&Eu(e,i=e.memoizedProps,null!==n?n.memoizedProps:i),1024&r&&(Iu=!0);break;case 6:if(qu(t,e),Vu(e),4&r){if(null===e.stateNode)throw Error(s(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(g){Ec(e,e.return,g)}}break;case 3:if(th=null,i=Wu,Wu=Ud(t.containerInfo),qu(t,e),Wu=i,Vu(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Wh(t.containerInfo)}catch(g){Ec(e,e.return,g)}Iu&&(Iu=!1,Gu(e));break;case 4:r=Wu,Wu=Ud(e.stateNode.containerInfo),qu(t,e),Vu(e),Wu=r;break;case 12:default:qu(t,e),Vu(e);break;case 31:case 19:qu(t,e),Vu(e),4&r&&(null!==(r=e.updateQueue)&&(e.updateQueue=null,Hu(e,r)));break;case 13:qu(t,e),Vu(e),8192&e.child.flags&&null!==e.memoizedState!==(null!==n&&null!==n.memoizedState)&&(Pl=ue()),4&r&&(null!==(r=e.updateQueue)&&(e.updateQueue=null,Hu(e,r)));break;case 22:i=null!==e.memoizedState;var l=null!==n&&null!==n.memoizedState,c=Au,d=Tu;if(Au=c||i,Tu=d||l,qu(t,e),Tu=d,Au=c,Vu(e),8192&r)e:for(t=e.stateNode,t._visibility=i?-2&t._visibility:1|t._visibility,i&&(null===n||l||Au||Tu||Yu(e)),n=null,t=e;;){if(5===t.tag||26===t.tag){if(null===n){l=n=t;try{if(o=l.stateNode,i)"function"===typeof(a=o.style).setProperty?a.setProperty("display","none","important"):a.display="none";else{u=l.stateNode;var h=l.memoizedProps.style,p=void 0!==h&&null!==h&&h.hasOwnProperty("display")?h.display:null;u.style.display=null==p||"boolean"===typeof p?"":(""+p).trim()}}catch(g){Ec(l,l.return,g)}}}else if(6===t.tag){if(null===n){l=t;try{l.stateNode.nodeValue=i?"":l.memoizedProps}catch(g){Ec(l,l.return,g)}}}else if(18===t.tag){if(null===n){l=t;try{var f=l.stateNode;i?Fd(f,!0):Fd(l.stateNode,!1)}catch(g){Ec(l,l.return,g)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}4&r&&(null!==(r=e.updateQueue)&&(null!==(n=r.retryQueue)&&(r.retryQueue=null,Hu(e,n))));case 30:case 21:}}function Vu(e){var t=e.flags;if(2&t){try{for(var n,r=e.return;null!==r;){if(Cu(r)){n=r;break}r=r.return}if(null==n)throw Error(s(160));switch(n.tag){case 27:var i=n.stateNode;xu(e,ku(e),i);break;case 5:var o=n.stateNode;32&n.flags&&(Ct(o,""),n.flags&=-33),xu(e,ku(e),o);break;case 3:case 4:var a=n.stateNode.containerInfo;Su(e,ku(e),a);break;default:throw Error(s(161))}}catch(u){Ec(e,e.return,u)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Gu(e){if(1024&e.subtreeFlags)for(e=e.child;null!==e;){var t=e;Gu(t),5===t.tag&&1024&t.flags&&t.stateNode.reset(),e=e.sibling}}function Ku(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)Nu(e,t.alternate,t),t=t.sibling}function Yu(e){for(e=e.child;null!==e;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:vu(4,t,t.return),Yu(t);break;case 1:bu(t,t.return);var n=t.stateNode;"function"===typeof n.componentWillUnmount&&Du(t,t.return,n),Yu(t);break;case 27:Md(t.stateNode);case 26:case 5:bu(t,t.return),Yu(t);break;case 22:null===t.memoizedState&&Yu(t);break;default:Yu(t)}e=e.sibling}}function Ju(e,t,n){for(n=n&&0!==(8772&t.subtreeFlags),t=t.child;null!==t;){var r=t.alternate,i=e,o=t,s=o.flags;switch(o.tag){case 0:case 11:case 15:Ju(i,o,n),mu(4,o);break;case 1:if(Ju(i,o,n),"function"===typeof(i=(r=o).stateNode).componentDidMount)try{i.componentDidMount()}catch(l){Ec(r,r.return,l)}if(null!==(i=(r=o).updateQueue)){var a=r.stateNode;try{var u=i.shared.hiddenCallbacks;if(null!==u)for(i.shared.hiddenCallbacks=null,i=0;i<u.length;i++)So(u[i],a)}catch(l){Ec(r,r.return,l)}}n&&64&s&&yu(o),_u(o,o.return);break;case 27:Fu(o);case 26:case 5:Ju(i,o,n),n&&null===r&&4&s&&wu(o),_u(o,o.return);break;case 12:Ju(i,o,n);break;case 31:Ju(i,o,n),n&&4&s&&zu(i,o);break;case 13:Ju(i,o,n),n&&4&s&&Uu(i,o);break;case 22:null===o.memoizedState&&Ju(i,o,n),_u(o,o.return);break;case 30:break;default:Ju(i,o,n)}t=t.sibling}}function Qu(e,t){var n=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==n&&(null!=e&&e.refCount++,null!=n&&zi(n))}function Xu(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&zi(e))}function Zu(e,t,n,r){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)el(e,t,n,r),t=t.sibling}function el(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Zu(e,t,n,r),2048&i&&mu(9,t);break;case 1:case 31:case 13:default:Zu(e,t,n,r);break;case 3:Zu(e,t,n,r),2048&i&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&zi(e)));break;case 12:if(2048&i){Zu(e,t,n,r),e=t.stateNode;try{var o=t.memoizedProps,s=o.id,a=o.onPostCommit;"function"===typeof a&&a(s,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(u){Ec(t,t.return,u)}}else Zu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,null!==t.memoizedState?2&o._visibility?Zu(e,t,n,r):nl(e,t):2&o._visibility?Zu(e,t,n,r):(o._visibility|=2,tl(e,t,n,r,0!==(10256&t.subtreeFlags)||!1)),2048&i&&Qu(s,t);break;case 24:Zu(e,t,n,r),2048&i&&Xu(t.alternate,t)}}function tl(e,t,n,r,i){for(i=i&&(0!==(10256&t.subtreeFlags)||!1),t=t.child;null!==t;){var o=e,s=t,a=n,u=r,l=s.flags;switch(s.tag){case 0:case 11:case 15:tl(o,s,a,u,i),mu(8,s);break;case 23:break;case 22:var c=s.stateNode;null!==s.memoizedState?2&c._visibility?tl(o,s,a,u,i):nl(o,s):(c._visibility|=2,tl(o,s,a,u,i)),i&&2048&l&&Qu(s.alternate,s);break;case 24:tl(o,s,a,u,i),i&&2048&l&&Xu(s.alternate,s);break;default:tl(o,s,a,u,i)}t=t.sibling}}function nl(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:nl(n,r),2048&i&&Qu(r.alternate,r);break;case 24:nl(n,r),2048&i&&Xu(r.alternate,r);break;default:nl(n,r)}t=t.sibling}}var rl=8192;function il(e,t,n){if(e.subtreeFlags&rl)for(e=e.child;null!==e;)ol(e,t,n),e=e.sibling}function ol(e,t,n){switch(e.tag){case 26:il(e,t,n),e.flags&rl&&null!==e.memoizedState&&function(e,t,n,r){if("stylesheet"===n.type&&("string"!==typeof r.media||!1!==matchMedia(r.media).matches)&&0===(4&n.state.loading)){if(null===n.instance){var i=Vd(r.href),o=t.querySelector(Gd(i));if(o)return null!==(t=o._p)&&"object"===typeof t&&"function"===typeof t.then&&(e.count++,e=sh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=o,void et(o);o=t.ownerDocument||t,r=Kd(r),(i=jd.get(i))&&Zd(r,i),et(o=o.createElement("link"));var s=o;s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),hd(o,"link",r),n.instance=o}null===e.stylesheets&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&0===(3&n.state.loading)&&(e.count++,n=sh.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}(n,Wu,e.memoizedState,e.memoizedProps);break;case 5:default:il(e,t,n);break;case 3:case 4:var r=Wu;Wu=Ud(e.stateNode.containerInfo),il(e,t,n),Wu=r;break;case 22:null===e.memoizedState&&(null!==(r=e.alternate)&&null!==r.memoizedState?(r=rl,rl=16777216,il(e,t,n),rl=r):il(e,t,n))}}function sl(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do{t=e.sibling,e.sibling=null,e=t}while(null!==e)}}function al(e){var t=e.deletions;if(0!==(16&e.flags)){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];Ou=r,cl(r,e)}sl(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)ul(e),e=e.sibling}function ul(e){switch(e.tag){case 0:case 11:case 15:al(e),2048&e.flags&&vu(9,e,e.return);break;case 3:case 12:default:al(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&2&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-3,ll(e)):al(e)}}function ll(e){var t=e.deletions;if(0!==(16&e.flags)){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];Ou=r,cl(r,e)}sl(e)}for(e=e.child;null!==e;){switch((t=e).tag){case 0:case 11:case 15:vu(8,t,t.return),ll(t);break;case 22:2&(n=t.stateNode)._visibility&&(n._visibility&=-3,ll(t));break;default:ll(t)}e=e.sibling}}function cl(e,t){for(;null!==Ou;){var n=Ou;switch(n.tag){case 0:case 11:case 15:vu(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var r=n.memoizedState.cachePool.pool;null!=r&&r.refCount++}break;case 24:zi(n.memoizedState.cache)}if(null!==(r=n.child))r.return=n,Ou=r;else e:for(n=e;null!==Ou;){var i=(r=Ou).sibling,o=r.return;if(Ru(r),r===n){Ou=null;break e}if(null!==i){i.return=o,Ou=i;break e}Ou=o}}}var dl={getCacheForType:function(e){var t=Pi(Mi),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Pi(Mi).controller.signal}},hl="function"===typeof WeakMap?WeakMap:Map,pl=0,fl=null,gl=null,ml=0,vl=0,yl=null,Dl=!1,_l=!1,bl=!1,wl=0,El=0,Cl=0,kl=0,Sl=0,xl=0,Fl=0,Al=null,Tl=null,Il=!1,Pl=0,Ol=0,Nl=1/0,Rl=null,Bl=null,Ll=0,Ml=null,jl=null,zl=0,Ul=0,Hl=null,ql=null,Wl=0,$l=null;function Vl(){return 0!==(2&pl)&&0!==ml?ml&-ml:null!==N.T?Hc():Me()}function Gl(){if(0===xl)if(0===(536870912&ml)||di){var e=Ce;0===(3932160&(Ce<<=1))&&(Ce=262144),xl=e}else xl=536870912;return null!==(e=Oo.current)&&(e.flags|=32),xl}function Kl(e,t,n){(e!==fl||2!==vl&&9!==vl)&&null===e.cancelPendingCommit||(tc(e,0),Xl(e,ml,xl,!1)),Pe(e,n),0!==(2&pl)&&e===fl||(e===fl&&(0===(2&pl)&&(kl|=n),4===El&&Xl(e,ml,xl,!1)),Rc(e))}function Yl(e,t,n){if(0!==(6&pl))throw Error(s(327));for(var r=!n&&0===(127&t)&&0===(t&e.expiredLanes)||Fe(e,t),i=r?function(e,t){var n=pl;pl|=2;var r=ic(),i=oc();fl!==e||ml!==t?(Rl=null,Nl=ue()+500,tc(e,t)):_l=Fe(e,t);e:for(;;)try{if(0!==vl&&null!==gl){t=gl;var o=yl;t:switch(vl){case 1:vl=0,yl=null,hc(e,t,o,1);break;case 2:case 9:if(to(o)){vl=0,yl=null,dc(t);break}t=function(){2!==vl&&9!==vl||fl!==e||(vl=7),Rc(e)},o.then(t,t);break e;case 3:vl=7;break e;case 4:vl=5;break e;case 7:to(o)?(vl=0,yl=null,dc(t)):(vl=0,yl=null,hc(e,t,o,7));break;case 5:var a=null;switch(gl.tag){case 26:a=gl.memoizedState;case 5:case 27:var u=gl;if(a?ih(a):u.stateNode.complete){vl=0,yl=null;var l=u.sibling;if(null!==l)gl=l;else{var c=u.return;null!==c?(gl=c,pc(c)):gl=null}break t}}vl=0,yl=null,hc(e,t,o,5);break;case 6:vl=0,yl=null,hc(e,t,o,6);break;case 8:ec(),El=6;break e;default:throw Error(s(462))}}lc();break}catch(d){nc(e,d)}return Ci=Ei=null,N.H=r,N.A=i,pl=n,null!==gl?0:(fl=null,ml=0,Tr(),El)}(e,t):ac(e,t,!0),o=r;;){if(0===i){_l&&!r&&Xl(e,t,0,!1);break}if(n=e.current.alternate,!o||Ql(n)){if(2===i){if(o=t,e.errorRecoveryDisabledLanes&o)var a=0;else a=0!==(a=-536870913&e.pendingLanes)?a:536870912&a?536870912:0;if(0!==a){t=a;e:{var u=e;i=Al;var l=u.current.memoizedState.isDehydrated;if(l&&(tc(u,a).flags|=256),2!==(a=ac(u,a,!1))){if(bl&&!l){u.errorRecoveryDisabledLanes|=o,kl|=o,i=4;break e}o=Tl,Tl=i,null!==o&&(null===Tl?Tl=o:Tl.push.apply(Tl,o))}i=a}if(o=!1,2!==i)continue}}if(1===i){tc(e,0),Xl(e,t,0,!0);break}e:{switch(r=e,o=i){case 0:case 1:throw Error(s(345));case 4:if((4194048&t)!==t)break;case 6:Xl(r,t,xl,!Dl);break e;case 2:Tl=null;break;case 3:case 5:break;default:throw Error(s(329))}if((62914560&t)===t&&10<(i=Pl+300-ue())){if(Xl(r,t,xl,!Dl),0!==xe(r,0,!0))break e;zl=t,r.timeoutHandle=bd(Jl.bind(null,r,n,Tl,Rl,Il,t,xl,kl,Fl,Dl,o,"Throttled",-0,0),i)}else Jl(r,n,Tl,Rl,Il,t,xl,kl,Fl,Dl,o,null,-0,0)}break}i=ac(e,t,!1),o=!1}Rc(e)}function Jl(e,t,n,r,i,o,s,a,u,l,c,d,h,p){if(e.timeoutHandle=-1,8192&(d=t.subtreeFlags)||16785408===(16785408&d)){ol(t,o,d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Pt});var f=(62914560&o)===o?Pl-ue():(4194048&o)===o?Ol-ue():0;if(null!==(f=function(e,t){return e.stylesheets&&0===e.count&&uh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&uh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&0===oh&&(oh=62500*function(){if("function"===typeof performance.getEntriesByType){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var i=n[r],o=i.transferSize,s=i.initiatorType,a=i.duration;if(o&&a&&pd(s)){for(s=0,a=i.responseEnd,r+=1;r<n.length;r++){var u=n[r],l=u.startTime;if(l>a)break;var c=u.transferSize,d=u.initiatorType;c&&pd(d)&&(s+=c*((u=u.responseEnd)<a?1:(a-l)/(u-l)))}if(--r,t+=8*(o+s)/(i.duration/1e3),10<++e)break}}if(0<e)return t/e/1e6}return navigator.connection&&"number"===typeof(e=navigator.connection.downlink)?e:5}());var i=setTimeout(function(){if(e.waitingForImages=!1,0===e.count&&(e.stylesheets&&uh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>oh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}(d,f)))return zl=o,e.cancelPendingCommit=f(gc.bind(null,e,t,o,n,r,i,s,a,u,c,d,null,h,p)),void Xl(e,o,s,!l)}gc(e,t,o,n,r,i,s,a,u)}function Ql(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&(null!==(n=t.updateQueue)&&null!==(n=n.stores)))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!Xn(o(),i))return!1}catch(s){return!1}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Xl(e,t,n,r){t&=~Sl,t&=~kl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var o=31-_e(i),s=1<<o;r[o]=-1,i&=~s}0!==n&&Oe(e,n,t)}function Zl(){return 0!==(6&pl)||(Bc(0,!1),!1)}function ec(){if(null!==gl){if(0===vl)var e=gl.return;else Ci=Ei=null,as(e=gl),ao=null,uo=0,e=gl;for(;null!==e;)gu(e.alternate,e),e=e.return;gl=null}}function tc(e,t){var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,wd(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),zl=0,ec(),fl=e,gl=n=zr(e.current,null),ml=t,vl=0,yl=null,Dl=!1,_l=Fe(e,t),bl=!1,Fl=xl=Sl=kl=Cl=El=0,Tl=Al=null,Il=!1,0!==(8&t)&&(t|=32&t);var r=e.entangledLanes;if(0!==r)for(e=e.entanglements,r&=t;0<r;){var i=31-_e(r),o=1<<i;t|=e[i],r&=~o}return wl=t,Tr(),n}function nc(e,t){qo=null,N.H=ga,t===Qi||t===Zi?(t=oo(),vl=3):t===Xi?(t=oo(),vl=4):vl=t===Pa?8:null!==t&&"object"===typeof t&&"function"===typeof t.then?6:1,yl=t,null===gl&&(El=1,xa(e,Kr(t,e.current)))}function rc(){var e=Oo.current;return null===e||((4194048&ml)===ml?null===No:((62914560&ml)===ml||0!==(536870912&ml))&&e===No)}function ic(){var e=N.H;return N.H=ga,null===e?ga:e}function oc(){var e=N.A;return N.A=dl,e}function sc(){El=4,Dl||(4194048&ml)!==ml&&null!==Oo.current||(_l=!0),0===(134217727&Cl)&&0===(134217727&kl)||null===fl||Xl(fl,ml,xl,!1)}function ac(e,t,n){var r=pl;pl|=2;var i=ic(),o=oc();fl===e&&ml===t||(Rl=null,tc(e,t)),t=!1;var s=El;e:for(;;)try{if(0!==vl&&null!==gl){var a=gl,u=yl;switch(vl){case 8:ec(),s=6;break e;case 3:case 2:case 9:case 6:null===Oo.current&&(t=!0);var l=vl;if(vl=0,yl=null,hc(e,a,u,l),n&&_l){s=0;break e}break;default:l=vl,vl=0,yl=null,hc(e,a,u,l)}}uc(),s=El;break}catch(c){nc(e,c)}return t&&e.shellSuspendCounter++,Ci=Ei=null,pl=r,N.H=i,N.A=o,null===gl&&(fl=null,ml=0,Tr()),s}function uc(){for(;null!==gl;)cc(gl)}function lc(){for(;null!==gl&&!se();)cc(gl)}function cc(e){var t=su(e.alternate,e,wl);e.memoizedProps=e.pendingProps,null===t?pc(e):gl=t}function dc(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=$a(n,t,t.pendingProps,t.type,void 0,ml);break;case 11:t=$a(n,t,t.pendingProps,t.type.render,t.ref,ml);break;case 5:as(t);default:gu(n,t),t=su(n,t=gl=Ur(t,wl),wl)}e.memoizedProps=e.pendingProps,null===t?pc(e):gl=t}function hc(e,t,n,r){Ci=Ei=null,as(t),ao=null,uo=0;var i=t.return;try{if(function(e,t,n,r,i){if(n.flags|=32768,null!==r&&"object"===typeof r&&"function"===typeof r.then){if(null!==(t=n.alternate)&&Ai(t,n,i,!0),null!==(n=Oo.current)){switch(n.tag){case 31:case 13:return null===No?sc():null===n.alternate&&0===El&&(El=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===eo?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([r]):t.add(r),Cc(e,r,i)),!1;case 22:return n.flags|=65536,r===eo?n.flags|=16384:(null===(t=n.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([r]):n.add(r),Cc(e,r,i)),!1}throw Error(s(435,n.tag))}return Cc(e,r,i),sc(),!1}if(di)return null!==(t=Oo.current)?(0===(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==fi&&bi(Kr(e=Error(s(422),{cause:r}),n))):(r!==fi&&bi(Kr(t=Error(s(423),{cause:r}),n)),(e=e.current.alternate).flags|=65536,i&=-i,e.lanes|=i,r=Kr(r,n),wo(e,i=Aa(e.stateNode,r,i)),4!==El&&(El=2)),!1;var o=Error(s(520),{cause:r});if(o=Kr(o,n),null===Al?Al=[o]:Al.push(o),4!==El&&(El=2),null===t)return!0;r=Kr(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,wo(n,e=Aa(n.stateNode,r,e)),!1;case 1:if(t=n.type,o=n.stateNode,0===(128&n.flags)&&("function"===typeof t.getDerivedStateFromError||null!==o&&"function"===typeof o.componentDidCatch&&(null===Bl||!Bl.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,Ia(i=Ta(i),e,n,r),wo(n,i),!1}n=n.return}while(null!==n);return!1}(e,i,t,n,ml))return El=1,xa(e,Kr(n,e.current)),void(gl=null)}catch(o){if(null!==i)throw gl=i,o;return El=1,xa(e,Kr(n,e.current)),void(gl=null)}32768&t.flags?(di||1===r?e=!0:_l||0!==(536870912&ml)?e=!1:(Dl=e=!0,(2===r||9===r||3===r||6===r)&&(null!==(r=Oo.current)&&13===r.tag&&(r.flags|=16384))),fc(t,e)):pc(t)}function pc(e){var t=e;do{if(0!==(32768&t.flags))return void fc(t,Dl);e=t.return;var n=pu(t.alternate,t,wl);if(null!==n)return void(gl=n);if(null!==(t=t.sibling))return void(gl=t);gl=t=e}while(null!==t);0===El&&(El=5)}function fc(e,t){do{var n=fu(e.alternate,e);if(null!==n)return n.flags&=32767,void(gl=n);if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling))return void(gl=e);gl=e=n}while(null!==e);El=6,gl=null}function gc(e,t,n,r,i,o,a,u,l){e.cancelPendingCommit=null;do{_c()}while(0!==Ll);if(0!==(6&pl))throw Error(s(327));if(null!==t){if(t===e.current)throw Error(s(177));if(o=t.lanes|t.childLanes,function(e,t,n,r,i,o){var s=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var a=e.entanglements,u=e.expirationTimes,l=e.hiddenUpdates;for(n=s&~n;0<n;){var c=31-_e(n),d=1<<c;a[c]=0,u[c]=-1;var h=l[c];if(null!==h)for(l[c]=null,c=0;c<h.length;c++){var p=h[c];null!==p&&(p.lane&=-536870913)}n&=~d}0!==r&&Oe(e,r,0),0!==o&&0===i&&0!==e.tag&&(e.suspendedLanes|=o&~(s&~t))}(e,n,o|=Ar,a,u,l),e===fl&&(gl=fl=null,ml=0),jl=t,Ml=e,zl=n,Ul=o,Hl=i,ql=r,0!==(10256&t.subtreeFlags)||0!==(10256&t.flags)?(e.callbackNode=null,e.callbackPriority=0,ie(he,function(){return bc(),null})):(e.callbackNode=null,e.callbackPriority=0),r=0!==(13878&t.flags),0!==(13878&t.subtreeFlags)||r){r=N.T,N.T=null,i=R.p,R.p=2,a=pl,pl|=4;try{!function(e,t){if(e=e.containerInfo,fd=Dh,ir(e=rr(e))){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(m){n=null;break e}var a=0,u=-1,l=-1,c=0,d=0,h=e,p=null;t:for(;;){for(var f;h!==n||0!==i&&3!==h.nodeType||(u=a+i),h!==o||0!==r&&3!==h.nodeType||(l=a+r),3===h.nodeType&&(a+=h.nodeValue.length),null!==(f=h.firstChild);)p=h,h=f;for(;;){if(h===e)break t;if(p===n&&++c===i&&(u=a),p===o&&++d===r&&(l=a),null!==(f=h.nextSibling))break;
2p=(h=p).parentNode}h=f}n=-1===u||-1===l?null:{start:u,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(gd={focusedElem:e,selectionRange:n},Dh=!1,Ou=t;null!==Ou;)if(e=(t=Ou).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Ou=e;else for(;null!==Ou;){switch(o=(t=Ou).alternate,e=t.flags,t.tag){case 0:if(0!==(4&e)&&null!==(e=null!==(e=t.updateQueue)?e.events:null))for(n=0;n<e.length;n++)(i=e[n]).ref.impl=i.nextImpl;break;case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(0!==(1024&e)&&null!==o){e=void 0,n=t,i=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var g=Ea(n.type,i);e=r.getSnapshotBeforeUpdate(g,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(v){Ec(n,n.return,v)}}break;case 3:if(0!==(1024&e))if(9===(n=(e=t.stateNode.containerInfo).nodeType))Ad(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Ad(e);break;default:e.textContent=""}break;default:if(0!==(1024&e))throw Error(s(163))}if(null!==(e=t.sibling)){e.return=t.return,Ou=e;break}Ou=t.return}}(e,t)}finally{pl=a,R.p=i,N.T=r}}Ll=1,mc(),vc(),yc()}}function mc(){if(1===Ll){Ll=0;var e=Ml,t=jl,n=0!==(13878&t.flags);if(0!==(13878&t.subtreeFlags)||n){n=N.T,N.T=null;var r=R.p;R.p=2;var i=pl;pl|=4;try{$u(t,e);var o=gd,s=rr(e.containerInfo),a=o.focusedElem,u=o.selectionRange;if(s!==a&&a&&a.ownerDocument&&nr(a.ownerDocument.documentElement,a)){if(null!==u&&ir(a)){var l=u.start,c=u.end;if(void 0===c&&(c=l),"selectionStart"in a)a.selectionStart=l,a.selectionEnd=Math.min(c,a.value.length);else{var d=a.ownerDocument||document,h=d&&d.defaultView||window;if(h.getSelection){var p=h.getSelection(),f=a.textContent.length,g=Math.min(u.start,f),m=void 0===u.end?g:Math.min(u.end,f);!p.extend&&g>m&&(s=m,m=g,g=s);var v=tr(a,g),y=tr(a,m);if(v&&y&&(1!==p.rangeCount||p.anchorNode!==v.node||p.anchorOffset!==v.offset||p.focusNode!==y.node||p.focusOffset!==y.offset)){var D=d.createRange();D.setStart(v.node,v.offset),p.removeAllRanges(),g>m?(p.addRange(D),p.extend(y.node,y.offset)):(D.setEnd(y.node,y.offset),p.addRange(D))}}}}for(d=[],p=a;p=p.parentNode;)1===p.nodeType&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for("function"===typeof a.focus&&a.focus(),a=0;a<d.length;a++){var _=d[a];_.element.scrollLeft=_.left,_.element.scrollTop=_.top}}Dh=!!fd,gd=fd=null}finally{pl=i,R.p=r,N.T=n}}e.current=t,Ll=2}}function vc(){if(2===Ll){Ll=0;var e=Ml,t=jl,n=0!==(8772&t.flags);if(0!==(8772&t.subtreeFlags)||n){n=N.T,N.T=null;var r=R.p;R.p=2;var i=pl;pl|=4;try{Nu(e,t.alternate,t)}finally{pl=i,R.p=r,N.T=n}}Ll=3}}function yc(){if(4===Ll||3===Ll){Ll=0,ae();var e=Ml,t=jl,n=zl,r=ql;0!==(10256&t.subtreeFlags)||0!==(10256&t.flags)?Ll=5:(Ll=0,jl=Ml=null,Dc(e,e.pendingLanes));var i=e.pendingLanes;if(0===i&&(Bl=null),Le(n),t=t.stateNode,ye&&"function"===typeof ye.onCommitFiberRoot)try{ye.onCommitFiberRoot(ve,t,void 0,128===(128&t.current.flags))}catch(u){}if(null!==r){t=N.T,i=R.p,R.p=2,N.T=null;try{for(var o=e.onRecoverableError,s=0;s<r.length;s++){var a=r[s];o(a.value,{componentStack:a.stack})}}finally{N.T=t,R.p=i}}0!==(3&zl)&&_c(),Rc(e),i=e.pendingLanes,0!==(261930&n)&&0!==(42&i)?e===$l?Wl++:(Wl=0,$l=e):Wl=0,Bc(0,!1)}}function Dc(e,t){0===(e.pooledCacheLanes&=t)&&(null!=(t=e.pooledCache)&&(e.pooledCache=null,zi(t)))}function _c(){return mc(),vc(),yc(),bc()}function bc(){if(5!==Ll)return!1;var e=Ml,t=Ul;Ul=0;var n=Le(zl),r=N.T,i=R.p;try{R.p=32>n?32:n,N.T=null,n=Hl,Hl=null;var o=Ml,a=zl;if(Ll=0,jl=Ml=null,zl=0,0!==(6&pl))throw Error(s(331));var u=pl;if(pl|=4,ul(o.current),el(o,o.current,a,n),pl=u,Bc(0,!1),ye&&"function"===typeof ye.onPostCommitFiberRoot)try{ye.onPostCommitFiberRoot(ve,o)}catch(l){}return!0}finally{R.p=i,N.T=r,Dc(e,t)}}function wc(e,t,n){t=Kr(n,t),null!==(e=_o(e,t=Aa(e.stateNode,t,2),2))&&(Pe(e,2),Rc(e))}function Ec(e,t,n){if(3===e.tag)wc(e,e,n);else for(;null!==t;){if(3===t.tag){wc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Bl||!Bl.has(r))){e=Kr(n,e),null!==(r=_o(t,n=Ta(2),2))&&(Ia(n,r,t,e),Pe(r,2),Rc(r));break}}t=t.return}}function Cc(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new hl;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(bl=!0,i.add(n),e=kc.bind(null,e,t,n),t.then(e,e))}function kc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,fl===e&&(ml&n)===n&&(4===El||3===El&&(62914560&ml)===ml&&300>
vendor: 4,420 bytes, line 2
2ue()-Pl?0===(2&pl)&&tc(e,0):Sl|=n,Fl===ml&&(Fl=0)),Rc(e)}function Sc(e,t){0===t&&(t=Te()),null!==(e=Or(e,t))&&(Pe(e,t),Rc(e))}function xc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Sc(e,n)}function Fc(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(s(314))}null!==r&&r.delete(t),Sc(e,n)}var Ac=null,Tc=null,Ic=!1,Pc=!1,Oc=!1,Nc=0;function Rc(e){e!==Tc&&null===e.next&&(null===Tc?Ac=Tc=e:Tc=Tc.next=e),Pc=!0,Ic||(Ic=!0,Cd(function(){0!==(6&pl)?ie(ce,Lc):Mc()}))}function Bc(e,t){if(!Oc&&Pc){Oc=!0;do{for(var n=!1,r=Ac;null!==r;){if(!t)if(0!==e){var i=r.pendingLanes;if(0===i)var o=0;else{var s=r.suspendedLanes,a=r.pingedLanes;o=(1<<31-_e(42|e)+1)-1,o=201326741&(o&=i&~(s&~a))?201326741&o|1:o?2|o:0}0!==o&&(n=!0,Uc(r,o))}else o=ml,0===(3&(o=xe(r,r===fl?o:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||Fe(r,o)||(n=!0,Uc(r,o));r=r.next}}while(n);Oc=!1}}function Lc(){Mc()}function Mc(){Pc=Ic=!1;var e=0;0!==Nc&&function(){var e=window.event;if(e&&"popstate"===e.type)return e!==_d&&(_d=e,!0);return _d=null,!1}()&&(e=Nc);for(var t=ue(),n=null,r=Ac;null!==r;){var i=r.next,o=jc(r,t);0===o?(r.next=null,null===n?Ac=i:n.next=i,null===i&&(Tc=n)):(n=r,(0!==e||0!==(3&o))&&(Pc=!0)),r=i}0!==Ll&&5!==Ll||Bc(e,!1),0!==Nc&&(Nc=0)}function jc(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=-62914561&e.pendingLanes;0<o;){var s=31-_e(o),a=1<<s,u=i[s];-1===u?0!==(a&n)&&0===(a&r)||(i[s]=Ae(a,t)):u<=t&&(e.expiredLanes|=a),o&=~a}if(n=ml,n=xe(e,e===(t=fl)?n:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle),r=e.callbackNode,0===n||e===t&&(2===vl||9===vl)||null!==e.cancelPendingCommit)return null!==r&&null!==r&&oe(r),e.callbackNode=null,e.callbackPriority=0;if(0===(3&n)||Fe(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==r&&oe(r),Le(n)){case 2:case 8:n=de;break;case 32:default:n=he;break;case 268435456:n=fe}return r=zc.bind(null,e),n=ie(n,r),e.callbackPriority=t,e.callbackNode=n,t}return null!==r&&null!==r&&oe(r),e.callbackPriority=2,e.callbackNode=null,2}function zc(e,t){if(0!==Ll&&5!==Ll)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(_c()&&e.callbackNode!==n)return null;var r=ml;return 0===(r=xe(e,e===fl?r:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle))?null:(Yl(e,r,t),jc(e,ue()),null!=e.callbackNode&&e.callbackNode===n?zc.bind(null,e):null)}function Uc(e,t){if(_c())return null;Yl(e,t,!0)}function Hc(){if(0===Nc){var e=qi;0===e&&(e=Ee,0===(261888&(Ee<<=1))&&(Ee=256)),Nc=e}return Nc}function qc(e){return null==e||"symbol"===typeof e||"boolean"===typeof e?null:"function"===typeof e?e:It(""+e)}function Wc(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}for(var $c=0;$c<Cr.length;$c++){var Vc=Cr[$c];kr(Vc.toLowerCase(),"on"+(Vc[0].toUpperCase()+Vc.slice(1)))}kr(mr,"onAnimationEnd"),kr(vr,"onAnimationIteration"),kr(yr,"onAnimationStart"),kr("dblclick","onDoubleClick"),kr("focusin","onFocus"),kr("focusout","onBlur"),kr(Dr,"onTransitionRun"),kr(_r,"onTransitionStart"),kr(br,"onTransitionCancel"),kr(wr,"onTransitionEnd"),it("onMouseEnter",["mouseout","mouseover"]),it("onMouseLeave",["mouseout","mouseover"]),it("onPointerEnter",["pointerout","pointerover"]),it("onPointerLeave",["pointerout","pointerover"]),rt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),rt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),rt("onBeforeInput",["compositionend","keypress","textInput","paste"]),rt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),rt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),rt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gc="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(" "),Kc=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Gc));
vendor: 3,351 bytes, line 2
2function Yc(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],u=a.instance,l=a.currentTarget;if(a=a.listener,u!==o&&i.isPropagationStopped())break e;o=a,i.currentTarget=l;try{o(i)}catch(c){Sr(c)}i.currentTarget=null,o=u}else for(s=0;s<r.length;s++){if(u=(a=r[s]).instance,l=a.currentTarget,a=a.listener,u!==o&&i.isPropagationStopped())break e;o=a,i.currentTarget=l;try{o(i)}catch(c){Sr(c)}i.currentTarget=null,o=u}}}}function Jc(e,t){var n=t[We];void 0===n&&(n=t[We]=new Set);var r=e+"__bubble";n.has(r)||(ed(t,e,2,!1),n.add(r))}function Qc(e,t,n){var r=0;t&&(r|=4),ed(n,e,r,t)}var Xc="_reactListening"+Math.random().toString(36).slice(2);function Zc(e){if(!e[Xc]){e[Xc]=!0,tt.forEach(function(t){"selectionchange"!==t&&(Kc.has(t)||Qc(t,!1,e),Qc(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Xc]||(t[Xc]=!0,Qc("selectionchange",!1,t))}}function ed(e,t,n,r){switch(Sh(t)){case 2:var i=_h;break;case 8:i=bh;break;default:i=wh}n=i.bind(null,t,n,e),i=void 0,!Ht||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function td(e,t,n,r,i){var o=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var s=r.tag;if(3===s||4===s){var a=r.stateNode.containerInfo;if(a===i)break;if(4===s)for(s=r.return;null!==s;){var l=s.tag;if((3===l||4===l)&&s.stateNode.containerInfo===i)return;s=s.return}for(;null!==a;){if(null===(s=Je(a)))return;if(5===(l=s.tag)||6===l||26===l||27===l){r=o=s;continue e}a=a.parentNode}}r=r.return}jt(function(){var r=o,i=Nt(n),s=[];e:{var a=Er.get(e);if(void 0!==a){var l=nn,c=e;switch(e){case"keypress":if(0===Kt(n))break e;case"keydown":case"keyup":l=yn;break;case"focusin":c="focus",l=ln;break;case"focusout":c="blur",l=ln;break;case"beforeblur":case"afterblur":l=ln;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=an;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=un;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=_n;break;case mr:case vr:case yr:l=cn;break;case wr:l=bn;break;case"scroll":case"scrollend":l=on;break;case"wheel":l=wn;break;case"copy":case"cut":case"paste":l=dn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Dn;break;case"toggle":case"beforetoggle":l=En}var d=0!==(4&t),h=!d&&("scroll"===e||"scrollend"===e),p=d?null!==a?a+"Capture":null:a;d=[];for(var f,g=r;null!==g;){var m=g;if(f=m.stateNode,5!==(m=m.tag)&&26!==m&&27!==m||null===f||null===p||null!=(m=zt(g,p))&&d.push(nd(g,m,f)),h)break;g=g.return}0<d.length&&(a=new l(a,c,null,n,i),s.push({event:a,listeners:d}))}}if(0===(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(a="mouseover"===e||"pointerover"===e)||n===Ot||!(c=n.relatedTarget||n.fromElement)||!Je(c)&&!c[qe])&&(l||a)&&(a=i.window===i?i:(a=i.ownerDocument)?a.defaultView||a.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?Je(c):null)&&(h=u(c),d=c.tag,c!==
vendor: 6,900 bytes, line 2
2h||5!==d&&27!==d&&6!==d)&&(c=null)):(l=null,c=r),l!==c)){if(d=an,m="onMouseLeave",p="onMouseEnter",g="mouse","pointerout"!==e&&"pointerover"!==e||(d=Dn,m="onPointerLeave",p="onPointerEnter",g="pointer"),h=null==l?a:Xe(l),f=null==c?a:Xe(c),(a=new d(m,g+"leave",l,n,i)).target=h,a.relatedTarget=f,m=null,Je(i)===r&&((d=new d(p,g+"enter",c,n,i)).target=f,d.relatedTarget=h,m=d),h=m,l&&c)e:{for(d=id,g=c,f=0,m=p=l;m;m=d(m))f++;m=0;for(var v=g;v;v=d(v))m++;for(;0<f-m;)p=d(p),f--;for(;0<m-f;)g=d(g),m--;for(;f--;){if(p===g||null!==g&&p===g.alternate){d=p;break e}p=d(p),g=d(g)}d=null}else d=null;null!==l&&od(s,a,l,d,!1),null!==c&&null!==h&&od(s,h,c,d,!0)}if("select"===(l=(a=r?Xe(r):window).nodeName&&a.nodeName.toLowerCase())||"input"===l&&"file"===a.type)var y=Un;else if(Rn(a))if(Hn)y=Qn;else{y=Yn;var D=Kn}else!(l=a.nodeName)||"input"!==l.toLowerCase()||"checkbox"!==a.type&&"radio"!==a.type?r&&Ft(r.elementType)&&(y=Un):y=Jn;switch(y&&(y=y(e,r))?Bn(s,y,n,i):(D&&D(e,a,r),"focusout"===e&&r&&"number"===a.type&&null!=r.memoizedProps.value&&_t(a,"number",a.value)),D=r?Xe(r):window,e){case"focusin":(Rn(D)||"true"===D.contentEditable)&&(sr=D,ar=r,ur=null);break;case"focusout":ur=ar=sr=null;break;case"mousedown":lr=!0;break;case"contextmenu":case"mouseup":case"dragend":lr=!1,cr(s,n,i);break;case"selectionchange":if(or)break;case"keydown":case"keyup":cr(s,n,i)}var _;if(kn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else On?In(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Fn&&"ko"!==n.locale&&(On||"onCompositionStart"!==b?"onCompositionEnd"===b&&On&&(_=Gt()):($t="value"in(Wt=i)?Wt.value:Wt.textContent,On=!0)),0<(D=rd(r,b)).length&&(b=new hn(b,e,null,n,i),s.push({event:b,listeners:D}),_?b.data=_:null!==(_=Pn(n))&&(b.data=_))),(_=xn?function(e,t){switch(e){case"compositionend":return Pn(t);case"keypress":return 32!==t.which?null:(Tn=!0,An);case"textInput":return(e=t.data)===An&&Tn?null:e;default:return null}}(e,n):function(e,t){if(On)return"compositionend"===e||!kn&&In(e,t)?(e=Gt(),Vt=$t=Wt=null,On=!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 Fn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(b=rd(r,"onBeforeInput")).length&&(D=new hn("onBeforeInput","beforeinput",null,n,i),s.push({event:D,listeners:b}),D.data=_)),function(e,t,n,r,i){if("submit"===t&&n&&n.stateNode===i){var o=qc((i[He]||null).action),s=r.submitter;s&&null!==(t=(t=s[He]||null)?qc(t.formAction):s.getAttribute("formAction"))&&(o=t,s=null);var a=new nn("action","action",null,r,i);e.push({event:a,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(0!==Nc){var e=s?Wc(i,s):new FormData(i);ta(n,{pending:!0,data:e,method:i.method,action:o},null,e)}}else"function"===typeof o&&(a.preventDefault(),e=s?Wc(i,s):new FormData(i),ta(n,{pending:!0,data:e,method:i.method,action:o},o,e))},currentTarget:i}]})}}(s,e,r,n,i)}Yc(s,t)})}function nd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function rd(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;if(5!==(i=i.tag)&&26!==i&&27!==i||null===o||(null!=(i=zt(e,n))&&r.unshift(nd(e,i,o)),null!=(i=zt(e,t))&&r.push(nd(e,i,o))),3===e.tag)return r;e=e.return}return[]}function id(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag&&27!==e.tag);return e||null}function od(e,t,n,r,i){for(var o=t._reactName,s=[];null!==n&&n!==r;){var a=n,u=a.alternate,l=a.stateNode;if(a=a.tag,null!==u&&u===r)break;5!==a&&26!==a&&27!==a||null===l||(u=l,i?null!=(l=zt(n,o))&&s.unshift(nd(n,l,u)):i||null!=(l=zt(n,o))&&s.push(nd(n,l,u))),n=n.return}0!==s.length&&e.push({event:t,listeners:s})}var sd=/\r\n?/g,ad=/\u0000|\uFFFD/g;function ud(e){return("string"===typeof e?e:""+e).replace(sd,"\n").replace(ad,"")}function ld(e,t){return t=ud(t),ud(e)===t}function cd(e,t,n,r,i,o){switch(n){case"children":"string"===typeof r?"body"===t||"textarea"===t&&""===r||Ct(e,r):("number"===typeof r||"bigint"===typeof r)&&"body"!==t&&Ct(e,""+r);break;case"className":lt(e,"class",r);break;case"tabIndex":lt(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":lt(e,n,r);break;case"style":xt(e,r,o);break;case"data":if("object"!==t){lt(e,"data",r);break}case"src":case"href":if(""===r&&("a"!==t||"href"!==n)){e.removeAttribute(n);break}if(null==r||"function"===typeof r||"symbol"===typeof r||"boolean"===typeof r){e.removeAttribute(n);break}r=It(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if("function"===typeof r){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}if("function"===typeof o&&("formAction"===n?("input"!==t&&cd(e,t,"name",i.name,i,null),cd(e,t,"formEncType",i.formEncType,i,null),cd(e,t,"formMethod",i.formMethod,i,null),cd(e,t,"formTarget",i.formTarget,i,null)):(cd(e,t,"encType",i.encType,i,null),cd(e,t,"method",i.method,i,null),cd(e,t,"target",i.target,i,null))),null==r||"symbol"===typeof r||"boolean"===typeof r){e.removeAttribute(n);break}r=It(""+r),e.setAttribute(n,r);break;case"onClick":null!=r&&(e.onclick=Pt);break;case"onScroll":null!=r&&Jc("scroll",e);break;case"onScrollEnd":null!=r&&Jc("scrollend",e);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!==typeof r||!("__html"in r))throw Error(s(61));if(null!=(n=r.__html)){if(null!=i.children)throw Error(s(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&"function"!==typeof r&&"symbol"!==typeof r;break;case"muted":e.muted=r&&"function"!==typeof r&&"symbol"!==typeof r;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":break;case"xlinkHref":if(null==r||"function"===typeof r||"boolean"===typeof r||"symbol"===typeof r){e.removeAttribute("xlink:href");break}n=It(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":null!=r&&"function"!==typeof r&&"symbol"!==typeof r?e.setAttribute(n,""+r):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
2ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&"function"!==typeof r&&"symbol"!==typeof r?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":!0===r?e.setAttribute(n,""):!1!==r&&null!=r&&"function"!==typeof r&&"symbol"!==typeof r?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":null!=r&&"function"!==typeof r&&"symbol"!==typeof r&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":null==r||"function"===typeof r||"symbol"===typeof r||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":Jc("beforetoggle",e),Jc("toggle",e),ut(e,"popover",r);break;case"xlinkActuate":ct(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":ct(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":ct(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":ct(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":ct(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":ct(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":ct(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":ct(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":ct(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":ut(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])&&ut(e,n=At.get(n)||n,r)}}function dd(e,t,n,r,i,o){switch(n){case"style":xt(e,r,o);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!==typeof r||!("__html"in r))throw Error(s(61));if(null!=(n=r.__html)){if(null!=i.children)throw Error(s(60));e.innerHTML=n}}break;case"children":"string"===typeof r?Ct(e,r):("number"===typeof r||"bigint"===typeof r)&&Ct(e,""+r);break;case"onScroll":null!=r&&Jc("scroll",e);break;case"onScrollEnd":null!=r&&Jc("scrollend",e);break;case"onClick":null!=r&&(e.onclick=Pt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:nt.hasOwnProperty(n)||("o"!==n[0]||"n"!==n[1]||(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),"function"===typeof(o=null!=(o=e[He]||null)?o[n]:null)&&e.removeEventListener(t,o,i),"function"!==typeof r)?n in e?e[n]=r:!0===r?e.setAttribute(n,""):ut(e,n,r):("function"!==typeof o&&null!==o&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i)))}}function hd(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Jc("error",e),Jc("load",e);var r,i=!1,o=!1;for(r in n)if(n.hasOwnProperty(r)){var a=n[r];if(null!=a)switch(r){case"src":i=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:cd(e,t,r,a,n,null)}}return o&&cd(e,t,"srcSet",n.srcSet,n,null),void(i&&cd(e,t,"src",n.src,n,null));case"input":Jc("invalid",e);var u=r=a=o=null,l=null,c=null;for(i in n)if(n.hasOwnProperty(i)){var d=n[i];if(null!=d)switch(i){case"name":o=d;break;case"type":a=d;break;case"checked":l=d;break;case"defaultChecked":c=d;break;case"value":r=d;break;case"defaultValue":u=d;break;case"children":case"dangerouslySetInnerHTML":if(null!=d)throw Error(s(137,t));break;default:cd(e,t,i,d,n,null)}}return void Dt(e,r,u,l,c,a,o,!1);case"select":for(o in Jc("invalid",e),i=a=r=null,n)if(n.hasOwnProperty(o)&&null!=(u=n[o]))switch(o){case"value":r=u;break;case"defaultValue":a=u;break;case"multiple":i=u;default:cd(e,t,o,u,n,null)}return t=r,n=a,e.multiple=!!i,void(null!=t?bt(e,!!i,t,!1):null!=n&&bt(e,!!i,n,!0));case"textarea":for(a in Jc("invalid",e),r=o=i=null,n)if(n.hasOwnProperty(a)&&null!=(u=n[a]))switch(a){case"value":i=u;break;case"defaultValue":o=u;break;case"children":r=u;break;case"dangerouslySetInnerHTML":if(null!=u)throw Error(s(91));break;default:cd(e,t,a,u,n,null)}return void Et(e,i,o,r);case"option":for(l in n)if(n.hasOwnProperty(l)&&null!=(i=n[l]))if("selected"===l)e.selected=i&&"function"!==typeof i&&"symbol"!==typeof i;else cd(e,t,l,i,n,null);return;case"dialog":Jc("beforetoggle",e),Jc("toggle",e),Jc("cancel",e),Jc("close",e);break;case"iframe":case"object":Jc("load",e);break;case"video":case"audio":for(i=0;i<Gc.length;i++)Jc(Gc[i],e);break;case"image":Jc("error",e),Jc("load",e);break;case"details":Jc("toggle",e);break;case"embed":case"source":case"link":Jc("error",e),Jc("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(c in n)if(n.hasOwnProperty(c)&&null!=(i=n[c]))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:cd(e,t,c,i,n,null)}return;default:if(Ft(t)){for(d in n)n.hasOwnProperty(d)&&(void 0!==(i=n[d])&&dd(e,t,d,i,n,void 0));return}}for(u in n)n.hasOwnProperty(u)&&(null!=(i=n[u])&&cd(e,t,u,i,n,null))}function pd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}var fd=null,gd=null;
vendor: 4,259 bytes, line 2
2function md(e){return 9===e.nodeType?e:e.ownerDocument}function vd(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function yd(e,t){if(0===e)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return 1===e&&"foreignObject"===t?0:e}function Dd(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"bigint"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var _d=null;var bd="function"===typeof setTimeout?setTimeout:void 0,wd="function"===typeof clearTimeout?clearTimeout:void 0,Ed="function"===typeof Promise?Promise:void 0,Cd="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof Ed?function(e){return Ed.resolve(null).then(e).catch(kd)}:bd;function kd(e){setTimeout(function(){throw e})}function Sd(e){return"head"===e}function xd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)||"/&"===n){if(0===r)return e.removeChild(i),void Wh(t);r--}else if("$"===n||"$?"===n||"$~"===n||"$!"===n||"&"===n)r++;else if("html"===n)Md(e.ownerDocument.documentElement);else if("head"===n){Md(n=e.ownerDocument.head);for(var o=n.firstChild;o;){var s=o.nextSibling,a=o.nodeName;o[Ke]||"SCRIPT"===a||"STYLE"===a||"LINK"===a&&"stylesheet"===o.rel.toLowerCase()||n.removeChild(o),o=s}}else"body"===n&&Md(e.ownerDocument.body);n=i}while(n);Wh(t)}function Fd(e,t){var n=e;e=0;do{var r=n.nextSibling;if(1===n.nodeType?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",""===n.getAttribute("style")&&n.removeAttribute("style")):3===n.nodeType&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&8===r.nodeType)if("/$"===(n=r.data)){if(0===e)break;e--}else"$"!==n&&"$?"!==n&&"$~"!==n&&"$!"!==n||e++;n=r}while(n)}function Ad(e){var t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Ad(n),Ye(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function Td(e,t){for(;8!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!t)return null;if(null===(e=Od(e.nextSibling)))return null}return e}function Id(e){return"$?"===e.data||"$~"===e.data}function Pd(e){return"$!"===e.data||"$?"===e.data&&"loading"!==e.ownerDocument.readyState}function Od(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t||"$~"===t||"&"===t||"F!"===t||"F"===t)break;if("/$"===t||"/&"===t)return null}}return e}var Nd=null;function Rd(e){e=e.nextSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n||"/&"===n){if(0===t)return Od(e.nextSibling);t--}else"$"!==n&&"$!"!==n&&"$?"!==n&&"$~"!==n&&"&"!==n||t++}e=e.nextSibling}return null}function Bd(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n||"$~"===n||"&"===n){if(0===t)return e;t--}else"/$"!==n&&"/&"!==n||t++}e=e.previousSibling}return null}function Ld(e,t,n){switch(t=md(n),e){case"html":if(!(e=t.documentElement))throw Error(s(452));return e;case"head":if(!(e=t.head))throw Error(s(453));return e;case"body":if(!(e=t.body))throw Error(s(454));return e;default:throw Error(s(451))}}function Md(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ye(e)}var jd=new Map,zd=new Set;function Ud(e){return"function"===typeof e.getRootNode?e.getRootNode():9===e.nodeType?e:e.ownerDocument}var Hd=R.d;R.d={f:function(){var e=Hd.f(),t=Zl();return e||t},r:function(e){var t=Qe(e);null!==t&&5===t.tag&&"form"===t.type?ra(t):Hd.r(e)},D:function(e){Hd.D(e),Wd("dns-prefetch",e,null)},C:function(e,t){Hd.C(e,t),Wd("preconnect",e,t)},L:function(e,t,n){Hd.L(e,t,n);var r=qd;if(r&&e&&t){var i='link[rel="preload"][as="'+vt(t)+'"]';"image"===t&&n&&n.imageSrcSet?(i+='[imagesrcset="'+vt(n.imageSrcSet)+'"]',"string"===typeof n.imageSizes&&(i+='[imagesizes="'+vt(n.imageSizes)+'"]')):i+='[href="'+vt(e)+'"]';var o=i;switch(t){case"style":o=Vd(e);break;case"script":o=Yd(e)}
2jd.has(o)||(e=p({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),jd.set(o,e),null!==r.querySelector(i)||"style"===t&&r.querySelector(Gd(o))||"script"===t&&r.querySelector(Jd(o))||(hd(t=r.createElement("link"),"link",e),et(t),r.head.appendChild(t)))}},m:function(e,t){Hd.m(e,t);var n=qd;if(n&&e){var r=t&&"string"===typeof t.as?t.as:"script",i='link[rel="modulepreload"][as="'+vt(r)+'"][href="'+vt(e)+'"]',o=i;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=Yd(e)}if(!jd.has(o)&&(e=p({rel:"modulepreload",href:e},t),jd.set(o,e),null===n.querySelector(i))){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Jd(o)))return}hd(r=n.createElement("link"),"link",e),et(r),n.head.appendChild(r)}}},X:function(e,t){Hd.X(e,t);var n=qd;if(n&&e){var r=Ze(n).hoistableScripts,i=Yd(e),o=r.get(i);o||((o=n.querySelector(Jd(i)))||(e=p({src:e,async:!0},t),(t=jd.get(i))&&eh(e,t),et(o=n.createElement("script")),hd(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},r.set(i,o))}},S:function(e,t,n){Hd.S(e,t,n);var r=qd;if(r&&e){var i=Ze(r).hoistableStyles,o=Vd(e);t=t||"default";var s=i.get(o);if(!s){var a={loading:0,preload:null};if(s=r.querySelector(Gd(o)))a.loading=5;else{e=p({rel:"stylesheet",href:e,"data-precedence":t},n),(n=jd.get(o))&&Zd(e,n);var u=s=r.createElement("link");et(u),hd(u,"link",e),u._p=new Promise(function(e,t){u.onload=e,u.onerror=t}),u.addEventListener("load",function(){a.loading|=1}),u.addEventListener("error",function(){a.loading|=2}),a.loading|=4,Xd(s,t,r)}s={type:"stylesheet",instance:s,count:1,state:a},i.set(o,s)}}},M:function(e,t){Hd.M(e,t);var n=qd;if(n&&e){var r=Ze(n).hoistableScripts,i=Yd(e),o=r.get(i);o||((o=n.querySelector(Jd(i)))||(e=p({src:e,async:!0,type:"module"},t),(t=jd.get(i))&&eh(e,t),et(o=n.createElement("script")),hd(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},r.set(i,o))}}};var qd="undefined"===typeof document?null:document;function Wd(e,t,n){var r=qd;if(r&&"string"===typeof t&&t){var i=vt(t);i='link[rel="'+e+'"][href="'+i+'"]',"string"===typeof n&&(i+='[crossorigin="'+n+'"]'),zd.has(i)||(zd.add(i),e={rel:e,crossOrigin:n,href:t},null===r.querySelector(i)&&(hd(t=r.createElement("link"),"link",e),et(t),r.head.appendChild(t)))}}function $d(e,t,n,r){var i,o,a,u,l=(l=V.current)?Ud(l):null;if(!l)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return"string"===typeof n.precedence&&"string"===typeof n.href?(t=Vd(n.href),(r=(n=Ze(l).hoistableStyles).get(t))||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===n.rel&&"string"===typeof n.href&&"string"===typeof n.precedence){e=Vd(n.href);var c=Ze(l).hoistableStyles,d=c.get(e);if(d||(l=l.ownerDocument||l,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,d),(c=l.querySelector(Gd(e)))&&!c._p&&(d.instance=c,d.state.loading=5),jd.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},jd.set(e,n),c||(i=l,o=e,a=n,u=d.state,i.querySelector('link[rel="preload"][as="style"]['+o+"]")?u.loading=1:(o=i.createElement("link"),u.preload=o,o.addEventListener("load",function(){return u.loading|=1}),o.addEventListener("error",function(){return u.loading|=2}),hd(o,"link",a),et(o),i.head.appendChild(o))))),t&&null===r)throw Error(s(528,""));return d}if(t&&null!==r)throw Error(s(529,""));return null;case"script":return t=n.async,"string"===typeof(n=n.src)&&t&&"function"!==typeof t&&"symbol"!==typeof t?(t=Yd(n),(r=(n=Ze(l).hoistableScripts).get(t))||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Vd(e){return'href="'+vt(e)+'"'}function Gd(e){return'link[rel="stylesheet"]['+e+"]"}function Kd(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Yd(e){return'[src="'+vt(e)+'"]'}function Jd(e){return"script[async]"+e}
vendor: 4,388 bytes, line 2
2function Qd(e,t,n){if(t.count++,null===t.instance)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+vt(n.href)+'"]');if(r)return t.instance=r,et(r),r;var i=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return et(r=(e.ownerDocument||e).createElement("style")),hd(r,"style",i),Xd(r,n.precedence,e),t.instance=r;case"stylesheet":i=Vd(n.href);var o=e.querySelector(Gd(i));if(o)return t.state.loading|=4,t.instance=o,et(o),o;r=Kd(n),(i=jd.get(i))&&Zd(r,i),et(o=(e.ownerDocument||e).createElement("link"));var a=o;return a._p=new Promise(function(e,t){a.onload=e,a.onerror=t}),hd(o,"link",r),t.state.loading|=4,Xd(o,n.precedence,e),t.instance=o;case"script":return o=Yd(n.src),(i=e.querySelector(Jd(o)))?(t.instance=i,et(i),i):(r=n,(i=jd.get(o))&&eh(r=p({},n),i),et(i=(e=e.ownerDocument||e).createElement("script")),hd(i,"link",r),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(s(443,t.type))}else"stylesheet"===t.type&&0===(4&t.state.loading)&&(r=t.instance,t.state.loading|=4,Xd(r,n.precedence,e));return t.instance}function Xd(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=r.length?r[r.length-1]:null,o=i,s=0;s<r.length;s++){var a=r[s];if(a.dataset.precedence===t)o=a;else if(o!==i)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=9===n.nodeType?n.head:n).insertBefore(e,t.firstChild)}function Zd(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.title&&(e.title=t.title)}function eh(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.integrity&&(e.integrity=t.integrity)}var th=null;function nh(e,t,n){if(null===th){var r=new Map,i=th=new Map;i.set(n,r)}else(r=(i=th).get(n))||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var o=n[i];if(!(o[Ke]||o[Ue]||"link"===e&&"stylesheet"===o.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==o.namespaceURI){var s=o.getAttribute(t)||"";s=e+s;var a=r.get(s);a?a.push(o):r.set(s,[o])}}return r}function rh(e,t,n){(e=e.ownerDocument||e).head.insertBefore(n,"title"===t?e.querySelector("head > title"):null)}function ih(e){return"stylesheet"!==e.type||0!==(3&e.state.loading)}var oh=0;function sh(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages))if(this.stylesheets)uh(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var ah=null;function uh(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,ah=new Map,t.forEach(lh,e),ah=null,sh.call(e))}function lh(e,t){if(!(4&t.state.loading)){var n=ah.get(e);if(n)var r=n.get(null);else{n=new Map,ah.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<i.length;o++){var s=i[o];"LINK"!==s.nodeName&&"not all"===s.getAttribute("media")||(n.set(s.dataset.precedence,s),r=s)}r&&n.set(null,r)}s=(i=t.instance).getAttribute("data-precedence"),(o=n.get(s)||r)===r&&n.set(null,i),n.set(s,i),this.count++,r=sh.bind(this),i.addEventListener("load",r),i.addEventListener("error",r),o?o.parentNode.insertBefore(i,o.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(i,e.firstChild),t.state.loading|=4}}var ch={$$typeof:b,Provider:null,Consumer:null,_currentValue:B,_currentValue2:B,_threadCount:0};function dh(e,t,n,r,i,o,s,a,u){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ie(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ie(0),this.hiddenUpdates=Ie(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=o,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=u,this.incompleteTransitions=new Map}function hh(e,t,n,r,i,o,s,a,u,l,c,d){return e=new dh(e,t,n,s,u,l,c,d,a),t=1,!0===o&&(t|=24),o=Mr(3,null,null,t),e.current=o,o.stateNode=e,(t=ji()).refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:r,isDehydrated:n,cache:t},vo(o),e}
vendor: 4,393 bytes, line 2
2function ph(e){return e?e=Br:Br}function fh(e,t,n,r,i,o){i=ph(i),null===r.context?r.context=i:r.pendingContext=i,(r=Do(t)).payload={element:n},null!==(o=void 0===o?null:o)&&(r.callback=o),null!==(n=_o(e,r,t))&&(Kl(n,0,t),bo(n,e,t))}function gh(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function mh(e,t){gh(e,t),(e=e.alternate)&&gh(e,t)}function vh(e){if(13===e.tag||31===e.tag){var t=Or(e,67108864);null!==t&&Kl(t,0,67108864),mh(e,67108864)}}function yh(e){if(13===e.tag||31===e.tag){var t=Vl(),n=Or(e,t=Be(t));null!==n&&Kl(n,0,t),mh(e,t)}}var Dh=!0;function _h(e,t,n,r){var i=N.T;N.T=null;var o=R.p;try{R.p=2,wh(e,t,n,r)}finally{R.p=o,N.T=i}}function bh(e,t,n,r){var i=N.T;N.T=null;var o=R.p;try{R.p=8,wh(e,t,n,r)}finally{R.p=o,N.T=i}}function wh(e,t,n,r){if(Dh){var i=Eh(r);if(null===i)td(e,t,r,Ch,n),Rh(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Fh=Bh(Fh,e,t,n,r,i),!0;case"dragenter":return Ah=Bh(Ah,e,t,n,r,i),!0;case"mouseover":return Th=Bh(Th,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Ih.set(o,Bh(Ih.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Ph.set(o,Bh(Ph.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Rh(e,r),4&t&&-1<Nh.indexOf(e)){for(;null!==i;){var o=Qe(i);if(null!==o)switch(o.tag){case 3:if((o=o.stateNode).current.memoizedState.isDehydrated){var s=Se(o.pendingLanes);if(0!==s){var a=o;for(a.pendingLanes|=2,a.entangledLanes|=2;s;){var u=1<<31-_e(s);a.entanglements[1]|=u,s&=~u}Rc(o),0===(6&pl)&&(Nl=ue()+500,Bc(0,!1))}}break;case 31:case 13:null!==(a=Or(o,2))&&Kl(a,0,2),Zl(),mh(o,2)}if(null===(o=Eh(r))&&td(e,t,r,Ch,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else td(e,t,r,null,n)}}function Eh(e){return kh(e=Nt(e))}var Ch=null;function kh(e){if(Ch=null,null!==(e=Je(e))){var t=u(e);if(null===t)e=null;else{var n=t.tag;if(13===n){if(null!==(e=l(t)))return e;e=null}else if(31===n){if(null!==(e=c(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ch=e,null}function Sh(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(le()){case ce:return 2;case de:return 8;case he:case pe:return 32;case fe:return 268435456;default:return 32}default:return 32}}var xh=!1,Fh=null,Ah=null,Th=null,Ih=new Map,Ph=new Map,Oh=[],Nh="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Rh(e,t){switch(e){case"focusin":case"focusout":Fh=null;break;case"dragenter":case"dragleave":Ah=null;break;case"mouseover":case"mouseout":Th=null;break;case"pointerover":case"pointerout":Ih.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ph.delete(t.pointerId)}}function Bh(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&(null!==(t=Qe(t))&&vh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Lh(e){var t=Je(e.target);if(null!==t){var n=u(t);
2if(null!==n)if(13===(t=n.tag)){if(null!==(t=l(n)))return e.blockedOn=t,void je(e.priority,function(){yh(n)})}else if(31===t){if(null!==(t=c(n)))return e.blockedOn=t,void je(e.priority,function(){yh(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 Mh(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Eh(e.nativeEvent);if(null!==n)return null!==(t=Qe(n))&&vh(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Ot=r,n.target.dispatchEvent(r),Ot=null,t.shift()}return!0}function jh(e,t,n){Mh(e)&&n.delete(t)}function zh(){xh=!1,null!==Fh&&Mh(Fh)&&(Fh=null),null!==Ah&&Mh(Ah)&&(Ah=null),null!==Th&&Mh(Th)&&(Th=null),Ih.forEach(jh),Ph.forEach(jh)}function Uh(e,t){e.blockedOn===t&&(e.blockedOn=null,xh||(xh=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,zh)))}var Hh=null;function qh(e){Hh!==e&&(Hh=e,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){Hh===e&&(Hh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if("function"!==typeof r){if(null===kh(r||n))continue;break}var o=Qe(n);null!==o&&(e.splice(t,3),t-=3,ta(o,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Wh(e){function t(t){return Uh(t,e)}null!==Fh&&Uh(Fh,e),null!==Ah&&Uh(Ah,e),null!==Th&&Uh(Th,e),Ih.forEach(t),Ph.forEach(t);for(var n=0;n<Oh.length;n++){var r=Oh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Oh.length&&null===(n=Oh[0]).blockedOn;)Lh(n),null===n.blockedOn&&Oh.shift();if(null!=(n=(e.ownerDocument||e).$$reactFormReplay))for(r=0;r<n.length;r+=3){var i=n[r],o=n[r+1],s=i[He]||null;if("function"===typeof o)s||qh(n);else if(s){var a=null;if(o&&o.hasAttribute("formAction")){if(i=o,s=o[He]||null)a=s.formAction;else if(null!==kh(i))continue}else a=s.action;"function"===typeof a?n[r+1]=a:(n.splice(r,3),r-=3),qh(n)}}}function $h(){function e(e){e.canIntercept&&"react-transition"===e.info&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:"manual",scroll:"manual"})}function t(){null!==i&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&null!=e.url&&navigation.navigate(e.url,{state:e.getState(),info:"react-transition",history:"replace"})}}if("object"===typeof navigation){var r=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),null!==i&&(i(),i=null)}}}function Vh(e){this._internalRoot=e}function Gh(e){this._internalRoot=e}Gh.prototype.render=Vh.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(s(409));fh(t.current,Vl(),e,t,null,null)},Gh.prototype.unmount=Vh.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;fh(e.current,2,null,e,null,null),Zl(),t[qe]=null}},Gh.prototype.unstable_scheduleHydration=function(e){if(e){var t=Me();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Oh.length&&0!==t&&t<Oh[n].priority;n++);Oh.splice(n,0,e),0===n&&Lh(e)}};var Kh=i.version;if("19.2.0"!==Kh)throw Error(s(527,Kh,"19.2.0"));R.findDOMNode=function(e){var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(s(188));throw e=Object.keys(e).join(","),Error(s(268,e))}return e=function(e){var t=e.alternate;if(!t){if(null===(t=u(e)))throw Error(s(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return d(i),e;if(o===r)return d(i),t;o=o.sibling}throw Error(s(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,l=i.child;l;){if(l===n){a=!0,n=i,r=o;break}if(l===r){a=!0,r=i,n=o;break}l=l.sibling}if(!a){for(l=o.child;l;){if(l===n){a=!0,n=o,r=i;break}if(l===r){a=!0,r=o,n=i;break}l=l.sibling}if(!a)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(3!==n.tag)throw Error(s(188));return n.stateNode.current===n?e:t}(t),e=null===(e=null!==e?h(e):null)?null:e.stateNode};var Yh={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:N,reconcilerVersion:"19.2.0"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Jh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jh.isDisabled&&Jh.supportsFiber)try{ve=Jh.inject(Yh),ye=Jh}catch(Xh){}}t.createRoot=function(e,t){if(!a(e))throw Error(s(299));var n=!1,r="",i=Ca,o=ka,u=Sa;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onUncaughtError&&(i=t.onUncaughtError),void 0!==t.onCaughtError&&(o=t.onCaughtError),void 0!==t.onRecoverableError&&(u=t.onRecoverableError)),t=hh(e,1,!1,null,0,n,r,null,i,o,u,$h),e[qe]=t.current,Zc(e),new Vh(t)}},672(e,t,n){"use strict";var r=n(43);function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var s={d:{f:o,r:function(){throw Error(i(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},a=Symbol.for("react.portal");var u=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){return"font"===e?"":"string"===typeof t?"use-credentials"===t?t:"":void 0}t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)throw Error(i(299));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:a,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.flushSync=function(e){var t=u.T,n=s.p;try{if(u.T=null,s.p=2,e)return e()}finally{u.T=t,s.p=n,s.d.f()}},t.preconnect=function(e,t){"string"===typeof e&&(t?t="string"===typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:t=null,s.d.C(e,t))},t.prefetchDNS=function(e){"string"===typeof e&&s.d.D(e)},t.preinit=function(e,t){if("string"===typeof e&&t&&"string"===typeof t.as){var n=t.as,r=l(n,t.crossOrigin),i="string"===typeof t.integrity?t.integrity:void 0,o="string"===typeof t.fetchPriority?t.fetchPriority:void 0;"style"===n?s.d.S(e,"string"===typeof t.precedence?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):"script"===n&&s.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:"string"===typeof t.nonce?t.nonce:void 0})}},t.preinitModule=function(e,t){if("string"===typeof e)if("object"===typeof t&&null!==t){if(null==t.as||"script"===t.as){var n=l(t.as,t.crossOrigin);s.d.M(e,{crossOrigin:n,integrity:"string"===typeof t.integrity?t.integrity:void 0,nonce:"string"===typeof t.nonce?t.nonce:void 0})}}else null==t&&s.d.M(e)},t.preload=function(e,t){if("string"===typeof e&&"object"===typeof t&&null!==t&&"string"===typeof t.as){var n=t.as,r=l(n,t.crossOrigin);s.d.L(e,n,{crossOrigin:r,integrity:"string"===typeof t.integrity?t.integrity:void 0,nonce:"string"===typeof t.nonce?t.nonce:void 0,type:"string"===typeof t.type?t.type:void 0,fetchPriority:"string"===typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"str
2ing"===typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"===typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"===typeof t.imageSizes?t.imageSizes:void 0,media:"string"===typeof t.media?t.media:void 0})}},t.preloadModule=function(e,t){if("string"===typeof e)if(t){var n=l(t.as,t.crossOrigin);s.d.m(e,{as:"string"===typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:n,integrity:"string"===typeof t.integrity?t.integrity:void 0})}else s.d.m(e)},t.requestFormReset=function(e){s.d.r(e)},t.unstable_batchedUpdates=function(e,t){return e(t)},t.useFormState=function(e,t,n){return u.H.useFormState(e,t,n)},t.useFormStatus=function(){return u.H.useHostTransitionStatus()},t.version="19.2.0"},391(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(t){console.error(t)}}(),e.exports=n(4)},950(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(t){console.error(t)}}(),e.exports=n(672)},366(e){var t="undefined"!==typeof Element,n="function"===typeof Map,r="function"===typeof Set,i="function"===typeof ArrayBuffer&&!!ArrayBuffer.isView;function o(e,s){if(e===s)return!0;if(e&&s&&"object"==typeof e&&"object"==typeof s){if(e.constructor!==s.constructor)return!1;var a,u,l,c;if(Array.isArray(e)){if((a=e.length)!=s.length)return!1;for(u=a;0!==u--;)if(!o(e[u],s[u]))return!1;return!0}if(n&&e instanceof Map&&s instanceof Map){if(e.size!==s.size)return!1;for(c=e.entries();!(u=c.next()).done;)if(!s.has(u.value[0]))return!1;for(c=e.entries();!(u=c.next()).done;)if(!o(u.value[1],s.get(u.value[0])))return!1;return!0}if(r&&e instanceof Set&&s instanceof Set){if(e.size!==s.size)return!1;for(c=e.entries();!(u=c.next()).done;)if(!s.has(u.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(s)){if((a=e.length)!=s.length)return!1;for(u=a;0!==u--;)if(e[u]!==s[u])return!1;return!0}if(e.constructor===RegExp)return e.source===s.source&&e.flags===s.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"===typeof e.valueOf&&"function"===typeof s.valueOf)return e.valueOf()===s.valueOf();if(e.toString!==Object.prototype.toString&&"function"===typeof e.toString&&"function"===typeof s.toString)return e.toString()===s.toString();if((a=(l=Object.keys(e)).length)!==Object.keys(s).length)return!1;for(u=a;0!==u--;)if(!Object.prototype.hasOwnProperty.call(s,l[u]))return!1;if(t&&e instanceof Element)return!1;for(u=a;0!==u--;)if(("_owner"!==l[u]&&"__v"!==l[u]&&"__o"!==l[u]||!e.$$typeof)&&!o(e[l[u]],s[l[u]]))return!1;return!0}return e!==e&&s!==s}e.exports=function(e,t){try{return o(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}},161(e,t,n){"use strict";var r,i=n(43),o=(r=i)&&"object"===typeof r&&"default"in r?r.default:r;function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=!("undefined"===typeof window||!window.document||!window.document.createElement);e.exports=function(e,t,n){if("function"!==typeof e)throw new Error("Expected reducePropsToState to be a function.");if("function"!==typeof t)throw new Error("Expected handleStateChangeOnClient to be a function.");if("undefined"!==typeof n&&"function"!==typeof n)throw new Error("Expected mapStateOnServer to either be undefined or a function.");return function(r){if("function"!==typeof r)throw new Error("Expected WrappedComponent to be a React component.");var u,l=[];function c(){u=e(l.map(function(e){return e.props})),d.canUseDOM?t(u):n&&(u=n(u))}var d=function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i.peek=function(){return u},i.rewind=function(){if(i.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var e=u;return u=void 0,l=[],e};var s=i.prototype;return s.UNSAFE_componentWillMount=function(){l.push(this),c()},s.componentDidUpdate=function(){c()},s.componentWillUnmount=function(){var e=l.indexOf(this);l.splice(e,1),c()},s.render=function(){return o.createElement(r,this.props)},i}(i.PureComponent);return s(d,"displayName","SideEffect("+function(e){return e.displayName||e.name||"Component"}(r)+")"),s(d,"canUseDOM",a),d}}},799(e,t){"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function i(e,t,r){var i=null;if(void 0!==r&&(i=""+r),void 0!==t.key&&(i=""+t.key),"key"in t)for(var o in r={},t)"key"!==o&&(r[o]=t[o]);else r=t;return t=r.ref,{$$typeof:n,type:e,key:i,ref:void 0!==t?t:null,props:r}}t.Fragment=r,t.jsx=i,t.jsxs=i},288(e,t){"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),u=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),f=Symbol.iterator;var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}function D(){}function _(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},D.prototype=y.prototype;var b=_.prototype=new D;b.constructor=_,m(b,y.prototype),b.isPureReactComponent=!0;var w=Array.isArray;function E(){}var C={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function S(e,t,r){var i=r.ref;return{$$typeof:n,type:e,key:t,ref:void 0!==i?i:null,props:r}}function x(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var F=/\/+/g;function A(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function T(e,t,i,o,s){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var u,l,c=!1;if(null===e)c=!0;else switch(a){case"bigint":case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case n:case r:c=!0;break;case h:return T((c=e._init)(e._payload),t,i,o,s)}}if(c)return s=s(e),c=""===o?"."+A(e,0):o,w(s)?(i="",null!=c&&(i=c.replace(F,"$&/")+"/"),T(s,t,i,"",function(e){return e})):null!=s&&(x(s)&&(u=s,l=i+(null==s.key||e&&e.key===s.key?"":(""+s.key).replace(F,"$&/")+"/")+c,s=S(u.type,l,u.props)),t.push(s)),1;c=0;var d,p=""===o?".":o+":";if(w(e))for(var g=0;g<e.length;g++)c+=T(o=e[g],t,i,a=p+A(o,g),s);else if("function"===typeof(g=null===(d=e)||"object"!==typeof d?null:"function"===typeof(d=f&&d[f]||d["@@iterator"])?d:null))for(e=g.call(e),g=0;!(o=e.next()).done;)c+=T(o=o.value,t,i,a=p+A(o,g++),s);else if("object"===a){if("function"===typeof e.then)return T(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"===typeof e.status?e.then(E,E):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(e),t,i,o,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 c}function I(e,t,n){if(null==e)return e;var r=[],i=0;return T(e,r,"","",function(e){return t.call(n,e,i++)}),r}function P(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var O="function"===typeof reportError?reportError:function(e){if("object"===typeof window&&"function"===typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"===typeof e&&null!==e&&"string"===typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"===typeof process&&"function"===typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)}
vendor: 7,059 bytes, line 2
2,N={map:I,forEach:function(e,t,n){I(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return I(e,function(){t++}),t},toArray:function(e){return I(e,function(e){return e})||[]},only:function(e){if(!x(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};t.Activity=p,t.Children=N,t.Component=y,t.Fragment=i,t.Profiler=s,t.PureComponent=_,t.StrictMode=o,t.Suspense=c,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=C,t.__COMPILER_RUNTIME={__proto__:null,c:function(e){return C.H.useMemoCache(e)}},t.cache=function(e){return function(){return e.apply(null,arguments)}},t.cacheSignal=function(){return null},t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error("The argument must be a React element, but you passed "+e+".");var r=m({},e.props),i=e.key;if(null!=t)for(o in void 0!==t.key&&(i=""+t.key),t)!k.call(t,o)||"key"===o||"__self"===o||"__source"===o||"ref"===o&&void 0===t.ref||(r[o]=t[o]);var o=arguments.length-2;if(1===o)r.children=n;else if(1<o){for(var s=Array(o),a=0;a<o;a++)s[a]=arguments[a+2];r.children=s}return S(e.type,i,r)},t.createContext=function(e){return(e={$$typeof:u,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:a,_context:e},e},t.createElement=function(e,t,n){var r,i={},o=null;if(null!=t)for(r in void 0!==t.key&&(o=""+t.key),t)k.call(t,r)&&"key"!==r&&"__self"!==r&&"__source"!==r&&(i[r]=t[r]);var s=arguments.length-2;if(1===s)i.children=n;else if(1<s){for(var a=Array(s),u=0;u<s;u++)a[u]=arguments[u+2];i.children=a}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===i[r]&&(i[r]=s[r]);return S(e,o,i)},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:l,render:e}},t.isValidElement=x,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:P}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=C.T,n={};C.T=n;try{var r=e(),i=C.S;null!==i&&i(n,r),"object"===typeof r&&null!==r&&"function"===typeof r.then&&r.then(E,O)}catch(o){O(o)}finally{null!==t&&null!==n.types&&(t.types=n.types),C.T=t}},t.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},t.use=function(e){return C.H.use(e)},t.useActionState=function(e,t,n){return C.H.useActionState(e,t,n)},t.useCallback=function(e,t){return C.H.useCallback(e,t)},t.useContext=function(e){return C.H.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e,t){return C.H.useDeferredValue(e,t)},t.useEffect=function(e,t){return C.H.useEffect(e,t)},t.useEffectEvent=function(e){return C.H.useEffectEvent(e)},t.useId=function(){return C.H.useId()},t.useImperativeHandle=function(e,t,n){return C.H.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return C.H.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return C.H.useLayoutEffect(e,t)},t.useMemo=function(e,t){return C.H.useMemo(e,t)},t.useOptimistic=function(e,t){return C.H.useOptimistic(e,t)},t.useReducer=function(e,t,n){return C.H.useReducer(e,t,n)},t.useRef=function(e){return C.H.useRef(e)},t.useState=function(e){return C.H.useState(e)},t.useSyncExternalStore=function(e,t,n){return C.H.useSyncExternalStore(e,t,n)},t.useTransition=function(){return C.H.useTransition()},t.version="19.2.0"},43(e,t,n){"use strict";e.exports=n(288)},579(e,t,n){"use strict";e.exports=n(799)},896(e,t){"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,s=i>>>1;r<s;){var a=2*(r+1)-1,u=e[a],l=a+1,c=e[l];if(0>o(u,n))l<i&&0>o(c,u)?(e[r]=c,e[l]=n,r=l):(e[r]=u,e[a]=n,r=a);else{if(!(l<i&&0>o(c,n)))break e;e[r]=c,e[l]=n,r=l}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"===typeof performance&&"function"===typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var a=Date,u=a.now();t.unstable_now=function(){return a.now()-u}}var l=[],c=[],d=1,h=null,p=3,f=!1,g=!1,m=!1,v=!1,y="function"===typeof setTimeout?setTimeout:null,D="function"===typeof clearTimeout?clearTimeout:null,_="undefined"!==typeof setImmediate?setImmediate:null;function b(e){for(var t=r(c);null!==t;){if(null===t.callback)i(c);else{if(!(t.startTime<=e))break;i(c),t.sortIndex=t.expirationTime,n(l,t)}t=r(c)}}function w(e){if(m=!1,b(e),!g)if(null!==r(l))g=!0,C||(C=!0,E());else{var t=r(c);null!==t&&P(w,t.startTime-e)}}var E,C=!1,k=-1,S=5,x=-1;function F(){return!!v||!(t.unstable_now()-x<S)}function A(){if(v=!1,C){var e=t.unstable_now();x=e;var n=!0;try{e:{g=!1,m&&(m=!1,D(k),k=-1),f=!0;var o=p;try{t:{for(b(e),h=r(l);null!==h&&!(h.expirationTime>e&&F());){var s=h.callback;if("function"===typeof s){h.callback=null,p=h.priorityLevel;var a=s(h.expirationTime<=e);if(e=t.unstable_now(),"function"===typeof a){h.callback=a,b(e),n=!0;break t}h===r(l)&&i(l),b(e)}else i(l);h=r(l)}if(null!==h)n=!0;else{var u=r(c);null!==u&&P(w,u.startTime-e),n=!1}}break e}finally{h=null,p=o,f=!1}n=void 0}}finally{n?E():C=!1}}}if("function"===typeof _)E=function(){_(A)};else if("undefined"!==typeof MessageChannel){var T=new MessageChannel,I=T.port2;T.port1.onmessage=A,E=function(){I.postMessage(null)}}else E=function(){y(A,0)};function P(e,n){k=y(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_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"):S=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},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_requestPaint=function(){v=!0},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,i,o){var s=t.unstable_now();switch("object"===typeof o&&null!==o?o="number"===typeof(o=o.delay)&&0<o?s+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:i,priorityLevel:e,startTime:o,expirationTime:a=o+a,sortIndex:-1},o>s?(e.sortIndex=o,n(c,e),null===r(l)&&e===r(c)&&(m?(D(k),k=-1):m=!0,P(w,o-s))):(e.sortIndex=a,n(l,e),g||f||(g=!0,C||(C=!0,E()))),e},t.unstable_shouldYield=F,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},853(e,t,n){"use strict";e.exports=n(896)},294(e,t,n){"use strict";var r=(this&&this.__importDefault||function(e){return e&&e.__esMo
2dule?e:{default:e}})(n(222)),i=n(146);function o(e,t){var n={};return e&&"string"===typeof e?((0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n):n}o.default=o,e.exports=o},146(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,i=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},u=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||i.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(s,u):e.replace(o,u)).replace(r,a))}},222(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){let n=null;if(!e||"string"!==typeof e)return n;const r=(0,i.default)(e),o="function"===typeof t;return r.forEach(e=>{if("declaration"!==e.type)return;const{property:r,value:i}=e;o?t(r,i,e):i&&(n=n||{},n[r]=i)}),n};const i=r(n(403))},330(e,t,n){"use strict";var r=n(43);var i="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},o=r.useState,s=r.useEffect,a=r.useLayoutEffect,u=r.useDebugValue;function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(r){return!0}}var c="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,c=r[1];return a(function(){i.value=n,i.getSnapshot=t,l(i)&&c({inst:i})},[e,n,t]),s(function(){return l(i)&&c({inst:i}),e(function(){l(i)&&c({inst:i})})},[e]),u(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},461(e,t,n){"use strict";e.exports=n(330)},844(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}},440(e){"use strict";var t=function(){};e.exports=t},252(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=s(e,o.call(this,n)))}return e}function o(e){if("string"===typeof e||"number"===typeof e)return this&&this[e]||e;if("object"!==typeof e)return"";if(Array.isArray(e))return i.apply(this,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=s(t,this&&this[n]||n));return t}function s(e,t){return t?e?e+" "+t:e+t:e}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,i){if(1&i&&(r=this(r)),8&i)return r;if("object"===typeof r&&r){if(4&i&&r.__esModule)return r;if(16&i&&"function"===typeof r.then)return r}var o=Object.create(null);n.r(o);var s={};e=e||[null,t({}),t([]),t(t)];for(var a=2&i&&r;("object"==typeof a||"function"==typeof a)&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach(e=>s[e]=()=>r[e]);return s.default=()=>r,n.d(o,s),o}})(),n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/",(()=>{"use strict";var e={};n.r(e),n.d(e,{exclude:()=>bt,extract:()=>gt,parse:()=>mt,parseUrl:()=>yt,pick:()=>_t,stringify:()=>vt,stringifyUrl:()=>Dt});var t={};n.r(t),n.d(t,{FILE:()=>St,HTML:()=>At,TEXT:()=>Ft,URL:()=>xt});var r={};n.r(r),n.d(r,{boolean:()=>aL,booleanish:()=>uL,commaOrSpaceSeparated:()=>pL,commaSeparated:()=>hL,number:()=>cL,overloadedBoolean:()=>lL,spaceSeparated:()=>dL});var i={};n.r(i),n.d(i,{attentionMarkers:()=>Uj,contentInitial:()=>Rj,disable:()=>Hj,document:()=>Nj,flow:()=>Lj,flowInitial:()=>Bj,insideSpan:()=>zj,string:()=>Mj,text:()=>jj});var o=n(391);function s(e){return s="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},s(e)}function a(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==s(t)?t:t+""}function u(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
2t%2?l(Object(n),!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const d=e=>"string"===typeof e,h=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},p=e=>null==e?"":String(e),f=/###/g,g=e=>e&&e.includes("###")?e.replace(f,"."):e,m=e=>!e||d(e),v=(e,t,n)=>{const r=d(t)?t.split("."):t;let i=0;for(;i<r.length-1;){if(m(e))return{};const t=g(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return m(e)?{}:{obj:e,k:g(r[i])}},y=(e,t,n)=>{const{obj:r,k:i}=v(e,t,Object);if(void 0!==r||1===t.length)return void(r[i]=n);let o=t[t.length-1],s=t.slice(0,t.length-1),a=v(e,s,Object);for(;void 0===a.obj&&s.length;){var u;o="".concat(s[s.length-1],".").concat(o),s=s.slice(0,s.length-1),a=v(e,s,Object),null!==(u=a)&&void 0!==u&&u.obj&&"undefined"!==typeof a.obj["".concat(a.k,".").concat(o)]&&(a.obj=void 0)}a.obj["".concat(a.k,".").concat(o)]=n},D=(e,t)=>{const{obj:n,k:r}=v(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},_=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?d(e[r])||e[r]instanceof String||d(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):_(e[r],t[r],n):e[r]=t[r]);return e},b=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),w={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},E=e=>d(e)?e.replace(/[&<>"'\/]/g,e=>w[e]):e;const C=[" ",",","?","!",";"],k=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),S=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const r=t.split(n);let i=e;for(let o=0;o<r.length;){if(!i||"object"!==typeof i)return;let e,t="";for(let s=o;s<r.length;++s)if(s!==o&&(t+=n),t+=r[s],e=i[t],void 0!==e){if(["string","number","boolean"].includes(typeof e)&&s<r.length-1)continue;o+=s-o+1;break}i=e}return i},x=e=>null===e||void 0===e?void 0:e.replace(/_/g,"-"),F={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;null===(n=console)||void 0===n||null===(n=n[e])||void 0===n||null===(r=n.apply)||void 0===r||r.call(n,console,t)}};class A{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||F,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(e=e.map(e=>d(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g," "):e),d(e[0])&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}create(e){return new A(this.logger,c(c({},{prefix:"".concat(this.prefix,":").concat(e,":")}),this.options))}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new A(this.logger,e)}}var T=new A;class I{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])}once(e,t){var n=this;const r=function(){t(...arguments),n.off(e,r)};return this.on(e,r),this}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){Array.from(this.observers[e].entries()).forEac
2h(e=>{let[t,r]=e;for(let i=0;i<r;i++)t(...n)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(t=>{let[r,i]=t;for(let o=0;o<i;o++)r(e,...n)})}}}class P extends I{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{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.includes(e)||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){var r;let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,s=void 0!==i.ignoreJSONStructure?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.includes(".")?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):d(n)&&o?a.push(...n.split(o)):a.push(n)));const u=D(this.data,a);return u||t||n||!e.includes(".")||(e=a[0],t=a[1],n=a.slice(2).join(".")),!u&&s&&d(n)?S(null===(r=this.data)||void 0===r||null===(r=r[e])||void 0===r?void 0:r[t],n,o):u}addResource(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let s=[e,t];
2n&&(s=s.concat(o?n.split(o):n)),e.includes(".")&&(s=e.split("."),r=t,t=s[1]),this.addNamespaces(t),y(this.data,s,r),i.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const i in n)(d(n[i])||Array.isArray(n[i]))&&this.addResource(e,t,i,n[i],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},s=[e,t];e.includes(".")&&(s=e.split("."),r=n,n=t,t=s[1]),this.addNamespaces(t);let a=D(this.data,s)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?_(a,n,i):a=c(c({},a),n),y(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 O={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{var o,s;t=null!==(o=null===(s=this.processors[e])||void 0===s?void 0:s.process(t,n,r,i))&&void 0!==o?o:t}),t}};const N=Symbol("i18next/PATH_KEY");function R(e,t){var n,r;const{[N]:i}=e(function(){const e=[],t=Object.create(null);let n;return t.get=(r,i)=>{var o,s;return null===(o=n)||void 0===o||null===(s=o.revoke)||void 0===s||s.call(o),i===N?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)},Proxy.revocable(Object.create(null),t).proxy}()),o=null!==(n=null===t||void 0===t?void 0:t.keySeparator)&&void 0!==n?n:".",s=null!==(r=null===t||void 0===t?void 0:t.nsSeparator)&&void 0!==r?r:":",a="strict"===(null===t||void 0===t?void 0:t.enableSelector);if(i.length>1&&s){const e=null===t||void 0===t?void 0:t.ns,n=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(n){if((a?n:n.length>1?n.slice(1):[]).includes(i[0]))return"".concat(i[0]).concat(s).concat(i.slice(1).join(o))}}return i.join(o)}const B=e=>!d(e)&&"boolean"!==typeof e&&"number"!==typeof e;class L extends I{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),((e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
2i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=T.create("translator"),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e){const t=c({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}});if(null==e)return!1;const n=this.resolve(e,t);if(void 0===(null===n||void 0===n?void 0:n.res))return!1;const r=B(n.res);return!1!==t.returnObjects||!r}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let i=t.ns||this.options.defaultNS||[];const o=n&&e.includes(n),s=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!((e,t,n)=>{t=t||"",n=n||"";const r=C.filter(e=>!t.includes(e)&&!n.includes(e));if(0===r.length)return!0;const i=k.getRegExp("(".concat(r.map(e=>"?"===e?"\\?":e).join("|"),")"));let o=!i.test(e);if(!o){const t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(o=!0)}return o})(e,n,r);if(o&&!s){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:d(i)?[i]:i};const o=e.split(n);(n!==r||n===r&&this.options.ns.includes(o[0]))&&(i=o.shift()),e=o.join(r)}return{key:e,namespaces:d(i)?[i]:i}}translate(e,t,n){let r="object"===typeof t?c({},t):t;if("object"!==typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"===typeof r&&(r=c({},r)),r||(r={}),null==e)return"";"function"===typeof e&&(e=R(e,c(c({},this.options),r))),Array.isArray(e)||(e=[String(e)]),e=e.map(e=>"function"===typeof e?R(e,c(c({},this.options),r)):String(e));const i=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:s,namespaces:a}=this.extractFromKey(e[e.length-1],r),u=a[a.length-1];let l=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===l&&(l=":");const h=r.lng||this.language,p=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===(null===h||void 0===h?void 0:h.toLowerCase()))return p?i?{res:"".concat(u).concat(l).concat(s),usedKey:s,exactUsedKey:s,usedLng:h,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:"".concat(u).concat(l).concat(s):i?{res:s,usedKey:s,exactUsedKey:s,usedLng:h,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:s;const f=this.resolve(e,r);let g=null===f||void 0===f?void 0:f.res;const m=(null===f||void 0===f?void 0:f.usedKey)||s,v=(null===f||void 0===f?void 0:f.exactUsedKey)||s,y=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,D=!this.i18nFormat||this.i18nFormat.handleAsObject,_=void 0!==r.count&&!d(r.count),b=L.hasDefaultValue(r),w=_?this.pluralResolver.getSuffix(h,r.count,r):"",E=r.ordinal&&_?this.pluralResolver.getSuffix(h,r.count,{ordinal:!1}):"",C=_&&!r.ordinal&&0===r.count,k=C&&r["defaultValue".concat(this.options.pluralSeparator,"zero")]||r["defaultValue".concat(w)]||r["defaultValue".concat(E)]||r.defaultValue;let S=g;D&&!g&&b&&(S=k);const x=B(S),F=Object.prototype.toString.apply(S);if(!(D&&S&&x)||["[object Number]","[object Function]","[object RegExp]"].includes(F)||d(y)&&Array.isArray(S))if(D&&d(y)&&Array.isArray(g))g=g.join(y),g&&(g=this.extendTranslation(g,e,r,n));else{let t=!1,i=!1;!this.isValidLookup(g)&&b&&(t=!0,g=k),this.isValidLookup(g)||(i=!0,g=s);const a=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&i?void 0:g,d=b&&k!==g&&this.options.updateMissing;if(i||t||d){if(this.logger.log(d?"updateKey":"missingKey",h,u,_&&!d?"".concat(s).concat(this.pluralResolver.getSuffix(h,r.count,r)):s,d?k:g),o){const e=this.resolve(s,c(c({},r),{},{keySeparator:!1}));e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let r=0;r<t.length;r++)e.push(t[r]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(r.lng||this.language):e.push(r.lng||this.language);const n=(e,t,n)=>{var i;const o=b&&n!==g?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,u,t,o,d,r):null!==(i=this.backendConnector)&&void 0!==i&&i.saveMissing&&this.backendConnector.saveMissing(e,u,t,o,d,r),this.emit
2("missingKey",e,u,t,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&_?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,r);C&&r["defaultValue".concat(this.options.pluralSeparator,"zero")]&&!t.includes("".concat(this.options.pluralSeparator,"zero"))&&t.push("".concat(this.options.pluralSeparator,"zero")),t.forEach(t=>{n([e],s+t,r["defaultValue".concat(t)]||k)})}):n(e,s,k))}g=this.extendTranslation(g,e,r,f,n),i&&g===s&&this.options.appendNamespaceToMissingKey&&(g="".concat(u).concat(l).concat(s)),(i||t)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(u).concat(l).concat(s):s,t?g:void 0,r))}else{if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,S,c(c({},r),{},{ns:a})):"key '".concat(s," (").concat(this.language,")' returned an object instead of string.");return i?(f.res=e,f.usedParams=this.getUsedParamsDetails(r),f):e}if(o){const e=Array.isArray(S),t=e?[]:{},n=e?v:m;for(const i in S)if(Object.prototype.hasOwnProperty.call(S,i)){const e="".concat(n).concat(o).concat(i);t[i]=b&&!g?this.translate(e,c(c({},r),{},{defaultValue:B(k)?k[i]:void 0},{joinArrays:!1,ns:a})):this.translate(e,c(c({},r),{joinArrays:!1,ns:a})),t[i]===e&&(t[i]=S[i])}g=t}}return i?(f.res=g,f.usedParams=this.getUsedParamsDetails(r),f):g}extendTranslation(e,t,n,r,i){var o,s=this;if(null!==(o=this.i18nFormat)&&void 0!==o&&o.parse)e=this.i18nFormat.parse(e,c(c({},this.options.interpolation.defaultVariables),n),n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){var a;n.interpolation&&this.interpolator.init(c(c({},n),{interpolation:c(c({},this.options.interpolation),n.interpolation)}));const o=d(e)&&(void 0!==(null===n||void 0===n||null===(a=n.interpolation)||void 0===a?void 0:a.skipOnVariables)?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(o){const t=e.match(this.interpolator.nestingRegexp);u=t&&t.length}let l=n.replace&&!d(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(l=c(c({},this.options.interpolation.defaultVariables),l)),e=this.interpolator.interpolate(e,l,n.lng||this.language||r.usedLng,n),o){const t=e.match(this.interpolator.nestingRegexp);u<(t&&t.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return(null===i||void 0===i?void 0:i[0])!==r[0]||n.context?s.translate(...r,t):(s.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null)},n)),n.interpolation&&this.interpolator.reset()}const u=n.postProcess||this.options.postProcess,l=d(u)?[u]:u;return null!=e&&null!==l&&void 0!==l&&l.length&&!1!==n.applyPostProcessor&&(e=O.handle(l,e,t,this.options&&this.options.postProcessPassResolved?c({i18nResolved:c(c({},r),{},{usedParams:this.getUsedParamsDetails(n)})},n):n,this)),e}resolve(e){let t,n,r,i,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return d(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>"function"===typeof e?R(e,c(c({},this.options),s)):e)),e.forEach(e=>{if(this.isValidLookup(t))return;const a=this.extractFromKey(e,s),u=a.key;n=u;let l=a.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const c=void 0!==s.count&&!d(s.count),h=c&&!s.ordinal&&0===s.count,p=void 0!==s.context&&(d(s.context)||"number"===typeof s.context)&&""!==s.context,f=s.lngs?s.lngs:this.languageUtils.toResolveHierarchy(s.lng||this.language,s.fallbackLng);l.forEach(e=>{var a,l;this.isValidLookup(t)||(o=e,this.checkedLoadedFor["".concat(f[0],"-").concat(e)]||null===(a=this.utils)||void 0===a||!a.hasLoadedNamespace||null!==(l=this.utils)&&void 0!==l&&l.hasLoadedNamespace(o)||(this.checkedLoadedFor["".concat(f[0],"-").concat(e)]=!0,this.logger.warn('key "'.concat(n,'" for languages "').concat(f.join(", "),'" won\'t get resolved as namespace "').concat(o,'" 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!!!")),f.forEach(n=>{var o;if(this.isValidLookup(t))return;i=n;const a=[u];if(null!==(o=this.i18nFormat)&&void 0!==o&&o.addLookupKeys)this.i18nFormat.addLookupKeys(a,u,n,e,s);else{let e;c&&(e=this.pluralResolver.getSuffix(n,s.count,s));const t="".concat(this.options.pluralSeparator,"zero"),r="".concat(this.options.pluralSeparator,"ordinal").concat(this.options.pluralSeparator);if(c&&(s.ordinal&&e.startsWith(r)&&a.push(u+e.replace(r,this.options.pluralSeparator)),a.push(u+e),h&&a.push(u+t)),p){const n="".concat(u).
2concat(this.options.contextSeparator||"_").concat(s.context);a.push(n),c&&(s.ordinal&&e.startsWith(r)&&a.push(n+e.replace(r,this.options.pluralSeparator)),a.push(n+e),h&&a.push(n+t))}}let l;for(;l=a.pop();)this.isValidLookup(t)||(r=l,t=this.getResource(n,e,l,s))}))})}),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:o}}isValidLookup(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}getResource(e,t,n){var r;let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return null!==(r=this.i18nFormat)&&void 0!==r&&r.getResource?this.i18nFormat.getResource(e,t,n,i):this.resourceStore.getResource(e,t,n,i)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!d(e.replace);let r=n?e.replace:e;if(n&&"undefined"!==typeof e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r=c(c({},this.options.interpolation.defaultVariables),r)),!n){r=c({},r);for(const e of t)delete r[e]}return r}static hasDefaultValue(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith("defaultValue")&&void 0!==e[t])return!0;return!1}}class M{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=T.create("languageUtils")}getScriptPartFromCode(e){if(!(e=x(e))||!e.includes("-"))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=x(e))||!e.includes("-"))return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(d(e)&&e.includes("-")){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(y_){}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.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;const r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r||!(!e.includes("-")&&!r.includes("-"))&&(!(!e.includes("-")||r.includes("-")||e.slice(0,e.indexOf("-"))!==r)||!!(e.startsWith(r)&&r.length>1)))}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"===typeof e&&(e=e(t)),d(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return d(e)&&(e.includes("-")||e.includes("_"))?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):d(e)&&i(this.formatLanguageCode(e)),n.forEac
2h(e=>{r.includes(e)||i(this.formatLanguageCode(e))}),r}}const j={zero:0,one:1,two:2,few:3,many:4,other:5},z={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class U{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=T.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=x("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(n,{type:r})}catch(s){if("undefined"===typeof Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),z;if(!e.match(/-|_/))return z;const n=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(n,t)}return this.pluralRulesCache[i]=o,o}needsPlural(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),(null===(t=r)||void 0===t?void 0:t.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map(e=>"".concat(t).concat(e))}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>j[e]-j[t]).map(e=>"".concat(this.options.prepend).concat(t.ordinal?"ordinal".concat(this.options.prepend):"").concat(e)):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getRule(e,n);return r?"".concat(this.options.prepend).concat(n.ordinal?"ordinal".concat(this.options.prepend):"").concat(r.select(t)):(this.logger.warn("no plural rule found for: ".concat(e)),this.getSuffix("dev",t,n))}}const H=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=((e,t,n)=>{const r=D(e,n);return void 0!==r?r:D(t,n)})(e,t,n);return!o&&i&&d(n)&&(o=S(e,n,r),void 0===o&&(o=S(t,n,r))),o},q=e=>e.replace(/\$/g,"$$$$");class W{constructor(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=T.create("interpolator"),this.options=t,this.format=(null===t||void 0===t||null===(e=t.interpolation)||void 0===e?void 0:e.format)||(e=>e),this.init(t)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:o,suffix:s,suffixEscaped:a,formatSeparator:u,unescapeSuffix:l,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:h,nestingSuffix:p,nestingSuffixEscaped:f,nestingOptionsSeparator:g,maxReplaces:m,alwaysFormat:v}=e.interpolation;this.escape=void 0!==t?t:E,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=i?b(i):o||"{{",this.suffix=s?b(s):a||"}}",this.formatSeparator=u||",",this.unescapePrefix=l?"":c?b(c):"-",this.unescapeSuffix=this.unescapePrefix?"":l?b(l):"",this.nestingPrefix=d?b(d):h||b("$t("),this.nestingSuffix=p?b(p):f||b(")"),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)=>(null===e||void 0===e?void 0:e.source)===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,"".concat(this.prefix,"(.+?)").concat(this.suffix)),this.regexpUnescape=e(this.regexpUnescape,"".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix)),this.nestingRegexp=e(this.nestingRegexp,"".concat(this.nestingPrefix,"((?:[^()\"']+|\"[^\"]*\"|'[^']*'|\\((?:[^()]|\"[^\"]*\"|'[^']*')*\\))*?)").concat(this.nestingSuffix))}interpolate(e,t,n,r){var i;let o,s,a;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(!e.includes(this.formatSeparator)){const i=H(t,u,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,c(c(c({},r),t),{},{interpolationkey:e})):i}const i=e.split(this.formatSeparator),o=i.shift().trim(),s=i.join(this.formatSeparator).trim();return this.format(H(t,u,o,this.options.keySeparator,this.options.ignoreJSONStructure),s,n,c(c(c({},r),t),{},{interpolationkey:o}))};this.resetRegExp(),!this.escapeValue&&"string"===typeof e&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false \u2014 if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const h=(null===r||void 0===r?void 0:r.missingInterpolationHandler)||this.options.missingInterpolationHandler,f=void 0!==(null===r||void 0===r||null===(i=r.interpolation)||void 0===i?void 0:i.skipOnVariables)?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>q(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?q(this.escape(e)):q(e)}
2].forEach(t=>{for(a=0;o=t.regex.exec(e);){const n=o[1].trim();if(s=l(n),void 0===s)if("function"===typeof h){const t=h(e,o,r);s=d(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))s="";else{if(f){s=o[0];continue}this.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),s=""}else d(s)||this.useRawValueToEscape||(s=p(s));const i=t.safeValue(s);if(e=e.replace(o[0],i),f?(t.regex.lastIndex+=s.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t){let n,r,i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=(e,t)=>{var n,r;const o=this.nestingOptionsSeparator;if(!e.includes(o))return e;const s=e.split(new RegExp("".concat(b(o),"[ ]*{")));let a="{".concat(s[1]);e=s[0],a=this.interpolate(a,i);const u=a.match(/'/g),l=a.match(/"/g);((null!==(n=null===u||void 0===u?void 0:u.length)&&void 0!==n?n:0)%2===0&&!l||(null!==(r=null===l||void 0===l?void 0:l.length)&&void 0!==r?r:0)%2!==0)&&(a=a.replace(/'/g,'"'));try{i=JSON.parse(a),t&&(i=c(c({},t),i))}catch(y_){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),y_),"".concat(e).concat(o).concat(a)}return i.defaultValue&&i.defaultValue.includes(this.prefix)&&delete i.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let a=[];i=c({},o),i=i.replace&&!d(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;const u=/{.*}/.test(n[1])?n[1].lastIndexOf("}")+1:n[1].indexOf(this.formatSeparator);if(-1!==u&&(a=n[1].slice(u).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),n[1]=n[1].slice(0,u)),r=t(s.call(this,n[1].trim(),i),i),r&&n[0]===e&&!d(r))return r;d(r)||(r=p(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),a.length&&(r=a.reduce((e,t)=>this.format(e,t,o.lng,c(c({},o),{},{interpolationkey:n[1].trim()})),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}const $=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o=c(c({},o),{},{[i.interpolationkey]:void 0}));const s=r+JSON.stringify(o);let a=t[s];return a||(a=e(x(r),i),t[s]=a),a(n)}},V=e=>(t,n,r)=>e(x(n),r)(t);class G{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=T.create("formatter"),this.options=e,this.init(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?$:V;this.formats={number:n((e,t)=>{const n=new Intl.NumberFormat(e,c({},t));return e=>n.format(e)}),currency:n((e,t)=>{const n=new Intl.NumberFormat(e,c(c({},t),{},{style:"currency"}));return e=>n.format(e)}),datetime:n((e,t)=>{const n=new Intl.DateTimeFormat(e,c({},t));return e=>n.format(e)}),relativetime:n((e,t)=>{const n=new Intl.RelativeTimeFormat(e,c({},t));return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{const n=new Intl.ListFormat(e,c({},t));return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=$(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!t)return e;if(null==e)return e;const i=t.split(this.formatSeparator),o=[];for(let a=0;a<i.length;a++){let e=i[a];for(;e.indexOf("(")>-1&&!e.includes(")")&&a+1<i.length;)e="".concat(e).concat(this.formatSeparator).concat(i[++a]);o.push(e)}const s=o.reduce((e,t)=>{const{formatName:i,formatOptions:o}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.includes("(")){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].slice(0,-1);"currency"!==t||i.includes(":")?"relativetime"!==t||i.includes(":")?i.split(";").forEach(e=>{if(e){const[t,...r]=e.split(":"),i=r.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();n[o]||(n[o]=i),"false"===i&&(n[o]=!1),"true"===i&&(n[o]=!0),isNaN(i)||(n[o]=parseInt(i,10))}}):n.range||(n.range=i.trim()):n.currency||(n.currency=i.trim())}return{formatName:t,formatOptions:n}})(t);if(this.formats[i]){let t=e;try{var s;const a=(null===r||void 0===r||null===(s=r.formatParams)||void 0===s?void 0:s[r.interpolationkey])||{},u=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[i](e,u,c(c(c({},o),r),a))}catch(If){this.logger.warn(If)}return t}return this.logger.warn("there was no format function for ".concat(i)),e},e);return s}}class K extends I{constructor(e,t,n){var r,i;let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=o,this.logger=T.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],null===(r=this.backend)||void 0===r||null===(i=r.init)||void 0===i||i.call(r,n,o.backend,o)}queueLoad(e,t,n,r){const i={},o={},s={},a={};
2return e.forEach(e=>{let r=!0;t.forEach(t=>{const s="".concat(e,"|").concat(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,r=!1,void 0===o[s]&&(o[s]=!0),void 0===i[s]&&(i[s]=!0),void 0===a[t]&&(a[t]=!0)))}),r||(s[e]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(a)}}loaded(e,t,n){const r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),!t&&n&&this.store.addResourceBundle(i,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:r,k:i}=v(e,t,Object);r[i]=r[i]||[],r[i].push(n)})(n.loaded,[i],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){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,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&&r<this.maxRetries?setTimeout(()=>{this.read(e,t,n,r+1,2*i,o)},i):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(u){s(u)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();d(e)&&(e=this.languageUtils.toResolveHierarchy(e)),d(t)&&(t=[t]);const i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.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){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),r=n[0],i=n[1];this.read(r,i,"read",void 0,void 0,(n,o)=>{n&&this.logger.warn("".concat(t,"loading namespace ").concat(i," for language ").concat(r," failed"),n),!n&&o&&this.logger.log("".concat(t,"loaded namespace ").concat(i," for language ").concat(r),o),this.loaded(e,n,o)})}saveMissing(e,t,n,r,i){var o,s,a;let u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(null===(o=this.services)||void 0===o||null===(o=o.utils)||void 0===o||!o.hasLoadedNamespace||null!==(s=this.services)&&void 0!==s&&null!==(s=s.utils)&&void 0!==s&&s.hasLoadedNamespace(t)){if(void 0!==n&&null!==n&&""!==n){if(null!==(a=this.backend)&&void 0!==a&&a.create){const o=c(c({},u),{},{isUpdate:i}),s=this.backend.create.bind(this.backend);if(s.length<6)try{let i;i=5===s.length?s(e,t,n,r,o):s(e,t,n,r),i&&"function"===typeof i.then?i.then(e=>l(null,e)).catch(l):l(null,i)}catch(d){l(d)}else s(e,t,n,r,l,o)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}else this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(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 Y=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,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]),d(e[1])&&(t.defaultValue=e[1]),d(e[2])&&(t.tDescription=e[2]),"object"===typeof e[2]||"object"===typeof e[3]){const n=e[3]||e[2];
2Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),J=e=>(d(e.ns)&&(e.ns=[e.ns]),d(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),d(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Q=()=>{};class X extends I{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=J(e),this.services={},this.logger=T,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(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"===typeof t&&(n=t,t={}),null==t.defaultNS&&t.ns&&(d(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const r=Y();this.options=c(c(c({},r),this.options),J(t)),this.options.interpolation=c(c({},r.interpolation),this.options.interpolation),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),"function"!==typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler);const i=e=>e?"function"===typeof e?new e:e:null;if(!this.options.isClone){let t;this.modules.logger?T.init(i(this.modules.logger),this.options):T.init(null,this.options),t=this.modules.formatter?this.modules.formatter:G;const n=new M(this.options);this.store=new P(this.options.resources,this.options);const r=this.services;r.logger=T,r.resourceStore=this.store,r.languageUtils=n,r.pluralResolver=new U(n,{prepend:this.options.pluralSeparator}),t&&(r.formatter=i(t),r.formatter.init&&r.formatter.init(r,this.options),this.options.interpolation.format=r.formatter.format.bind(r.formatter)),r.interpolator=new W(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},r.backendConnector=new K(i(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.on("*",function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit(t,...r)}),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 L(this.services,this.options),this.translator.on("*",function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit(t,...r)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Q),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(t=>{this[t]=function(){return e.store[t](...arguments)}});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(t=>{this[t]=function(){return e.store[t](...arguments),e}});const o=h(),s=()=>{const e=(e,t)=>{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
2("initialized",this.options),o.resolve(t),n(e,t)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?s():setTimeout(s,0),o}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Q;const n=d(e)?e:this.language;if("function"===typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){var r,i;if("cimode"===(null===n||void 0===n?void 0:n.toLowerCase())&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],o=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&(e.includes(t)||e.push(t))})};if(n)o(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>o(e))}null===(r=this.options.preload)||void 0===r||null===(i=r.forEach)||void 0===i||i.call(r,e=>o(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)})}else t(null)}reloadResources(e,t,n){const r=h();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=Q),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&O.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"].includes(e)){for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!["cimode","dev"].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}this.resolvedLanguage||this.languages.includes(e)||!this.store.hasLanguageSomeTranslations(e)||(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const r=h();this.emit("languageChanging",e);const i=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(o,s)=>{s?this.isLanguageChangingTo===e&&(i(s),this.translator.changeLanguage(s),this.isLanguageChangingTo=void 0,this.emit("languageChanged",s),this.logger.log("languageChanged",s)):this.isLanguageChangingTo=void 0,r.resolve(function(){return n.t(...arguments)}),t&&t(o,function(){return n.t(...arguments)})},s=t=>{e||t||!this.services.languageDetector||(t=[]);const n=d(t)?t:t&&t[0],r=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(d(t)?[t]:t);var s,a;r&&(this.language||i(r),this.translator.language||this.translator.changeLanguage(r),null===(s=this.services.languageDetector)||void 0===s||null===(a=s.cacheUserLanguage)||void 0===a||a.call(s,r));this.loadResources(r,e=>{o(e,r)})};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(s):this.services.languageDetector.detect(s):s(e):s(this.services.languageDetector.detect()),r}getFixedT(e,t,n,r){var i=this;const o=null===r||void 0===r?void 0:r.scopeNs,s=function(e,t){let r;if("object"!==typeof t){for(var a=arguments.length,u=new Array(a>2?a-2:0),l=2;l<a;l++)u[l-2]=arguments[l];r=i.options.overloadTranslationOptionHandler([e,t].concat(u))}else r=c({},t);r.lng=r.lng||s.lng,r.lngs=r.lngs||s.lngs;const d=void 0!==r.ns&&null!==r.ns;r.ns=r.ns||s.ns,""!==r.keyPrefix&&(r.keyPrefix=r.keyPrefix||n||s.keyPrefix);const h=c(c({},i.options),r);Array.isArray(o)&&!d&&(h.ns=o),"function"===typeof r.keyPrefix&&(r.keyPrefix=R(r.keyPrefix,h));const p=i.options.keySeparator||".";let f;return r.keyPrefix&&Array.isArray(e)?f=e.map(e=>("function"===typeof e&&(e=R(e,h)),"".concat(r.keyPrefix).concat(p).concat(e))):("function"===typeof e&&(e=R(e,h)),f=r.keyPrefix?"".concat(r.keyPrefix).concat(p).concat(e):e),i.t(f,r)};return d(e)?s.lng=e:s.lngs=e,s.ns=t,s.keyPrefix=n,s}t(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return null===(e=this.translator)||void 0===e?void 0:e.translate(...n)}exists(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return null===(e=this.translator)||void 0===e?void 0:e.exists(...n)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;
2if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const o=(e,t)=>{const n=this.services.backendConnector.state["".concat(e,"|").concat(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)||r&&!o(i,e)))}loadNamespaces(e,t){const n=h();return this.options.ns?(d(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=h();d(e)&&(e=[e]);const r=this.options.preload||[],i=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){var t,n;if(e||(e=this.resolvedLanguage||((null===(t=this.languages)||void 0===t?void 0:t.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(y_){}const r=(null===(n=this.services)||void 0===n?void 0:n.languageUtils)||new M(Y());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"].includes(r.getLanguagePartFromCode(e))||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){const e=new X(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0);return e.createInstance=X.createInstance,e}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Q;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r=c(c(c({},this.options),e),{isClone:!0}),i=new X(r);void 0===e.debug&&void 0===e.prefix||(i.logger=i.logger.clone(e));if(["store","services","language"].forEach(e=>{i[e]=this[e]}),i.services=c({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]=c({},this.store.data[t]),e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]=c({},e[t][r]),n),e[t]),e),{});i.store=new P(e,r),i.services.resourceStore=i.store}if(e.interpolation){const t=c(c(c({},Y().interpolation),this.options.interpolation),e.interpolation),n=c(c({},r),{},{interpolation:t});i.services.interpolator=new W(n)}return i.translator=new L(i.services,r),i.translator.on("*",function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.emit(e,...n)}),i.init(r,t),i.translator.options=r,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Z=X.createInstance();Z.createInstance,Z.dir,Z.init,Z.loadResources,Z.reloadResources,Z.use,Z.changeLanguage,Z.getFixedT,Z.t,Z.exists,Z.setDefaultNamespace,Z.hasLoadedNamespace,Z.loadNamespaces,Z.loadLanguages;var ee=n(43),te=n.t(ee,2);n(844);Object.create(null);const ne=(e,t,n,r)=>{var i,o,s;const a=[n,c({code:t},r||{})];if(null!==e&&void 0!==e&&null!==(i=e.services)&&void 0!==i&&null!==(i=i.logger)&&void 0!==i&&i.forward)return e.services.logger.forward(a,"warn","react-i18next::",!0);ue(a[0])&&(a[0]="react-i18next:: ".concat(a[0])),null!==e&&void 0!==e&&null!==(o=e.services)&&void 0!==o&&null!==(o=o.logger)&&void 0!==o&&o.warn?e.services.logger.warn(...a):null!==(s=console)&&void 0!==s&&s.warn&&console.warn(...a)},re={},ie=(e,t,n,r)=>{ue(n)&&re[n]||(ue(n)&&(re[n]=new Date),ne(e,t,n,r))},oe=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},se=(e,t,n)=>{e.loadNamespaces(t,oe(e,n))},ae=(e,t,n,r)=>{if(ue(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return se(e,n,r);
2n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,oe(e,r))},ue=e=>"string"===typeof e,le=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ce={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"\xa9","©":"\xa9","®":"\xae","®":"\xae","…":"\u2026","…":"\u2026","/":"/","/":"/"},de=e=>ce[e];let he={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(le,de),transDefaultProps:void 0};let pe;const fe=()=>pe,ge={type:"3rdParty",init(e){!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};he=c(c({},he),e)}(e.options.react),(e=>{pe=e})(e)}};const me=(0,ee.createContext)();class ve{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}class ye extends Error{constructor(e,t,n){super(e),this.name="TranslationParserError",this.position=t,this.translationString=n,Error.captureStackTrace&&Error.captureStackTrace(this,ye)}}const De={" ":"\xa0","&":"&","<":"<",">":">",""":'"',"'":"'","©":"\xa9","®":"\xae","™":"\u2122","…":"\u2026","–":"\u2013","—":"\u2014","‘":"\u2018","’":"\u2019","‚":"\u201a","“":"\u201c","”":"\u201d","„":"\u201e","†":"\u2020","‡":"\u2021","•":"\u2022","′":"\u2032","″":"\u2033","‹":"\u2039","›":"\u203a","§":"\xa7","¶":"\xb6","·":"\xb7"," ":"\u2002"," ":"\u2003"," ":"\u2009","€":"\u20ac","£":"\xa3","¥":"\xa5","¢":"\xa2","¤":"\xa4","×":"\xd7","÷":"\xf7","−":"\u2212","±":"\xb1","≠":"\u2260","≤":"\u2264","≥":"\u2265","≈":"\u2248","≡":"\u2261","∞":"\u221e","∫":"\u222b","∑":"\u2211","∏":"\u220f","√":"\u221a","∂":"\u2202","‰":"\u2030","°":"\xb0","µ":"\xb5","←":"\u2190","↑":"\u2191","→":"\u2192","↓":"\u2193","↔":"\u2194","↵":"\u21b5","⇐":"\u21d0","⇑":"\u21d1","⇒":"\u21d2","⇓":"\u21d3","⇔":"\u21d4","α":"\u03b1","β":"\u03b2","γ":"\u03b3","δ":"\u03b4","ε":"\u03b5","ζ":"\u03b6","η":"\u03b7","θ":"\u03b8","ι":"\u03b9","κ":"\u03ba","λ":"\u03bb","μ":"\u03bc","ν":"\u03bd","ξ":"\u03be","ο":"\u03bf","π":"\u03c0","ρ":"\u03c1","σ":"\u03c3","τ":"\u03c4","υ":"\u03c5","φ":"\u03c6","χ":"\u03c7","ψ":"\u03c8","ω":"\u03c9","Α":"\u0391","Β":"\u0392","Γ":"\u0393","Δ":"\u0394","Ε":"\u0395","Ζ":"\u0396","Η":"\u0397","Θ":"\u0398","Ι":"\u0399","Κ":"\u039a","Λ":"\u039b","Μ":"\u039c","Ν":"\u039d","Ξ":"\u039e","Ο":"\u039f","Π":"\u03a0","Ρ":"\u03a1","Σ":"\u03a3","Τ":"\u03a4","Υ":"\u03a5","Φ":"\u03a6","Χ":"\u03a7","Ψ":"\u03a8","Ω":"\u03a9","À":"\xc0","Á":"\xc1","Â":"\xc2","Ã":"\xc3","Ä":"\xc4","Å":"\xc5","Æ":"\xc6","Ç":"\xc7","È":"\xc8","É":"\xc9","Ê":"\xca","Ë":"\xcb","Ì":"\xcc","Í":"\xcd","Î":"\xce","Ï":"\xcf","Ð":"\xd0","Ñ":"\xd1","Ò":"\xd2","Ó":"\xd3","Ô":"\xd4","Õ":"\xd5","Ö":"\xd6","Ø":"\xd8","Ù":"\xd9","Ú":"\xda","Û":"\xdb","Ü":"\xdc","Ý":"\xdd","Þ":"\xde","ß":"\xdf","à":"\xe0","á":"\xe1","â":"\xe2","ã":"\xe3","ä":"\xe4","å":"\xe5","æ":"\xe6","ç":"\xe7","è":"\xe8","é":"\xe9","ê":"\xea","ë":"\xeb","ì":"\xec","í":"\xed","î":"\xee","ï":"\xef","ð":"\xf0","ñ":"\xf1","ò":"\xf2","ó":"\xf3","ô":"\xf4","õ":"\xf5","ö":"\xf6","ø":"\xf8","ù":"\xf9","ú":"\xfa","û":"\xfb","ü":"\xfc","ý":"\xfd","þ":"\xfe","ÿ":"\xff","¡":"\xa1","¿":"\xbf","ƒ
2":"\u0192","ˆ":"\u02c6","˜":"\u02dc","Œ":"\u0152","œ":"\u0153","Š":"\u0160","š":"\u0161","Ÿ":"\u0178","ª":"\xaa","º":"\xba","¯":"\xaf","´":"\xb4","¸":"\xb8","¹":"\xb9","²":"\xb2","³":"\xb3","¼":"\xbc","½":"\xbd","¾":"\xbe","♠":"\u2660","♣":"\u2663","♥":"\u2665","♦":"\u2666","◊":"\u25ca","‾":"\u203e","⁄":"\u2044","℘":"\u2118","ℑ":"\u2111","ℜ":"\u211c","ℵ":"\u2135"},_e=new RegExp(Object.keys(De).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),"g");function be(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}const we=["children"],Ee=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e)return[];const n=(e=>{const t=[];let n=0,r="";const i=()=>{r&&(t.push({type:"Text",value:r,position:n-r.length}),r="")};for(;n<e.length;){const o=e[n];if("<"===o){const s=e.slice(n).match(/^<(\d+)>/);if(s)i(),t.push({type:"TagOpen",value:s[0],position:n,tagNumber:parseInt(s[1],10)}),n+=s[0].length;else{const s=e.slice(n).match(/^<\/(\d+)>/);s?(i(),t.push({type:"TagClose",value:s[0],position:n,tagNumber:parseInt(s[1],10)}),n+=s[0].length):(r+=o,n+=1)}}else r+=o,n+=1}return i(),t})(e),r=[],i=[],o=new Set;if(n.forEach(n=>{switch(n.type){case"Text":{const e=n.value.replace(_e,e=>De[e]).replace(/&#(\d+);/g,(e,t)=>String.fromCharCode(parseInt(t,10))).replace(/&#x([0-9a-fA-F]+);/g,(e,t)=>String.fromCharCode(parseInt(t,16)));(i.length>0?i[i.length-1].children:r).push(e)}break;case"TagOpen":{const{tagNumber:e}=n,s=(()=>{var e;if(0===i.length)return t;const n=i[i.length-1];return null!==(e=n.declaration.props)&&void 0!==e&&e.children&&Array.isArray(n.declaration.props.children)?n.declaration.props.children:n.declarations})(),a=s[e];if(!a){o.add(e);const t="<".concat(e,">");(i.length>0?i[i.length-1].children:r).push(t);break}i.push({tagNumber:e,children:[],position:n.position,declaration:a,declarations:s})}break;case"TagClose":{const{tagNumber:t}=n;if(o.has(t)){const e="</".concat(t,">");(i.length>0?i[i.length-1].children:r).push(e),o.delete(t);break}if(0===i.length)throw new ye("Unexpected closing tag </".concat(t,"> at position ").concat(n.position),n.position,e);const s=i.pop();if(s.tagNumber!==t)throw new ye("Mismatched tags: expected </".concat(s.tagNumber,"> but got </").concat(t,"> at position ").concat(n.position),n.position,e);const a=((e,t,n)=>{const{type:r,props:i={}}=e;if(i.children&&Array.isArray(i.children)&&n){const{children:e}=i,n=be(i,we);return ee.createElement(r,n,...t)}return 0===t.length?ee.createElement(r,i):1===t.length?ee.createElement(r,i,t[0]):ee.createElement(r,i,...t)})(s.declaration,s.children,s.declarations);(i.length>0?i[i.length-1].children:r).push(a)}}}),i.length>0){const t=i[i.length-1];throw new ye("Unclosed tag <".concat(t.tagNumber,"> at position ").concat(t.position),t.position,e)}return r};function Ce(e){var t,n,r;let{i18nKey:i,defaultTranslation:o,content:s,ns:a,values:u={},i18n:l,t:d}=e;const h=l||fe();if(!h)return ie(h,"NO_I18NEXT_INSTANCE","IcuTrans: You need to pass in an i18next instance using i18nextReactModule",{i18nKey:i}),ee.createElement(ee.Fragment,{},o);const p=d||(null===(t=h.t)||void 0===t?void 0:t.bind(h))||(e=>e);let f=a||p.ns||(null===(n=h.options)||void 0===n?void 0:n.defaultNS);f=ue(f)?[f]:f||["translation"];let g=u;null!==(r=h.options)&&void 0!==r&&null!==(r=r.interpolation)&&void 0!==r&&r.defaultVariables&&(g=u&&Object.keys(u).length>0?c(c({},u),h.options.interpolation.defaultVariables):c({},h.options.interpolation.defaultVariables));const m=p(i,c(c({defaultValue:o},g),{},{ns:f}));try{const e=Ee(m,s);return ee.createElement(ee.Fragment,{},...e)}catch(If){return ne(h,"ICU_TRANS_RENDER_ERROR",'IcuTrans component error for key "'.concat(i,'": ').concat(If.message),{i18nKey:i,error:If}),ee.createElement(ee.Fragment,{},m)}}Ce.displayName="IcuTransWithoutContext";var ke=n(461);const Se={t:(e,t)=>{if(ue(t))return t;if("object"===typeof(n=t)&&null!==n&&ue(t.defaultValue))return t.defaultValue;var n;if("function"===typeof e)return"";if(Array.isArray(e)){const t=e[e.length-1];return"function"===typeof t?"":t}return e},ready:!1},xe=()=>()=>{},Fe=function(e){var t,n,r;let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{i18n:o}=i,{i18n:s,defaultNS:a}=(0,ee.useContext)(me)||{},u=o||s||fe();u&&!u.reportNamespaces&&(u.reportNamespaces=new ve),u||ie(u,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const l=(0,ee.useMemo)(()=>{var e;return c(c(c({},he),null===u||void 0===u||null===(e=u.options)||void 0===e?void 0:e.react),i)},[u,i]),{useSuspense:d,keyPrefix:h}=l,p=e||a||(null===u||void 0===u||null===(t=u.options)||void 0===t?void 0:t.defaultNS),f=ue(p)?[p]:p||["translation"],g=(0,ee.useMemo)(()=>f,f);null===u||void 0===u||null===(n=u.reportNamespaces)||void 0===n||null===(r=n.addUsedNamespaces)||void 0===r||r.call(n,g);const m=(0,ee.useRef)(0),v=(0,ee.useCallback)(e=>{if(!u)return xe;const{bindI18n:t,bindI18nStore:n}=l,r=()=>
2{m.current+=1,e()};return t&&u.on(t,r),n&&u.store.on(n,r),()=>{t&&t.split(" ").forEach(e=>u.off(e,r)),n&&n.split(" ").forEach(e=>u.store.off(e,r))}},[u,l]),y=(0,ee.useRef)(),D=(0,ee.useCallback)(()=>{if(!u)return Se;const e=!(!u.isInitialized&&!u.initializedStoreOnce)&&g.every(e=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.languages&&t.languages.length?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):(ie(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0)}(e,u,l)),t=i.lng||u.language,n=m.current,r=y.current;if(r&&r.ready===e&&r.lng===t&&r.keyPrefix===h&&r.revision===n)return r;const o={t:u.getFixedT(t,"fallback"===l.nsMode?g:g[0],h,{scopeNs:g}),ready:e,lng:t,keyPrefix:h,revision:n};return y.current=o,o},[u,g,h,l,i.lng]),[_,b]=(0,ee.useState)(0),{t:w,ready:E}=(0,ke.useSyncExternalStore)(v,D,D);(0,ee.useEffect)(()=>{if(u&&!E&&!d){const e=()=>b(e=>e+1);i.lng?ae(u,i.lng,g,e):se(u,g,e)}},[u,i.lng,g,E,d,_]);const C=u||{},k=(0,ee.useRef)(null),S=(0,ee.useRef)(),x=e=>{const t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;const n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,"__original"))try{Object.defineProperty(n,"__original",{value:e,writable:!1,enumerable:!1,configurable:!1})}catch(O_){}return n},F=(0,ee.useMemo)(()=>{const e=C,t=null===e||void 0===e?void 0:e.language;let n=e;e&&(k.current&&k.current.__original===e?S.current!==t?(n=x(e),k.current=n,S.current=t):n=k.current:(n=x(e),k.current=n,S.current=t));const r=E||d?w:function(){return ie(u,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),w(...arguments)},i=[r,n,E];return i.t=r,i.i18n=n,i.ready=E,i},[w,C,E,C.resolvedLanguage,C.language,C.languages]);if(u&&d&&!E)throw new Promise(e=>{const t=()=>e();i.lng?ae(u,i.lng,g,t):se(u,g,t)});return F};function Ae(e){let{i18n:t,defaultNS:n,children:r}=e;const i=(0,ee.useMemo)(()=>({i18n:t,defaultNS:n}),[t,n]);return(0,ee.createElement)(me.Provider,{value:i},r)}const Te="bao_settings";function Ie(){try{const e=localStorage.getItem(Te);if(!e)return null;const t=JSON.parse(e);return"object"!==typeof t||null===t||Array.isArray(t)?null:t}catch(e){return null}}function Pe(e,t){!function(e){try{var t;const n=null!==(t=Ie())&&void 0!==t?t:{};localStorage.setItem(Te,JSON.stringify(c(c({},n),e)))}catch(n){}}({[e]:t})}function Oe(){const e=Ie(),t=null===e||void 0===e?void 0:e.language;return"string"===typeof t&&t.length>0?t:null}const Ne=["en","es","ny"],Re=JSON.parse('{"common":{"back":"Back","cancel":"Cancel","home":"Home","language":"Language"},"home":{"playSage":"Play the Sage","playMultiplayer":"Play Multiplayer","howToPlay":"How to play","feedback":"Feedback"},"menu":{"title":"Bao Game","closeMenu":"Close menu","sections":{"navigation":"Navigation","singlePlayer":"Single Player Game","multiplayer":"Multiplayer Game","help":"Help & Info"},"items":{"home":"Home","profileStats":"Profile & Stats","resumeGame":"Resume Game","multiplayerLobby":"Multiplayer Lobby","settings":"Settings","moveHistory":"Move History","restartGame":"Restart Game","howToPlay":"How to Play","feedback":"Feedback"},"footer":{"multiplayerActive":"Multiplayer Mode Active","tagline":"Traditional African Mancala"}},"menuButton":{"openMenu":"Open menu"},"help":{"previous":"Previous","next":"Next","screens":{"introduction":{"title":"Introduction","instruction":"This is Bawo (aka Bao). A board game played in some parts of sub-saharan Africa. It is a two player game - often with spectators. The board has 32 pits divided into two equal sides each having 16 pits. The game starts with two seeds in each pit. This is the simplest version of the game."},"validMoves":{"title":"Valid Moves","instruction":"If you see a \u25b6 symbol above the board, it means the instruction has some interactive content. Go ahead and click it. This sequence shows a tentative starting move by a player. You might also notice some pits slowly flashing. The flashing pits designate what are valid moves in the current game state."},"clockwiseSowing":{"title":"Clockwise Sowing","instruction":"A player begins a turn by picking all the seeds from any pit that has at least two seeds and sows them in a clockwise or anti-clockwise direction. Here, the player is sowing in a clockwise direction."},"antiClockwiseSowing":{"title":"Anti-clockwise Sowing","instruction":"And here, the player is sowing in an anti-clockwise direction."},"capturing":{"title":"Capturing","instruction":"A *marker* pit is a pit of the inner row that faces a non-empty opponent\'s pit. Marker pits are highlighted. If the last seed in a sowing round lands on a marker pit, capturing occurs and the turn is called an *mtaji* turn. Notice that sowing of the captured pieces continues in the same direction as the initial sowing."},"kimbiKichwa":{"title":"Kimbi & Kichwa","instruction":"Each of the first two or last two pits of a player\'s inner row is called a *kimbi*. When capturing occurs in a kimbi, sowing continues from the closest *kichwa*. A *kichwa* is the first or last pit in a player\'s inner row. If a right *kimbi* is captured, then sowing continues counter-clockwise from the inner right *kichwa*. If a left *kimbi* is captured, sowing continues clockwise from the left *kichwa*. The opponent\'s *kimbis* are highlighted."},"mandatoryCapturing":{"title":"Mandatory Capturing","instruction":"If a player has a capturing move, then that move must be played. If there are multiple capturing moves, the player is free to choose which one to make."},"takataTurn":{"title":"Takata Turn","instruction":"If the first sowing does not lead to a capture, then no capture can occur in the turn. A non-capturing turn is called a takata turn."},"gameEnding":{"title":"Game Ending","instruction":"The game ends if the first row is empty or a player is unable to make a move because they only have one seed in each hole. Go ahead and [Try a game](/game)"}}},"settings":{"title":"Settings","language":"Language","aiDifficulty":"AI Difficulty Level","difficulty":{"beginner":"Beginner","intermediate":"Intermediate","expert":"Expert"},"animationSpeed":"Animation Speed","speed":{"fast":"Fast","slow":"Slow","superSlow":"Super slow"},"moveHints":"Move hints","on":"On","off":"Off"},"gameOver":{"won":"You won :)!","lost":"You lost :( ...","computerStarts":"Computer starts","gameType":{"kujifunza":"Bao la Kujifunza","kiswahil
2i":"Bao la Kiswahili"},"startNewGame":"Start a new game","backToLobby":"Back to Lobby"},"history":{"title":"Move History","empty":"No moves yet. Start playing to see your move history!","columns":{"user":"User","moveIndex":"Move Index","moveDirection":"Move Direction"},"you":"You","bot":"Bot","host":"Host","guest":"Guest","hostYou":"Host (You)","guestYou":"Guest (You)"},"multiplayerLobby":{"title":"Multiplayer Lobby","backToHome":"Back to Home","createGame":"Create Game","joinGame":"Join Game","loading":"Loading...","authenticating":"Authenticating...","yourActiveGames":"Your Active Games","resume":"Resume","noActiveGames":"No active games. Create or join a game to start playing!","room":"Room: {{code}}","status":{"waiting":"Waiting for opponent","active":"In progress","paused":"Paused","finished":"Finished"}},"createGame":{"title":"Create Multiplayer Game","authenticating":"Authenticating...","gameTypeLabel":"Game Type","gameType":{"kujifunza":"Kujifunza (Standard)","kiswahili":"Kiswahili (Advanced)"},"startingSideLabel":"Starting Side","youStart":"You start","opponentStarts":"Opponent starts","creating":"Creating...","create":"Create Game","failed":"Failed to create game. Please try again.","howItWorks":"How it works:","step1":"Create a game with your preferred settings","step2":"Share the room code with your friend","step3":"Wait for them to join and start playing!"},"joinGame":{"title":"Join Multiplayer Game","authenticating":"Authenticating...","roomCode":"Room Code","placeholder":"Enter 6-character code","joining":"Joining...","join":"Join Game","errorInvalid":"Please enter a valid 6-character room code","errorFailed":"Failed to join game. Please check the room code and try again.","howToJoin":"How to join:","step1":"Get the room code from your friend","step2":"Enter the 6-character code above","step3":"Click \\"Join Game\\" to start playing!"},"contact":{"emailSubject":"Feedback about Bawo"}}'),Be=JSON.parse('{"_meta":{"reviewed":false,"machineTranslated":true},"common":{"back":"Retour","cancel":"Annuler","home":"Accueil","language":"Langue"},"home":{"playSage":"Jouer contre le Sage","playMultiplayer":"Jouer en multijoueur","howToPlay":"Comment jouer","feedback":"Commentaires"},"menu":{"title":"Jeu de Bao","closeMenu":"Fermer le menu","sections":{"navigation":"Navigation","singlePlayer":"Partie solo","multiplayer":"Partie multijoueur","help":"Aide et infos"},"items":{"home":"Accueil","profileStats":"Profil et statistiques","resumeGame":"Reprendre la partie","multiplayerLobby":"Salon multijoueur","settings":"Param\xe8tres","moveHistory":"Historique des coups","restartGame":"Recommencer la partie","howToPlay":"Comment jouer","feedback":"Commentaires"},"footer":{"multiplayerActive":"Mode multijoueur actif","tagline":"Mancala traditionnel africain"}},"menuButton":{"openMenu":"Ouvrir le menu"},"help":{"previous":"Pr\xe9c\xe9dent","next":"Suivant","screens":{"introduction":{"title":"Introduction","instruction":"Voici le Bawo (aussi appel\xe9 Bao). Un jeu de plateau pratiqu\xe9 dans certaines r\xe9gions d\'Afrique subsaharienne. C\'est un jeu \xe0 deux joueurs, souvent suivi par des spectateurs. Le plateau comporte 32 cases r\xe9parties en deux c\xf4t\xe9s \xe9gaux de 16 cases chacun. La partie commence avec deux graines dans chaque case. Il s\'agit de la version la plus simple du jeu."},"validMoves":{"title":"Coups valides","instruction":"Si vous voyez un symbole \u25b6 au-dessus du plateau, cela signifie que l\'instruction contient du contenu interactif. N\'h\xe9sitez pas \xe0 cliquer dessus. Cette s\xe9quence montre un coup d\'ouverture provisoire jou\xe9 par un joueur. Vous remarquerez peut-\xeatre aussi que certaines cases clignotent lentement. Les cases clignotantes indiquent les coups valides dans l\'\xe9tat actuel de la partie."},"clockwiseSowing":{"title":"Semis dans le sens horaire","instruction":"Un joueur commence son tour en prenant toutes les graines d\'une case contenant au moins deux graines, puis les s\xe8me dans le sens horaire ou antihoraire. Ici, le joueur s\xe8me dans le sens horaire."},"antiClockwiseSowing":{"title":"Semis dans le sens antihoraire","instruction":"Et ici, le joueur s\xe8me dans le sens antihoraire."},"capturing":{"title":"Capture","instruction":"Une case *marqueur* est une case de la rang\xe9e int\xe9rieure qui fait face \xe0 une case non vide de l\'adversaire. Les cases marqueurs sont mises en \xe9vidence. Si la derni\xe8re graine d\'un tour de semis tombe sur une case marqueur, une capture a lieu et le tour est appel\xe9 un tour *mtaji*. Notez que le semis des pi\xe8ces captur\xe9es se poursuit dans la m\xeame direction que le semis initial."},"kimbiKichwa":{"title":"Kimbi et Kichwa","instruction":"Chacune des deux premi\xe8res ou des deux derni\xe8res cases de la rang\xe9e int\xe9rieure d\'un joueur est appel\xe9e un *kimbi*. Lorsqu\'une capture a lieu dans un kimbi, le semis se poursuit \xe0 partir du *kichwa* le plus proche. Un *kichwa* est la premi\xe8re ou la derni\xe8re case de la rang\xe9e int\xe9rieure d\'un joueur. Si un *kimbi* de droite est captur\xe9, le semis se poursuit dans le sens antihoraire \xe0 partir du *kichwa* int\xe9rieur de droite. Si un *kimbi* de gauche est captur\xe9, le semis se poursuit dans le sens horaire \xe0 partir du *kichwa* de gauche. Les *kimbis* de l\'adversaire sont mis en \xe9vidence."},"mandatoryCapturing":{"title":"Capture obligatoire","instruction":"Si un joueur dispose d\'un coup de capture, ce coup doit \xeatre jou\xe9. S\'il existe plusieurs coups de capture, le joueur est libre de choisir lequel effectuer."},"takataTurn":{"title":"Tour takata","instruction":"Si le premier semis n\'aboutit pas \xe0 une capture, aucune capture ne peut survenir durant ce tour. Un tour sans capture est appel\xe9 un tour takata."},"gameEnding":{"title":"Fin de la partie","instruction":"La partie se termine si la premi\xe8re rang\xe9e est vide ou si un joueur ne peut plus jouer parce qu\'il ne lui reste qu\'une seule graine dans chaque case. N\'h\xe9sitez pas \xe0 [Essayer une partie](/game)"}}},"settings":{"title":"Param\xe8tres","language":"Langue","aiDifficulty":"Niveau de difficult\xe9 de l\'IA","difficulty":{"beginner":"D\xe9butant","intermediate":"Interm\xe9diaire","expert":"Expert"},"animationSpeed":"Vitesse d\'animation","speed":{"fast":"Rapide","slow":"Lent","superSlow":"Tr\xe8s lent"},"moveHints":"Indices de coups","on":"Activ\xe9","off":"D\xe9sactiv\xe9"},"gameOver":{"won":"Vous avez gagn\xe9 :)!","lost":"Vous avez perdu :( ...","computerStarts":"L\'ordinateur commence","gameType":{"kujifunza":"Bao la Kujifunza","kiswahil
2i":"Bao la Kiswahili"},"startNewGame":"Commencer une nouvelle partie","backToLobby":"Retour au salon"},"history":{"title":"Historique des coups","empty":"Aucun coup pour le moment. Commencez \xe0 jouer pour voir votre historique des coups !","columns":{"user":"Joueur","moveIndex":"Num\xe9ro du coup","moveDirection":"Direction du coup"},"you":"Vous","bot":"Bot","host":"H\xf4te","guest":"Invit\xe9","hostYou":"H\xf4te (Vous)","guestYou":"Invit\xe9 (Vous)"},"multiplayerLobby":{"title":"Salon multijoueur","backToHome":"Retour \xe0 l\'accueil","createGame":"Cr\xe9er une partie","joinGame":"Rejoindre une partie","loading":"Chargement...","authenticating":"Authentification...","yourActiveGames":"Vos parties en cours","resume":"Reprendre","noActiveGames":"Aucune partie en cours. Cr\xe9ez ou rejoignez une partie pour commencer \xe0 jouer !","room":"Salle : {{code}}","status":{"waiting":"En attente d\'un adversaire","active":"En cours","paused":"En pause","finished":"Termin\xe9e"}},"createGame":{"title":"Cr\xe9er une partie multijoueur","authenticating":"Authentification...","gameTypeLabel":"Type de jeu","gameType":{"kujifunza":"Kujifunza (Standard)","kiswahili":"Kiswahili (Avanc\xe9)"},"startingSideLabel":"C\xf4t\xe9 qui commence","youStart":"Vous commencez","opponentStarts":"L\'adversaire commence","creating":"Cr\xe9ation...","create":"Cr\xe9er la partie","failed":"\xc9chec de la cr\xe9ation de la partie. Veuillez r\xe9essayer.","howItWorks":"Comment \xe7a marche :","step1":"Cr\xe9ez une partie avec les param\xe8tres de votre choix","step2":"Partagez le code de la salle avec votre ami","step3":"Attendez qu\'il vous rejoigne et commencez \xe0 jouer !"},"joinGame":{"title":"Rejoindre une partie multijoueur","authenticating":"Authentification...","roomCode":"Code de la salle","placeholder":"Saisissez un code \xe0 6 caract\xe8res","joining":"Connexion...","join":"Rejoindre la partie","errorInvalid":"Veuillez saisir un code de salle valide \xe0 6 caract\xe8res","errorFailed":"\xc9chec pour rejoindre la partie. Veuillez v\xe9rifier le code de la salle et r\xe9essayer.","howToJoin":"Comment rejoindre :","step1":"Obtenez le code de la salle aupr\xe8s de votre ami","step2":"Saisissez le code \xe0 6 caract\xe8res ci-dessus","step3":"Cliquez sur \xab Rejoindre la partie \xbb pour commencer \xe0 jouer !"},"contact":{"emailSubject":"Commentaires sur Bawo"}}'),Le=JSON.parse('{"_meta":{"reviewed":false,"machineTranslated":true},"common":{"back":"Atr\xe1s","cancel":"Cancelar","home":"Inicio","language":"Idioma"},"home":{"playSage":"Juega contra el Sabio","playMultiplayer":"Jugar multijugador","howToPlay":"C\xf3mo jugar","feedback":"Comentarios"},"menu":{"title":"Juego de Bao","closeMenu":"Cerrar men\xfa","sections":{"navigation":"Navegaci\xf3n","singlePlayer":"Partida de un jugador","multiplayer":"Partida multijugador","help":"Ayuda e informaci\xf3n"},"items":{"home":"Inicio","profileStats":"Perfil y estad\xedsticas","resumeGame":"Reanudar partida","multiplayerLobby":"Sala multijugador","settings":"Ajustes","moveHistory":"Historial de jugadas","restartGame":"Reiniciar partida","howToPlay":"C\xf3mo jugar","feedback":"Comentarios"},"footer":{"multiplayerActive":"Modo multijugador activo","tagline":"Mancala tradicional africano"}},"menuButton":{"openMenu":"Abrir men\xfa"},"help":{"previous":"Anterior","next":"Siguiente","screens":{"introduction":{"title":"Introducci\xf3n","instruction":"Este es Bawo (tambi\xe9n conocido como Bao). Un juego de tablero que se juega en algunas partes del \xc1frica subsahariana. Es un juego para dos jugadores, a menudo con espectadores. El tablero tiene 32 hoyos divididos en dos lados iguales, cada uno con 16 hoyos. La partida comienza con dos semillas en cada hoyo. Esta es la versi\xf3n m\xe1s sencilla del juego."},"validMoves":{"title":"Jugadas v\xe1lidas","instruction":"Si ves un s\xedmbolo \u25b6 encima del tablero, significa que la instrucci\xf3n tiene contenido interactivo. Adelante, haz clic en \xe9l. Esta secuencia muestra una posible jugada inicial de un jugador. Tambi\xe9n puede que notes algunos hoyos parpadeando lentamente. Los hoyos que parpadean indican cu\xe1les son las jugadas v\xe1lidas en el estado actual de la partida."},"clockwiseSowing":{"title":"Siembra en sentido horario","instruction":"Un jugador comienza su turno tomando todas las semillas de cualquier hoyo que tenga al menos dos semillas y las siembra en sentido horario o antihorario. Aqu\xed, el jugador siembra en sentido horario."},"antiClockwiseSowing":{"title":"Siembra en sentido antihorario","instruction":"Y aqu\xed, el jugador siembra en sentido antihorario."}
2,"capturing":{"title":"Capturar","instruction":"Un hoyo *marcador* es un hoyo de la fila interior que da frente a un hoyo no vac\xedo del oponente. Los hoyos marcadores aparecen resaltados. Si la \xfaltima semilla de una ronda de siembra cae en un hoyo marcador, se produce una captura y el turno se llama turno *mtaji*. Observa que la siembra de las piezas capturadas contin\xfaa en la misma direcci\xf3n que la siembra inicial."},"kimbiKichwa":{"title":"Kimbi y Kichwa","instruction":"Cada uno de los dos primeros o los dos \xfaltimos hoyos de la fila interior de un jugador se llama *kimbi*. Cuando se produce una captura en un kimbi, la siembra contin\xfaa desde el *kichwa* m\xe1s cercano. Un *kichwa* es el primer o el \xfaltimo hoyo de la fila interior de un jugador. Si se captura un *kimbi* derecho, la siembra contin\xfaa en sentido antihorario desde el *kichwa* interior derecho. Si se captura un *kimbi* izquierdo, la siembra contin\xfaa en sentido horario desde el *kichwa* izquierdo. Los *kimbis* del oponente aparecen resaltados."},"mandatoryCapturing":{"title":"Captura obligatoria","instruction":"Si un jugador tiene una jugada de captura, entonces debe realizarla. Si hay varias jugadas de captura, el jugador es libre de elegir cu\xe1l hacer."},"takataTurn":{"title":"Turno takata","instruction":"Si la primera siembra no conduce a una captura, entonces no puede producirse ninguna captura en el turno. Un turno sin captura se llama turno takata."},"gameEnding":{"title":"Fin de la partida","instruction":"La partida termina si la primera fila est\xe1 vac\xeda o si un jugador no puede hacer ninguna jugada porque solo tiene una semilla en cada hoyo. Adelante, [Prueba una partida](/game)"}}},"settings":{"title":"Ajustes","language":"Idioma","aiDifficulty":"Nivel de dificultad de la IA","difficulty":{"beginner":"Principiante","intermediate":"Intermedio","expert":"Experto"},"animationSpeed":"Velocidad de animaci\xf3n","speed":{"fast":"R\xe1pida","slow":"Lenta","superSlow":"Muy lenta"},"moveHints":"Sugerencias de jugadas","on":"Activado","off":"Desactivado"},"gameOver":{"won":"\xa1Ganaste :)!","lost":"Perdiste :( ...","computerStarts":"Empieza la computadora","gameType":{"kujifunza":"Bao la Kujifunza","kiswahili":"Bao la Kiswahili"},"startNewGame":"Empezar una nueva partida","backToLobby":"Volver a la sala"},"history":{"title":"Historial de jugadas","empty":"A\xfan no hay jugadas. \xa1Empieza a jugar para ver tu historial de jugadas!","columns":{"user":"Usuario","moveIndex":"\xcdndice de jugada","moveDirection":"Direcci\xf3n de la jugada"},"you":"T\xfa","bot":"Bot","host":"Anfitri\xf3n","guest":"Invitado","hostYou":"Anfitri\xf3n (T\xfa)","guestYou":"Invitado (T\xfa)"},"multiplayerLobby":{"title":"Sala multijugador","backToHome":"Volver al inicio","createGame":"Crear partida","joinGame":"Unirse a una partida","loading":"Cargando...","authenticating":"Autenticando...","yourActiveGames":"Tus partidas activas","resume":"Reanudar","noActiveGames":"No hay partidas activas. \xa1Crea o \xfanete a una partida para empezar a jugar!","room":"Sala: {{code}}","status":{"waiting":"Esperando al oponente","active":"En curso","paused":"En pausa","finished":"Finalizada"}},"createGame":{"title":"Crear partida multijugador","authenticating":"Autenticando...","gameTypeLabel":"Tipo de juego","gameType":{"kujifunza":"Kujifunza (Est\xe1ndar)","kiswahili":"Kiswahili (Avanzado)"},"startingSideLabel":"Lado que empieza","youStart":"Empiezas t\xfa","opponentStarts":"Empieza el oponente","creating":"Creando...","create":"Crear partida","failed":"No se pudo crear la partida. Int\xe9ntalo de nuevo.","howItWorks":"C\xf3mo funciona:","step1":"Crea una partida con tus ajustes preferidos","step2":"Comparte el c\xf3digo de sala con tu amigo","step3":"\xa1Espera a que se una y empieza a jugar!"},"joinGame":{"title":"Unirse a una partida multijugador","authenticating":"Autenticando...","roomCode":"C\xf3digo de sala","placeholder":"Introduce un c\xf3digo de 6 caracteres","joining":"Uni\xe9ndose...","join":"Unirse a la partida","errorInvalid":"Introduce un c\xf3digo de sala v\xe1lido de 6 caracteres","errorFailed":"No se pudo unir a la partida. Comprueba el c\xf3digo de sala e int\xe9ntalo de nuevo.","howToJoin":"C\xf3mo unirse:","step1":"Consigue el c\xf3digo de sala de tu amigo","step2":"Introduce arriba el c\xf3digo de 6 caracteres","step3":"\xa1Haz clic en \\"Unirse a la partida\\" para empezar a jugar!"},"contact":{"emailSubject":"Comentarios sobre Bawo"}}'),Me=JSON.parse('{"_meta":{"reviewed":false,"machineTranslated":true},"common":{"back":"Zur\xfcck","cancel":"Abbrechen","home":"Startseite","language":"Sprache"},"home":{"playSage":"Gegen den Weisen spielen","playMultiplayer":"Mehrspieler spielen","howToPlay":"Spielanleitung","feedback":"Feedback"},"menu":{"title":"Bao-Spiel","closeMenu":"Men\xfc schlie\xdfen","sections":{"navigation":"Navigation","singlePlayer":"Einzelspieler-Spiel","multiplayer":"Mehrspieler-Spiel","help":"Hilfe & Infos"},"items":{"home":"Startseite","profileStats":"Profil & Statistiken","resumeGame":"Spiel fortsetzen","multiplayerLobby":"Mehrspieler-Lobby","settings":"Einstellungen","moveHistory":"Zugverlauf","restartGame":"Spiel neu starten","howToPlay":"Spielanleitung","feedback":"Feedback"},"footer":{"multiplayerActive":"Mehrspieler-Modus aktiv","tagline":"Traditionelles afrikanisches Mancala"}},"menuButton":{"openMenu":"Men\xfc \xf6ffnen"},"help":{"previous":"Zur\xfcck","next":"Weiter","screens":{"introduction":{"title":"Einf\xfchrung","
2instruction":"Das ist Bawo (auch bekannt als Bao). Ein Brettspiel, das in einigen Teilen Subsahara-Afrikas gespielt wird. Es ist ein Spiel f\xfcr zwei Spieler \u2013 oft mit Zuschauern. Das Brett hat 32 Mulden, die in zwei gleiche Seiten mit je 16 Mulden aufgeteilt sind. Das Spiel beginnt mit zwei Samen in jeder Mulde. Dies ist die einfachste Version des Spiels."},"validMoves":{"title":"G\xfcltige Z\xfcge","instruction":"Wenn du \xfcber dem Brett ein \u25b6-Symbol siehst, bedeutet das, dass die Anleitung interaktive Inhalte enth\xe4lt. Klicke ruhig darauf. Diese Sequenz zeigt einen m\xf6glichen Er\xf6ffnungszug eines Spielers. Vielleicht bemerkst du auch, dass einige Mulden langsam blinken. Die blinkenden Mulden kennzeichnen die g\xfcltigen Z\xfcge im aktuellen Spielzustand."},"clockwiseSowing":{"title":"S\xe4en im Uhrzeigersinn","instruction":"Ein Spieler beginnt einen Zug, indem er alle Samen aus einer beliebigen Mulde nimmt, die mindestens zwei Samen enth\xe4lt, und sie im oder gegen den Uhrzeigersinn auss\xe4t. Hier s\xe4t der Spieler im Uhrzeigersinn."},"antiClockwiseSowing":{"title":"S\xe4en gegen den Uhrzeigersinn","instruction":"Und hier s\xe4t der Spieler gegen den Uhrzeigersinn."},"capturing":{"title":"Schlagen","instruction":"Eine *Markierungsmulde* ist eine Mulde der inneren Reihe, die einer nicht leeren Mulde des Gegners gegen\xfcberliegt. Markierungsmulden sind hervorgehoben. Wenn der letzte Samen einer S\xe4runde in einer Markierungsmulde landet, kommt es zum Schlagen, und der Zug wird als *mtaji*-Zug bezeichnet. Beachte, dass das S\xe4en der geschlagenen Steine in derselben Richtung wie das urspr\xfcngliche S\xe4en fortgesetzt wird."},"kimbiKichwa":{"title":"Kimbi & Kichwa","instruction":"Jede der ersten beiden oder letzten beiden Mulden der inneren Reihe eines Spielers wird als *kimbi* bezeichnet. Wenn in einem kimbi geschlagen wird, wird das S\xe4en vom n\xe4chstgelegenen *kichwa* aus fortgesetzt. Ein *kichwa* ist die erste oder letzte Mulde in der inneren Reihe eines Spielers. Wenn ein rechtes *kimbi* geschlagen wird, wird das S\xe4en gegen den Uhrzeigersinn vom inneren rechten *kichwa* aus fortgesetzt. Wenn ein linkes *kimbi* geschlagen wird, wird das S\xe4en im Uhrzeigersinn vom linken *kichwa* aus fortgesetzt. Die *kimbis* des Gegners sind hervorgehoben."},"mandatoryCapturing":{"title":"Schlagzwang","instruction":"Wenn ein Spieler einen Schlagzug zur Verf\xfcgung hat, muss dieser Zug gespielt werden. Gibt es mehrere Schlagz\xfcge, kann der Spieler frei w\xe4hlen, welchen er ausf\xfchrt."},"takataTurn":{"title":"Takata-Zug","instruction":"Wenn das erste S\xe4en nicht zu einem Schlag f\xfchrt, kann in diesem Zug kein Schlag mehr erfolgen. Ein Zug ohne Schlag wird takata-Zug genannt."},"gameEnding":{"title":"Spielende","instruction":"Das Spiel endet, wenn die erste Reihe leer ist oder ein Spieler keinen Zug machen kann, weil er nur noch einen Samen in jeder Mulde hat. Probiere ruhig [ein Spiel aus](/game)"}}},"settings":{"title":"Einstellungen","language":"Sprache","aiDifficulty":"KI-Schwierigkeitsgrad","difficulty":{"beginner":"Anf\xe4nger","intermediate":"Fortgeschritten","expert":"Experte"},"animationSpeed":"Animationsgeschwindigkeit","speed":{"fast":"Schnell","slow":"Langsam","superSlow":"Sehr langsam"},"moveHints":"Zughinweise","on":"An","off":"Aus"},"gameOver":{"won":"Du hast gewonnen :)!","lost":"Du hast verloren :( ...","computerStarts":"Computer beginnt","gameType":{"kujifunza":"Bao la Kujifunza","kiswahili":"Bao la Kiswahili"},"startNewGame":"Neues Spiel starten","backToLobby":"Zur\xfcck zur Lobby"},"history":{"title":"Zugverlauf","empty":"Noch keine Z\xfcge. Fang an zu spielen, um deinen Zugverlauf zu sehen!","columns":{"user":"Spieler","moveIndex":"Zugnummer","moveDirection":"Zugrichtung"},"you":"Du","bot":"Bot","host":"Gastgeber","guest":"Gast","hostYou":"Gastgeber (Du)","guestYou":"Gast (Du)"},"multiplayerLobby":{"title":"Mehrspieler-Lobby","backToHome":"Zur\xfcck zur Startseite","createGame":"Spiel erstellen","joinGame":"Spiel beitreten","loading":"Wird geladen...","authenticating":"Anmeldung l\xe4uft...","yourActiveGames":"Deine aktiven Spiele","resume":"Fortsetzen","noActiveGames":"Keine aktiven Spiele. Erstelle ein Spiel oder tritt einem bei, um loszulegen!","room":"Raum: {{code}}","status":{"waiting":"Warten auf Gegner","active":"L\xe4uft","paused":"Pausiert","finished":"Beendet"}},"createGame":{"title":"Mehrspieler-Spiel erstellen","authenticating":"Anmeldung l\xe4uft...","gameTypeLabel":"Spieltyp","gameType":{"kujifunza":"Kujifunza (Standard)","kiswahil
2i":"Kiswahili (Fortgeschritten)"},"startingSideLabel":"Startseite","youStart":"Du beginnst","opponentStarts":"Gegner beginnt","creating":"Wird erstellt...","create":"Spiel erstellen","failed":"Spiel konnte nicht erstellt werden. Bitte versuche es erneut.","howItWorks":"So funktioniert es:","step1":"Erstelle ein Spiel mit deinen bevorzugten Einstellungen","step2":"Teile den Raumcode mit deinem Freund","step3":"Warte, bis er beitritt, und beginne zu spielen!"},"joinGame":{"title":"Mehrspieler-Spiel beitreten","authenticating":"Anmeldung l\xe4uft...","roomCode":"Raumcode","placeholder":"6-stelligen Code eingeben","joining":"Beitritt l\xe4uft...","join":"Spiel beitreten","errorInvalid":"Bitte gib einen g\xfcltigen 6-stelligen Raumcode ein","errorFailed":"Beitritt zum Spiel fehlgeschlagen. Bitte \xfcberpr\xfcfe den Raumcode und versuche es erneut.","howToJoin":"So trittst du bei:","step1":"Hol dir den Raumcode von deinem Freund","step2":"Gib oben den 6-stelligen Code ein","step3":"Klicke auf \\"Spiel beitreten\\", um loszulegen!"},"contact":{"emailSubject":"Feedback zu Bawo"}}'),je=JSON.parse('{"_meta":{"reviewed":false,"machineTranslated":true},"common":{"back":"Voltar","cancel":"Cancelar","home":"In\xedcio","language":"Idioma"},"home":{"playSage":"Jogar contra o S\xe1bio","playMultiplayer":"Jogar Multijogador","howToPlay":"Como jogar","feedback":"Coment\xe1rios"},"menu":{"title":"Jogo Bao","closeMenu":"Fechar menu","sections":{"navigation":"Navega\xe7\xe3o","singlePlayer":"Jogo para Um Jogador","multiplayer":"Jogo Multijogador","help":"Ajuda e Informa\xe7\xf5es"},"items":{"home":"In\xedcio","profileStats":"Perfil e Estat\xedsticas","resumeGame":"Retomar Jogo","multiplayerLobby":"Sala Multijogador","settings":"Defini\xe7\xf5es","moveHistory":"Hist\xf3rico de Jogadas","restartGame":"Reiniciar Jogo","howToPlay":"Como Jogar","feedback":"Coment\xe1rios"},"footer":{"multiplayerActive":"Modo Multijogador Ativo","tagline":"Mancala Tradicional Africano"}},"menuButton":{"openMenu":"Abrir menu"},"help":{"previous":"Anterior","next":"Seguinte","screens":{"introduction":{"title":"Introdu\xe7\xe3o","instruction":"Este \xe9 o Bawo (tamb\xe9m conhecido como Bao). Um jogo de tabuleiro jogado em algumas partes da \xc1frica subsariana. \xc9 um jogo para dois jogadores - muitas vezes com espectadores. O tabuleiro tem 32 covas divididas em dois lados iguais, cada um com 16 covas. O jogo come\xe7a com duas sementes em cada cova. Esta \xe9 a vers\xe3o mais simples do jogo."},"validMoves":{"title":"Jogadas V\xe1lidas","instruction":"Se vir o s\xedmbolo \u25b6 acima do tabuleiro, significa que a instru\xe7\xe3o tem algum conte\xfado interativo. Clique nele. Esta sequ\xeancia mostra uma jogada inicial tentativa de um jogador. Tamb\xe9m poder\xe1 notar algumas covas a piscar lentamente. As covas a piscar indicam quais s\xe3o as jogadas v\xe1lidas no estado atual do jogo."},"clockwiseSowing":{"title":"Semeadura no Sentido Hor\xe1rio","instruction":"Um jogador inicia o turno pegando todas as sementes de qualquer cova que tenha pelo menos duas sementes e semeando-as no sentido hor\xe1rio ou anti-hor\xe1rio. Aqui, o jogador est\xe1 a semear no sentido hor\xe1rio."},"antiClockwiseSowing":{"title":"Semeadura no Sentido Anti-hor\xe1rio","instruction":"E aqui, o jogador est\xe1 a semear no sentido anti-hor\xe1rio."},"capturing":{"title":"Captura","instruction":"Uma cova *marcadora* \xe9 uma cova da fila interior que est\xe1 virada para uma cova n\xe3o vazia do advers\xe1rio. As covas marcadoras est\xe3o destacadas. Se a \xfaltima semente de uma ronda de semeadura cair numa cova marcadora, ocorre uma captura e o turno \xe9 chamado de turno *mtaji*. Repare que a semeadura das pe\xe7as capturadas continua na mesma dire\xe7\xe3o da semeadura inicial."},"kimbiKichwa":{"title":"Kimbi e Kichwa","instruction":"Cada uma das duas primeiras ou duas \xfaltimas covas da fila interior de um jogador \xe9 chamada de *kimbi*. Quando ocorre uma captura num kimbi, a semeadura continua a partir do *kichwa* mais pr\xf3ximo. Um *kichwa* \xe9 a primeira ou a \xfaltima cova da fila interior de um jogador. Se um *kimbi* direito for capturado, a semeadura continua no sentido anti-hor\xe1rio a partir do *kichwa* interior direito. Se um *kimbi* esquerdo for capturado, a semeadura continua no sentido hor\xe1rio a partir do *kichwa* esquerdo. Os *kimbis* do advers\xe1rio est\xe3o destacados."},"mandatoryCapturing":{"title":"Captura Obrigat\xf3ria","instruction":"Se um jogador tiver uma jogada de captura, essa jogada tem de ser feita. Se houver v\xe1rias jogadas de captura, o jogador \xe9 livre de escolher qual fazer."},"takataTurn":{"title":"Turno Takata","instruction":"Se a primeira semeadura n\xe3o levar a uma captura, ent\xe3o nenhuma captura pode ocorrer no turno. Um turno sem captura \xe9 chamado de turno takata."},"gameEnding":{"title":"Fim do Jogo","instruction":"O jogo termina se a primeira fila estiver vazia ou se um jogador n\xe3o conseguir fazer uma jogada por ter apenas uma semente em cada cova. Avance e [Experimente um jogo](/game)"}}},"settings":{"title":"Defini\xe7\xf5es","language":"Idioma","aiDifficulty":"N\xedvel de Dificuldade da IA","difficulty":{"beginner":"Principiante","intermediate":"Interm\xe9dio","expert":"Especialista"},"animationSpeed":"Velocidade da Anima\xe7\xe3o","speed":{"fast":"R\xe1pida","slow":"Lenta","
2superSlow":"Muito lenta"},"moveHints":"Sugest\xf5es de jogadas","on":"Ativado","off":"Desativado"},"gameOver":{"won":"Ganhaste :)!","lost":"Perdeste :( ...","computerStarts":"O computador come\xe7a","gameType":{"kujifunza":"Bao la Kujifunza","kiswahili":"Bao la Kiswahili"},"startNewGame":"Come\xe7ar um novo jogo","backToLobby":"Voltar \xe0 Sala"},"history":{"title":"Hist\xf3rico de Jogadas","empty":"Ainda n\xe3o h\xe1 jogadas. Comece a jogar para ver o seu hist\xf3rico de jogadas!","columns":{"user":"Utilizador","moveIndex":"\xcdndice da Jogada","moveDirection":"Dire\xe7\xe3o da Jogada"},"you":"Tu","bot":"Bot","host":"Anfitri\xe3o","guest":"Convidado","hostYou":"Anfitri\xe3o (Tu)","guestYou":"Convidado (Tu)"},"multiplayerLobby":{"title":"Sala Multijogador","backToHome":"Voltar ao In\xedcio","createGame":"Criar Jogo","joinGame":"Entrar num Jogo","loading":"A carregar...","authenticating":"A autenticar...","yourActiveGames":"Os Teus Jogos Ativos","resume":"Retomar","noActiveGames":"N\xe3o h\xe1 jogos ativos. Crie ou entre num jogo para come\xe7ar a jogar!","room":"Sala: {{code}}","status":{"waiting":"\xc0 espera do advers\xe1rio","active":"Em curso","paused":"Em pausa","finished":"Terminado"}},"createGame":{"title":"Criar Jogo Multijogador","authenticating":"A autenticar...","gameTypeLabel":"Tipo de Jogo","gameType":{"kujifunza":"Kujifunza (Padr\xe3o)","kiswahili":"Kiswahili (Avan\xe7ado)"},"startingSideLabel":"Lado Inicial","youStart":"Tu come\xe7as","opponentStarts":"O advers\xe1rio come\xe7a","creating":"A criar...","create":"Criar Jogo","failed":"Falha ao criar o jogo. Por favor, tente novamente.","howItWorks":"Como funciona:","step1":"Crie um jogo com as suas defini\xe7\xf5es preferidas","step2":"Partilhe o c\xf3digo da sala com o seu amigo","step3":"Aguarde que ele entre e comece a jogar!"},"joinGame":{"title":"Entrar num Jogo Multijogador","authenticating":"A autenticar...","roomCode":"C\xf3digo da Sala","placeholder":"Introduza o c\xf3digo de 6 caracteres","joining":"A entrar...","join":"Entrar no Jogo","errorInvalid":"Por favor, introduza um c\xf3digo de sala v\xe1lido de 6 caracteres","errorFailed":"Falha ao entrar no jogo. Por favor, verifique o c\xf3digo da sala e tente novamente.","howToJoin":"Como entrar:","step1":"Obtenha o c\xf3digo da sala com o seu amigo","step2":"Introduza o c\xf3digo de 6 caracteres acima","step3":"Clique em \\"Entrar no Jogo\\" para come\xe7ar a jogar!"},"contact":{"emailSubject":"Coment\xe1rios sobre o Bawo"}}'),ze=JSON.parse('{"_meta":{"reviewed":false,"machineTranslated":true},"common":{"back":"\u8fd4\u56de","cancel":"\u53d6\u6d88","home":"\u4e3b\u9875","language":"\u8bed\u8a00"},"home":{"playSage":"\u5bf9\u6218\u667a\u8005","playMultiplayer":"\u591a\u4eba\u5bf9\u6218","howToPlay":"\u73a9\u6cd5\u8bf4\u660e","feedback":"\u53cd\u9988"},"menu":{"title":"Bao \u6e38\u620f","closeMenu":"\u5173\u95ed\u83dc\u5355","sections":{"navigation":"\u5bfc\u822a","singlePlayer":"\u5355\u4eba\u6e38\u620f","multiplayer":"\u591a\u4eba\u6e38\u620f","help":"\u5e2e\u52a9\u4e0e\u4fe1\u606f"},"items":{"home":"\u4e3b\u9875","profileStats":"\u4e2a\u4eba\u8d44\u6599\u4e0e\u7edf\u8ba1","resumeGame":"\u7ee7\u7eed\u6e38\u620f","multiplayerLobby":"\u591a\u4eba\u6e38\u620f\u5927\u5385","settings":"\u8bbe\u7f6e","moveHistory":"\u8d70\u5b50\u5386\u53f2","restartGame":"\u91cd\u65b0\u5f00\u59cb\u6e38\u620f","howToPlay":"\u73a9\u6cd5\u8bf4\u660e","feedback":"\u53cd\u9988"},"footer":{"multiplayerActive":"\u591a\u4eba\u6a21\u5f0f\u5df2\u542f\u7528","tagline":"\u4f20\u7edf\u975e\u6d32\u64ad\u68cb"}},"menuButton":{"openMenu":"\u6253\u5f00\u83dc\u5355"},"help":{"previous":"\u4e0a\u4e00\u6b65","next":"\u4e0b\u4e00\u6b65","screens":{"introduction":{"title":"\u7b80\u4ecb","instruction":"\u8fd9\u662f Bawo\uff08\u53c8\u540d Bao\uff09\uff0c\u4e00\u79cd\u6d41\u884c\u4e8e\u6492\u54c8\u62c9\u4ee5\u5357\u90e8\u5206\u975e\u6d32\u5730\u533a\u7684\u68cb\u7c7b\u6e38\u620f\u3002\u5b83\u662f\u4e00\u6b3e\u53cc\u4eba\u6e38\u620f\uff0c\u5e38\u5e38\u8fd8\u4f1a\u6709\u89c2\u6218\u8005\u3002\u68cb\u76d8\u6709 32 \u4e2a\u5751\uff0c\u5206\u4e3a\u4e24\u4e2a\u76f8\u7b49\u7684\u534a\u8fb9\uff0c\u6bcf\u8fb9\u5404\u6709
216 \u4e2a\u5751\u3002\u6e38\u620f\u5f00\u59cb\u65f6\u6bcf\u4e2a\u5751\u4e2d\u653e\u6709\u4e24\u679a\u68cb\u5b50\u3002\u8fd9\u662f\u8be5\u6e38\u620f\u6700\u7b80\u5355\u7684\u7248\u672c\u3002"},"validMoves":{"title":"\u6709\u6548\u8d70\u5b50","instruction":"\u5982\u679c\u4f60\u5728\u68cb\u76d8\u4e0a\u65b9\u770b\u5230 \u25b6 \u7b26\u53f7\uff0c\u8bf4\u660e\u8be5\u8bf4\u660e\u5305\u542b\u53ef\u4ea4\u4e92\u7684\u5185\u5bb9\u3002\u70b9\u51fb\u5b83\u5373\u53ef\u3002\u6b64\u5e8f\u5217\u5c55\u793a\u4e86\u73a9\u5bb6\u7684\u4e00\u6b21\u8bd5\u63a2\u6027\u5f00\u5c40\u8d70\u5b50\u3002\u4f60\u53ef\u80fd\u8fd8\u4f1a\u6ce8\u610f\u5230\u4e00\u4e9b\u5751\u5728\u7f13\u6162\u95ea\u70c1\u3002\u95ea\u70c1\u7684\u5751\u8868\u793a\u5728\u5f53\u524d\u6e38\u620f\u72b6\u6001\u4e0b\u54ea\u4e9b\u662f\u6709\u6548\u8d70\u5b50\u3002"},"clockwiseSowing":{"title":"\u987a\u65f6\u9488\u6492\u5b50","instruction":"\u73a9\u5bb6\u5728\u56de\u5408\u5f00\u59cb\u65f6\uff0c\u4ece\u4efb\u610f\u4e00\u4e2a\u81f3\u5c11\u6709\u4e24\u679a\u68cb\u5b50\u7684\u5751\u4e2d\u53d6\u51fa\u5168\u90e8\u68cb\u5b50\uff0c\u5e76\u6309\u987a\u65f6\u9488\u6216\u9006\u65f6\u9488\u65b9\u5411\u6492\u5165\u5404\u5751\u3002\u8fd9\u91cc\uff0c\u73a9\u5bb6\u6b63\u5728\u6309\u987a\u65f6\u9488\u65b9\u5411\u6492\u5b50\u3002"},"antiClockwiseSowing":{"title":"\u9006\u65f6\u9488\u6492\u5b50","instruction":"\u800c\u5728\u8fd9\u91cc\uff0c\u73a9\u5bb6\u6b63\u5728\u6309\u9006\u65f6\u9488\u65b9\u5411\u6492\u5b50\u3002"},"capturing":{"title":"\u5403\u5b50","instruction":"*marker*\uff08\u6807\u8bb0\u5751\uff09\u662f\u6307\u5185\u6392\u4e2d\u6b63\u5bf9\u7740\u5bf9\u65b9\u975e\u7a7a\u5751\u7684\u5751\u3002\u6807\u8bb0\u5751\u4f1a\u88ab\u9ad8\u4eae\u663e\u793a\u3002\u5982\u679c\u4e00\u8f6e\u6492\u5b50\u4e2d\u7684\u6700\u540e\u4e00\u679a\u68cb\u5b50\u843d\u5728\u6807\u8bb0\u5751\u4e0a\uff0c\u5c31\u4f1a\u53d1\u751f\u5403\u5b50\uff0c\u8be5\u56de\u5408\u88ab\u79f0\u4e3a *mtaji* \u56de\u5408\u3002\u8bf7\u6ce8\u610f\uff0c\u88ab\u5403\u4e0b\u7684\u68cb\u5b50\u4f1a\u6cbf\u7740\u4e0e\u6700\u521d\u6492\u5b50\u76f8\u540c\u7684\u65b9\u5411\u7ee7\u7eed\u6492\u5165\u3002"},"kimbiKichwa":{"title":"Kimbi \u4e0e Kichwa","instruction":"\u73a9\u5bb6\u5185\u6392\u4e2d\u6700\u524d\u9762\u7684\u4e24\u4e2a\u5751\u6216\u6700\u540e\u9762\u7684\u4e24\u4e2a\u5751\uff0c\u6bcf\u4e00\u4e2a\u90fd\u79f0\u4e3a *kimbi*\u3002\u5f53\u5728 kimbi \u4e2d\u53d1\u751f\u5403\u5b50\u65f6\uff0c\u6492\u5b50\u5c06\u4ece\u6700\u8fd1\u7684 *kichwa* \u7ee7\u7eed\u8fdb\u884c\u3002*kichwa* \u662f\u73a9\u5bb6\u5185\u6392\u4e2d\u7684\u7b2c\u4e00\u4e2a\u6216\u6700\u540e\u4e00\u4e2a\u5751\u3002\u5982\u679c\u53f3\u4fa7\u7684 *kimbi* \u88ab\u5403\uff0c\u5219\u6492\u5b50\u4ece\u5185\u6392\u53f3\u4fa7\u7684 *kichwa* \u5f00\u59cb\u9006\u65f6\u9488\u7ee7\u7eed\u3002\u5982\u679c\u5de6\u4fa7\u7684 *kimbi* \u88ab\u5403\uff0c\u5219\u6492\u5b50\u4ece\u5de6\u4fa7\u7684 *kichwa* \u5f00\u59cb\u987a\u65f6\u9488\u7ee7\u7eed\u3002\u5bf9\u65b9\u7684 *kimbis* \u4f1a\u88ab\u9ad8\u4eae\u663e\u793a\u3002"},"mandatoryCapturing":{"title":"\u5f3a\u5236\u5403\u5b50","instruction":"\u5982\u679c\u73a9\u5bb6\u6709\u53ef\u4ee5\u5403\u5b50\u7684\u8d70\u6cd5\uff0c\u5219\u5fc5\u987b\u6267\u884c\u8be5\u8d70\u6cd5\u3002\u5982\u679c\u5b58\u5728\u591a\u4e2a\u5403\u5b50\u8d70\u6cd5\uff0c\u73a9\u5bb6\u53ef\u4ee5\u81ea\u7531\u9009\u62e9\u6267\u884c\u54ea\u4e00\u4e2a\u3002"},"takataTurn":{"title":"Takata \u56de\u5408","instruction":"\u5982\u679c\u7b2c\u4e00\u6b21\u6492\u5b50\u6ca1\u6709\u5bfc\u81f4\u5403\u5b50\uff0c\u90a3\u4e48\u5728\u8be5\u56de\u5408\u4e2d\u5c31\u4e0d\u4f1a\u518d\u53d1\u751f\u5403\u5b50\u3002\u4e0d\u53d1\u751f\u5403\u5b50\u7684\u56de\u5408\u79f0\u4e3a takata\uff08\u7a7a\u8d70\uff09\u56de\u5408\u3002"},"gameEnding":{"title":"\u6e38\u620f\u7ed3\u675f","instruction":"\u5f53\u7b2c\u4e00\u6392\u4e3a\u7a7a\uff0c\u6216\u67d0\u4f4d\u73a9\u5bb6\u56e0\u6bcf\u4e2a\u5751\u4e2d\u90fd\u53ea\u5269\u4e00\u679a\u68cb\u5b50\u800c\u65e0\u6cd5\u8d70\u5b50\u65f6\uff0c\u6e38\u620f\u7ed3\u675f\u3002\u6765 [\u8bd5\u73a9\u4e00\u5c40](/game) \u5427"}}},"settings":{"title":"\u8bbe\u7f6e","language":"\u8bed\u8a00","aiDifficulty":"AI \u96be\u5ea6\u7b49\u7ea7","difficulty":{"beginner":"\u521d\u7ea7","intermediate":"\u4e2d\u7ea7","expert":"\u4e13\u5bb6"},"animationSpeed":"\u52a8\u753b\u901f\u5ea6","speed":{"fast":"\u5feb\u901f","slow":"\u6162\u901f","superSlow":"\u6781\u6162"},"moveHints":"\u8d70\u5b50\u63d0\u793a","on":"\u5f00","off":"\u5173"},"gameOver":{"won":"\u4f60\u8d62\u4e86 :)\uff01","lost":"\u4f60\u8f93\u4e86 :( \u2026\u2026","computerStarts":"\u7535\u8111\u5148\u624b","gameType":{"kujifunza":"Bao la Kujifunza","kiswahil
2i":"Bao la Kiswahili"},"startNewGame":"\u5f00\u59cb\u65b0\u6e38\u620f","backToLobby":"\u8fd4\u56de\u5927\u5385"},"history":{"title":"\u8d70\u5b50\u5386\u53f2","empty":"\u6682\u65e0\u8d70\u5b50\u8bb0\u5f55\u3002\u5f00\u59cb\u6e38\u620f\u540e\u5373\u53ef\u67e5\u770b\u4f60\u7684\u8d70\u5b50\u5386\u53f2\uff01","columns":{"user":"\u73a9\u5bb6","moveIndex":"\u8d70\u5b50\u5e8f\u53f7","moveDirection":"\u8d70\u5b50\u65b9\u5411"},"you":"\u4f60","bot":"\u673a\u5668\u4eba","host":"\u623f\u4e3b","guest":"\u8bbf\u5ba2","hostYou":"\u623f\u4e3b\uff08\u4f60\uff09","guestYou":"\u8bbf\u5ba2\uff08\u4f60\uff09"},"multiplayerLobby":{"title":"\u591a\u4eba\u6e38\u620f\u5927\u5385","backToHome":"\u8fd4\u56de\u4e3b\u9875","createGame":"\u521b\u5efa\u6e38\u620f","joinGame":"\u52a0\u5165\u6e38\u620f","loading":"\u52a0\u8f7d\u4e2d\u2026\u2026","authenticating":"\u9a8c\u8bc1\u4e2d\u2026\u2026","yourActiveGames":"\u4f60\u7684\u8fdb\u884c\u4e2d\u6e38\u620f","resume":"\u7ee7\u7eed","noActiveGames":"\u6682\u65e0\u8fdb\u884c\u4e2d\u7684\u6e38\u620f\u3002\u521b\u5efa\u6216\u52a0\u5165\u4e00\u5c40\u6e38\u620f\u5f00\u59cb\u6e38\u73a9\u5427\uff01","room":"\u623f\u95f4\uff1a{{code}}","status":{"waiting":"\u7b49\u5f85\u5bf9\u624b","active":"\u8fdb\u884c\u4e2d","paused":"\u5df2\u6682\u505c","finished":"\u5df2\u7ed3\u675f"}},"createGame":{"title":"\u521b\u5efa\u591a\u4eba\u6e38\u620f","authenticating":"\u9a8c\u8bc1\u4e2d\u2026\u2026","gameTypeLabel":"\u6e38\u620f\u7c7b\u578b","gameType":{"kujifunza":"Kujifunza\uff08\u6807\u51c6\uff09","kiswahili":"Kiswahili\uff08\u8fdb\u9636\uff09"},"startingSideLabel":"\u5148\u624b\u65b9","youStart":"\u4f60\u5148\u624b","opponentStarts":"\u5bf9\u624b\u5148\u624b","creating":"\u521b\u5efa\u4e2d\u2026\u2026","create":"\u521b\u5efa\u6e38\u620f","failed":"\u521b\u5efa\u6e38\u620f\u5931\u8d25\uff0c\u8bf7\u91cd\u8bd5\u3002","howItWorks":"\u8fd0\u4f5c\u65b9\u5f0f\uff1a","step1":"\u6309\u7167\u4f60\u504f\u597d\u7684\u8bbe\u7f6e\u521b\u5efa\u4e00\u5c40\u6e38\u620f","step2":"\u628a\u623f\u95f4\u4ee3\u7801\u5206\u4eab\u7ed9\u4f60\u7684\u670b\u53cb","step3":"\u7b49\u5f85\u5bf9\u65b9\u52a0\u5165\u5373\u53ef\u5f00\u59cb\u6e38\u73a9\uff01"},"joinGame":{"title":"\u52a0\u5165\u591a\u4eba\u6e38\u620f","authenticating":"\u9a8c\u8bc1\u4e2d\u2026\u2026","roomCode":"\u623f\u95f4\u4ee3\u7801","placeholder":"\u8f93\u5165 6 \u4f4d\u4ee3\u7801","joining":"\u52a0\u5165\u4e2d\u2026\u2026","join":"\u52a0\u5165\u6e38\u620f","errorInvalid":"\u8bf7\u8f93\u5165\u6709\u6548\u7684 6 \u4f4d\u623f\u95f4\u4ee3\u7801","errorFailed":"\u52a0\u5165\u6e38\u620f\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5\u623f\u95f4\u4ee3\u7801\u540e\u91cd\u8bd5\u3002","howToJoin":"\u5982\u4f55\u52a0\u5165\uff1a","step1":"\u5411\u4f60\u7684\u670b\u53cb\u83b7\u53d6\u623f\u95f4\u4ee3\u7801","step2":"\u5728\u4e0a\u65b9\u8f93\u5165 6 \u4f4d\u4ee3\u7801","step3":"\u70b9\u51fb\\"\u52a0\u5165\u6e38\u620f\\"\u5373\u53ef\u5f00\u59cb\u6e38\u73a9\uff01"},"contact":{"emailSubject":"\u5173\u4e8e Bawo \u7684\u53cd\u9988"}}'),Ue=JSON.parse('{"_meta":{"reviewed":false,"machineTranslated":true},"common":{"back":"Rudi","cancel":"Ghairi","home":"Nyumbani","language":"Lugha"},"home":{"playSage":"Cheza na Mtaalamu","playMultiplayer":"Cheza na Wachezaji Wengi","howToPlay":"Jinsi ya kucheza","feedback":"Maoni"},"menu":{"title":"Mchezo wa Bao","closeMenu":"Funga menyu","sections":{"navigation":"Uelekezi","singlePlayer":"Mchezo wa Mchezaji Mmoja","multiplayer":"Mchezo wa Wachezaji Wengi","help":"Msaada na Maelezo"},"items":{"home":"Nyumbani","profileStats":"Wasifu na Takwimu","resumeGame":"Endeleza Mchezo","multiplayerLobby":"Ukumbi wa Wachezaji Wengi","settings":"Mipangilio","moveHistory":"Historia ya Hatua","restartGame":"Anzisha Mchezo Upya","howToPlay":"Jinsi ya Kucheza","feedback":"Maoni"},"footer":{"multiplayerActive":"Hali ya Wachezaji Wengi Imewashwa","tagline":"Mancala ya Jadi ya Kiafrika"}},"menuButton":{"openMenu":"Fungua menyu"},"help":{"previous":"Iliyotangulia","next":"Inayofuata","screens":{"introduction":{"title":"Utangulizi","instruction":"Huu ni Bawo (pia hujulikana kama Bao). Ni mchezo wa ubao unaochezwa katika baadhi ya sehemu za Afrika kusini mwa Jangwa la Sahara. Ni mchezo wa wachezaji wawili - mara nyingi wakiwa na watazamaji. Ubao una mashimo 32 yaliyogawanywa katika pande mbili sawa, kila upande ukiwa na mashimo 16. Mchezo huanza na mbegu mbili katika kila shimo. Hii ndiyo toleo rahisi zaidi la mchezo."},"validMoves":{"title":"Hatua Halali","instruction":"Ukiona alama ya \u25b6 juu ya ubao, inamaanisha maelezo yana maudhui shirikis
2hi. Endelea ubonyeze. Mfuatano huu unaonyesha hatua ya awali ya majaribio inayofanywa na mchezaji. Pia unaweza kuona baadhi ya mashimo yakimeta polepole. Mashimo yanayometa yanaonyesha hatua zipi ni halali katika hali ya sasa ya mchezo."},"clockwiseSowing":{"title":"Kupanda Kuelekea Saa","instruction":"Mchezaji huanza zamu kwa kuchukua mbegu zote kutoka shimo lolote lenye angalau mbegu mbili na kuzipanda kwa mwelekeo wa saa au kinyume cha saa. Hapa, mchezaji anapanda kuelekea mwelekeo wa saa."},"antiClockwiseSowing":{"title":"Kupanda Kinyume cha Saa","instruction":"Na hapa, mchezaji anapanda kwa mwelekeo wa kinyume cha saa."},"capturing":{"title":"Kukamata","instruction":"Shimo la *marker* ni shimo la safu ya ndani linaloelekea shimo lisilo tupu la mpinzani. Mashimo ya *marker* yameangaziwa. Iwapo mbegu ya mwisho katika mzunguko wa kupanda itatua kwenye shimo la *marker*, kukamata hutokea na zamu hiyo huitwa zamu ya *mtaji*. Tambua kwamba kupanda kwa mbegu zilizokamatwa kunaendelea katika mwelekeo uleule wa kupanda kwa awali."},"kimbiKichwa":{"title":"Kimbi na Kichwa","instruction":"Kila moja ya mashimo mawili ya kwanza au mawili ya mwisho ya safu ya ndani y
2a mchezaji huitwa *kimbi*. Kukamata kunapotokea kwenye *kimbi*, kupanda kunaendelea kutoka *kichwa* kilicho karibu zaidi. *Kichwa* ni shimo la kwanza au la mwisho katika safu ya ndani ya mchezaji. Iwapo *kimbi* la kulia litakamatwa, basi kupanda kunaendelea kinyume cha saa kutoka *kichwa* cha ndani cha kulia. Iwapo *kimbi* la kushoto litakamatwa, kupanda kunaendelea kuelekea saa kutoka *kichwa* cha kushoto. *kimbis* za mpinzani zimeangaziwa."},"mandatoryCapturing":{"title":"Kukamata kwa Lazima","instruction":"Iwapo mchezaji ana hatua ya kukamata, basi hatua hiyo lazima ichezwe. Iwapo kuna hatua nyingi za kukamata, mchezaji yuko huru kuchagua ipi atakayoifanya."},"takataTurn":{"title":"Zamu ya Takata","instruction":"Iwapo kupanda kwa kwanza hakuongozi kwenye kukamata, basi hakuna kukamata kunaweza kutokea katika zamu hiyo. Zamu isiyo na kukamata huitwa zamu ya takata."},"gameEnding":{"title":"Mwisho wa Mchezo","instruction":"Mchezo huisha iwapo safu ya kwanza ni tupu au mchezaji hawezi kufanya hatua kwa sababu ana mbegu moja tu katika kila shimo. Endelea na [Jaribu mchezo](/game)"}}},"settings":{"title":"Mipangilio","language":"Lugha","aiDifficulty":"Kiwango cha Ugumu wa AI","difficulty":{"beginner":"Anayeanza","intermediate":"Wa Kati","expert":"Bingwa"},"animationSpeed":"Kasi ya Mwendo","speed":{"fast":"Haraka","slow":"Polepole","superSlow":"Polepole sana"},"moveHints":"Vidokezo vya hatua","on":"Washa","off":"Zima"},"gameOver":{"won":"Umeshinda :)!","lost":"Umeshindwa :( ...","computerStarts":"Kompyuta inaanza","gameType":{"kujifunza":"Bao la Kujifunza","kiswahili":"Bao la Kiswahili"},"startNewGame":"Anza mchezo mpya","backToLobby":"Rudi kwenye Ukumbi"},"history":{"title":"Historia ya Hatua","empty":"Hakuna hatua bado. Anza kucheza ili kuona historia yako ya hatua!","columns":{"user":"Mtumiaji","moveIndex":"Nambari ya Hatua","moveDirection":"Mwelekeo wa Hatua"},"you":"Wewe","bot":"Roboti","host":"Mwenyeji","guest":"Mgeni","hostYou":"Mwenyeji (Wewe)","guestYou":"Mgeni (Wewe)"},"multiplayerLobby":{"title":"Ukumbi wa Wachezaji Wengi","backToHome":"Rudi Nyumbani","createGame":"Tengeneza Mchezo","joinGame":"Jiunge na Mchezo","loading":"Inapakia...","authenticating":"Inathibitisha...","yourActiveGames":"Michezo Yako Inayoendelea","resume":"Endeleza","noActiveGames":"Hakuna michezo inayoendelea. Tengeneza au jiunge na mchezo ili uanze kucheza!","room":"Chumba: {{code}}","status":{"waiting":"Inasubiri mpinzani","active":"Inaendelea","paused":"Imesimamishwa","finished":"Imekamilika"}},"createGame":{"title":"Tengeneza Mchezo wa Wachezaji Wengi","authenticating":"Inathibitisha...","gameTypeLabel":"Aina ya Mchezo","gameType":{"kujifunza":"Kujifunza (Kawaida)","kiswahili":"Kiswahili (Hali ya Juu)"},"startingSideLabel":"Upande wa Kuanzia","youStart":"Wewe unaanza","opponentStarts":"Mpinzani anaanza","creating":"Inatengeneza...","create":"Tengeneza Mchezo","failed":"Imeshindwa kutengeneza mchezo. Tafadhali jaribu tena.","howItWorks":"Jinsi inavyofanya kazi:","step1":"Tengeneza mchezo kwa mipangilio unayopendelea","step2":"Shiriki msimbo wa chumba na rafiki yako","step3":"Subiri ajiunge kisha anza kucheza!"},"joinGame":{"title":"Jiunge na Mchezo wa Wachezaji Wengi","authenticating":"Inathibitisha...","roomCode":"Msimbo wa Chumba","placeholder":"Ingiza msimbo wa herufi 6","joining":"Inajiunga...","join":"Jiunge na Mchezo","errorInvalid":"Tafadhali ingiza msimbo halali wa chumba wa herufi 6","errorFailed":"Imeshindwa kujiunga na mchezo. Tafadhali angalia msimbo wa chumba kisha jaribu tena.","howToJoin":"Jinsi ya kujiunga:","step1":"Pata msimbo wa chumba kutoka kwa rafiki yako","step2":"Ingiza msimbo wa herufi 6 hapo juu","step3":"Bonyeza \\"Jiunge na Mchezo\\" ili uanze kucheza!"},"contact":{"emailSubject":"Maoni kuhusu Bawo"}}'),He=JSON.parse('{"_meta":{"reviewed":false,"machineTranslated":true},"common":{"back":"Bwerera","cancel":"Lekani","home":"Kunyumba","language":"Chinenero"},"home":{"playSage":"Sewerani ndi Nzeru","playMultiplayer":"Sewerani Anthu Ambiri","howToPlay":"Mmene mungasewerere","feedback":"Maganizo anu"},"menu":{"title":"Masewera a Bao","closeMenu":"Tsekani menyu","sections":{"navigation":"Kuyenda","singlePlayer":"Mase
2wera a Munthu Mmodzi","multiplayer":"Masewera a Anthu Ambiri","help":"Thandizo & Zambiri"},"items":{"home":"Kunyumba","profileStats":"Mbiri & Ziwerengero","resumeGame":"Pitirizani Masewera","multiplayerLobby":"Malo a Anthu Ambiri","settings":"Zokonza","moveHistory":"Mbiri ya Masewera","restartGame":"Yambitsaninso Masewera","howToPlay":"Mmene Mungasewerere","feedback":"Maganizo anu"},"footer":{"multiplayerActive":"Masewera a Anthu Ambiri Akugwira Ntchito","tagline":"Mancala wa ku Africa wa Chikhalidwe"}},"menuButton":{"openMenu":"Tsegulani menyu"},"help":{"previous":"Zam\'mbuyo","next":"Zotsatira","screens":{"introduction":{"title":"Mawu Oyamba","instruction":"Awa ndi Bawo (omwe amadziwikanso kuti Bao). Ndi masewera a bolodi omwe amaseweredwa m\'madera ena a Africa kum\'mwera kwa Sahara. Ndi masewera a anthu awiri - nthawi zambiri pali oonerera. Bolodi lili ndi maenje 32 ogawidwa m\'mbali ziwiri zofanana, mbali iliyonse ili ndi maenje 16. Masewera amayamba ndi mbewu ziwiri m\'enje lililonse. Awa ndi mtundu wapafupi kwambiri wa masewerawa."},"validMoves":{"title":"Mayendedwe Oyenera","instruction":"Ngati muwona chizindikiro cha \u25b6 pamwamba pa bolodi, zikutanthauza kuti malangizowa ali ndi zinthu zomwe mungalumikizane nazo. Pitirizani ndi kuzitsindika. Mzere uwu ukuwonetsa kuyenda koyamba koyesera kwa wosewera. Mungaonenso maenje ena akuyatsa pang\'onopang\'ono. Maenje akuyatsawa akuwonetsa mayendedwe oyenera mu masewera apano."},"clockwiseSowing":{"title":"Kufesa Kotsata Wotchi","instruction":"Wosewera amayamba nthawi yake potenga mbewu zonse kuchokera m\'enje lililonse lomwe lili ndi mbewu zosachepera ziwiri ndikuzifesa motsatira wotchi kapena motsutsana ndi wotchi. Apa, wosewera akufesa motsatira wotchi."},"antiClockwiseSowing":{"title":"Kufesa Motsutsana ndi Wotchi","instruction":"Ndipo apa, wosewera akufesa motsutsana ndi wotchi."},"capturing":{"title":"Kulanda","instruction":"Enje la *marker* ndi enje la mzere wamkati lomwe likuyang\'anizana ndi enje la mdani lomwe silili lopanda mbewu. Maenje a *marker* amawunikiridwa. Ngati mbewu yomaliza pa kufesa ikhala pa enje la *marker*, kulanda kumachitika ndipo nthawiyo imatchedwa nthawi ya *mtaji*. Onani kuti kufesa kwa mbewu zolandidwa kumapitiriza mbali yomweyo ngati kufesa koyamba."},"kimbiKichwa":{"title":"Kimbi & Kichwa","instruction":"Lililonse la maenje awiri oyamba kapena awiri omaliza a mzere wamkati wa wosewera limatchedwa *kimbi*. Kulanda kukachitika mu *kimbi*, kufesa kumapitiriza kuchokera ku *kichwa* loyandikira kwambiri. *kichwa* ndi enje loyamba kapena lomaliza mu mzere wamkati wa wosewera. Ngati *kimbi* la kumanja lilandidwa, kufesa kumapitiriza motsutsana ndi wotchi kuchokera ku *kichwa* la mkati la kumanja. Ngati *kimbi* la kumanzere lilandidwa, kufesa kumapitiriza motsatira wotchi kuchokera ku *kichwa* la kumanzere. *kimbis* za mdani zimawunikiridwa."},"mandatoryCapturing":{"title":"Kulanda Kotsindikizidwa","instruction":"Ngati wosewera ali ndi mwayi wolanda, ndiye kuti kuyendako kuyenera kuseweredwa. Ngati pali mayendedwe ambiri olanda, wosewera ali ndi ufulu wosankha komwe angachite."},"takataTurn":{"title":"Nthawi ya takata","instruction":"Ngati kufesa koyamba sikutsogolera ku kulanda, ndiye kuti palibe kulanda komwe kungachitike mu nthawiyo. Nthawi yopanda kulanda imatchedwa nthawi ya takata."},"gameEnding":{"title":"Kutha kwa Masewera","instruction":"Masewera amatha ngati mzere woyamba ulibe kanthu kapena wosewera satha kuyenda chifukwa ali ndi mbewu imodzi yokha m\'enje lililonse. Pitirizani ndi [Yesani masewera](/game)"}}},"settings":{"title":"Zokonza","language":"Chinenero","aiDifficulty":"Mlingo wa Kuvuta kwa AI","difficulty":{"beginner":"Woyamba","intermediate":"Wapakatikati","expert":"Katswiri"},"animationSpeed":"Liwiro la Mayendedwe","speed":{"fast":"Mwachangu","slow":"Pang\'onopang\'ono","superSlow":"Pang\'onopang\'ono kwambiri"},"moveHints":"Malangizo a mayendedwe","on":"Yatsani","off":"Zimitsani"},"gameOver":{"won":"Mwapambana :)!","lost":"Mwaluza :( ...","computerStarts":"Kompyuta ikuyamba","gameType":{"kujifunza":"Bao la Kujifunza","kiswahil
2i":"Bao la Kiswahili"},"startNewGame":"Yambani masewera atsopano","backToLobby":"Bwererani ku Malo"},"history":{"title":"Mbiri ya Masewera","empty":"Palibe mayendedwe pakali pano. Yambani kusewera kuti muwone mbiri ya masewera anu!","columns":{"user":"Wosewera","moveIndex":"Nambala ya Kuyenda","moveDirection":"Mbali ya Kuyenda"},"you":"Inu","bot":"Roboti","host":"Mwiniwake","guest":"Mlendo","hostYou":"Mwiniwake (Inu)","guestYou":"Mlendo (Inu)"},"multiplayerLobby":{"title":"Malo a Anthu Ambiri","backToHome":"Bwererani Kunyumba","createGame":"Pangani Masewera","joinGame":"Lowani mu Masewera","loading":"Tikutsegula...","authenticating":"Tikutsimikizira...","yourActiveGames":"Masewera Anu Akugwira Ntchito","resume":"Pitirizani","noActiveGames":"Palibe masewera akugwira ntchito. Pangani kapena lowani mu masewera kuti muyambe kusewera!","room":"Chipinda: {{code}}","status":{"waiting":"Tikudikira mdani","active":"Akupita","paused":"Aimitsidwa","finished":"Atha"}},"createGame":{"title":"Pangani Masewera a Anthu Ambiri","authenticating":"Tikutsimikizira...","gameTypeLabel":"Mtundu wa Masewera","gameType":{"kujifunza":"Kujifunza (Wamba)","kiswahili":"Kiswahili (Wapamwamba)"},"startingSideLabel":"Mbali Yoyamba","youStart":"Inu mukuyamba","opponentStarts":"Mdani akuyamba","creating":"Tikupanga...","create":"Pangani Masewera","failed":"Kupanga masewera kwalephereka. Chonde yesaninso.","howItWorks":"Mmene zimagwirira ntchito:","step1":"Pangani masewera ndi zokonza zomwe mukufuna","step2":"Gawani nambala ya chipinda ndi bwenzi lanu","step3":"Dikirani kuti alowe kenako yambani kusewera!"},"joinGame":{"title":"Lowani mu Masewera a Anthu Ambiri","authenticating":"Tikutsimikizira...","roomCode":"Nambala ya Chipinda","placeholder":"Lowetsani nambala ya zilembo 6","joining":"Tikulowa...","join":"Lowani mu Masewera","errorInvalid":"Chonde lowetsani nambala yoyenera ya chipinda ya zilembo 6","errorFailed":"Kulowa mu masewera kwalephereka. Chonde onani nambala ya chipinda ndikuyesanso.","howToJoin":"Mmene mungalowere:","step1":"Tengani nambala ya chipinda kuchokera kwa bwenzi lanu","step2":"Lowetsani nambala ya zilembo 6 pamwambapa","step3":"Tsindikani \\"Lowani mu Masewera\\" kuti muyambe kusewera!"},"contact":{"emailSubject":"Maganizo okhudza Bawo"}}'),qe=[{code:"en",nativeName:"English"},{code:"fr",nativeName:"Fran\xe7ais"},{code:"es",nativeName:"Espa\xf1ol"},{code:"de",nativeName:"Deutsch"},{code:"pt",nativeName:"Portugu\xeas"},{code:"zh",nativeName:"\u4e2d\u6587"},{code:"sw",nativeName:"Kiswahili"},{code:"ny",nativeName:"Chichewa"}],We="en",$e=qe.map(e=>e.code);function Ve(e){return $e.includes(e)}const Ge=Ne.filter(Ve);if(Ge.length!==Ne.length)throw new Error("baseLanguages.json contains a code that is not in SUPPORTED_LANGUAGES");const Ke={en:{translation:Re},fr:{translation:Be},es:{translation:Le},de:{translation:Me},pt:{translation:je},zh:{translation:ze},sw:{translation:Ue},ny:{translation:He}};function Ye(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ge;const n=e=>Ve(e)&&t.includes(e),r=Oe();if(r)return n(r)?r:We;const i="undefined"!==typeof navigator?(null!==(e=navigator.languages)&&void 0!==e&&e.length?navigator.languages:[navigator.language]).filter(Boolean):[];for(const o of i){const e=o.toLowerCase().split("-")[0];if(n(e))return e}return We}function Je(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{persist:n=!0}=t;return n&&function(e){Pe("language",e)}(e),Z.changeLanguage(e)}Z.use(ge).init({resources:Ke,lng:Ye(),fallbackLng:We,supportedLngs:$e,interpolation:{escapeValue:!1},returnNull:!1}
2).catch(e=>{console.error("i18next initialisation failed",e)});const Qe=Z,Xe="%[a-f0-9]{2}",Ze=new RegExp("("+Xe+")|([^%]+?)","gi"),et=new RegExp("("+Xe+")+","gi");function tt(e,t){try{return[decodeURIComponent(e.join(""))]}catch(i){}if(1===e.length)return e;t=t||1;const n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],tt(n),tt(r))}function nt(e){try{return decodeURIComponent(e)}catch(t){let n=e.match(Ze)||[];for(let r=1;r<n.length;r++)n=(e=tt(n,r).join("")).match(Ze)||[];return e}}function rt(e){if("string"!==typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return decodeURIComponent(e)}catch(t){return function(e){const t={"%FE%FF":"\ufffd\ufffd","%FF%FE":"\ufffd\ufffd"};let n=et.exec(e);for(;n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(i){const e=nt(n[0]);e!==n[0]&&(t[n[0]]=e)}n=et.exec(e)}t["%C2"]="\ufffd";const r=Object.keys(t);for(const o of r)e=e.replace(new RegExp(o,"g"),t[o]);return e}(e)}}function it(e,t){const n={};if(Array.isArray(t))for(const r of t){const t=Object.getOwnPropertyDescriptor(e,r);null!==t&&void 0!==t&&t.enumerable&&Object.defineProperty(n,r,t)}else for(const r of Reflect.ownKeys(e)){const i=Object.getOwnPropertyDescriptor(e,r);if(i.enumerable){t(r,e[r],e)&&Object.defineProperty(n,r,i)}}return n}function ot(e,t){if("string"!==typeof e||"string"!==typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===e||""===t)return[];const n=e.indexOf(t);return-1===n?[]:[e.slice(0,n),e.slice(n+t.length)]}const st=e=>null===e||void 0===e,at=e=>encodeURIComponent(e).replaceAll(/[!'()*]/g,e=>"%".concat(e.charCodeAt(0).toString(16).toUpperCase())),ut=Symbol("encodeFragmentIdentifier");function lt(e){if("string"!==typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function ct(e,t){return t.encode?t.strict?at(e):encodeURIComponent(e):e}function dt(e,t){return t.decode?rt(e):e}function ht(e){return Array.isArray(e)?e.sort():"object"===typeof e?ht(Object.keys(e)).sort((e,t)=>Number(e)-Number(t)).map(t=>e[t]):e}function pt(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function ft(e,t,n){return"string"===n&&"string"===typeof e?e:"function"===typeof n&&"string"===typeof e?n(e):"boolean"===n&&null===e||("boolean"!==n||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()?"boolean"!==n||null===e||"1"!==e.toLowerCase()&&"0"!==e.toLowerCase()?"string[]"===n&&"none"!==t.arrayFormat&&"string"===typeof e?[e]:"number[]"!==n||"none"===t.arrayFormat||Number.isNaN(Number(e))||"string"!==typeof e||""===e.trim()?"number"!==n||Number.isNaN(Number(e))||"string"!==typeof e||""===e.trim()?!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()?t.parseNumbers&&!Number.isNaN(Number(e))&&"string"===typeof e&&""!==e.trim()?Number(e):e:"true"===e.toLowerCase():Number(e):[Number(e)]:"1"===e.toLowerCase():"true"===e.toLowerCase())}function gt(e){const t=(e=pt(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function mt(e,t){lt((t=c({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null)},t)).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)]$/.exec(e),e=e.replace(/\[\d*]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[])$/.exec(e),e=e.replace(/\[]$/,""),t?void 0!==r[e]?r[e]=[...r[e],n]:r[e]=[n]:r[e]=n};case"colon-list-separator":return(e,n,r)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==r[e]?r[e]=[...r[e],n]:r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const i="string"===typeof n&&n.includes(e.arrayFormatSeparator)?n.split(e.arrayFormatSeparator).map(t=>dt(t,e)):null===n?n:dt(n,e);r[t]=i};case"bracket-separator":return(t,n,r)=>{const i=/(\[])$/.test(t);if(t=t.replace(/\[]$/,""),!i)return void(r[t]=n?dt(n,e):n);const o=null===n?[]:dt(n,e).split(e.arrayFormatSeparator);void 0!==r[t]?r[t]=[...r[t],...o]:r[t]=o};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[...[n[e]].flat(),t]:n[e]=t}}}(t),r=Object.create(null);if("string"!==typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const i of e.split("&")){if(""===i)continue;const e=t.decode?i.replaceAll("+"," "):i;let[o,s]=ot(e,"=");void 0===o&&(o=e),s=void 0===s?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:dt(s,t),n(dt(o,t),s,r)}for(const[i,o]of Object.entries(r))if("object"===typeof o&&null!==o&&"string"!==t.types[i])for(const[e,n]of Object.entries(o)){const r=t.types[i],s="function"===typeof r?r:r?r.replace("[]",""):void 0;o[e]=ft(n,t,s)}else"object"===typeof o&&null!==o&&"string"===t.types[i]?r[i]=Object.values(o).join(t.arrayFormatSeparator):r[i]=ft(o,t,t.types[i]);return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce((e,t)=>
2{const n=r[t];return e[t]=Boolean(n)&&"object"===typeof n&&!Array.isArray(n)?ht(n):n,e},Object.create(null))}function vt(e,t){if(!e)return"";lt((t=c({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=n=>t.skipNull&&st(e[n])||t.skipEmptyString&&""===e[n],r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[ct(t,e),"[",i,"]"].join("")]:[...n,[ct(t,e),"[",ct(i,e),"]=",ct(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[ct(t,e),"[]"].join("")]:[...n,[ct(t,e),"[]=",ct(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[ct(t,e),":list="].join("")]:[...n,[ct(t,e),":list=",ct(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length?[[ct(n,e),t,ct(i,e)].join("")]:[[r,ct(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,ct(t,e)]:[...n,[ct(t,e),"=",ct(r,e)].join("")]}}(t),i={};for(const[s,a]of Object.entries(e))n(s)||(i[s]=a);const o=Object.keys(i);return!1!==t.sort&&o.sort(t.sort),o.map(n=>{let i=e[n];if(t.replacer&&(i=t.replacer(n,i),void 0===i))return"";if(void 0===i)return"";if(null===i)return ct(n,t);if(Array.isArray(i)){if(0===i.length&&"bracket-separator"===t.arrayFormat)return ct(n,t)+"[]";let e=i;return t.replacer&&(e=i.map((e,r)=>t.replacer("".concat(n,"[").concat(r,"]"),e)).filter(e=>void 0!==e)),e.reduce(r(n),[]).join("&")}return ct(n,t)+"="+ct(i,t)}).filter(e=>e.length>0).join("&")}function yt(e,t){var n,r;t=c({decode:!0},t);let[i,o]=ot(e,"#");return void 0===i&&(i=e),c({url:null!==(n=null===(r=i)||void 0===r||null===(r=r.split("?"))||void 0===r?void 0:r[0])&&void 0!==n?n:"",query:mt(gt(e),t)},t&&t.parseFragmentIdentifier&&o?{fragmentIdentifier:dt(o,t)}:{})}function Dt(e,t){t=c({encode:!0,strict:!0,[ut]:!0},t);const n=pt(e.url).split("?")[0]||"";let r=vt(c(c({},mt(gt(e.url),c({sort:!1},t))),e.query),t);r&&(r="?".concat(r));let i=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);if("string"===typeof e.fragmentIdentifier){const r=new URL(n);r.hash=e.fragmentIdentifier,i=t[ut]?r.hash:"#".concat(e.fragmentIdentifier)}return"".concat(n).concat(r).concat(i)}function _t(e,t,n){n=c({parseFragmentIdentifier:!0,[ut]:!1},n);const{url:r,query:i,fragmentIdentifier:o}=yt(e,n);return Dt({url:r,query:it(i,t),fragmentIdentifier:o},n)}function bt(e,t,n){return _t(e,Array.isArray(t)?e=>!t.includes(e):(e,n)=>!t(e,n),n)}const wt=e;function Et(e){let t=null;return()=>(null==t&&(t=e()),t)}class Ct{enter(e){const t=this.entered.length;return this.entered=function(e,t){const n=new Set,r=e=>n.add(e);e.forEach(r),t.forEach(r);const i=[];return n.forEach(e=>i.push(e)),i}(this.entered.filter(t=>this.isNodeInDocument(t)&&(!t.contains||t.contains(e))),[e]),0===t&&this.entered.length>0}leave(e){const t=this.entered.length;var n,r;return this.entered=(n=this.entered.filter(this.isNodeInDocument),r=e,n.filter(e=>e!==r)),t>0&&0===this.entered.length}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class kt{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get:()=>(console.warn("Browser doesn't allow reading \"".concat(e,'" until the drop event.')),null)})})}loadDataTransfer(e){if(e){const t={};Object.keys(this.config.exposeProperties).forEach(n=>{const r=this.config.exposeProperties[n];null!=r&&(t[n]={value:r(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const St="__NATIVE_FILE__",xt="__NATIVE_URL__",Ft="__NATIVE_TEXT__",At="__NATIVE_HTML__";function Tt(e,t,n){const r=t.reduce((t,n)=>t||e.getData(n),"");return null!=r?r:n}const It={[St]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[At]:{exposeProperties:{html:(e,t)=>
vendor: 13,351 bytes, line 2
2Tt(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[xt]:{exposeProperties:{urls:(e,t)=>Tt(e,t,"").split("\n"),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[Ft]:{exposeProperties:{text:(e,t)=>Tt(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function Pt(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(It).filter(e=>{const n=It[e];return!!(null===n||void 0===n?void 0:n.matchesTypes)&&n.matchesTypes.some(e=>t.indexOf(e)>-1)})[0]||null}const Ot=Et(()=>/firefox/i.test(navigator.userAgent)),Nt=Et(()=>Boolean(window.safari));class Rt{interpolate(e){const{xs:t,ys:n,c1s:r,c2s:i,c3s:o}=this;let s=t.length-1;if(e===t[s])return n[s];let a,u=0,l=o.length-1;for(;u<=l;){a=Math.floor(.5*(u+l));const r=t[a];if(r<e)u=a+1;else{if(!(r>e))return n[a];l=a-1}}s=Math.max(0,l);const c=e-t[s],d=c*c;return n[s]+r[s]*c+i[s]*d+o[s]*c*d}constructor(e,t){const{length:n}=e,r=[];for(let p=0;p<n;p++)r.push(p);r.sort((t,n)=>e[t]<e[n]?-1:1);const i=[],o=[],s=[];let a,u;for(let p=0;p<n-1;p++)a=e[p+1]-e[p],u=t[p+1]-t[p],o.push(a),i.push(u),s.push(u/a);const l=[s[0]];for(let p=0;p<o.length-1;p++){const e=s[p],t=s[p+1];if(e*t<=0)l.push(0);else{a=o[p];const n=o[p+1],r=a+n;l.push(3*r/((r+n)/e+(r+a)/t))}}l.push(s[s.length-1]);const c=[],d=[];let h;for(let p=0;p<l.length-1;p++){h=s[p];const e=l[p],t=1/o[p],n=e+l[p+1]-h-h;c.push((h-e-n)*t),d.push(n*t*t)}this.xs=e,this.ys=t,this.c1s=l,this.c2s=c,this.c3s=d}}function Bt(e){const t=1===e.nodeType?e:e.parentElement;if(!t)return null;const{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function Lt(e){return{x:e.clientX,y:e.clientY}}function Mt(e,t,n,r,i){const o=function(e){var t;return"IMG"===e.nodeName&&(Ot()||!(null===(t=document.documentElement)||void 0===t?void 0:t.contains(e)))}(t),s=Bt(o?e:t),a={x:n.x-s.x,y:n.y-s.y},{offsetWidth:u,offsetHeight:l}=e,{anchorX:c,anchorY:d}=r,{dragPreviewWidth:h,dragPreviewHeight:p}=function(e,t,n,r){let i=e?t.width:n,o=e?t.height:r;return Nt()&&e&&(o/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:o}}(o,t,u,l),{offsetX:f,offsetY:g}=i,m=0===g||g;return{x:0===f||f?f:new Rt([0,.5,1],[a.x,a.x/u*h,a.x+h-u]).interpolate(c),y:m?g:(()=>{let e=new Rt([0,.5,1],[a.y,a.y/l*p,a.y+p-l]).interpolate(d);return Nt()&&o&&(e+=(window.devicePixelRatio-1)*p),e})()}}class jt{get window(){return this.globalContext?this.globalContext:"undefined"!==typeof window?window:void 0}get document(){var e;return(null===(e=this.globalContext)||void 0===e?void 0:e.document)?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return(null===(e=this.optionsArgs)||void 0===e?void 0:e.rootElement)||this.window}constructor(e,t){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=t}}function zt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ut(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){zt(e,t,n[t])})}return e}class Ht{profile(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:(null===(e=this.dragStartSourceIds)||void 0===e?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:(null===(t=this.dragOverTargetIds)||void 0===t?void 0:t.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(void 0!==e){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;var t;void 0!==e&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&(null===(t=this.window)||void 0===t||t.cancelAnimationFrame(this.asyncEndDragFrameId)))}connectDragPreview(e,t,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,t,n){this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,n);const r=t=>this.handleDragStart(t,e),i=e=>this.handleSelectStart(e);return t.setAttribute("draggable","true"),t.addEventListener("dragstart",r),t.addEventListener("selectstart",i),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",r),t.removeEventListener("selectstart",i),t.setAttribute("draggable","false")}}connectDropTarget(e,t){const n=t=>this.handleDragEnter(t,e),r=t=>this.handleDragOver(t,e),i=t=>this.handleDrop(t,e);return t.addEventListener("dragenter",n),t.addEventListener("dragover",r),t.addEventListener("drop",i),()=>{t.removeEventListener("dragenter",n),t.removeEventListener("dragover",r),t.removeEventListener("drop",i)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return Ut({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId();return Ut({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(t).some(n=>t[n]===e)}beginDragNativeItem(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(e,t){const n=It[e];if(!n)throw new Error("native type ".concat(e," has no configuration"));const r=new kt(n);return r.loadDataTransfer(t),r}(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;this.mouseMoveTimeoutTimer=setTimeout(()=>{var e;return null===(e=this.rootElement)||void 0===e?void 0:e.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},1e3)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){var e;if(this.currentDragSourceNode=null,this.rootElement)null===(e=this.window)||void 0===e||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0);return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}handleDragEnter(e,t){this.dragEnterTargetIds.unshift(t)}handleDragOver(e,t){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}handleDrop(e,t){this.dropTargetIds.unshift(t)}constructor(e,t,n){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=e=>{const t=this.sourceNodes.get(e);return t&&Bt(t)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=e=>Boolean(e&&this.document&&this.document.body&&this.document.body.contains(e)),this.endDragIfSourceWasRemovedFromDOM=()=>{const e=this.currentDragSourceNode;null==e||this.isNodeInDocument(e)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=e=>{null===this.hoverRafId&&"undefined"!==typeof requestAnimationFrame&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(e||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{null!==this.hoverRafId&&"undefined"!==typeof cancelAnimationFrame&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=e=>{if(e.defaultPrevented)return;const{dragStartSourceIds:t}=this;this.dragStartSourceIds=null;const n=Lt(e);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:n});const{dataTransfer:r}=e,i=Pt(r);if(this.monitor.isDragging()){if(r&&"function"===typeof r.setDragImage){const e=this.monitor.getSourceId(),t=this.sourceNodes.get(e),i=this.sourcePreviewNodes.get(e)||t;if(i){const{anchorX:e,anchorY:o,offsetX:s,offsetY:a}=this.getCurrentSourcePreviewNodeOptions(),u=Mt(t,i,n,{anchorX:e,anchorY:o},{offsetX:s,offsetY:a});r.setDragImage(i,u.x,u.y)}}try{null===r||void 0===r||r.setData("application/json",{})}catch(o){}this.setCurrentDragSourceNode(e.target);const{captureDraggingState:t}=this.getCurrentSourcePreviewNodeOptions();t?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(i)this.beginDragNativeItem(i);else{if(r&&!r.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute("draggable")))return;e.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=e=>{var t;(this.dragEnterTargetIds=[],this.isDraggingNativeItem())&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer));if(!this.enterLeaveCounter.enter(e.target)||this.monitor.isDragging())return;const{dataTransfer:n}=e,r=Pt(n);r&&this.beginDragNativeItem(r,n)},this.handleTopDragEnter=e=>{const{dragEnterTargetIds:t}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=e.altKey,t.length>0&&this.actions.hover(t,{clientOffset:Lt(e)});t.some(e=>this.monitor.canDropOnTarget(e))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=e=>{var t;(this.dragOverTargetIds=[],this.isDraggingNativeItem())&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer))},this.handleTopDragOver=e=>{const{dragOverTargetIds:t}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer&&(e.dataTransfer.dropEffect="none"));this.altKeyPressed=e.altKey,this.lastClientOffset=Lt(e),this.scheduleHover(t);(t||[]).some(e=>this.monitor.canDropOnTarget(e))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=e=>{this.isDraggingNativeItem()&&e.preventDefault();this.enterLeaveCounter.leave(e.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=e=>{var t;(this.dropTargetIds=[],this.isDraggingNativeItem())?(e.preventDefault(),null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer)):Pt(e.dataTransfer)&&e.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=e=>{const{dropTargetIds:t}=this;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:Lt(e)}
2),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=e=>{const t=e.target;"function"===typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new jt(t,n),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new Ct(this.isNodeInDocument)}}function qt(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if("undefined"!==typeof process&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){let e;if(void 0===t)e=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let n=0;e=new Error(t.replace(/%s/g,function(){return r[n++]})),e.name="Invariant Violation"}throw e.framesToPop=1,e}}var Wt;!function(e){e.mouse="mouse",e.touch="touch",e.keyboard="keyboard"}(Wt||(Wt={}));class $t{get delay(){var e;return null!==(e=this.args.delay)&&void 0!==e?e:0}get scrollAngleRanges(){return this.args.scrollAngleRanges}get getDropTargetElementsAtPoint(){return this.args.getDropTargetElementsAtPoint}get ignoreContextMenu(){var e;return null!==(e=this.args.ignoreContextMenu)&&void 0!==e&&e}get enableHoverOutsideTarget(){var e;return null!==(e=this.args.enableHoverOutsideTarget)&&void 0!==e&&e}get enableKeyboardEvents(){var e;return null!==(e=this.args.enableKeyboardEvents)&&void 0!==e&&e}get enableMouseEvents(){var e;return null!==(e=this.args.enableMouseEvents)&&void 0!==e&&e}get enableTouchEvents(){var e;return null===(e=this.args.enableTouchEvents)||void 0===e||e}get touchSlop(){return this.args.touchSlop||0}get delayTouchStart(){var e,t,n,r;return null!==(r=null!==(n=null===(e=this.args)||void 0===e?void 0:e.delayTouchStart)&&void 0!==n?n:null===(t=this.args)||void 0===t?void 0:t.delay)&&void 0!==r?r:0}get delayMouseStart(){var e,t,n,r;return null!==(r=null!==(n=null===(e=this.args)||void 0===e?void 0:e.delayMouseStart)&&void 0!==n?n:null===(t=this.args)||void 0===t?void 0:t.delay)&&void 0!==r?r:0}get window(){return this.context&&this.context.window?this.context.window:"undefined"!==typeof window?window:void 0}get document(){var e;return(null===(e=this.context)||void 0===e?void 0:e.document)?this.context.document:this.window?this.window.document:void 0}get rootElement(){var e;return(null===(e=this.args)||void 0===e?void 0:e.rootElement)||this.document}constructor(e,t){this.args=e,this.context=t}}const Vt=1,Gt=0;function Kt(e){return void 0===e.button||e.button===Gt}function Yt(e){return!!e.targetTouches}function Jt(e,t){return Yt(e)?function(e,t){return 1===e.targetTouches.length?Jt(e.targetTouches[0]):t&&1===e.touches.length&&e.touches[0].target===t.target?Jt(e.touches[0]):void 0}(e,t):{x:e.clientX,y:e.clientY}}const Qt=(()=>{let e=!1;try{addEventListener("test",()=>{},Object.defineProperty({},"passive",{get:()=>(e=!0,!0)}))}catch(y_){}return e})(),Xt={[Wt.mouse]:{start:"mousedown",move:"mousemove",end:"mouseup",contextmenu:"contextmenu"},[Wt.touch]:{start:"touchstart",move:"touchmove",end:"touchend"},[Wt.keyboard]:{keydown:"keydown"}};class Zt{profile(){var e;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:(null===(e=this.dragOverTargetIds)||void 0===e?void 0:e.length)||0}}get document(){return this.options.document}setup(){const e=this.options.rootElement;e&&(qt(!Zt.isSetUp,"Cannot have two Touch backends at the same time."),Zt.isSetUp=!0,this.addEventListener(e,"start",this.getTopMoveStartHandler()),this.addEventListener(e,"start",this.handleTopMoveStartCapture,!0),this.addEventListener(e,"move",this.handleTopMove),this.addEventListener(e,"move",this.handleTopMoveCapture,!0),this.addEventListener(e,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(e,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(e,"keydown",this.handleCancelOnEscape,!0))}teardown(){const e=this.options.rootElement;e&&(Zt.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(e,"start",this.handleTopMoveStartCapture,!0),this.removeEventListener(e,"start",this.handleTopMoveStart),this.removeEventListener(e,"move",this.handleTopMoveCapture,!0),this.removeEventListener(e,"move",this.handleTopMove),this.removeEventListener(e,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(e,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(e,"keydown",this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}addEventListener(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=Qt?{capture:r,passive:!1}:r;
2this.listenerTypes.forEach(function(r){const o=Xt[r][t];o&&e.addEventListener(o,n,i)})}removeEventListener(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=Qt?{capture:r,passive:!1}:r;this.listenerTypes.forEach(function(r){const o=Xt[r][t];o&&e.removeEventListener(o,n,i)})}connectDragSource(e,t){const n=this.handleMoveStart.bind(this,e);return this.sourceNodes.set(e,t),this.addEventListener(t,"start",n),()=>{this.sourceNodes.delete(e),this.removeEventListener(t,"start",n)}}connectDragPreview(e,t,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDropTarget(e,t){const n=this.options.rootElement;if(!this.document||!n)return()=>{};const r=r=>{if(!this.document||!n||!this.monitor.isDragging())return;let i;switch(r.type){case Xt.mouse.move:i={x:r.clientX,y:r.clientY};break;case Xt.touch.move:var o,s;i={x:(null===(o=r.touches[0])||void 0===o?void 0:o.clientX)||0,y:(null===(s=r.touches[0])||void 0===s?void 0:s.clientY)||0}}const a=null!=i?this.document.elementFromPoint(i.x,i.y):void 0,u=a&&t.contains(a);return a===t||u?this.handleMove(r,e):void 0};return this.addEventListener(this.document.body,"move",r),this.targetNodes.set(e,t),()=>{this.document&&(this.targetNodes.delete(e),this.removeEventListener(this.document.body,"move",r))}}getTopMoveStartHandler(){return this.options.delayTouchStart||this.options.delayMouseStart?this.handleTopMoveStartDelay:this.handleTopMoveStart}installSourceNodeRemovalObserver(e){this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=e,this.draggedSourceNodeRemovalObserver=new MutationObserver(()=>{e&&!e.parentElement&&(this.resurrectSourceNode(),this.uninstallSourceNodeRemovalObserver())}),e&&e.parentElement&&this.draggedSourceNodeRemovalObserver.observe(e.parentElement,{childList:!0})}resurrectSourceNode(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display="none",this.draggedSourceNode.removeAttribute("data-reactid"),this.document.body.appendChild(this.draggedSourceNode))}uninstallSourceNodeRemovalObserver(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}constructor(e,t,n){this.getSourceClientOffset=e=>{const t=this.sourceNodes.get(e);return t&&function(e){const t=1===e.nodeType?e:e.parentElement;if(!t)return;const{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}(t)},this.handleTopMoveStartCapture=e=>{Kt(e)&&(this.moveStartSourceIds=[])},this.handleMoveStart=e=>{Array.isArray(this.moveStartSourceIds)&&this.moveStartSourceIds.unshift(e)},this.handleTopMoveStart=e=>{if(!Kt(e))return;const t=Jt(e);t&&(Yt(e)&&(this.lastTargetTouchFallback=e.targetTouches[0]),this._mouseClientOffset=t),this.waitingForDelay=!1},this.handleTopMoveStartDelay=e=>{if(!Kt(e))return;const t=e.type===Xt.touch.start?this.options.delayTouchStart:this.options.delayMouseStart;this.timeout=setTimeout(this.handleTopMoveStart.bind(this,e),t),this.waitingForDelay=!0},this.handleTopMoveCapture=()=>{this.dragOverTargetIds=[]},this.handleMove=(e,t)=>{this.dragOverTargetIds&&this.dragOverTargetIds.unshift(t)},this.handleTopMove=e=>{if(this.timeout&&clearTimeout(this.timeout),!this.document||this.waitingForDelay)return;const{moveStartSourceIds:t,dragOverTargetIds:n}=this,r=this.options.enableHoverOutsideTarget,i=Jt(e,this.lastTargetTouchFallback);if(!i)return;if(this._isScrolling||!this.monitor.isDragging()&&function(e,t,n,r,i){if(!i)return!1;const o=180*Math.atan2(r-t,n-e)/Math.PI+180;for(let s=0;s<i.length;++s){const e=i[s];if(e&&(null==e.start||o>=e.start)&&(null==e.end||o<=e.end))return!0}return!1}
2(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,i.x,i.y,this.options.scrollAngleRanges))return void(this._isScrolling=!0);var o,s,a,u;if(!this.monitor.isDragging()&&this._mouseClientOffset.hasOwnProperty("x")&&t&&(o=this._mouseClientOffset.x||0,s=this._mouseClientOffset.y||0,a=i.x,u=i.y,Math.sqrt(Math.pow(Math.abs(a-o),2)+Math.pow(Math.abs(u-s),2))>(this.options.touchSlop?this.options.touchSlop:0))&&(this.moveStartSourceIds=void 0,this.actions.beginDrag(t,{clientOffset:this._mouseClientOffset,getSourceClientOffset:this.getSourceClientOffset,publishSource:!1})),!this.monitor.isDragging())return;const l=this.sourceNodes.get(this.monitor.getSourceId());this.installSourceNodeRemovalObserver(l),this.actions.publishDragSource(),e.cancelable&&e.preventDefault();const c=(n||[]).map(e=>this.targetNodes.get(e)).filter(e=>!!e),d=this.options.getDropTargetElementsAtPoint?this.options.getDropTargetElementsAtPoint(i.x,i.y,c):this.document.elementsFromPoint(i.x,i.y),h=[];for(const f in d){if(!d.hasOwnProperty(f))continue;let e=d[f];for(null!=e&&h.push(e);e;)e=e.parentElement,e&&-1===h.indexOf(e)&&h.push(e)}const p=h.filter(e=>c.indexOf(e)>-1).map(e=>this._getDropTargetId(e)).filter(e=>!!e).filter((e,t,n)=>n.indexOf(e)===t);if(r)for(const f in this.targetNodes){const e=this.targetNodes.get(f);if(l&&e&&e.contains(l)&&-1===p.indexOf(f)){p.unshift(f);break}}p.reverse(),this.actions.hover(p,{clientOffset:i})},this._getDropTargetId=e=>{const t=this.targetNodes.keys();let n=t.next();for(;!1===n.done;){const r=n.value;if(e===this.targetNodes.get(r))return r;n=t.next()}},this.handleTopMoveEndCapture=e=>{this._isScrolling=!1,this.lastTargetTouchFallback=void 0,function(e){return void 0===e.buttons||0===(e.buttons&Vt)}(e)&&(this.monitor.isDragging()&&!this.monitor.didDrop()?(e.cancelable&&e.preventDefault(),this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.drop(),this.actions.endDrag()):this.moveStartSourceIds=void 0)},this.handleCancelOnEscape=e=>{"Escape"===e.key&&this.monitor.isDragging()&&(this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.endDrag())},this.options=new $t(n,t),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.sourceNodes=new Map,this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.targetNodes=new Map,this.listenerTypes=[],this._mouseClientOffset={},this._isScrolling=!1,this.options.enableMouseEvents&&this.listenerTypes.push(Wt.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(Wt.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(Wt.keyboard)}}const en=navigator.userAgent.includes("iPad")||navigator.userAgent.includes("iPhone")?function(e){return new Zt(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})}:function(e,t,n){return new Ht(e,t,n)};var tn=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(y_){}}else t.appendChild(document.createTextNode(e));this.ctr++}
vendor: 9,610 bytes, line 2
2,t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),nn=Math.abs,rn=String.fromCharCode,on=Object.assign;function sn(e){return e.trim()}function an(e,t,n){return e.replace(t,n)}function un(e,t){return e.indexOf(t)}function ln(e,t){return 0|e.charCodeAt(t)}function cn(e,t,n){return e.slice(t,n)}function dn(e){return e.length}function hn(e){return e.length}function pn(e,t){return t.push(e),e}var fn=1,gn=1,mn=0,vn=0,yn=0,Dn="";function _n(e,t,n,r,i,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:fn,column:gn,length:s,return:""}}function bn(e,t){return on(_n("",null,null,"",null,null,0),e,{length:-e.length},t)}function wn(){return yn=vn>0?ln(Dn,--vn):0,gn--,10===yn&&(gn=1,fn--),yn}function En(){return yn=vn<mn?ln(Dn,vn++):0,gn++,10===yn&&(gn=1,fn++),yn}function Cn(){return ln(Dn,vn)}function kn(){return vn}function Sn(e,t){return cn(Dn,e,t)}function xn(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Fn(e){return fn=gn=1,mn=dn(Dn=e),vn=0,[]}function An(e){return Dn="",e}function Tn(e){return sn(Sn(vn-1,On(91===e?e+2:40===e?e+1:e)))}function In(e){for(;(yn=Cn())&&yn<33;)En();return xn(e)>2||xn(yn)>3?"":" "}function Pn(e,t){for(;--t&&En()&&!(yn<48||yn>102||yn>57&&yn<65||yn>70&&yn<97););return Sn(e,kn()+(t<6&&32==Cn()&&32==En()))}function On(e){for(;En();)switch(yn){case e:return vn;case 34:case 39:34!==e&&39!==e&&On(yn);break;case 40:41===e&&On(e);break;case 92:En()}return vn}function Nn(e,t){for(;En()&&e+yn!==57&&(e+yn!==84||47!==Cn()););return"/*"+Sn(t,vn-1)+"*"+rn(47===e?e:En())}function Rn(e){for(;!xn(Cn());)En();return Sn(e,vn)}var Bn="-ms-",Ln="-moz-",Mn="-webkit-",jn="comm",zn="rule",Un="decl",Hn="@keyframes";function qn(e,t){for(var n="",r=hn(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function Wn(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Un:return e.return=e.return||e.value;case jn:return"";case Hn:return e.return=e.value+"{"+qn(e.children,r)+"}";case zn:e.value=e.props.join(",")}return dn(n=qn(e.children,r))?e.return=e.value+"{"+n+"}":""}function $n(e){return An(Vn("",null,null,null,[""],e=Fn(e),0,[0],e))}function Vn(e,t,n,r,i,o,s,a,u){for(var l=0,c=0,d=s,h=0,p=0,f=0,g=1,m=1,v=1,y=0,D="",_=i,b=o,w=r,E=D;m;)switch(f=y,y=En()){case 40:if(108!=f&&58==ln(E,d-1)){-1!=un(E+=an(Tn(y),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:E+=Tn(y);break;case 9:case 10:case 13:case 32:E+=In(f);break;case 92:E+=Pn(kn()-1,7);continue;case 47:switch(Cn()){case 42:case 47:pn(Kn(Nn(En(),kn()),t,n),u);break;default:E+="/"}break;case 123*g:a[l++]=dn(E)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+c:-1==v&&(E=an(E,/\f/g,"")),p>0&&dn(E)-d&&pn(p>32?Yn(E+";",r,n,d-1):Yn(an(E," ","")+";",r,n,d-2),u);break;case 59:E+=";";default:if(pn(w=Gn(E,t,n,l,c,i,a,D,_=[],b=[],d),o),123===y)if(0===c)Vn(E,t,w,w,_,o,d,a,b);else switch(99===h&&110===ln(E,3)?100:h){case 100:case 108:case 109:case 115:Vn(e,w,w,r&&pn(Gn(e,w,w,0,0,i,a,D,i,_=[],d),b),i,b,d,a,r?_:b);break;default:Vn(E,w,w,w,[""],b,0,a,b)}}l=c=p=0,g=v=1,D=E="",d=s;break;case 58:d=1+dn(E),p=f;default:if(g<1)if(123==y)--g;else if(125==y&&0==g++&&125==wn())continue;switch(E+=rn(y),y*g){case 38:v=c>0?1:(E+="\f",-1);break;case 44:a[l++]=(dn(E)-1)*v,v=1;break;case 64:45===Cn()&&(E+=Tn(En())),h=Cn(),c=d=dn(D=E+=Rn(kn())),y++;break;case 45:45===f&&2==dn(E)&&(g=0)}}return o}function Gn(e,t,n,r,i,o,s,a,u,l,c){for(var d=i-1,h=0===i?o:[""],p=hn(h),f=0,g=0,m=0;f<r;++f)for(var v=0,y=cn(e,d+1,d=nn(g=s[f])),D=e;v<p;++v)(D=sn(g>0?h[v]+" "+y:an(y,/&\f/g,h[v])))&&(u[m++]=D);return _n(e,t,n,0===i?zn:a,u,l,c)}function Kn(e,t,n){return _n(e,t,n,jn,rn(yn),cn(e,2,-2),0)}function Yn(e,t,n,r){return _n(e,t,n,Un,cn(e,0,r),cn(e,r+1,-1),r)}var Jn=function(e,t,n){for(var r=0,i=0;r=i,i=Cn(),38===r&&12===i&&(t[n]=1),!xn(i);)En();return Sn(e,vn)},Qn=function(e,t){return An(function(e,t){var n=-1,r=44;do{switch(xn(r)){case 0:38===r&&12===Cn()&&(t[n]=1),e[n]+=Jn(vn-1,t,n);break;case 2:e[n]+=Tn(r);break;case 4:if(44===r){e[++n]=58===Cn()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=rn(r)}}while(r=En());return e}(Fn(e),t))},Xn=new WeakMap,Zn=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Xn.get(n))&&!r){Xn.set(e,!0);for(var i=[],o=Qn(t,i),s=n.props,a=0,u=0;a<o.length;a++)for(var l=0;l<s.length;l++,u++)e.props[u]=i[a]?o[a].replace(/&\f/g,s[l]):s[l]+" "+o[a]}}},er=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function tr(e,t){switch(function(e,t){return 45^ln(e,0)?(((t<<2^ln(e,0))<<2^ln(e,1))<<2^ln(e,2))<<2^ln(e,3):0}(e,t)){case 5103:return Mn+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Mn+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Mn+e+Ln+e+Bn+e+e;case 6828:case 4268:return Mn+e+Bn+e+e;case 6165:return Mn+e+Bn+"flex-"+e+e;case 5187:return Mn+e+an(e,/(\w+).+(:[^]+)/,Mn+"box-$1$2"+Bn+"flex-$1$2")+e;case 5443:return Mn+e+Bn+"flex-item-"+an(e,/flex-|-self/,"")+e;case 4675:return Mn+e+Bn+"flex-line-pack"+an(e,/align-content|flex-|-self/,"")+e;case 5548:return Mn+e+Bn+an(e,"shrink","negative")+e;case 5292:return Mn+e+Bn+an(e,"basis","preferred-size")+e;case 6060:return Mn+"box-"+an(e,"-grow","")+Mn+e+Bn+an(e,"grow","positive")+e;case 4554:return Mn+an(e,/([^-])(transform)/g,"$1"+Mn+"$2")+e;case 6187:return an(an(an(e,/(zoom-|grab)/,Mn+"$1"),/(image-set)/,Mn+"$1"),e,"")+e;case 5495:case 3959:return an(e,/(image-set\([^]*)/,Mn+"$1$`$1");case 4968:return an(an(e,/(.+:)(flex-)?(.*)/,Mn+"box-pack:$3"+Bn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Mn+e+e;case 4095:case 3583:case 4068:case 2532:return an(e,/(.+)-inline(.+)/,Mn+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(dn(e)-1-t>6)switch(ln(e,t+1)){case 109:if(45!==ln(e,t+4))break;case 102:return an(e,/(.+:)(.+)-([^]+)/,"$1"+Mn+"$2-$3$1"+Ln+(108==ln(e,t+3)?"$3":"$2-$3"))+e;case 115:return~un(e,"stretch")?tr(an(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==ln(e,t+1))break;case 6444:switch(ln(e,dn(e)-3-(~un(e,"!important")&&10))){case 107:return an(e,":",":"+Mn)+e;case 101:return an(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Mn+(45===ln(e,14)?"inline-":"")+"box$3$1"+Mn+"$2$3$1"+Bn+"$2box$3")+e}break;case 5936:switch(ln(e,t+11)){case 114:return Mn+e+Bn+an(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Mn+e+Bn+an(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Mn+e+Bn+an(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Mn+e+Bn+e+e}return e}var nr=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Un:e.return=tr(e.value,e.length);break;case Hn:return qn([bn(e,{value:an(e.value,"@","@"+Mn)})],r);case zn:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return qn([bn(e,{props:[an(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return qn([bn(e,{props:[an(t,/:(plac\w+)/,":"+Mn+"input-$1")]}),bn(e,{props:[an(t,/:(plac\w+)/,":-moz-$1")]}),bn(e,{props:[an(t,/:(plac\w+)/,Bn+"input-$1")]})],r)}return""})}}],rr=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,i,o=e.stylisPlugins||nr,s={},a=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)s[t[n]]=!0;a.push(e)});var u,l,c=[Wn,(l=function(e){u.insert(e)},function(e){e.root||(e=e.return)&&l(e)})],d=function(e){var t=hn(e);return function(n,r,i,o){for(var s="",a=0;a<t;a++)s+=e[a](n,r,i,o)||"";return s}}([Zn,er].concat(o,c));i=function(e,t,n,r){u=n,function(e){qn($n(e),d)}(e?e+"{"+t.styles+"}":t.styles),r&&(h.inserted[t.name]=!0)};var h={key:t,sheet:new tn({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:i};return h.sheet.hydrate(a),h};function ir(){return ir=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ir.apply(null,arguments)}var or=function(e){var t=new WeakMap;return function(n){if(t.has(n))return t.get(n);var r=e(n);return t.set(n,r),r}};var sr=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)};var ar={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGr
2idRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function ur(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var lr=/[A-Z]|^ms/g,cr=/_EMO_([^_]+?)_([^]*?)_EMO_/g,dr=function(e){return 45===e.charCodeAt(1)},hr=function(e){return null!=e&&"boolean"!==typeof e},pr=ur(function(e){return dr(e)?e:e.replace(lr,"-$&").toLowerCase()}),fr=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(cr,function(e,t,n){return mr={name:t,styles:n,next:mr},t})}return 1===ar[e]||dr(e)||"number"!==typeof t||0===t?t:t+"px"};function gr(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var i=n;if(1===i.anim)return mr={name:i.name,styles:i.styles,next:mr},i.name;var o=n;if(void 0!==o.styles){var s=o.next;if(void 0!==s)for(;void 0!==s;)mr={name:s.name,styles:s.styles,next:mr},s=s.next;return o.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=gr(e,t,n[i])+";";else for(var o in n){var s=n[o];if("object"!==typeof s){var a=s;null!=t&&void 0!==t[a]?r+=o+"{"+t[a]+"}":hr(a)&&(r+=pr(o)+":"+fr(o,a)+";")}else if(!Array.isArray(s)||"string"!==typeof s[0]||null!=t&&void 0!==t[s[0]]){var u=gr(e,t,s);switch(o){case"animation":case"animationName":r+=pr(o)+":"+u+";";break;default:r+=o+"{"+u+"}"}}else for(var l=0;l<s.length;l++)hr(s[l])&&(r+=pr(o)+":"+fr(o,s[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var a=mr,u=n(e);return mr=a,gr(e,t,u)}}var l=n;if(null==t)return l;var c=t[l];return void 0!==c?c:l}var mr,vr=/label:\s*([^\s;{]+)\s*(;|$)/g;function yr(e,t,n){if(1===e.length&&"object"===typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";mr=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=gr(n,t,o)):i+=o[0];for(var s=1;s<e.length;s++){if(i+=gr(n,t,e[s]),r)i+=o[s]}vr.lastIndex=0;for(var a,u="";null!==(a=vr.exec(i));)u+="-"+a[1];var l=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+u;return{name:l,styles:i,next:mr}}var Dr=!!te.useInsertionEffect&&te.useInsertionEffect,_r=Dr||function(e){return e()},br=(Dr||ee.useLayoutEffect,ee.createContext("undefined"!==typeof HTMLElement?rr({key:"css"}):null)),wr=(br.Provider,function(e){return(0,ee.forwardRef)(function(t,n){var r=(0,ee.useContext)(br);return e(t,r,n)})}),Er=ee.createContext({}),Cr=or(function(e){return or(function(t){return function(e,t){return"function"===typeof t?t(e):ir({},e,t)}(e,t)})}),kr=function(e){var t=ee.useContext(Er);return e.theme!==t&&(t=Cr(t)(e.theme)),ee.createElement(Er.Provider,{value:t},e.children)};var Sr={}.hasOwnProperty,xr="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Fr=function(e,t){var n={};for(var r in t)Sr.call(t,r)&&(n[r]=t[r]);return n[xr]=e,n},Ar=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return sr(t,n,r),_r(function(){return function(e,t,n){sr(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}}(t,n,r)}),null},Tr=wr(function(e,t,n){var r=e.css;"string"===typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[xr],o=[r],s="";"string"===typeof e.className?s=function(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}(t.registered,o,e.className):null!=e.className&&(s=e.className+" ");var a=yr(o,void 0,ee.useContext(Er));s+=t.key+"-"+a.name;var u={};for(var l in e)Sr.call(e,l)&&"css"!==l&&l!==xr&&(u[l]=e[l]);return u.className=s,n&&(u.ref=n),ee.createElement(ee.Fragment,null,ee.createElement(Ar,{cache:t,serialized:a,isStringTag:"string"===typeof i}),ee.createElement(i,u))}),Ir=Tr;const Pr="#18af24",Or={boardSide1:"#fde2e4",boardSide2:"#bee1e6",seedSide1:"#4e5d5c",seedSide2:"#4e5d5c",boardOrange:"#ef8d3982",boardGrey:"#525354",seedOrange:"#ef8d39",seedGrey:"#525354",activeColor:Pr,activeGreen:Pr,sowingDirection:"#515354c0",sowingDirectionDarker:"#515354f2",pink:"#fde2e4",grey0:"#555",grey1:"#666",grey2:"#777",grey3:"#888",grey4:"#999",grey5:"#aaa",grey6:"#bbb",grey7:"#ccc",grey8:"#ddd",grey9:"#eee",grey95:"#efefef",primary:"#1976d2",primaryHover:"#1565c0",secondary:"#757575",secondaryHover:"#616161",buttonDefault:"#e0e0e0",buttonDefaultHover:"#bdbdbd",textPrimary:"#212121",textOnPrimary:"#ffffff",fontColor:"#333333"},Nr={gridUnit:4,boardWidth:600,boardHeight:284,iconSize:35,toolbarHeight:93,holeHeight:66,holeWidth:82,seedRadius:6,colors:Or,fontSize:12,button:{borderRadius:8,padding:12,textDecoration:"none",background:Or.buttonDefault,color:Or.textPrimary,border:"none",cursor:"pointer","&:hover":{background:Or.buttonDefaultHover,color:Or.textPrimary},"&:disabled":{opacity:.6,cursor:"not-allowed"}},primaryButton:{borderRadius:8,padding:12,textDecoration:"none",background:Or.primary,color:Or.textOnPrimary,border:"none",cursor:"pointer",fontWeight:"500","&:hover":{background:Or.primaryHover,color:Or.textOnPrimary},"&:disabled":{opacity:.6,cursor:"not-allowed"}},secondaryButton:{borderRadius:8,padding:12,textDecoration:"none",background:Or.secondary,color:Or.textOnPrimary,border:"none",cursor:"pointer","&:hover":{background:Or.secondaryHover,color:Or.textOnPrimary},"&:disabled":{opacity:.6,cursor:"not-allowed"}}};var Rr=n(579);function Br(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Lr="function"===typeof Symbol&&Symbol.observable||"@@observable",Mr=function(){return Math.random().toString(36).substring(7).split("").join(".")},jr={INIT:"@@redux/INIT"+Mr(),REPLACE:"@@redux/REPLACE"+Mr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Mr()}};function zr(e){if("object"!==typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Ur(e,t,n){var r;if("function"===typeof t&&"function"===typeof n||"function"===typeof n&&"function"===typeof arguments[3])throw new Error(Br(0));if("function"===typeof t&&"undefined"===typeof n&&(n=t,t=void 0),"undefined"!==typeof n){if("function"!==typeof n)throw new Error(Br(1));return n(Ur)(e,t)}if("function"!==typeof e)throw new Error(Br(2));var i=e,o=t,s=[],a=s,u=!1;function l(){a===s&&(a=s.slice())}function c(){if(u)throw new Error(Br(3));return o}function d(e){if("function"!==typeof e)throw new Error(Br(4));if(u)throw new Error(Br(5));var t=!0;return l(),a.push(e),function(){if(t){if(u)throw new Error(Br(6));t=!1,l();var n=a.indexOf(e);a.splice(n,1),s=null}}}function h(e){if(!zr(e))throw new Error(Br(7));if("undefined"===typeof e.type)throw new Error(Br(8));if(u)throw new Error(Br(9));try{u=!0,o=i(o,e)}finally{u=!1}for(var t=s=a,n=0;n<t.length;n++){(0,t[n])()}return e}return h({type:jr.INIT}),(r={dispatch:h,subscribe:d,getState:c,replaceReducer:function(e){if("function"!==typeof e)throw new Error(Br(10));i=e,h({type:jr.REPLACE})}})[Lr]=function(){var e,t=d;return(e={subscribe:function(e){if("object"!==typeof e||null===e)throw new Error(Br(11));function n(){e.next&&e.next(c())}return n(),{unsubscribe:t(n)}}})[Lr]=function(){return this},e},r}function Hr(e){return"object"===typeof e}const qr="dnd-core/INIT_COORDS",Wr="dnd-core/BEGIN_DRAG",$r="dnd-core/PUBLISH_DRAG_SOURCE",Vr="dnd-core/HOVER",Gr="dnd-core/DROP",Kr="dnd-core/END_DRAG";function Yr(e,t){return{type:qr,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const Jr={type:qr,payload:{clientOffset:null,sourceClientOffset:null}};function Qr(e){return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0};const{publishSource:r=!0,clientOffset:i,getSourceClientOffset:o}=n,s=e.getMonitor(),a=e.getRegistry();e.dispatch(Yr(i)),function(e,t,n){qt(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(e){qt(n.getSource(e),"Expected sourceIds to be registered.")})}(t,s,a);const u=function(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}(t,s);if(null==u)return void e.dispatch(Jr);let l=null;if(i){if(!o)throw new Error("getSourceClientOffset must be defined");!function(e){qt("function"===typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}(o),l=o(u)}
2e.dispatch(Yr(i,l));const c=a.getSource(u).beginDrag(s,u);if(null==c)return;!function(e){qt(Hr(e),"Item must be an object.")}(c),a.pinSource(u);const d=a.getSourceType(u);return{type:Wr,payload:{itemType:d,item:c,sourceId:u,clientOffset:i||null,sourceClientOffset:l||null,isSourcePublic:!!r}}}}function Xr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Xr(e,t,n[t])})}return e}function ei(e){return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=e.getMonitor(),r=e.getRegistry();!function(e){qt(e.isDragging(),"Cannot call drop while not dragging."),qt(!e.didDrop(),"Cannot call drop twice during one drag operation.")}(n);const i=function(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}(n);i.forEach((i,o)=>{const s=function(e,t,n,r){const i=n.getTarget(e);let o=i?i.drop(r,e):void 0;(function(e){qt("undefined"===typeof e||Hr(e),"Drop result must either be an object or undefined.")})(o),"undefined"===typeof o&&(o=0===t?{}:r.getDropResult());return o}(i,o,r,n),a={type:Gr,payload:{dropResult:Zr({},t,s)}};e.dispatch(a)})}}function ti(e){return function(){const t=e.getMonitor(),n=e.getRegistry();!function(e){qt(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);const r=t.getSourceId();if(null!=r){n.getSource(r,!0).endDrag(t,r),n.unpinSource()}return{type:Kr}}}function ni(e,t){return null===t?null===e:Array.isArray(e)?e.some(e=>e===t):e===t}function ri(e){return function(t){let{clientOffset:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e){qt(Array.isArray(e),"Expected targetIds to be an array.")}(t);const r=t.slice(0),i=e.getMonitor(),o=e.getRegistry();return function(e,t,n){for(let r=e.length-1;r>=0;r--){const i=e[r];ni(t.getTargetType(i),n)||e.splice(r,1)}}(r,o,i.getItemType()),function(e,t,n){qt(t.isDragging(),"Cannot call hover while not dragging."),qt(!t.didDrop(),"Cannot call hover after drop.");for(let r=0;r<e.length;r++){const t=e[r];qt(e.lastIndexOf(t)===r,"Expected targetIds to be unique in the passed array.");qt(n.getTarget(t),"Expected targetIds to be registered.")}}(r,i,o),function(e,t,n){e.forEach(function(e){n.getTarget(e).hover(t,e)})}(r,i,o),{type:Vr,payload:{targetIds:r,clientOffset:n||null}}}}function ii(e){return function(){if(e.getMonitor().isDragging())return{type:$r}}}class oi{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:t}=this.store;const n=function(e){return{beginDrag:Qr(e),publishDragSource:ii(e),hover:ri(e),drop:ei(e),endDrag:ti(e)}}(this);return Object.keys(n).reduce((r,i)=>{const o=n[i];var s;return r[i]=(s=o,function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];const o=s.apply(e,r);"undefined"!==typeof o&&t(o)}),r},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{const e=this.store.getState().refCount>0;this.backend&&(e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}}function si(e,t){return{x:e.x-t.x,y:e.y-t.y}}const ai=[],ui=[];ai.__IS_NONE__=!0,ui.__IS_ALL__=!0;class li{subscribeToStateChange(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{handlerIds:n}=t;qt("function"===typeof e,"listener must be a function."),qt("undefined"===typeof n||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let r=this.store.getState().stateId;return this.store.subscribe(()=>{const t=this.store.getState(),i=t.stateId;try{const o=i===r||i===r+1&&!function(e,t){if(e===ai)return!1;if(e===ui||"undefined"===typeof t)return!0;const n=(r=e,t.filter(e=>r.indexOf(e)>-1));var r;return n.length>0}(t.dirtyHandlerIds,n);o||e()}finally{r=i}})}subscribeToOffsetChange(e){qt("function"===typeof e,"listener must be a function.");let t=this.store.getState().dragOffset;return this.store.subscribe(()=>{const n=this.store.getState().dragOffset;n!==t&&(t=n,e())})}canDragSource(e){if(!e)return!1;const t=this.registry.getSource(e);return qt(t,"Expected to find a valid source. sourceId=".concat(e)),!this.isDragging()&&t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const t=this.registry.getTarget(e);if(qt(t,"Expected to find a valid target. targetId=".concat(e)),!this.isDragging()||this.didDrop())return!1;return ni(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(e){if(!e)return!1;const t=this.registry.getSource(e,!0);if(qt(t,"Expected to find a valid source. sourceId=".concat(e)),!this.isDragging()||!this.isSourcePublic())return!1;return this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}isOverTarget(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1};if(!e)return!1;const{shallow:n}=t;if(!this.isDragging())return!1;const r=this.registry.getTargetType(e),i=this.getItemType();if(i&&!ni(r,i))return!1;const o=this.getTargetIds();if(!o.length)return!1;const s=o.indexOf(e);return n?s===o.length-1:s>-1}getItemType(){return this.store.getState().dragOperation.itemType}
2getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return function(e){const{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return t&&n&&r?si(function(e,t){return{x:e.x+t.x,y:e.y+t.y}}(t,r),n):null}(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return function(e){const{clientOffset:t,initialClientOffset:n}=e;return t&&n?si(t,n):null}(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}}const ci="undefined"!==typeof globalThis?globalThis:self,di=ci.MutationObserver||ci.WebKitMutationObserver;function hi(e){return function(){const t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}const pi="function"===typeof di?function(e){let t=1;const n=new di(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}:hi;class fi{call(){try{this.task&&this.task()}catch(If){this.onError(If)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}}const gi=new class{enqueueTask(e){const{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,n=e.length-this.index;t<n;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=pi(this.flush),this.requestErrorThrow=hi(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},mi=new class{create(e){const t=this.freeTasks,n=t.length?t.pop():new fi(this.onError,e=>t[t.length]=e);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}}(gi.registerPendingError);const vi="dnd-core/ADD_SOURCE",yi="dnd-core/ADD_TARGET",Di="dnd-core/REMOVE_SOURCE",_i="dnd-core/REMOVE_TARGET";function bi(e,t){t&&Array.isArray(e)?e.forEach(e=>bi(e,!1)):qt("string"===typeof e||"symbol"===typeof e,t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var wi;!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(wi||(wi={}));let Ei=0;function Ci(e){const t=(Ei++).toString();switch(e){case wi.SOURCE:return"S".concat(t);case wi.TARGET:return"T".concat(t);default:throw new Error("Unknown Handler Role: ".concat(e))}}function ki(e){switch(e[0]){case"S":return wi.SOURCE;case"T":return wi.TARGET;default:throw new Error("Cannot parse handler ID: ".concat(e))}}function Si(e,t){const n=e.entries();let r=!1;do{const{done:e,value:[,i]}=n.next();if(i===t)return!0;r=!!e}while(!r);return!1}class xi{addSource(e,t){bi(e),function(e){qt("function"===typeof e.canDrag,"Expected canDrag to be a function."),qt("function"===typeof e.beginDrag,"Expected beginDrag to be a function."),qt("function"===typeof e.endDrag,"Expected endDrag to be a function.")}(t);const n=this.addHandler(wi.SOURCE,e,t);return this.store.dispatch(function(e){return{type:vi,payload:{sourceId:e}}}(n)),n}addTarget(e,t){bi(e,!0),function(e){qt("function"===typeof e.canDrop,"Expected canDrop to be a function."),qt("function"===typeof e.hover,"Expected hover to be a function."),qt("function"===typeof e.drop,"Expected beginDrag to be a function.")}(t);const n=this.addHandler(wi.TARGET,e,t);return this.store.dispatch(function(e){return{type:yi,payload:{targetId:e}}}(n)),n}containsHandler(e){return Si(this.dragSources,e)||Si(this.dropTargets,e)}getSource(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];qt(this.isSourceId(e),"Expected a valid source ID.");return t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return qt(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return qt(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return qt(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return ki(e)===wi.SOURCE}isTargetId(e){return ki(e)===wi.TARGET}removeSource(e){var t;qt(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:Di,payload:{sourceId:e}}}(e)),t=()=>{this.dragSources.delete(e),this.types.delete(e)},gi.enqueueTask(mi.create(t))}removeTarget(e){qt(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:_i,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const t=this.getSource(e);qt(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){qt(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,n){const r=Ci(e);return this.types.set(r,t),e===wi.SOURCE?this.dragSources.set(r,n):e===wi.TARGET&&this.dropTargets.set(r,n),r}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const Fi=(e,t)=>e===t;function Ai(){let e=arguments.length>1?arguments[1]:void 0;switch(e.type){case Vr:break;case vi:case yi:case _i:case Di:return ai;default:return ui}const{targetIds:t=[],prevTargetIds:n=[]}=e.payload,r=function(e,t){const n=new Map,r=e=>{n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);const i=[];
2return n.forEach((e,t)=>{1===e&&i.push(t)}),i}(t,n),i=r.length>0||!function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Fi;if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}(t,n);if(!i)return ai;const o=n[n.length-1],s=t[t.length-1];return o!==s&&(o&&r.push(o),s&&r.push(s)),r}function Ti(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ii={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Pi(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ii,t=arguments.length>1?arguments[1]:void 0;const{payload:n}=t;switch(t.type){case qr:case Wr:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Vr:return r=e.clientOffset,i=n.clientOffset,!r&&!i||r&&i&&r.x===i.x&&r.y===i.y?e:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Ti(e,t,n[t])})}return e}({},e,{clientOffset:n.clientOffset});case Kr:case Gr:return Ii;default:return e}var r,i}function Oi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ni(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Oi(e,t,n[t])})}return e}const Ri={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Bi(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ri,t=arguments.length>1?arguments[1]:void 0;const{payload:n}=t;switch(t.type){case Wr:return Ni({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case $r:return Ni({},e,{isSourcePublic:!0});case Vr:return Ni({},e,{targetIds:n.targetIds});case _i:return-1===e.targetIds.indexOf(n.targetId)?e:Ni({},e,{targetIds:(r=e.targetIds,i=n.targetId,r.filter(e=>e!==i))});case Gr:return Ni({},e,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Kr:return Ni({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}var r,i}function Li(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;switch((arguments.length>1?arguments[1]:void 0).type){case vi:case yi:return e+1;case Di:case _i:return e-1;default:return e}}function Mi(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)+1}function ji(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){ji(e,t,n[t])})}return e}function Ui(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:Ai(e.dirtyHandlerIds,{type:t.type,payload:zi({},t.payload,{prevTargetIds:(n=e,r="dragOperation.targetIds",i=[],r.split(".").reduce((e,t)=>
2e&&e[t]?e[t]:i||null,n))})}),dragOffset:Pi(e.dragOffset,t),refCount:Li(e.refCount,t),dragOperation:Bi(e.dragOperation,t),stateId:Mi(e.stateId)};var n,r,i}function Hi(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=function(e){const t="undefined"!==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return Ur(Ui,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}(arguments.length>3&&void 0!==arguments[3]&&arguments[3]),i=new li(r,new xi(r)),o=new oi(r,i),s=e(o,t,n);return o.receiveBackend(s),o}const qi=(0,ee.createContext)({dragDropManager:void 0});function Wi(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}let $i=0;const Vi=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var Gi=(0,ee.memo)(function(e){var{children:t}=e,n=Wi(e,["children"]);const[r,i]=function(e){if("manager"in e){return[{dragDropManager:e.manager},!1]}const t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ki(),n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const i=t;i[Vi]||(i[Vi]={dragDropManager:Hi(e,t,n,r)});return i[Vi]}(e.backend,e.context,e.options,e.debugMode),n=!e.context;return[t,n]}(n);return(0,ee.useEffect)(()=>{if(i){const e=Ki();return++$i,()=>{0===--$i&&(e[Vi]=null)}}},[]),(0,Rr.jsx)(qi.Provider,{value:r,children:t})});function Ki(){return"undefined"!==typeof globalThis?globalThis:window}var Yi=n(740),Ji=n.n(Yi),Qi=n(524),Xi=n.n(Qi);function Zi(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==e&&void 0!==e&&this.setState(e)}function eo(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!==n&&void 0!==n?n:null}.bind(this))}function to(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}Zi.__suppressDeprecationWarning=!0,eo.__suppressDeprecationWarning=!0,to.__suppressDeprecationWarning=!0;var no=function(e,t){return e.substr(0,t.length)===t},ro=function(e,t){for(var n=void 0,r=void 0,i=t.split("?")[0],o=ho(i),s=""===o[0],a=co(e),u=0,l=a.length;u<l;u++){var c=!1,d=a[u].route;if(d.default)r={route:d,params:{},uri:t};else{for(var h=ho(d.path),p={},f=Math.max(o.length,h.length),g=0;g<f;g++){var m=h[g],v=o[g];if(uo(m)){p[m.slice(1)||"*"]=o.slice(g).map(decodeURIComponent).join("/");break}if(void 0===v){c=!0;break}var y=so.exec(m);if(y&&!s){-1===fo.indexOf(y[1])||Ji()(!1);var D=decodeURIComponent(v);p[y[1]]=D}else if(m!==v){c=!0;break}}if(!c){n={route:d,params:p,uri:"/"+o.slice(0,g).join("/")};break}}}return n||r||null},io=function(e,t){if(no(e,"/"))return e;var n=e.split("?"),r=n[0],i=n[1],o=t.split("?")[0],s=ho(r),a=ho(o);if(""===s[0])return po(o,i);if(!no(s[0],".")){var u=a.concat(s).join("/");return po(("/"===o?"":"/")+u,i)}for(var l=a.concat(s),c=[],d=0,h=l.length;d<h;d++){var p=l[d];".."===p?c.pop():"."!==p&&c.push(p)}return po("/"+c.join("/"),i)},oo=function(e,t){var n=e.split("?"),r=n[0],i=n[1],o=void 0===i?"":i,s="/"+ho(r).map(function(e){var n=so.exec(e);return n?t[n[1]]:e}).join("/"),a=t.location,u=(a=void 0===a?{}:a).search,l=(void 0===u?"":u).split("?")[1]||"";return s=po(s,o,l)},so=/^:(.+)/,ao=function(e){return so.test(e)},uo=function(e){return e&&"*"===e[0]},lo=function(e,t){return{route:e,score:e.default?0:ho(e.path).reduce(function(e,t){return e+=4,!function(e){return""===e}(t)?ao(t)?e+=2:uo(t)?e-=5:e+=3:e+=1,e},0),index:t}},co=function(e){return e.map(lo).sort(function(e,t){return e.score<t.score?1:e.score>t.score?-1:e.index-t.index})},ho=function(e){return e.replace(/(^\/+|\/+$)/g,"").split("/")},po=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n=n.filter(function(e){return e&&e.length>0}),e+(n&&n.length>0?"?"+n.join("&"):"")}
2,fo=["uri","path"],go=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mo=function(e){var t=e.location,n=t.search,r=t.hash,i=t.href,o=t.origin,s=t.protocol,a=t.host,u=t.hostname,l=t.port,c=e.location.pathname;!c&&i&&vo&&(c=new URL(i).pathname);return{pathname:encodeURI(decodeURI(c)),search:n,hash:r,href:i,origin:o,protocol:s,host:a,hostname:u,port:l,state:e.history.state,key:e.history.state&&e.history.state.key||"initial"}},vo=!("undefined"===typeof window||!window.document||!window.document.createElement),yo=function(e){var t=[],n=mo(e),r=!1,i=function(){};return{get location(){return n},get transitioning(){return r},_onTransitionComplete:function(){r=!1,i()},listen:function(r){t.push(r);var i=function(){n=mo(e),r({location:n,action:"POP"})};return e.addEventListener("popstate",i),function(){e.removeEventListener("popstate",i),t=t.filter(function(e){return e!==r})}},navigate:function(o){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=s.state,u=s.replace,l=void 0!==u&&u;if("number"===typeof o)e.history.go(o);else{a=go({},a,{key:Date.now()+""});try{r||l?e.history.replaceState(a,null,o):e.history.pushState(a,null,o)}catch(y_){e.location[l?"replace":"assign"](o)}}n=mo(e),r=!0;var c=new Promise(function(e){return i=e});return t.forEach(function(e){return e({location:n,action:"PUSH"})}),c}}}(vo?window:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",t=e.indexOf("?"),n={pathname:t>-1?e.substr(0,t):e,search:t>-1?e.substr(t):""},r=0,i=[n],o=[null];return{get location(){return i[r]},addEventListener:function(e,t){},removeEventListener:function(e,t){},history:{get entries(){return i},get index(){return r},get state(){return o[r]},pushState:function(e,t,n){var s=n.split("?"),a=s[0],u=s[1],l=void 0===u?"":u;r++,i.push({pathname:a,search:l.length?"?"+l:l}),o.push(e)},replaceState:function(e,t,n){var s=n.split("?"),a=s[0],u=s[1],l=void 0===u?"":u;i[r]={pathname:a,search:l},o[r]=e},go:function(e){var t=r+e;t<0||t>o.length-1||(r=t)}}}}()),Do=yo.navigate,_o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function bo(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function wo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Eo(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function Co(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var ko=function(e,t){var n=Xi()(t);return n.displayName=e,n},So=ko("Location"),xo=function(e){var t=e.children;return ee.createElement(So.Consumer,null,function(e){return e?t(e):ee.createElement(Fo,null,t)})},Fo=function(e){function t(){var n,r;wo(this,t);for(var i=arguments.length,o=Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=r=Eo(this,e.call.apply(e,[this].concat(o))),r.state={context:r.getContext(),refs:{unlisten:null}},Eo(r,n)}return Co(t,e),t.prototype.getContext=function(){var e=this.props.history;return{navigate:e.navigate,location:e.location}},t.prototype.componentDidCatch=function(e,t){if(!Uo(e))throw e;(0,this.props.history.navigate)(e.uri,{replace:!0})},t.prototype.componentDidUpdate=function(e,t){t.context.location!==this.state.context.location&&this.props.history._onTransitionComplete()},t.prototype.componentDidMount=function(){var e=this,t=this.state.refs,n=this.props.history;n._onTransitionComplete(),t.unlisten=n.listen(function(){Promise.resolve().then(function(){requestAnimationFrame(function(){e.unmounted||e.setState(function(){return{context:e.getContext()}})})})})},t.prototype.componentWillUnmount=function(){var e=this.state.refs;this.unmounted=!0,e.unlisten()},t.prototype.render=function(){var e=this.state.context,t=this.props.children;return ee.createElement(So.Provider,{value:e},"function"===typeof t?t(e):t||null)},t}(ee.Component);Fo.defaultProps={history:yo};var Ao=ko("Base",{baseuri:"/",basepath:"/"}),To=function(e){return ee.createElement(Ao.Consumer,null,function(t){return ee.createElement(xo,null,function(n){return ee.createElement(Io,_o({},t,n,e))})})},Io=function(e){function t(){return wo(this,t),Eo(this,e.apply(this,arguments))}return Co(t,e),t.prototype.render=function(){var e=this.props,t=e.location,n=e.navigate,r=e.basepath,i=e.primary,o=e.children,s=(e.baseuri,e.component),a=void 0===s?"div":s,u=bo(e,["location","navigate","basepath","primary","children","baseuri","component"]),l=ee.Children.toArray(o).reduce(function(e,t){var n=Vo(r)(t);return e.concat(n)},[]),c=t.pathname,d=ro(l,c);if(d){var h=d.params,p=d.uri,f=d.route,g=d.route.value;r=f.default?r:f.path.replace(/\*$/,"");var m=_o({},h,{uri:p,location:t,navigate:function(e,t){return n(io(e,p),t)}}),v=ee.cloneElement(g,m,g.props.children?ee.createElement(To,{location:t,primary:i},g.props.children):void 0),y=i?Oo:a,D=i?_o({uri:p,location:t,component:a},u):u;return ee.createElement(Ao.Provider,{value:{baseuri:p,basepath:r}},ee.createElement(y,D,v))}return null},t}(ee.PureComponent);Io.defaultProps={primary:!0};var Po=ko("Focus"),Oo=function(e){var t=e.uri,n=e.location,r=e.component,i=bo(e,["uri","location","component"]);return ee.createElement(Po.Consumer,null,function(e){return ee.createElement(Bo,_o({},i,{component:r,requestFocus:e,uri:t,location:n}))})},No=!0,Ro=0,Bo=function(e){function t(){var n,r;wo(this,t);for(var i=arguments.length,o=Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=r=Eo(this,e.call.apply(e,[this].concat(o))),r.state={},r.requestFocus=function(e){!r.state.shouldFocus&&e&&e.focus()},Eo(r,n)}return Co(t,e),t.getDerivedStateFromProps=function(e,t){if(null==t.uri)return _o({shouldFocus:!0},e);var n=e.uri!==t.uri,r=t.location.pathname!==e.location.pathname&&e.location.pathname===e.uri;return _o({shouldFocus:n||r},e)},t.prototype.componentDidMount=function(){Ro++,this.focus()},t.prototype.componentWillUnmount=function(){0===--Ro&&(No=!0)},t.prototype.componentDidUpdate=function(e,t){e.location!==this.props.location&&this.state.shouldFocus&&this.focus()}
2,t.prototype.focus=function(){var e=this.props.requestFocus;e?e(this.node):No?No=!1:this.node&&(this.node.contains(document.activeElement)||this.node.focus())},t.prototype.render=function(){var e=this,t=this.props,n=(t.children,t.style),r=(t.requestFocus,t.component),i=void 0===r?"div":r,o=(t.uri,t.location,bo(t,["children","style","requestFocus","component","uri","location"]));return ee.createElement(i,_o({style:_o({outline:"none"},n),tabIndex:"-1",ref:function(t){return e.node=t}},o),ee.createElement(Po.Provider,{value:this.requestFocus},this.props.children))},t}(ee.Component);!function(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!==typeof e.getDerivedStateFromProps&&"function"!==typeof t.getSnapshotBeforeUpdate)return e;var n=null,r=null,i=null;if("function"===typeof t.componentWillMount?n="componentWillMount":"function"===typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"===typeof t.componentWillReceiveProps?r="componentWillReceiveProps":"function"===typeof t.UNSAFE_componentWillReceiveProps&&(r="UNSAFE_componentWillReceiveProps"),"function"===typeof t.componentWillUpdate?i="componentWillUpdate":"function"===typeof t.UNSAFE_componentWillUpdate&&(i="UNSAFE_componentWillUpdate"),null!==n||null!==r||null!==i){var o=e.displayName||e.name,s="function"===typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+o+" uses "+s+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==r?"\n "+r:"")+(null!==i?"\n "+i:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"===typeof e.getDerivedStateFromProps&&(t.componentWillMount=Zi,t.componentWillReceiveProps=eo),"function"===typeof t.getSnapshotBeforeUpdate){if("function"!==typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=to;var a=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;a.call(this,e,t,r)}}}(Bo);var Lo=function(){},Mo=ee.forwardRef;"undefined"===typeof Mo&&(Mo=function(e){return e});var jo=Mo(function(e,t){var n=e.innerRef,r=bo(e,["innerRef"]);return ee.createElement(Ao.Consumer,null,function(e){e.basepath;var i=e.baseuri;return ee.createElement(xo,null,function(e){var o=e.location,s=e.navigate,a=r.to,u=r.state,l=r.replace,c=r.getProps,d=void 0===c?Lo:c,h=bo(r,["to","state","replace","getProps"]),p=io(a,i),f=encodeURI(p),g=o.pathname===f,m=no(o.pathname,f);return ee.createElement("a",_o({ref:t||n,"aria-current":g?"page":void 0},h,d({isCurrent:g,isPartiallyCurrent:m,href:p,location:o}),{href:p,onClick:function(e){if(h.onClick&&h.onClick(e),Go(e)){e.preventDefault();var t=l;if("boolean"!==typeof l&&g){var n=_o({},o.state),r=(n.key,bo(n,["key"]));t=function(e,t){var n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(function(n){return t.hasOwnProperty(n)&&e[n]===t[n]})}(_o({},u),r)}s(p,{state:u,replace:t})}}}))})})});function zo(e){this.uri=e}jo.displayName="Link";var Uo=function(e){return e instanceof zo},Ho=function(e){function t(){return wo(this,t),Eo(this,e.apply(this,arguments))}return Co(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.navigate,n=e.to,r=(e.from,e.replace),i=void 0===r||r,o=e.state,s=(e.noThrow,e.baseuri),a=bo(e,["navigate","to","from","replace","state","noThrow","baseuri"]);Promise.resolve().then(function(){var e=io(n,s);t(oo(e,a),{replace:i,state:o})})},t.prototype.render=function(){var e=this.props,t=(e.navigate,e.to),n=(e.from,e.replace,e.state,e.noThrow),r=e.baseuri,i=bo(e,["navigate","to","from","replace","state","noThrow","baseuri"]),o=io(t,r);return n||function(e){throw new zo(e)}(oo(o,i)),null},t}(ee.Component),qo=function(e){return ee.createElement(Ao.Consumer,null,function(t){var n=t.baseuri;return ee.createElement(xo,null,function(t){return ee.createElement(Ho,_o({},t,{baseuri:n},e))})})},Wo=function(){var e=(0,ee.useContext)(So);if(!e)throw new Error("useLocation hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router");return e.location},$o=function(e){return e.replace(/(^\/+|\/+$)/g,"")},Vo=function e(t){return function(n){if(!n)return null;if(n.type===ee.Fragment&&n.props.children)return ee.Children.map(n.props.children,e(t));if(n.props.path||n.props.default||n.type===qo||Ji()(!1),n.type!==qo||n.props.from&&n.props.to||Ji()(!1),n.type!==qo||function(e,t){var n=function(e){return ao(e)};return ho(e).filter(n).sort().join("/")===ho(t).filter(n).sort().join("/")}(n.props.from,n.props.to)||Ji()(!1),n.props.default)return{value:n,default:!0};var r=n.type===qo?n.props.from:n.props.path,i="/"===r?t:$o(t)+"/"+$o(r);return{value:n,default:n.props.default,path:n.props.children?$o(i)+"/*":i}}},Go=function(e){return!e.defaultPrevented&&0===e.button&&!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)};const Ko="App_App__B2Ebb",Yo="landscape",Jo="portrait",Qo=ee.createContext(Yo),Xo={holeWidth:72,holeHeight:56,boardWidth:688,boardHeight:284,highlightedHoles:{0:[],1:[]}},Zo={boardProperties:Xo},es=ee.createContext(Zo),ts=[7,6,5,4,3,2,1,0],ns=1,rs=-1,is=e=>cs(e[0])+cs(e[1])<64,os=()=>Array(16).fill(2),ss=()=>{let e=Array(16).fill(0);return e[4]=6,e[5]=2,e[6]=2,e},as=(e,t)=>15===e&&0===t?1:0===e&&15===t?-1:e<t?1:-1;function us(e){return[...e].slice(0,8)}function ls(e){return[...e].slice(8,16)}function cs(e){return e.reduce((e,t)=>
2e+t)}function ds(e,t){let n=[];return is([e,t])?(e.forEach((e,r)=>{e>0&&(4!==r||4===r&&fs(r,t))&&n.push(r)}),n):(vs(e)||vs(t)||e.forEach((e,t)=>{e>1&&n.push(t)}),n)}function hs(e,t){const n=ds(e,t).map(n=>({index:n,directions:ps(n,e,t)}));return n.filter(e=>e.directions.length>0)}const ps=(e,t,n)=>{let r=[...t],i=r[e],o=[];return is([t,n])?(fs(e,n)&&r[e]>0&&(o=[1,-1]),o):i<2||i>15?[]:(r[e]=0,[ns,rs].forEach(t=>{const s=gs(e+t*i);s<8&&fs(s,n)&&r[s]>0&&o.push(t)}),o)},fs=(e,t)=>t[ts[e]]>0,gs=e=>((e,t)=>e-Math.floor(e/t)*t)(e,16),ms=e=>0===e,vs=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.every(e=>e<=1)||us(e).every(ms)},ys=e=>us(e[0]).every(ms)||us(e[1]).every(ms),Ds=e=>e<=7;function _s(e,t,n,r){let i=hs(n,r);if(i.length>0)return i.some(n=>n.index===e&&n.directions.includes(t));{let t=ds(n,r);return t.some(Ds)&&(t=t.filter(Ds)),t.some(t=>t===e)}}function bs(e,t){let n=[];const r=[e,t];if(is(r)&&ys(r)||!is(r)&&vs(e))return n;let i=hs(e,t);if(i.length>0)return i;{let n=ds(e,t),r=n.filter(Ds),i=[ns,rs];if(r.length>0){const e=1===r.length;return r.map(t=>({index:t,directions:e&&0===t?[ns]:e&&7===t?[rs]:i}))}return n.map(e=>({index:e,directions:i}))}}function ws(e,t){return[[...e],[...t]]}function Es(e,t,n,r,i){const o=r[i],s=r[ks(i)],a=[...o];if(n<1)return[];{a[e]=a[e]+1,n-=1;let r=t>0?e+1:e-1;r=gs(r);const o=0===i?ws(a,s):ws(s,a);
2return[{index:e,state:o,inHand:n,side:i,action:1}].concat(Es(r,t,n,o,i))}}function Cs(e,t,n,r,i,o){const s=i[o],a=i[ks(o)];if(vs(a))return[];if(r>100)return console.log("recursive call is taking forever... maybe mark this move for deletion"),[];if(s[e]>1){let i=s[e];const u=[...s];u[e]=0;const l=0===o?ws(u,a):ws(a,u),c=[{index:e,state:l,inHand:i,side:o,action:-i}];return e=t>0?e+1:e-1,c.concat(Ss(gs(e),t,n,i,r,l,o))}return[]}const ks=e=>0===e?1:0;function Ss(e,t,n,r,i,o,s){let a,u;if(i=i||0,u=Es(e,t,r,o,s),0===u.length)return u;const l=u[u.length-1],c=l.index,[d,h]=l.state;let[p,f]=0===s?[d,h]:[h,d];if(Ds(c)&&n&&p[c]>1){if(a=ts[c],f[a]>0){const i=[...f];r=i[a],i[a]=0;const o=0===s?ws(p,i):ws(i,p);return u.push({index:a,state:o,inHand:r,side:ks(s),action:-r}),a<=1?u.concat(Ss(7,rs,n,r,0,o,s)):a>=6?u.concat(Ss(0,ns,n,r,0,o,s)):(e=t===ns?0:7,u.concat(Ss(e,t,n,r,0,o,s)))}return u.concat(Cs(c,t,n,i+1,l.state,s))}return 1===p[c]?u:u.concat(Cs(c,t,n,i+1,l.state,s))}const xs=(e,t,n,r)=>{const i=r[n],o=r[ks(n)];let s,a,u,l=[];if(_s(e,t,i,o)){if(is(r)){return u=1,Ss(e,t,fs(e,o),u,0,r,n)}s=ps(e,i,o);const c=[...i];u=c[e],c[e]=0;const d=[[],[]];d[n]=c,d[ks(n)]=o;return l=[{index:e,state:d,inHand:u,side:n,action:-u}],a=s&&s.includes(t),e=gs(t===ns?e+1:e-1),l.concat(Ss(e,t,a,u,0,d,n))}return console.log("invalid attempt to play from index "+e+" direction "+t),l};const Fs="1",As="2",Ts="mtaji";function Is(e){let t=[];return e.forEach(e=>{let{directions:n,index:r}=e;n.forEach(e=>{t.push({index:r,direction:e})})}),t}const Ps=128;
2function Os(e,t){let{state:n,player:r,move:i,depth:o,alpha:s,beta:a}=e;const u=xs(i.index,i.direction,r,n);if(0===u.length)return r===t?-1:Ps;const l=u[u.length-1].state;if(vs(l[ks(r)]))return r===t?Ps:-1;if(vs(l[r]))return r===t?-1:Ps;if(0===o)return cs(l[r]);const c=Is(bs(l[ks(r)],l[r]));if(r===t){if(0===c.length)return Ps;for(let e=0;e<c.length;e++){const n=Os({state:[...l],player:ks(r),move:c[e],depth:o-1,alpha:s,beta:a},t);if(-1===n)return n;if(a=Math.min(a,n),s>=a)break}return a}if(0===c.length)return-1;for(let d=0;d<c.length;d++){const e=Os({state:[...l],player:ks(r),move:c[d],depth:o-1,alpha:s,beta:a},t);if(e===Ps)return e;if(s=Math.max(s,e),s>=a)break}return s}const Ns={gameType:Fs,gameStage:"mtaji",gameMode:"single",settings:{playbackSpeed:400,expertLevel:"expert",startingSide:0,showHints:!0}},Rs=ee.createContext(Ns),Bs=ee.createContext(void 0),Ls=ee.createContext(void 0),Ms=ee.createContext({dispatch:()=>{}}),js=ws(ss(),ss()),zs={moveHistory:[],currentGameState:ws(os(),os()),store:0,currentSequence:[],currentSequenceIndex:-1,thinking:!1,currentPlayer:0,gameInProgress:!1,settings:{playbackSpeed:250,expertLevel:"expert",startingSide:0,showHints:!0}},Us=(e,t)=>{switch(t.type){case"USER_CLICK_STORE":return e.gamePlay&&e.gamePlay.storeClicked?c(c({},e),{},{gamePlay:void 0}):c(c({},e),{},{gamePlay:{side:t.side,storeClicked:!0,index:-1}});case"USER_CLICK_HOLE":const n=e.gamePlay;if(!n)return c(c({},e),{},{gamePlay:{index:t.index,side:t.side}});const r=t.side,i=e.currentGameState,o=n.index,s=as(o,t.index);if(o===t.index&&n.side===t.side||!_s(o,s,i[r],i[ks(r)]))return c(c({},e),{},{gamePlay:void 0});const a={type:"USER_PLAY",index:o,side:n.side,direction:s};return Us(e,a);case"UPDATE_SETTINGS":return c(c({},e),{},{settings:t.settings});case"SEQUENCE_STEP_FORWARD":const u=e.currentSequence.length>0?e.currentSequence.length-1:0,l=Math.min(u,e.currentSequenceIndex+1);return c(c({},e),{},{currentSequenceIndex:l,currentGameState:e.currentSequence[l].state});case"USER_PLAY":{const{index:n,direction:r,side:i}=t,o=xs(n,r,i,e.currentGameState),s=o.length>0?o.length-1:0,[a,u]=o[s].state,l=(64-cs(a)-cs(u))/2;return c(c({},e),{},{store:l,gamePlay:void 0,moveHistory:[...e.moveHistory,{action:t,sequence:o}],currentGameState:o.length>0?o[0].state:e.currentGameState,currentSequence:o,currentSequenceIndex:0,thinking:!1,currentPlayer:t.side})}case"CHANGE_PLAYER":return c(c({},e),{},{currentSequenceIndex:-1,currentSequence:[],currentPlayer:t.side});case"THINKING":return c(c({},e),{},{thinking:!0});case"RESET_GAME":return c(c({},zs),{},{settings:c({},e.settings),currentPlayer:t.startingSide,gameInProgress:!0,moveHistory:[{action:t,sequence:[]}]});case"GAME_OVER":return c(c({},e),{},{gameInProgress:!1,currentPlayer:0});case"SYNC_MULTIPLAYER_STATE":return c(c({},e),{},{currentGameState:t.gameState,currentPlayer:t.currentPlayer,currentSequenceIndex:-1,currentSequence:[]});default:return e}},Hs=ee.createContext(zs);function qs(){const e=Ie();return!e||!1!==e.showHints}const Ws=!1,$s=!1,Vs="${JSCORE_VERSION}",Gs=function(e,t){if(!e)throw Ks(t)},Ks=function(e){return new Error("Firebase Database ("+Vs+") INTERNAL ASSERT FAILED: "+e)},Ys=function(e){const t=[];let n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):55296===(64512&i)&&r+1<e.length&&56320===(64512&e.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t},Js={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"===typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i<e.length;i+=3){const t=e[i],o=i+1<e.length,s=o?e[i+1]:0,a=i+2<e.length,u=a?e[i+2]:0,l=t>>2,c=(3&t)<<4|s>>4;let d=(15&s)<<2|u>>6,h=63&u;a||(h=64,o||(d=64)),r.push(n[l],n[c],n[d],n[h])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(Ys(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){const t=[];let n=0,r=0;for(;n<e.length;){const i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){const o=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){const o=((7&i)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(o>>10)),t[r++]=String.fromCharCode(56320+(1023&o))}else{const o=e[n++],s=e[n++];
2t[r++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i<e.length;){const t=n[e.charAt(i++)],o=i<e.length?n[e.charAt(i)]:0;++i;const s=i<e.length?n[e.charAt(i)]:64;++i;const a=i<e.length?n[e.charAt(i)]:64;if(++i,null==t||null==o||null==s||null==a)throw new Qs;const u=t<<2|o>>4;if(r.push(u),64!==s){const e=o<<4&240|s>>2;if(r.push(e),64!==a){const e=s<<6&192|a;r.push(e)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class Qs extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const Xs=function(e){const t=Ys(e);return Js.encodeByteArray(t,!0)},Zs=function(e){return Xs(e).replace(/\./g,"")},ea=function(e){try{return Js.decodeString(e,!0)}catch(y_){console.error("base64Decode failed: ",y_)}return null};function ta(e){return na(void 0,e)}function na(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:return new Date(t.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t}for(const n in t)t.hasOwnProperty(n)&&ra(n)&&(e[n]=na(e[n],t[n]));return e}function ra(e){return"__proto__"!==e}const ia=()=>function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof globalThis)return globalThis;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__,oa=()=>{try{return ia()||(()=>{if("undefined"===typeof process)return;const e={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!1,REACT_APP_FIREBASE_API_KEY:"AIzaSyALEGvK3ycTxgC8s7NwtatmIFPEwspoWQU"}.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0})()||(()=>{if("undefined"===typeof document)return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(y_){return}const t=e&&ea(e[1]);return t&&JSON.parse(t)})()}catch(y_){return void console.info("Unable to get __FIREBASE_DEFAULTS__ due to: ".concat(y_))}},sa=e=>{var t;return null===(t=oa())||void 0===t||null===(t=t.emulatorHosts)||void 0===t?void 0:t[e]},aa=()=>{var e;return null===(e=oa())||void 0===e?void 0:e.config},ua=e=>{var t;return null===(t=oa())||void 0===t?void 0:t["_".concat(e)]};class la{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}wrapCallback(e){return(t,n)=>{t?this.reject(t):this.resolve(n),"function"===typeof e&&(this.promise.catch(()=>{}),1===e.length?e(t):e(t,n))}}}function ca(e){try{return(e.startsWith("http://")||e.startsWith("https://")?new URL(e).hostname:e).endsWith(".cloudworkstations.dev")}catch(t){return!1}}async function da(e){return(await fetch(e,{credentials:"include"})).ok}const ha={};let pa=!1;function fa(e,t){if("undefined"===typeof window||"undefined"===typeof document||!ca(window.location.host)||ha[e]===t||ha[e]||pa)return;function n(e){return"__firebase__banner__".concat(e)}ha[e]=t;const r="__firebase__banner",i=function(){const e={prod:[],emulator:[]};for(const t of Object.keys(ha))ha[t]?e.emulator.push(t):e.prod.push(t);return e}().prod.length>0;function o(){const e=document.createElement("span");return e.style.cursor="pointer",e.style.marginLeft="16px",e.style.fontSize="24px",e.innerHTML=" ×",e.onclick=()=>{pa=!0,function(){const e=document.getElementById(r);e&&e.remove()}()},e}function s(){const e=function(e){let t=document.getElementById(e),n=!1;return t||(t=document.createElement("div"),t.setAttribute("id",e),n=!0),{created:n,element:t}}(r),t=n("text"),s=document.getElementById(t)||document.createElement("span"),a=n("learnmore"),u=document.getElementById(a)||document.createElement("a"),l=n("preprendIcon"),
2c=document.getElementById(l)||document.createElementNS("http://www.w3.org/2000/svg","svg");if(e.created){const t=e.element;!function(e){e.style.display="flex",e.style.background="#7faaf0",e.style.position="fixed",e.style.bottom="5px",e.style.left="5px",e.style.padding=".5em",e.style.borderRadius="5px",e.style.alignItems="center"}(t),function(e,t){e.setAttribute("id",t),e.innerText="Learn more",e.href="https://firebase.google.com/docs/studio/preview-apps#preview-backend",e.setAttribute("target","__blank"),e.style.paddingLeft="5px",e.style.textDecoration="underline"}(u,a);const n=o();!function(e,t){e.setAttribute("width","24"),e.setAttribute("id",t),e.setAttribute("height","24"),e.setAttribute("viewBox","0 0 24 24"),e.setAttribute("fill","none"),e.style.marginLeft="-6px"}(c,l),t.append(c,s,u,n),document.body.appendChild(t)}i?(s.innerText="Preview backend disconnected.",c.innerHTML='<g clip-path="url(#clip0_6013_33858)">\n<path d="M4.8 17.6L12 5.6L19.2 17.6H4.8ZM6.91667 16.4H17.0833L12 7.93333L6.91667 16.4ZM12 15.6C12.1667 15.6 12.3056 15.5444 12.4167 15.4333C12.5389 15.3111 12.6 15.1667 12.6 15C12.6 14.8333 12.5389 14.6944 12.4167 14.5833C12.3056 14.4611 12.1667 14.4 12 14.4C11.8333 14.4 11.6889 14.4611 11.5667 14.5833C11.4556 14.6944 11.4 14.8333 11.4 15C11.4 15.1667 11.4556 15.3111 11.5667 15.4333C11.6889 15.5444 11.8333 15.6 12 15.6ZM11.4 13.6H12.6V10.4H11.4V13.6Z" fill="#212121"/>\n</g>\n<defs>\n<clipPath id="clip0_6013_33858">\n<rect width="24" height="24" fill="white"/>\n</clipPath>\n</defs>'):(c.innerHTML='<g clip-path="url(#clip0_6083_34804)">\n<path d="M11.4 15.2H12.6V11.2H11.4V15.2ZM12 10C12.1667 10 12.3056 9.94444 12.4167 9.83333C12.5389 9.71111 12.6 9.56667 12.6 9.4C12.6 9.23333 12.5389 9.09444 12.4167 8.98333C12.3056 8.86111 12.1667 8.8 12 8.8C11.8333 8.8 11.6889 8.86111 11.5667 8.98333C11.4556 9.09444 11.4 9.23333 11.4 9.4C11.4 9.56667 11.4556 9.71111 11.5667 9.83333C11.6889 9.94444 11.8333 10 12 10ZM12 18.4C11.1222 18.4 10.2944 18.2333 9.51667 17.9C8.73889 17.5667 8.05556 17.1111 7.46667 16.5333C6.88889 15.9444 6.43333 15.2611 6.1 14.4833C5.76667 13.7056 5.6 12.8778 5.6 12C5.6 11.1111 5.76667 10.2833 6.1 9.51667C6.43333 8.73889 6.88889 8.06111 7.46667 7.48333C8.05556 6.89444 8.73889 6.43333 9.51667 6.1C10.2944 5.76667 11.1222 5.6 12 5.6C12.8889 5.6 13.7167 5.76667 14.4833 6.1C15.2611 6.43333 15.9389 6.89444 16.5167 7.48333C17.1056 8.06111 17.5667 8.73889 17.9 9.51667C18.2333 10.2833 18.4 11.1111 18.4 12C18.4 12.8778 18.2333 13.7056 17.9 14.4833C17.5667 15.2611 17.1056 15.9444 16.5167 16.5333C15.9389 17.1111 15.2611 17.5667 14.4833 17.9C13.7167 18.2333 12.8889 18.4 12 18.4ZM12 17.2C13.4444 17.2 14.6722 16.6944 15.6833 15.6833C16.6944 14.6722 17.2 13.4444 17.2 12C17.2 10.5556 16.6944 9.32778 15.6833 8.31667C14.6722 7.30555 13.4444 6.8 12 6.8C10.5556 6.8 9.32778 7.30555 8.31667 8.31667C7.30556 9.32778 6.8 10.5556 6.8 12C6.8 13.4444 7.30556 14.6722 8.31667 15.6833C9.32778 16.6944 10.5556 17.2 12 17.2Z" fill="#212121"/>\n</g>\n<defs>\n<clipPath id="clip0_6083_34804">\n<rect width="24" height="24" fill="white"/>\n</clipPath>\n</defs>',s.innerText="Preview backend running in this workspace."),s.setAttribute("id",t)}"loading"===document.readyState?window.addEventListener("DOMContentLoaded",s):s()}function ga(){return"undefined"!==typeof navigator&&"string"===typeof navigator.userAgent?navigator.userAgent:""}function ma(){return"undefined"!==typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(ga())}function va(){const e="object"===typeof chrome?chrome.runtime:"object"===typeof browser?browser.runtime:void 0;return"object"===typeof e&&void 0!==e.id}function ya(){return"object"===typeof navigator&&"ReactNative"===navigator.product}function Da(){return!0===Ws||!0===$s}function _a(){try{return"object"===typeof indexedDB}catch(y_){return!1}}function ba(){return new Promise((e,t)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(If){t(If)}})}
2class wa extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,wa.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Ea.prototype.create)}}class Ea{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e){const t=(arguments.length<=1?void 0:arguments[1])||{},n="".concat(this.service,"/").concat(e),r=this.errors[e],i=r?function(e,t){return e.replace(Ca,(e,n)=>{const r=t[n];return null!=r?String(r):"<".concat(n,"?>")})}(r,t):"Error",o="".concat(this.serviceName,": ").concat(i," (").concat(n,").");return new wa(n,o,t)}}const Ca=/\{\$([^}]+)}/g;function ka(e){return JSON.parse(e)}function Sa(e){return JSON.stringify(e)}const xa=function(e){let t={},n={},r={},i="";try{const o=e.split(".");t=ka(ea(o[0])||""),n=ka(ea(o[1])||""),i=o[2],r=n.d||{},delete n.d}catch(y_){}return{header:t,claims:n,data:r,signature:i}};function Fa(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Aa(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}function Ta(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function Ia(e,t,n){const r={};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=t.call(n,e[i],i,e));return r}function Pa(e,t){if(e===t)return!0;const n=Object.keys(e),r=Object.keys(t);for(const i of n){if(!r.includes(i))return!1;const n=e[i],o=t[i];if(Oa(n)&&Oa(o)){if(!Pa(n,o))return!1}else if(n!==o)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function Oa(e){return null!==e&&"object"===typeof e}function Na(e){const t=[];for(const[n,r]of Object.entries(e))Array.isArray(r)?r.forEach(e=>{t.push(encodeURIComponent(n)+"="+encodeURIComponent(e))}):t.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return t.length?"&"+t.join("&"):""}function Ra(e){const t={};return e.replace(/^\?/,"").split("&").forEach(e=>{if(e){const[n,r]=e.split("=");
2t[decodeURIComponent(n)]=decodeURIComponent(r)}}),t}function Ba(e){const t=e.indexOf("?");if(!t)return"";const n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)}class La{constructor(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(let e=1;e<this.blockSize;++e)this.pad_[e]=0;this.reset()}reset(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0}compress_(e,t){t||(t=0);const n=this.W_;if("string"===typeof e)for(let c=0;c<16;c++)n[c]=e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|e.charCodeAt(t+3),t+=4;else for(let c=0;c<16;c++)n[c]=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],t+=4;for(let c=16;c<80;c++){const e=n[c-3]^n[c-8]^n[c-14]^n[c-16];n[c]=4294967295&(e<<1|e>>>31)}let r,i,o=this.chain_[0],s=this.chain_[1],a=this.chain_[2],u=this.chain_[3],l=this.chain_[4];for(let c=0;c<80;c++){c<40?c<20?(r=u^s&(a^u),i=1518500249):(r=s^a^u,i=1859775393):c<60?(r=s&a|u&(s|a),i=2400959708):(r=s^a^u,i=3395469782);const e=(o<<5|o>>>27)+r+l+i+n[c]&4294967295;l=u,u=a,a=4294967295&(s<<30|s>>>2),s=o,o=e}this.chain_[0]=this.chain_[0]+o&4294967295,this.chain_[1]=this.chain_[1]+s&4294967295,this.chain_[2]=this.chain_[2]+a&4294967295,this.chain_[3]=this.chain_[3]+u&4294967295,this.chain_[4]=this.chain_[4]+l&4294967295}update(e,t){if(null==e)return;void 0===t&&(t=e.length);const n=t-this.blockSize;let r=0;const i=this.buf_;let o=this.inbuf_;for(;r<t;){if(0===o)for(;r<=n;)this.compress_(e,r),r+=this.blockSize;if("string"===typeof e){for(;r<t;)if(i[o]=e.charCodeAt(r),++o,++r,o===this.blockSize){this.compress_(i),o=0;break}}else for(;r<t;)if(i[o]=e[r],++o,++r,o===this.blockSize){this.compress_(i),o=0;break}}this.inbuf_=o,this.total_+=t}digest(){const e=[];let t=8*this.total_;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(let r=this.blockSize-1;r>=56;r--)this.buf_[r]=255&t,t/=256;this.compress_(this.buf_);let n=0;for(let r=0;r<5;r++)for(let t=24;t>=0;t-=8)e[n]=this.chain_[r]>>t&255,++n;return e}}class Ma{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(()=>{e(this)}).catch(e=>{this.error(e)})}next(e){this.forEachObserver(t=>{t.next(e)})}error(e){this.forEachObserver(t=>{t.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,t,n){let r;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");r=function(e,t){if("object"!==typeof e||null===e)return!1;for(const n of t)if(n in e&&"function"===typeof e[n])return!0;return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:n},void 0===r.next&&(r.next=ja),void 0===r.error&&(r.error=ja),void 0===r.complete&&(r.complete=ja);const i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch(y_){}}),this.observers.push(r),i}unsubscribeOne(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let t=0;t<this.observers.length;t++)this.sendOne(t,e)}sendOne(e,t){this.task.then(()=>{if(void 0!==this.observers&&void 0!==this.observers[e])try{t(this.observers[e])}catch(y_){"undefined"!==typeof console&&console.error&&console.error(y_)}})}close(e){this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function ja(){}function za(e,t){return"".concat(e," failed: ").concat(t," argument ")}const Ua=function(e){let t=0;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);r<128?t++:r<2048?t+=2:r>=55296&&r<=56319?(t+=4,n++):t+=3}return t};function Ha(e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;const n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3)*Math.pow(t,e),r=Math.round(.5*n*(Math.random()-.5)*2);return Math.min(144e5,n+r)}function qa(e){return e&&e._delegate?e._delegate:e}class Wa{constructor(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}const $a="[DEFAULT]";class Va{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const e=new la;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{const n=this.getOrInitializeService({instanceIdentifier:t});n&&e.resolve(n)}catch(y_){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;const n=this.normalizeInstanceIdentifier(null===e||void 0===e?void 0:e.identifier),r=null!==(t=null===e||void 0===e?void 0:e.optional)&&void 0!==t&&t;if(!this.isInitialized(n)&&!this.shouldAutoInitialize()){if(r)return null;throw Error("Service ".concat(this.name," is not available"))}try{return this.getOrInitializeService({instanceIdentifier:n})}catch(y_){if(r)return null;throw y_}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error("Mismatching Component ".concat(e.name," for Provider ").concat(this.name,"."));if(this.component)throw Error("Component for ".concat(this.name," has already been provided"));if(this.component=e,this.shouldAutoInitialize()){if(function(e){return"EAGER"===e.instantiationMode}(e))try{this.getOrInitializeService({instanceIdentifier:$a})}catch(y_){}for(const[e,t]of this.instancesDeferred.entries()){const n=this.normalizeInstanceIdentifier(e);try{const e=this.getOrInitializeService({instanceIdentifier:n});t.resolve(e)}catch(y_){}}}}clearInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$a;this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter(e=>"INTERNAL"in e).map(e=>e.INTERNAL.delete()),...e.filter(e=>"_delete"in e).map(e=>e._delete())])}isComponentSet(){return null!=this.component}isInitialized(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$a;return this.instances.has(e)}getOptions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$a;return this.instancesOptions.get(e)||{}}initialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{options:t={}}=e,n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n))throw Error("".concat(this.name,"(").concat(n,") has already been initialized"));if(!this.isComponentSet())throw Error("Component ".concat(this.name," has not been registered yet"));const r=this.getOrInitializeService({instanceIdentifier:n,options:t});for(const[i,o]of this.instancesDeferred.entries()){n===this.normalizeInstanceIdentifier(i)&&o.resolve(r)}return r}onInit(e,t){var n;const r=this.normalizeInstanceIdentifier(t),i=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;i.add(e),this.onInitCallbacks.set(r,i);const o=this.instances.get(r);return o&&e(o,r),()=>{i.delete(e)}}invokeOnInitCallbacks(e,t){const n=this.onInitCallbacks.get(t);if(n)for(const i of n)try{i(e,t)}catch(r){}}getOrInitializeService(e){let{instanceIdentifier:t,options:n={}}=e,r=this.instances.get(t);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:Ga(t),options:n}),this.instances.set(t,r),this.instancesOptions.set(t,n),this.invokeOnInitCallbacks(r,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,r)}catch(i){}return r||null}normalizeInstanceIdentifier(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$a;return this.component?this.component.multipleInstances?e:$a:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}function Ga(e){return e===$a?void 0:e}class Ka{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet())throw new Error("Component ".concat(e.name," has already been registered with ").concat(this.name));t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const t=new Va(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}const Ya=[];var Ja;!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.E
2RROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(Ja||(Ja={}));const Qa={debug:Ja.DEBUG,verbose:Ja.VERBOSE,info:Ja.INFO,warn:Ja.WARN,error:Ja.ERROR,silent:Ja.SILENT},Xa=Ja.INFO,Za={[Ja.DEBUG]:"log",[Ja.VERBOSE]:"log",[Ja.INFO]:"info",[Ja.WARN]:"warn",[Ja.ERROR]:"error"},eu=function(e,t){if(t<e.logLevel)return;const n=(new Date).toISOString(),r=Za[t];if(!r)throw new Error("Attempted to log a message with an invalid logType (value: ".concat(t,")"));for(var i=arguments.length,o=new Array(i>2?i-2:0),s=2;s<i;s++)o[s-2]=arguments[s];console[r]("[".concat(n,"] ").concat(e.name,":"),...o)};class tu{constructor(e){this.name=e,this._logLevel=Xa,this._logHandler=eu,this._userLogHandler=null,Ya.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in Ja))throw new TypeError('Invalid value "'.concat(e,'" assigned to `logLevel`'));this._logLevel=e}setLogLevel(e){this._logLevel="string"===typeof e?Qa[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!==typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler(this,Ja.DEBUG,...t),this._logHandler(this,Ja.DEBUG,...t)}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler(this,Ja.VERBOSE,...t),this._logHandler(this,Ja.VERBOSE,...t)}info(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler(this,Ja.INFO,...t),this._logHandler(this,Ja.INFO,...t)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler(this,Ja.WARN,...t),this._logHandler(this,Ja.WARN,...t)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler(this,Ja.ERROR,...t),this._logHandler(this,Ja.ERROR,...t)}}let nu,ru;const iu=new WeakMap,ou=new WeakMap,su=new WeakMap,au=new WeakMap,uu=new WeakMap;let lu={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return ou.get(e);if("objectStoreNames"===t)return e.objectStoreNames||su.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return hu(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function cu(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(ru||(ru=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(pu(this),n),hu(iu.get(this))}:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return hu(e.apply(pu(this),n))}:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];const o=e.call(pu(this),t,...r);return su.set(o,t.sort?t.sort():[t]),hu(o)}}function du(e){return"function"===typeof e?cu(e):(e instanceof IDBTransaction&&function(e){if(ou.has(e))return;const t=new Promise((t,n)=>{const r=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",o),e.removeEventListener("abort",o)},i=()=>{t(),r()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",o),e.addEventListener("abort",o)});ou.set(e,t)}(e),t=e,(nu||(nu=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some(e=>t instanceof e)?new Proxy(e,lu):e);var t}function hu(e){if(e instanceof IDBRequest)return function(e){const t=new Promise((t,n)=>{const r=()=>{e.removeEventListener("success",i),e.removeEventListener("error",o)},i=()=>{t(hu(e.result)),r()},o=()=>{n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",o)});return t.then(t=>{t instanceof IDBCursor&&iu.set(t,e)}).catch(()=>{}),uu.set(t,e),t}(e);if(au.has(e))return au.get(e);const t=du(e);return t!==e&&(au.set(e,t),uu.set(t,e)),t}const pu=e=>uu.get(e);function fu(e,t){let{blocked:n,upgrade:r,blocking:i,terminated:o}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=indexedDB.open(e,t),a=hu(s);return r&&s.addEventListener("upgradeneeded",e=>{r(hu(s.result),e.oldVersion,e.newVersion,hu(s.transaction),e)}),n&&s.addEventListener("blocked",e=>n(e.oldVersion,e.newVersion,e)),a.then(e=>{o&&e.addEventListener("close",()=>o()),i&&e.addEventListener("versionchange",e=>i(e.oldVersion,e.newVersion,e))}).catch(()=>{}),a}const gu=["get","getKey","getAll","getAllKeys","count"],mu=["put","add","delete","clear"],vu=new Map;function yu(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!==typeof t)return;if(vu.get(t))return vu.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=mu.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!i&&!gu.includes(n))return;const o=async function(e){const t=this.transaction(e,i?"readwrite":"readonly");let o=t.store;for(var s=arguments.length,a=new Array(s>1?s-1:0),u=1;u<s;u++)a[u-1]=arguments[u];
2return r&&(o=o.index(a.shift())),(await Promise.all([o[n](...a),i&&t.done]))[0]};return vu.set(t,o),o}lu=(e=>c(c({},e),{},{get:(t,n,r)=>yu(t,n)||e.get(t,n,r),has:(t,n)=>!!yu(t,n)||e.has(t,n)}))(lu);class Du{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(e=>{if(function(e){const t=e.getComponent();return"VERSION"===(null===t||void 0===t?void 0:t.type)}(e)){const t=e.getImmediate();return"".concat(t.library,"/").concat(t.version)}return null}).filter(e=>e).join(" ")}}const _u="@firebase/app",bu="0.14.4",wu=new tu("@firebase/app"),Eu="@firebase/app-compat",Cu="@firebase/analytics-compat",ku="@firebase/analytics",Su="@firebase/app-check-compat",xu="@firebase/app-check",Fu="@firebase/auth",Au="@firebase/auth-compat",Tu="@firebase/database",Iu="@firebase/data-connect",Pu="@firebase/database-compat",Ou="@firebase/functions",Nu="@firebase/functions-compat",Ru="@firebase/installations",Bu="@firebase/installations-compat",Lu="@firebase/messaging",Mu="@firebase/messaging-compat",ju="@firebase/performance",zu="@firebase/performance-compat",Uu="@firebase/remote-config",Hu="@firebase/remote-config-compat",qu="@firebase/storage",Wu="@firebase/storage-compat",$u="@firebase/firestore",Vu="@firebase/ai",Gu="@firebase/firestore-compat",Ku="firebase",Yu="[DEFAULT]",Ju={[_u]:"fire-core",[Eu]:"fire-core-compat",[ku]:"fire-analytics",[Cu]:"fire-analytics-compat",[xu]:"fire-app-check",[Su]:"fire-app-check-compat",[Fu]:"fire-auth",[Au]:"fire-auth-compat",[Tu]:"fire-rtdb",[Iu]:"fire-data-connect",[Pu]:"fire-rtdb-compat",[Ou]:"fire-fn",[Nu]:"fire-fn-compat",[Ru]:"fire-iid",[Bu]:"fire-iid-compat",[Lu]:"fire-fcm",[Mu]:"fire-fcm-compat",[ju]:"fire-perf",[zu]:"fire-perf-compat",[Uu]:"fire-rc",[Hu]:"fire-rc-compat",[qu]:"fire-gcs",[Wu]:"fire-g
2cs-compat",[$u]:"fire-fst",[Gu]:"fire-fst-compat",[Vu]:"fire-vertex","fire-js":"fire-js",[Ku]:"fire-js-all"},Qu=new Map,Xu=new Map,Zu=new Map;function el(e,t){try{e.container.addComponent(t)}catch(y_){wu.debug("Component ".concat(t.name," failed to register with FirebaseApp ").concat(e.name),y_)}}function tl(e){const t=e.name;if(Zu.has(t))return wu.debug("There were multiple attempts to register component ".concat(t,".")),!1;Zu.set(t,e);for(const n of Qu.values())el(n,e);for(const n of Xu.values())el(n,e);return!0}function nl(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}function rl(e){return null!==e&&void 0!==e&&void 0!==e.settings}const il=new Ea("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invali
2d-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."});class ol{constructor(e,t,n){this._isDeleted=!1,this._options=c({},e),this._config=c({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new Wa("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw il.create("app-deleted",{appName:this._name})}}const sl="12.4.0";function al(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e;if("object"!==typeof t){t={name:t}}const r=c({name:Yu,automaticDataCollectionEnabled:!0},t),i=r.name;if("string"!==typeof i||!i)throw il.create("bad-app-name",{appName:String(i)});if(n||(n=aa()),!n)throw il.create("no-options");const o=Qu.get(i);if(o){if(Pa(n,o.options)&&Pa(r,o.config))return o;throw il.create("duplicate-app",{appName:i})}const s=new Ka(i);for(const u of Zu.values())s.addComponent(u);const a=new ol(n,r,s);return Qu.set(i,a),a}function ul(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Yu;const t=Qu.get(e);if(!t&&e===Yu&&aa())return al();if(!t)throw il.create("no-app",{appName:e});return t}function ll(e,t,n){var r;let i=null!==(r=Ju[e])&&void 0!==r?r:e;n&&(i+="-".concat(n));const o=i.match(/\s|\//),s=t.match(/\s|\//);if(o||s){const e=['Unable to register library "'.concat(i,'" with version "').concat(t,'":')];return o&&e.push('library name "'.concat(i,'" contains illegal characters (whitespace or "/")')),o&&s&&e.push("and"),s&&e.push('version name "'.concat(t,'" contains illegal characters (whitespace or "/")')),void wu.warn(e.join(" "))}tl(new Wa("".concat(i,"-version"),()=>({library:i,version:t}),"VERSION"))}const cl="firebase-heartbeat-store";let dl=null;function hl(){return dl||(dl=fu("firebase-heartbeat-database",1,{upgrade:(e,t)=>{if(0===t)try{e.createObjectStore(cl)}catch(y_){console.warn(y_)}}}).catch(e=>{throw il.create("idb-open",{originalErrorMessage:e.message})})),dl}async function pl(e,t){try{const n=(await hl()).transaction(cl,"readwrite"),r=n.objectStore(cl);await r.put(t,fl(e)),await n.done}catch(y_){if(y_ instanceof wa)wu.warn(y_.message);else{const t=il.create("idb-set",{originalErrorMessage:null===y_||void 0===y_?void 0:y_.message});wu.warn(t.message)}}}function fl(e){return"".concat(e.name,"!").concat(e.options.appId)}class gl{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new vl(t),this._heartbeatsCachePromise=this._storage.read().then(e=>(this._heartbeatsCache=e,e))}async triggerHeartbeat(){try{var e;const n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),r=ml();var t;if(null==(null===(e=this._heartbeatsCache)||void 0===e?void 0:e.heartbeats))if(this._heartbeatsCache=await this._heartbeatsCachePromise,null==(null===(t=this._heartbeatsCache)||void 0===t?void 0:t.heartbeats))return;if(this._heartbeatsCache.lastSentHeartbeatDate===r||this._heartbeatsCache.heartbeats.some(e=>e.date===r))return;if(this._heartbeatsCache.heartbeats.push({date:r,agent:n}),this._heartbeatsCache.heartbeats.length>30){const e=function(e){if(0===e.length)return-1;let t=0,n=e[0].date;for(let r=1;r<e.length;r++)e[r].date<n&&(n=e[r].date,t=r);return t}(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(e,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(y_){wu.warn(y_)}}async getHeartbeatsHeader(){try{var e;if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,null==(null===(e=this._heartbeatsCache)||void 0===e?void 0:e.heartbeats)||0===this._heartbeatsCache.heartbeats.length)return"";const t=ml(),{heartbeatsToSend:n,unsentEntries:r}=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1024;const n=[];let r=e.slice();for(const i of e){const e=n.find(e=>e.agent===i.agent);if(e){if(e.dates.push(i.date),yl(n)>t){e.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),yl(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}(this._heartbeatsCache.heartbeats),i=Zs(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=t,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}catch(y_){return wu.warn(y_),""}}}function ml(){return(new Date).toISOString().substring(0,10)}class vl{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!_a()&&ba().then(()=>!0).catch(()=>!1)}async read(){if(await this._canUseIndexedDBPromise){const e=await async function(e){try{const t=(await hl()).transaction(cl),n=await t.objectStore(cl).get(fl(e));return await t.done,n}catch(y_){if(y_ instanceof wa)wu.warn(y_.message);else{const t=il.create("idb-get",{originalErrorMessage:null===y_||void 0===y_?void 0:y_.message});wu.warn(t.message)}}}(this.app);return null!==e&&void 0!==e&&e.heartbeats?e:{heartbeats:[]}}return{heartbeats:[]}}async overwrite(e){if(await this._canUseIndexedDBPromise){var t;const n=await this.read();return pl(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){if(await this._canUseIndexedDBPromise){var t;const n=await this.read();return pl(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:[...n.heartbeats,...e.heartbeats]})}}}function yl(e){return Zs(JSON.stringify({version:2,heartbeats:e})).length}var Dl;Dl="",tl(new Wa("platform-logger",e=>new Du(e),"PRIVATE")),tl(new Wa("heartbeat",e=>new gl(e),"PRIVATE")),ll(_u,bu,Dl),ll(_u,bu,"esm2020"),ll("fire-js","");const _l=["providerId"],bl=["uid","auth","stsTokenManager"],wl=["providerId","signInMethod"];function El(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}const Cl=El,kl=new Ea("auth","Firebase",{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}),Sl=new tu("@firebase/auth");function xl(e){if(Sl.logLevel<=Ja.ERROR){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];Sl.error("Auth (".concat(sl,"): ").concat(e),...n)}}function Fl(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Ol(e,...n)}function Al(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Ol(e,...n)}function Tl(e,t,n){const r=c(c({},Cl()),{},{[t]:n});
2return new Ea("auth","Firebase",r).create(t,{appName:e.name})}function Il(e){return Tl(e,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function Pl(e,t,n){if(!(t instanceof n))throw n.name!==t.constructor.name&&Fl(e,"argument-error"),Tl(e,"argument-error","Type of ".concat(t.constructor.name," does not match expected instance.")+"Did you pass a reference from a different Auth SDK?")}function Ol(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if("string"!==typeof e){const t=n[0],r=[...n.slice(1)];return r[0]&&(r[0].appName=e.name),e._errorFactory.create(t,...r)}return kl.create(e,...n)}function Nl(e,t){if(!e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];throw Ol(t,...r)}}function Rl(e){const t="INTERNAL ASSERTION FAILED: "+e;throw xl(t),new Error(t)}function Bl(e,t){e||Rl(t)}function Ll(){var e;return"undefined"!==typeof self&&(null===(e=self.location)||void 0===e?void 0:e.href)||""}function Ml(){return"http:"===jl()||"https:"===jl()}function jl(){var e;return"undefined"!==typeof self&&(null===(e=self.location)||void 0===e?void 0:e.protocol)||null}class zl{constructor(e,t){this.shortDelay=e,this.longDelay=t,Bl(t>e,"Short delay should be less than long delay!"),this.isMobile=ma()||ya()}get(){return"undefined"!==typeof navigator&&navigator&&"onLine"in navigator&&"boolean"===typeof navigator.onLine&&(Ml()||va()||"connection"in navigator)&&!navigator.onLine?Math.min(5e3,this.shortDelay):this.isMobile?this.longDelay:this.shortDelay}}function Ul(e,t){Bl(e.emulator,"Emulator should always be set here");const{url:n}=e.emulator;return t?"".concat(n).concat(t.startsWith("/")?t.slice(1):t):n}class Hl{static initialize(e,t,n){this.fetchImpl=e,t&&(this.headersImpl=t),n&&(this.responseImpl=n)}static fetch(){return this.fetchImpl?this.fetchImpl:"undefined"!==typeof self&&"fetch"in self?self.fetch:"undefined"!==typeof globalThis&&globalThis.fetch?globalThis.fetch:"undefined"!==typeof fetch?fetch:void Rl("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){return this.headersImpl?this.headersImpl:"undefined"!==typeof self&&"Headers"in self?self.Headers:"undefined"!==typeof globalThis&&globalThis.Headers?globalThis.Headers:"undefined"!==typeof Headers?Headers:void Rl("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){return this.responseImpl?this.responseImpl:"undefined"!==typeof self&&"Response"in self?self.Response:"undefined"!==typeof globalThis&&globalThis.Response?globalThis.Response:"undefined"!==typeof Response?Response:void Rl("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}const ql={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-rec
2aptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"},Wl=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],$l=new zl(3e4,6e4);function Vl(e,t){return e.tenantId&&!t.tenantId?c(c({},t),{},{tenantId:e.tenantId}):t}async function Gl(e,t,n,r){return Kl(e,arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},async()=>{let i={},o={};r&&("GET"===t?o=r:i={body:JSON.stringify(r)});const s=Na(c({key:e.config.apiKey},o)).slice(1),a=await e._getAdditionalHeaders();a["Content-Type"]="application/json",e.languageCode&&(a["X-Firebase-Locale"]=e.languageCode);const u=c({method:t,headers:a},i);return"undefined"!==typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||(u.referrerPolicy="no-referrer"),e.emulatorConfig&&ca(e.emulatorConfig.host)&&(u.credentials="include"),Hl.fetch()(await Jl(e,e.config.apiHost,n,s),u)})}async function Kl(e,t,n){e._canInitEmulator=!1;const r=c(c({},ql),t);try{const t=new Xl(e),i=await Promise.race([n(),t.promise]);t.clearNetworkTimeout();const o=await i.json();if("needConfirmation"in o)throw Zl(e,"account-exists-with-different-credential",o);if(i.ok&&!("errorMessage"in o))return o;{const t=i.ok?o.errorMessage:o.error.message,[n,s]=t.split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===n)throw Zl(e,"credential-already-in-use",o);if("EMAIL_EXISTS"===n)throw Zl(e,"email-already-in-use",o);if("USER_DISABLED"===n)throw Zl(e,"user-disabled",o);const a=r[n]||n.toLowerCase().replace(/[_\s]+/g,"-");if(s)throw Tl(e,a,s);Fl(e,a)}}catch(y_){if(y_ instanceof wa)throw y_;Fl(e,"network-request-failed",{message:String(y_)})}}async function Yl(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const o=await Gl(e,t,n,r,i);return"mfaPendingCredential"in o&&Fl(e,"multi-factor-auth-required",{_serverResponse:o}),o}async function Jl(e,t,n,r){const i="".concat(t).concat(n,"?").concat(r),o=e,s=o.config.emulator?Ul(e.config,i):"".concat(e.config.apiScheme,"://").concat(i);if(Wl.includes(n)&&(await o._persistenceManagerAvailable,"COOKIE"===o._getPersistenceType())){return o._getPersistence()._getFinalTarget(s).toString()}return s}function Ql(e){switch(e){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}class Xl{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((e,t)=>{this.timer=setTimeout(()=>t(Al(this.auth,"network-request-failed")),$l.get())})}}function Zl(e,t,n){const r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const i=Al(e,t,r);return i.customData._tokenResponse=n,i}function ec(e){return void 0!==e&&void 0!==e.enterprise}class tc{constructor(e){if(this.siteKey="",this.recaptchaEnforcementState=[],void 0===e.recaptchaKey)throw new Error("recaptchaKey undefined");this.siteKey=e.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=e.recaptchaEnforcementState}getProviderEnforcementState(e){if(!this.recaptchaEnforcementState||0===this.recaptchaEnforcementState.length)return null;for(const t of this.recaptchaEnforcementState)if(t.provider&&t.provider===e)return Ql(t.enforcementState);return null}isProviderEnabled(e){return"ENFORCE"===this.getProviderEnforcementState(e)||"AUDIT"===this.getProviderEnforcementState(e)}isAnyProviderEnabled(){return this.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")||this.isProviderEnabled("PHONE_PROVIDER")}}async function nc(e,t){return Gl(e,"GET","/v2/recaptchaConfig",Vl(e,t))}async function rc(e,t){return Gl(e,"POST","/v1/accounts:lookup",t)}function ic(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(y_){}}function oc(e){return 1e3*Number(e)}function sc(e){const[t,n,r]=e.split(".");if(void 0===t||void 0===n||void 0===r)return xl("JWT malformed, contained fewer than 3 sections"),null;try{const e=ea(n);return e?JSON.parse(e):(xl("Failed to decode base64 JWT payload"),null)}catch(y_){return xl("Caught error parsing JWT payload as JSON",null===y_||void 0===y_?void 0:y_.toString()),null}}function ac(e){const t=sc(e);return Nl(t,"internal-error"),Nl("undefined"!==typeof t.exp,"internal-error"),Nl("undefined"!==typeof t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}async function uc(e,t){if(arguments.length>2&&void 0!==arguments[2]&&arguments[2])return t;try{return await t}
2catch(y_){throw y_ instanceof wa&&function(e){let{code:t}=e;return t==="auth/".concat("user-disabled")||t==="auth/".concat("user-token-expired")}(y_)&&e.auth.currentUser===e&&await e.auth.signOut(),y_}}class lc{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}getInterval(e){if(e){const e=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),e}{var t;this.errorBackoff=3e4;const e=(null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t:0)-Date.now()-3e5;return Math.max(0,e)}}schedule(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.isRunning)return;const t=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},t)}async iteration(){try{await this.user.getIdToken(!0)}catch(y_){return void((null===y_||void 0===y_?void 0:y_.code)==="auth/".concat("network-request-failed")&&this.schedule(!0))}this.schedule()}}class cc{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=ic(this.lastLoginAt),this.creationTime=ic(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}async function dc(e){var t;const n=e.auth,r=await e.getIdToken(),i=await uc(e,rc(n,{idToken:r}));Nl(null===i||void 0===i?void 0:i.users.length,n,"internal-error");const o=i.users[0];e._notifyReloadListener(o);const s=null!==(t=o.providerUserInfo)&&void 0!==t&&t.length?hc(o.providerUserInfo):[],a=function(e,t){const n=e.filter(e=>!t.some(t=>t.providerId===e.providerId));return[...n,...t]}(e.providerData,s),u=e.isAnonymous,l=!(e.email&&o.passwordHash)&&!(null!==a&&void 0!==a&&a.length),c=!!u&&l,d={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:a,metadata:new cc(o.createdAt,o.lastLoginAt),isAnonymous:c};Object.assign(e,d)}function hc(e){return e.map(e=>{let{providerId:t}=e,n=be(e,_l);return{providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}})}class pc{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){Nl(e.idToken,"internal-error"),Nl("undefined"!==typeof e.idToken,"internal-error"),Nl("undefined"!==typeof e.refreshToken,"internal-error");const t="expiresIn"in e&&"undefined"!==typeof e.expiresIn?Number(e.expiresIn):ac(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}updateFromIdToken(e){Nl(0!==e.length,"internal-error");const t=ac(e);this.updateTokensAndExpiration(e,null,t)}async getToken(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]||!this.accessToken||this.isExpired?(Nl(this.refreshToken,e,"user-token-expired"),this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null):this.accessToken}clearRefreshToken(){this.refreshToken=null}async refresh(e,t){const{accessToken:n,refreshToken:r,expiresIn:i}=await async function(e,t){const n=await Kl(e,{},async()=>{const n=Na({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:r,apiKey:i}=e.config,o=await Jl(e,r,"/v1/token","key=".concat(i)),s=await e._getAdditionalHeaders();s["Content-Type"]="application/x-www-form-urlencoded";const a={method:"POST",headers:s,body:n};return e.emulatorConfig&&ca(e.emulatorConfig.host)&&(a.credentials="include"),Hl.fetch()(o,a)});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}(e,t);this.updateTokensAndExpiration(n,r,Number(i))}updateTokensAndExpiration(e,t,n){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*n}static fromJSON(e,t){const{refreshToken:n,accessToken:r,expirationTime:i}=t,o=new pc;return n&&(Nl("string"===typeof n,"internal-error",{appName:e}),o.refreshToken=n),r&&(Nl("string"===typeof r,"internal-error",{appName:e}),o.accessToken=r),i&&(Nl("number"===typeof i,"internal-error",{appName:e}),o.expirationTime=i),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new pc,this.toJSON())}_performRefresh(){return Rl("not implemented")}}function fc(e,t){Nl("string"===typeof e||"undefined"===typeof e,"internal-error",{appName:t})}class gc{constructor(e){let{uid:t,auth:n,stsTokenManager:r}=e,i=be(e,bl);this.providerId="firebase",this.proactiveRefresh=new lc(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=n,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=i.displayName||null,this.email=i.email||null,this.emailVerified=i.emailVerified||!1,this.phoneNumber=i.phoneNumber||null,this.photoURL=i.photoURL||null,this.isAnonymous=i.isAnonymous||!1,this.tenantId=i.tenantId||null,this.providerData=i.providerData?[...i.providerData]:[],this.metadata=new cc(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(e){const t=await uc(this,this.stsTokenManager.getToken(this.auth,e));return Nl(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return async function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=qa(e),r=await n.getIdToken(t),i=sc(r);Nl(i&&i.exp&&i.auth_time&&i.iat,n.auth,"internal-error");const o="object"===typeof i.firebase?i.firebase:void 0,s=null===o||void 0===o?void 0:o.sign_in_provider;return{claims:i,token:r,authTime:ic(oc(i.auth_time)),issuedAtTime:ic(oc(i.iat)),expirationTime:ic(oc(i.exp
2)),signInProvider:s||null,signInSecondFactor:(null===o||void 0===o?void 0:o.sign_in_second_factor)||null}}(this,e)}reload(){return async function(e){const t=qa(e);await dc(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}(this)}_assign(e){this!==e&&(Nl(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(e=>c({},e)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){const t=new gc(c(c({},this),{},{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return t.metadata._copy(this.metadata),t}_onReload(e){Nl(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),n=!0),t&&await dc(this),await this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(rl(this.auth.app))return Promise.reject(Il(this.auth));const e=await this.getIdToken();return await uc(this,async function(e,t){return Gl(e,"POST","/v1/accounts:delete",t)}(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return c(c({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>c({},e)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{},{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,t){var n,r,i,o,s,a,u,l;const d=null!==(n=t.displayName)&&void 0!==n?n:void 0,h=null!==(r=t.email)&&void 0!==r?r:void 0,p=null!==(i=t.phoneNumber)&&void 0!==i?i:void 0,f=null!==(o=t.photoURL)&&void 0!==o?o:void 0,g=null!==(s=t.tenantId)&&void 0!==s?s:void 0,m=null!==(a=t._redirectEventId)&&void 0!==a?a:void 0,v=null!==(u=t.createdAt)&&void 0!==u?u:void 0,y=null!==(l=t.lastLoginAt)&&void 0!==l?l:void 0,{uid:D,emailVerified:_,isAnonymous:b,providerData:w,stsTokenManager:E}=t;Nl(D&&E,e,"internal-error");const C=pc.fromJSON(this.name,E);Nl("string"===typeof D,e,"internal-error"),fc(d,e.name),fc(h,e.name),Nl("boolean"===typeof _,e,"internal-error"),Nl("boolean"===typeof b,e,"internal-error"),fc(p,e.name),fc(f,e.name),fc(g,e.name),fc(m,e.name),fc(v,e.name),fc(y,e.name);const k=new gc({uid:D,auth:e,email:h,emailVerified:_,displayName:d,isAnonymous:b,photoURL:f,phoneNumber:p,tenantId:g,stsTokenManager:C,createdAt:v,lastLoginAt:y});return w&&Array.isArray(w)&&(k.providerData=w.map(e=>c({},e))),m&&(k._redirectEventId=m),k}static async _fromIdTokenResponse(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=new pc;r.updateFromServerResponse(t);const i=new gc({uid:t.localId,auth:e,stsTokenManager:r,isAnonymous:n});return await dc(i),i}static async _fromGetAccountInfoResponse(e,t,n){const r=t.users[0];Nl(void 0!==r.localId,"internal-error");const i=void 0!==r.providerUserInfo?hc(r.providerUserInfo):[],o=!(r.email&&r.passwordHash)&&!(null!==i&&void 0!==i&&i.length),s=new pc;s.updateFromIdToken(n);const a=new gc({uid:r.localId,auth:e,stsTokenManager:s,isAnonymous:o}),u={uid:r.localId,displayName:r.displayName||null,photoURL:r.photoUrl||null,email:r.email||null,emailVerified:r.emailVerified||!1,phoneNumber:r.phoneNumber||null,tenantId:r.tenantId||null,providerData:i,metadata:new cc(r.createdAt,r.lastLoginAt),isAnonymous:!(r.email&&r.passwordHash)&&!(null!==i&&void 0!==i&&i.length)};return Object.assign(a,u),a}}const mc=new Map;function vc(e){Bl(e instanceof Function,"Expected a class definition");let t=mc.get(e);return t?(Bl(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,m
2c.set(e,t),t)}class yc{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){const t=this.storage[e];return void 0===t?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}}yc.type="NONE";const Dc=yc;function _c(e,t,n){return"firebase".concat(":",e,":").concat(t,":").concat(n)}class bc{constructor(e,t,n){this.persistence=e,this.auth=t,this.userKey=n;const{config:r,name:i}=this.auth;this.fullUserKey=_c(this.userKey,r.apiKey,i),this.fullPersistenceKey=_c("persistence",r.apiKey,i),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){const e=await this.persistence._get(this.fullUserKey);if(!e)return null;if("string"===typeof e){const t=await rc(this.auth,{idToken:e}).catch(()=>{});return t?gc._fromGetAccountInfoResponse(this.auth,t,e):null}return gc._fromJSON(this.auth,e)}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;const t=await this.getCurrentUser();return await this.removeCurrentUser(),this.persistence=e,t?this.setCurrentUser(t):void 0}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"authUser";if(!t.length)return new bc(vc(Dc),e,n);const r=(await Promise.all(t.map(async e=>{if(await e._isAvailable())return e}))).filter(e=>e);let i=r[0]||vc(Dc);const o=_c(n,e.config.apiKey,e.name);let s=null;for(const l of t)try{const t=await l._get(o);if(t){let n;if("string"===typeof t){const r=await rc(e,{idToken:t}).catch(()=>{});if(!r)break;n=await gc._fromGetAccountInfoResponse(e,r,t)}else n=gc._fromJSON(e,t);l!==i&&(s=n),i=l;break}}catch(u){}const a=r.filter(e=>e._shouldAllowMigration);return i._shouldAllowMigration&&a.length?(i=a[0],s&&await i._set(o,s.toJSON()),await Promise.all(t.map(async e=>{if(e!==i)try{await e._remove(o)}catch(t){}})),new bc(i,e,n)):new bc(i,e,n)}}function wc(e){const t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(Sc(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(Ec(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(Fc(t))return"Blackberry";if(Ac(t))return"Webos";if(Cc(t))return"Safari";if((t.includes("chrome/")||kc(t))&&!t.includes("edge/"))return"Chrome";if(xc(t))return"Android";{const t=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,n=e.match(t);if(2===(null===n||void 0===n?void 0:n.length))return n[1]}return"Other"}function Ec(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ga();return/firefox\//i.test(e)}function Cc(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:ga()).toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function kc(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ga();return/crios\//i.test(e)}function Sc(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ga();return/iemobile/i.test(e)}function xc(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ga();return/android/i.test(e)}function Fc(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ga();return/blackberry/i.test(e)}function Ac(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ga();return/webos/i.test(e)}function Tc(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ga();return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function Ic(){return function(){const e=ga();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}()&&10===document.documentMode}function Pc(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ga();return Tc(e)||xc(e)||Ac(e)||Fc(e)||/windows phone/i.test(e)||Sc(e)}function Oc(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];switch(e){case"Browser":t=wc(ga());break;case"Worker":t="".concat(wc(ga()),"-").concat(e);break;default:t=e}const r=n.length?n.join(","):"FirebaseCore-web";return"".concat(t,"/","JsCore","/").concat(sl,"/").concat(r)}class Nc{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){const n=t=>new Promise((n,r)=>{try{n(e(t))}catch(y_){r(y_)}});n.onAbort=t,this.queue.push(n);const r=this.queue.length-1;return()=>{this.queue[r]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;const t=[];try{for(const n of this.queue)await n(e),n.onAbort&&t.push(n.onAbort)}catch(y_){t.reverse();for(const n of t)try{n()}catch(O_){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null===y_||void 0===y_?void 0:y_.message})}}}class Rc{constructor(e){var t,n,r,i;const o=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=null!==(t=o.minPasswordLength)&&void 0!==t?t:6,o.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=o.maxPasswordLength),void 0!==o.containsLowercaseCharacter&&(this.customStrengthOptions.containsLowercaseLetter=o.containsLowercaseCharacter),void 0!==o.containsUppercaseCharacter&&(this.customStrengthOptions.containsUppercaseLetter=o.containsUppercaseCharacter),void 0!==o.containsNumericCharacter&&(this.customStrengthOptions.containsNumericCharacter=o.containsNumericCharacter),void 0!==o.containsNonAlphanumericCharacter&&(this.customStrengthOptions.containsNonAlphanumericCharacter=o.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,"ENFORCEMENT_STATE_UNSPECIFIED"===this.enforcementState&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=null!==(n=null===(r=e.allowedNonAlphanumericCharacters)||void 0===r?void 0:r.join(""))&&void 0!==n?n:"",this.forceUpgradeOnSignin=null!==(i=e.forceUpgradeOnSignin)&&void 0!==i&&i,this.schemaVersion=e.schemaVersion}validatePassword(e){var t,n,r,i,o,s;const a={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,a),this.validatePasswordCharacterOptions(e,a),a.isValid&&
2(a.isValid=null===(t=a.meetsMinPasswordLength)||void 0===t||t),a.isValid&&(a.isValid=null===(n=a.meetsMaxPasswordLength)||void 0===n||n),a.isValid&&(a.isValid=null===(r=a.containsLowercaseLetter)||void 0===r||r),a.isValid&&(a.isValid=null===(i=a.containsUppercaseLetter)||void 0===i||i),a.isValid&&(a.isValid=null===(o=a.containsNumericCharacter)||void 0===o||o),a.isValid&&(a.isValid=null===(s=a.containsNonAlphanumericCharacter)||void 0===s||s),a}validatePasswordLengthOptions(e,t){const n=this.customStrengthOptions.minPasswordLength,r=this.customStrengthOptions.maxPasswordLength;n&&(t.meetsMinPasswordLength=e.length>=n),r&&(t.meetsMaxPasswordLength=e.length<=r)}validatePasswordCharacterOptions(e,t){let n;this.updatePasswordCharacterOptionsStatuses(t,!1,!1,!1,!1);for(let r=0;r<e.length;r++)n=e.charAt(r),this.updatePasswordCharacterOptionsStatuses(t,n>="a"&&n<="z",n>="A"&&n<="Z",n>="0"&&n<="9",this.allowedNonAlphanumericCharacters.includes(n))}updatePasswordCharacterOptionsStatuses(e,t,n,r,i){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=t)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=n)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=r)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=i))}}class Bc{constructor(e,t,n,r){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=n,this.config=r,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Mc(this),this.idTokenSubscription=new Mc(this),this.beforeStateQueue=new Nc(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=kl,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this._resolvePersistenceManagerAvailable=void 0,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=r.sdkClientVersion,this._persistenceManagerAvailable=new Promise(e=>this._resolvePersistenceManagerAvailable=e)}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=vc(t)),this._initializationPromise=this.queue(async()=>{var n,r,i;if(!this._deleted&&(this.persistenceManager=await bc.create(this,e),null===(n=this._resolvePersistenceManagerAvailable)||void 0===n||n.call(this),!this._deleted)){if(null!==(r=this._popupRedirectResolver)&&void 0!==r&&r._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch(y_){}await this.initializeCurrentUser(t),this.lastNotifiedUid=(null===(i=this.currentUser)||void 0===i?void 0:i.uid)||null,this._deleted||(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const e=await this.assertedPersistence.getCurrentUser();return this.currentUser||e?this.currentUser&&e&&this.currentUser.uid===e.uid?(this._currentUser._assign(e),void await this.currentUser.getIdToken()):void await this._updateCurrentUser(e,!0):void 0}async initializeCurrentUserFromIdToken(e){try{const t=await rc(this,{idToken:e}),n=await gc._fromGetAccountInfoResponse(this,t,e);await this.directlySetCurrentUser(n)}catch(t){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",t),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(e){if(rl(this.app)){const e=this.app.settings.authIdToken;return e?new Promise(t=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(e).then(t,t))}):this.directlySetCurrentUser(null)}const t=await this.assertedPersistence.getCurrentUser();let n=t,r=!1;if(e&&this.config.authDomain){var i,o;await this.getOrInitRedirectPersistenceManager();const t=null===(i=this.redirectUser)||void 0===i?void 0:i._redirectEventId,s=null===(o=n)||void 0===o?void 0:o._redirectEventId,a=await this.tryRedirectSignIn(e);t&&t!==s||null===a||void 0===a||!a.user||(n=a.user,r=!0)}if(!n)return this.directlySetCurrentUser(null);
2if(!n._redirectEventId){if(r)try{await this.beforeStateQueue.runMiddleware(n)}catch(y_){n=t,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(y_))}return n?this.reloadAndSetCurrentUserOrClear(n):this.directlySetCurrentUser(null)}return Nl(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===n._redirectEventId?this.directlySetCurrentUser(n):this.reloadAndSetCurrentUserOrClear(n)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch(y_){await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await dc(e)}catch(y_){if((null===y_||void 0===y_?void 0:y_.code)!=="auth/".concat("network-request-failed"))return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=function(){if("undefined"===typeof navigator)return null;const e=navigator;return e.languages&&e.languages[0]||e.language||null}()}async _delete(){this._deleted=!0}async updateCurrentUser(e){if(rl(this.app))return Promise.reject(Il(this));const t=e?qa(e):null;return t&&Nl(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this._deleted)return e&&Nl(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),t||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return rl(this.app)?Promise.reject(Il(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(e){return rl(this.app)?Promise.reject(Il(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(vc(e))})}_getRecaptchaConfig(){return null==this.tenantId?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();const t=this._getPasswordPolicyInternal();return t.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):t.validatePassword(e)}_getPasswordPolicyInternal(){return null===this.tenantId?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const e=await async function(e){return Gl(e,"GET","/v2/passwordPolicy",Vl(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}))}(this),t=new Rc(e);null===this.tenantId?this._projectPasswordPolicy=t:this._tenantPasswordPolicies[this.tenantId]=t}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap(e){this._errorFactory=new Ea("auth","Firebase",e())}onAuthStateChanged(e,t,n){return this.registerStateListener(this.authStateSubscription,e,t,n)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,n){return this.registerStateListener(this.idTokenSubscription,e,t,n)}authStateReady(){return new Promise((e,t)=>{if(this.currentUser)e();else{const n=this.onAuthStateChanged(()=>{n(),e()},t)}})}async revokeAccessToken(e){if(this.currentUser){const t={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:await this.currentUser.getIdToken()};null!=this.tenantId&&(t.tenantId=this.tenantId),await async function(e,t){return Gl(e,"POST","/v2/accounts:revokeToken",Vl(e,t))}(this,t)}}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:null===(e=this._currentUser)||void 0===e?void 0:e.toJSON()}}async _setRedirectUser(e,t){const n=await this.getOrInitRedirectPersistenceManager(t);return null===e?n.removeCurrentUser():n.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){const t=e&&vc(e)||this._popupRedirectResolver;Nl(t,this,"argument-error"),this.redirectPersistenceManager=await bc.create(this,[vc(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var t,n;return this._isInitialized&&await this.queue(async()=>{}),(null===(t=this._currentUser)||void 0===t?void 0:t._redirectEventId)===e?this._currentUser:(null===(n=this.redirectUser)||void 0===n?void 0:n._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(e))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return"".concat(this.config.authDomain,":").concat(this.config.apiKey,":").concat(this.name)}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,t;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const n=null!==(e=null===(t=this.currentUser)||void 0===t?void 0:t.uid)&&void 0!==e?e:null;this.lastNotifiedUid!==n&&(this.lastNotifiedUid=n,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,n,r){if(this._deleted)return()=>{};const i="function"===typeof t?t:t.next.bind(t);let o=!1;const s=this._isInitialized?Promise.resolve():this._initializationPromise;if(Nl(s,this,"internal-error"),s.then(()=>{o||i(this.currentUser)}),"function"===typeof t){const i=e.addObserver(t,n,r);return()=>{o=!0,i()}}{const n=e.addObserver(t);return()=>{o=!0,n()}}}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return Nl(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){e&&!this.frameworks.includes(e)&&(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=Oc(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var e;const t={"X-Client-Version":this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);const n=await(null===(e=this.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getHeartbeatsHeader());n&&(t["X-Firebase-Client"]=n);const r=await this._getAppCheckToken();return r&&(t["X-Firebase-AppCheck"]=r),t}async _getAppCheckToken(){var e;if(rl(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;const t=await(null===(e=this.appCheckServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getToken());return null!==t&&void 0!==t&&t.error&&function(e){if(Sl.logLevel<=Ja.WARN){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];Sl.warn("Auth (".concat(sl,"): ").concat(e),...n)}}("Error while retrieving App Check token: ".concat(t.error)),null===t||void 0===t?void 0:t.token}}function Lc(e){return qa(e)}class Mc{constructor(e){this.auth=e,this.observer=null,this.addObserver=function(e,t){const n=new Ma(e,t);return n.subscribe.bind(n)}(e=>this.observer=e)}get next(){return Nl(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}let jc={async loadJS(){throw new Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function zc(e){return jc.loadJS(e)}function Uc(e){return"__".concat(e).concat(Math.floor(1e6*Math.random()))}class Hc{constructor(){this.enterprise=new qc}ready(e){e()}execute(e,t){return Promise.resolve("token")}render(e,t){return""}}class qc{ready(e){e()}execute(e,t){return Promise.resolve("token")}render(e,t){return""}}const Wc="NO_RECAPTCHA";class $c{constructor(e){this.type="recaptcha-enterprise",this.auth=Lc(e)}async verify(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"verify",t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];function n(t,n,r){const i=window.grecaptcha;ec(i)?i.enterprise.ready(()=>{i.enterprise.execute(t,{action:e}).then(e=>{n(e)}).catch(()=>{n(Wc)})}):r(Error("No reCAPTCHA enterprise script loaded."))}if(this.auth.settings.appVerificationDisabledForTesting){return(new Hc).execute("siteKey",{action:"verify"})}return new Promise((e,r)=>{(async function(e){if(!t){if(null==e.tenantId&&null!=e._agentRecaptchaConfig)return e._agentRecaptchaConfig.siteKey;if(null!=e.tenantId&&void 0!==e._tenantRecaptchaConfigs[e.tenantId])return e._tenantRecaptchaConfigs[e.tenantId].siteKey}return new Promise(async(t,n)=>
2{nc(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(r=>{if(void 0!==r.recaptchaKey){const n=new tc(r);return null==e.tenantId?e._agentRecaptchaConfig=n:e._tenantRecaptchaConfigs[e.tenantId]=n,t(n.siteKey)}n(new Error("recaptcha Enterprise site key undefined"))}).catch(e=>{n(e)})})})(this.auth).then(i=>{if(!t&&ec(window.grecaptcha))n(i,e,r);else{if("undefined"===typeof window)return void r(new Error("RecaptchaVerifier is only supported in browser"));let t=jc.recaptchaEnterpriseScript;0!==t.length&&(t+=i),zc(t).then(()=>{n(i,e,r)}).catch(e=>{r(e)})}}).catch(e=>{r(e)})})}}async function Vc(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const o=new $c(e);let s;if(i)s=Wc;else try{s=await o.verify(n)}catch(If){s=await o.verify(n,!0)}const a=c({},t);if("mfaSmsEnrollment"===n||"mfaSmsSignIn"===n){if("phoneEnrollmentInfo"in a){const e=a.phoneEnrollmentInfo.phoneNumber,t=a.phoneEnrollmentInfo.recaptchaToken;Object.assign(a,{phoneEnrollmentInfo:{phoneNumber:e,recaptchaToken:t,captchaResponse:s,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}else if("phoneSignInInfo"in a){const e=a.phoneSignInInfo.recaptchaToken;Object.assign(a,{phoneSignInInfo:{recaptchaToken:e,captchaResponse:s,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}return a}return r?Object.assign(a,{captchaResp:s}):Object.assign(a,{captchaResponse:s}),Object.assign(a,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(a,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),a}async function Gc(e,t,n,r,i){if("EMAIL_PASSWORD_PROVIDER"===i){var o;if(null!==(o=e._getRecaptchaConfig())&&void 0!==o&&o.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")){const i=await Vc(e,t,n,"getOobCode"===n);return r(e,i)}return r(e,t).catch(async i=>{if(i.code==="auth/".concat("missing-recaptcha-token")){console.log("".concat(n," is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow."));const i=await Vc(e,t,n,"getOobCode"===n);return r(e,i)}return Promise.reject(i)})}if("PHONE_PROVIDER"===i){var s;if(null!==(s=e._getRecaptchaConfig())&&void 0!==s&&s.isProviderEnabled("PHONE_PROVIDER")){const i=await Vc(e,t,n);return r(e,i).catch(async i=>{var o;if("AUDIT"===(null===(o=e._getRecaptchaConfig())||void 0===o?void 0:o.getProviderEnforcementState("PHONE_PROVIDER"))&&(i.code==="auth/".concat("missing-recaptcha-token")||i.code==="auth/".concat("invalid-app-credential"))){console.log("Failed to verify with reCAPTCHA Enterprise. Automatically triggering the reCAPTCHA v2 flow to complete the ".concat(n," flow."));const i=await Vc(e,t,n,!1,!0);return r(e,i)}return Promise.reject(i)})}{const i=await Vc(e,t,n,!1,!0);return r(e,i)}}return Promise.reject(i+" provider is not supported.")}async function Kc(e){const t=Lc(e),n=await nc(t,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}),r=new tc(n);if(null==t.tenantId?t._agentRecaptchaConfig=r:t._tenantRecaptchaConfigs[t.tenantId]=r,r.isAnyProviderEnabled()){new $c(t).verify()}}function Yc(e,t,n){const r=Lc(e);Nl(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");const i=!(null===n||void 0===n||!n.disableWarnings),o=Jc(t),{host:s,port:a}=function(e){const t=Jc(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};const r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){const e=i[1];return{host:e,port:Qc(r.substr(e.length+1))}}{const[e,t]=r.split(":");return{host:e,port:Qc(t)}}}(t),u=null===a?"":":".concat(a),l={url:"".concat(o,"//").concat(s).concat(u,"/")},c=Object.freeze({host:s,port:a,protocol:o.replace(":",""),options:Object.freeze({disableWarnings:i})});if(!r._canInitEmulator)return Nl(r.config.emulator&&r.emulatorConfig,r,"emulator-config-failed"),void Nl(Pa(l,r.config.emulator)&&Pa(c,r.emulatorConfig),r,"emulator-config-failed");r.config.emulator=l,r.emulatorConfig=c,r.settings.appVerificationDisabledForTesting=!0,ca(s)?(da("".concat(o,"//").concat(s).concat(u)),fa("Auth",!0)):i||function(){function e(){const e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}"undefined"!==typeof console&&"function"===typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials.");"undefined"!==typeof window&&"undefined"!==typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}()}
2function Jc(e){const t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function Qc(e){if(!e)return null;const t=Number(e);return isNaN(t)?null:t}class Xc{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return Rl("not implemented")}_getIdTokenResponse(e){return Rl("not implemented")}_linkToIdToken(e,t){return Rl("not implemented")}_getReauthenticationResolver(e){return Rl("not implemented")}}async function Zc(e,t){return Gl(e,"POST","/v1/accounts:signUp",t)}async function ed(e,t){return Yl(e,"POST","/v1/accounts:signInWithPassword",Vl(e,t))}class td extends Xc{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;super("password",n),this._email=e,this._password=t,this._tenantId=r}static _fromEmailAndPassword(e,t){return new td(e,t,"password")}static _fromEmailAndCode(e,t){return new td(e,t,"emailLink",arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){const t="string"===typeof e?JSON.parse(e):e;if(null!==t&&void 0!==t&&t.email&&null!==t&&void 0!==t&&t.password){if("password"===t.signInMethod)return this._fromEmailAndPassword(t.email,t.password);if("emailLink"===t.signInMethod)return this._fromEmailAndCode(t.email,t.password,t.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":return Gc(e,{returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signInWithPassword",ed,"EMAIL_PASSWORD_PROVIDER");case"emailLink":return async function(e,t){return Yl(e,"POST","/v1/accounts:signInWithEmailLink",Vl(e,t))}(e,{email:this._email,oobCode:this._password});default:Fl(e,"internal-error")}}async _linkToIdToken(e,t){switch(this.signInMethod){case"password":return Gc(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",Zc,"EMAIL_PASSWORD_PROVIDER");case"emailLink":return async function(e,t){return Yl(e,"POST","/v1/accounts:signInWithEmailLink",Vl(e,t))}(e,{idToken:t,email:this._email,oobCode:this._password});default:Fl(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}async function nd(e,t){return Yl(e,"POST","/v1/accounts:signInWithIdp",Vl(e,t))}class rd extends Xc{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const t=new rd(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(t.idToken=e.idToken),e.accessToken&&(t.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(t.nonce=e.nonce),e.pendingToken&&(t.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(t.accessToken=e.oauthToken,t.secret=e.oauthTokenSecret):Fl("argument-error"),t}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,n
2once:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){const t="string"===typeof e?JSON.parse(e):e,{providerId:n,signInMethod:r}=t,i=be(t,wl);if(!n||!r)return null;const o=new rd(n,r);return o.idToken=i.idToken||void 0,o.accessToken=i.accessToken||void 0,o.secret=i.secret,o.nonce=i.nonce,o.pendingToken=i.pendingToken||null,o}_getIdTokenResponse(e){return nd(e,this.buildRequest())}_linkToIdToken(e,t){const n=this.buildRequest();return n.idToken=t,nd(e,n)}_getReauthenticationResolver(e){const t=this.buildRequest();return t.autoCreate=!1,nd(e,t)}buildRequest(){const e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{const t={};this.idToken&&(t.id_token=this.idToken),this.accessToken&&(t.access_token=this.accessToken),this.secret&&(t.oauth_token_secret=this.secret),t.providerId=this.providerId,this.nonce&&!this.pendingToken&&(t.nonce=this.nonce),e.postBody=Na(t)}return e}}async function id(e,t){return Gl(e,"POST","/v1/accounts:sendVerificationCode",Vl(e,t))}const od={USER_NOT_FOUND:"user-not-found"};class sd extends Xc{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new sd({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new sd({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return async function(e,t){return Yl(e,"POST","/v1/accounts:signInWithPhoneNumber",Vl(e,t))}(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return async function(e,t){const n=await Yl(e,"POST","/v1/accounts:signInWithPhoneNumber",Vl(e,t));if(n.temporaryProof)throw Zl(e,"account-exists-with-different-credential",n);return n}(e,c({idToken:t},this._makeVerificationRequest()))}_getReauthenticationResolver(e){return async function(e,t){return Yl(e,"POST","/v1/accounts:signInWithPhoneNumber",Vl(e,c(c({},t),{},{operation:"REAUTH"})),od)}(e,this._makeVerificationRequest())}_makeVerificationRequest(){const{temporaryProof:e,phoneNumber:t,verificationId:n,verificationCode:r}=this.params;return e&&t?{temporaryProof:e,phoneNumber:t}:{sessionInfo:n,code:r}}toJSON(){const e={providerId:this.providerId};return this.params.phoneNumber&&(e.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&(e.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&(e.verificationCode=this.params.verificationCode),this.params.verificationId&&(e.verificationId=this.params.verificationId),e}static fromJSON(e){"string"===typeof e&&(e=JSON.parse(e));const{verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:i}=e;return n||t||r||i?new sd({verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:i}):null}}class ad{constructor(e){var t,n,r,i,o,s;const a=Ra(Ba(e)),u=null!==(t=a.apiKey)&&void 0!==t?t:null,l=null!==(n=a.oobCode)&&void 0!==n?n:null,c=function(e){switch(e){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}(null!==(r=a.mode)&&void 0!==r?r:null);Nl(u&&l&&c,"argument-error"),this.apiKey=u,this.operation=c,this.code=l,this.continueUrl=null!==(i=a.continueUrl)&&void 0!==i?i:null,this.languageCode=null!==(o=a.lang)&&void 0!==o?o:null,this.tenantId=null!==(s=a.tenantId)&&void 0!==s?s:null}static parseLink(e){const t=function(e){const t=Ra(Ba(e)).link,n=t?Ra(Ba(t)).deep_link_id:null,r=Ra(Ba(e)).deep_link_id;return(r?Ra(Ba(r)).link:null)||r||n||t||e}(e);try{return new ad(t)}catch(n){return null}}}class ud{constructor(){this.providerId=ud.PROVIDER_ID}static credential(e,t){return td._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){const n=ad.parseLink(t);return Nl(n,"argument-error"),td._fromEmailAndCode(e,n.code,n.tenantId)}}ud.PROVIDER_ID="password",ud.EMAIL_PASSWORD_SIGN_IN_METHOD="password",ud.EMAIL_LINK_SIGN_IN_METHOD="emailLink";class ld{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}class cd extends ld{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}class dd extends cd{constructor(){super("facebook.com")}static credential(e){return rd._fromParams({providerId:dd.PROVIDER_ID,signInMethod:dd.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return dd.credentialFromTaggedObject(e)}static credentialFromError(e){return dd.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject(e){let{_tokenResponse:t}=e;if(!t||!("oauthAccessToken"in t))return null;if(!t.oauthAccessToken)return null;try{return dd.credential(t.oauthAccessToken)}catch(n){return null}}}dd.FACEBOOK_SIGN_IN_METHOD="facebook.com",dd.PROVIDER_ID="facebook.com";class hd extends cd{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return rd._fromParams({providerId:hd.PROVIDER_ID,signInMethod:hd.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return hd.credentialFromTaggedObject(e)}static credentialFromError(e){return hd.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject(e){let{_tokenResponse:t}=e;if(!t)return null;const{oauthIdToken:n,oauthAccessToken:r}=t;if(!n&&!r)return null;try{return hd.credential(n,r)}catch(i){return null}}}hd.GOOGLE_SIGN_IN_METHOD="google.com",hd.PROVIDER_ID="google.com";class pd extends cd{constructor(){super("github.com")}static credential(e){return rd._fromParams({providerId:pd.PROVIDER_ID,signInMethod:pd.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return pd.credentialFromTaggedObject(e)}static credentialFromError(e){return pd.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject(e){let{_tokenResponse:t}=e;if(!t||!("oauthAccessToken"in t))return null;if(!t.oauthAccessToken)return null;try{return pd.credential(t.oauthAccessToken)}catch(n){return null}}}pd.GITHUB_SIGN_IN_METHOD="github.com",pd.PROVIDER_ID="github.com";class fd extends cd{constructor(){super("twitter.com")}static credential(e,t){return rd._fromParams({providerId:fd.PROVIDER_ID,signInMethod:fd.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return fd.credentialFromTaggedObject(e)}static credentialFromError(e){return fd.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject(e){let{_tokenResponse:t}=e;if(!t)return null;const{oauthAccessToken:n,oauthTokenSecret:r}=t;if(!n||!r)return null;try{return fd.credential(n,r)}catch(i){return null}}}async function gd(e,t){return Yl(e,"POST","/v1/accounts:signUp",Vl(e,t))}fd.TWITTER_SIGN_IN_METHOD="twitter.com",fd.PROVIDER_ID="twitter.com";class md{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=await gc._fromIdTokenResponse(e,n,r),o=vd(n);return new md({user:i,providerId:o,_tokenResponse:n,operationType:t})}static async _forOperation(e,t,n){await e._updateTokensIfNecessary(n,!0);const r=vd(n);
2return new md({user:e,providerId:r,_tokenResponse:n,operationType:t})}}function vd(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}class yd extends wa{constructor(e,t,n,r){var i;super(t.code,t.message),this.operationType=n,this.user=r,Object.setPrototypeOf(this,yd.prototype),this.customData={appName:e.name,tenantId:null!==(i=e.tenantId)&&void 0!==i?i:void 0,_serverResponse:t.customData._serverResponse,operationType:n}}static _fromErrorAndOperation(e,t,n,r){return new yd(e,t,n,r)}}function Dd(e,t,n,r){return("reauthenticate"===t?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch(n=>{if(n.code==="auth/".concat("multi-factor-auth-required"))throw yd._fromErrorAndOperation(e,n,t,r);throw n})}async function _d(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=await uc(e,t._linkToIdToken(e.auth,await e.getIdToken()),n);return md._forOperation(e,"link",r)}async function bd(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const{auth:r}=e;if(rl(r.app))return Promise.reject(Il(r));const i="reauthenticate";try{const o=await uc(e,Dd(r,i,t,e),n);Nl(o.idToken,r,"internal-error");const s=sc(o.idToken);Nl(s,r,"internal-error");const{sub:a}=s;return Nl(e.uid===a,r,"user-mismatch"),md._forOperation(e,i,o)}catch(y_){throw(null===y_||void 0===y_?void 0:y_.code)==="auth/".concat("user-not-found")&&Fl(r,"user-mismatch"),y_}}async function wd(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(rl(e.app))return Promise.reject(Il(e));const r="signIn",i=await Dd(e,r,t),o=await md._fromIdTokenResponse(e,r,i);return n||await e._updateCurrentUser(o.user),o}function Ed(e,t){return Gl(e,"POST","/v2/accounts/mfaEnrollment:start",Vl(e,t))}new WeakMap;const Cd="__sak";class kd{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{return this.storage?(this.storage.setItem(Cd,"1"),this.storage.removeItem(Cd),Promise.resolve(!0)):Promise.resolve(!1)}catch(e){return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){const t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}class Sd extends kd{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=Pc(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const t of Object.keys(this.listeners)){const n=this.storage.getItem(t),r=this.localCache[t];n!==r&&e(t,r,n)}}onStorageEvent(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e.key)return void this.forAllChangedKeys((e,t,n)=>{this.notifyListeners(e,n)});const n=e.key;t?this.detachListener():this.stopPolling();const r=()=>{const e=this.storage.getItem(n);(t||this.localCache[n]!==e)&&this.notifyListeners(n,e)},i=this.storage.getItem(n);Ic()&&i!==e.newValue&&e.newValue!==e.oldValue?setTimeout(r,10):r()}notifyListeners(e,t){this.localCache[e]=t;const n=this.listeners[e];if(n)for(const r of Array.from(n))r(t?JSON.parse(t):t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,t,n)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:n}),!0)})},1e3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,t){0===Object.keys(this.listeners).length&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&(this.detachListener(),this.stopPolling())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){const t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}Sd.type="LOCAL";const xd=Sd;function Fd(e){var t,n;const r=e.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),i=RegExp("".concat(r,"=([^;]+)"));return null!==(t=null===(n=document.cookie.match(i))||void 0===n?void 0:n[1])&&void 0!==t?t:null}function Ad(e){const t="http:"===window.location.protocol;return"".concat(t?"__dev_":"__HOST-","FIREBASE_").concat(e.split(":")[3])}class Td{constructor(){this.type="COOKIE",this.listenerUnsubscribes=new Map}_getFinalTarget(e){if(void 0===typeof window)return e;const t=new URL("".concat(window.location.origin,"/__cookies__"));return t.searchParams.set("finalTarget",e),t}async _isAvailable(){var e;return!("boolean"===typeof isSecureContext&&!isSecureContext)&&("undefined"!==typeof navigator&&"undefined"!==typeof document&&(null===(e=navigator.cookieEnabled)||void 0===e||e))}async _set(e,t){}async _get(e){if(!this._isAvailable())return null;const t=Ad(e);if(window.cookieStore){const e=await window.cookieStore.get(t);return null===e||void 0===e?void 0:e.value}return Fd(t)}async _remove(e){if(!this._isAvailable())return;if(!await this._get(e))return;const t=Ad(e);document.cookie="".concat(t,"=;Max-Age=34560000;Partitioned;Secure;SameSite=Strict;Path=/;
2Priority=High"),await fetch("/__cookies__",{method:"DELETE"}).catch(()=>{})}_addListener(e,t){if(!this._isAvailable())return;const n=Ad(e);if(window.cookieStore){const e=e=>{const r=e.changed.find(e=>e.name===n);r&&t(r.value);e.deleted.find(e=>e.name===n)&&t(null)},r=()=>window.cookieStore.removeEventListener("change",e);return this.listenerUnsubscribes.set(t,r),window.cookieStore.addEventListener("change",e)}let r=Fd(n);const i=setInterval(()=>{const e=Fd(n);e!==r&&(t(e),r=e)},1e3);this.listenerUnsubscribes.set(t,()=>clearInterval(i))}_removeListener(e,t){const n=this.listenerUnsubscribes.get(t);n&&(n(),this.listenerUnsubscribes.delete(t))}}Td.type="COOKIE";class Id extends kd{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,t){}_removeListener(e,t){}}Id.type="SESSION";const Pd=Id;class Od{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){const t=this.receivers.find(t=>t.isListeningto(e));if(t)return t;const n=new Od(e);return this.receivers.push(n),n}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const t=e,{eventId:n,eventType:r,data:i}=t.data,o=this.handlersMap[r];if(null===o||void 0===o||!o.size)return;t.ports[0].postMessage({status:"ack",eventId:n,eventType:r});const s=Array.from(o).map(async e=>e(t.origin,i)),a=await function(e){return Promise.all(e.map(async e=>{try{return{fulfilled:!0,value:await e}}catch(t){return{fulfilled:!1,reason:t}}}))}(s);t.ports[0].postMessage({status:"done",eventId:n,eventType:r,response:a})}_subscribe(e,t){0===Object.keys(this.handlersMap).length&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(t)}_unsubscribe(e,t){this.handlersMap[e]&&t&&this.handlersMap[e].delete(t),t&&0!==this.handlersMap[e].size||delete this.handlersMap[e],0===Object.keys(this.handlersMap).length&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}function Nd(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n="";for(let r=0;r<t;r++)n+=Math.floor(10*Math.random());return e+n}Od.receivers=[];class Rd{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}async _send(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50;const r="undefined"!==typeof MessageChannel?new MessageChannel:null;if(!r)throw new Error("connection_unavailable");let i,o;return new Promise((s,a)=>{const u=Nd("",20);r.port1.start();const l=setTimeout(()=>{a(new Error("unsupported_event"))},n);o={messageChannel:r,onMessage(e){const t=e;if(t.data.eventId===u)switch(t.data.status){case"ack":clearTimeout(l),i=setTimeout(()=>{a(new Error("timeout"))},3e3);break;case"done":clearTimeout(i),s(t.data.response);break;default:clearTimeout(l),clearTimeout(i),a(new Error("invalid_response"))}}},this.handlers.add(o),r.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:e,eventId:u,data:t},[r.port2])}).finally(()=>{o&&this.removeMessageHandler(o)})}}function Bd(){return window}function Ld(){return"undefined"!==typeof Bd().WorkerGlobalScope&&"function"===typeof Bd().importScripts}const Md="firebaseLocalStorageDb",jd="firebaseLocalStorage",zd="fbase_key";class Ud{constructor(e){this.request=e}toPromise(){return new Promise((e,t)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{t(this.request.error)})})}}function Hd(e,t){return e.transaction([jd],t?"readwrite":"readonly").objectStore(jd)}function qd(){const e=indexedDB.open(Md,1);return new Promise((t,n)=>{e.addEventListener("error",()=>{n(e.error)}),e.addEventListener("upgradeneeded",()=>{const t=e.result;try{t.createObjectStore(jd,{keyPath:zd})}catch(y_){n(y_)}}),e.addEventListener("success",async()=>{const n=e.result;n.objectStoreNames.contains(jd)?t(n):(n.close(),await function(){const e=indexedDB.deleteDatabase(Md);
2return new Ud(e).toPromise()}(),t(await qd()))})})}async function Wd(e,t,n){const r=Hd(e,!0).put({[zd]:t,value:n});return new Ud(r).toPromise()}function $d(e,t){const n=Hd(e,!0).delete(t);return new Ud(n).toPromise()}class Vd{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.db||(this.db=await qd()),this.db}async _withRetries(e){let t=0;for(;;)try{const t=await this._openDb();return await e(t)}catch(y_){if(t++>3)throw y_;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return Ld()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=Od._getInstance(Ld()?self:null),this.receiver._subscribe("keyChanged",async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)})),this.receiver._subscribe("ping",async(e,t)=>["keyChanged"])}async initializeSender(){var e,t;if(this.activeServiceWorker=await async function(){var e;if(null===(e=navigator)||void 0===e||!e.serviceWorker)return null;try{return(await navigator.serviceWorker.ready).active}catch(t){return null}}(),!this.activeServiceWorker)return;this.sender=new Rd(this.activeServiceWorker);const n=await this.sender._send("ping",{},800);n&&null!==(e=n[0])&&void 0!==e&&e.fulfilled&&null!==(t=n[0])&&void 0!==t&&t.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(this.sender&&this.activeServiceWorker&&function(){var e;return(null===(e=navigator)||void 0===e||null===(e=e.serviceWorker)||void 0===e?void 0:e.controller)||null}()===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch(t){}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await qd();return await Wd(e,Cd,"1"),await $d(e,Cd),!0}catch(e){}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite(async()=>(await this._withRetries(n=>Wd(n,e,t)),this.localCache[e]=t,this.notifyServiceWorker(e)))}async _get(e){const t=await this._withRetries(t=>async function(e,t){const n=Hd(e,!1).get(t),r=await new Ud(n).toPromise();return void 0===r?null:r.value}(t,e));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(t=>$d(t,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){const e=await this._withRetries(e=>{const t=Hd(e,!1).getAll();return new Ud(t).toPromise()});if(!e)return[];if(0!==this.pendingWrites)return[];const t=[],n=new Set;if(0!==e.length)for(const{fbase_key:r,value:i}of e)n.add(r),JSON.stringify(this.localCache[r])!==JSON.stringify(i)&&(this.notifyListeners(r,i),t.push(r));for(const r of Object.keys(this.localCache))this.localCache[r]&&!n.has(r)&&(this.notifyListeners(r,null),t.push(r));return t}notifyListeners(e,t){this.localCache[e]=t;const n=this.listeners[e];if(n)for(const r of Array.from(n))r(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&this.stopPolling()}}Vd.type="LOCAL";const Gd=Vd;function Kd(e,t){return Gl(e,"POST","/v2/accounts/mfaSignIn:start",Vl(e,t))}Uc("rcb"),new zl(3e4,6e4);const Yd="recaptcha";async function Jd(e,t,n){if(!e._getRecaptchaConfig())try{await Kc(e)}catch(If){console.log("Failed to initialize reCAPTCHA Enterprise config. Triggering the reCAPTCHA v2 verification.")}try{let i;if(i="string"===typeof t?{phoneNumber:t}
2:t,"session"in i){const t=i.session;if("phoneNumber"in i){Nl("enroll"===t.type,e,"internal-error");const r={idToken:t.credential,phoneEnrollmentInfo:{phoneNumber:i.phoneNumber,clientType:"CLIENT_TYPE_WEB"}},o=Gc(e,r,"mfaSmsEnrollment",async(e,t)=>{if(t.phoneEnrollmentInfo.captchaResponse===Wc){Nl((null===n||void 0===n?void 0:n.type)===Yd,e,"argument-error");return Ed(e,await Qd(e,t,n))}return Ed(e,t)},"PHONE_PROVIDER"),s=await o.catch(e=>Promise.reject(e));return s.phoneSessionInfo.sessionInfo}{var r;Nl("signin"===t.type,e,"internal-error");const o=(null===(r=i.multiFactorHint)||void 0===r?void 0:r.uid)||i.multiFactorUid;Nl(o,e,"missing-multi-factor-info");const s={mfaPendingCredential:t.credential,mfaEnrollmentId:o,phoneSignInInfo:{clientType:"CLIENT_TYPE_WEB"}},a=Gc(e,s,"mfaSmsSignIn",async(e,t)=>{if(t.phoneSignInInfo.captchaResponse===Wc){Nl((null===n||void 0===n?void 0:n.type)===Yd,e,"argument-error");return Kd(e,await Qd(e,t,n))}return Kd(e,t)},"PHONE_PROVIDER"),u=await a.catch(e=>Promise.reject(e));return u.phoneResponseInfo.sessionInfo}}{const t={phoneNumber:i.phoneNumber,clientType:"CLIENT_TYPE_WEB"},r=Gc(e,t,"sendVerificationCode",async(e,t)=>{if(t.captchaResponse===Wc){Nl((null===n||void 0===n?void 0:n.type)===Yd,e,"argument-error");return id(e,await Qd(e,t,n))}return id(e,t)},"PHONE_PROVIDER"),o=await r.catch(e=>Promise.reject(e));return o.sessionInfo}}finally{null===n||void 0===n||n._reset()}}async function Qd(e,t,n){Nl(n.type===Yd,e,"argument-error");const r=await n.verify();Nl("string"===typeof r,e,"argument-error");const i=c({},t);if("phoneEnrollmentInfo"in i){const e=i.phoneEnrollmentInfo.phoneNumber,t=i.phoneEnrollmentInfo.captchaResponse,n=i.phoneEnrollmentInfo.clientType,o=i.phoneEnrollmentInfo.recaptchaVersion;return Object.assign(i,{phoneEnrollmentInfo:{phoneNumber:e,recaptchaToken:r,captchaResponse:t,clientType:n,recaptchaVersion:o}}),i}if("phoneSignInInfo"in i){const e=i.phoneSignInInfo.captchaResponse,t=i.phoneSignInInfo.clientType,n=i.phoneSignInInfo.recaptchaVersion;return Object.assign(i,{phoneSignInInfo:{recaptchaToken:r,captchaResponse:e,clientType:t,recaptchaVersion:n}}),i}return Object.assign(i,{recaptchaToken:r}),i}class Xd{constructor(e){this.providerId=Xd.PROVIDER_ID,this.auth=Lc(e)}verifyPhoneNumber(e,t){return Jd(this.auth,e,qa(t))}static credential(e,t){return sd._fromVerification(e,t)}static credentialFromResult(e){const t=e;return Xd.credentialFromTaggedObject(t)}static credentialFromError(e){return Xd.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject(e){let{_tokenResponse:t}=e;if(!t)return null;const{phoneNumber:n,temporaryProof:r}=t;return n&&r?sd._fromTokenResponse(n,r):null}}function Zd(e,t){return t?vc(t):(Nl(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}Xd.PROVIDER_ID="phone",Xd.PHONE_SIGN_IN_METHOD="phone";class eh extends Xc{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return nd(e,this._buildIdpRequest())}_linkToIdToken(e,t){return nd(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return nd(e,this._buildIdpRequest())}_buildIdpRequest(e){const t={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(t.idToken=e),t}}function th(e){return wd(e.auth,new eh(e),e.bypassAuthState)}function nh(e){const{auth:t,user:n}=e;return Nl(n,t,"internal-error"),bd(n,new eh(e),e.bypassAuthState)}async function rh(e){const{auth:t,user:n}=e;return Nl(n,t,"internal-error"),_d(n,new eh(e),e.bypassAuthState)}class ih{constructor(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];this.auth=e,this.resolver=n,this.user=r,this.bypassAuthState=i,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(t)?t:[t]}execute(){return new Promise(async(e,t)=>{this.pendingPromise={resolve:e,reject:t};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(y_){this.reject(y_)}})}async onAuthEvent(e){const{urlResponse:t,sessionId:n,postBody:r,tenantId:i,error:o,type:s}=e;if(o)return void this.reject(o);const a={auth:this.auth,requestUri:t,sessionId:n,tenantId:i||void 0,postBody:r||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(s)(a))}catch(y_){this.reject(y_)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return th;case"linkViaPopup":case"linkViaRedirect":return rh;case"reauthViaPopup":case"reauthViaRedirect":return nh;default:Fl(this.auth,"internal-error")}}resolve(e){Bl(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){Bl(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}const oh=new zl(2e3,1e4);
2class sh extends ih{constructor(e,t,n,r,i){super(e,t,r,i),this.provider=n,this.authWindow=null,this.pollId=null,sh.currentPopupAction&&sh.currentPopupAction.cancel(),sh.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return Nl(e,this.auth,"internal-error"),e}async onExecution(){Bl(1===this.filter.length,"Popup operations only handle one event");const e=Nd();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch(e=>{this.reject(e)}),this.resolver._isIframeWebStorageSupported(this.auth,e=>{e||this.reject(Al(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var e;return(null===(e=this.authWindow)||void 0===e?void 0:e.associatedEvent)||null}cancel(){this.reject(Al(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,sh.currentPopupAction=null}pollUserCancellation(){const e=()=>{var t;null!==(t=this.authWindow)&&void 0!==t&&null!==(t=t.window)&&void 0!==t&&t.closed?this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(Al(this.auth,"popup-closed-by-user"))},8e3):this.pollId=window.setTimeout(e,oh.get())};e()}}sh.currentPopupAction=null;const ah=new Map;class uh extends ih{constructor(e,t){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,arguments.length>2&&void 0!==arguments[2]&&arguments[2]),this.eventId=null}async execute(){let e=ah.get(this.auth._key());if(!e){try{const t=await async function(e,t){const n=dh(t),r=ch(e);if(!await r._isAvailable())return!1;const i="true"===await r._get(n);return await r._remove(n),i}(this.resolver,this.auth),n=t?await super.execute():null;e=()=>Promise.resolve(n)}catch(y_){e=()=>Promise.reject(y_)}ah.set(this.auth._key(),e)}return this.bypassAuthState||ah.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);if("unknown"!==e.type){if(e.eventId){const t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}else this.resolve(null)}async onExecution(){}cleanUp(){}}function lh(e,t){ah.set(e._key(),t)}function ch(e){return vc(e._redirectPersistence)}function dh(e){return _c("pendingRedirect",e.config.apiKey,e.name)}async function hh(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(rl(e.app))return Promise.reject(Il(e));const r=Lc(e),i=Zd(r,t),o=new uh(r,i,n),s=await o.execute();return s&&!n&&(delete s.user._redirectEventId,await r._persistUserIfCurrent(s.user),await r._setRedirectUser(null,t)),s}class ph{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let t=!1;return this.consumers.forEach(n=>{this.isEventForConsumer(e,n)&&(t=!0,this.sendToConsumer(e,n),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return gh(e);default:return!1}}(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){if(e.error&&!gh(e)){var n;const r=(null===(n=e.error.code)||void 0===n?void 0:n.split("auth/")[1])||"internal-error";t.onError(Al(this.auth,r))}else t.onAuthEvent(e)}isEventForConsumer(e,t){const n=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&n}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(fh(e))}saveEventToCache(e){this.cachedEventUids.add(fh(e)),this.lastProcessedEventTime=
2Date.now()}}function fh(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(e=>e).join("-")}function gh(e){let{type:t,error:n}=e;return"unknown"===t&&(null===n||void 0===n?void 0:n.code)==="auth/".concat("no-auth-event")}const mh=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,vh=/^https?/;async function yh(e){if(e.config.emulator)return;const{authorizedDomains:t}=await async function(e){return Gl(e,"GET","/v1/projects",arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(e);for(const r of t)try{if(Dh(r))return}catch(n){}Fl(e,"unauthorized-domain")}function Dh(e){const t=Ll(),{protocol:n,hostname:r}=new URL(t);if(e.startsWith("chrome-extension://")){const i=new URL(e);return""===i.hostname&&""===r?"chrome-extension:"===n&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===n&&i.hostname===r}if(!vh.test(n))return!1;if(mh.test(e))return r===e;const i=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}const _h=new zl(3e4,6e4);function bh(){const e=Bd().___jsl;if(null!==e&&void 0!==e&&e.H)for(const t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let n=0;n<e.CP.length;n++)e.CP[n]=null}function wh(e){return new Promise((t,n)=>{var r,i;function o(){bh(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{bh(),n(Al(e,"network-request-failed"))},timeout:_h.get()})}if(null!==(r=Bd().gapi)&&void 0!==r&&null!==(r=r.iframes)&&void 0!==r&&r.Iframe)t(gapi.iframes.getContext());else{if(null===(i=Bd().gapi)||void 0===i||!i.load){const t=Uc("iframefcb");return Bd()[t]=()=>{gapi.load?o():n(Al(e,"network-request-failed"))},zc("".concat(jc.gapiScript,"?onload=").concat(t)).catch(e=>n(e))}o()}}).catch(e=>{throw Eh=null,e})}let Eh=null;const Ch=new zl(5e3,15e3),kh={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},Sh=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function xh(e){const t=e.config;Nl(t.authDomain,e,"auth-domain-config-required");const n=t.emulator?Ul(t,"emulator/auth/iframe"):"https://".concat(e.config.authDomain,"/").concat("__/auth/iframe"),r={apiKey:t.apiKey,appName:e.name,v:sl},i=Sh.get(e.config.apiHost);i&&(r.eid=i);const o=e._getFrameworks();return o.length&&(r.fw=o.join(",")),"".concat(n,"?").concat(Na(r).slice(1))}async function Fh(e){const t=await function(e){return Eh=Eh||wh(e),Eh}(e),n=Bd().gapi;return Nl(n,e,"internal-error"),t.open({where:document.body,url:xh(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:kh,dontclear:!0},t=>new Promise(async(n,r)=>{await t.restyle({setHideOnLeave:!1});const i=Al(e,"network-request-failed"),o=Bd().setTimeout(()=>{r(i)},Ch.get());function s(){Bd().clearTimeout(o),n(t)}t.ping(s).then(s,()=>{r(i)})}))}const Ah={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class Th{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(y_){}}}function Ih(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:500,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:600;const o=Math.max((window.screen.availHeight-i)/2,0).toString(),s=Math.max((window.screen.availWidth-r)/2,0).toString();let a="";const u=c(c({},Ah),{},{width:r.toString(),height:i.toString(),top:o,left:s}),l=ga().toLowerCase();n&&(a=kc(l)?"_blank":n),Ec(l)&&(t=t||"http://localhost",u.scrollbars="yes");const d=Object.entries(u).reduce((e,t)=>{let[n,r]=t;return"".concat(e).concat(n,"=").concat(r,",")},"");if(function(){var e;return Tc(arguments.length>0&&void 0!==arguments[0]?arguments[0]:ga())&&!(null===(e=window.navigator)||void 0===e||!e.standalone)}(l)&&"_self"!==a)return function(e,t){const n=document.createElement("a");n.href=e,n.target=t;const r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}(t||"",a),new Th(null);const h=window.open(t||"",a,d);Nl(h,e,"popup-blocked");try{h.focus()}catch(y_){}return new Th(h)}const Ph="__/auth/handler",Oh="emulator/auth/handler",Nh=encodeURIComponent("fac");async function Rh(e,t,n,r,i,o){Nl(e.config.authDomain,e,"auth-domain-config-required"),Nl(e.config.apiKey,e,"invali
2d-api-key");const s={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:r,v:sl,eventId:i};if(t instanceof ld){t.setDefaultLanguage(e.languageCode),s.providerId=t.providerId||"",Ta(t.getCustomParameters())||(s.customParameters=JSON.stringify(t.getCustomParameters()));for(const[e,t]of Object.entries(o||{}))s[e]=t}if(t instanceof cd){const e=t.getScopes().filter(e=>""!==e);e.length>0&&(s.scopes=e.join(","))}e.tenantId&&(s.tid=e.tenantId);const a=s;for(const c of Object.keys(a))void 0===a[c]&&delete a[c];const u=await e._getAppCheckToken(),l=u?"#".concat(Nh,"=").concat(encodeURIComponent(u)):"";return"".concat(function(e){let{config:t}=e;if(!t.emulator)return"https://".concat(t.authDomain,"/").concat(Ph);return Ul(t,Oh)}(e),"?").concat(Na(a).slice(1)).concat(l)}const Bh="webStorageSupport";const Lh=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Pd,this._completeRedirectFn=hh,this._overrideRedirectResult=lh}async _openPopup(e,t,n,r){var i;Bl(null===(i=this.eventManagers[e._key()])||void 0===i?void 0:i.manager,"_initialize() not called before _openPopup()");return Ih(e,await Rh(e,t,n,Ll(),r),Nd())}async _openRedirect(e,t,n,r){await this._originValidation(e);return function(e){Bd().location.href=e}(await Rh(e,t,n,Ll(),r)),new Promise(()=>{})}_initialize(e){const t=e._key();if(this.eventManagers[t]){const{manager:e,promise:n}=this.eventManagers[t];return e?Promise.resolve(e):(Bl(n,"If manager is not set, promise should be"),n)}const n=this.initAndGetManager(e);return this.eventManagers[t]={promise:n},n.catch(()=>{delete this.eventManagers[t]}),n}async initAndGetManager(e){const t=await Fh(e),n=new ph(e);return t.register("authEvent",t=>{Nl(null===t||void 0===t?void 0:t.authEvent,e,"invalid-auth-event");return{status:n.onEvent(t.authEvent)?"ACK":"ERROR"}},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:n},this.iframes[e._key()]=t,n}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(Bh,{type:Bh},n=>{var r;const i=null===n||void 0===n||null===(r=n[0])||void 0===r?void 0:r[Bh];void 0!==i&&t(!!i),Fl(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=yh(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return Pc()||Cc()||Tc()}};var Mh="@firebase/auth",jh="1.11.0";class zh{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.uid)||null}async getToken(e){if(this.assertAuthConfigured(),await this.auth._initializationPromise,!this.auth.currentUser)return null;return{accessToken:await this.auth.currentUser.getIdToken(e)}}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;const t=this.auth.onIdTokenChanged(t=>{e((null===t||void 0===t?void 0:t.stsTokenManager.accessToken)||null)});this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();const t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){Nl(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}const Uh=ua("authIdTokenMaxAge")||300;let Hh=null;var qh;!function(e){jc=e}({loadJS:e=>new Promise((t,n)=>{const r=document.createElement("script");r.setAttribute("src",e),r.onload=t,r.onerror=e=>{const t=Al("internal-error");t.customData=e,n(t)},r.type="text/javascript",r.charset="UTF-8",function(){var e,t;return null!==(e=null===(t=document.getElementsByTagName("head"))||void 0===t?void 0:t[0])&&void 0!==e?e:document}().appendChild(r)}),gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="}
2),qh="Browser",tl(new Wa("auth",(e,t)=>{let{options:n}=t;const r=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),o=e.getProvider("app-check-internal"),{apiKey:s,authDomain:a}=r.options;Nl(s&&!s.includes(":"),"invalid-api-key",{appName:r.name});const u={apiKey:s,authDomain:a,clientPlatform:qh,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Oc(qh)},l=new Bc(r,i,o,u);return function(e,t){const n=(null===t||void 0===t?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(vc);null!==t&&void 0!==t&&t.errorMap&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,null===t||void 0===t?void 0:t.popupRedirectResolver)}(l,n),l},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,n)=>{e.getProvider("auth-internal").initialize()})),tl(new Wa("auth-internal",e=>(e=>new zh(e))(Lc(e.getProvider("auth").getImmediate())),"PRIVATE").setInstantiationMode("EXPLICIT")),ll(Mh,jh,function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}(qh)),ll(Mh,jh,"esm2020");ll("firebase","12.4.0","app");const Wh="@firebase/installations",$h="0.6.19",Vh=1e4,Gh="w:".concat($h),Kh="FIS_v2",Yh=36e5,Jh=new Ea("installations","Installations",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."});function Qh(e){return e instanceof wa&&e.code.includes("request-failed")}function Xh(e){let{projectId:t}=e;return"".concat("https://firebaseinstallations.googleapis.com/v1","/projects/").concat(t,"/installations")}function Zh(e){return{token:e.token,requestStatus:2,expiresIn:(t=e.expiresIn,Number(t.replace("s","000"))),creationTime:Date.now()};var t}async function ep(e,t){const n=(await t.json()).error;return Jh.create("request-failed",{requestName:e,serverCode:n.code,serverMessage:n.message,serverStatus:n.status})}function tp(e){let{apiKey:t}=e;return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t})}function np(e,t){let{refreshToken:n}=t;const r=tp(e);return r.append("Authorization",function(e){return"".concat(Kh," ").concat(e)}(n)),r}async function rp(e){const t=await e();return t.status>=500&&t.status<600?e():t}function ip(e){return new Promise(t=>{setTimeout(t,e)})}const op=/^[cdef][\w-]{21}$/;function sp(){try{const e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;const t=function(e){const t=function(e){return btoa(String.fromCharCode(...e)).replace(/\+/g,"-").replace(/\//g,"_")}(e);return t.substr(0,22)}(e);return op.test(t)?t:""}catch(e){return""}}function ap(e){return"".concat(e.appName,"!").concat(e.appId)}const up=new Map;function lp(e,t){const n=ap(e);cp(n,t),function(e,t){const n=hp();n&&n.postMessage({key:e,fid:t});pp()}(n,t)}function cp(e,t){const n=up.get(e);if(n)for(const r of n)r(t)}let dp=null;function hp(){return!dp&&"BroadcastChannel"in self&&(dp=new BroadcastChannel("[Firebase] FID Change"),dp.onmessage=e=>{cp(e.data.key,e.data.fid)}),dp}function pp(){0===up.size&&dp&&(dp.close(),dp=null)}const fp="firebase-installations-store";let gp=null;function mp(){return gp||(gp=fu("firebase-installations-database",1,{upgrade:(e,t)=>{if(0===t)e.createObjectStore(fp)}})),gp}async function vp(e,t){const n=ap(e),r=(await mp()).transaction(fp,"readwrite"),i=r.objectStore(fp),o=await i.get(n);return await i.put(t,n),await r.done,o&&o.fid===t.fid||lp(e,t.fid),t}async function yp(e){const t=ap(e),n=(await mp()).transaction(fp,"readwrite");await n.objectStore(fp).delete(t),await n.done}async function Dp(e,t){const n=ap(e),r=(await mp()).transaction(fp,"readwrite"),i=r.objectStore(fp),o=await i.get(n),s=t(o);return void 0===s?await i.delete(n):await i.put(s,n),await r.done,!s||o&&o.fid===s.fid||lp(e,s.fid),s}async function _p(e){let t;const n=await Dp(e.appConfig,n=>{const r=function(e){const t=e||{fid:sp(),registrationStatus:0};return Ep(t)}(n),i=function(e,t){if(0===t.registrationStatus){if(!navigator.onLine){return{installationEntry:t,registrationPromise:Promise.reject(Jh.create("app-offline"))}}const n={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},r=async function(e,t){try{const n=await async function(e,t){let{appConfig:n,heartbeatServiceProvider:r}=e,{fid:i}=t;const o=Xh(n),s=tp(n),a=r.getImmediate({optional:!0});if(a){const e=await a.getHeartbeatsHeader();e&&s.append("x-firebase-client",e)}const u={fid:i,authVersion:Kh,appId:n.appId,sdkVersion:Gh},l={method:"POST",headers:s,body:JSON.stringify(u)},c=await rp(()=>fetch(o,l));if(c.ok){const e=await c.json();return{fid:e.fid||i,registrationStatus:2,refreshToken:e.refreshToken,authToken:Zh(e.authToken)}}throw await ep("Create Installation",c)}(e,t);return vp(e.appConfig,n)}catch(y_){throw Qh(y_)&&409===y_.customData.serverCode?await yp(e.appConfig):await vp(e.appConfig,{fid:t.fid,registrationStatus:0}),y_}}(e,n);return{installationEntry:n,registrationPromise:r}}return 1===t.registrationStatus?{installationEntry:t,registrationPromise:bp(e)}:{installationEntry:t}}(e,r);return t=i.registrationPromise,i.installationEntry});return""===n.fid?{installationEntry:await t}:{installationEntry:n,registrationPromise:t}}async function bp(e){let t=await wp(e.appConfig);for(;1===t.registrationStatus;)await ip(100),t=await wp(e.appConfig);if(0===t.registrationStatus){const{installationEntry:t,registrationPromise:n}=await _p(e);return n||t}return t}function wp(e){return Dp(e,e=>{if(!e)throw Jh.create("installation-not-found");return Ep(e)})}function Ep(e){return 1===(t=e).registrationStatus&&t.registrationTime+Vh<Date.now()?{fid:e.fid,registrationStatus:0}:e;var t}async function Cp(e,t){let{appConfig:n,heartbeatServiceProvider:r}=e;const i=function(e,t){let{fid:n}=t;return"".concat(Xh(e),"/").concat(n,"/authTokens:generate")}(n,t),o=np(n,t),s=r.getImmediate({optional:!0});if(s){const e=await s.getHeartbeatsHeader();e&&o.append("x-firebase-client",e)}const a={installation:{sdkVersion:Gh,appId:n.appId}},u={method:"POST",headers:o,body:JSON.stringify(a)},l=await rp(()=>fetch(i,u));if(l.ok){return Zh(await l.json())}throw await ep("Generate Auth Token",l)}async function kp(e){let t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=await Dp(e.appConfig,r=>{if(!xp(r))throw Jh.create("not-registered");const i=r.authToken;if(!n&&function(e){return 2===e.requestStatus&&!function(e){const t=Date.now();
2return t<e.creationTime||e.creationTime+e.expiresIn<t+Yh}(e)}(i))return r;if(1===i.requestStatus)return t=async function(e,t){let n=await Sp(e.appConfig);for(;1===n.authToken.requestStatus;)await ip(100),n=await Sp(e.appConfig);const r=n.authToken;return 0===r.requestStatus?kp(e,t):r}(e,n),r;{if(!navigator.onLine)throw Jh.create("app-offline");const n=function(e){const t={requestStatus:1,requestTime:Date.now()};return c(c({},e),{},{authToken:t})}(r);return t=async function(e,t){try{const n=await Cp(e,t),r=c(c({},t),{},{authToken:n});return await vp(e.appConfig,r),n}catch(y_){if(!Qh(y_)||401!==y_.customData.serverCode&&404!==y_.customData.serverCode){const n=c(c({},t),{},{authToken:{requestStatus:0}});await vp(e.appConfig,n)}else await yp(e.appConfig);throw y_}}(e,n),n}});return t?await t:r.authToken}function Sp(e){return Dp(e,e=>{if(!xp(e))throw Jh.create("not-registered");const t=e.authToken;return 1===(n=t).requestStatus&&n.requestTime+Vh<Date.now()?c(c({},e),{},{authToken:{requestStatus:0}}):e;var n})}function xp(e){return void 0!==e&&2===e.registrationStatus}async function Fp(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=e;await async function(e){const{registrationPromise:t}=await _p(e);t&&await t}(n);return(await kp(n,t)).token}function Ap(e){return Jh.create("missing-app-config-values",{valueName:e})}const Tp="installations",Ip=e=>{const t=e.getProvider("app").getImmediate(),n=function(e){if(!e||!e.options)throw Ap("App Configuration");if(!e.name)throw Ap("App Name");const t=["projectId","apiKey","appId"];for(const n of t)if(!e.options[n])throw Ap(n);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t);return{app:t,appConfig:n,heartbeatServiceProvider:nl(t,"heartbeat"),_delete:()=>Promise.resolve()}},Pp=e=>{const t=nl(e.getProvider("app").getImmediate(),Tp).getImmediate();return{getId:()=>async function(e){const t=e,{installationEntry:n,registrationPromise:r}=await _p(t);return r?r.catch(console.error):kp(t).catch(console.error),n.fid}(t),getToken:e=>Fp(t,e)}};tl(new Wa(Tp,Ip,"PUBLIC")),tl(new Wa("installations-internal",Pp,"PRIVATE")),ll(Wh,$h),ll(Wh,$h,"esm2020");const Op="analytics",Np="https://www.googletagmanager.com/gtag/js",Rp=new tu("@firebase/analytics"),Bp=new Ea("analytics","Analytics",{"already-exists":"A Firebase Analytics instance with the appId {$id} already exists. Only one Firebase Analytics instance can be created for each appId.","already-initialized":"initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-initialized instance.","already-initialized-settings":"Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.","interop-component-reg-failed":"Firebase Analytics Interop Component failed to instantiate: {$reason}","invalid-analytics-context":"Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","indexeddb-unavailable":"IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","fetch-throttle":"The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.","config-fetch-failed":"Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}","no-api-key":'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',"no-app-id":'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',"no-client-id":'The "client_id" field is empty.',"invali
2d-gtag-resource":"Trusted Types detected an invalid gtag resource: {$gtagURL}."});function Lp(e){if(!e.startsWith(Np)){const t=Bp.create("invalid-gtag-resource",{gtagURL:e});return Rp.warn(t.message),""}return e}function Mp(e){return Promise.all(e.map(e=>e.catch(e=>e)))}function jp(e,t){const n=function(e,t){let n;return window.trustedTypes&&(n=window.trustedTypes.createPolicy(e,t)),n}("firebase-js-sdk-policy",{createScriptURL:Lp}),r=document.createElement("script"),i="".concat(Np,"?l=").concat(e,"&id=").concat(t);r.src=n?null===n||void 0===n?void 0:n.createScriptURL(i):i,r.async=!0,document.head.appendChild(r)}function zp(e,t,n,r){return async function(i){try{for(var o=arguments.length,s=new Array(o>1?o-1:0),a=1;a<o;a++)s[a-1]=arguments[a];if("event"===i){const[r,i]=s;await async function(e,t,n,r,i){try{let o=[];if(i&&i.send_to){let e=i.send_to;Array.isArray(e)||(e=[e]);const r=await Mp(n);for(const n of e){const e=r.find(e=>e.measurementId===n),i=e&&t[e.appId];if(!i){o=[];break}o.push(i)}}0===o.length&&(o=Object.values(t)),await Promise.all(o),e("event",r,i||{})}catch(y_){Rp.error(y_)}}(e,t,n,r,i)}else if("config"===i){const[i,o]=s;await async function(e,t,n,r,i,o){const s=r[i];try{if(s)await t[s];else{const e=(await Mp(n)).find(e=>e.measurementId===i);e&&await t[e.appId]}}catch(y_){Rp.error(y_)}e("config",i,o)}(e,t,n,r,i,o)}else if("consent"===i){const[t,n]=s;e("consent",t,n)}else if("get"===i){const[t,n,r]=s;e("get",t,n,r)}else if("set"===i){const[t]=s;e("set",t)}else e(i,...s)}catch(y_){Rp.error(y_)}}}const Up=new class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;this.throttleMetadata=e,this.intervalMillis=t}getThrottleMetadata(e){return this.throttleMetadata[e]}setThrottleMetadata(e,t){this.throttleMetadata[e]=t}deleteThrottleMetadata(e){delete this.throttleMetadata[e]}};function Hp(e){return new Headers({Accept:"application/json","x-goog-api-key":e})}async function qp(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Up,n=arguments.length>2?arguments[2]:void 0;const{appId:r,apiKey:i,measurementId:o}=e.options;if(!r)throw Bp.create("no-app-id");if(!i){if(o)return{measurementId:o,appId:r};throw Bp.create("no-api-key")}const s=t.getThrottleMetadata(r)||{backoffCount:0,throttleEndTimeMillis:Date.now()},a=new $p;return setTimeout(async()=>{a.abort()},void 0!==n?n:6e4),Wp({appId:r,apiKey:i,measurementId:o},s,a,t)}async function Wp(e,t,n){let{throttleEndTimeMillis:r,backoffCount:i}=t,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Up;const{appId:s,measurementId:a}=e;try{await function(e,t){return new Promise((n,r)=>{const i=Math.max(t-Date.now(),0),o=setTimeout(n,i);e.addEventListener(()=>{clearTimeout(o),r(Bp.create("fetch-throttle",{throttleEndTimeMillis:t}))})})}(n,r)}catch(y_){if(a)return Rp.warn("Timed out fetching this Firebase app's measurement ID from the server."+" Falling back to the measurement ID ".concat(a)+' provided in the "measurementId" field in the local Firebase config. ['.concat(null===y_||void 0===y_?void 0:y_.message,"]")),{appId:s,measurementId:a};throw y_}try{const t=await async function(e){const{appId:t,apiKey:n}=e,r={method:"GET",headers:Hp(n)},i="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig".replace("{app-id}",t),o=await fetch(i,r);if(200!==o.status&&304!==o.status){let e="";try{var s;const t=await o.json();null!==(s=t.error)&&void 0!==s&&s.message&&(e=t.error.message)}catch(a){}throw Bp.create("config-fetch-failed",{httpStatus:o.status,responseMessage:e})}return o.json()}(e);return o.deleteThrottleMetadata(s),t}catch(y_){var u;const r=y_;if(!function(e){if(!(e instanceof wa)||!e.customData)return!1;const t=Number(e.customData.httpStatus);return 429===t||500===t||503===t||504===t}(r)){if(o.deleteThrottleMetadata(s),a)return Rp.warn("Failed to fetch this Firebase app's measurement ID from the server."+" Falling back to the measurement ID ".concat(a)+' provided in the "measurementId" field in the local Firebase config. ['.concat(null===r||void 0===r?void 0:r.message,"]")),{appId:s,measurementId:a};throw y_}const l=503===Number(null===r||void 0===r||null===(u=r.customData)||void 0===u?void 0:u.httpStatus)?Ha(i,o.intervalMillis,30):Ha(i,o.intervalMillis),c={throttleEndTimeMillis:Date.now()+l,backoffCount:i+1};return o.setThrottleMetadata(s,c),Rp.debug("Calling attemptFetch again in ".concat(l," millis")),Wp(e,c,n,o)}}class $p{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}
2abort(){this.listeners.forEach(e=>e())}}let Vp,Gp;function Kp(e){Gp=e}function Yp(e){Vp=e}async function Jp(e,t,n,r,i,o,s){var a;const u=qp(e);u.then(t=>{n[t.measurementId]=t.appId,e.options.measurementId&&t.measurementId!==e.options.measurementId&&Rp.warn("The measurement ID in the local Firebase config (".concat(e.options.measurementId,")")+" does not match the measurement ID fetched from the server (".concat(t.measurementId,").")+" To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.")}).catch(e=>Rp.error(e)),t.push(u);const l=async function(){if(!_a())return Rp.warn(Bp.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;try{await ba()}catch(y_){return Rp.warn(Bp.create("indexeddb-unavailable",{errorInfo:null===y_||void 0===y_?void 0:y_.toString()}).message),!1}return!0}().then(e=>e?r.getId():void 0),[c,d]=await Promise.all([u,l]);(function(e){const t=window.document.getElementsByTagName("script");for(const n of Object.values(t))if(n.src&&n.src.includes(Np)&&n.src.includes(e))return n;return null})(o)||jp(o,c.measurementId),Gp&&(i("consent","default",Gp),Kp(void 0)),i("js",new Date);const h=null!==(a=null===s||void 0===s?void 0:s.config)&&void 0!==a?a:{};return h.origin="firebase",h.update=!0,null!=d&&(h.firebase_id=d),i("config",c.measurementId,h),Vp&&(i("set",Vp),Yp(void 0)),c.measurementId}class Qp{constructor(e){this.app=e}_delete(){return delete Xp[this.app.options.appId],Promise.resolve()}}let Xp={},Zp=[];const ef={};let tf,nf,rf="dataLayer",of="gtag",sf=!1;function af(){const e=[];if(va()&&e.push("This is a browser extension environment."),"undefined"!==typeof navigator&&navigator.cookieEnabled||e.push("Cookies are not available."),e.length>0){const t=e.map((e,t)=>"(".concat(t+1,") ").concat(e)).join(" "),n=Bp.create("invalid-analytics-context",{errorInfo:t});Rp.warn(n.message)}}function uf(e,t,n){af();const r=e.options.appId;if(!r)throw Bp.create("no-app-id");if(!e.options.apiKey){if(!e.options.measurementId)throw Bp.create("no-api-key");Rp.warn('The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest'+" measurement ID for this Firebase app. Falling back to the measurement ID ".concat(e.options.measurementId)+' provided in the "measurementId" field in the local Firebase config.')}if(null!=Xp[r])throw Bp.create("already-exists",{id:r});if(!sf){!function(e){let t=[];Array.isArray(window[e])?t=window[e]:window[e]=t}(rf);const{wrappedGtag:e,gtagCore:t}=function(e,t,n,r,i){let o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];window[r].push(arguments)};return window[i]&&"function"===typeof window[i]&&(o=window[i]),window[i]=zp(o,e,t,n),{gtagCore:o,wrappedGtag:window[i]}}(Xp,Zp,ef,rf,of);nf=e,tf=t,sf=!0}Xp[r]=Jp(e,Zp,ef,t,tf,rf,n);return new Qp(e)}function lf(e,t,n){e=qa(e),async function(e,t,n,r){if(r&&r.global){const t={};for(const e of Object.keys(n))t["user_properties.".concat(e)]=n[e];return e("set",t),Promise.resolve()}e("config",await t,{update:!0,user_properties:n})}(nf,Xp[e.app.options.appId],t,n).catch(e=>Rp.error(e))}function cf(e,t,n,r){e=qa(e),async function(e,t,n,r,i){if(i&&i.global)e("event",n,r);else{const i=await t;e("event",n,c(c({},r),{},{send_to:i}))}}(nf,Xp[e.app.options.appId],t,n,r).catch(e=>Rp.error(e))}const df="@firebase/analytics",hf="0.10.19";tl(new Wa(Op,(e,t)=>{let{options:n}=t;return uf(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),n)},"PUBLIC")),tl(new Wa("analytics-internal",function(e){try{const t=e.getProvider(Op).getImmediate();return{logEvent:(e,n,r)=>cf(t,e,n,r),setUserProperties:(e,n)=>lf(t,e,n)}}catch(y_){throw Bp.create("interop-component-reg-failed",{reason:y_})}},"PRIVATE")),ll(df,hf),ll(df,hf,"esm2020");const pf="@firebase/database",ff="1.1.0";let gf="";function mf(e){gf=e}class vf{constructor(e){this.domStorage_=e,this.prefix_="firebase:"}set(e,t){null==t?this.domStorage_.removeItem(this.prefixedName_(e)):this.domStorage_.setItem(this.prefixedName_(e),Sa(t))}get(e){const t=this.domStorage_.getItem(this.prefixedName_(e));return null==t?null:ka(t)}remove(e){this.domStorage_.removeItem(this.prefixedName_(e))}prefixedName_(e){return this.prefix_+e}toString(){return this.domStorage_.toString()}}class yf{constructor(){this.cache_={},this.isInMemoryStorage=!0}set(e,t){null==t?delete this.cache_[e]:this.cache_[e]=t}get(e){return Fa(this.cache_,e)?this.cache_[e]:null}remove(e){delete this.cache_[e]}}const Df=function(e){try{if("undefined"!==typeof window&&"undefined"!==typeof window[e]){const t=window[e];return t.setItem("firebase:sentinel","cache"),t.removeItem("firebase:sentinel"),new vf(t)}}catch(y_){}return new yf},_f=Df("localStorage"),bf=Df("sessionStorage"),wf=new tu("@firebase/database"),Ef=function(){let e=1;return function(){return e++}}(),Cf=function(e){const t=function(e){const t=[];let n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);if(i>=55296&&i<=56319){const t=i-55296;r++,Gs(r<e.length,"Surrogate pair missing trail surrogate."),i=65536+(t<<10)+(e.charCodeAt(r)-56320)}i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):i<65536?(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t}(e),n=new La;n.update(t);const r=n.digest();return Js.encodeByteArray(r)},kf=function(){let e="";for(let t=0;t<arguments.length;t++){const n=t<0||arguments.length<=t?void 0:arguments[t];Array.isArray(n)||n&&"object"===typeof n&&"number"===typeof n.length?e+=kf.a
2pply(null,n):e+="object"===typeof n?Sa(n):n,e+=" "}return e};let Sf=null,xf=!0;const Ff=function(e,t){Gs(!t||!0===e||!1===e,"Can't turn on custom loggers persistently."),!0===e?(wf.logLevel=Ja.VERBOSE,Sf=wf.log.bind(wf),t&&bf.set("logging_enabled",!0)):"function"===typeof e?Sf=e:(Sf=null,bf.remove("logging_enabled"))},Af=function(){if(!0===xf&&(xf=!1,null===Sf&&!0===bf.get("logging_enabled")&&Ff(!0)),Sf){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=kf.apply(null,t);Sf(r)}},Tf=function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];Af(e,...n)}},If=function(){const e="FIREBASE INTERNAL ERROR: "+kf(...arguments);wf.error(e)},Pf=function(){const e="FIREBASE FATAL ERROR: ".concat(kf(...arguments));throw wf.error(e),new Error(e)},Of=function(){const e="FIREBASE WARNING: "+kf(...arguments);wf.warn(e)},Nf=function(e){return"number"===typeof e&&(e!==e||e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY)},Rf="[MIN_NAME]",Bf="[MAX_NAME]",Lf=function(e,t){if(e===t)return 0;if(e===Rf||t===Bf)return-1;if(t===Rf||e===Bf)return 1;{const n=$f(e),r=$f(t);return null!==n?null!==r?n-r===0?e.length-t.length:n-r:-1:null!==r?1:e<t?-1:1}},Mf=function(e,t){return e===t?0:e<t?-1:1},jf=function(e,t){if(t&&e in t)return t[e];throw new Error("Missing required key ("+e+") in object: "+Sa(t))},zf=function(e){if("object"!==typeof e||null===e)return Sa(e);const t=[];for(const r in e)t.push(r);t.sort();let n="{";for(let r=0;r<t.length;r++)0!==r&&(n+=","),n+=Sa(t[r]),n+=":",n+=zf(e[t[r]]);return n+="}",n},Uf=function(e,t){const n=e.length;if(n<=t)return[e];const r=[];for(let i=0;i<n;i+=t)i+t>n?r.push(e.substring(i,n)):r.push(e.substring(i,i+t));return r};function Hf(e,t){for(const n in e)e.hasOwnProperty(n)&&t(n,e[n])}const qf=function(e){Gs(!Nf(e),"Invalid JSON number");const t=1023;let n,r,i,o,s;0===e?(r=0,i=0,n=1/e===-1/0?1:0):(n=e<0,(e=Math.abs(e))>=Math.pow(2,-1022)?(o=Math.min(Math.floor(Math.log(e)/Math.LN2),t),r=o+t,i=Math.round(e*Math.pow(2,52-o)-Math.pow(2,52))):(r=0,i=Math.round(e/Math.pow(2,-1074))));const a=[];for(s=52;s;s-=1)a.push(i%2?1:0),i=Math.floor(i/2);for(s=11;s;s-=1)a.push(r%2?1:0),r=Math.floor(r/2);a.push(n?1:0),a.reverse();const u=a.join("");let l="";for(s=0;s<64;s+=8){let e=parseInt(u.substr(s,8),2).toString(16);1===e.length&&(e="0"+e),l+=e}return l.toLowerCase()};const Wf=new RegExp("^-?(0*)\\d{1,10}$"),$f=function(e){if(Wf.test(e)){const t=Number(e);if(t>=-2147483648&&t<=2147483647)return t}return null},Vf=function(e){try{e()}catch(y_){setTimeout(()=>{const t=y_.stack||"";throw Of("Exception was thrown by user callback.",t),y_},Math.floor(0))}},Gf=function(e,t){const n=setTimeout(e,t);return"number"===typeof n&&"undefined"!==typeof Deno&&Deno.unrefTimer?Deno.unrefTimer(n):"object"===typeof n&&n.unref&&n.unref(),n};class Kf{constructor(e,t){this.appCheckProvider=t,this.appName=e.name,rl(e)&&e.settings.appCheckToken&&(this.serverAppAppCheckToken=e.settings.appCheckToken),this.appCheck=null===t||void 0===t?void 0:t.getImmediate({optional:!0}),this.appCheck||null===t||void 0===t||t.get().then(e=>this.appCheck=e)}getToken(e){if(this.serverAppAppCheckToken){if(e)throw new Error("Attempted reuse of `FirebaseServerApp.appCheckToken` after previous usage failed.");return Promise.resolve({token:this.serverAppAppCheckToken})}return this.appCheck?this.appCheck.getToken(e):new Promise((t,n)=>{setTimeout(()=>{this.appCheck?this.getToken(e).then(t,n):t(null)},0)})}addTokenChangeListener(e){var t;null===(t=this.appCheckProvider)||void 0===t||t.get().then(t=>t.addTokenListener(e))}notifyForInvalidToken(){Of('Provided AppCheck credentials for the app named "'.concat(this.appName,'" ')+"are invalid. This usually indicates your app was not initialized correctly.")}}class Yf{constructor(e,t,n){this.appName_=e,this.firebaseOptions_=t,this.authProvider_=n,this.auth_=null,this.auth_=n.getImmediate({optional:!0}),this.auth_||n.onInit(e=>this.auth_=e)}getToken(e){return this.auth_?this.auth_.getToken(e).catch(e=>e&&"auth/token-not-initialized"===e.code?(Af("Got auth/token-not-initialized error. Treating as null token."),null):Promise.reject(e)):new Promise((t,n)=>{setTimeout(()=>{this.auth_?this.getToken(e).then(t,n):t(null)},0)})}addTokenChangeListener(e){this.auth_?this.auth_.addAuthTokenListener(e):this.authProvider_.get().then(t=>t.addAuthTokenListener(e))}removeTokenChangeListener(e){this.authProvider_.get().then(t=>t.removeAuthTokenListener(e))}notifyForInvalidToken(){let e='Provided authentication credentials for the app named "'+this.appName_+'" are invalid. This usually indicates your app was not initialized correctly. ';"credential"in this.firebaseOptions_?e+='Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.firebaseOptions_?e+='Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':e+='Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',Of(e)}}class Jf{constructor(e){this.accessToken=e}getToken(e){return Promise.resolve({accessToken:this.accessToken})}addTokenChangeListener(e){e(this.accessToken)}removeTokenChangeListener(e){}notifyForInvalidToken(){}}Jf.OWNER="owner";const Qf="5",Xf=/(console\.firebase|firebase-console-\w+\.corp|firebase\.corp)\.google\.com/,Zf="ac",eg="websocket",tg="long_polling";class ng{constructor(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",s=arguments.length>6&&void 0!==arguments[6]&&arguments[6],a=arguments.length>7&&void 0!==arguments[7]&&arguments[7],u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null;this.secure=t,this.namespace=n,this.webSocketOnly=r,this.nodeAdmin=i,this.persistenceKey=o,this.includeNamespaceInQueryParams=s,this.isUsingEmulator=a,this.emulatorOptions=u,this._host=e.toLowerCase(),this._domain=this._host.substr(this._host.indexOf(".")+1),this.internalHost=_f.get("host:"+e)||this._host}isCacheableHost(){return"s-"===this.internalHost.substr(0,2)}isCustomHost(){return"firebaseio.com"!==this._domain&&"firebaseio-demo.com"!==this._domain}get host(){return this._host}set host(e){e!==this.internalHost&&(this.internalHost=e,this.isCacheableHost()&&_f.set("host:"+this._host,this.internalHost))}toString(){let e=this.toURLString();return this.persistenceKey&&(e+="<"+this.persistenceKey+">"),e}toURLString(){const e=this.secure?"https://":"http://",t=this.includeNamespaceInQueryParams?"?ns=".concat(this.namespace):"";return"".concat(e).concat(this.host,"/").concat(t)}}function rg(e,t,n){let r;if(Gs("string"===typeof t,"typeof type must == string"),Gs("object"===typeof n,"typeof params must == object"),t===eg)r=(e.secure?"wss://":"ws://")+e.internalHost+"/.ws?";else{if(t!==tg)throw new Error("Unknown connection type: "+t);r=(e.secure?"https://":"http://")+e.internalHost+"/.lp?"}(function(e){return e.host!==e.internalHost||e.isCustomHost()||e.includeNamespaceInQueryParams})(e)&&(n.ns=e.namespace);const i=[];return Hf(n,(e,t)=>{i.push(e+"="+t)}
2),r+i.join("&")}class ig{constructor(){this.counters_={}}incrementCounter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;Fa(this.counters_,e)||(this.counters_[e]=0),this.counters_[e]+=t}get(){return ta(this.counters_)}}const og={},sg={};function ag(e){const t=e.toString();return og[t]||(og[t]=new ig),og[t]}class ug{constructor(e){this.onMessage_=e,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}closeAfter(e,t){this.closeAfterResponse=e,this.onClose=t,this.closeAfterResponse<this.currentResponseNum&&(this.onClose(),this.onClose=null)}handleResponse(e,t){for(this.pendingResponses[e]=t;this.pendingResponses[this.currentResponseNum];){const e=this.pendingResponses[this.currentResponseNum];delete this.pendingResponses[this.currentResponseNum];for(let t=0;t<e.length;++t)e[t]&&Vf(()=>{this.onMessage_(e[t])});if(this.currentResponseNum===this.closeAfterResponse){this.onClose&&(this.onClose(),this.onClose=null);break}this.currentResponseNum++}}}const lg="start";class cg{constructor(e,t,n,r,i,o,s){this.connId=e,this.repoInfo=t,this.applicationId=n,this.appCheckToken=r,this.authToken=i,this.transportSessionId=o,this.lastSessionId=s,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=Tf(e),this.stats_=ag(t),this.urlFn=e=>(this.appCheckToken&&(e[Zf]=this.appCheckToken),rg(t,tg,e))}open(e,t){var n=this;this.curSegmentNum=0,this.onDisconnect_=t,this.myPacketOrderer=new ug(e),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout(()=>{this.log_("Timed out trying to connect."),this.onClosed_(),this.connectTimeoutTimer_=null},Math.floor(3e4)),function(e){if(Da()||"complete"===document.readyState)e();else{let t=!1;const n=function(){document.body?t||(t=!0,e()):setTimeout(n,Math.floor(10))};document.addEventListener?(document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",()=>{"complete"===document.readyState&&n()}),window.attachEvent("onload",n))}}(()=>{if(this.isClosed_)return;this.scriptTagHolder=new dg(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const[i,o,s,a,u]=t;if(n.incrementIncomingBytes_(t),n.scriptTagHolder)if(n.connectTimeoutTimer_&&(clearTimeout(n.connectTimeoutTimer_),n.connectTimeoutTimer_=null),n.everConnected_=!0,i===lg)n.id=o,n.password=s;else{if("close"!==i)throw new Error("Unrecognized command received: "+i);o?(n.scriptTagHolder.sendNewPolls=!1,n.myPacketOrderer.closeAfter(o,()=>{n.onClosed_()})):n.onClosed_()}},function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const[i,o]=t;n.incrementIncomingBytes_(t),n.myPacketOrderer.handleResponse(i,o)},()=>{this.onClosed_()},this.urlFn);const e={};e[lg]="t",e.ser=Math.floor(1e8*Math.random()),this.scriptTagHolder.uniqueCallbackIdentifier&&(e.cb=this.scriptTagHolder.uniqueCallbackIdentifier),e.v=Qf,this.transportSessionId&&(e.s=this.transportSessionId),this.lastSessionId&&(e.ls=this.lastSessionId),this.applicationId&&(e.p=this.applicationId),this.appCheckToken&&(e[Zf]=this.appCheckToken),"undefined"!==typeof location&&location.hostname&&Xf.test(location.hostname)&&(e.r="f");const t=this.urlFn(e);this.log_("Connecting via long-poll to "+t),this.scriptTagHolder.addTag(t,()=>{})})}start(){this.scriptTagHolder.startLongPoll(this.id,this.password),this.addDisconnectPingFrame(this.id,this.password)}static forceAllow(){cg.forceAllow_=!0}static forceDisallow(){cg.forceDisallow_=!0}static isAvailable(){return!Da()&&(!!cg.forceAllow_||!cg.forceDisallow_&&"undefined"!==typeof document&&null!=document.createElement&&!("object"===typeof window&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))&&!("object"===typeof Windows&&"object"===typeof Windows.UI))}markConnectionHealthy(){}shutdown_(){this.isClosed_=!0,this.scriptTagHolder&&(this.scriptTagHolder.close(),this.scriptTagHolder=null),this.myDisconnFrame&&(document.body.removeChild(this.myDisconnFrame),this.myDisconnFrame=null),this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null)}onClosed_(){this.isClosed_||(this.log_("Longpoll is closing itself"),this.shutdown_(),this.onDisconnect_&&(this.onDisconnect_(this.everConnected_),this.onDisconnect_=null))}close(){this.isClosed_||(this.log_("Longpoll is being closed."),this.shutdown_())}send(e){const t=Sa(e);this.bytesSent+=t.length,this.stats_.incrementCounter("bytes_sent",t.length);const n=Xs(t),r=Uf(n,1840);for(let i=0;i<r.length;i++)this.scriptTagHolder.enqueueSegment(this.curSegmentNum,r.length,r[i]),this.curSegmentNum++}addDisconnectPingFrame(e,t){if(Da())return;this.myDisconnFrame=document.createElement("iframe");const n={dframe:"t"};n.id=e,n.pw=t,this.myDisconnFrame.src=this.urlFn(n),this.myDisconnFrame.style.display="none",document.body.appendChild(this.myDisconnFrame)}incrementIncomingBytes_(e){const t=Sa(e).length;this.bytesReceived+=t,this.stats_.incrementCounter("bytes_received",t)}}class dg{constructor(e,t,n,r){if(this.onDisconnect=n,this.urlFn=r,this.outstandingRequests=new Set,this.pendingSegs=[],this.currentSerial=Math.floor(1e8*Math.random()),this.sendNewPolls=!0,Da())this.commandCB=e,this.onMessageCB=t;else{this.uniqueCallbackIdentifier=Ef(),window["pLPCommand"+this.uniqueCallbackIdentifier]=e,window["pRTLPCB"+this.uniqueCallbackIdentifier]=t,this.myIFrame=dg.createI
2Frame_();let n="";if(this.myIFrame.src&&"javascript:"===this.myIFrame.src.substr(0,11)){n='<script>document.domain="'+document.domain+'";<\/script>'}const r="<html><body>"+n+"</body></html>";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(r),this.myIFrame.doc.close()}catch(y_){Af("frame writing exception"),y_.stack&&Af(y_.stack),Af(y_)}}}static createIFrame_(){const e=document.createElement("iframe");if(e.style.display="none",!document.body)throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";document.body.appendChild(e);try{e.contentWindow.document||Af("No IE domain setting required")}catch(y_){const n=document.domain;e.src="javascript:void((function(){document.open();document.domain='"+n+"';document.close();})())"}return e.contentDocument?e.doc=e.contentDocument:e.contentWindow?e.doc=e.contentWindow.document:e.document&&(e.doc=e.document),e}close(){this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.textContent="",setTimeout(()=>{null!==this.myIFrame&&(document.body.removeChild(this.myIFrame),this.myIFrame=null)},Math.floor(0)));const e=this.onDisconnect;e&&(this.onDisconnect=null,e())}startLongPoll(e,t){for(this.myID=e,this.myPW=t,this.alive=!0;this.newRequest_(););}newRequest_(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.size<(this.pendingSegs.length>0?2:1)){this.currentSerial++;const e={};e.id=this.myID,e.pw=this.myPW,e.ser=this.currentSerial;let t=this.urlFn(e),n="",r=0;for(;this.pendingSegs.length>0;){if(!(this.pendingSegs[0].d.length+30+n.length<=1870))break;{const e=this.pendingSegs.shift();n=n+"&seg"+r+"="+e.seg+"&ts"+r+"="+e.ts+"&d"+r+"="+e.d,r++}}return t+=n,this.addLongPollTag_(t,this.currentSerial),!0}return!1}enqueueSegment(e,t,n){this.pendingSegs.push({seg:e,ts:t,d:n}),this.alive&&this.newRequest_()}addLongPollTag_(e,t){this.outstandingRequests.add(t);const n=()=>{this.outstandingRequests.delete(t),this.newRequest_()},r=setTimeout(n,Math.floor(25e3));this.addTag(e,()=>{clearTimeout(r),n()})}addTag(e,t){Da()?this.doNodeLongPoll(e,t):setTimeout(()=>{try{if(!this.sendNewPolls)return;const n=this.myIFrame.doc.createElement("script");n.type="text/javascript",n.async=!0,n.src=e,n.onload=n.onreadystatechange=function(){const e=n.readyState;e&&"loaded"!==e&&"complete"!==e||(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),t())},n.onerror=()=>{Af("Long-poll script failed to load: "+e),this.sendNewPolls=!1,this.close()},this.myIFrame.doc.body.appendChild(n)}catch(y_){}},Math.floor(1))}}let hg=null;"undefined"!==typeof MozWebSocket?hg=MozWebSocket:"undefined"!==typeof WebSocket&&(hg=WebSocket);class pg{constructor(e,t,n,r,i,o,s){this.connId=e,this.applicationId=n,this.appCheckToken=r,this.authToken=i,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=Tf(this.connId),this.stats_=ag(t),this.connURL=pg.connectionURL_(t,o,s,r,n),this.nodeAdmin=t.nodeAdmin}static connectionURL_(e,t,n,r,i){const o={};return o.v=Qf,!Da()&&"undefined"!==typeof location&&location.hostname&&Xf.test(location.hostname)&&(o.r="f"),t&&(o.s=t),n&&(o.ls=n),r&&(o[Zf]=r),i&&(o.p=i),rg(e,eg,o)}open(e,t){this.onDisconnect=t,this.onMessage=e,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,_f.set("previous_websocket_failure",!0);try{let e;if(Da()){const t=this.nodeAdmin?"AdminNode":"Node";e={headers:{"User-Agent":"Firebase/".concat(Qf,"/").concat(gf,"/").concat(process.platform,"/").concat(t),"X-Firebase-GMPID":this.applicationId||""}},this.authToken&&(e.headers.Authorization="Bearer ".concat(this.authToken)),this.appCheckToken&&(e.headers["X-Firebase-AppCheck"]=this.appCheckToken);const n={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!1,REACT_APP_FIREBASE_API_KEY:"AIzaSyALEGvK3ycTxgC8s7NwtatmIFPEwspoWQU"},r=0===this.connURL.indexOf("wss://")?n.HTTPS_PROXY||n.https_proxy:n.HTTP_PROXY||n.http_proxy;r&&(e.proxy={origin:r})}this.mySock=new hg(this.connURL,[],e)}catch(y_){this.log_("Error instantiating WebSocket.");const t=y_.message||y_.data;return t&&this.log_(t),void this.onClosed_()}this.mySock.onopen=()=>{this.log_("Websocket connected."),this.everConnected_=!0}
vendor: 13,128 bytes, line 2
2,this.mySock.onclose=()=>{this.log_("Websocket connection was disconnected."),this.mySock=null,this.onClosed_()},this.mySock.onmessage=e=>{this.handleIncomingFrame(e)},this.mySock.onerror=e=>{this.log_("WebSocket error. Closing connection.");const t=e.message||e.data;t&&this.log_(t),this.onClosed_()}}start(){}static forceDisallow(){pg.forceDisallow_=!0}static isAvailable(){let e=!1;if("undefined"!==typeof navigator&&navigator.userAgent){const t=/Android ([0-9]{0,}\.[0-9]{0,})/,n=navigator.userAgent.match(t);n&&n.length>1&&parseFloat(n[1])<4.4&&(e=!0)}return!e&&null!==hg&&!pg.forceDisallow_}static previouslyFailed(){return _f.isInMemoryStorage||!0===_f.get("previous_websocket_failure")}markConnectionHealthy(){_f.remove("previous_websocket_failure")}appendFrame_(e){if(this.frames.push(e),this.frames.length===this.totalFrames){const e=this.frames.join("");this.frames=null;const t=ka(e);this.onMessage(t)}}handleNewFrameCount_(e){this.totalFrames=e,this.frames=[]}extractFrameCount_(e){if(Gs(null===this.frames,"We already have a frame buffer"),e.length<=6){const t=Number(e);if(!isNaN(t))return this.handleNewFrameCount_(t),null}return this.handleNewFrameCount_(1),e}handleIncomingFrame(e){if(null===this.mySock)return;const t=e.data;if(this.bytesReceived+=t.length,this.stats_.incrementCounter("bytes_received",t.length),this.resetKeepAlive(),null!==this.frames)this.appendFrame_(t);else{const e=this.extractFrameCount_(t);null!==e&&this.appendFrame_(e)}}send(e){this.resetKeepAlive();const t=Sa(e);this.bytesSent+=t.length,this.stats_.incrementCounter("bytes_sent",t.length);const n=Uf(t,16384);n.length>1&&this.sendString_(String(n.length));for(let r=0;r<n.length;r++)this.sendString_(n[r])}shutdown_(){this.isClosed_=!0,this.keepaliveTimer&&(clearInterval(this.keepaliveTimer),this.keepaliveTimer=null),this.mySock&&(this.mySock.close(),this.mySock=null)}onClosed_(){this.isClosed_||(this.log_("WebSocket is closing itself"),this.shutdown_(),this.onDisconnect&&(this.onDisconnect(this.everConnected_),this.onDisconnect=null))}close(){this.isClosed_||(this.log_("WebSocket is being closed"),this.shutdown_())}resetKeepAlive(){clearInterval(this.keepaliveTimer),this.keepaliveTimer=setInterval(()=>{this.mySock&&this.sendString_("0"),this.resetKeepAlive()},Math.floor(45e3))}sendString_(e){try{this.mySock.send(e)}catch(y_){this.log_("Exception thrown from WebSocket.send():",y_.message||y_.data,"Closing connection."),setTimeout(this.onClosed_.bind(this),0)}}}pg.responsesRequiredToBeHealthy=2,pg.healthyTimeout=3e4;class fg{static get ALL_TRANSPORTS(){return[cg,pg]}static get IS_TRANSPORT_INITIALIZED(){return this.globalTransportInitialized_}constructor(e){this.initTransports_(e)}initTransports_(e){const t=pg&&pg.isAvailable();let n=t&&!pg.previouslyFailed();if(e.webSocketOnly&&(t||Of("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),n=!0),n)this.transports_=[pg];else{const e=this.transports_=[];for(const t of fg.ALL_TRANSPORTS)t&&t.isAvailable()&&e.push(t);fg.globalTransportInitialized_=!0}}initialTransport(){if(this.transports_.length>0)return this.transports_[0];throw new Error("No transports available")}upgradeTransport(){return this.transports_.length>1?this.transports_[1]:null}}fg.globalTransportInitialized_=!1;class gg{constructor(e,t,n,r,i,o,s,a,u,l){this.id=e,this.repoInfo_=t,this.applicationId_=n,this.appCheckToken_=r,this.authToken_=i,this.onMessage_=o,this.onReady_=s,this.onDisconnect_=a,this.onKill_=u,this.lastSessionId=l,this.connectionCount=0,this.pendingDataMessages=[],this.state_=0,this.log_=Tf("c:"+this.id+":"),this.transportManager_=new fg(t),this.log_("Connection created"),this.start_()}start_(){const e=this.transportManager_.initialTransport();this.conn_=new e(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,null,this.lastSessionId),this.primaryResponsesRequired_=e.responsesRequiredToBeHealthy||0;const t=this.connReceiver_(this.conn_),n=this.disconnReceiver_(this.conn_);this.tx_=this.conn_,this.rx_=this.conn_,this.secondaryConn_=null,this.isHealthy_=!1,setTimeout(()=>{this.conn_&&this.conn_.open(t,n)},Math.floor(0));const r=e.healthyTimeout||0;r>0&&(this.healthyTimeout_=Gf(()=>{this.healthyTimeout_=null,this.isHealthy_||(this.conn_&&this.conn_.bytesReceived>102400?(this.log_("Connection exceeded healthy timeout but has received "+this.conn_.bytesReceived+" bytes. Marking connection healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()):this.conn_&&this.conn_.bytesSent>10240?this.log_("Connection exceeded healthy timeout but has sent "+this.conn_.bytesSent+" bytes. Leaving connection alive."):(this.log_("Closing unhealthy connection after timeout."),this.close()))},Math.floor(r)))}nextTransportId_(){return"c:"+this.id+":"+this.connectionCount++}disconnReceiver_(e){return t=>{e===this.conn_?this.onConnectionLost_(t):e===this.secondaryConn_?(this.log_("Secondary connection lost."),this.onSecondaryConnectionLost_()):this.log_("closing an old connection")}}connReceiver_(e){return t=>{2!==this.state_&&(e===this.rx_?this.onPrimaryMessageReceived_(t):e===this.secondaryConn_?this.onSecondaryMessageReceived_(t):this.log_("message on old connection"))}}sendRequest(e){const t={t:"d",d:e};this.sendData_(t)}tryCleanupConnection(){this.tx_===this.secondaryConn_&&this.rx_===this.secondaryConn_&&(this.log_("cleaning up and promoting a connection: "+this.secondaryConn_.connId),this.conn_=this.secondaryConn_,this.secondaryConn_=null)}onSecondaryControl_(e){if("t"in e){const t=e.t;"a"===t?this.upgradeIfSecondaryHealthy_():"r"===t?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),this.tx_!==this.secondaryConn_&&this.rx_!==this.secondaryConn_||this.close()):"o"===t&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}}onSecondaryMessageReceived_(e){const t=jf("t",e),n=jf("d",e);if("c"===t)this.onSecondaryControl_(n);else{if("d"!==t)throw new Error("Unknown protocol layer: "+t);this.pendingDataMessages.push(n)}}upgradeIfSecondaryHealthy_(){this.secondaryResponsesRequired_<=0?(this.log_("Secondary connection is healthy."),this.isHealthy_=!0,this.secondaryConn_.markConnectionHealthy(),this.proceedWithUpgrade_()):(this.log_("sending ping on secondary."),this.secondaryConn_.send({t:"c",d:{t:"p",d:{}}}))}proceedWithUpgrade_(){this.secondaryConn_.start(),this.log_("sending client ack on secondary"),this.secondaryConn_.send({t:"c",d:{t:"a",d:{}}}),this.log_("Ending transmission on primary"),this.conn_.send({t:"c",d:{t:"n",d:{}}}),this.tx_=this.secondaryConn_,this.tryCleanupConnection()}onPrimaryMessageReceived_(e){const t=jf("t",e),n=jf("d",e);"c"===t?this.onControl_(n):"d"===t&&this.onDataMessage_(n)}onDataMessage_(e){this.onPrimaryResponse_(),this.onMessage_(e)}onPrimaryResponse_(){this.isHealthy_||(this.primaryResponsesRequired_--,this.primaryResponsesRequired_<=0&&(this.log_("Primary connection is healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()))}onControl_(e){const t=jf("t",e);if("d"in e){const n=e.d;if("h"===t){const e=c({},n);this.repoInfo_.isUsingEmulator&&(e.h=this.repoInfo_.host),this.onHandshake_(e)}else if("n"===t){this.log_("recvd end transmission on primary"),this.rx_=this.secondaryConn_;for(let e=0;e<this.pendingDataMessages.length;++e)this.onDataMessage_(this.pendingDataMessages[e]);this.pendingDataMessages=[],this.tryCleanupConnection()}else"s"===t?this.onConnectionShutdown_(n):"r"===t?this.onReset_(n):"e"===t?If("Server Error: "+n):"o"===t?(this.log_("got pong on primary."),this.onPrimaryResponse_(),this.sendPingOnPrimaryIfNecessary_()):If("Unknown control packet command: "+t)}}onHandshake_(e){const t=e.ts,n=e.v,r=e.h;this.sessionId=e.s,this.repoInfo_.host=r,0===this.state_&&(this.conn_.start(),this.onConnectionEstablished_(this.conn_,t),Qf!==n&&Of("Protocol version mismatch detected"),this.tryStartUpgrade_())}tryStartUpgrade_(){const e=this.transportManager_.upgradeTransport();e&&this.startUpgrade_(e)}startUpgrade_(e){this.secondaryConn_=new e(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,this.sessionId),this.secondaryResponsesRequired_=e.responsesRequiredToBeHealthy||0;const t=this.connReceiver_(this.secondaryConn_),n=this.disconnReceiver_(this.secondaryConn_);this.secondaryConn_.open(t,n),Gf(()=>{this.secondaryConn_&&(this.log_("Timed out trying to upgrade."),this.secondaryConn_.close())},Math.floor(6e4))}onReset_(e){this.log_("Reset packet received. New host: "+e),this.repoInfo_.host=e,1===this.state_?this.close():(this.closeConnections_(),this.start_())}onConnectionEstablished_(e,t){this.log_("Realtime connection established."),this.conn_=e,this.state_=1,this.onReady_&&(this.onReady_(t,this.sessionId),this.onReady_=null),0===this.primaryResponsesRequired_?(this.log_("Primary connection is healthy."),this.isHealthy_=!0):Gf(()=>{this.sendPingOnPrimaryIfNecessary_()},Math.floor(5e3))}sendPingOnPrimaryIfNecessary_(){this.isHealthy_||1!==this.state_||(this.log_("sending ping on primary."),this.sendData_({t:"c",d:{t:"p",d:{}}}))}onSecondaryConnectionLost_(){const e=this.secondaryConn_;this.secondaryConn_=null,this.tx_!==e&&this.rx_!==e||this.close()}onConnectionLost_(e){this.conn_=null,e||0!==this.state_?1===this.state_&&this.log_("Realtime connection lost."):(this.log_("Realtime connection failed."),this.repoInfo_.isCacheableHost()&&(_f.remove("host:"+this.repoInfo_.host),this.repoInfo_.internalHost=this.repoInfo_.host)),this.close()}onConnectionShutdown_(e){this.log_("Connection shutdown command received. Shutting down..."),this.onKill_&&(this.onKill_(e),this.onKill_=null),this.onDisconnect_=null,this.close()}sendData_(e){if(1!==this.state_)throw"Connection is not connected";this.tx_.send(e)}close(){2!==this.state_&&(this.log_("Closing realtime connection."),this.state_=2,this.closeConnections_(),this.onDisconnect_&&(this.onDisconnect_(),this.onDisconnect_=null))}closeConnections_(){this.log_("Shutting down all connections"),this.conn_&&(this.conn_.close(),this.conn_=null),this.secondaryConn_&&(this.secondaryConn_.close(),this.secondaryConn_=null),this.healthyTimeout_&&(clearTimeout(this.healthyTimeout_),this.healthyTimeout_=null)}}class mg{put(e,t,n,r){}merge(e,t,n,r){}refreshAuthToken(e){}refreshAppCheckToken(e){}onDisconnectPut(e,t,n){}onDisconnectMerge(e,t,n){}onDisconnectCancel(e,t){}reportStats(e){}}class vg{constructor(e){this.allowedEvents_=e,this.listeners_={},Gs(Array.isArray(e)&&e.length>0,"Requires a non-empty array")}trigger(e){if(Array.isArray(this.listeners_[e])){const i=[...this.listeners_[e]];for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(let e=0;e<i.length;e++)i[e].callback.apply(i[e].context,n)}}on(e,t,n){this.validateEventType_(e),this.listeners_[e]=this.listeners_[e]||[],this.listeners_[e].push({callback:t,context:n});const r=this.getInitialEvent(e);r&&t.apply(n,r)}off(e,t,n){this.validateEventType_(e);const r=this.listeners_[e]||[];for(let i=0;i<r.length;i++)if(r[i].callback===t&&(!n||n===r[i].context))return void r.splice(i,1)}validateEventType_(e){Gs(this.allowedEvents_.find(t=>t===e),"Unknown event: "+e)}}class yg extends vg{static getInstance(){return new yg}constructor(){super(["online"]),this.online_=!0,"undefined"===typeof window||"undefined"===typeof window.addEventListener||ma()||(window.addEventListener("online",()=>{this.online_||(this.online_=!0,this.trigger("online",!0))},!1),window.addEventListener("offline",()=>{this.online_&&(this.online_=!1,this.trigger("online",!1))},!1))}getInitialEvent(e){return Gs("online"===e,"Unknown event type: "+e),[this.online_]}currentlyOnline(){return this.online_}}class Dg{constructor(e,t){if(void 0===t){this.pieces_=e.split("/");let t=0;for(let e=0;e<this.pieces_.length;e++)this.pieces_[e].length>0&&(this.pieces_[t]=this.pieces_[e],t++);this.pieces_.length=t,this.pieceNum_=0}else this.pieces_=e,this.pieceNum_=t}toString(){let e="";for(let t=this.pieceNum_;t<this.pieces_.length;t++)""!==this.pieces_[t]&&(e+="/"+this.pieces_[t]);return e||"/"}}function _g(){return new Dg("")}function bg(e){return e.pieceNum_>=e.pieces_.length?null:e.pieces_[e.pieceNum_]}function wg(e){return e.pieces_.length-e.pieceNum_}function Eg(e){let t=e.pieceNum_;return t<e.pieces_.length&&t++,new Dg(e.pieces_,t)}function Cg(e){return e.pieceNum_<e.pieces_.length?e.pieces_[e.pieces_.length-1]:null}function kg(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.pieces_.slice(e.pieceNum_+t)}function Sg(e){if(e.pieceNum_>=e.pieces_.length)return null;const t=[];for(let n=e.pieceNum_;n<e.pieces_.length-1;n++)t.push(e.pieces_[n]);return new Dg(t,0)}function xg(e,t){const n=[];for(let r=e.pieceNum_;r<e.pieces_.length;r++)n.push(e.pieces_[r]);if(t instanceof Dg)for(let r=t.pieceNum_;r<t.pieces_.length;r++)n.push(t.pieces_[r]);else{const e=t.split("/");for(let t=0;t<e.length;t++)e[t].length>0&&n.push(e[t])}return new Dg(n,0)}function Fg(e){return e.pieceNum_>=e.pieces_.length}function Ag(e,t){const n=bg(e),r=bg(t);if(null===n)return t;if(n===r)return Ag(Eg(e),Eg(t));
2throw new Error("INTERNAL ERROR: innerPath ("+t+") is not within outerPath ("+e+")")}function Tg(e,t){const n=kg(e,0),r=kg(t,0);for(let i=0;i<n.length&&i<r.length;i++){const e=Lf(n[i],r[i]);if(0!==e)return e}return n.length===r.length?0:n.length<r.length?-1:1}function Ig(e,t){if(wg(e)!==wg(t))return!1;for(let n=e.pieceNum_,r=t.pieceNum_;n<=e.pieces_.length;n++,r++)if(e.pieces_[n]!==t.pieces_[r])return!1;return!0}function Pg(e,t){let n=e.pieceNum_,r=t.pieceNum_;if(wg(e)>wg(t))return!1;for(;n<e.pieces_.length;){if(e.pieces_[n]!==t.pieces_[r])return!1;++n,++r}return!0}class Og{constructor(e,t){this.errorPrefix_=t,this.parts_=kg(e,0),this.byteLength_=Math.max(1,this.parts_.length);for(let n=0;n<this.parts_.length;n++)this.byteLength_+=Ua(this.parts_[n]);Ng(this)}}function Ng(e){if(e.byteLength_>768)throw new Error(e.errorPrefix_+"has a key path longer than 768 bytes ("+e.byteLength_+").");if(e.parts_.length>32)throw new Error(e.errorPrefix_+"path specified exceeds the maximum depth that can be written (32) or object contains a cycle "+Rg(e))}function Rg(e){return 0===e.parts_.length?"":"in property '"+e.parts_.join(".")+"'"}class Bg extends vg{static getInstance(){return new Bg}constructor(){let e,t;super(["visible"]),"undefined"!==typeof document&&"undefined"!==typeof document.addEventListener&&("undefined"!==typeof document.hidden?(t="visibilitychange",e="hidden"):"undefined"!==typeof document.mozHidden?(t="mozvisibilitychange",e="mozHidden"):"undefined"!==typeof document.msHidden?(t="msvisibilitychange",e="msHidden"):"undefined"!==typeof document.webkitHidden&&(t="webkitvisibilitychange",e="webkitHidden")),this.visible_=!0,t&&document.addEventListener(t,()=>{const t=!document[e];t!==this.visible_&&(this.visible_=t,this.trigger("visible",t))},!1)}getInitialEvent(e){return Gs("visible"===e,"Unknown event type: "+e),[this.visible_]}}const Lg=1e3;class Mg extends mg{constructor(e,t,n,r,i,o,s,a){if(super(),this.repoInfo_=e,this.applicationId_=t,this.onDataUpdate_=n,this.onConnectStatus_=r,this.onServerInfoUpdate_=i,this.authTokenProvider_=o,this.appCheckTokenProvider_=s,this.authOverride_=a,this.id=Mg.nextPersistentConnectionId_++,this.log_=Tf("p:"+this.id+":"),this.interruptReasons_={},this.listens=new Map,this.outstandingPuts_=[],this.outstandingGets_=[],this.outstandingPutCount_=0,this.outstandingGetCount_=0,this.onDisconnectRequestQueue_=[],this.connected_=!1,this.reconnectDelay_=Lg,this.maxReconnectDelay_=3e5,this.securityDebugCallback_=null,this.lastSessionId=null,this.establishConnectionTimer_=null,this.visible_=!1,this.requestCBHash_={},this.requestNumber_=0,this.realtime_=null,this.authToken_=null,this.appCheckToken_=null,this.forceTokenRefresh_=!1,this.invalidAuthTokenCount_=0,this.invalidAppCheckTokenCount_=0,this.firstConnection_=!0,this.lastConnectionAttemptTime_=null,this.lastConnectionEstablishedTime_=null,a&&!Da())throw new Error("Auth override specified in options, but not supported on non Node.js platforms");Bg.getInstance().on("visible",this.onVisible_,this),-1===e.host.indexOf("fblocal")&&yg.getInstance().on("online",this.onOnline_,this)}sendRequest(e,t,n){const r=++this.requestNumber_,i={r:r,a:e,b:t};this.log_(Sa(i)),Gs(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(i),n&&(this.requestCBHash_[r]=n)}get(e){this.initConnection_();const t=new la,n={action:"g",request:{p:e._path.toString(),q:e._queryObject},onComplete:e=>{const n=e.d;"ok"===e.s?t.resolve(n):t.reject(n)}};this.outstandingGets_.push(n),this.outstandingGetCount_++;const r=this.outstandingGets_.length-1;return this.connected_&&this.sendGet_(r),t.promise}listen(e,t,n,r){this.initConnection_();const i=e._queryIdentifier,o=e._path.toString();this.log_("Listen called for "+o+" "+i),this.listens.has(o)||this.listens.set(o,new Map),Gs(e._queryParams.isDefault()||!e._queryParams.loadsAllData(),"listen() called for non-default but complete query"),Gs(!this.listens.get(o).has(i),"listen() called twice for same path/queryId.");const s={onComplete:r,hashFn:t,query:e,tag:n};this.listens.get(o).set(i,s),this.connected_&&this.sendListen_(s)}sendGet_(e){const t=this.outstandingGets_[e];this.sendRequest("g",t.request,n=>{delete this.outstandingGets_[e],this.outstandingGetCount_--,0===this.outstandingGetCount_&&(this.outstandingGets_=[]),t.onComplete&&t.onComplete(n)})}sendListen_(e){const t=e.query,n=t._path.toString(),r=t._queryIdentifier;this.log_("Listen on "+n+" for "+r);const i={p:n};e.tag&&(i.q=t._queryObject,i.t=e.tag),i.h=e.hashFn(),this.sendRequest("q",i,i=>{const o=i.d,s=i.s;
2Mg.warnOnListenWarnings_(o,t);(this.listens.get(n)&&this.listens.get(n).get(r))===e&&(this.log_("listen response",i),"ok"!==s&&this.removeListen_(n,r),e.onComplete&&e.onComplete(s,o))})}static warnOnListenWarnings_(e,t){if(e&&"object"===typeof e&&Fa(e,"w")){const n=Aa(e,"w");if(Array.isArray(n)&&~n.indexOf("no_index")){const e='".indexOn": "'+t._queryParams.getIndex().toString()+'"',n=t._path.toString();Of("Using an unspecified index. Your data will be downloaded and "+"filtered on the client. Consider adding ".concat(e," at ")+"".concat(n," to your security rules for better performance."))}}}refreshAuthToken(e){this.authToken_=e,this.log_("Auth token refreshed"),this.authToken_?this.tryAuth():this.connected_&&this.sendRequest("unauth",{},()=>{}),this.reduceReconnectDelayIfAdminCredential_(e)}reduceReconnectDelayIfAdminCredential_(e){(e&&40===e.length||function(e){const t=xa(e).claims;return"object"===typeof t&&!0===t.admin}(e))&&(this.log_("Admin auth credential detected. Reducing max reconnect time."),this.maxReconnectDelay_=3e4)}refreshAppCheckToken(e){this.appCheckToken_=e,this.log_("App check token refreshed"),this.appCheckToken_?this.tryAppCheck():this.connected_&&this.sendRequest("unappeck",{},()=>{})}tryAuth(){if(this.connected_&&this.authToken_){const e=this.authToken_,t=function(e){const t=xa(e).claims;return!!t&&"object"===typeof t&&t.hasOwnProperty("iat")}(e)?"auth":"gauth",n={cred:e};null===this.authOverride_?n.noauth=!0:"object"===typeof this.authOverride_&&(n.authvar=this.authOverride_),this.sendRequest(t,n,t=>{const n=t.s,r=t.d||"error";this.authToken_===e&&("ok"===n?this.invalidAuthTokenCount_=0:this.onAuthRevoked_(n,r))})}}tryAppCheck(){this.connected_&&this.appCheckToken_&&this.sendRequest("appcheck",{token:this.appCheckToken_},e=>{const t=e.s,n=e.d||"error";"ok"===t?this.invalidAppCheckTokenCount_=0:this.onAppCheckRevoked_(t,n)})}unlisten(e,t){const n=e._path.toString(),r=e._queryIdentifier;this.log_("Unlisten called for "+n+" "+r),Gs(e._queryParams.isDefault()||!e._queryParams.loadsAllData(),"unlisten() called for non-default but complete query");this.removeListen_(n,r)&&this.connected_&&this.sendUnlisten_(n,r,e._queryObject,t)}sendUnlisten_(e,t,n,r){this.log_("Unlisten on "+e+" for "+t);const i={p:e};r&&(i.q=n,i.t=r),this.sendRequest("n",i)}onDisconnectPut(e,t,n){this.initConnection_(),this.connected_?this.sendOnDisconnect_("o",e,t,n):this.onDisconnectRequestQueue_.push({pathString:e,action:"o",data:t,onComplete:n})}onDisconnectMerge(e,t,n){this.initConnection_(),this.connected_?this.sendOnDisconnect_("om",e,t,n):this.onDisconnectRequestQueue_.push({pathString:e,action:"om",data:t,onComplete:n})}onDisconnectCancel(e,t){this.initConnection_(),this.connected_?this.sendOnDisconnect_("oc",e,null,t):this.onDisconnectRequestQueue_.push({pathString:e,action:"oc",data:null,onComplete:t})}sendOnDisconnect_(e,t,n,r){const i={p:t,d:n};this.log_("onDisconnect "+e,i),this.sendRequest(e,i,e=>{r&&setTimeout(()=>{r(e.s,e.d)},Math.floor(0))})}put(e,t,n,r){this.putInternal("p",e,t,n,r)}merge(e,t,n,r){this.putInternal("m",e,t,n,r)}putInternal(e,t,n,r,i){this.initConnection_();const o={p:t,d:n};void 0!==i&&(o.h=i),this.outstandingPuts_.push({action:e,request:o,onComplete:r}),this.outstandingPutCount_++;const s=this.outstandingPuts_.length-1;this.connected_?this.sendPut_(s):this.log_("Buffering put: "+t)}sendPut_(e){const t=this.outstandingPuts_[e].action,n=this.outstandingPuts_[e].request,r=this.outstandingPuts_[e].onComplete;this.outstandingPuts_[e].queued=this.connected_,this.sendRequest(t,n,n=>{this.log_(t+" response",n),delete this.outstandingPuts_[e],this.outstandingPutCount_--,0===this.outstandingPutCount_&&(this.outstandingPuts_=[]),r&&r(n.s,n.d)})}reportStats(e){if(this.connected_){const t={c:e};this.log_("reportStats",t),this.sendRequest("s",t,e=>{if("ok"!==e.s){const t=e.d;this.log_("reportStats","Error sending stats: "+t)}})}}onDataMessage_(e){if("r"in e){this.log_("from server: "+Sa(e));const t=e.r,n=this.requestCBHash_[t];n&&(delete this.requestCBHash_[t],n(e.b))}else{if("error"in e)throw"A server-side error has occurred: "+e.error;"a"in e&&this.onDataPush_(e.a,e.b)}}onDataPush_(e,t){this.log_("handleServerMessage",e,t),"d"===e?this.onDataUpdate_(t.p,t.d,!1,t.t):"m"===e?this.onDataUpdate_(t.p,t.d,!0,t.t):"c"===e?this.onListenRevoked_(t.p,t.q):"ac"===e?this.onAuthRevoked_(t.s,t.d):"apc"===e?this.onAppCheckRevoked_(t.s,t.d):"sd"===e?this.onSecurityDebugPacket_(t):If("Unrecognized action received from server: "+Sa(e)+"\nAre you using the latest client?")}onReady_(e,t){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=(new Date).getTime(),this.handleTimestamp_(e),this.lastSessionId=t,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)}scheduleConnect_(e){Gs(!this.realtime_,"Scheduling a connect when we're already connected/ing?"),this.establishConnectionTimer_&&clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=setTimeout(()=>{this.establishConnectionTimer_=null,this.establishConnection_()},Math.floor(e))}initConnection_(){!this.realtime_&&this.firstConnection_&&this.scheduleConnect_(0)}onVisible_(e){e&&!this.visible_&&this.reconnectDelay_===this.maxReconnectDelay_&&(this.log_("Window became visible. Reducing delay."),this.reconnectDelay_=Lg,this.realtime_||this.scheduleConnect_(0)),this.visible_=e}onOnline_(e){e?(this.log_("Browser went online."),this.reconnectDelay_=Lg,this.realtime_||this.scheduleConnect_(0)):(this.log_("Browser went offline. Killing connection."),this.realtime_&&this.realtime_.close())}onRealtimeDisconnect_(){if(this.log_("data client disconnected"),this.connected_=!1,this.realtime_=null,this.cancelSentTransactions_(),this.requestCBHash_={},this.shouldReconnect_()){if(this.visible_){if(this.lastConnectionEstablishedTime_){(new Date).getTime()-this.lastConnectionEstablishedTime_>3e4&&(this.reconnectDelay_=Lg),this.lastConnectionEstablishedTime_=null}}else this.log_("Window isn't visible. Delaying reconnect."),this.reconnectDelay_=this.maxReconnectDelay_,this.lastConnectionAttemptTime_=(new Date).getTime();const e=Math.max(0,(new Date).getTime()-this.lastConnectionAttemptTime_);let t=Math.max(0,this.reconnectDelay_-e);
vendor: 4,369 bytes, line 2
2t=Math.random()*t,this.log_("Trying to reconnect in "+t+"ms"),this.scheduleConnect_(t),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,1.3*this.reconnectDelay_)}this.onConnectStatus_(!1)}async establishConnection_(){if(this.shouldReconnect_()){this.log_("Making a connection attempt"),this.lastConnectionAttemptTime_=(new Date).getTime(),this.lastConnectionEstablishedTime_=null;const e=this.onDataMessage_.bind(this),t=this.onReady_.bind(this),n=this.onRealtimeDisconnect_.bind(this),r=this.id+":"+Mg.nextConnectionId_++,i=this.lastSessionId;let o=!1,s=null;const a=function(){s?s.close():(o=!0,n())},u=function(e){Gs(s,"sendRequest call when we're not connected not allowed."),s.sendRequest(e)};this.realtime_={close:a,sendRequest:u};const l=this.forceTokenRefresh_;this.forceTokenRefresh_=!1;try{const[a,u]=await Promise.all([this.authTokenProvider_.getToken(l),this.appCheckTokenProvider_.getToken(l)]);o?Af("getToken() completed but was canceled"):(Af("getToken() completed. Creating connection."),this.authToken_=a&&a.accessToken,this.appCheckToken_=u&&u.token,s=new gg(r,this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,e,t,n,e=>{Of(e+" ("+this.repoInfo_.toString()+")"),this.interrupt("server_kill")},i))}catch(If){this.log_("Failed to get token: "+If),o||(this.repoInfo_.nodeAdmin&&Of(If),a())}}}interrupt(e){Af("Interrupting connection for reason: "+e),this.interruptReasons_[e]=!0,this.realtime_?this.realtime_.close():(this.establishConnectionTimer_&&(clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=null),this.connected_&&this.onRealtimeDisconnect_())}resume(e){Af("Resuming connection for reason: "+e),delete this.interruptReasons_[e],Ta(this.interruptReasons_)&&(this.reconnectDelay_=Lg,this.realtime_||this.scheduleConnect_(0))}handleTimestamp_(e){const t=e-(new Date).getTime();this.onServerInfoUpdate_({serverTimeOffset:t})}cancelSentTransactions_(){for(let e=0;e<this.outstandingPuts_.length;e++){const t=this.outstandingPuts_[e];t&&"h"in t.request&&t.queued&&(t.onComplete&&t.onComplete("disconnect"),delete this.outstandingPuts_[e],this.outstandingPutCount_--)}0===this.outstandingPutCount_&&(this.outstandingPuts_=[])}onListenRevoked_(e,t){let n;n=t?t.map(e=>zf(e)).join("$"):"default";const r=this.removeListen_(e,n);r&&r.onComplete&&r.onComplete("permission_denied")}removeListen_(e,t){const n=new Dg(e).toString();let r;if(this.listens.has(n)){const e=this.listens.get(n);r=e.get(t),e.delete(t),0===e.size&&this.listens.delete(n)}else r=void 0;return r}onAuthRevoked_(e,t){Af("Auth token revoked: "+e+"/"+t),this.authToken_=null,this.forceTokenRefresh_=!0,this.realtime_.close(),"invalid_token"!==e&&"permission_denied"!==e||(this.invalidAuthTokenCount_++,this.invalidAuthTokenCount_>=3&&(this.reconnectDelay_=3e4,this.authTokenProvider_.notifyForInvalidToken()))}onAppCheckRevoked_(e,t){Af("App check token revoked: "+e+"/"+t),this.appCheckToken_=null,this.forceTokenRefresh_=!0,"invalid_token"!==e&&"permission_denied"!==e||(this.invalidAppCheckTokenCount_++,this.invalidAppCheckTokenCount_>=3&&this.appCheckTokenProvider_.notifyForInvalidToken())}onSecurityDebugPacket_(e){this.securityDebugCallback_?this.securityDebugCallback_(e):"msg"in e&&console.log("FIREBASE: "+e.msg.replace("\n","\nFIREBASE: "))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of this.listens.values())for(const t of e.values())this.sendListen_(t);for(let e=0;e<this.outstandingPuts_.length;e++)this.outstandingPuts_[e]&&this.sendPut_(e);for(;this.onDisconnectRequestQueue_.length;){const e=this.onDisconnectRequestQueue_.shift();this.sendOnDisconnect_(e.action,e.pathString,e.data,e.onComplete)}for(let e=0;e<this.outstandingGets_.length;e++)this.outstandingGets_[e]&&this.sendGet_(e)}sendConnectStats_(){const e={};let t="js";Da()&&(t=this.repoInfo_.nodeAdmin?"admin_node":"node"),e["sdk."+t+"."+gf.replace(/\./g,"-")]=1,ma()?e["framework.cordova"]=1:ya()&&(e["framework.reactnative"]=1),this.reportStats(e)}shouldReconnect_(){const e=yg.getInstance().currentlyOnline();return Ta(this.interruptReasons_)&&e}}Mg.nextPersistentConnectionId_=0,Mg.nextConnectionId_=0;class jg{constructor(e,t){this.name=e,this.node=t}static Wrap(e,t){return new jg(e,t)}}class zg{getCompare(){return this.compare.bind(this)}indexedValueChanged(e,t){const n=new jg(Rf,e),r=new jg(Rf,t);return 0!==this.compare(n,r)}
vendor: 13,358 bytes, line 2
2minPost(){return jg.MIN}}let Ug;class Hg extends zg{static get __EMPTY_NODE(){return Ug}static set __EMPTY_NODE(e){Ug=e}compare(e,t){return Lf(e.name,t.name)}isDefinedOn(e){throw Ks("KeyIndex.isDefinedOn not expected to be called.")}indexedValueChanged(e,t){return!1}minPost(){return jg.MIN}maxPost(){return new jg(Bf,Ug)}makePost(e,t){return Gs("string"===typeof e,"KeyIndex indexValue must always be a string."),new jg(e,Ug)}toString(){return".key"}}const qg=new Hg;class Wg{constructor(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;this.isReverse_=r,this.resultGenerator_=i,this.nodeStack_=[];let o=1;for(;!e.isEmpty();)if(o=t?n(e.key,t):1,r&&(o*=-1),o<0)e=this.isReverse_?e.left:e.right;else{if(0===o){this.nodeStack_.push(e);break}this.nodeStack_.push(e),e=this.isReverse_?e.right:e.left}}getNext(){if(0===this.nodeStack_.length)return null;let e,t=this.nodeStack_.pop();if(e=this.resultGenerator_?this.resultGenerator_(t.key,t.value):{key:t.key,value:t.value},this.isReverse_)for(t=t.left;!t.isEmpty();)this.nodeStack_.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.nodeStack_.push(t),t=t.left;return e}hasNext(){return this.nodeStack_.length>0}peek(){if(0===this.nodeStack_.length)return null;const e=this.nodeStack_[this.nodeStack_.length-1];return this.resultGenerator_?this.resultGenerator_(e.key,e.value):{key:e.key,value:e.value}}}class $g{constructor(e,t,n,r,i){this.key=e,this.value=t,this.color=null!=n?n:$g.RED,this.left=null!=r?r:Vg.EMPTY_NODE,this.right=null!=i?i:Vg.EMPTY_NODE}copy(e,t,n,r,i){return new $g(null!=e?e:this.key,null!=t?t:this.value,null!=n?n:this.color,null!=r?r:this.left,null!=i?i:this.right)}count(){return this.left.count()+1+this.right.count()}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||!!e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min_(){return this.left.isEmpty()?this:this.left.min_()}minKey(){return this.min_().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,t,n){let r=this;const i=n(e,r.key);return r=i<0?r.copy(null,null,null,r.left.insert(e,t,n),null):0===i?r.copy(null,t,null,null,null):r.copy(null,null,null,null,r.right.insert(e,t,n)),r.fixUp_()}removeMin_(){if(this.left.isEmpty())return Vg.EMPTY_NODE;let e=this;return e.left.isRed_()||e.left.left.isRed_()||(e=e.moveRedLeft_()),e=e.copy(null,null,null,e.left.removeMin_(),null),e.fixUp_()}remove(e,t){let n,r;if(n=this,t(e,n.key)<0)n.left.isEmpty()||n.left.isRed_()||n.left.left.isRed_()||(n=n.moveRedLeft_()),n=n.copy(null,null,null,n.left.remove(e,t),null);else{if(n.left.isRed_()&&(n=n.rotateRight_()),n.right.isEmpty()||n.right.isRed_()||n.right.left.isRed_()||(n=n.moveRedRight_()),0===t(e,n.key)){if(n.right.isEmpty())return Vg.EMPTY_NODE;r=n.right.min_(),n=n.copy(r.key,r.value,null,null,n.right.removeMin_())}n=n.copy(null,null,null,null,n.right.remove(e,t))}return n.fixUp_()}isRed_(){return this.color}fixUp_(){let e=this;return e.right.isRed_()&&!e.left.isRed_()&&(e=e.rotateLeft_()),e.left.isRed_()&&e.left.left.isRed_()&&(e=e.rotateRight_()),e.left.isRed_()&&e.right.isRed_()&&(e=e.colorFlip_()),e}moveRedLeft_(){let e=this.colorFlip_();return e.right.left.isRed_()&&(e=e.copy(null,null,null,null,e.right.rotateRight_()),e=e.rotateLeft_(),e=e.colorFlip_()),e}moveRedRight_(){let e=this.colorFlip_();return e.left.left.isRed_()&&(e=e.rotateRight_(),e=e.colorFlip_()),e}rotateLeft_(){const e=this.copy(null,null,$g.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight_(){const e=this.copy(null,null,$g.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip_(){const e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)}checkMaxDepth_(){const e=this.check_();return Math.pow(2,e)<=this.count()+1}check_(){if(this.isRed_()&&this.left.isRed_())throw new Error("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed_())throw new Error("Right child of ("+this.key+","+this.value+") is red");const e=this.left.check_();if(e!==this.right.check_())throw new Error("Black depths differ");return e+(this.isRed_()?0:1)}}$g.RED=!0,$g.BLACK=!1;class Vg{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Vg.EMPTY_NODE;this.comparator_=e,this.root_=t}insert(e,t){return new Vg(this.comparator_,this.root_.insert(e,t,this.comparator_).copy(null,null,$g.BLACK,null,null))}remove(e){return new Vg(this.comparator_,this.root_.remove(e,this.comparator_).copy(null,null,$g.BLACK,null,null))}get(e){let t,n=this.root_;for(;!n.isEmpty();){if(t=this.comparator_(e,n.key),0===t)return n.value;t<0?n=n.left:t>0&&(n=n.right)}return null}getPredecessorKey(e){let t,n=this.root_,r=null;for(;!n.isEmpty();){if(t=this.comparator_(e,n.key),0===t){if(n.left.isEmpty())return r?r.key:null;for(n=n.left;!n.right.isEmpty();)n=n.right;return n.key}t<0?n=n.left:t>0&&(r=n,n=n.right)}throw new Error("Attempted to find predecessor key for a nonexistent key. What gives?")}isEmpty(){return this.root_.isEmpty()}count(){return this.root_.count()}minKey(){return this.root_.minKey()}maxKey(){return this.root_.maxKey()}inorderTraversal(e){return this.root_.inorderTraversal(e)}reverseTraversal(e){return this.root_.reverseTraversal(e)}getIterator(e){return new Wg(this.root_,null,this.comparator_,!1,e)}getIteratorFrom(e,t){return new Wg(this.root_,e,this.comparator_,!1,t)}getReverseIteratorFrom(e,t){return new Wg(this.root_,e,this.comparator_,!0,t)}getReverseIterator(e){return new Wg(this.root_,null,this.comparator_,!0,e)}}function Gg(e,t){return Lf(e.name,t.name)}function Kg(e,t){return Lf(e,t)}let Yg;Vg.EMPTY_NODE=new class{copy(e,t,n,r,i){return this}insert(e,t,n){return new $g(e,t,null)}remove(e,t){return this}count(){return 0}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}check_(){return 0}isRed_(){return!1}};const Jg=function(e){return"number"===typeof e?"number:"+qf(e):"string:"+e},Qg=function(e){if(e.isLeafNode()){const t=e.val();Gs("string"===typeof t||"number"===typeof t||"object"===typeof t&&Fa(t,".sv"),"Priority must be a string or number.")}else Gs(e===Yg||e.isEmpty(),"priority of unexpected type.");Gs(e===Yg||e.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")};let Xg,Zg,em;class tm{static set __childrenNodeConstructor(e){Xg=e}static get __childrenNodeConstructor(){return Xg}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tm.__childrenNodeConstructor.EMPTY_NODE;this.value_=e,this.priorityNode_=t,this.lazyHash_=null,Gs(void 0!==this.value_&&null!==this.value_,"LeafNode shouldn't be created with null/undefined value."),Qg(this.priorityNode_)}isLeafNode(){return!0}getPriority(){return this.priorityNode_}updatePriority(e){return new tm(this.value_,e)}getImmediateChild(e){return".priority"===e?this.priorityNode_:tm.__childrenNodeConstructor.EMPTY_NODE}getChild(e){return Fg(e)?this:".priority"===bg(e)?this.priorityNode_:tm.__childrenNodeConstructor.EMPTY_NODE}hasChild(){return!1}getPredecessorChildName(e,t){return null}updateImmediateChild(e,t){return".priority"===e?this.updatePriority(t):t.isEmpty()&&".priority"!==e?this:tm.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(e,t).updatePriority(this.priorityNode_)}updateChild(e,t){const n=bg(e);return null===n?t:t.isEmpty()&&".priority"!==n?this:(Gs(".priority"!==n||1===wg(e),".priority must be the last token in a path"),this.updateImmediateChild(n,tm.__childrenNodeConstructor.EMPTY_NODE.updateChild(Eg(e),t)))}isEmpty(){return!1}numChildren(){return 0}forEachChild(e,t){return!1}val(e){return e&&!this.getPriority().isEmpty()?{".value":this.getValue(),".priority":this.getPriority().val()}:this.getValue()}hash(){if(null===this.lazyHash_){let e="";this.priorityNode_.isEmpty()||(e+="priority:"+Jg(this.priorityNode_.val())+":");const t=typeof this.value_;e+=t+":",e+="number"===t?qf(this.value_):this.value_,this.lazyHash_=Cf(e)}return this.lazyHash_}getValue(){return this.value_}compareTo(e){return e===tm.__childrenNodeConstructor.EMPTY_NODE?1:e instanceof tm.__childrenNodeConstructor?-1:(Gs(e.isLeafNode(),"Unknown node type"),this.compareToLeafNode_(e))}compareToLeafNode_(e){const t=typeof e.value_,n=typeof this.value_,r=tm.VALUE_TYPE_ORDER.indexOf(t),i=tm.VALUE_TYPE_ORDER.indexOf(n);return Gs(r>=0,"Unknown leaf type: "+t),Gs(i>=0,"Unknown leaf type: "+n),r===i?"object"===n?0:this.value_<e.value_?-1:this.value_===e.value_?0:1:i-r}withIndex(){return this}isIndexed(){return!0}equals(e){if(e===this)return!0;if(e.isLeafNode()){const t=e;return this.value_===t.value_&&this.priorityNode_.equals(t.priorityNode_)}return!1}}tm.VALUE_TYPE_ORDER=["object","boolean","number","string"];const nm=new class extends zg{compare(e,t){const n=e.node.getPriority(),r=t.node.getPriority(),i=n.compareTo(r);return 0===i?Lf(e.name,t.name):i}isDefinedOn(e){return!e.getPriority().isEmpty()}indexedValueChanged(e,t){return!e.getPriority().equals(t.getPriority())}minPost(){return jg.MIN}maxPost(){return new jg(Bf,new tm("[PRIORITY-POST]",em))}makePost(e,t){const n=Zg(e);return new jg(t,new tm("[PRIORITY-POST]",n))}toString(){return".priority"}},rm=Math.log(2);class im{constructor(e){var t;this.count=(t=e+1,parseInt(Math.log(t)/rm,10)),this.current_=this.count-1;const n=(r=this.count,parseInt(Array(r+1).join("1"),2));var r;this.bits_=e+1&n}nextBitIsOne(){const e=!(this.bits_&1<<this.current_);return this.current_--,e}}const om=function(e,t,n,r){e.sort(t);const i=function(t,r){const o=r-t;let s,a;if(0===o)return null;if(1===o)return s=e[t],a=n?n(s):s,new $g(a,s.node,$g.BLACK,null,null);{const u=parseInt(o/2,10)+t,l=i(t,u),c=i(u+1,r);return s=e[u],a=n?n(s):s,new $g(a,s.node,$g.BLACK,l,c)}},o=function(t){let r=null,o=null,s=e.length;const a=function(t,r){const o=s-t,a=s;s-=t;const l=i(o+1,a),c=e[o],d=n?n(c):c;u(new $g(d,c.node,r,null,l))},u=function(e){r?(r.left=e,r=e):(o=e,r=e)};for(let e=0;e<t.count;++e){const n=t.nextBitIsOne(),r=Math.pow(2,t.count-(e+1));n?a(r,$g.BLACK):(a(r,$g.BLACK),a(r,$g.RED))}return o}(new im(e.length));return new Vg(r||t,o)};let sm;const am={};class um{static get Default(){return Gs(am&&nm,"ChildrenNode.ts has not been loaded"),sm=sm||new um({".priority":am},{".priority":nm}),sm}constructor(e,t){this.indexes_=e,this.indexSet_=t}get(e){const t=Aa(this.indexes_,e);if(!t)throw new Error("No index defined for "+e);return t instanceof Vg?t:null}hasIndex(e){return Fa(this.indexSet_,e.toString())}addIndex(e,t){Gs(e!==qg,"KeyIndex always exists and isn't meant to be added to the IndexMap.");const n=[];let r=!1;const i=t.getIterator(jg.Wrap);let o,s=i.getNext();for(;s;)r=r||e.isDefinedOn(s.node),n.push(s),s=i.getNext();o=r?om(n,e.getCompare()):am;const a=e.toString(),u=c({},this.indexSet_);u[a]=e;const l=c({},this.indexes_);return l[a]=o,new um(l,u)}addToIndexes(e,t){const n=Ia(this.indexes_,(n,r)=>{const i=Aa(this.indexSet_,r);if(Gs(i,"Missing index implementation for "+r),n===am){if(i.isDefinedOn(e.node)){const n=[],r=t.getIterator(jg.Wrap);let o=r.getNext();for(;o;)o.name!==e.name&&n.push(o),o=r.getNext();return n.push(e),om(n,i.getCompare())}return am}{const r=t.get(e.name);let i=n;return r&&(i=i.remove(new jg(e.name,r))),i.insert(e,e.node)}});return new um(n,this.indexSet_)}removeFromIndexes(e,t){const n=Ia(this.indexes_,n=>{if(n===am)return n;{const r=t.get(e.name);return r?n.remove(new jg(e.name,r)):n}});return new um(n,this.indexSet_)}}let lm;class cm{static get EMPTY_NODE(){return lm||(lm=new cm(new Vg(Kg),null,um.Default))}constructor(e,t,n){this.children_=e,this.priorityNode_=t,this.indexMap_=n,this.lazyHash_=null,this.priorityNode_&&Qg(this.priorityNode_),this.children_.isEmpty()&&Gs(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}isLeafNode(){return!1}getPriority(){return this.priorityNode_||lm}updatePriority(e){return this.children_.isEmpty()?this:new cm(this.children_,e,this.indexMap_)}getImmediateChild(e){if(".priority"===e)return this.getPriority();{const t=this.children_.get(e);return null===t?lm:t}}getChild(e){const t=bg(e);return null===t?this:this.getImmediateChild(t).getChild(Eg(e))}hasChild(e){return null!==this.children_.get(e)}updateImmediateChild(e,t){if(Gs(t,"We should always be passing snapshot nodes"),".priority"===e)return this.updatePriority(t);{const n=new jg(e,t);let r,i;t.isEmpty()?(r=this.children_.remove(e),i=this.indexMap_.removeFromIndexes(n,this.children_)):(r=this.children_.insert(e,t),i=this.indexMap_.addToIndexes(n,this.children_));const o=r.isEmpty()?lm:this.priorityNode_;return new cm(r,o,i)}}updateChild(e,t){const n=bg(e);if(null===n)return t;{Gs(".priority"!==bg(e)||1===wg(e),".priority must be the last token in a path");const r=this.getImmediateChild(n).updateChild(Eg(e),t);return this.updateImmediateChild(n,r)}}isEmpty(){return this.children_.isEmpty()}numChildren(){return this.children_.count()}val(e){if(this.isEmpty())return null;const t={};let n=0,r=0,i=!0;if(this.forEachChild(nm,(o,s)=>{t[o]=s.val(e),n++,i&&cm.INTEGER_REGEXP_.test(o)?r=Math.max(r,Number(o)):i=!1}),!e&&i&&r<2*n){const e=[];for(const n in t)e[n]=t[n];return e}
2return e&&!this.getPriority().isEmpty()&&(t[".priority"]=this.getPriority().val()),t}hash(){if(null===this.lazyHash_){let e="";this.getPriority().isEmpty()||(e+="priority:"+Jg(this.getPriority().val())+":"),this.forEachChild(nm,(t,n)=>{const r=n.hash();""!==r&&(e+=":"+t+":"+r)}),this.lazyHash_=""===e?"":Cf(e)}return this.lazyHash_}getPredecessorChildName(e,t,n){const r=this.resolveIndex_(n);if(r){const n=r.getPredecessorKey(new jg(e,t));return n?n.name:null}return this.children_.getPredecessorKey(e)}getFirstChildName(e){const t=this.resolveIndex_(e);if(t){const e=t.minKey();return e&&e.name}return this.children_.minKey()}getFirstChild(e){const t=this.getFirstChildName(e);return t?new jg(t,this.children_.get(t)):null}getLastChildName(e){const t=this.resolveIndex_(e);if(t){const e=t.maxKey();return e&&e.name}return this.children_.maxKey()}getLastChild(e){const t=this.getLastChildName(e);return t?new jg(t,this.children_.get(t)):null}forEachChild(e,t){const n=this.resolveIndex_(e);return n?n.inorderTraversal(e=>t(e.name,e.node)):this.children_.inorderTraversal(t)}getIterator(e){return this.getIteratorFrom(e.minPost(),e)}getIteratorFrom(e,t){const n=this.resolveIndex_(t);if(n)return n.getIteratorFrom(e,e=>e);{const n=this.children_.getIteratorFrom(e.name,jg.Wrap);let r=n.peek();for(;null!=r&&t.compare(r,e)<0;)n.getNext(),r=n.peek();return n}}getReverseIterator(e){return this.getReverseIteratorFrom(e.maxPost(),e)}getReverseIteratorFrom(e,t){const n=this.resolveIndex_(t);if(n)return n.getReverseIteratorFrom(e,e=>e);{const n=this.children_.getReverseIteratorFrom(e.name,jg.Wrap);let r=n.peek();for(;null!=r&&t.compare(r,e)>0;)n.getNext(),r=n.peek();return n}}compareTo(e){return this.isEmpty()?e.isEmpty()?0:-1:e.isLeafNode()||e.isEmpty()?1:e===dm?-1:0}withIndex(e){if(e===qg||this.indexMap_.hasIndex(e))return this;{const t=this.indexMap_.addIndex(e,this.children_);return new cm(this.children_,this.priorityNode_,t)}}isIndexed(e){return e===qg||this.indexMap_.hasIndex(e)}equals(e){if(e===this)return!0;if(e.isLeafNode())return!1;{const t=e;if(this.getPriority().equals(t.getPriority())){if(this.children_.count()===t.children_.count()){const e=this.getIterator(nm),n=t.getIterator(nm);let r=e.getNext(),i=n.getNext();for(;r&&i;){if(r.name!==i.name||!r.node.equals(i.node))return!1;r=e.getNext(),i=n.getNext()}return null===r&&null===i}return!1}return!1}}resolveIndex_(e){return e===qg?null:this.indexMap_.get(e.toString())}}cm.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/;const dm=new class extends cm{constructor(){super(new Vg(Kg),cm.EMPTY_NODE,um.Default)}compareTo(e){return e===this?0:1}equals(e){return e===this}getPriority(){return this}getImmediateChild(e){return cm.EMPTY_NODE}isEmpty(){return!1}};Object.defineProperties(jg,{MIN:{value:new jg(Rf,cm.EMPTY_NODE)},MAX:{value:new jg(Bf,dm)}}),Hg.__EMPTY_NODE=cm.EMPTY_NODE,tm.__childrenNodeConstructor=cm,Yg=dm,function(e){em=e}(dm);function hm(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(null===e)return cm.EMPTY_NODE;if("object"===typeof e&&".priority"in e&&(t=e[".priority"]),Gs(null===t||"string"===typeof t||"number"===typeof t||"object"===typeof t&&".sv"in t,"Invalid priority type found: "+typeof t),"object"===typeof e&&".value"in e&&null!==e[".value"]&&(e=e[".value"]),"object"!==typeof e||".sv"in e){return new tm(e,hm(t))}if(e instanceof Array){let n=cm.EMPTY_NODE;return Hf(e,(t,r)=>{if(Fa(e,t)&&"."!==t.substring(0,1)){const e=hm(r);!e.isLeafNode()&&e.isEmpty()||(n=n.updateImmediateChild(t,e))}}),n.updatePriority(hm(t))}{const n=[];let r=!1;if(Hf(e,(e,t)=>{if("."!==e.substring(0,1)){const i=hm(t);i.isEmpty()||(r=r||!i.getPriority().isEmpty(),n.push(new jg(e,i)))}}),0===n.length)return cm.EMPTY_NODE;const i=om(n,Gg,e=>e.name,Kg);if(r){const e=om(n,nm.getCompare());return new cm(i,hm(t),new um({".priority":e},{".priority":nm}))}return new cm(i,hm(t),um.Default)}}!function(e){Zg=e}(hm);class pm extends zg{constructor(e){super(),this.indexPath_=e,Gs(!Fg(e)&&".priority"!==bg(e),"Can't create PathIndex with empty path or .priority key")}extractChild(e){return e.getChild(this.indexPath_)}isDefinedOn(e){return!e.getChild(this.indexPath_).isEmpty()}compare(e,t){const n=this.extractChild(e.node),r=this.extractChild(t.node),i=n.compareTo(r);return 0===i?Lf(e.name,t.name):i}makePost(e,t){const n=hm(e),r=cm.EMPTY_NODE.updateChild(this.indexPath_,n);return new jg(t,r)}maxPost(){const e=cm.EMPTY_NODE.updateChild(this.indexPath_,dm);return new jg(Bf,e)}toString(){return kg(this.indexPath_,0).join("/")}}const fm=new class extends zg{compare(e,t){const n=e.node.compareTo(t.node);return 0===n?Lf(e.name,t.name):n}isDefinedOn(e){return!0}indexedValueChanged(e,t){return!e.equals(t)}
vendor: 11,385 bytes, line 2
2minPost(){return jg.MIN}maxPost(){return jg.MAX}makePost(e,t){const n=hm(e);return new jg(t,n)}toString(){return".value"}};function gm(e){return{type:"value",snapshotNode:e}}function mm(e,t){return{type:"child_added",snapshotNode:t,childName:e}}function vm(e,t){return{type:"child_removed",snapshotNode:t,childName:e}}function ym(e,t,n){return{type:"child_changed",snapshotNode:t,childName:e,oldSnap:n}}class Dm{constructor(e){this.index_=e}updateChild(e,t,n,r,i,o){Gs(e.isIndexed(this.index_),"A node must be indexed if only a child is updated");const s=e.getImmediateChild(t);return s.getChild(r).equals(n.getChild(r))&&s.isEmpty()===n.isEmpty()?e:(null!=o&&(n.isEmpty()?e.hasChild(t)?o.trackChildChange(vm(t,s)):Gs(e.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):s.isEmpty()?o.trackChildChange(mm(t,n)):o.trackChildChange(ym(t,n,s))),e.isLeafNode()&&n.isEmpty()?e:e.updateImmediateChild(t,n).withIndex(this.index_))}updateFullNode(e,t,n){return null!=n&&(e.isLeafNode()||e.forEachChild(nm,(e,r)=>{t.hasChild(e)||n.trackChildChange(vm(e,r))}),t.isLeafNode()||t.forEachChild(nm,(t,r)=>{if(e.hasChild(t)){const i=e.getImmediateChild(t);i.equals(r)||n.trackChildChange(ym(t,r,i))}else n.trackChildChange(mm(t,r))})),t.withIndex(this.index_)}updatePriority(e,t){return e.isEmpty()?cm.EMPTY_NODE:e.updatePriority(t)}filtersNodes(){return!1}getIndexedFilter(){return this}getIndex(){return this.index_}}class _m{constructor(e){this.indexedFilter_=new Dm(e.getIndex()),this.index_=e.getIndex(),this.startPost_=_m.getStartPost_(e),this.endPost_=_m.getEndPost_(e),this.startIsInclusive_=!e.startAfterSet_,this.endIsInclusive_=!e.endBeforeSet_}getStartPost(){return this.startPost_}getEndPost(){return this.endPost_}matches(e){const t=this.startIsInclusive_?this.index_.compare(this.getStartPost(),e)<=0:this.index_.compare(this.getStartPost(),e)<0,n=this.endIsInclusive_?this.index_.compare(e,this.getEndPost())<=0:this.index_.compare(e,this.getEndPost())<0;return t&&n}updateChild(e,t,n,r,i,o){return this.matches(new jg(t,n))||(n=cm.EMPTY_NODE),this.indexedFilter_.updateChild(e,t,n,r,i,o)}updateFullNode(e,t,n){t.isLeafNode()&&(t=cm.EMPTY_NODE);let r=t.withIndex(this.index_);r=r.updatePriority(cm.EMPTY_NODE);const i=this;return t.forEachChild(nm,(e,t)=>{i.matches(new jg(e,t))||(r=r.updateImmediateChild(e,cm.EMPTY_NODE))}),this.indexedFilter_.updateFullNode(e,r,n)}updatePriority(e,t){return e}filtersNodes(){return!0}getIndexedFilter(){return this.indexedFilter_}getIndex(){return this.index_}static getStartPost_(e){if(e.hasStart()){const t=e.getIndexStartName();return e.getIndex().makePost(e.getIndexStartValue(),t)}return e.getIndex().minPost()}static getEndPost_(e){if(e.hasEnd()){const t=e.getIndexEndName();return e.getIndex().makePost(e.getIndexEndValue(),t)}return e.getIndex().maxPost()}}class bm{constructor(e){this.withinDirectionalStart=e=>this.reverse_?this.withinEndPost(e):this.withinStartPost(e),this.withinDirectionalEnd=e=>this.reverse_?this.withinStartPost(e):this.withinEndPost(e),this.withinStartPost=e=>{const t=this.index_.compare(this.rangedFilter_.getStartPost(),e);return this.startIsInclusive_?t<=0:t<0},this.withinEndPost=e=>{const t=this.index_.compare(e,this.rangedFilter_.getEndPost());return this.endIsInclusive_?t<=0:t<0},this.rangedFilter_=new _m(e),this.index_=e.getIndex(),this.limit_=e.getLimit(),this.reverse_=!e.isViewFromLeft(),this.startIsInclusive_=!e.startAfterSet_,this.endIsInclusive_=!e.endBeforeSet_}updateChild(e,t,n,r,i,o){return this.rangedFilter_.matches(new jg(t,n))||(n=cm.EMPTY_NODE),e.getImmediateChild(t).equals(n)?e:e.numChildren()<this.limit_?this.rangedFilter_.getIndexedFilter().updateChild(e,t,n,r,i,o):this.fullLimitUpdateChild_(e,t,n,i,o)}updateFullNode(e,t,n){let r;if(t.isLeafNode()||t.isEmpty())r=cm.EMPTY_NODE.withIndex(this.index_);else if(2*this.limit_<t.numChildren()&&t.isIndexed(this.index_)){let e;r=cm.EMPTY_NODE.withIndex(this.index_),e=this.reverse_?t.getReverseIteratorFrom(this.rangedFilter_.getEndPost(),this.index_):t.getIteratorFrom(this.rangedFilter_.getStartPost(),this.index_);let n=0;for(;e.hasNext()&&n<this.limit_;){const t=e.getNext();if(this.withinDirectionalStart(t)){if(!this.withinDirectionalEnd(t))break;r=r.updateImmediateChild(t.name,t.node),n++}}}else{let e;r=t.withIndex(this.index_),r=r.updatePriority(cm.EMPTY_NODE),e=this.reverse_?r.getReverseIterator(this.index_):r.getIterator(this.index_);let n=0;for(;e.hasNext();){const t=e.getNext();n<this.limit_&&this.withinDirectionalStart(t)&&this.withinDirectionalEnd(t)?n++:r=r.updateImmediateChild(t.name,cm.EMPTY_NODE)}}return this.rangedFilter_.getIndexedFilter().updateFullNode(e,r,n)}updatePriority(e,t){return e}filtersNodes(){return!0}getIndexedFilter(){return this.rangedFilter_.getIndexedFilter()}getIndex(){return this.index_}fullLimitUpdateChild_(e,t,n,r,i){let o;if(this.reverse_){const e=this.index_.getCompare();o=(t,n)=>e(n,t)}else o=this.index_.getCompare();const s=e;Gs(s.numChildren()===this.limit_,"");const a=new jg(t,n),u=this.reverse_?s.getFirstChild(this.index_):s.getLastChild(this.index_),l=this.rangedFilter_.matches(a);if(s.hasChild(t)){const e=s.getImmediateChild(t);let c=r.getChildAfterChild(this.index_,u,this.reverse_);for(;null!=c&&(c.name===t||s.hasChild(c.name));)c=r.getChildAfterChild(this.index_,c,this.reverse_);const d=null==c?1:o(c,a);if(l&&!n.isEmpty()&&d>=0)return null!=i&&i.trackChildChange(ym(t,n,e)),s.updateImmediateChild(t,n);{null!=i&&i.trackChildChange(vm(t,e));const n=s.updateImmediateChild(t,cm.EMPTY_NODE);return null!=c&&this.rangedFilter_.matches(c)?(null!=i&&i.trackChildChange(mm(c.name,c.node)),n.updateImmediateChild(c.name,c.node)):n}}return n.isEmpty()?e:l&&o(u,a)>=0?(null!=i&&(i.trackChildChange(vm(u.name,u.node)),i.trackChildChange(mm(t,n))),s.updateImmediateChild(t,n).updateImmediateChild(u.name,cm.EMPTY_NODE)):e}}class wm{constructor(){this.limitSet_=!1,this.startSet_=!1,this.startNameSet_=!1,this.startAfterSet_=!1,this.endSet_=!1,this.endNameSet_=!1,this.endBeforeSet_=!1,this.limit_=0,this.viewFrom_="",this.indexStartValue_=null,this.indexStartName_="",this.indexEndValue_=null,this.indexEndName_="",this.index_=nm}hasStart(){return this.startSet_}isViewFromLeft(){return""===this.viewFrom_?this.startSet_:"l"===this.viewFrom_}getIndexStartValue(){return Gs(this.startSet_,"Only valid if start has been set"),this.indexStartValue_}getIndexStartName(){return Gs(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:Rf}hasEnd(){return this.endSet_}getIndexEndValue(){return Gs(this.endSet_,"Only valid if end has been set"),this.indexEndValue_}getIndexEndName(){return Gs(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:Bf}hasLimit(){return this.limitSet_}hasAnchoredLimit(){return this.limitSet_&&""!==this.viewFrom_}getLimit(){return Gs(this.limitSet_,"Only valid if limit has been set"),this.limit_}getIndex(){return this.index_}loadsAllData(){return!(this.startSet_||this.endSet_||this.limitSet_)}isDefault(){return this.loadsAllData()&&this.index_===nm}copy(){const e=new wm;return e.limitSet_=this.limitSet_,e.limit_=this.limit_,e.startSet_=this.startSet_,e.startAfterSet_=this.startAfterSet_,e.indexStartValue_=this.indexStartValue_,e.startNameSet_=this.startNameSet_,e.indexStartName_=this.indexStartName_,e.endSet_=this.endSet_,e.endBeforeSet_=this.endBeforeSet_,e.indexEndValue_=this.indexEndValue_,e.endNameSet_=this.endNameSet_,e.indexEndName_=this.indexEndName_,e.index_=this.index_,e.viewFrom_=this.viewFrom_,e}}function Em(e,t,n){const r=e.copy();return r.startSet_=!0,void 0===t&&(t=null),r.indexStartValue_=t,null!=n?(r.startNameSet_=!0,r.indexStartName_=n):(r.startNameSet_=!1,r.indexStartName_=""),r}function Cm(e,t){const n=e.copy();return n.index_=t,n}function km(e){const t={};if(e.isDefault())return t;let n;if(e.index_===nm?n="$priority":e.index_===fm?n="$value":e.index_===qg?n="$key":(Gs(e.index_ instanceof pm,"Unrecognized index type!"),n=e.index_.toString()),t.orderBy=Sa(n),e.startSet_){const n=e.startAfterSet_?"startAfter":"startAt";t[n]=Sa(e.indexStartValue_),e.startNameSet_&&(t[n]+=","+Sa(e.indexStartName_))}if(e.endSet_){const n=e.endBeforeSet_?"endBefore":"endAt";t[n]=Sa(e.indexEndValue_),e.endNameSet_&&(t[n]+=","+Sa(e.indexEndName_))}return e.limitSet_&&(e.isViewFromLeft()?t.limitToFirst=e.limit_:t.limitToLast=e.limit_),t}function Sm(e){const t={};if(e.startSet_&&(t.sp=e.indexStartValue_,e.startNameSet_&&(t.sn=e.indexStartName_),t.sin=!e.startAfterSet_),e.endSet_&&(t.ep=e.indexEndValue_,e.endNameSet_&&(t.en=e.indexEndName_),t.ein=!e.endBeforeSet_),e.limitSet_){t.l=e.limit_;let n=e.viewFrom_;""===n&&(n=e.isViewFromLeft()?"l":"r"),t.vf=n}return e.index_!==nm&&(t.i=e.index_.toString()),t}class xm extends mg{reportStats(e){throw new Error("Method not implemented.")}static getListenId_(e,t){return void 0!==t?"tag$"+t:(Gs(e._queryParams.isDefault(),"should have a tag if it's not a default query."),e._path.toString())}constructor(e,t,n,r){super(),this.repoInfo_=e,this.onDataUpdate_=t,this.authTokenProvider_=n,this.appCheckTokenProvider_=r,this.log_=Tf("p:rest:"),this.listens_={}}listen(e,t,n,r){const i=e._path.toString();this.log_("Listen called for "+i+" "+e._queryIdentifier);const o=xm.getListenId_(e,n),s={};this.listens_[o]=s;const a=km(e._queryParams);this.restRequest_(i+".json",a,(e,t)=>{let a=t;if(404===e&&(a=null,e=null),null===e&&this.onDataUpdate_(i,a,!1,n),Aa(this.listens_,o)===s){let t;t=e?401===e?"permission_denied":"rest_error:"+e:"ok",r(t,null)}})}unlisten(e,t){const n=xm.getListenId_(e,t);delete this.listens_[n]}get(e){const t=km(e._queryParams),n=e._path.toString(),r=new la;return this.restRequest_(n+".json",t,(e,t)=>{let i=t;404===e&&(i=null,e=null),null===e?(this.onDataUpdate_(n,i,!1,null),r.resolve(i)):r.reject(new Error(i))}),r.promise}refreshAuthToken(e){}restRequest_(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return t.format="export",Promise.all([this.authTokenProvider_.getToken(!1),this.appCheckTokenProvider_.getToken(!1)]).then(r=>{let[i,o]=r;i&&i.accessToken&&(t.auth=i.accessToken),o&&o.token&&(t.ac=o.token);const s=(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host+e+"?ns="+this.repoInfo_.namespace+Na(t);this.log_("Sending REST request for "+s);const a=new XMLHttpRequest;a.onreadystatechange=()=>{if(n&&4===a.readyState){this.log_("REST Response for "+s+" received. status:",a.status,"response:",a.responseText);let e=null;if(a.status>=200&&a.status<300){try{e=ka(a.responseText)}catch(y_){Of("Failed to parse JSON response for "+s+": "+a.responseText)}n(null,e)}else 401!==a.status&&404!==a.status&&Of("Got unsuccessful REST response for "+s+" Status: "+a.status),n(a.status);n=null}},a.open("GET",s,!0),a.send()})}}class Fm{constructor(){this.rootNode_=cm.EMPTY_NODE}getNode(e){return this.rootNode_.getChild(e)}updateSnapshot(e,t){this.rootNode_=this.rootNode_.updateChild(e,t)}}function Am(){return{value:null,children:new Map}}function Tm(e,t,n){if(Fg(t))e.value=n,e.children.clear();else if(null!==e.value)e.value=e.value.updateChild(t,n);else{const r=bg(t);e.children.has(r)||e.children.set(r,Am());Tm(e.children.get(r),t=Eg(t),n)}}function Im(e,t){if(Fg(t))return e.value=null,e.children.clear(),!0;if(null!==e.value){if(e.value.isLeafNode())return!1;{const n=e.value;
2return e.value=null,n.forEachChild(nm,(t,n)=>{Tm(e,new Dg(t),n)}),Im(e,t)}}if(e.children.size>0){const n=bg(t);if(t=Eg(t),e.children.has(n)){Im(e.children.get(n),t)&&e.children.delete(n)}return 0===e.children.size}return!0}function Pm(e,t,n){null!==e.value?n(t,e.value):function(e,t){e.children.forEach((e,n)=>{t(n,e)})}(e,(e,r)=>{Pm(r,new Dg(t.toString()+"/"+e),n)})}class Om{constructor(e){this.collection_=e,this.last_=null}get(){const e=this.collection_.get(),t=c({},e);return this.last_&&Hf(this.last_,(e,n)=>{t[e]=t[e]-n}),this.last_=e,t}}class Nm{constructor(e,t){this.server_=t,this.statsToReport_={},this.statsListener_=new Om(e);const n=1e4+2e4*Math.random();Gf(this.reportStats_.bind(this),Math.floor(n))}reportStats_(){const e=this.statsListener_.get(),t={};let n=!1;Hf(e,(e,r)=>{r>0&&Fa(this.statsToReport_,e)&&(t[e]=r,n=!0)}),n&&this.server_.reportStats(t),Gf(this.reportStats_.bind(this),Math.floor(2*Math.random()*3e5))}}var Rm;function Bm(e){return{fromUser:!1,fromServer:!0,queryId:e,tagged:!0}}!function(e){e[e.OVERWRITE=0]="OVERWRITE",e[e.MERGE=1]="MERGE",e[e.ACK_USER_WRITE=2]="ACK_USER_WRITE",e[e.LISTEN_COMPLETE=3]="LISTEN_COMPLETE"}(Rm||(Rm={}));class Lm{constructor(e,t,n){this.path=e,this.affectedTree=t,this.revert=n,this.type=Rm.ACK_USER_WRITE,this.source={fromUser:!0,fromServer:!1,queryId:null,tagged:!1}}operationForChild(e){if(Fg(this.path)){if(null!=this.affectedTree.value)return Gs(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;{const t=this.affectedTree.subtree(new Dg(e));return new Lm(_g(),t,this.revert)}}return Gs(bg(this.path)===e,"operationForChild called for unrelated child."),new Lm(Eg(this.path),this.affectedTree,this.revert)}}class Mm{constructor(e,t){this.source=e,this.path=t,this.type=Rm.LISTEN_COMPLETE}operationForChild(e){return Fg(this.path)?new Mm(this.source,_g()):new Mm(this.source,Eg(this.path))}}class jm{constructor(e,t,n){this.source=e,this.path=t,this.snap=n,this.type=Rm.OVERWRITE}operationForChild(e){return Fg(this.path)?new jm(this.source,_g(),this.snap.getImmediateChild(e)):new jm(this.source,Eg(this.path),this.snap)}}class zm{constructor(e,t,n){this.source=e,this.path=t,this.children=n,this.type=Rm.MERGE}operationForChild(e){if(Fg(this.path)){const t=this.children.subtree(new Dg(e));return t.isEmpty()?null:t.value?new jm(this.source,_g(),t.value):new zm(this.source,_g(),t)}return Gs(bg(this.path)===e,"Can't get a merge for a child not on the path of the operation"),new zm(this.source,Eg(this.path),this.children)}toString(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"}}class Um{constructor(e,t,n){this.node_=e,this.fullyInitialized_=t,this.filtered_=n}isFullyInitialized(){return this.fullyInitialized_}isFiltered(){return this.filtered_}isCompleteForPath(e){if(Fg(e))return this.isFullyInitialized()&&!this.filtered_;const t=bg(e);return this.isCompleteForChild(t)}isCompleteForChild(e){return this.isFullyInitialized()&&!this.filtered_||this.node_.hasChild(e)}getNode(){return this.node_}}class Hm{constructor(e){this.query_=e,this.index_=this.query_._queryParams.getIndex()}}function qm(e,t,n,r,i,o){const s=r.filter(e=>e.type===n);s.sort((t,n)=>function(e,t,n){if(null==t.childName||null==n.childName)throw Ks("Should only compare child_ events.");const r=new jg(t.childName,t.snapshotNode),i=new jg(n.childName,n.snapshotNode);return e.index_.compare(r,i)}(e,t,n)),s.forEach(n=>{const r=function(e,t,n){return"value"===t.type||"child_removed"===t.type||(t.prevName=n.getPredecessorChildName(t.childName,t.snapshotNode,e.index_)),t}(e,n,o);i.forEach(i=>{i.respondsTo(n.type)&&t.push(i.createEvent(r,e.query_))})})}function Wm(e,t){return{eventCache:e,serverCache:t}}function $m(e,t,n,r){return Wm(new Um(t,n,r),e.serverCache)}function Vm(e,t,n,r){return Wm(e.eventCache,new Um(t,n,r))}function Gm(e){return e.eventCache.isFullyInitialized()?e.eventCache.getNode():null}function Km(e){return e.serverCache.isFullyInitialized()?e.serverCache.getNode():null}let Ym;class Jm{static fromObject(e){let t=new Jm(null);return Hf(e,(e,n)=>{t=t.set(new Dg(e),n)}),t}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(Ym||(Ym=new Vg(Mf)),Ym);this.value=e,this.children=t}isEmpty(){return null===this.value&&this.children.isEmpty()}findRootMostMatchingPathAndValue(e,t){if(null!=this.value&&t(this.value))return{path:_g(),value:this.value};if(Fg(e))return null;{const n=bg(e),r=this.children.get(n);if(null!==r){const i=r.findRootMostMatchingPathAndValue(Eg(e),t);if(null!=i){return{path:xg(new Dg(n),i.path),value:i.value}}return null}return null}}findRootMostValueAndPath(e){return this.findRootMostMatchingPathAndValue(e,()=>!0)}subtree(e){if(Fg(e))return this;{const t=bg(e),n=this.children.get(t);return null!==n?n.subtree(Eg(e)):new Jm(null)}}set(e,t){if(Fg(e))return new Jm(t,this.children);{const n=bg(e),r=(this.children.get(n)||new Jm(null)).set(Eg(e),t),i=this.children.insert(n,r);return new Jm(this.value,i)}}remove(e){if(Fg(e))return this.children.isEmpty()?new Jm(null):new Jm(null,this.children);{const t=bg(e),n=this.children.get(t);if(n){const r=n.remove(Eg(e));let i;return i=r.isEmpty()?this.children.remove(t):this.children.insert(t,r),null===this.value&&i.isEmpty()?new Jm(null):new Jm(this.value,i)}return this}}get(e){if(Fg(e))return this.value;{const t=bg(e),n=this.children.get(t);return n?n.get(Eg(e)):null}}setTree(e,t){if(Fg(e))return t;{const n=bg(e),r=(this.children.get(n)||new Jm(null)).setTree(Eg(e),t);let i;return i=r.isEmpty()?this.children.remove(n):this.children.insert(n,r),new Jm(this.value,i)}}fold(e){return this.fold_(_g(),e)}fold_(e,t){const n={};return this.children.inorderTraversal((r,i)=>{n[r]=i.fold_(xg(e,r),t)}
2),t(e,this.value,n)}findOnPath(e,t){return this.findOnPath_(e,_g(),t)}findOnPath_(e,t,n){const r=!!this.value&&n(t,this.value);if(r)return r;if(Fg(e))return null;{const r=bg(e),i=this.children.get(r);return i?i.findOnPath_(Eg(e),xg(t,r),n):null}}foreachOnPath(e,t){return this.foreachOnPath_(e,_g(),t)}foreachOnPath_(e,t,n){if(Fg(e))return this;{this.value&&n(t,this.value);const r=bg(e),i=this.children.get(r);return i?i.foreachOnPath_(Eg(e),xg(t,r),n):new Jm(null)}}foreach(e){this.foreach_(_g(),e)}foreach_(e,t){this.children.inorderTraversal((n,r)=>{r.foreach_(xg(e,n),t)}),this.value&&t(e,this.value)}foreachChild(e){this.children.inorderTraversal((t,n)=>{n.value&&e(t,n.value)})}}class Qm{constructor(e){this.writeTree_=e}static empty(){return new Qm(new Jm(null))}}function Xm(e,t,n){if(Fg(t))return new Qm(new Jm(n));{const r=e.writeTree_.findRootMostValueAndPath(t);if(null!=r){const i=r.path;let o=r.value;const s=Ag(i,t);return o=o.updateChild(s,n),new Qm(e.writeTree_.set(i,o))}{const r=new Jm(n),i=e.writeTree_.setTree(t,r);return new Qm(i)}}}function Zm(e,t,n){let r=e;return Hf(n,(e,n)=>{r=Xm(r,xg(t,e),n)}),r}function ev(e,t){if(Fg(t))return Qm.empty();{const n=e.writeTree_.setTree(t,new Jm(null));return new Qm(n)}}function tv(e,t){return null!=nv(e,t)}function nv(e,t){const n=e.writeTree_.findRootMostValueAndPath(t);return null!=n?e.writeTree_.get(n.path).getChild(Ag(n.path,t)):null}function rv(e){const t=[],n=e.writeTree_.value;return null!=n?n.isLeafNode()||n.forEachChild(nm,(e,n)=>{t.push(new jg(e,n))}):e.writeTree_.children.inorderTraversal((e,n)=>{null!=n.value&&t.push(new jg(e,n.value))}),t}function iv(e,t){if(Fg(t))return e;{const n=nv(e,t);return new Qm(null!=n?new Jm(n):e.writeTree_.subtree(t))}}function ov(e){return e.writeTree_.isEmpty()}function sv(e,t){return av(_g(),e.writeTree_,t)}function av(e,t,n){if(null!=t.value)return n.updateChild(e,t.value);{let r=null;return t.children.inorderTraversal((t,i)=>{".priority"===t?(Gs(null!==i.value,"Priority writes must always be leaf nodes"),r=i.value):n=av(xg(e,t),i,n)}),n.getChild(e).isEmpty()||null===r||(n=n.updateChild(xg(e,".priority"),r)),n}}function uv(e,t){return bv(t,e)}function lv(e,t){const n=e.allWrites.findIndex(e=>e.writeId===t);Gs(n>=0,"removeWrite called with nonexistent writeId.");const r=e.allWrites[n];e.allWrites.splice(n,1);let i=r.visible,o=!1,s=e.allWrites.length-1;for(;i&&s>=0;){const t=e.allWrites[s];t.visible&&(s>=n&&cv(t,r.path)?i=!1:Pg(r.path,t.path)&&(o=!0)),s--}if(i){if(o)return function(e){e.visibleWrites=hv(e.allWrites,dv,_g()),e.allWrites.length>0?e.lastWriteId=e.allWrites[e.allWrites.length-1].writeId:e.lastWriteId=-1}(e),!0;if(r.snap)e.visibleWrites=ev(e.visibleWrites,r.path);else{Hf(r.children,t=>{e.visibleWrites=ev(e.visibleWrites,xg(r.path,t))})}return!0}return!1}function cv(e,t){if(e.snap)return Pg(e.path,t);for(const n in e.children)if(e.children.hasOwnProperty(n)&&Pg(xg(e.path,n),t))return!0;return!1}function dv(e){return e.visible}function hv(e,t,n){let r=Qm.empty();for(let i=0;i<e.length;++i){const o=e[i];if(t(o)){const e=o.path;let t;if(o.snap)Pg(n,e)?(t=Ag(n,e),r=Xm(r,t,o.snap)):Pg(e,n)&&(t=Ag(e,n),r=Xm(r,_g(),o.snap.getChild(t)));else{if(!o.children)throw Ks("WriteRecord should have .snap or .children");if(Pg(n,e))t=Ag(n,e),r=Zm(r,t,o.children);else if(Pg(e,n))if(t=Ag(e,n),Fg(t))r=Zm(r,_g(),o.children);else{const e=Aa(o.children,bg(t));if(e){const n=e.getChild(Eg(t));r=Xm(r,_g(),n)}}}}}return r}function pv(e,t,n,r,i){if(r||i){const o=iv(e.visibleWrites,t);if(!i&&ov(o))return n;if(i||null!=n||tv(o,_g())){const o=function(e){return(e.visible||i)&&(!r||!~r.indexOf(e.writeId))&&(Pg(e.path,t)||Pg(t,e.path))};return sv(hv(e.allWrites,o,t),n||cm.EMPTY_NODE)}return null}{const r=nv(e.visibleWrites,t);if(null!=r)return r;{const r=iv(e.visibleWrites,t);if(ov(r))return n;if(null!=n||tv(r,_g())){return sv(r,n||cm.EMPTY_NODE)}return null}}}function fv(e,t,n,r){return pv(e.writeTree,e.treePath,t,n,r)}function gv(e,t){return function(e,t,n){let r=cm.EMPTY_NODE;const i=nv(e.visibleWrites,t);if(i)return i.isLeafNode()||i.forEachChild(nm,(e,t)=>{r=r.updateImmediateChild(e,t)}),r;if(n){const i=iv(e.visibleWrites,t);
vendor: 13,508 bytes, line 2
2return n.forEachChild(nm,(e,t)=>{const n=sv(iv(i,new Dg(e)),t);r=r.updateImmediateChild(e,n)}),rv(i).forEach(e=>{r=r.updateImmediateChild(e.name,e.node)}),r}return rv(iv(e.visibleWrites,t)).forEach(e=>{r=r.updateImmediateChild(e.name,e.node)}),r}(e.writeTree,e.treePath,t)}function mv(e,t,n,r){return function(e,t,n,r,i){Gs(r||i,"Either existingEventSnap or existingServerSnap must exist");const o=xg(t,n);if(tv(e.visibleWrites,o))return null;{const t=iv(e.visibleWrites,o);return ov(t)?i.getChild(n):sv(t,i.getChild(n))}}(e.writeTree,e.treePath,t,n,r)}function vv(e,t){return function(e,t){return nv(e.visibleWrites,t)}(e.writeTree,xg(e.treePath,t))}function yv(e,t,n,r,i,o){return function(e,t,n,r,i,o,s){let a;const u=iv(e.visibleWrites,t),l=nv(u,_g());if(null!=l)a=l;else{if(null==n)return[];a=sv(u,n)}if(a=a.withIndex(s),a.isEmpty()||a.isLeafNode())return[];{const e=[],t=s.getCompare(),n=o?a.getReverseIteratorFrom(r,s):a.getIteratorFrom(r,s);let u=n.getNext();for(;u&&e.length<i;)0!==t(u,r)&&e.push(u),u=n.getNext();return e}}(e.writeTree,e.treePath,t,n,r,i,o)}function Dv(e,t,n){return function(e,t,n,r){const i=xg(t,n),o=nv(e.visibleWrites,i);if(null!=o)return o;if(r.isCompleteForChild(n))return sv(iv(e.visibleWrites,i),r.getNode().getImmediateChild(n));return null}(e.writeTree,e.treePath,t,n)}function _v(e,t){return bv(xg(e.treePath,t),e.writeTree)}function bv(e,t){return{treePath:e,writeTree:t}}class wv{constructor(){this.changeMap=new Map}trackChildChange(e){const t=e.type,n=e.childName;Gs("child_added"===t||"child_changed"===t||"child_removed"===t,"Only child changes supported for tracking"),Gs(".priority"!==n,"Only non-priority child changes can be tracked.");const r=this.changeMap.get(n);if(r){const i=r.type;if("child_added"===t&&"child_removed"===i)this.changeMap.set(n,ym(n,e.snapshotNode,r.snapshotNode));else if("child_removed"===t&&"child_added"===i)this.changeMap.delete(n);else if("child_removed"===t&&"child_changed"===i)this.changeMap.set(n,vm(n,r.oldSnap));else if("child_changed"===t&&"child_added"===i)this.changeMap.set(n,mm(n,e.snapshotNode));else{if("child_changed"!==t||"child_changed"!==i)throw Ks("Illegal combination of changes: "+e+" occurred after "+r);this.changeMap.set(n,ym(n,e.snapshotNode,r.oldSnap))}}else this.changeMap.set(n,e)}getChanges(){return Array.from(this.changeMap.values())}}const Ev=new class{getCompleteChild(e){return null}getChildAfterChild(e,t,n){return null}};class Cv{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.writes_=e,this.viewCache_=t,this.optCompleteServerCache_=n}getCompleteChild(e){const t=this.viewCache_.eventCache;if(t.isCompleteForChild(e))return t.getNode().getImmediateChild(e);{const t=null!=this.optCompleteServerCache_?new Um(this.optCompleteServerCache_,!0,!1):this.viewCache_.serverCache;return Dv(this.writes_,e,t)}}getChildAfterChild(e,t,n){const r=null!=this.optCompleteServerCache_?this.optCompleteServerCache_:Km(this.viewCache_),i=yv(this.writes_,r,t,1,n,e);return 0===i.length?null:i[0]}}function kv(e,t,n,r,i){const o=new wv;let s,a;if(n.type===Rm.OVERWRITE){const u=n;u.source.fromUser?s=Fv(e,t,u.path,u.snap,r,i,o):(Gs(u.source.fromServer,"Unknown source."),a=u.source.tagged||t.serverCache.isFiltered()&&!Fg(u.path),s=xv(e,t,u.path,u.snap,r,i,a,o))}else if(n.type===Rm.MERGE){const u=n;u.source.fromUser?s=function(e,t,n,r,i,o,s){let a=t;return r.foreach((r,u)=>{const l=xg(n,r);Av(t,bg(l))&&(a=Fv(e,a,l,u,i,o,s))}),r.foreach((r,u)=>{const l=xg(n,r);Av(t,bg(l))||(a=Fv(e,a,l,u,i,o,s))}),a}(e,t,u.path,u.children,r,i,o):(Gs(u.source.fromServer,"Unknown source."),a=u.source.tagged||t.serverCache.isFiltered(),s=Iv(e,t,u.path,u.children,r,i,a,o))}else if(n.type===Rm.ACK_USER_WRITE){const a=n;s=a.revert?function(e,t,n,r,i,o){let s;if(null!=vv(r,n))return t;{const a=new Cv(r,t,i),u=t.eventCache.getNode();let l;if(Fg(n)||".priority"===bg(n)){let n;if(t.serverCache.isFullyInitialized())n=fv(r,Km(t));else{const e=t.serverCache.getNode();Gs(e instanceof cm,"serverChildren would be complete if leaf node"),n=gv(r,e)}l=e.filter.updateFullNode(u,n,o)}else{const i=bg(n);let c=Dv(r,i,t.serverCache);null==c&&t.serverCache.isCompleteForChild(i)&&(c=u.getImmediateChild(i)),l=null!=c?e.filter.updateChild(u,i,c,Eg(n),a,o):t.eventCache.getNode().hasChild(i)?e.filter.updateChild(u,i,cm.EMPTY_NODE,Eg(n),a,o):u,l.isEmpty()&&t.serverCache.isFullyInitialized()&&(s=fv(r,Km(t)),s.isLeafNode()&&(l=e.filter.updateFullNode(l,s,o)))}return s=t.serverCache.isFullyInitialized()||null!=vv(r,_g()),$m(t,l,s,e.filter.filtersNodes())}}(e,t,a.path,r,i,o):function(e,t,n,r,i,o,s){if(null!=vv(i,n))return t;const a=t.serverCache.isFiltered(),u=t.serverCache;if(null!=r.value){if(Fg(n)&&u.isFullyInitialized()||u.isCompleteForPath(n))return xv(e,t,n,u.getNode().getChild(n),i,o,a,s);if(Fg(n)){let r=new Jm(null);return u.getNode().forEachChild(qg,(e,t)=>{r=r.set(new Dg(e),t)}),Iv(e,t,n,r,i,o,a,s)}return t}{let l=new Jm(null);return r.foreach((e,t)=>{const r=xg(n,e);u.isCompleteForPath(r)&&(l=l.set(e,u.getNode().getChild(r)))}),Iv(e,t,n,l,i,o,a,s)}}(e,t,a.path,a.affectedTree,r,i,o)}else{if(n.type!==Rm.LISTEN_COMPLETE)throw Ks("Unknown operation type: "+n.type);s=function(e,t,n,r,i){const o=t.serverCache,s=Vm(t,o.getNode(),o.isFullyInitialized()||Fg(n),o.isFiltered());return Sv(e,s,n,r,Ev,i)}(e,t,n.path,r,o)}const u=o.getChanges();return function(e,t,n){const r=t.eventCache;if(r.isFullyInitialized()){const i=r.getNode().isLeafNode()||r.getNode().isEmpty(),o=Gm(e);(n.length>0||!e.eventCache.isFullyInitialized()||i&&!r.getNode().equals(o)||!r.getNode().getPriority().equals(o.getPriority()))&&n.push(gm(Gm(t)))}}(t,s,u),{viewCache:s,changes:u}}function Sv(e,t,n,r,i,o){const s=t.eventCache;if(null!=vv(r,n))return t;{let a,u;if(Fg(n))if(Gs(t.serverCache.isFullyInitialized(),"If change path is empty, we must have complete server data"),t.serverCache.isFiltered()){const n=Km(t),i=gv(r,n instanceof cm?n:cm.EMPTY_NODE);a=e.filter.updateFullNode(t.eventCache.getNode(),i,o)}else{const n=fv(r,Km(t));a=e.filter.updateFullNode(t.eventCache.getNode(),n,o)}else{const l=bg(n);if(".priority"===l){Gs(1===wg(n),"Can't have a priority with additional path components");const i=s.getNode();u=t.serverCache.getNode();const o=mv(r,n,i,u);a=null!=o?e.filter.updatePriority(i,o):s.getNode()}else{const c=Eg(n);let d;if(s.isCompleteForChild(l)){u=t.serverCache.getNode();const e=mv(r,n,s.getNode(),u);d=null!=e?s.getNode().getImmediateChild(l).updateChild(c,e):s.getNode().getImmediateChild(l)}else d=Dv(r,l,t.serverCache);a=null!=d?e.filter.updateChild(s.getNode(),l,d,c,i,o):s.getNode()}}return $m(t,a,s.isFullyInitialized()||Fg(n),e.filter.filtersNodes())}}function xv(e,t,n,r,i,o,s,a){const u=t.serverCache;let l;const c=s?e.filter:e.filter.getIndexedFilter();if(Fg(n))l=c.updateFullNode(u.getNode(),r,null);else if(c.filtersNodes()&&!u.isFiltered()){const e=u.getNode().updateChild(n,r);l=c.updateFullNode(u.getNode(),e,null)}else{const e=bg(n);if(!u.isCompleteForPath(n)&&wg(n)>1)return t;const i=Eg(n),o=u.getNode().getImmediateChild(e).updateChild(i,r);l=".priority"===e?c.updatePriority(u.getNode(),o):c.updateChild(u.getNode(),e,o,i,Ev,null)}const d=Vm(t,l,u.isFullyInitialized()||Fg(n),c.filtersNodes());return Sv(e,d,n,i,new Cv(i,d,o),a)}function Fv(e,t,n,r,i,o,s){const a=t.eventCache;let u,l;const c=new Cv(i,t,o);if(Fg(n))l=e.filter.updateFullNode(t.eventCache.getNode(),r,s),u=$m(t,l,!0,e.filter.filtersNodes());else{const i=bg(n);if(".priority"===i)l=e.filter.updatePriority(t.eventCache.getNode(),r),u=$m(t,l,a.isFullyInitialized(),a.isFiltered());else{const o=Eg(n),l=a.getNode().getImmediateChild(i);let d;if(Fg(o))d=r;else{const e=c.getCompleteChild(i);d=null!=e?".priority"===Cg(o)&&e.getChild(Sg(o)).isEmpty()?e:e.updateChild(o,r):cm.EMPTY_NODE}if(l.equals(d))u=t;else{u=$m(t,e.filter.updateChild(a.getNode(),i,d,o,c,s),a.isFullyInitialized(),e.filter.filtersNodes())}}}return u}function Av(e,t){return e.eventCache.isCompleteForChild(t)}function Tv(e,t,n){return n.foreach((e,n)=>{t=t.updateChild(e,n)}),t}function Iv(e,t,n,r,i,o,s,a){if(t.serverCache.getNode().isEmpty()&&!t.serverCache.isFullyInitialized())return t;let u,l=t;u=Fg(n)?r:new Jm(null).setTree(n,r);const c=t.serverCache.getNode();return u.children.inorderTraversal((n,r)=>{if(c.hasChild(n)){const u=Tv(0,t.serverCache.getNode().getImmediateChild(n),r);l=xv(e,l,new Dg(n),u,i,o,s,a)}}),u.children.inorderTraversal((n,r)=>{const u=!t.serverCache.isCompleteForChild(n)&&null===r.value;if(!c.hasChild(n)&&!u){const u=Tv(0,t.serverCache.getNode().getImmediateChild(n),r);l=xv(e,l,new Dg(n),u,i,o,s,a)}}),l}class Pv{constructor(e,t){this.query_=e,this.eventRegistrations_=[];const n=this.query_._queryParams,r=new Dm(n.getIndex()),i=(o=n).loadsAllData()?new Dm(o.getIndex()):o.hasLimit()?new bm(o):new _m(o);var o;this.processor_=function(e){return{filter:e}}(i);const s=t.serverCache,a=t.eventCache,u=r.updateFullNode(cm.EMPTY_NODE,s.getNode(),null),l=i.updateFullNode(cm.EMPTY_NODE,a.getNode(),null),c=new Um(u,s.isFullyInitialized(),r.filtersNodes()),d=new Um(l,a.isFullyInitialized(),i.filtersNodes());this.viewCache_=Wm(d,c),this.eventGenerator_=new Hm(this.query_)}get query(){return this.query_}}function Ov(e,t){const n=Km(e.viewCache_);return n&&(e.query._queryParams.loadsAllData()||!Fg(t)&&!n.getImmediateChild(bg(t)).isEmpty())?n.getChild(t):null}function Nv(e){return 0===e.eventRegistrations_.length}function Rv(e,t,n){const r=[];if(n){Gs(null==t,"A cancel should cancel all event registrations.");const i=e.query._path;e.eventRegistrations_.forEach(e=>{const t=e.createCancelEvent(n,i);t&&r.push(t)})}if(t){let n=[];for(let r=0;r<e.eventRegistrations_.length;++r){const i=e.eventRegistrations_[r];if(i.matches(t)){if(t.hasAnyCallback()){n=n.concat(e.eventRegistrations_.slice(r+1));break}}else n.push(i)}e.eventRegistrations_=n}else e.eventRegistrations_=[];return r}function Bv(e,t,n,r){t.type===Rm.MERGE&&null!==t.source.queryId&&(Gs(Km(e.viewCache_),"We should always have a full cache before handling merges"),Gs(Gm(e.viewCache_),"Missing event cache, even though we have a server cache"));const i=e.viewCache_,o=kv(e.processor_,i,t,n,r);var s,a;return s=e.processor_,a=o.viewCache,Gs(a.eventCache.getNode().isIndexed(s.filter.getIndex()),"Event snap not indexed"),Gs(a.serverCache.getNode().isIndexed(s.filter.getIndex()),"Server snap not indexed"),Gs(o.viewCache.serverCache.isFullyInitialized()||!i.serverCache.isFullyInitialized(),"Once a server snap is complete, it should never go back"),e.viewCache_=o.viewCache,Lv(e,o.changes,o.viewCache.eventCache.getNode(),null)}function Lv(e,t,n,r){const i=r?[r]:e.eventRegistrations_;return function(e,t,n,r){const i=[],o=[];return t.forEach(t=>{var n;"child_changed"===t.type&&e.index_.indexedValueChanged(t.oldSnap,t.snapshotNode)&&o.push((n=t.childName,{type:"child_moved",snapshotNode:t.snapshotNode,childName:n}))}),qm(e,i,"child_removed",t,r,n),qm(e,i,"child_added",t,r,n),qm(e,i,"child_moved",o,r,n),qm(e,i,"child_changed",t,r,n),qm(e,i,"value",t,r,n),i}(e.eventGenerator_,t,n,i)}let Mv,jv;class zv{constructor(){this.views=new Map}}function Uv(e,t,n,r){const i=t.source.queryId;if(null!==i){const o=e.views.get(i);return Gs(null!=o,"SyncTree gave us an op for an invalid query."),Bv(o,t,n,r)}{let i=[];for(const o of e.views.values())i=i.concat(Bv(o,t,n,r));return i}}function Hv(e,t,n,r,i){const o=t._queryIdentifier,s=e.views.get(o);if(!s){let e=fv(n,i?r:null),o=!1;e?o=!0:r instanceof cm?(e=gv(n,r),o=!1):(e=cm.EMPTY_NODE,o=!1);const s=Wm(new Um(e,o,!1),new Um(r,i,!1));return new Pv(t,s)}return s}function qv(e,t,n,r,i,o){const s=Hv(e,t,r,i,o);return e.views.has(t._queryIdentifier)||e.views.set(t._queryIdentifier,s),function(e,t){e.eventRegistrations_.push(t)}(s,n),function(e,t){const n=e.viewCache_.eventCache,r=[];n.getNode().isLeafNode()||n.getNode().forEachChild(nm,(e,t)=>{r.push(mm(e,t))});return n.isFullyInitialized()&&r.push(gm(n.getNode())),Lv(e,r,n.getNode(),t)}(s,n)}function Wv(e,t,n,r){const i=t._queryIdentifier,o=[];let s=[];const a=Yv(e);if("default"===i)for(const[u,l]of e.views.entries())s=s.concat(Rv(l,n,r)),Nv(l)&&(e.views.delete(u),l.query._queryParams.loadsAllData()||o.push(l.query));else{const t=e.views.get(i);t&&(s=s.concat(Rv(t,n,r)),Nv(t)&&(e.views.delete(i),t.query._queryParams.loadsAllData()||o.push(t.query)))}return a&&!Yv(e)&&o.push(new(Gs(Mv,"Reference.ts has not been loaded"),Mv)(t._repo,t._path)),{removed:o,events:s}}function $v(e){const t=[];for(const n of e.views.values())n.query._queryParams.loadsAllData()||t.push(n);return t}function Vv(e,t){let n=null;for(const r of e.views.values())n=n||Ov(r,t);return n}function Gv(e,t){if(t._queryParams.loadsAllData())return Jv(e);{const n=t._queryIdentifier;return e.views.get(n)}}function Kv(e,t){return null!=Gv(e,t)}function Yv(e){return null!=Jv(e)}function Jv(e){for(const t of e.views.values())if(t.query._queryParams.loadsAllData())return t;return null}let Qv=1;class Xv{constructor(e){this.listenProvider_=e,this.syncPointTree_=new Jm(null),this.pendingWriteTree_={visibleWrites:Qm.empty(),allWrites:[],lastWriteId:-1},this.tagToQueryMap=new Map,this.queryToTagMap=new Map}}function Zv(e,t,n,r,i){return function(e,t,n,r,i){Gs(r>e.lastWriteId,"Stacking an older write on top of newer ones"),void 0===i&&(i=!0),e.allWrites.push({path:t,snap:n,writeId:r,visible:i}),i&&(e.visibleWrites=Xm(e.visibleWrites,t,n)),e.lastWriteId=r}(e.pendingWriteTree_,t,n,r,i),i?uy(e,new jm({fromUser:!0,fromServer:!1,queryId:null,tagged:!1},t,n)):[]}
2function ey(e,t,n,r){!function(e,t,n,r){Gs(r>e.lastWriteId,"Stacking an older merge on top of newer ones"),e.allWrites.push({path:t,children:n,writeId:r,visible:!0}),e.visibleWrites=Zm(e.visibleWrites,t,n),e.lastWriteId=r}(e.pendingWriteTree_,t,n,r);const i=Jm.fromObject(n);return uy(e,new zm({fromUser:!0,fromServer:!1,queryId:null,tagged:!1},t,i))}function ty(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=function(e,t){for(let n=0;n<e.allWrites.length;n++){const r=e.allWrites[n];if(r.writeId===t)return r}return null}(e.pendingWriteTree_,t);if(lv(e.pendingWriteTree_,t)){let t=new Jm(null);return null!=r.snap?t=t.set(_g(),!0):Hf(r.children,e=>{t=t.set(new Dg(e),!0)}),uy(e,new Lm(r.path,t,n))}return[]}function ny(e,t,n){return uy(e,new jm({fromUser:!1,fromServer:!0,queryId:null,tagged:!1},t,n))}function ry(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const o=t._path,s=e.syncPointTree_.get(o);let a=[];if(s&&("default"===t._queryIdentifier||Kv(s,t))){const u=Wv(s,t,n,r);0===s.views.size&&(e.syncPointTree_=e.syncPointTree_.remove(o));const l=u.removed;if(a=u.events,!i){const n=-1!==l.findIndex(e=>e._queryParams.loadsAllData()),i=e.syncPointTree_.findOnPath(o,(e,t)=>Yv(t));if(n&&!i){const t=e.syncPointTree_.subtree(o);if(!t.isEmpty()){const n=function(e){return e.fold((e,t,n)=>{if(t&&Yv(t)){return[Jv(t)]}{let e=[];return t&&(e=$v(t)),Hf(n,(t,n)=>{e=e.concat(n)}),e}})}(t);for(let t=0;t<n.length;++t){const r=n[t],i=r.query,o=dy(e,r);e.listenProvider_.startListening(vy(i),hy(e,i),o.hashFn,o.onComplete)}}}if(!i&&l.length>0&&!r)if(n){const n=null;e.listenProvider_.stopListening(vy(t),n)}else l.forEach(t=>{const n=e.queryToTagMap.get(py(t));e.listenProvider_.stopListening(vy(t),n)})}!function(e,t){for(let n=0;n<t.length;++n){const r=t[n];if(!r._queryParams.loadsAllData()){const t=py(r),n=e.queryToTagMap.get(t);e.queryToTagMap.delete(t),e.tagToQueryMap.delete(n)}}}(e,l)}return a}function iy(e,t,n,r){const i=fy(e,r);if(null!=i){const r=gy(i),o=r.path,s=r.queryId,a=Ag(o,t);return my(e,o,new jm(Bm(s),a,n))}return[]}function oy(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=t._path;let o=null,s=!1;e.syncPointTree_.foreachOnPath(i,(e,t)=>{const n=Ag(e,i);o=o||Vv(t,n),s=s||Yv(t)});let a,u=e.syncPointTree_.get(i);if(u?(s=s||Yv(u),o=o||Vv(u,_g())):(u=new zv,e.syncPointTree_=e.syncPointTree_.set(i,u)),null!=o)a=!0;else{a=!1,o=cm.EMPTY_NODE;e.syncPointTree_.subtree(i).foreachChild((e,t)=>{const n=Vv(t,_g());n&&(o=o.updateImmediateChild(e,n))})}const l=Kv(u,t);if(!l&&!t._queryParams.loadsAllData()){const n=py(t);Gs(!e.queryToTagMap.has(n),"View does not exist, but we have a tag");const r=Qv++;e.queryToTagMap.set(n,r),e.tagToQueryMap.set(r,n)}let c=qv(u,t,n,uv(e.pendingWriteTree_,i),o,a);if(!l&&!s&&!r){const n=Gv(u,t);c=c.concat(function(e,t,n){const r=t._path,i=hy(e,t),o=dy(e,n),s=e.listenProvider_.startListening(vy(t),i,o.hashFn,o.onComplete),a=e.syncPointTree_.subtree(r);if(i)Gs(!Yv(a.value),"If we're adding a query, it shouldn't be shadowed");else{const t=a.fold((e,t,n)=>{if(!Fg(e)&&t&&Yv(t))return[Jv(t).query];{let e=[];return t&&(e=e.concat($v(t).map(e=>e.query))),Hf(n,(t,n)=>{e=e.concat(n)}),e}});for(let n=0;n<t.length;++n){const r=t[n];e.listenProvider_.stopListening(vy(r),hy(e,r))}}return s}(e,t,n))}return c}function sy(e,t,n){const r=e.pendingWriteTree_,i=e.syncPointTree_.findOnPath(t,(e,n)=>{const r=Vv(n,Ag(e,t));if(r)return r});return pv(r,t,i,n,!0)}function ay(e,t){const n=t._path;let r=null;e.syncPointTree_.foreachOnPath(n,(e,t)=>{const i=Ag(e,n);r=r||Vv(t,i)});let i=e.syncPointTree_.get(n);i?r=r||Vv(i,_g()):(i=new zv,e.syncPointTree_=e.syncPointTree_.set(n,i));const o=null!=r,s=o?new Um(r,!0,!1):null;return function(e){return Gm(e.viewCache_)}(Hv(i,t,uv(e.pendingWriteTree_,t._path),o?s.getNode():cm.EMPTY_NODE,o))}function uy(e,t){return ly(t,e.syncPointTree_,null,uv(e.pendingWriteTree_,_g()))}function ly(e,t,n,r){if(Fg(e.path))return cy(e,t,n,r);{const i=t.get(_g());null==n&&null!=i&&(n=Vv(i,_g()));let o=[];const s=bg(e.path),a=e.operationForChild(s),u=t.children.get(s);if(u&&a){const e=n?n.getImmediateChild(s):null,t=_v(r,s);o=o.concat(ly(a,u,e,t))}
vendor: 1,607 bytes, line 2
2return i&&(o=o.concat(Uv(i,e,r,n))),o}}function cy(e,t,n,r){const i=t.get(_g());null==n&&null!=i&&(n=Vv(i,_g()));let o=[];return t.children.inorderTraversal((t,i)=>{const s=n?n.getImmediateChild(t):null,a=_v(r,t),u=e.operationForChild(t);u&&(o=o.concat(cy(u,i,s,a)))}),i&&(o=o.concat(Uv(i,e,r,n))),o}function dy(e,t){const n=t.query,r=hy(e,n);return{hashFn:()=>{const e=function(e){return e.viewCache_.serverCache.getNode()}(t)||cm.EMPTY_NODE;return e.hash()},onComplete:t=>{if("ok"===t)return r?function(e,t,n){const r=fy(e,n);if(r){const n=gy(r),i=n.path,o=n.queryId,s=Ag(i,t);return my(e,i,new Mm(Bm(o),s))}return[]}(e,n._path,r):function(e,t){return uy(e,new Mm({fromUser:!1,fromServer:!0,queryId:null,tagged:!1},t))}(e,n._path);{const r=function(e,t){let n="Unknown Error";"too_big"===e?n="The data requested exceeds the maximum size that can be accessed with a single request.":"permission_denied"===e?n="Client doesn't have permission to access the desired data.":"unavailable"===e&&(n="The service is unavailable");const r=new Error(e+" at "+t._path.toString()+": "+n);return r.code=e.toUpperCase(),r}(t,n);return ry(e,n,null,r)}}}}function hy(e,t){const n=py(t);return e.queryToTagMap.get(n)}function py(e){return e._path.toString()+"$"+e._queryIdentifier}function fy(e,t){return e.tagToQueryMap.get(t)}function gy(e){const t=e.indexOf("$");return Gs(-1!==t&&t<e.length-1,"Bad queryKey."),{queryId:e.substr(t+1),path:new Dg(e.substr(0,t))}}function my(e,t,n){const r=e.syncPointTree_.get(t);Gs(r,"Missing sync point for query tag that we're tracking");return Uv(r,n,uv(e.pendingWriteTree_,t),null)}
2function vy(e){return e._queryParams.loadsAllData()&&!e._queryParams.isDefault()?new(Gs(jv,"Reference.ts has not been loaded"),jv)(e._repo,e._path):e}class yy{constructor(e){this.node_=e}getImmediateChild(e){const t=this.node_.getImmediateChild(e);return new yy(t)}node(){return this.node_}}class Dy{constructor(e,t){this.syncTree_=e,this.path_=t}getImmediateChild(e){const t=xg(this.path_,e);return new Dy(this.syncTree_,t)}node(){return sy(this.syncTree_,this.path_)}}const _y=function(e,t,n){return e&&"object"===typeof e?(Gs(".sv"in e,"Unexpected leaf node or priority contents"),"string"===typeof e[".sv"]?by(e[".sv"],t,n):"object"===typeof e[".sv"]?wy(e[".sv"],t):void Gs(!1,"Unexpected server value: "+JSON.stringify(e,null,2))):e},by=function(e,t,n){if("timestamp"===e)return n.timestamp;Gs(!1,"Unexpected server value: "+e)},wy=function(e,t,n){e.hasOwnProperty("increment")||Gs(!1,"Unexpected server value: "+JSON.stringify(e,null,2));const r=e.increment;"number"!==typeof r&&Gs(!1,"Unexpected increment value: "+r);const i=t.node();if(Gs(null!==i&&"undefined"!==typeof i,"Expected ChildrenNode.EMPTY_NODE for nulls"),!i.isLeafNode())return r;const o=i.getValue();return"number"!==typeof o?r:o+r},Ey=function(e,t,n,r){return ky(t,new Dy(n,e),r)},Cy=function(e,t,n){return ky(e,new yy(t),n)};function ky(e,t,n){const r=e.getPriority().val(),i=_y(r,t.getImmediateChild(".priority"),n);let o;if(e.isLeafNode()){const r=e,o=_y(r.getValue(),t,n);return o!==r.getValue()||i!==r.getPriority().val()?new tm(o,hm(i)):e}{const r=e;return o=r,i!==r.getPriority().val()&&(o=o.updatePriority(new tm(i))),r.forEachChild(nm,(e,r)=>{const i=ky(r,t.getImmediateChild(e),n);i!==r&&(o=o.updateImmediateChild(e,i))}),o}}class Sy{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{children:{},childCount:0};this.name=e,this.parent=t,this.node=n}}function xy(e,t){let n=t instanceof Dg?t:new Dg(t),r=e,i=bg(n);for(;null!==i;){const e=Aa(r.node.children,i)||{children:{},childCount:0};r=new Sy(i,r,e),n=Eg(n),i=bg(n)}return r}function Fy(e){return e.node.value}function Ay(e,t){e.node.value=t,Ny(e)}function Ty(e){return e.node.childCount>0}function Iy(e,t){Hf(e.node.children,(n,r)=>{t(new Sy(n,e,r))})}function Py(e,t,n,r){n&&!r&&t(e),Iy(e,e=>{Py(e,t,!0,r)}),n&&r&&t(e)}function Oy(e){return new Dg(null===e.parent?e.name:Oy(e.parent)+"/"+e.name)}function Ny(e){null!==e.parent&&function(e,t,n){const r=function(e){return void 0===Fy(e)&&!Ty(e)}(n),i=Fa(e.node.children,t);r&&i?(delete e.node.children[t],e.node.childCount--,Ny(e)):r||i||(e.node.children[t]=n.node,e.node.childCount++,Ny(e))}(e.parent,e.name,e)}const Ry=/[\[\].#$\/\u0000-\u001F\u007F]/,By=/[\[\].#$\u0000-\u001F\u007F]/,Ly=10485760,My=function(e){return"string"===typeof e&&0!==e.length&&!Ry.test(e)},jy=function(e){return"string"===typeof e&&0!==e.length&&!By.test(e)},zy=function(e){return null===e||"string"===typeof e||"number"===typeof e&&!Nf(e)||e&&"object"===typeof e&&Fa(e,".sv")},Uy=function(e,t,n,r){r&&void 0===t||Hy(za(e,"value"),t,n)},Hy=function(e,t,n){const r=n instanceof Dg?new Og(n,e):n;if(void 0===t)throw new Error(e+"contains undefined "+Rg(r));if("function"===typeof t)throw new Error(e+"contains a function "+Rg(r)+" with contents = "+t.toString());if(Nf(t))throw new Error(e+"contains "+t.toString()+" "+Rg(r));if("string"===typeof t&&t.length>Ly/3&&Ua(t)>Ly)throw new Error(e+"contains a string greater than "+Ly+" utf8 bytes "+Rg(r)+" ('"+t.substring(0,50)+"...')");if(t&&"object"===typeof t){let n=!1,i=!1;if(Hf(t,(t,o)=>{if(".value"===t)n=!0;else if(".priority"!==t&&".sv"!==t&&(i=!0,!My(t)))throw new Error(e+" contains an invalid key ("+t+") "+Rg(r)+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');!function(e,t){e.parts_.length>0&&(e.byteLength_+=1),e.parts_.push(t),e.byteLength_+=Ua(t),Ng(e)}(r,t),Hy(e,o,r),function(e){const t=e.parts_.pop();e.byteLength_-=Ua(t),e.parts_.length>0&&(e.byteLength_-=1)}(r)}),n&&i)throw new Error(e+' contains ".value" child '+Rg(r)+" in addition to actual children.")}},qy=function(e,t,n,r){if(r&&void 0===t)return;const i=za(e,"values");if(!t||"object"!==typeof t||Array.isArray(t))throw new Error(i+" must be an object c
2ontaining the children to replace.");const o=[];Hf(t,(e,t)=>{const r=new Dg(e);if(Hy(i,t,xg(n,r)),".priority"===Cg(r)&&!zy(t))throw new Error(i+"contains an invalid value for '"+r.toString()+"', which must be a valid Firebase priority (a string, finite number, server value, or null).");o.push(r)}),function(e,t){let n,r;for(n=0;n<t.length;n++){r=t[n];const i=kg(r);for(let t=0;t<i.length;t++)if(".priority"===i[t]&&t===i.length-1);else if(!My(i[t]))throw new Error(e+"contains an invalid key ("+i[t]+") in path "+r.toString()+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"')}t.sort(Tg);let i=null;for(n=0;n<t.length;n++){if(r=t[n],null!==i&&Pg(i,r))throw new Error(e+"contains a path "+i.toString()+" that is ancestor of another path "+r.toString());i=r}}(i,o)},Wy=function(e,t,n){if(!n||void 0!==t){if(Nf(t))throw new Error(za(e,"priority")+"is "+t.toString()+", but must be a valid Firebase priority (a string, finite number, server value, or null).");if(!zy(t))throw new Error(za(e,"priority")+"must be a valid Firebase priority (a string, finite number, server value, or null).")}},$y=function(e,t,n,r){if((!r||void 0!==n)&&!My(n))throw new Error(za(e,t)+'was an invalid key = "'+n+'". Firebase keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]").')},Vy=function(e,t,n,r){if((!r||void 0!==n)&&!jy(n))throw new Error(za(e,t)+'was an invalid path = "'+n+'". Paths must be non-empty strings and can\'t contain ".", "#", "$", "[", or "]"')},Gy=function(e,t){if(".info"===bg(t))throw new Error(e+" failed = Can't modify data under /.info/")},Ky=function(e,t){const n=t.path.toString();if("string"!==typeof t.repoInfo.host||0===t.repoInfo.host.length||!My(t.repoInfo.namespace)&&"localhost"!==t.repoInfo.host.split(":")[0]||0!==n.length&&!function(e){return e&&(e=e.replace(/^\/*\.info(\/|$)/,"/")),jy(e)}(n))throw new Error(za(e,"url")+'must be a valid firebase URL and the path can\'t contain ".", "#", "$", "[", or "]".')};class Yy{constructor(){this.eventLists_=[],this.recursionDepth_=0}}function Jy(e,t){let n=null;for(let r=0;r<t.length;r++){const i=t[r],o=i.getPath();null===n||Ig(o,n.path)||(e.eventLists_.push(n),n=null),null===n&&(n={events:[],path:o}),n.events.push(i)}n&&e.eventLists_.push(n)}function Qy(e,t,n){Jy(e,n),Zy(e,e=>Ig(e,t))}function Xy(e,t,n){Jy(e,n),Zy(e,e=>Pg(e,t)||Pg(t,e))}function Zy(e,t){e.recursionDepth_++;let n=!0;for(let r=0;r<e.eventLists_.length;r++){const i=e.eventLists_[r];if(i){t(i.path)?(eD(e.eventLists_[r]),e.eventLists_[r]=null):n=!1}}n&&(e.eventLists_=[]),e.recursionDepth_--}function eD(e){for(let t=0;t<e.events.length;t++){const n=e.events[t];if(null!==n){e.events[t]=null;const r=n.getEventRunner();Sf&&Af("event: "+n.toString()),Vf(r)}}}const tD="repo_interrupt";class nD{constructor(e,t,n,r){this.repoInfo_=e,this.forceRestClient_=t,this.authTokenProvider_=n,this.appCheckProvider_=r,this.dataUpdateCount=0,this.statsListener_=null,this.eventQueue_=new Yy,this.nextWriteId_=1,this.interceptServerDataCallback_=null,this.onDisconnect_=Am(),this.transactionQueueTree_=new Sy,this.persistentConnection_=null,this.key=this.repoInfo_.toURLString()}toString(){return(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host}}function rD(e,t,n){if(e.stats_=ag(e.repoInfo_),e.forceRestClient_||("object"===typeof window&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0)e.server_=new xm(e.repoInfo_,(t,n,r,i)=>{sD(e,t,n,r,i)},e.authTokenProvider_,e.appCheckProvider_),setTimeout(()=>aD(e,!0),0);else{if("undefined"!==typeof n&&null!==n){if("object"!==typeof n)throw new Error("Only objects are supported for option databaseAuthVariableOverride");try{Sa(n)}catch(y_){throw new Error("Invalid authOverride provided: "+y_)}}e.persistentConnection_=new Mg(e.repoInfo_,t,(t,n,r,i)=>{sD(e,t,n,r,i)},t=>{aD(e,t)},t=>{!function(e,t){Hf(t,(t,n)=>{uD(e,t,n)})}(e,t)},e.authTokenProvider_,e.appCheckProvider_,n),e.server_=e.persistentConnection_}e.authTokenProvider_.addTokenChangeListener(t=>{e.server_.refreshAuthToken(t)}),e.appCheckProvider_.addTokenChangeListener(t=>{e.server_.refreshAppCheckToken(t.token)}),e.statsReporter_=function(e,t){const n=e.toString();return sg[n]||(sg[n]=t()),sg[n]}(e.repoInfo_,()=>new Nm(e.stats_,e.server_)),e.infoData_=new Fm,e.infoSyncTree_=new Xv({startListening:(t,n,r,i)=>{let o=[];const s=e.infoData_.getNode(t._path);return s.isEmpty()||(o=ny(e.infoSyncTree_,t._path,s),setTimeout(()=>{i("ok")},0)),o},stopListening:()=>{}}),uD(e,"connected",!1),e.serverSyncTree_=new Xv({startListening:(t,n,r,i)=>(e.server_.listen(t,r,n,(n,r)=>{const o=i(n,r);Xy(e.eventQueue_,t._path,o)}),[]),stopListening:(t,n)=>{e.server_.unlisten(t,n)}})}function iD(e){const t=e.infoData_.getNode(new Dg(".info/serverTimeOffset")).val()||0;return(new Date).getTime()+t}function oD(e){return(t=(t={timestamp:iD(e)})||{}).timestamp=t.timestamp||(new Date).getTime(),t;var t}function sD(e,t,n,r,i){e.dataUpdateCount++;const o=new Dg(t);n=e.interceptServerDataCallback_?e.interceptServerDataCallback_(t,n):n;let s=[];if(i)if(r){const t=Ia(n,e=>hm(e));s=function(e,t,n,r){const i=fy(e,r);if(i){const r=gy(i),o=r.path,s=r.queryId,a=Ag(o,t),u=Jm.fromObject(n);return my(e,o,new zm(Bm(s),a,u))}return[]}(e.serverSyncTree_,o,t,i)}else{const t=hm(n);s=iy(e.serverSyncTree_,o,t,i)}else if(r){const t=Ia(n,e=>hm(e));s=function(e,t,n){const r=Jm.fromObject(n);return uy(e,new zm({fromUser:!1,fromServer:!0,queryId:null,tagged:!1},t,r))}(e.serverSyncTree_,o,t)}else{const t=hm(n);s=ny(e.serverSyncTree_,o,t)}let a=o;s.length>0&&(a=DD(e,o)),Xy(e.eventQueue_,a,s)}function aD(e,t){uD(e,"connected",t),!1===t&&function(e){gD(e,"onDisconnectEvents");const t=oD(e),n=Am();Pm(e.onDisconnect_,_g(),(r,i)=>{const o=Ey(r,i,e.serverSyncTree_,t);Tm(n,r,o)});let r=[];Pm(n,_g(),(t,n)=>{r=r.concat(ny(e.serverSyncTree_,t,n));const i=CD(e,t);DD(e,i)}),e.onDisconnect_=Am(),Xy(e.eventQueue_,_g(),r)}(e)}function uD(e,t,n){const r=new Dg("/.info/"+t),i=hm(n);e.infoData_.updateSnapshot(r,i);const o=ny(e.infoSyncTree_,r,i);Xy(e.eventQueue_,r,o)}function lD(e){return e.nextWriteId_++}function cD(e,t,n,r,i){gD(e,"set",{path:t.toString(),value:n,priority:r});const o=oD(e),s=hm(n,r),a=sy(e.serverSyncTree_,t),u=Cy(s,a,o),l=lD(e),c=Zv(e.serverSyncTree_,t,u,l,!0);Jy(e.eventQueue_,c),e.server_.put(t.toString(),s.val(!0),(n,r)=>{const o="ok"===n;o||Of("set at "+t+" failed: "+n);const s=ty(e.serverSyncTree_,l,!o);Xy(e.eventQueue_,t,s),mD(e,i,n,r)});const d=CD(e,t);DD(e,d),Xy(e.eventQueue_,d,[])}
2function dD(e,t,n){e.server_.onDisconnectCancel(t.toString(),(r,i)=>{"ok"===r&&Im(e.onDisconnect_,t),mD(e,n,r,i)})}function hD(e,t,n,r){const i=hm(n);e.server_.onDisconnectPut(t.toString(),i.val(!0),(n,o)=>{"ok"===n&&Tm(e.onDisconnect_,t,i),mD(e,r,n,o)})}function pD(e,t,n){let r;r=".info"===bg(t._path)?ry(e.infoSyncTree_,t,n):ry(e.serverSyncTree_,t,n),Qy(e.eventQueue_,t._path,r)}function fD(e){e.persistentConnection_&&e.persistentConnection_.interrupt(tD)}function gD(e){let t="";e.persistentConnection_&&(t=e.persistentConnection_.id+":");for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];Af(t,...r)}function mD(e,t,n,r){t&&Vf(()=>{if("ok"===n)t(null);else{const e=(n||"error").toUpperCase();let i=e;r&&(i+=": "+r);const o=new Error(i);o.code=e,t(o)}})}function vD(e,t,n){return sy(e.serverSyncTree_,t,n)||cm.EMPTY_NODE}function yD(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.transactionQueueTree_;if(t||ED(e,t),Fy(t)){const n=bD(e,t);Gs(n.length>0,"Sending zero length transaction queue");n.every(e=>0===e.status)&&function(e,t,n){const r=n.map(e=>e.currentWriteId),i=vD(e,t,r);let o=i;const s=i.hash();for(let l=0;l<n.length;l++){const e=n[l];Gs(0===e.status,"tryToSendTransactionQueue_: items in queue should all be run."),e.status=1,e.retryCount++;const r=Ag(t,e.path);o=o.updateChild(r,e.currentOutputSnapshotRaw)}const a=o.val(!0),u=t;e.server_.put(u.toString(),a,r=>{gD(e,"transaction put response",{path:u.toString(),status:r});let i=[];if("ok"===r){const r=[];for(let t=0;t<n.length;t++)n[t].status=2,i=i.concat(ty(e.serverSyncTree_,n[t].currentWriteId)),n[t].onComplete&&r.push(()=>n[t].onComplete(null,!0,n[t].currentOutputSnapshotResolved)),n[t].unwatcher();ED(e,xy(e.transactionQueueTree_,t)),yD(e,e.transactionQueueTree_),Xy(e.eventQueue_,t,i);for(let e=0;e<r.length;e++)Vf(r[e])}else{if("datastale"===r)for(let e=0;e<n.length;e++)3===n[e].status?n[e].status=4:n[e].status=0;else{Of("transaction at "+u.toString()+" failed: "+r);for(let e=0;e<n.length;e++)n[e].status=4,n[e].abortReason=r}DD(e,t)}},s)}(e,Oy(t),n)}else Ty(t)&&Iy(t,t=>{yD(e,t)})}function DD(e,t){const n=_D(e,t),r=Oy(n);return function(e,t,n){if(0===t.length)return;const r=[];let i=[];const o=t.filter(e=>0===e.status),s=o.map(e=>e.currentWriteId);for(let a=0;a<t.length;a++){const o=t[a],u=Ag(n,o.path);let l,c=!1;if(Gs(null!==u,"rerunTransactionsUnderNode_: relativePath should not be null."),4===o.status)c=!0,l=o.abortReason,i=i.concat(ty(e.serverSyncTree_,o.currentWriteId,!0));else if(0===o.status)if(o.retryCount>=25)c=!0,l="maxretry",i=i.concat(ty(e.serverSyncTree_,o.currentWriteId,!0));else{const n=vD(e,o.path,s);o.currentInputSnapshot=n;const r=t[a].update(n.val());if(void 0!==r){Hy("transaction failed: Data returned ",r,o.path);let t=hm(r);"object"===typeof r&&null!=r&&Fa(r,".priority")||(t=t.updatePriority(n.getPriority()));const a=o.currentWriteId,u=oD(e),l=Cy(t,n,u);o.currentOutputSnapshotRaw=t,o.currentOutputSnapshotResolved=l,o.currentWriteId=lD(e),s.splice(s.indexOf(a),1),i=i.concat(Zv(e.serverSyncTree_,o.path,l,o.currentWriteId,o.applyLocally)),i=i.concat(ty(e.serverSyncTree_,a,!0))}else c=!0,l="nodata",i=i.concat(ty(e.serverSyncTree_,o.currentWriteId,!0))}Xy(e.eventQueue_,n,i),i=[],c&&(t[a].status=2,function(e){setTimeout(e,Math.floor(0))}(t[a].unwatcher),t[a].onComplete&&("nodata"===l?r.push(()=>t[a].onComplete(null,!1,t[a].currentInputSnapshot)):r.push(()=>t[a].onComplete(new Error(l),!1,null))))}ED(e,e.transactionQueueTree_);for(let a=0;a<r.length;a++)Vf(r[a]);yD(e,e.transactionQueueTree_)}(e,bD(e,n),r),r}function _D(e,t){let n,r=e.transactionQueueTree_;for(n=bg(t);null!==n&&void 0===Fy(r);)r=xy(r,n),n=bg(t=Eg(t));return r}function bD(e,t){const n=[];return wD(e,t,n),n.sort((e,t)=>e.order-t.order),n}function wD(e,t,n){const r=Fy(t);if(r)for(let i=0;i<r.length;i++)n.push(r[i]);Iy(t,t=>{wD(e,t,n)})}function ED(e,t){const n=Fy(t);if(n){let e=0;for(let t=0;t<n.length;t++)2!==n[t].status&&(n[e]=n[t],e++);n.length=e,Ay(t,n.length>0?n:void 0)}Iy(t,t=>{ED(e,t)})}function CD(e,t){const n=Oy(_D(e,t)),r=xy(e.transactionQueueTree_,t);return function(e,t,n){let r=n?e:e.parent;for(;null!==r;){if(t(r))return!0;r=r.parent}}(r,t=>{kD(e,t)}),kD(e,r),Py(r,t=>{kD(e,t)}),n}function kD(e,t){const n=Fy(t);if(n){const r=[];let i=[],o=-1;for(let t=0;t<n.length;t++)3===n[t].status||(1===n[t].status?(Gs(o===t-1,"All SENT items should be at beginning of queue."),o=t,n[t].status=3,n[t].abortReason="set"):(Gs(0===n[t].status,"Unexpected transaction status in abort"),n[t].unwatcher(),i=i.
vendor: 10,737 bytes, line 2
2concat(ty(e.serverSyncTree_,n[t].currentWriteId,!0)),n[t].onComplete&&r.push(n[t].onComplete.bind(null,new Error("set"),!1,null))));-1===o?Ay(t,void 0):n.length=o+1,Xy(e.eventQueue_,Oy(t),i);for(let e=0;e<r.length;e++)Vf(r[e])}}const SD=function(e,t){const n=xD(e),r=n.namespace;"firebase.com"===n.domain&&Pf(n.host+" is no longer supported. Please use <YOUR FIREBASE>.firebaseio.com instead"),r&&"undefined"!==r||"localhost"===n.domain||Pf("Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com"),n.secure||"undefined"!==typeof window&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&Of("Insecure Firebase access from a secure page. Please use https in calls to new Firebase().");const i="ws"===n.scheme||"wss"===n.scheme;return{repoInfo:new ng(n.host,n.secure,r,i,t,"",r!==n.subdomain),path:new Dg(n.pathString)}},xD=function(e){let t="",n="",r="",i="",o="",s=!0,a="https",u=443;if("string"===typeof e){let l=e.indexOf("//");l>=0&&(a=e.substring(0,l-1),e=e.substring(l+2));let c=e.indexOf("/");-1===c&&(c=e.length);let d=e.indexOf("?");-1===d&&(d=e.length),t=e.substring(0,Math.min(c,d)),c<d&&(i=function(e){let t="";const n=e.split("/");for(let r=0;r<n.length;r++)if(n[r].length>0){let e=n[r];try{e=decodeURIComponent(e.replace(/\+/g," "))}catch(y_){}t+="/"+e}return t}(e.substring(c,d)));const h=function(e){const t={};"?"===e.charAt(0)&&(e=e.substring(1));for(const n of e.split("&")){if(0===n.length)continue;const r=n.split("=");2===r.length?t[decodeURIComponent(r[0])]=decodeURIComponent(r[1]):Of("Invalid query segment '".concat(n,"' in query '").concat(e,"'"))}return t}(e.substring(Math.min(e.length,d)));l=t.indexOf(":"),l>=0?(s="https"===a||"wss"===a,u=parseInt(t.substring(l+1),10)):l=t.length;const p=t.slice(0,l);if("localhost"===p.toLowerCase())n="localhost";else if(p.split(".").length<=2)n=p;else{const e=t.indexOf(".");r=t.substring(0,e).toLowerCase(),n=t.substring(e+1),o=r}"ns"in h&&(o=h.ns)}return{host:t,port:u,domain:n,subdomain:r,secure:s,scheme:a,pathString:i,namespace:o}},FD="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",AD=function(){let e=0;const t=[];return function(n){const r=n===e;let i;e=n;const o=new Array(8);for(i=7;i>=0;i--)o[i]=FD.charAt(n%64),n=Math.floor(n/64);Gs(0===n,"Cannot push at time == 0");let s=o.join("");if(r){for(i=11;i>=0&&63===t[i];i--)t[i]=0;t[i]++}else for(i=0;i<12;i++)t[i]=Math.floor(64*Math.random());for(i=0;i<12;i++)s+=FD.charAt(t[i]);return Gs(20===s.length,"nextPushId: Length should be 20."),s}}();class TD{constructor(e,t,n,r){this.eventType=e,this.eventRegistration=t,this.snapshot=n,this.prevName=r}getPath(){const e=this.snapshot.ref;return"value"===this.eventType?e._path:e.parent._path}getEventType(){return this.eventType}getEventRunner(){return this.eventRegistration.getEventRunner(this)}toString(){return this.getPath().toString()+":"+this.eventType+":"+Sa(this.snapshot.exportVal())}}class ID{constructor(e,t,n){this.eventRegistration=e,this.error=t,this.path=n}getPath(){return this.path}getEventType(){return"cancel"}getEventRunner(){return this.eventRegistration.getEventRunner(this)}toString(){return this.path.toString()+":cancel"}}class PD{constructor(e,t){this.snapshotCallback=e,this.cancelCallback=t}onValue(e,t){this.snapshotCallback.call(null,e,t)}onCancel(e){return Gs(this.hasCancelCallback,"Raising a cancel event on a listener with no cancel callback"),this.cancelCallback.call(null,e)}get hasCancelCallback(){return!!this.cancelCallback}matches(e){return this.snapshotCallback===e.snapshotCallback||void 0!==this.snapshotCallback.userCallback&&this.snapshotCallback.userCallback===e.snapshotCallback.userCallback&&this.snapshotCallback.context===e.snapshotCallback.context}}class OD{constructor(e,t){this._repo=e,this._path=t}cancel(){const e=new la;return dD(this._repo,this._path,e.wrapCallback(()=>{})),e.promise}remove(){Gy("OnDisconnect.remove",this._path);const e=new la;return hD(this._repo,this._path,null,e.wrapCallback(()=>{})),e.promise}set(e){Gy("OnDisconnect.set",this._path),Uy("OnDisconnect.set",e,this._path,!1);const t=new la;return hD(this._repo,this._path,e,t.wrapCallback(()=>{})),t.promise}setWithPriority(e,t){Gy("OnDisconnect.setWithPriority",this._path),Uy("OnDisconnect.setWithPriority",e,this._path,!1),Wy("OnDisconnect.setWithPriority",t,!1);const n=new la;return function(e,t,n,r,i){const o=hm(n,r);e.server_.onDisconnectPut(t.toString(),o.val(!0),(n,r)=>{"ok"===n&&Tm(e.onDisconnect_,t,o),mD(0,i,n,r)})}(this._repo,this._path,e,t,n.wrapCallback(()=>{})),n.promise}update(e){Gy("OnDisconnect.update",this._path),qy("OnDisconnect.update",e,this._path,!1);const t=new la;return function(e,t,n,r){if(Ta(n))return Af("onDisconnect().update() called with empty data. Don't do anything."),void mD(0,r,"ok",void 0);e.server_.onDisconnectMerge(t.toString(),n,(i,o)=>{"ok"===i&&Hf(n,(n,r)=>{const i=hm(r);Tm(e.onDisconnect_,xg(t,n),i)}),mD(0,r,i,o)})}(this._repo,this._path,e,t.wrapCallback(()=>{})),t.promise}}class ND{constructor(e,t,n,r){this._repo=e,this._path=t,this._queryParams=n,this._orderByCalled=r}get key(){return Fg(this._path)?null:Cg(this._path)}get ref(){return new MD(this._repo,this._path)}get _queryIdentifier(){const e=Sm(this._queryParams),t=zf(e);return"{}"===t?"default":t}get _queryObject(){return Sm(this._queryParams)}isEqual(e){if(!((e=qa(e))instanceof ND))return!1;const t=this._repo===e._repo,n=Ig(this._path,e._path),r=this._queryIdentifier===e._queryIdentifier;return t&&n&&r}toJSON(){return this.toString()}toString(){return this._repo.toString()+function(e){let t="";for(let n=e.pieceNum_;n<e.pieces_.length;n++)""!==e.pieces_[n]&&(t+="/"+encodeURIComponent(String(e.pieces_[n])));return t||"/"}(this._path)}}function RD(e,t){if(!0===e._orderByCalled)throw new Error(t+": You can't combine multiple orderBy calls.")}function BD(e){let t=null,n=null;if(e.hasStart()&&(t=e.getIndexStartValue()),e.hasEnd()&&(n=e.getIndexEndValue()),e.getIndex()===qg){const r="Query: When ordering by key, you may only pass one argument to startAt(), endAt(), or equalTo().",i="Query: When ordering by key, the argument passed to startAt(), startAfter(), endAt(), endBefore(), or equalTo() must be a string.";if(e.hasStart()){if(e.getIndexStartName()!==Rf)throw new Error(r);if("string"!==typeof t)throw new Error(i)}if(e.hasEnd()){if(e.getIndexEndName()!==Bf)throw new Error(r);if("string"!==typeof n)throw new Error(i)}}else if(e.getIndex()===nm){if(null!=t&&!zy(t)||null!=n&&!zy(n))throw new Error("Query: When ordering by priority, the first argument passed to startAt(), startAfter() endAt(), endBefore(), or equalTo() must be a valid priority value (null, a number, or a string).")}else if(Gs(e.getIndex()instanceof pm||e.getIndex()===fm,"unknown index type."),null!=t&&"object"===typeof t||null!=n&&"object"===typeof n)throw new Error("Query: First argument passed to startAt(), startAfter(), endAt(), endBefore(), or equalTo() cannot be an object.")}function LD(e){if(e.hasStart()&&e.hasEnd()&&e.hasLimit()&&!e.hasAnchoredLimit())throw new Error("Query: Can't combine startAt(), startAfter(), endAt(), endBefore(), and limit(). Use limitToFirst() or limitToLast() instead.")}class MD extends ND{constructor(e,t){super(e,t,new wm,!1)}get parent(){const e=Sg(this._path);return null===e?null:new MD(this._repo,e)}get root(){let e=this;for(;null!==e.parent;)e=e.parent;return e}}class jD{constructor(e,t,n){this._node=e,this.ref=t,this._index=n}get priority(){return this._node.getPriority().val()}get key(){return this.ref.key}get size(){return this._node.numChildren()}child(e){const t=new Dg(e),n=UD(this.ref,e);return new jD(this._node.getChild(t),n,nm)}exists(){return!this._node.isEmpty()}exportVal(){return this._node.val(!0)}forEach(e){if(this._node.isLeafNode())return!1;return!!this._node.forEachChild(this._index,(t,n)=>e(new jD(n,UD(this.ref,t),nm)))}hasChild(e){const t=new Dg(e);return!this._node.getChild(t).isEmpty()}hasChildren(){return!this._node.isLeafNode()&&!this._node.isEmpty()}toJSON(){return this.exportVal()}val(){return this._node.val()}}function zD(e,t){return(e=qa(e))._checkNotDeleted("ref"),void 0!==t?UD(e._root,t):e._root}function UD(e,t){var n,r,i,o;return null===bg((e=qa(e))._path)?(n="child",r="path",o=!1,(i=t)&&(i=i.replace(/^\/*\.info(\/|$)/,"/")),Vy(n,r,i,o)):Vy("child","path",t,!1),new MD(e._repo,xg(e._path,t))}function HD(e,t){e=qa(e),Gy("set",e._path),Uy("set",t,e._path,!1);const n=new la;return cD(e._repo,e._path,t,null,n.wrapCallback(()=>{})),n.promise}function qD(e,t){qy("update",t,e._path,!1);const n=new la;return function(e,t,n,r){gD(e,"update",{path:t.toString(),value:n});let i=!0;const o=oD(e),s={};if(Hf(n,(n,r)=>{i=!1,s[n]=Ey(xg(t,n),hm(r),e.serverSyncTree_,o)}),i)Af("update() called with empty data. Don't do anything."),mD(0,r,"ok",void 0);else{const i=lD(e),o=ey(e.serverSyncTree_,t,s,i);Jy(e.eventQueue_,o),e.server_.merge(t.toString(),n,(n,o)=>{const s="ok"===n;s||Of("update at "+t+" failed: "+n);const a=ty(e.serverSyncTree_,i,!s),u=a.length>0?DD(e,t):t;Xy(e.eventQueue_,u,a),mD(0,r,n,o)}),Hf(n,n=>{const r=CD(e,xg(t,n));DD(e,r)}),Xy(e.eventQueue_,t,[])}}(e._repo,e._path,t,n.wrapCallback(()=>{})),n.promise}function WD(e){e=qa(e);const t=new PD(()=>{}),n=new $D(t);return function(e,t,n){const r=ay(e.serverSyncTree_,t);return null!=r?Promise.resolve(r):e.server_.get(t).then(r=>{const i=hm(r).withIndex(t._queryParams.getIndex());let o;if(oy(e.serverSyncTree_,t,n,!0),t._queryParams.loadsAllData())o=ny(e.serverSyncTree_,t._path,i);else{const n=hy(e.serverSyncTree_,t);o=iy(e.serverSyncTree_,t._path,i,n)}return Xy(e.eventQueue_,t._path,o),ry(e.serverSyncTree_,t,n,null,!0),i},n=>(gD(e,"get for query "+Sa(t)+" failed: "+n),Promise.reject(new Error(n))))}(e._repo,e,n).then(t=>new jD(t,new MD(e._repo,e._path),e._queryParams.getIndex()))}class $D{constructor(e){this.callbackContext=e}respondsTo(e){return"value"===e}createEvent(e,t){const n=t._queryParams.getIndex();return new TD("value",this,new jD(e.snapshotNode,new MD(t._repo,t._path),n))}getEventRunner(e){return"cancel"===e.getEventType()?()=>this.callbackContext.onCancel(e.error):()=>this.callbackContext.onValue(e.snapshot,null)}createCancelEvent(e,t){return this.callbackContext.hasCancelCallback?new ID(this,e,t):null}matches(e){return e instanceof $D&&(!e.callbackContext||!this.callbackContext||e.callbackContext.matches(this.callbackContext))}hasAnyCallback(){return null!==this.callbackContext}}class VD{constructor(e,t){this.eventType=e,this.callbackContext=t}respondsTo(e){let t="children_added"===e?"child_added":e;return t="children_removed"===t?"child_removed":t,this.eventType===t}createCancelEvent(e,t){return this.callbackContext.hasCancelCallback?new ID(this,e,t):null}
2createEvent(e,t){Gs(null!=e.childName,"Child events should have a childName.");const n=UD(new MD(t._repo,t._path),e.childName),r=t._queryParams.getIndex();return new TD(e.type,this,new jD(e.snapshotNode,n,r),e.prevName)}getEventRunner(e){return"cancel"===e.getEventType()?()=>this.callbackContext.onCancel(e.error):()=>this.callbackContext.onValue(e.snapshot,e.prevName)}matches(e){return e instanceof VD&&(this.eventType===e.eventType&&(!this.callbackContext||!e.callbackContext||this.callbackContext.matches(e.callbackContext)))}hasAnyCallback(){return!!this.callbackContext}}function GD(e,t,n,r,i){let o;if("object"===typeof r&&(o=void 0,i=r),"function"===typeof r&&(o=r),i&&i.onlyOnce){const t=n,r=(n,r)=>{pD(e._repo,e,a),t(n,r)};r.userCallback=n.userCallback,r.context=n.context,n=r}const s=new PD(n,o||void 0),a="value"===t?new $D(s):new VD(t,s);return function(e,t,n){let r;r=".info"===bg(t._path)?oy(e.infoSyncTree_,t,n):oy(e.serverSyncTree_,t,n),Qy(e.eventQueue_,t._path,r)}(e._repo,e,a),()=>pD(e._repo,e,a)}function KD(e,t,n,r){return GD(e,"value",t,n,r)}class YD{}class JD extends YD{constructor(e,t){super(),this._value=e,this._key=t,this.type="startAt"}_apply(e){Uy("startAt",this._value,e._path,!0);const t=Em(e._queryParams,this._value,this._key);if(LD(t),BD(t),e._queryParams.hasStart())throw new Error("startAt: Starting point was already set (by another call to startAt, startBefore or equalTo).");return new ND(e._repo,e._path,t,e._orderByCalled)}}class QD extends YD{constructor(e){super(),this._limit=e,this.type="limitToLast"}_apply(e){if(e._queryParams.hasLimit())throw new Error("limitToLast: Limit was already set (by another call to limitToFirst or limitToLast).");return new ND(e._repo,e._path,function(e,t){const n=e.copy();return n.limitSet_=!0,n.limit_=t,n.viewFrom_="r",n}(e._queryParams,this._limit),e._orderByCalled)}}class XD extends YD{constructor(e){super(),this._path=e,this.type="orderByChild"}_apply(e){RD(e,"orderByChild");const t=new Dg(this._path);if(Fg(t))throw new Error("orderByChild: cannot pass in empty path. Use orderByValue() instead.");const n=new pm(t),r=Cm(e._queryParams,n);return BD(r),new ND(e._repo,e._path,r,!0)}}function ZD(e){if("$key"===e)throw new Error('orderByChild: "$key" is invalid. Use orderByKey() instead.');if("$priority"===e)throw new Error('orderByChild: "$priority" is invalid. Use orderByPriority() instead.');if("$value"===e)throw new Error('orderByChild: "$value" is invalid. Use orderByValue() instead.');return Vy("orderByChild","path",e,!1),new XD(e)}function e_(e){let t=qa(e);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(const o of r)t=o._apply(t);return t}!function(e){Gs(!Mv,"__referenceConstructor has already been defined"),Mv=e}(MD),function(e){Gs(!jv,"__referenceConstructor has already been defined"),jv=e}(MD);const t_={};let n_=!1;function r_(e,t,n,r,i){let o=r||e.options.databaseURL;void 0===o&&(e.options.projectId||Pf("Can't determine Firebase Database URL. Be sure to include a Project ID when calling firebase.initializeApp()."),Af("Using default host for project ",e.options.projectId),o="".concat(e.options.projectId,"-default-rtdb.firebaseio.com"));let s,a,u=SD(o,i),l=u.repoInfo;"undefined"!==typeof process&&(a={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!1,REACT_APP_FIREBASE_API_KEY:"AIzaSyALEGvK3ycTxgC8s7NwtatmIFPEwspoWQU"}.FIREBASE_DATABASE_EMULATOR_HOST),a?(s=!0,o="http://".concat(a,"?ns=").concat(l.namespace),u=SD(o,i),l=u.repoInfo):s=!u.repoInfo.secure;const c=i&&s?new Jf(Jf.OWNER):new Yf(e.name,e.options,t);Ky("Invalid Firebase Database URL",u),Fg(u.path)||Pf("Database URL must point to the root of a Firebase Database (not including a child path).");const d=function(e,t,n,r){let i=t_[t.name];i||(i={},t_[t.name]=i);let o=i[e.toURLString()];o&&Pf("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call.");return o=new nD(e,n_,n,r),i[e.toURLString()]=o,o}(l,e,c,new Kf(e,n));return new i_(d,e)}class i_{constructor(e,t){this._repoInternal=e,this.app=t,this.type="database",this._instanceStarted=!1}get _repo(){return this._instanceStarted||(rD(this._repoInternal,this.app.options.appId,this.app.options.databaseAuthVariableOverride),this._instanceStarted=!0),this._repoInternal}get _root(){return this._rootInternal||(this._rootInternal=new MD(this._repo,_g())),this._rootInternal}_delete(){return null!==this._rootInternal&&(!function(e,t){const n=t_[t];n&&n[e.key]===e||Pf("Database ".concat(t,"(").concat(e.repoInfo_,") has already been deleted.")),fD(e),delete n[e.key]}(this._repo,this.app.name),this._repoInternal=null,this._rootInternal=null),Promise.resolve()}_checkNotDeleted(e){null===this._rootInternal&&Pf("Cannot call "+e+" on a deleted database.")}}function o_(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};(e=qa(e))._checkNotDeleted("useEmulator");const i="".concat(t,":").concat(n),o=e._repoInternal;if(e._instanceStarted){if(i===e._repoInternal.repoInfo_.host&&Pa(r,o.repoInfo_.emulatorOptions))return;Pf("connectDatabaseEmulator() cannot initialize or alter the emulator configuration after the database instance has started.")}let s;if(o.repoInfo_.nodeAdmin)r.mockUserToken&&Pf('mockUserToken is not supported by the Admin SDK. For client access with mock users, please use the "firebase" package instead of "firebase-admin".'),s=new Jf(Jf.OWNER);else if(r.mockUserToken){const t="string"===typeof r.mockUserToken?r.mockUserToken:function(e,t){if(e.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n=t||"demo-project",r=e.iat||0,i=e.sub||e.user_id;if(!i)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const o=c({iss:"https://securetoken.google.com/".concat(n),aud:n,iat:r,exp:r+3600,auth_time:r,sub:i,user_id:i,firebase:{sign_in_provider:"custom",identities:{}}},e);return[Zs(JSON.stringify({alg:"none",type:"JWT"})),Zs(JSON.stringify(o)),""].join(".")}(r.mockUserToken,e.app.options.projectId);s=new Jf(t)}ca(t)&&(da(t),fa("Database",!0)),function(e,t,n,r){const i=t.lastIndexOf(":"),o=ca(t.substring(0,i));e.repoInfo_=new ng(t,o,e.repoInfo_.namespace,e.repoInfo_.webSocketOnly,e.repoInfo_.nodeAdmin,e.repoInfo_.persistenceKey,e.repoInfo_.includeNamespaceInQueryParams,!0,n),r&&(e.authTokenProvider_=r)}(o,i,r,s)}const s_={".sv":"timestamp"};function a_(){return s_}Mg.prototype.simpleListen=function(e,t){this.sendRequest("q",{p:e},t)},Mg.prototype.echo=function(e,t){this.sendRequest("echo",{d:e},t)};!function(e){mf(sl),tl(new Wa("database",(e,t)=>{let{instanceIdentifier:n}=t;return r_(e.getProvider("app").getImmediate(),e.getProvider("auth-internal"),e.getProvider("app-check-internal"),n)},"PUBLIC").setMultipleInstances(!0)),ll(pf,ff,e),ll(pf,ff,"esm2020")}();const u_=al({apiKey:"AIzaSyALEGvK3ycTxgC8s7NwtatmIFPEwspoWQU",authDomain:"bawo-19a49.firebaseapp.com",databaseURL:"https://bawo-19a49-default-rtdb.europe-west1.firebasedatabase.app",projectId:"bawo-19a49",storageBucket:"bawo-19a49.appspot.com",messagingSenderId:"233535679143",appId:"1:233535679143:web:b7138783
26eceaf70614982",measurementId:"G-38J39KW67J"}),l_=(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ul();e=qa(e);const t=nl(e,Op);t.isInitialized()?t.getImmediate():function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=nl(e,Op);if(n.isInitialized()){const e=n.getImmediate();if(Pa(t,n.getOptions()))return e;throw Bp.create("already-initialized")}const r=n.initialize({options:t})}(e)}(u_),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ul(),t=arguments.length>1?arguments[1]:void 0;const n=nl(e,"database").getImmediate({identifier:t});if(!n._instanceStarted){const e=(e=>{const t=sa(e);if(!t)return;const n=t.lastIndexOf(":");if(n<=0||n+1===t.length)throw new Error("Invalid host ".concat(t," with no separate hostname and port!"));const r=parseInt(t.substring(n+1),10);return"["===t[0]?[t.substring(1,n-1),r]:[t.substring(0,n),r]})("database");e&&o_(n,...e)}return n}(u_)),c_=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ul();const t=nl(e,"auth");if(t.isInitialized())return t.getImmediate();const n=function(e,t){const n=nl(e,"auth");if(n.isInitialized()){const e=n.getImmediate();if(Pa(n.getOptions(),null!==t&&void 0!==t?t:{}))return e;Fl(e,"already-initialized")}return n.initialize({options:t})}(e,{popupRedirectResolver:Lh,persistence:[Gd,xd,Pd]}),r=ua("authTokenSyncURL");if(r&&"boolean"===typeof isSecureContext&&isSecureContext){const e=new URL(r,location.origin);if(location.origin===e.origin){const t=(i=e.toString(),async e=>{const t=e&&await e.getIdTokenResult(),n=t&&((new Date).getTime()-Date.parse(t.issuedAtTime))/1e3;if(n&&n>Uh)return;const r=null===t||void 0===t?void 0:t.token;Hh!==r&&(Hh=r,await fetch(i,{method:r?"POST":"DELETE",headers:r?{Authorization:"Bearer ".concat(r)}:{}}))});!function(e,t,n){qa(e).beforeAuthStateChanged(t,n)}(n,t,()=>t(n.currentUser)),function(e,t,n,r){qa(e).onIdTokenChanged(t,n,r)}(n,e=>t(e))}}var i;const o=sa("auth");return o&&Yc(n,"http://".concat(o)),n}(u_);if("true"==={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!1,REACT_APP_FIREBASE_API_KEY:"AIzaSyALEGvK3ycTxgC8s7NwtatmIFPEwspoWQU"}.REACT_APP_USE_FIREBASE_EMULATORS||!1)try{Yc(c_,"http://localhost:9099",{disableWarnings:!0}),o_(l_,"localhost",9e3),console.log("\ud83d\udd27 Connected to Firebase emulators")}catch(If){console.warn("Failed to connect to emulators:",If)}n(219);var d_=Rr.Fragment,h_=function(e,t,n){return Sr.call(t,"css")?Rr.jsx(Ir,Fr(e,t),n):Rr.jsx(e,t,n)},p_=function(e,t,n){return Sr.call(t,"css")?Rr.jsxs(Ir,Fr(e,t),n):Rr.jsxs(e,t,n)};const f_=(0,ee.createContext)({user:null,loading:!0,signInAnonymous:async()=>{},signInWithGoogle:async()=>{},signOut:async()=>{},isAnonymous:!0}),g_=e=>{let{children:t}=e;const[n,r]=(0,ee.useState)(null),[i,o]=(0,ee.useState)(!0);(0,ee.useEffect)(()=>{const e=function(e,t,n,r){return qa(e).onAuthStateChanged(t,n,r)}(c_,e=>{r(e),o(!1)});return()=>e()},[]);const s={user:n,loading:i,signInAnonymous:async()=>{try{await async function(e){var t;if(rl(e.app))return Promise.reject(Il(e));const n=Lc(e);if(await n._initializationPromise,null!==(t=n.currentUser)&&void 0!==t&&t.isAnonymous)return new md({user:n.currentUser,providerId:null,operationType:"signIn"});const r=await gd(n,{returnSecureToken:!0}),i=await md._fromIdTokenResponse(n,"signIn",r,!0);return await n._updateCurrentUser(i.user),i}(c_)}catch(If){throw console.error("Error signing in anonymously:",If),If}},signInWithGoogle:async()=>{try{const e=new hd;await async function(e,t,n){if(rl(e.app))return Promise.reject(Al(e,"operation-not-supported-in-this-environment"));const r=Lc(e);Pl(e,t,ld);const i=Zd(r,n);return new sh(r,"signInViaPopup",t,i).executeNotNull()}(c_,e)}catch(If){throw console.error("Error signing in with Google:",If),If}},signOut:async()=>{try{await function(e){return qa(e).signOut()}(c_)}catch(If){throw console.error("Error signing out:",If),If}},isAnonymous:!n||n.isAnonymous};return h_(f_.Provider,{value:s,children:t})},m_=()=>{const e=(0,ee.useContext)(f_);
2if(!e)throw new Error("useAuth must be used within an AuthProvider");return e};var v_="undefined"!=typeof window?window:void 0,y_="undefined"!=typeof globalThis?globalThis:v_;"undefined"==typeof self&&(y_.self=y_),"undefined"==typeof File&&(y_.File=function(){});var D_=null==y_?void 0:y_.navigator,__=null==y_?void 0:y_.document,b_=null==y_?void 0:y_.location,w_=null==y_?void 0:y_.fetch,E_=null!=y_&&y_.XMLHttpRequest&&"withCredentials"in new y_.XMLHttpRequest?y_.XMLHttpRequest:void 0,C_=null==y_?void 0:y_.AbortController,k_=null==y_?void 0:y_.CompressionStream,S_=null==D_?void 0:D_.userAgent,x_=null!=v_?v_:{},F_="1.376.4",A_={DEBUG:!1,LIB_VERSION:F_,LIB_NAME:"web",JS_SDK_VERSION:F_};function T_(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value}catch(e){return void n(e)}a.done?t(u):Promise.resolve(u).then(r,i)}function I_(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function s(e){T_(o,r,i,s,a,"next",e)}function a(e){T_(o,r,i,s,a,"throw",e)}s(void 0)})}}function P_(){return P_=Object.assign?Object.assign.bind():function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},P_.apply(null,arguments)}function O_(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}var N_,R_=function(e){return e.GZipJS="gzip-js",e.Base64="base64",e}({}),B_=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"],L_="NativeGzipValidationError",M_=e=>e.length>=2&&31===e[0]&&139===e[1],j_=e=>!(!e||"object"!=typeof e)&&"NotReadableError"===("name"in e?String(e.name):""),z_=e=>{var t=new Error("Native gzip produced invalid output: "+e);throw t.name=L_,t},U_=function(){var e=I_(function*(e,t){18>e.size&&z_("too-short");var n=new Uint8Array(yield e.slice(0,10).arrayBuffer());M_(n)&&8===n[2]||z_("invalid-header");var r=new DataView(yield e.slice(e.size-8).arrayBuffer());r.getUint32(0,!0)!==(e=>{for(var t=(()=>{if(N_)return N_;N_=[];for(var e=0;256>e;e++){for(var t=e,n=0;8>n;n++)t=1&t?3988292384^t>>>1:t>>>1;N_[e]=t>>>0}return N_})(),n=4294967295,r=0;e.length>r;r++)n=t[255&(n^e[r])]^n>>>8;return(4294967295^n)>>>0})(t)&&z_("invalid-crc");var i=t.length>>>0;r.getUint32(4,!0)!==i&&z_("invalid-size")});return function(t,n){return e.apply(this,arguments)}}();function H_(){return H_=I_(function*(e,t,n){void 0===t&&(t=!0);try{var r=(new TextEncoder).encode(e),i=new CompressionStream("gzip"),o=i.writable.getWriter(),s=o.write(r).then(()=>o.close()).catch(function(){var e=I_(function*(e){try{yield o.abort(e)}catch(e){}throw e});return function(t){return e.apply(this,arguments)}}()),a=new Response(i.readable).blob(),[u]=yield Promise.all([a,s]);return yield U_(u,r),u}catch(e){if(null!=n&&n.rethrow)throw e;return t&&console.error("Failed to gzip compress data",e),null}}),H_.apply(this,arguments)}var q_=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],W_=function(e,t){if(void 0===t&&(t=[]),!e)return!1;var n=e.toLowerCase();return q_.concat(t).some(e=>{var t=e.toLowerCase();return-1!==n.indexOf(t)})};function $_(e,t){return-1!==e.indexOf(t)}var V_=function(e){return e.trim()},G_=function(e){return e.replace(/^\$/,"")},K_=Object.prototype,Y_=K_.hasOwnProperty,J_=K_.toString,Q_=Array.isArray||function(e){return"[object Array]"===J_.call(e)},X_=e=>"function"==typeof e,Z_=e=>e===Object(e)&&!Q_(e),eb=e=>{if(Z_(e)){for(var t in e)if(Y_.call(e,t))return!1;return!0}return!1},tb=e=>void 0===e,nb=e=>"[object String]"==J_.call(e),rb=e=>nb(e)&&0===e.trim().length,ib=e=>null===e,ob=e=>tb(e)||ib(e),sb=e=>"[object Number]"==J_.call(e)&&e==e,ab=e=>sb(e)&&e>0,ub=e=>"[object Boolean]"===J_.call(e),lb=e=>$_(B_,e);function cb(e){return null===e||"object"!=typeof e}function db(e,t){return{}.toString.call(e)==="[object "+t+"]"}function hb(e){return"undefined"!=typeof Event&&function(e,t){try{return e instanceof t}catch(e){return!1}}(e,Event)}var pb=[!0,"true",1,"1","yes"],fb=e=>$_(pb,e),gb=[!1,"false",0,"0","no"];function mb(e,t,n,r,i){return t>n&&(r.warn("min cannot be greater than max."),t=n),sb(e)?e>n?(r.warn(" cannot be greater than max: "+n+". Using max value instead."),n):t>e?(r.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(r.warn(" must be a number. using max or fallback. max: "+n+", fallback: "+i),mb(i||n,t,n,r))}
2class vb{constructor(e){this.$t={},this.zt=e.zt,this.Zt=mb(e.bucketSize,0,100,e.Gt),this.Qt=mb(e.refillRate,0,this.Zt,e.Gt),this.Jt=mb(e.refillInterval,0,864e5,e.Gt)}Kt(e,t){var n=Math.floor((t-e.lastAccess)/this.Jt);n>0&&(e.tokens=Math.min(e.tokens+n*this.Qt,this.Zt),e.lastAccess=e.lastAccess+n*this.Jt)}consumeRateLimit(e){var t,n=Date.now(),r=String(e),i=this.$t[r];return i?this.Kt(i,n):this.$t[r]=i={tokens:this.Zt,lastAccess:n},0===i.tokens||(i.tokens--,0===i.tokens&&(null==(t=this.zt)||t.call(this,e)),0===i.tokens)}stop(){this.$t={}}}var yb,Db,_b,bb="Mobile",wb="iOS",Eb="Android",Cb="Tablet",kb=Eb+" "+Cb,Sb="iPad",xb="Apple",Fb=xb+" Watch",Ab="Safari",Tb="BlackBerry",Ib="Samsung",Pb=Ib+"Browser",Ob=Ib+" Internet",Nb="Chrome",Rb=Nb+" OS",Bb=Nb+" "+wb,Lb="Internet Explorer",Mb=Lb+" "+bb,jb="Opera",zb=jb+" Mini",Ub="Edge",Hb="Microsoft "+Ub,qb="Firefox",Wb=qb+" "+wb,$b="Nintendo",Vb="PlayStation",Gb="Xbox",Kb=Eb+" "+bb,Yb=bb+" "+Ab,Jb="Windows",Qb=Jb+" Phone",Xb="Nokia",Zb="Ouya",ew="Generic",tw=ew+" "+bb.toLowerCase(),nw=ew+" "+Cb.toLowerCase(),rw="Konqueror",iw="Oculus Browser",ow="(\\d+(\\.\\d+)?)",sw=new RegExp("Version/"+ow),aw=new RegExp(Gb,"i"),uw=new RegExp(Vb+" \\w+","i"),lw=new RegExp($b+" \\w+","i"),cw=new RegExp(Tb+"|PlayBook|BB10","i"),dw={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},hw=function(e,t){return t=t||"",$_(e," OPR/")&&$_(e,"Mini")?zb:$_(e," OPR/")?jb:cw.test(e)?Tb:$_(e,"IE"+bb)||$_(e,"WPDesktop")?Mb:$_(e,"OculusBrowser")?iw:$_(e,Pb)?Ob:$_(e,Ub)||$_(e,"Edg/")?Hb:$_(e,"FBIOS")?"Facebook "+bb:$_(e,"UCWEB")||$_(e,"UCBrowser")?"UC Browser":$_(e,"CriOS")?Bb:$_(e,"CrMo")||$_(e,Nb)?Nb:$_(e,Eb)&&$_(e,Ab)?Kb:$_(e,"FxiOS")?Wb:$_(e.toLowerCase(),rw.toLowerCase())?rw:((e,t)=>t&&$_(t,xb)||function(e){return $_(e,Ab)&&!$_(e,Nb)&&!$_(e,Eb)}(e))(e,t)?$_(e,bb)?Yb:Ab:$_(e,qb)?qb:$_(e,"MSIE")||$_(e,"Trident/")?Lb:$_(e,"Gecko")?qb:""},pw={[Mb]:[new RegExp("rv:"+ow)],[Hb]:[new RegExp(Ub+"?\\/"+ow)],[Nb]:[new RegExp("("+Nb+"|CrMo)\\/"+ow)],[Bb]:[new RegExp("CriOS\\/"+ow)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+ow)],[Ab]:[sw],[Yb]:[sw],[jb]:[new RegExp("(Opera|OPR)\\/"+ow)],[qb]:[new RegExp(qb+"\\/"+ow)],[Wb]:[new RegExp("FxiOS\\/"+ow)],[rw]:[new RegExp("Konqueror[:/]?"+ow,"i")],[Tb]:[new RegExp(Tb+" "+ow),sw],[Kb]:[new RegExp("android\\s"+ow,"i")],[Ob]:[new RegExp(Pb+"\\/"+ow)],[iw]:[new RegExp("OculusBrowser\\/"+ow)],[Lb]:[new RegExp("(rv:|MSIE )"+ow)],Mozilla:[new RegExp("rv:"+ow)]},fw=function(e,t){var n=hw(e,t),r=pw[n];if(tb(r))return null;for(var i=0;r.length>i;i++){var o=e.match(r[i]);if(o)return parseFloat(o[o.length-2])}return null},gw=[[new RegExp(Gb+"; "+Gb+" (.*?)[);]","i"),e=>[Gb,e&&e[1]||""]],[new RegExp($b,"i"),[$b,""]],[new RegExp(Vb,"i"),[Vb,""]],[cw,[Tb,""]],[new RegExp(Jb,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[Qb,""];if(new RegExp(bb).test(t)&&!/IEMobile\b/.test(t))return[Jb+" "+bb,""];var n=/Windows NT ([0-9.]+)/i.exec(t);if(n&&n[1]){var r=dw[n[1]]||"";return/arm/i.test(t)&&(r="RT"),[Jb,r]}return[Jb,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?[wb,[e[3],e[4],e[5]||"0"].join(".")]:[wb,""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=tb(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+Eb+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+Eb+")","i"),e=>e&&e[2]?[Eb,[e[2],e[3],e[4]||"0"].join(".")]:[Eb,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];return e&&e[1]&&(t[1]=[e[1],e[2],e[3]||"0"].join(".")),t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[Rb,""]],[/Linux|debian/i,["Linux",""]]],mw=function(e){return lw.test(e)?$b:uw.test(e)?Vb:aw.test(e)?Gb:new RegExp(Zb,"i").test(e)?Zb:new RegExp("("+Qb+"|WPDesktop)","i").test(e)?Qb:/iPad/.test(e)?Sb:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?Fb:cw.test(e)?Tb:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(Xb,"i").test(e)?Xb:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?new RegExp(bb).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?Eb:kb:new RegExp("(pda|"+bb+")","i").test(e)?tw:new RegExp(Cb,"i").test(e)&&!new RegExp(Cb+" pc","i").test(e)?nw:""},vw=e=>e instanceof Error,yw={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},Dw=yw.info;function _w(e){if(ub(e))return{boolValue:e};if("number"==typeof e)return Number.isFinite(e)?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:{stringValue:String(e)};if("string"==typeof e)return{stringValue:e};if(Q_(e))return{arrayValue:{values:e.map(e=>_w(e))}};try{return{stringValue:JSON.stringify(e)}}catch(y_){return{stringValue:String(e)}}}function bw(e){var t=[];for(var n in e){var r=e[n];ib(r)||tb(r)||t.push({key:n,value:_w(r)})}return t}function ww(e){var t=globalThis._posthogChunkIds;if(t){var n=Object.keys(t);return _b&&n.length===Db||(Db=n.length,_b=n.reduce((n,r)=>{yb||(yb={});var i=yb[r];
vendor: 2,842 bytes, line 2
2if(i)n[i[0]]=i[1];else for(var o=e(r),s=o.length-1;s>=0;s--){var a=o[s],u=null==a?void 0:a.filename,l=t[r];if(u&&l){n[u]=l,yb[r]=[u,l];break}}return n},{})),_b}}class Ew{constructor(e,t,n){void 0===n&&(n=[]),this.coercers=e,this.stackParser=t,this.modifiers=n}buildFromUnknown(e,t){void 0===t&&(t={});var n=t&&t.mechanism||{handled:!0,type:"generic"},r=this.buildCoercingContext(n,t,0).apply(e),i=this.buildParsingContext(t),o=this.parseStacktrace(r,i);return{$exception_list:this.convertToExceptionList(o,n),$exception_level:"error"}}modifyFrames(e){var t=this;return I_(function*(){for(var n of e)n.stacktrace&&n.stacktrace.frames&&Q_(n.stacktrace.frames)&&(n.stacktrace.frames=yield t.applyModifiers(n.stacktrace.frames));return e})()}coerceFallback(e){var t;return{type:"Error",value:"Unknown error",stack:null==(t=e.syntheticException)?void 0:t.stack,synthetic:!0}}parseStacktrace(e,t){var n,r;return null!=e.cause&&(n=this.parseStacktrace(e.cause,t)),""!=e.stack&&null!=e.stack&&(r=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?t.skipFirstLines:0),t.chunkIdMap)),P_({},e,{cause:n,stack:r})}applyChunkIds(e,t){return e.map(e=>(e.filename&&t&&(e.chunk_id=t[e.filename]),e))}applyCoercers(e,t){for(var n of this.coercers)if(n.match(e))return n.coerce(e,t);return this.coerceFallback(t)}applyModifiers(e){var t=this;return I_(function*(){var n=e;for(var r of t.modifiers)n=yield r(n);return n})()}convertToExceptionList(e,t){var n,r,i,o={type:e.type,value:e.value,mechanism:{type:null!==(n=t.type)&&void 0!==n?n:"generic",handled:null===(r=t.handled)||void 0===r||r,synthetic:null!==(i=e.synthetic)&&void 0!==i&&i}};e.stack&&(o.stacktrace={type:"raw",frames:e.stack});var s=[o];return null!=e.cause&&s.push(...this.convertToExceptionList(e.cause,P_({},t,{handled:!0}))),s}buildParsingContext(e){var t;return{chunkIdMap:ww(this.stackParser),skipFirstLines:null!==(t=e.skipFirstLines)&&void 0!==t?t:1}}buildCoercingContext(e,t,n){void 0===n&&(n=0);var r=(n,r)=>{if(4>=r){var i=this.buildCoercingContext(e,t,r);return this.applyCoercers(n,i)}};return P_({},t,{syntheticException:0==n?t.syntheticException:void 0,mechanism:e,apply:e=>r(e,n),next:e=>r(e,n+1)})}}var Cw="?";function kw(e,t,n,r,i){var o={platform:e,filename:t,function:"<anonymous>"===n?Cw:n,in_app:!0};return tb(r)||(o.lineno=r),tb(i)||(o.colno=i),o}var Sw=(e,t)=>{var n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:Cw,n?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},xw=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Fw=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Aw=/\((\S*)(?::(\d+))(?::(\d+))\)/,Tw=(e,t)=>{var n=xw.exec(e);if(n){var[,r,i,o]=n;return kw(t,r,Cw,+i,+o)}var s=Fw.exec(e);
2if(s){if(s[2]&&0===s[2].indexOf("eval")){var a=Aw.exec(s[2]);a&&(s[2]=a[1],s[3]=a[2],s[4]=a[3])}var[u,l]=Sw(s[1]||Cw,s[2]);return kw(t,l,u,s[3]?+s[3]:void 0,s[4]?+s[4]:void 0)}},Iw=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Pw=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ow=(e,t)=>{var n=Iw.exec(e);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){var r=Pw.exec(n[3]);r&&(n[1]=n[1]||"eval",n[3]=r[1],n[4]=r[2],n[5]="")}var i=n[3],o=n[1]||Cw;return[o,i]=Sw(o,i),kw(t,i,o,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},Nw=/\(error: (.*)\)/;class Rw{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){var n=nb(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:n?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var t=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?t+": "+e.message:t}isDOMException(e){return db(e,"DOMException")}isDOMError(e){return db(e,"DOMError")}}class Bw{match(e){return(e=>e instanceof Error)(e)}coerce(e,t){return{type:this.getType(e),value:this.getMessage(e,t),stack:this.getStack(e),cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,t){var n=e.message;return String(n.error&&"string"==typeof n.error.message?n.error.message:n)}getStack(e){return e.stacktrace||e.stack||void 0}}class Lw{constructor(){}match(e){return db(e,"ErrorEvent")&&null!=e.error}coerce(e,t){var n;return t.apply(e.error)||{type:"ErrorEvent",value:e.message,stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}}}var Mw=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class jw{match(e){return"string"==typeof e}coerce(e,t){var n,[r,i]=this.getInfos(e);return{type:null!=r?r:"Error",value:null!=i?i:e,stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}}getInfos(e){var t="Error",n=e,r=e.match(Mw);return r&&(t=r[1],n=r[2]),[t,n]}}var zw=["fatal","error","warning","log","info","debug"];function Uw(e,t){void 0===t&&(t=40);var n=Object.keys(e);if(n.sort(),!n.length)return"[object has no keys]";for(var r=n.length;r>0;r--){var i=n.slice(0,r).join(", ");if(t>=i.length)return r===n.length?i:i.length>t?i.slice(0,t)+"...":i}return""}class Hw{match(e){return"object"==typeof e&&null!==e}coerce(e,t){var n,r=this.getErrorPropertyFromObject(e);return r?t.apply(r):{type:this.getType(e),value:this.getValue(e),stack:null==(n=t.syntheticException)?void 0:n.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){return hb(e)?e.constructor.name:"Error"}getValue(e){if("name"in e&&"string"==typeof e.name){var t="'"+e.name+"' captured as exception";return"message"in e&&"string"==typeof e.message&&(t+=" with message: '"+e.message+"'"),t}if("message"in e&&"string"==typeof e.message)return e.message;var n=this.getObjectClassName(e);return(n&&"Object"!==n?"'"+n+"'":"Object")+" captured as exception with keys: "+Uw(e)}isSeverityLevel(e){return nb(e)&&!rb(e)&&zw.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var t in e)if({}.hasOwnProperty.call(e,t)){var n=e[t];if(vw(n))return n}}getObjectClassName(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){return}}}class qw{match(e){return hb(e)}coerce(e,t){var n,r=e.constructor.name;return{type:r,value:r+" captured as exception with keys: "+Uw(e),stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}}}class Ww{match(e){return cb(e)}coerce(e,t){var n;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}}}class $w{match(e){return db(e,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!hb(e))return!1;try{var t=e.detail;return null!=t&&"object"==typeof t&&"reason"in t}catch(e){return!1}}coerce(e,t){var n,r=this.getUnhandledRejectionReason(e);return cb(r)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(r),stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}:t.apply(r)}getUnhandledRejectionReason(e){try{if("reason"in e)return e.reason;if("detail"in e&&null!=e.detail&&"object"==typeof e.detail&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}}var Vw="$message",Gw="$timestamp",Kw=new Set([Vw,Gw]),Yw={enabled:!0,max_bytes:32768};function Jw(e){var t;return e?{enabled:null!==(t=e.enabled)&&void 0!==t?t:Yw.enabled,max_bytes:Xw(e.max_bytes,Yw.max_bytes)}:P_({},Yw)}class Qw{constructor(e){this.Yt=[],this.Xt=0,this.qt=Jw(e)}setConfig(e){this.qt=Jw(e),this.er()}add(e){var t=function(e){var t=function(e){var t=new WeakSet;try{return JSON.stringify(e,(e,n)=>{if("bigint"==typeof n)return n.toString();if("function"!=typeof n&&"symbol"!=typeof n){if(n instanceof Date)return n.toISOString();if(n instanceof Error)return{name:n.name,message:n.message,stack:n.stack};if(n&&"object"==typeof n){if(t.has(n))return"[Circular]";t.add(n)}return n}})}catch(e){return}}(e);if(t)try{var n=JSON.parse(t);if(!Z_(n))return;var r=n,i=r[Vw],o=r[Gw];if(!nb(i)||0===i.trim().length)return;if(!nb(o)&&!sb(o))return;return{step:r,json:t}}catch(e){return}}(e);if(t){var n=function(e){if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e).length;for(var t=encodeURIComponent(e),n=0,r=0;t.length>r;r++)"%"===t[r]?(n+=1,r+=2):n+=1;return n}(t.json);n>this.qt.max_bytes||(this.Yt.push({step:t.step,bytes:n}),this.Xt+=n,this.er())}}getAttachable(){return this.Yt.map(e=>e.step)}clear(){this.Yt=[],this.Xt=0}size(){return this.Yt.length}er(){for(;this.Xt>this.qt.max_bytes&&this.Yt.length>0;){var e=this.Yt.shift();e&&(this.Xt-=e.bytes)}}}function Xw(e,t){if(!sb(e)||e===1/0||e===-1/0)return t;var n=Math.floor(e);return 0>n?t:n}var Zw=function(e,t){var{debugEnabled:n}=void 0===t?{}:t,r={k(t){if(v_&&(A_.DEBUG||x_.POSTHOG_DEBUG||n)&&!tb(v_.console)&&v_.console){for(var r=("__rrweb_original__"in v_.console[t]?v_.console[t].__rrweb_original__:v_.console[t]),i=arguments.length,o=new Array(i>1?i-1:0),s=1;i>s;s++)o[s-1]=arguments[s];r(e,...o)}},debug(){for(var e=arguments.length,t=new Array(e),n=0;e>n;n++)t[n]=arguments[n];r.k("debug",...t)},info(){for(var e=arguments.length,t=new Array(e),n=0;e>n;n++)t[n]=arguments[n];r.k("log",...t)},warn(){for(var e=arguments.length,t=new Array(e),n=0;e>n;n++)t[n]=arguments[n];r.k("warn",...t)},error(){for(var e=arguments.length,t=new Array(e),n=0;e>n;n++)t[n]=arguments[n];r.k("error",...t)},critical(){for(var t=arguments.length,n=new Array(t),r=0;t>r;r++)n[r]=arguments[r];console.error(e,...n)},uninitializedWarning(e){r.error("You must initialize PostHog before calling "+e)},createLogger:(t,n)=>Zw(e+" "+t,n)};return r},eE=Zw("[PostHog.js]"),tE=eE.createLogger,nE=tE("[ExternalScriptsLoader]"),rE=(e,t,n)=>{if(e.config.disable_external_dependency_loading)return nE.warn(t+" was requested but loading of external scripts is disabled."),n("Loading of external scripts is disabled");var r=null==__?void 0:__.querySelectorAll("script");
2if(r)for(var i,o=function(){if(r[s].src===t){var e=r[s];return e.__posthog_loading_callback_fired?{v:n()}:(e.addEventListener("load",t=>{e.__posthog_loading_callback_fired=!0,n(void 0,t)}),e.onerror=e=>n(e),{v:void 0})}},s=0;r.length>s;s++)if(i=o())return i.v;var a=()=>{if(!__)return n("document not found");var r=__.createElement("script");if(r.type="text/javascript",r.crossOrigin="anonymous",r.src=t,r.onload=e=>{r.__posthog_loading_callback_fired=!0,n(void 0,e)},r.onerror=e=>n(e),e.config.prepare_external_dependency_script&&(r=e.config.prepare_external_dependency_script(r)),!r)return n("prepare_external_dependency_script returned null");if("head"===e.config.external_scripts_inject_target)__.head.appendChild(r);else{var i,o=__.querySelectorAll("body > script");o.length>0?null==(i=o[0].parentNode)||i.insertBefore(r,o[0]):__.body.appendChild(r)}};null!=__&&__.body?a():null==__||__.addEventListener("DOMContentLoaded",a)};x_.__PosthogExtensions__=x_.__PosthogExtensions__||{},x_.__PosthogExtensions__.loadExternalDependency=(e,t,n)=>{if("remote-config"!==t){var r;if(e.config.__preview_external_dependency_versioned_paths)r=e.requestRouter.endpointFor("assets","/static/"+e.version+"/"+t+".js");else{var i="/static/"+t+".js?v="+e.version;if("toolbar"===t){var o=3e5;i=i+"&t="+Math.floor(Date.now()/o)*o}r=e.requestRouter.endpointFor("assets",i)}rE(e,r,n)}else{var s=e.requestRouter.endpointFor("assets","/array/"+e.config.token+"/config.js");rE(e,s,n)}},x_.__PosthogExtensions__.loadSiteApp=(e,t,n)=>{var r=e.requestRouter.endpointFor("api",t);rE(e,r,n)};var iE="$people_distinct_id",oE="$device_id",sE="__alias",aE="__timers",uE="$autocapture_disabled_server_side",lE="$heatmaps_enabled_server_side",cE="$exception_capture_enabled_server_side",dE="$error_tracking_suppression_rules",hE="$error_tracking_capture_extension_exceptions",pE="$web_vitals_enabled_server_side",fE="$dead_clicks_enabled_server_side",gE="$product_tours_enabled_server_side",mE="$web_vitals_allowed_metrics",vE="$session_recording_remote_config",yE="$replay_override_sampling",DE="$replay_override_linked_flag",_E="$replay_override_url_trigger",bE="$replay_override_event_trigger",wE="$sesid",EE="$session_is_sampled",CE="$enabled_feature_flags",kE="$active_feature_flags",SE="$early_access_features",xE="$feature_flag_details",FE="$feature_flag_payloads",AE="$feature_flag_request_id",TE="$override_feature_flags",IE="$override_feature_flag_payloads",PE="$stored_person_properties",OE="$stored_group_properties",NE="$surveys",RE="$surveys_activated",BE="ph_product_tours",LE="$flag_call_reported",ME="$flag_call_reported_session_id",jE="$feature_flag_errors",zE="$feature_flag_evaluated_at",UE="$user_state",HE="$client_session_props",qE="$capture_rate_limit",WE="$initial_campaign_params",$E="$initial_referrer_info",VE="$initial_person_info",GE="$epp",KE="__POSTHOG_TOOLBAR__",YE="$posthog_cookieless",JE="$sdk_debug_extensions_init_method",QE="$sdk_debug_extensions_init_time_ms",XE="$sdk_debug_recording_script_not_loaded",ZE="PostHog loadExternalDependency extension not found.",eC="on_reject",tC="always",nC="anonymous",rC="identified",iC="identified_only",oC="visibilitychange",sC="beforeunload",aC="$pageview",uC="$pageleave",lC="$identify",cC="$groupidentify";function dC(e,t){Q_(e)&&e.forEach(t)}function hC(e,t){if(!ob(e))if(Q_(e))e.forEach(t);else if((e=>e instanceof FormData)(e))e.forEach((e,n)=>t(e,n));else for(var n in e)Y_.call(e,n)&&t(e[n],n)}var pC=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];for(var i of n)for(var o in i)void 0!==i[o]&&(e[o]=i[o]);return e};function fC(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}var gC=function(e){try{return e()}catch(e){return}},mC=function(e){return function(){try{for(var t=arguments.length,n=new Array(t),r=0;t>r;r++)n[r]=arguments[r];return e.apply(this,n)}catch(e){eE.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),eE.critical(e)}}},vC=function(e){var t={};return hC(e,function(e,n){(nb(e)&&e.length>0||sb(e))&&(t[n]=e)}),t},yC=["herokuapp.com","vercel.app","netlify.app"];function DC(e){var t=null==e?void 0:e.hostname;if(!nb(t))return!1;var n=t.split(".").slice(-2).join(".");for(var r of yC)if(n===r)return!1;return!0}function _C(e,t,n,r){var{capture:i=!1,passive:o=!0}=null!=r?r:{};null==e||e.addEventListener(t,n,{capture:i,passive:o})}function bC(e){return"ph_toolbar_internal"===e.name}Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return sb(e)&&isFinite(e)&&Math.floor(e)===e});class wC{constructor(e){if(this.bytes=e,16!==e.length)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,t,n,r){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(r)||0>e||0>t||0>n||0>r||e>0xffffffffffff||t>4095||n>1073741823||r>4294967295)throw new RangeError("invalid field value");var i=new Uint8Array(16);return i[0]=e/Math.pow(2,40),i[1]=e/Math.pow(2,32),i[2]=e/Math.pow(2,24),i[3]=e/Math.pow(2,16),i[4]=e/Math.pow(2,8),i[5]=e,i[6]=112|t>>>8,i[7]=t,i[8]=128|n>>>24,i[9]=n>>>16,i[10]=n>>>8,i[11]=n,i[12]=r>>>24,i[13]=r>>>16,i[14]=r>>>8,i[15]=r,new wC(i)}toString(){for(var e="",t=0;this.bytes.length>t;t++)e=e+(this.bytes[t]>>>4).toString(16)+(15&this.bytes[t]).toString(16),3!==t&&5!==t&&7!==t&&9!==t||(e+="-");if(36!==e.length)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new wC(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(var t=0;16>t;t++){var n=this.bytes[t]-e.bytes[t];if(0!==n)return Math.sign(n)}return 0}}class EC{constructor(){this.S=0,this.C=0,this.I=new SC}generate(){var e=this.generateOrAbort();if(tb(e)){this.S=0;var t=this.generateOrAbort();if(tb(t))throw new Error("Could not generate UUID after timestamp reset");return t}return e}generateOrAbort(){var e=Date.now();if(e>this.S)this.S=e,this.T();else{if(this.S>=e+1e4)return;this.C++,this.C>4398046511103&&(this.S++,this.T())}return wC.fromFieldsV7(this.S,Math.trunc(this.C/Math.pow(2,30)),this.C&Math.pow(2,30)-1,this.I.nextUint32())}T(){this.C=1024*this.I.nextUint32()+(1023&this.I.nextUint32())}}var CC,kC=e=>{if("undefined"!=typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};v_&&!tb(v_.crypto)&&crypto.getRandomValues&&(kC=e=>crypto.getRandomValues(e));class SC{constructor(){this.M=new Uint32Array(8),this.O=1/0}nextUint32(){return this.M.length>this.O||(kC(this.M),this.O=0),this.M[this.O++]}}var xC=()=>FC().toString(),FC=()=>(CC||(CC=new EC)).generate(),AC="",TC=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,IC={R:()=>!!__,D(e){eE.error("cookieStore error: "+e)},A(e){if(__){try{for(var t=e+"=",n=__.cookie.split(";").filter(e=>e.length),r=0;n.length>r;r++){for(var i=n[r];" "==i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return decodeURIComponent(i.substring(t.length,i.length))}}catch(e){}return null}},F(e){var t;try{t=JSON.parse(IC.A(e))||{}}catch(e){}return t},N(e,t,n,r,i){if(__)try{var o="",s="",a=function(e,t){if(t){var n=function(e,t){if(void 0===t&&(t=__),AC)return AC;if(!t)return"";if(["localhost","127.0.0.1"].includes(e))return"";for(var n=e.split("."),r=Math.min(n.length,8),i="dmn_chk_"+xC();!AC&&r--;){var o=n.slice(r).join("."),s=i+"=1;domain=."+o+";path=/";t.cookie=s+";max-age=3",t.cookie.includes(i)&&(t.cookie=s+";max-age=0",AC=o)}return AC}(e);if(!n){var r=(e=>{var t=e.match(TC);return t?t[0]:""})(e);r!==n&&eE.info("Warning: cookie subdomain discovery mismatch",r,n),n=r}return n?"; domain=."+n:""}return""}(__.location.hostname,r);
2if(n){var u=new Date;u.setTime(u.getTime()+864e5*n),o="; expires="+u.toUTCString()}i&&(s="; secure");var l=e+"="+encodeURIComponent(JSON.stringify(t))+o+"; SameSite=Lax; path=/"+a+s;return l.length>3686.4&&eE.warn("cookieStore warning: large cookie, len="+l.length),__.cookie=l,l}catch(e){return}},q(e,t){if(null!=__&&__.cookie)try{IC.N(e,"",-1,t)}catch(e){return}}},PC=null,OC={R(){if(!ib(PC))return PC;var e=!0;if(tb(v_))e=!1;else try{var t="__mplssupport__";OC.N(t,"xyz"),'"xyz"'!==OC.A(t)&&(e=!1),OC.q(t)}catch(n){e=!1}return e||eE.error("localStorage unsupported; falling back to cookie store"),PC=e,e},D(e){eE.error("localStorage error: "+e)},A(e){try{return null==v_?void 0:v_.localStorage.getItem(e)}catch(t){OC.D(t)}return null},F(e){try{return JSON.parse(OC.A(e))||{}}catch(e){}return null},N(e,t){try{null==v_||v_.localStorage.setItem(e,JSON.stringify(t))}catch(n){OC.D(n)}},q(e){try{null==v_||v_.localStorage.removeItem(e)}catch(t){OC.D(t)}}},NC=[oE,"distinct_id",wE,EE,GE,VE,UE],RC={},BC={R:()=>!0,D(e){eE.error("memoryStorage error: "+e)},A:e=>RC[e]||null,F:e=>RC[e]||null,N(e,t){RC[e]=t},q(e){delete RC[e]}},LC=null,MC={R(){if(!ib(LC))return LC;if(LC=!0,tb(v_))LC=!1;else try{var e="__support__";MC.N(e,"xyz"),'"xyz"'!==MC.A(e)&&(LC=!1),MC.q(e)}catch(t){LC=!1}return LC},D(e){eE.error("sessionStorage error: ",e)},A(e){try{return null==v_?void 0:v_.sessionStorage.getItem(e)}catch(t){MC.D(t)}return null},F(e){try{return JSON.parse(MC.A(e))||null}catch(e){}return null},N(e,t){try{null==v_||v_.sessionStorage.setItem(e,JSON.stringify(t))}catch(n){MC.D(n)}},q(e){try{null==v_||v_.sessionStorage.removeItem(e)}catch(t){MC.D(t)}}};class jC{constructor(e){this._instance=e}get qt(){return this._instance.config}get consent(){return this.rr()?0:this.ir}isOptedOut(){return this.qt.cookieless_mode===tC||this.isRejected()||-1===this.consent&&this.qt.cookieless_mode===eC}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return 0===this.consent}isRejected(){return 0===this.consent||-1===this.consent&&this.qt.opt_out_capturing_by_default}optInOut(e){this.nr.N(this.sr,e?1:0,this.qt.cookie_expiration,this.qt.cross_subdomain_cookie,this.qt.secure_cookie)}reset(){this.nr.q(this.sr,this.qt.cross_subdomain_cookie)}get sr(){var{token:e,opt_out_capturing_cookie_prefix:t,consent_persistence_name:n}=this._instance.config;return n||(t?t+e:"__ph_opt_in_out_"+e)}get ir(){var e=this.nr.A(this.sr);return fb(e)?1:$_(gb,e)?0:-1}get nr(){var e=this.qt.opt_out_capturing_persistence_type,t="localStorage"===e?OC:IC;if(!this.ar||this.ar!==t){this.ar=t;var n="localStorage"===e?IC:OC;n.A(this.sr)&&(this.ar.A(this.sr)||this.optInOut(fb(n.A(this.sr))),n.q(this.sr,this.qt.cross_subdomain_cookie))}return this.ar}rr(){return!!this.qt.respect_dnt&&[null==D_?void 0:D_.doNotTrack,null==D_?void 0:D_.msDoNotTrack,x_.doNotTrack].some(e=>fb(e))}}var zC=tE("[Dead Clicks]"),UC=()=>!0,HC=e=>{var t,n=!(null==(t=e.instance.persistence)||!t.get_property(fE)),r=e.instance.config.capture_dead_clicks;return ub(r)?r:!!Z_(r)||n};class qC{get lazyLoadedDeadClicksAutocapture(){return this.ur}constructor(e,t,n){this.instance=e,this.isEnabled=t,this.onCapture=n,this.startIfEnabledOrStop()}onRemoteConfig(e){"captureDeadClicks"in e&&(this.instance.persistence&&this.instance.persistence.register({[fE]:e.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.lr(()=>{this.hr()}):this.stop()}lr(e){var t,n;null!=(t=x_.__PosthogExtensions__)&&t.initDeadClicksAutocapture&&e(),null==(n=x_.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this.instance,"dead-clicks-autocapture",t=>{t?zC.error("failed to load script",t):e()})}hr(){var e;if(__){if(!this.ur&&null!=(e=x_.__PosthogExtensions__)&&e.initDeadClicksAutocapture){var t=Z_(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};t.__onCapture=this.onCapture,this.ur=x_.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this.ur.start(__),zC.info("starting...")}}else zC.error("`document` not found. Cannot start.")}stop(){this.ur&&(this.ur.stop(),this.ur=void 0,zC.info("stopping..."))}}var WC=tE("[SegmentIntegration]"),$C="posthog-js";function VC(e,t){var{organization:n,projectId:r,prefix:i,severityAllowList:o=["error"],sendExceptionsToPostHog:s=!0}=void 0===t?{}:t;return t=>{var a,u,l,c,d;if("*"!==o&&!o.includes(t.level)||!e.__loaded)return t;t.tags||(t.tags={});var h=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/pers
2on/"+e.get_distinct_id());t.tags["PostHog Person URL"]=h,e.sessionRecordingStarted()&&(t.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var p,f=(null==(a=t.exception)?void 0:a.values)||[],g=f.map(e=>P_({},e,{stacktrace:e.stacktrace?P_({},e.stacktrace,{type:"raw",frames:(e.stacktrace.frames||[]).map(e=>P_({},e,{platform:"web:javascript"}))}):void 0})),m={$exception_message:(null==(u=f[0])?void 0:u.value)||t.message,$exception_type:null==(l=f[0])?void 0:l.type,$exception_level:t.level,$exception_list:g,$sentry_event_id:t.event_id,$sentry_exception:t.exception,$sentry_exception_message:(null==(c=f[0])?void 0:c.value)||t.message,$sentry_exception_type:null==(d=f[0])?void 0:d.type,$sentry_tags:t.tags};return n&&r&&(m.$sentry_url=(i||"https://sentry.io/organizations/")+n+"/issues/?project="+r+"&query="+t.event_id),s&&(null==(p=e.exceptions)||p.sendExceptionEvent(m)),t}}class GC{constructor(e,t,n,r,i,o){this.name=$C,this.setupOnce=function(s){s(VC(e,{organization:t,projectId:n,prefix:r,severityAllowList:i,sendExceptionsToPostHog:null==o||o}))}}}class KC{constructor(e){this.cr=(e,t,n)=>{n&&(n.noSessionId||n.activityTimeout||n.sessionPastMaximumLength)&&(eE.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:e,changeReason:n}),this.dr=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.vr()}vr(){var e;this.pr=null==(e=this._instance.sessionManager)?void 0:e.onSessionId(this.cr)}destroy(){var e;null==(e=this.pr)||e.call(this),this.pr=void 0}doPageView(e,t){var n,r=this.gr(e,t);return this.dr={pathname:null!==(n=null==v_?void 0:v_.location.pathname)&&void 0!==n?n:"",pageViewId:t,timestamp:e},this._instance.scrollManager.resetContext(),r}doPageLeave(e){var t;return this.gr(e,null==(t=this.dr)?void 0:t.pageViewId)}doEvent(){var e;return{$pageview_id:null==(e=this.dr)?void 0:e.pageViewId}}gr(e,t){var n=this.dr;if(!n)return{$pageview_id:t};var r={$pageview_id:t,$prev_pageview_id:n.pageViewId},i=this._instance.scrollManager.getContext();if(i&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:o,lastScrollY:s,maxScrollY:a,maxContentHeight:u,lastContentY:l,maxContentY:c}=i;if(!(tb(o)||tb(s)||tb(a)||tb(u)||tb(l)||tb(c))){o=Math.ceil(o),s=Math.ceil(s),a=Math.ceil(a),u=Math.ceil(u),l=Math.ceil(l),c=Math.ceil(c);var d=o>1?mb(s/o,0,1,eE):1,h=o>1?mb(a/o,0,1,eE):1,p=u>1?mb(l/u,0,1,eE):1,f=u>1?mb(c/u,0,1,eE):1;r=pC(r,{$prev_pageview_last_scroll:s,$prev_pageview_last_scroll_percentage:d,$prev_pageview_max_scroll:a,$prev_pageview_max_scroll_percentage:h,$prev_pageview_last_content:l,$prev_pageview_last_content_percentage:p,$prev_pageview_max_content:c,$prev_pageview_max_content_percentage:f})}}return n.pathname&&(r.$prev_pageview_pathname=n.pathname),n.timestamp&&(r.$prev_pageview_duration=(e.getTime()-n.timestamp.getTime())/1e3),r}}var YC={[iE]:{exposure:"hidden"},[sE]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[aE]:{exposure:"hidden"},[uE]:{exposure:"event"},[lE]:{exposure:"hidden"},[cE]:{exposure:"event"},[dE]:{exposure:"hidden"},[hE]:{exposure:"event"},[pE]:{exposure:"event"},[fE]:{exposure:"event"},[gE]:{exposure:"hidden"},[mE]:{exposure:"event"},[vE]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[wE]:{exposure:"hidden"},[EE]:{exposure:"event"},$session_past_minimum_duration:{exposure:"event"},$session_recording_url_trigger_activated_session:{exposure:"event"},$session_recording_event_trigger_activated_session:{exposure:"event"},$debug_first_full_snapshot_timestamp:{exposure:"event"},[CE]:{exposure:"derived",shouldSkipFromEventProperties:(e,t)=>t(),transformToEventProperties(e){if(!Z_(e))return{};for(var t={},n=Object.keys(e),r=0;n.length>r;r++)t["$feature/"+n[r]]=e[n[r]];return t}},[kE]:{exposure:"event"},[SE]:{exposure:"hidden"},[xE]:{exposure:"hidden"},[FE]:{exposure:"event"},[AE]:{exposure:"event"},[TE]:{exposure:"event"},[IE]:{exposure:"hidden"},[PE]:{exposure:"hidden"},[OE]:{exposure:"hidden"},[NE]:{exposure:"hidden"},[RE]:{exposure:"event"},[BE]:{exposure:"hidden"},$product_tours_activated:{exposure:"hidden"},$conversations_widget_session_id:{exposure:"event"},$conversations_ticket_id:{exposure:"event"},$conversations_widget_state:{exposure:"event"}
2,$conversations_user_traits:{exposure:"event"},[LE]:{exposure:"hidden"},[ME]:{exposure:"hidden"},[jE]:{exposure:"hidden"},[zE]:{exposure:"hidden"},[UE]:{exposure:"hidden"},[HE]:{exposure:"hidden"},[qE]:{exposure:"hidden"},[WE]:{exposure:"hidden"},[$E]:{exposure:"hidden"},[VE]:{exposure:"hidden"},[GE]:{exposure:"hidden"},[yE]:{exposure:"event"},[DE]:{exposure:"event"},[_E]:{exposure:"event"},[bE]:{exposure:"event"},[JE]:{exposure:"event"},[QE]:{exposure:"event"},[XE]:{exposure:"event"},$sdk_debug_replay_event_trigger_status:{exposure:"event"},$sdk_debug_replay_linked_flag_trigger_status:{exposure:"event"},$sdk_debug_replay_matched_recording_trigger_groups:{exposure:"event"},$sdk_debug_replay_remote_trigger_matching_config:{exposure:"event"},$sdk_debug_replay_trigger_groups_count:{exposure:"event"},$sdk_debug_replay_url_trigger_status:{exposure:"event"},$session_recording_start_reason:{exposure:"event"}},JC=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],QC=e=>{var t=null==__?void 0:__.createElement("a");return tb(t)?null:(t.href=e,t)},XC=function(e,t){for(var n,r=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),i=0;r.length>i;i++){var o=r[i].split("=");if(o[0]===t){n=o;break}}if(!Q_(n)||2>n.length)return"";var s=n[1];try{s=decodeURIComponent(s)}catch(e){eE.error("Skipping decoding for malformed query param: "+s)}return s.replace(/\+/g," ")},ZC=function(e,t,n){if(!e||!t||!t.length)return e;for(var r=e.split("#"),i=r[1],o=(r[0]||"").split("?"),s=o[1],a=o[0],u=(s||"").split("&"),l=[],c=0;u.length>c;c++){var d=u[c].split("=");Q_(d)&&(t.includes(d[0])?l.push(d[0]+"="+n):l.push(u[c]))}var h=a;return null!=s&&(h+="?"+l.join("&")),null!=i&&(h+="#"+i),h},ek=function(e,t){var n=e.match(new RegExp(t+"=([^&]*)"));return n?n[1]:null},tk="https?://(.*)",nk=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],rk=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...nk],ik="<masked>",ok=["li_fat_id"];function sk(e,t,n){if(!__)return{};var r,i=t?[...nk,...n||[]]:[],o=ak(ZC(__.URL,i,ik),e),s=(r={},hC(ok,function(e){var t=IC.A(e);r[e]=t||null}),r);return pC(s,o)}function ak(e,t){var n=rk.concat(t||[]),r={};return hC(n,function(t){var n=XC(e,t);r[t]=n||null}),r}function uk(e){var t=function(e){return e?0===e.search(tk+"google.([^/?]*)")?"google":0===e.search(tk+"bing.com")?"bing":0===e.search(tk+"yahoo.com")?"yahoo":0===e.search(tk+"duckduckgo.com")?"duckduckgo":null:null}(e),n="yahoo"!=t?"q":"p",r={};if(!ib(t)){r.$search_engine=t;var i=__?XC(__.referrer,n):"";i.length&&(r.ph_keyword=i)}return r}function lk(){return navigator.language||navigator.userLanguage}var ck="$direct";function dk(){return(null==__?void 0:__.referrer)||ck}function hk(e,t){var n=e?[...nk,...t||[]]:[],r=null==b_?void 0:b_.href.substring(0,1e3);return{r:dk().substring(0,1e3),u:r?ZC(r,n,ik):void 0}}function pk(e){var t,{r:n,u:r}=e,i={$referrer:n,$referring_domain:null==n?void 0:n==ck?ck:null==(t=QC(n))?void 0:t.host};if(r){i.$current_url=r;var o=QC(r);i.$host=null==o?void 0:o.host,i.$pathname=null==o?void 0:o.pathname;var s=ak(r);pC(i,s)}if(n){var a=uk(n);pC(i,a)}return i}function fk(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}function gk(){try{return(new Date).getTimezoneOffset()}catch(e){return}}var mk=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class vk{constructor(e,t){this.qt=e,this.props={},this.mr=!1,this.yr=(e=>{var t="";return e.token&&(t=e.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),e.persistence_name?"ph_"+e.persistence_name:"ph_"+t+"_posthog"})(e),this.nr=this.br(e),this.load(),e.debug&&eE.info("Persistence loaded",e.persistence,P_({},this.props)),this.update_config(e,e,t),this.save()}isDisabled(){return!!this._r}br(e){-1===mk.indexOf(e.persistence.toLowerCase())&&(eE.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var t=function(e){void 0===e&&(e=[]);var t=[...NC,...e];return P_({},OC,{F(e){try{var t={};try{t=IC.F(e)||{}}catch(e){}var n=pC(t,JSON.parse(OC.A(e)||"{}"));return OC.N(e,n),n}catch(e){}return null},N(e,n,r,i,o,s){try{OC.N(e,n,void 0,void 0,s);var a={};
2t.forEach(e=>{n[e]&&(a[e]=n[e])}),Object.keys(a).length&&IC.N(e,a,r,i,o,s)}catch(e){OC.D(e)}},q(e,t){try{null==v_||v_.localStorage.removeItem(e),IC.q(e,t)}catch(n){OC.D(n)}}})}(e.cookie_persisted_properties||[]),n=e.persistence.toLowerCase();return"localstorage"===n&&OC.R()?OC:"localstorage+cookie"===n&&t.R()?t:"sessionstorage"===n&&MC.R()?MC:"memory"===n?BC:"cookie"===n?IC:t.R()?t:IC}wr(e){var t=null!=e?e:this.qt.feature_flag_cache_ttl_ms;if(!t||0>=t)return!1;var n=this.props[zE];return!n||"number"!=typeof n||Date.now()-n>t}properties(){var e={};return hC(this.props,(t,n)=>{var r=(e=>{var t=YC[e];if(t)return t;for(var[n,r]of JC)if(0===e.indexOf(n))return r})(n);if("derived"===(null==r?void 0:r.exposure)){if(null!=r.shouldSkipFromEventProperties&&r.shouldSkipFromEventProperties(t,n===CE?()=>this.wr():()=>!1))return;r.transformToEventProperties&&pC(e,r.transformToEventProperties(t))}else r&&"event"!==r.exposure||(e[n]=t)}),e}load(){if(!this._r){var e=this.nr.F(this.yr);e&&(this.props=pC({},e))}}save(){this._r||this.nr.N(this.yr,this.props,this.Sr,this.kr,this.Cr,this.qt.debug)}remove(){this.nr.q(this.yr,!1),this.nr.q(this.yr,!0)}clear(){this.remove(),this.props={}}register_once(e,t,n){if(Z_(e)){tb(t)&&(t="None"),this.Sr=tb(n)?this.Ir:n;var r=!1;if(hC(e,(e,n)=>{this.props.hasOwnProperty(n)&&this.props[n]!==t||(this.Tr(n,e),r=!0)}),r)return this.save(),!0}return!1}register(e,t){if(Z_(e)){this.Sr=tb(t)?this.Ir:t;var n=!1;if(hC(e,(t,r)=>{e.hasOwnProperty(r)&&this.props[r]!==t&&(this.Tr(r,t),n=!0)}),n)return this.save(),!0}return!1}unregister(e){e in this.props&&(this.Er(e),this.save())}update_campaign_params(){if(!this.mr){var e=sk(this.qt.custom_campaign_params,this.qt.mask_personal_data_properties,this.qt.custom_personal_data_properties);eb(vC(e))||this.register(e),this.mr=!0}}update_search_keyword(){var e;this.register((e=null==__?void 0:__.referrer)?uk(e):{})}update_referrer_info(){var e;this.register_once({$referrer:dk(),$referring_domain:null!=__&&__.referrer&&(null==(e=QC(__.referrer))?void 0:e.host)||ck},void 0)}set_initial_person_info(){this.props[WE]||this.props[$E]||this.register_once({[VE]:hk(this.qt.mask_personal_data_properties,this.qt.custom_personal_data_properties)},void 0)}get_initial_props(){var e={};hC([$E,WE],t=>{var n=this.props[t];n&&hC(n,function(t,n){e["$initial_"+G_(n)]=t})});var t,n,r=this.props[VE];if(r){var i=(t=pk(r),n={},hC(t,function(e,t){n["$initial_"+G_(t)]=e}),n);pC(e,i)}return e}safe_merge(e){return hC(this.props,function(t,n){n in e||(e[n]=t)}),e}update_config(e,t,n){if(this.Ir=this.Sr=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!n),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==t.persistence||!((e,t)=>{if(e.length!==t.length)return!1;var n=[...e].sort(),r=[...t].sort();return n.every((e,t)=>e===r[t])})(e.cookie_persisted_properties||[],t.cookie_persisted_properties||[])){var r=this.br(e),i=this.props;this.clear(),this.nr=r,this.props=i,this.save()}}set_disabled(e){this._r=e,this._r?this.remove():this.save()}set_cross_subdomain(e){e!==this.kr&&(this.kr=e,this.remove(),this.save())}set_secure(e){e!==this.Cr&&(this.Cr=e,this.remove(),this.save())}set_event_timer(e,t){var n=this.props[aE]||{};n[e]=t,this.Tr(aE,n),this.save()}remove_event_timer(e){var t=this.props[aE]||{},n=t[e];return tb(n)||(delete t[e],this.Tr(aE,t),this.save()),n}get_property(e){return this.props[e]}set_property(e,t){this.Tr(e,t),this.save()}Tr(e,t){this.props[e]=t}Er(e){delete this.props[e]}}var yk="events",Dk="cancelEvents",_k="popover",bk="api",wk="widget",Ek="survey shown",Ck="survey dismissed",kk="survey sent",Sk="$survey_id",xk="$survey_iteration",Fk="$survey_last_seen_date",Ak="popover",Tk="inline",Ik="product tour shown",Pk="$product_tour_last_seen_date",Ok="$product_tour_type",Nk=tE("[RateLimiter]");class Rk{constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=e=>{var t=e.text;if(t&&t.length)try{(JSON.parse(t).quota_limited||[]).forEach(e=>{Nk.info((e||"events")+" is quota limited."),this.serverLimits[e]=(new Date).getTime()+6e4})}catch(e){return void Nk.warn('could not rate limit - continuing. Error: "'+(null==e?void 0:e.message)+'"',{text:t})}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var e;return(null==(e=this.instance.config.rate_limiting)?void 0:e.events_per_second)||10}get captureEventsBurstLimit(){var e;return Math.max((null==(e=this.instance.config.rate_limiting)?void 0:e.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(e){var t,n,r;void 0===e&&(e=!1);var{captureEventsBurstLimit:i,captureEventsPerSecond:o}=this,s=(new Date).getTime(),a=null!==(t=null==(n=this.instance.persistence)?void 0:n.get_property(qE))&&void 0!==t?t:{tokens:i,last:s};a.tokens+=(s-a.last)/1e3*o,a.last=s,a.tokens>i&&(a.tokens=i);var u=1>a.tokens;return u||e||(a.tokens=Math.max(0,a.tokens-1)),!u||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+o+" events per second and "+i+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=u,null==(r=this.instance.persistence)||r.set_property(qE,a),{isRateLimited:u,remainingTokens:a.tokens}}isServerRateLimited(e){var t=this.serverLimits[e||"events"]||!1;return!1!==t&&(new Date).getTime()<t}}var Bk=tE("[RemoteConfig]");class Lk{constructor(e){this._instance=e}get remoteConfig(){var e;return null==(e=x_._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.config}Mr(e){var t,n;null!=(t=x_.__PosthogExtensions__)&&t.loadExternalDependency?null==(n=x_.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,"remote-config",()=>e(this.remoteConfig)):e()}Pr(e){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback(t){e(t.json)}})}load(){try{if(this.remoteConfig)return Bk.info("Using preloaded remote config",this.remoteConfig),this.Rr(this.remoteConfig),void this.Or();if(this._instance.Lr())return void Bk.warn("Remote config is disabled. Falling back to local config.");this.Mr(e=>{if(!e)return Bk.info("No config found after loading remote JS config. Falling back to JSON."),void this.Pr(e=>{this.Rr(e),this.Or()});this.Rr(e),this.Or()})}catch(e){Bk.error("Error loading remote config",e)}}stop(){this.Fr&&(clearInterval(this.Fr),this.Fr=void 0)}
vendor: 8,251 bytes, line 2
2refresh(){!this._instance.Lr()&&__&&"hidden"!==__.visibilityState&&this._instance.reloadFeatureFlags()}Or(){var e;if(!this.Fr){var t=null!==(e=this._instance.config.remote_config_refresh_interval_ms)&&void 0!==e?e:3e5;0!==t&&(this.Fr=setInterval(()=>{this.refresh()},t))}}Rr(e){var t;e||Bk.error("Failed to fetch remote config from PostHog."),this._instance.Rr(null!=e?e:{}),!1!==(null==e?void 0:e.hasFeatureFlags)&&(this._instance.config.advanced_disable_feature_flags_on_first_load||null==(t=this._instance.featureFlags)||t.ensureFlagsLoaded())}}var Mk="gzip-js",jk="base64",zk=Uint8Array,Uk=Uint16Array,Hk=Uint32Array,qk=new zk([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Wk=new zk([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),$k=new zk([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Vk=function(e,t){for(var n=new Uk(31),r=0;31>r;++r)n[r]=t+=1<<e[r-1];var i=new Hk(n[30]);for(r=1;30>r;++r)for(var o=n[r];n[r+1]>o;++o)i[o]=o-n[r]<<5|r;return[n,i]},Gk=Vk(qk,2),Kk=Gk[1];Gk[0][28]=258,Kk[258]=28;for(var Yk=Vk(Wk,0)[1],Jk=new Uk(32768),Qk=0;32768>Qk;++Qk){var Xk=(43690&Qk)>>>1|(21845&Qk)<<1;Jk[Qk]=((65280&(Xk=(61680&(Xk=(52428&Xk)>>>2|(13107&Xk)<<2))>>>4|(3855&Xk)<<4))>>>8|(255&Xk)<<8)>>>1}var Zk=function(e,t,n){for(var r=e.length,i=0,o=new Uk(t);r>i;++i)++o[e[i]-1];var s,a=new Uk(t);for(i=0;t>i;++i)a[i]=a[i-1]+o[i-1]<<1;if(n){s=new Uk(1<<t);var u=15-t;for(i=0;r>i;++i)if(e[i])for(var l=i<<4|e[i],c=t-e[i],d=a[e[i]-1]++<<c,h=d|(1<<c)-1;h>=d;++d)s[Jk[d]>>>u]=l}else for(s=new Uk(r),i=0;r>i;++i)s[i]=Jk[a[e[i]-1]++]>>>15-e[i];return s},eS=new zk(288);for(Qk=0;144>Qk;++Qk)eS[Qk]=8;for(Qk=144;256>Qk;++Qk)eS[Qk]=9;for(Qk=256;280>Qk;++Qk)eS[Qk]=7;for(Qk=280;288>Qk;++Qk)eS[Qk]=8;var tS=new zk(32);for(Qk=0;32>Qk;++Qk)tS[Qk]=5;var nS=Zk(eS,9,0),rS=Zk(tS,5,0),iS=function(e){return(e/8|0)+(7&e&&1)},oS=function(e,t,n){(null==n||n>e.length)&&(n=e.length);var r=new(e instanceof Uk?Uk:e instanceof Hk?Hk:zk)(n-t);return r.set(e.subarray(t,n)),r},sS=function(e,t,n){var r=t/8|0;e[r]|=n<<=7&t,e[r+1]|=n>>>8},aS=function(e,t,n){var r=t/8|0;e[r]|=n<<=7&t,e[r+1]|=n>>>8,e[r+2]|=n>>>16},uS=function(e,t){for(var n=[],r=0;e.length>r;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return[new zk(0),0];if(1==i){var s=new zk(n[0].s+1);return s[n[0].s]=1,[s,1]}n.sort(function(e,t){return e.f-t.f}),n.push({s:-1,f:25001});var a=n[0],u=n[1],l=0,c=1,d=2;for(n[0]={s:-1,f:a.f+u.f,l:a,r:u};c!=i-1;)a=n[n[d].f>n[l].f?l++:d++],u=n[l!=c&&n[d].f>n[l].f?l++:d++],n[c++]={s:-1,f:a.f+u.f,l:a,r:u};var h=o[0].s;for(r=1;i>r;++r)o[r].s>h&&(h=o[r].s);var p=new Uk(h+1),f=lS(n[c-1],p,0);if(f>t){r=0;var g=0,m=f-t,v=1<<m;for(o.sort(function(e,t){return p[t.s]-p[e.s]||e.f-t.f});i>r;++r){var y=o[r].s;if(t>=p[y])break;g+=v-(1<<f-p[y]),p[y]=t}for(g>>>=m;g>0;){var D=o[r].s;t>p[D]?g-=1<<t-p[D]++-1:++r}for(;r>=0&&g;--r){var _=o[r].s;p[_]==t&&(--p[_],++g)}f=t}return[new zk(p),f]},lS=function(e,t,n){return-1==e.s?Math.max(lS(e.l,t,n+1),lS(e.r,t,n+1)):t[e.s]=n},cS=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Uk(++t),r=0,i=e[0],o=1,s=function(e){n[r++]=e},a=1;t>=a;++a)if(e[a]==i&&a!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(i),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(i);o=1,i=e[a]}return[n.subarray(0,r),t]},dS=function(e,t){for(var n=0,r=0;t.length>r;++r)n+=e[r]*t[r];return n},hS=function(e,t,n){var r=n.length,i=iS(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;r>o;++o)e[i+o+4]=n[o];return 8*(i+4+r)},pS=function(e,t,n,r,i,o,s,a,u,l,c){sS(t,c++,n),++i[256];for(var d=uS(i,15),h=d[0],p=d[1],f=uS(o,15),g=f[0],m=f[1],v=cS(h),y=v[0],D=v[1],_=cS(g),b=_[0],w=_[1],E=new Uk(19),C=0;y.length>C;++C)E[31&y[C]]++;for(C=0;b.length>C;++C)E[31&b[C]]++;for(var k=uS(E,7),S=k[0],x=k[1],F=19;F>4&&!S[$k[F-1]];--F);var A,T,I,P,O=l+5<<3,N=dS(i,eS)+dS(o,tS)+s,R=dS(i,h)+dS(o,g)+s+14+3*F+dS(E,S)+(2*E[16]+3*E[17]+7*E[18]);if(N>=O&&R>=O)return hS(t,c,e.subarray(u,u+l));if(sS(t,c,1+(N>R)),c+=2,N>R){A=Zk(h,p,0),T=h,I=Zk(g,m,0),P=g;var B=Zk(S,x,0);for(sS(t,c,D-257),sS(t,c+5,w-1),sS(t,c+10,F-4),c+=14,C=0;F>C;++C)sS(t,c+3*C,S[$k[C]]);c+=3*F;for(var L=[y,b],M=0;2>M;++M){var j=L[M];for(C=0;j.length>C;++C)sS(t,c,B[z=31&j[C]]),c+=S[z],z>15&&(sS(t,c,j[C]>>>5&127),c+=j[C]>>>12)}}else A=nS,T=eS,I=rS,P=tS;for(C=0;a>C;++C)if(r[C]>255){var z;aS(t,c,A[257+(z=r[C]>>>18&31)]),c+=T[z+257],z>7&&(sS(t,c,r[C]>>>23&31),c+=qk[z]);var U=31&r[C];aS(t,c,I[U]),c+=P[U],U>3&&(aS(t,c,r[C]>>>5&8191),c+=Wk[U])}else aS(t,c,A[r[C]]),c+=T[r[C]];return aS(t,c,A[256]),c+T[256]},fS=new Hk([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),gS=function(){for(var e=new Hk(256),t=0;256>t;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e}(),mS=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};var vS=!!E_||!!w_,yS="text/plain",DS=!1,_S=(e,t)=>{var[n,r]=e.split("#"),[i,o]=n.split("?");if(!o)return e;var s=o.split("&").filter(e=>e.split("=")[0]!==t).join("&");return i+(s?"?"+s:"")+(r?"#"+r:"")},bS=function(e,t,n){var r;void 0===n&&(n=!0);var[i,o]=e.split("?"),s=P_({},t),a=null!==(r=null==o?void 0:o.split("&").map(e=>{var t,[r,i]=e.split("="),o=n&&null!==(t=s[r])&&void 0!==t?t:i;return delete s[r],r+"="+o}))&&void 0!==r?r:[],u=function(e,t){var n,r;void 0===t&&(t="&");var i=[];return hC(e,function(e,t){tb(e)||tb(t)||"undefined"===t||(n=encodeURIComponent((e=>e instanceof File)(e)?e.name:e.toString()),r=encodeURIComponent(t),i[i.length]=r+"="+n)}),i.join(t)}(s);return u&&a.push(u),i+"?"+a.join("&")},wS=(e,t)=>JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString():t,t),ES=e=>{if(e.tr)return e.tr;var{data:t,compression:n}=e;if(t){if(n===Mk){var r=function(e,t){void 0===t&&(t={});var n=function(){var e=4294967295;return{p(t){for(var n=e,r=0;t.length>r;++r)n=gS[255&n^t[r]]^n>>>8;e=n},d:()=>4294967295^e}}(),r=e.length;n.p(e);var i,o,s,a,u=(a=10+((i=t).filename&&i.filename.length+1||0),function(e,t,n,r){var i=e.length,o=new zk(r+i+5*(1+Math.floor(i/7e3))+8),s=o.subarray(r,o.length-8),a=0;if(!t||8>i)for(var u=0;i>=u;u+=65535){var l=u+65535;i>l?a=hS(s,a,e.subarray(u,l)):(s[u]=!0,a=hS(s,a,e.subarray(u,i)))}else{for(var c=fS[t-1],d=c>>>13,h=8191&c,p=(1<<n)-1,f=new Uk(32768),g=new Uk(p+1),m=Math.ceil(n/3),v=2*m,y=function(t){return(e[t]^e[t+1]<<m^e[t+2]<<v)&p},D=new Hk(25e3),_=new Uk(288),b=new Uk(32),w=0,E=0,C=(u=0,0),k=0,S=0;i>u;++u){var x=y(u),F=32767&u,A=g[x];if(f[F]=A,g[x]=F,u>=k){var T=i-u;if((w>7e3||C>24576)&&T>423){a=pS(e,s,0,D,_,b,E,C,S,u-S,a),C=w=E=0,S=u;for(var I=0;286>I;++I)_[I]=0;for(I=0;30>I;++I)b[I]=0}var P=2,O=0,N=h,R=F-A&32767;if(T>2&&x==y(u-R))for(var B=Math.min(d,T)-1,L=Math.min(32767,u),M=Math.min(258,T);L>=R&&--N&&F!=A;){if(e[u+P]==e[u+P-R]){for(var j=0;M>j&&e[u+j]==e[u+j-R];++j);if(j>P){if(P=j,O=R,j>B)break;var z=Math.min(R,j-2),U=0;for(I=0;z>I;++I){var H=u-R+I+32768&32767,q=H-f[H]+32768&32767;q>U&&(U=q,A=H)}}}R+=(F=A)-(A=f[F])+32768&32767}if(O){D[C++]=268435456|Kk[P]<<18|Yk[O];var W=31&Kk[P],$=31&Yk[O];E+=qk[W]+Wk[$],++_[257+W],++b[$],k=u+P,++w}else D[C++]=e[u],++_[e[u]]}}a=pS(e,s,!0,D,_,b,E,C,S,u-S,a)}return oS(o,0,r+iS(a)+8)}(o=e,null==(s=t).level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(o.length)))):12+s.mem,a)),l=u.length;return function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=2>t.level?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&mS(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;n.length>=r;++r)e[r+10]=n.charCodeAt(r)}}(u,t),mS(u,l-8,n.d()),mS(u,l-4,r),u}(function(e){var t=e.length;if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var n=new zk(e.length+(e.length>>>1)),r=0,i=function(e){n[r++]=e},o=0;t>o;++o){if(r+5>n.length){var s=new zk(r+8+(t-o<<1));s.set(n),n=s}var a=e.charCodeAt(o);128>a?i(a):2048>a?(i(192|a>>>6),i(128|63&a)):a>55295&&57344>a?(i(240|(a=65536+(1047552&a)|1023&e.charCodeAt(++o))>>>18),i(128|a>>>12&63),i(128|a>>>6&63),i(128|63&a)):(i(224|a>>>12),i(128|a>>>6&63),i(128|63&a))}return oS(n,0,r)}(wS(t)),{mtime:0});return{contentType:yS,body:r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength),estimatedSize:r.byteLength}}if(n===jk){var i=function(e){return e?btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(e,t)=>
2String.fromCharCode(parseInt(t,16)))):e}(wS(t)),o=(e=>"data="+encodeURIComponent("string"==typeof e?e:wS(e)))(i);return{contentType:"application/x-www-form-urlencoded",body:o,estimatedSize:new Blob([o]).size}}var s=wS(t);return{contentType:"application/json",body:s,estimatedSize:new Blob([s]).size}}},CS=e=>{var t,n,r,i=ES(e);return!i||(n=e.compression,r=XC(e.url,"compression"),n!==R_.GZipJS&&r!==R_.GZipJS&&"gzip"!==r)||((t=i.body)instanceof ArrayBuffer?M_(new Uint8Array(t)):ArrayBuffer.isView(t)&&M_(new Uint8Array(t.buffer,t.byteOffset,t.byteLength)))?{url:e.url,encodedBody:i}:(DS=!0,{url:_S(e.url,"compression"),encodedBody:ES(P_({},e,{compression:void 0,tr:void 0}))})},kS=function(){var e=I_(function*(e){var t=wS(e.data),n=yield function(e,t,n){return H_.apply(this,arguments)}(t,A_.DEBUG,{rethrow:!0});if(!n)return e;var r=yield n.arrayBuffer();return P_({},e,{tr:{contentType:yS,body:r,estimatedSize:r.byteLength}})});return function(t){return e.apply(this,arguments)}}(),SS=(e,t)=>bS(e,{_:(new Date).getTime().toString(),ver:A_.JS_SDK_VERSION,compression:t}),xS=[];w_&&xS.push({transport:"fetch",method(e){var t,{url:n,encodedBody:r}=CS(e),{contentType:i,body:o,estimatedSize:s}=null!=r?r:{},a=new Headers;hC(e.headers,function(e,t){a.append(t,e)}),i&&a.append("Content-Type",i);var u=null;if(C_){var l=new C_;u={signal:l.signal,timeout:setTimeout(()=>l.abort(),e.timeout)}}w_(n,P_({method:(null==e?void 0:e.method)||"GET",headers:a,keepalive:"POST"===e.method&&52428.8>(s||0),body:o,signal:null==(t=u)?void 0:t.signal},e.fetchOptions)).then(t=>t.text().then(n=>{var r={statusCode:t.status,text:n};if(200===t.status)try{r.json=JSON.parse(n)}catch(e){eE.error(e)}null==e.callback||e.callback(r)})).catch(t=>{eE.error(t),null==e.callback||e.callback({statusCode:0,error:t})}).finally(()=>u?clearTimeout(u.timeout):null)}}),E_&&xS.push({transport:"XHR",method(e){var t=new E_,{url:n,encodedBody:r}=CS(e);t.open(e.method||"GET",n,!0);var{contentType:i,body:o}=null!=r?r:{};hC(e.headers,function(e,n){t.setRequestHeader(n,e)}),i&&t.setRequestHeader("Content-Type",i),e.timeout&&(t.timeout=e.timeout),e.disableXHRCredentials||(t.withCredentials=!0),t.onreadystatechange=()=>{if(4===t.readyState){var n={statusCode:t.status,text:t.responseText};if(200===t.status)try{n.json=JSON.parse(t.responseText)}catch(e){}null==e.callback||e.callback(n)}},t.send(o)}}),null!=D_&&D_.sendBeacon&&xS.push({transport:"sendBeacon",method(e){try{var{url:t,encodedBody:n}=CS(e),r=bS(t,{beacon:"1"}),{contentType:i,body:o}=null!=n?n:{};if(!o)return;var s=o instanceof Blob?o:new Blob([o],{type:i});D_.sendBeacon(r,s)}catch(e){}}});var FS=3e3;class AS{constructor(e,t){this.Ar=!0,this.Nr=[],this.$r=mb((null==t?void 0:t.flush_interval_ms)||FS,250,5e3,eE.createLogger("flush interval"),FS),this.Dr=e}enqueue(e){this.Nr.push(e),this.qr||this.jr()}unload(){this.Hr();var e=this.Nr.length>0?this.Ur():{},t=Object.values(e);[...t.filter(e=>0===e.url.indexOf("/e")),...t.filter(e=>0!==e.url.indexOf("/e"))].map(e=>{this.Dr(P_({},e,{transport:"sendBeacon"}))})}enable(){this.Ar=!1,this.jr()}jr(){var e=this;this.Ar||(this.qr=setTimeout(()=>{if(this.Hr(),this.Nr.length>0){var t=this.Ur(),n=function(){var n=t[r],i=(new Date).getTime();n.data&&Q_(n.data)&&hC(n.data,e=>{e.offset=Math.abs(e.timestamp-i),delete e.timestamp}),e.Dr(n)};for(var r in t)n()}},this.$r))}Hr(){clearTimeout(this.qr),this.qr=void 0}Ur(){var e={};return hC(this.Nr,t=>{var n,r=t,i=(r?r.batchKey:null)||r.url;tb(e[i])&&(e[i]=P_({},r,{data:[]})),null==(n=e[i].data)||n.push(r.data)}),this.Nr=[],e}}var TS=["retriesPerformedSoFar"];class IS{constructor(e){this.Br=!1,this.zr=3e3,this.Nr=[],this._instance=e,this.Nr=[],this.Vr=!0,!tb(v_)&&"onLine"in v_.navigator&&(this.Vr=v_.navigator.onLine,this.Wr=()=>{this.Vr=!0,this.Zr()},this.Gr=()=>{this.Vr=!1},_C(v_,"online",this.Wr),_C(v_,"offline",this.Gr))}get length(){return this.Nr.length}retriableRequest(e){var{retriesPerformedSoFar:t}=e,n=O_(e,TS);ab(t)&&(n.url=bS(n.url,{retry_count:t})),this._instance._send_request(P_({},n,{callback:e=>{200===e.statusCode||e.statusCode>=400&&500>e.statusCode||(null!=t?t:0)>=10?null==n.callback||n.callback(e):this.Qr(P_({retriesPerformedSoFar:t},n))}}))}Qr(e){var t=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=t+1;var n=function(e){var t=3e3*Math.pow(2,e),n=t/2,r=Math.min(18e5,t),i=Math.random()-.5;return Math.ceil(r+i*(r-n))}(t),r=Date.now()+n;this.Nr.push({retryAt:r,requestOptions:e});var i="Enqueued failed request for retry in "+n;navigator.onLine||(i+=" (Browser is offline)"),eE.warn(i),this.Br||(this.Br=!0,this.Jr())}
vendor: 4,889 bytes, line 2
2Jr(){if(this.Kr&&clearTimeout(this.Kr),0===this.Nr.length)return this.Br=!1,void(this.Kr=void 0);this.Kr=setTimeout(()=>{this.Vr&&this.Nr.length>0&&this.Zr(),this.Jr()},this.zr)}Zr(){var e=Date.now(),t=[],n=this.Nr.filter(n=>e>n.retryAt||(t.push(n),!1));if(this.Nr=t,n.length>0)for(var{requestOptions:r}of n)this.retriableRequest(r)}unload(){for(var{requestOptions:e}of(this.Kr&&(clearTimeout(this.Kr),this.Kr=void 0),this.Br=!1,tb(v_)||(this.Wr&&(v_.removeEventListener("online",this.Wr),this.Wr=void 0),this.Gr&&(v_.removeEventListener("offline",this.Gr),this.Gr=void 0)),this.Nr))try{this._instance._send_request(P_({},e,{transport:"sendBeacon"}))}catch(t){eE.error(t)}this.Nr=[]}}class PS{constructor(e){this.Yr=()=>{var e,t,n,r;this.Xr||(this.Xr={});var i=this.scrollElement(),o=this.scrollY(),s=i?Math.max(0,i.scrollHeight-i.clientHeight):0,a=o+((null==i?void 0:i.clientHeight)||0),u=(null==i?void 0:i.scrollHeight)||0;this.Xr.lastScrollY=Math.ceil(o),this.Xr.maxScrollY=Math.max(o,null!==(e=this.Xr.maxScrollY)&&void 0!==e?e:0),this.Xr.maxScrollHeight=Math.max(s,null!==(t=this.Xr.maxScrollHeight)&&void 0!==t?t:0),this.Xr.lastContentY=a,this.Xr.maxContentY=Math.max(a,null!==(n=this.Xr.maxContentY)&&void 0!==n?n:0),this.Xr.maxContentHeight=Math.max(u,null!==(r=this.Xr.maxContentHeight)&&void 0!==r?r:0)},this._instance=e}get ei(){return this._instance.config.scroll_root_selector}getContext(){return this.Xr}resetContext(){var e=this.Xr;return setTimeout(this.Yr,0),e}startMeasuringScrollPosition(){_C(v_,"scroll",this.Yr,{capture:!0}),_C(v_,"scrollend",this.Yr,{capture:!0}),_C(v_,"resize",this.Yr)}scrollElement(){if(!this.ei)return null==v_?void 0:v_.document.documentElement;var e=Q_(this.ei)?this.ei:[this.ei];for(var t of e){var n=null==v_?void 0:v_.document.querySelector(t);if(n)return n}}scrollY(){if(this.ei){var e=this.scrollElement();return e&&e.scrollTop||0}return v_&&(v_.scrollY||v_.pageYOffset||v_.document.documentElement.scrollTop)||0}scrollX(){if(this.ei){var e=this.scrollElement();return e&&e.scrollLeft||0}return v_&&(v_.scrollX||v_.pageXOffset||v_.document.documentElement.scrollLeft)||0}}var OS=e=>hk(null==e?void 0:e.config.mask_personal_data_properties,null==e?void 0:e.config.custom_personal_data_properties);class NS{constructor(e,t,n,r){this.ti=e=>{var t=this.ri();if(!t||t.sessionId!==e){var n={sessionId:e,props:this.ii(this._instance)};this.ni.register({[HE]:n})}},this._instance=e,this.si=t,this.ni=n,this.ii=r||OS,this.si.onSessionId(this.ti)}ri(){return this.ni.props[HE]}getSetOnceProps(){var e,t=null==(e=this.ri())?void 0:e.props;return t?"r"in t?pk(t):{$referring_domain:t.referringDomain,$pathname:t.initialPathName,utm_source:t.utm_source,utm_campaign:t.utm_campaign,utm_medium:t.utm_medium,utm_content:t.utm_content,utm_term:t.utm_term}:{}}getSessionProps(){var e={};return hC(vC(this.getSetOnceProps()),(t,n)=>{"$current_url"===n&&(n="url"),e["$session_entry_"+G_(n)]=t}),e}}class RS{constructor(){this.oi={}}on(e,t){return this.oi[e]||(this.oi[e]=[]),this.oi[e].push(t),()=>{this.oi[e]=this.oi[e].filter(e=>e!==t)}}emit(e,t){for(var n of this.oi[e]||[])n(t);for(var r of this.oi["*"]||[])r(e,t)}}var BS=tE("[SessionId]");class LS{on(e,t){return this.ai.on(e,t)}constructor(e,t,n){var r;if(this.ui=[],this.li=void 0,this.ai=new RS,this.hi=(e,t)=>!(!ab(e)||!ab(t))&&Math.abs(e-t)>this.sessionTimeoutMs,!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode===tC)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.qt=e.config,this.ni=e.persistence,this.ci=void 0,this.di=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.vi=t||xC,this.fi=n||xC;var i=this.qt.persistence_name||this.qt.token;if(this._sessionTimeoutMs=1e3*mb(this.qt.session_idle_timeout_seconds||1800,60,36e3,BS.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.pi(),this.gi="ph_"+i+"_window_id",this.mi="ph_"+i+"_primary_window_exists",this.yi()){var o=MC.F(this.gi),s=MC.F(this.mi);o&&!s?this.ci=o:MC.q(this.gi),MC.N(this.mi,!0)}if(null!=(r=this.qt.bootstrap)&&r.sessionID)try{var a=(()=>{var e=this.qt.bootstrap.sessionID.replace(/-/g,"");if(32!==e.length)throw new Error("Not a valid UUID");if("7"!==e[12])throw new Error("Not a UUIDv7");return parseInt(e.substring(0,12),16)})();this.bi(this.qt.bootstrap.sessionID,(new Date).getTime(),a)}catch(e){BS.error("Invalid sessionID in bootstrap",e)}this.wi()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return tb(this.ui)&&(this.ui=[]),this.ui.push(e),this.di&&e(this.di,this.ci),()=>{this.ui=this.ui.filter(t=>t!==e)}}yi(){return"memory"!==this.qt.persistence&&!this.ni._r&&MC.R()}xi(e){e!==this.ci&&(this.ci=e,this.yi()&&MC.N(this.gi,e))}Si(){return this.ci?this.ci:this.yi()?MC.F(this.gi):null}
2bi(e,t,n){e===this.di&&t===this._sessionActivityTimestamp&&n===this._sessionStartTimestamp||(this._sessionStartTimestamp=n,this._sessionActivityTimestamp=t,this.di=e,this.ni.register({[wE]:[t,e,n]}))}ki(){var e=this.ni.props[wE];return Q_(e)&&2===e.length&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.bi(null,null,null)}destroy(){clearTimeout(this.Ci),this.Ci=void 0,this.li&&v_&&(v_.removeEventListener(sC,this.li,{capture:!1}),this.li=void 0),this.ui=[]}wi(){this.li=()=>{this.yi()&&MC.q(this.mi)},_C(v_,sC,this.li,{capture:!1})}checkAndGetSessionAndWindowId(e,t){if(void 0===e&&(e=!1),void 0===t&&(t=null),this.qt.cookieless_mode===tC)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var n=t||(new Date).getTime(),[r,i,o]=this.ki(),s=this.Si(),a=ab(o)&&Math.abs(n-o)>864e5,u=!1,l=!i,c=!l&&!e&&this.hi(n,r);l||c||a?(i=this.vi(),s=this.fi(),BS.info("new session ID generated",{sessionId:i,windowId:s,changeReason:{noSessionId:l,activityTimeout:c,sessionPastMaximumLength:a}}),o=n,u=!0):s||(s=this.fi(),u=!0);var d=ab(r)&&e&&!a?r:n,h=ab(o)?o:(new Date).getTime();return this.xi(s),this.bi(i,d,h),e||this.pi(),u&&this.ui.forEach(e=>e(i,s,u?{noSessionId:l,activityTimeout:c,sessionPastMaximumLength:a}:void 0)),{sessionId:i,windowId:s,sessionStartTimestamp:h,changeReason:u?{noSessionId:l,activityTimeout:c,sessionPastMaximumLength:a}:void 0,lastActivityTimestamp:r}}pi(){clearTimeout(this.Ci),this.Ci=setTimeout(()=>{var[e]=this.ki();if(this.hi((new Date).getTime(),e)){var t=this.di;this.resetSessionId(),this.ai.emit("forcedIdleReset",{idleSessionId:t})}},1.1*this.sessionTimeoutMs)}}var MS=function(e,t){if(!e)return!1;var n=e.userAgent;if(n&&W_(n,t))return!0;try{var r=null==e?void 0:e.userAgentData;if(null!=r&&r.brands&&r.brands.some(e=>W_(null==e?void 0:e.brand,t)))return!0}catch(e){}return!!e.webdriver},jS=function(e,t){if(!function(e){try{new RegExp(e)}catch(e){return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch(e){return!1}};function zS(e,t,n){return wS({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:n})}var US={exact:(e,t)=>t.some(t=>e.some(e=>t===e)),is_not:(e,t)=>t.every(t=>e.every(e=>t!==e)),regex:(e,t)=>t.some(t=>e.some(e=>jS(t,e))),not_regex:(e,t)=>t.every(t=>e.every(e=>!jS(t,e))),icontains:(e,t)=>t.map(HS).some(t=>e.map(HS).some(e=>t.includes(e))),not_icontains:(e,t)=>t.map(HS).every(t=>e.map(HS).every(e=>!t.includes(e))),gt:(e,t)=>t.some(t=>{var n=parseFloat(t);return!isNaN(n)&&e.some(e=>n>parseFloat(e))}),lt:(e,t)=>t.some(t=>{var n=parseFloat(t);return!isNaN(n)&&e.some(e=>n<parseFloat(e))})},HS=e=>e.toLowerCase();function qS(e,t){return!e||Object.entries(e).every(e=>{var[n,r]=e,i=null==t?void 0:t[n];if(tb(i)||ib(i))return!1;var o=[String(i)],s=US[r.operator];return!!s&&s(r.values,o)})}var WS="custom",$S="i.posthog.com",VS=/^\/static\//;class GS{constructor(e){this.Ii={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return"https://app.posthog.com"===e?"https://us.i.posthog.com":e}get flagsApiHost(){var e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var e,t=null==(e=this.instance.config.ui_host)?void 0:e.replace(/\/$/,"");return t||(t=this.apiHost.replace("."+$S,".posthog.com")),"https://app.posthog.com"===t?"https://us.posthog.com":t}get region(){return this.Ii[this.apiHost]||(this.Ii[this.apiHost]=/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"us":/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"eu":WS),this.Ii[this.apiHost]}Ti(e){var t=this.instance.config.__preview_external_dependency_versioned_paths;if("string"==typeof t&&VS.test(e))return t.trim().replace(/\/$/,"")||void 0}endpointFor(e,t){if(void 0===t&&(t=""),t&&(t="/"===t[0]?t:"/"+t),"ui"===e)return this.uiHost+t;if("flags"===e)return this.flagsApiHost+t;if("assets"===e){var n=this.Ti(t);if(n)return""+n+t}if(this.region===WS)return this.apiHost+t;var r=$S+t;switch(e){case"assets":return"https://"+this.region+"-assets."+r;case"api":return"https://"+this.region+"."+r}}}var KS=tE("[Surveys]"),YS="seenSurvey_",JS=[_k,wk,bk],QS={ignoreConditions:!1,ignoreDelay:!1,displayType:Ak}
2,XS=tE("[PostHog ExternalIntegrations]"),ZS={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class ex{constructor(e){this._instance=e}lr(e,t){var n;null==(n=x_.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,e,e=>{if(e)return XS.error("failed to load script",e);t()})}startIfEnabledOrStop(){var e=this,t=function(t){var n,i,o;!r||null!=(n=x_.__PosthogExtensions__)&&null!=(n=n.integrations)&&n[t]||e.lr(ZS[t],()=>{var n;null==(n=x_.__PosthogExtensions__)||null==(n=n.integrations)||null==(n=n[t])||n.start(e._instance)}),!r&&null!=(i=x_.__PosthogExtensions__)&&null!=(i=i.integrations)&&i[t]&&(null==(o=x_.__PosthogExtensions__)||null==(o=o.integrations)||null==(o=o[t])||o.stop())};for(var[n,r]of Object.entries(null!==(i=this._instance.config.integrations)&&void 0!==i?i:{})){var i;t(n)}}}var tx,nx={},rx=0,ix=()=>{},ox='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',sx="Surveys module not available",ax="sanitize_properties is deprecated. Use before_send instead",ux="Invalid value for property_denylist config: ",lx="posthog",cx=!vS&&-1===(null==S_?void 0:S_.indexOf("MSIE"))&&-1===(null==S_?void 0:S_.indexOf("Mozilla")),dx=e=>{var t;return P_({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:DC(null==__?void 0:__.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:ix,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:null!=e?e:"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,debug:b_&&nb(null==b_?void 0:b_.search)&&-1!==b_.search.indexOf("__posthog_debug=true")||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:"https:"===(null==v_||null==(t=v_.location)?void 0:t.protocol),ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error(e){eE.error("Bad HTTP status: "+e.statusCode+" "+e.text)},get_device_id:e=>e,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:iC,before_send:void 0,request_queue_config:{flush_interval_ms:FS},error_tracking:{},_onCapture:ix,__preview_eager_load_replay:!1},(e=>({rageclick:!e||"2025-11-30">e||{content_ignorelist:!0},capture_pageview:!e||"2025-05-24">e||"history_change",session_recording:e&&e>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:e&&e>="2026-01-30"?"head":"body",internal_or_test_user_hostname:e&&e>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0}))(e))},hx=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["store_google","save_campaign_params"],["verbose","debug"]],px=e=>{var t={};for(var[n,r]of hx)tb(e[n])||(t[r]=e[n]);var i=pC({},t,e);return Q_(e.property_blacklist)&&(tb(e.property_denylist)?i.property_denylist=e.property_blacklist:Q_(e.property_denylist)?i.property_denylist=[...e.property_blacklist,...e.property_denylist]:eE.error(ux+e.property_denylist)),i};class fx{constructor(){this.__forceAllowLocalhost=!1}get Ei(){return this.__forceAllowLocalhost}set Ei(e){eE.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class gx{Mi(e,t){if(e){var n=this.Pi.indexOf(e);-1!==n&&this.Pi.splice(n,1)}return this.Pi.push(t),null==t.initialize||t.initialize(),t}Ri(){return this.config.cookieless_mode===tC||this.config.cookieless_mode===eC&&this.consent.isRejected()}get decideEndpointWasHit(){var e,t;return null!==(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&void 0!==e&&e}get flagsEndpointWasHit(){var e,t;return null!==(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&void 0!==e&&e}constructor(){var e;this.webPerformance=new fx,this.Oi=!1,this.version=A_.LIB_VERSION,this.Li=new RS,this.Pi=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=dx(),this.SentryIntegration=GC,this.sentryIntegration=e=>function(e,t){var n=VC(e,t);return{name:$C,processEvent:e=>n(e)}}(this,e),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Fi=!1,this.Ai=null,this.Ni=null,this.$i=null,this.scrollManager=new PS(this),this.pageViewM
2anager=new KC(this),this.rateLimiter=new Rk(this),this.requestRouter=new GS(this),this.consent=new jC(this),this.externalIntegrations=new ex(this);var t=null!==(e=gx.__defaultExtensionClasses)&&void 0!==e?e:{};this.featureFlags=t.featureFlags&&new t.featureFlags(this),this.toolbar=t.toolbar&&new t.toolbar(this),this.surveys=t.surveys&&new t.surveys(this),this.conversations=t.conversations&&new t.conversations(this),this.logs=t.logs&&new t.logs(this),this.experiments=t.experiments&&new t.experiments(this),this.exceptions=t.exceptions&&new t.exceptions(this),this.people={set:(e,t,n)=>{var r=nb(e)?{[e]:t}:e;this.setPersonProperties(r),null==n||n({})},set_once:(e,t,n)=>{var r=nb(e)?{[e]:t}:e;this.setPersonProperties(void 0,r),null==n||n({})}},this.on("eventCaptured",e=>eE.info('send "'+(null==e?void 0:e.event)+'"',e))}init(e,t,n){if(n&&n!==lx){var r,i=null!==(r=nx[n])&&void 0!==r?r:new gx;return i._init(e,t,n),nx[n]=i,nx[lx][n]=i,i}return this._init(e,t,n)}_init(e,t,n){var r,i;if(void 0===t&&(t={}),tb(e)||rb(e))return eE.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},t.debug=this.Di(t.debug),this.qi=t,this.ji=[],t.person_profiles?this.Ni=t.person_profiles:t.process_person&&(this.Ni=t.process_person),this.set_config(pC({},dx(t.defaults),px(t),{name:n,token:e})),this.config.on_xhr_error&&eE.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=t.disable_compression?void 0:Mk;var o=this.Hi();this.persistence=new vk(this.config,o),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new vk(P_({},this.config,{persistence:"sessionStorage"}),o);var s=P_({},this.persistence.props),a=P_({},this.sessionPersistence.props);this.register({$initialization_time:(new Date).toISOString()}),this.Ui=new AS(e=>this.Bi(e),this.config.request_queue_config),this.zi=new IS(this),this.__request_queue=[];var u=this.Ri();if(u||(this.sessionManager=new LS(this),this.sessionPropsManager=new NS(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(eE.info("Deferring extension initialization to improve startup performance"),setTimeout(()=>{this.Vi(u)},0)):(eE.info("Initializing extensions synchronously"),this.Vi(u)),A_.DEBUG=A_.DEBUG||this.config.debug,A_.DEBUG&&eE.info("Starting in debug mode",{this:this,config:t,thisC:P_({},this.config),p:s,s:a}),!this.config.identity_distinct_id||null!=(r=t.bootstrap)&&r.distinctID||(t.bootstrap=P_({},t.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),void 0!==(null==(i=t.bootstrap)?void 0:i.distinctID)){var l=t.bootstrap.distinctID,c=this.get_distinct_id(),d=this.persistence.get_property(UE);if(t.bootstrap.isIdentifiedID&&null!=c&&c!==l&&d===nC)this.identify(l);else if(t.bootstrap.isIdentifiedID&&null!=c&&c!==l&&d===rC)eE.warn("Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.");else{var h=this.config.get_device_id(xC()),p=t.bootstrap.isIdentifiedID?h:l;this.persistence.set_property(UE,t.bootstrap.isIdentifiedID?rC:nC),this.register({distinct_id:l,$device_id:p})}}if(u)this.register_once({distinct_id:YE,$device_id:null},"");else if(!this.get_distinct_id()){var f=this.config.get_device_id(xC());this.register_once({distinct_id:f,$device_id:f},""),this.persistence.set_property(UE,nC)}return _C(v_,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),t.segment?function(e,t){var n=e.config.segment;if(!n)return t();!function(e,t){var n=e.config.segment;if(!n)return t();var r=n=>{var r=()=>n.anonymousId()||xC();e.config.get_device_id=r,n.id()&&(e.register({distinct_id:n.id(),$device_id:r()}),e.persistence.set_property(UE,rC)),t()},i=n.user();"then"in i&&X_(i.then)?i.then(r):r(i)}(e,()=>{n.register((e=>{Promise&&Promise.resolve||WC.warn("This browser does not have Promise support, and can not use the segment integration");var t=(t,n)=>{if(!n)return t;t.event.userId||t.event.anonymousId===e.get_distinct_id()||(WC.info("No userId set, resetting PostHog"),e.reset()),t.event.userId&&t.event.userId!==e.get_distinct_id()&&(WC.info("UserId set, identifying with PostHog"),e.identify(t.event.userId)
2);var r=e.calculateEventProperties(n,t.event.properties);return t.event.properties=Object.assign({},r,t.event.properties),t};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:e=>t(e,e.event.event),page:e=>t(e,aC),identify:e=>t(e,lC),screen:e=>t(e,"$screen")}})(e)).then(()=>{t()})})}(this,()=>this.Wi()):this.Wi(),X_(this.config._onCapture)&&this.config._onCapture!==ix&&(eE.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",e=>this.config._onCapture(e.event,e))),this.config.ip&&eE.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this}Vi(e){var t,n,r,i,o,s,a,u=performance.now(),l=P_({},gx.__defaultExtensionClasses,this.config.__extensionClasses),c=[];l.featureFlags&&this.Pi.push(this.featureFlags=null!==(t=this.featureFlags)&&void 0!==t?t:new l.featureFlags(this)),l.exceptions&&this.Pi.push(this.exceptions=null!==(n=this.exceptions)&&void 0!==n?n:new l.exceptions(this)),l.historyAutocapture&&this.Pi.push(this.historyAutocapture=new l.historyAutocapture(this)),l.tracingHeaders&&this.Pi.push(new l.tracingHeaders(this)),l.siteApps&&this.Pi.push(this.siteApps=new l.siteApps(this)),l.sessionRecording&&!e&&this.Pi.push(this.sessionRecording=new l.sessionRecording(this)),this.config.disable_scroll_properties||c.push(()=>{this.scrollManager.startMeasuringScrollPosition()}),l.autocapture&&this.Pi.push(this.autocapture=new l.autocapture(this)),l.surveys&&this.Pi.push(this.surveys=null!==(r=this.surveys)&&void 0!==r?r:new l.surveys(this)),l.logs&&this.Pi.push(this.logs=null!==(i=this.logs)&&void 0!==i?i:new l.logs(this)),l.conversations&&this.Pi.push(this.conversations=null!==(o=this.conversations)&&void 0!==o?o:new l.conversations(this)),l.productTours&&this.Pi.push(this.productTours=new l.productTours(this)),l.heatmaps&&this.Pi.push(this.heatmaps=new l.heatmaps(this)),l.webVitalsAutocapture&&this.Pi.push(this.webVitalsAutocapture=new l.webVitalsAutocapture(this)),l.exceptionObserver&&this.Pi.push(this.exceptionObserver=new l.exceptionObserver(this)),l.deadClicksAutocapture&&this.Pi.push(this.deadClicksAutocapture=new l.deadClicksAutocapture(this,HC)),l.toolbar&&this.Pi.push(this.toolbar=null!==(s=this.toolbar)&&void 0!==s?s:new l.toolbar(this)),l.experiments&&this.Pi.push(this.experiments=null!==(a=this.experiments)&&void 0!==a?a:new l.experiments(this)),this.Pi.forEach(e=>{e.initialize&&c.push(()=>{null==e.initialize||e.initialize()})}),c.push(()=>{if(this.Zi){var e=this.Zi;this.Zi=void 0,this.Rr(e)}}),this.Gi(c,u)}Gi(e,t){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-t>=30&&e.length>0)return void setTimeout(()=>{this.Gi(e,t)},0);var n=e.shift();if(n)try{n()}catch(e){eE.error("Error initializing extension:",e)}}var r=Math.round(performance.now()-t);this.register_for_session({[JE]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[QE]:r}),this.config.__preview_deferred_init_extensions&&eE.info("PostHog extensions initialized ("+r+"ms)")}Rr(e){var t;if(!__||!__.body)return eE.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(()=>{this.Rr(e)},500);this.config.__preview_deferred_init_extensions&&(this.Zi=e),this.Qi=e,this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=$_(e.supportedCompression,Mk)?Mk:$_(e.supportedCompression,jk)?jk:void 0),null!=(t=e.analytics)&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.Ni?this.Ni:iC}),this.Pi.forEach(t=>null==t.onRemoteConfig?void 0:t.onRemoteConfig(e))}Wi(){try{this.config.loaded(this)}catch(e){eE.critical("`loaded` function failed",e)}if(this.Ji(),this.config.internal_or_test_user_hostname&&null!=b_&&b_.hostname){var e=b_.hostname,t=this.config.internal_or_test_user_hostname;("string"==typeof t?e===t:t.test(e))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||this.Ri())&&this.Ki()},1),this.Yi=new Lk(this),this.Yi.load()}Ji(){var e;this.is_capturing()&&this.config.request_batching&&(null==(e=this.Ui)||e.enable())}_dom_loaded(){this.is_capturing()&&dC(this.__request_queue,e=>this.Bi(e)),this.__request_queue=[],this.Ji()}_handle_unload(){var e,t,n,r;null==(e=this.surveys)||e.handlePageUnload(),this.config.request_batching?(this.Xi()&&this.capture(uC),null==(t=this.logs)||t.flushLogs("sendBeacon"),null==(n=this.Ui)||n.unload(),null==(r=this.zi)||r.unload()):this.Xi()&&this.capture(uC,null,{transport:"sendBeacon"})}_send_request(e){this.__loaded&&(cx?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=bS(e.url,{ip:this.config.ip?1:0}),e.headers=P_({},this.config.request_headers,e.headers),e.compression="best-available"===e.compression?this.compression:e.compression,e.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,
2(e=>{var t,n,r,i=P_({},e);i.timeout=i.timeout||6e4,i.url=SS(i.url,i.compression);var o=null!==(t=i.transport)&&void 0!==t?t:"fetch",s=xS.filter(e=>!i.disableTransport||!e.transport||!i.disableTransport.includes(e.transport)),a=null!==(n=null==(r=function(e){for(var t=0;e.length>t;t++)if(e[t].transport===o)return e[t]}(s))?void 0:r.method)&&void 0!==n?n:s[0].method;if(!a)throw new Error("No available transport method");"sendBeacon"!==o&&i.data&&i.compression===Mk&&k_&&!DS?kS(i).then(e=>{a(e)}).catch(t=>{if(j_(t))return DS=!0,void a(P_({},i,{compression:void 0,url:SS(e.url,void 0)}));(e=>{if(!e||"object"!=typeof e)return!1;var t="name"in e?String(e.name):"";return j_(e)||t===L_})(t)&&(DS=!0),a(i)}):a(i)})(P_({},e,{callback:t=>{var n,r;this.rateLimiter.checkForLimiting(t),400>t.statusCode||null==(n=(r=this.config).on_request_error)||n.call(r,t),null==e.callback||e.callback(t)}}))))}Bi(e){this.zi?this.zi.retriableRequest(e):this._send_request(e)}_execute_array(e){rx++;try{var t,n=[],r=[],i=[];dC(e,e=>{if(e)if(Q_(t=e[0]))i.push(e);else if(X_(e))try{e.call(this)}catch(t){eE.error("Error executing queued PostHog call",e,t)}else Q_(e)&&"alias"===t?n.push(e):Q_(e)&&-1!==t.indexOf("capture")&&X_(this[t])?i.push(e):r.push(e)});var o=function(e,t){dC(e,function(e){try{if(Q_(e[0])){var n=t;hC(e,function(e){n=n[e[0]].apply(n,e.slice(1))})}else t[e[0]].apply(t,e.slice(1))}catch(t){eE.error("Error executing queued PostHog call",e,t)}})};o(n,this),o(r,this),o(i,this)}finally{rx--}}push(e){if(rx>0&&Q_(e)&&nb(e[0])){var t=gx.prototype[e[0]];X_(t)&&t.apply(this,e.slice(1))}else this._execute_array([e])}capture(e,t,n){var r,i,o,s,a;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Ui){if(this.is_capturing())if(!tb(e)&&nb(e)){var u=!this.config.opt_out_useragent_filter&&this._is_bot();if(!u||this.config.__preview_capture_bot_pageviews){var l=null!=n&&n.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(null==l||!l.isRateLimited){null!=t&&t.$current_url&&!nb(null==t?void 0:t.$current_url)&&(eE.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),null==t||delete t.$current_url),"$exception"!==e||null!=n&&n.en||eE.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var c=new Date,d=(null==n?void 0:n.timestamp)||c,h=(null==n?void 0:n.uuid)||xC(),p={uuid:h,event:e,properties:this.calculateEventProperties(e,t||{},d,h)};e===aC&&this.config.__preview_capture_bot_pageviews&&u&&(p.event="$bot_pageview",p.properties.$browser_type="bot"),l&&(p.properties.$lib_rate_limit_remaining_tokens=l.remainingTokens),(null==n?void 0:n.$set)&&(p.$set=null==n?void 0:n.$set);var f,g,m,v=this.tn(null==n?void 0:n.$set_once,e!==cC,e===lC);if(v&&(p.$set_once=v),null!=n&&n._noTruncate||(i=this.config.properties_string_max_length,o=p,s=e=>nb(e)?e.slice(0,i):e,a=new Set,p=function e(t,n){return t!==Object(t)?s?s(t):t:a.has(t)?void 0:(a.add(t),Q_(t)?(r=[],dC(t,t=>{r.push(e(t))})):(r={},hC(t,(t,n)=>{a.has(t)||(r[n]=e(t,n))})),r);var r}(o)),p.timestamp=d,tb(null==n?void 0:n.timestamp)||(p.properties.$event_time_override_provided=!0,p.properties.$event_time_override_system_time=c),e===Ck||e===kk){var y=null==t?void 0:t[Sk],D=null==t?void 0:t[xk];(e=>{try{var t=(e=>((e,t)=>{var n=""+YS+t.id;return t.current_iteration&&t.current_iteration>0&&(n=""+YS+t.id+"_"+t.current_iteration),n})(0,e))(e);if(localStorage.getItem(t))return;localStorage.setItem(t,"true")}catch(e){KS.error("Failed to persist survey seen state",e)}})({id:y,current_iteration:D}),p.$set=P_({},p.$set,{[(f={id:y,current_iteration:D},g=e===kk?"responded":"dismissed",m="$survey_"+g+"/"+f.id,f.current_iteration&&f.current_iteration>0&&(m="$survey_"+g+"/"+f.id+"/"+f.current_iteration),m)]:!0})}else e===Ek&&(p.$set=P_({},p.$set,{[Fk]:(new Date).toISOString()}));if(e===Ik){var _=null==t?void 0:t[Ok];_&&(p.$set=P_({},p.$set,{[Pk+"/"+_]:(new Date).toISOString()}))}var b=P_({},p.properties.$set,p.$set);if(eb(b)||this.setPersonPropertiesForFlags(b),!ob(this.config.before_send)){var w=this.rn(p);if(!w)return;p=w}this.Li.emit("eventCaptured",p);var E={method:"POST",url:null!==(r=null==n?void 0:n._url)&&void 0!==r?r:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:p,compression:"best-available",batchKey:null==n?void 0:n._batchKey,transport:null==n?void 0:n.transport};return!this.config.request_batching||n&&(null==n||!n._batchKey)||null!=n&&n.send_instantly?this.Bi(E):this.Ui.enqueue(E),p}eE.critical("This capture call is ignored due to client rate limiting.")}}else eE.error("No event name provided to posthog.capture")}else eE.uninitializedWarning("posthog.capture")}_addCaptureHook(e){return this.on("eventCaptured",t=>e(t.event,t))}calculateEventProperties(e,t,n,r,i){if(n=n||new Date,!this.persistence||!this.sessionPersistence)return t;var o=i?void 0:this.persistence.remove_event_timer(e),s=P_({},t);if(s.token=this.config.token,s.$config_defaults=this.config.defaults,this.Ri()&&(s.$cookieless_mode=!0),"$snapshot"===e){var a=P_({},this.persistence.properties(),this.sessionPersistence.properties());return s.distinct_id=a.distinct_id,(!nb(s.distinct_id)&&!sb(s.distinct_id)||rb(s.distinct_id))&&eE.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),s}var u,l=function(e,t){var n,r,i,o;if(!S_)return{};var s,a,u,l,c,d,h,p,f=e?[...nk,...t||[]]:[],[g,m]=function(e){for(var t=0;gw.length>t;t++){var[n,r]=gw[t],i=n.exec(e),o=i&&(X_(r)?r(i,e):r);if(o)return o}return["",""]}(S_);return pC(vC({$os:g,$os_version:m,$browser:hw(S_,navigator.vendor),$device:mw(S_),$device_type:(a=S_,u={userAgentDataPlatform:null==(n=navigator)||null==(n=n.userAgentData)?void 0:n.platform,maxTouchPoints:null==(r=navigator)?void 0:r.maxTouchPoints,screenWidth:null==v_||null==(i=v_.screen)?void 0:i.width,screenHeight:null==v_||null==(o=v_.
2screen)?void 0:o.height,devicePixelRatio:null==v_?void 0:v_.devicePixelRatio},p=mw(a),p===Sb||p===kb||"Kobo"===p||"Kindle Fire"===p||p===nw?Cb:p===$b||p===Gb||p===Vb||p===Zb?"Console":p===Fb?"Wearable":p?bb:"Android"===(null==u?void 0:u.userAgentDataPlatform)&&(null!==(l=null==u?void 0:u.maxTouchPoints)&&void 0!==l?l:0)>0?600>Math.min(null!==(c=null==u?void 0:u.screenWidth)&&void 0!==c?c:0,null!==(d=null==u?void 0:u.screenHeight)&&void 0!==d?d:0)/(null!==(h=null==u?void 0:u.devicePixelRatio)&&void 0!==h?h:1)?bb:Cb:"Desktop"),$timezone:fk(),$timezone_offset:gk()}),{$current_url:ZC(null==b_?void 0:b_.href,f,ik),$host:null==b_?void 0:b_.host,$pathname:null==b_?void 0:b_.pathname,$raw_user_agent:S_.length>1e3?S_.substring(0,997)+"...":S_,$browser_version:fw(S_,navigator.vendor),$browser_language:lk(),$browser_language_prefix:(s=lk(),"string"==typeof s?s.split("-")[0]:void 0),$screen_height:null==v_?void 0:v_.screen.height,$screen_width:null==v_?void 0:v_.screen.width,$viewport_height:null==v_?void 0:v_.innerHeight,$viewport_width:null==v_?void 0:v_.innerWidth,$lib:A_.LIB_NAME,$lib_version:A_.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:c,windowId:d}=this.sessionManager.checkAndGetSessionAndWindowId(i,n.getTime());s.$session_id=c,s.$window_id=d}this.sessionPropsManager&&pC(s,this.sessionPropsManager.getSessionProps());try{var h;this.sessionRecording&&pC(s,this.sessionRecording.sdkDebugProperties),s.$sdk_debug_retry_queue_size=null==(h=this.zi)?void 0:h.length}catch(m){s.$sdk_debug_error_capturing_properties=String(m)}if(this.requestRouter.region===WS&&(s.$lib_custom_api_host=this.config.api_host),u=e!==aC||i?e!==uC||i?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(n):this.pageViewManager.doPageView(n,r),s=pC(s,u),e===aC&&__&&(s.title=__.title),!tb(o)){var p=n.getTime()-o;s.$duration=parseFloat((p/1e3).toFixed(3))}S_&&this.config.opt_out_useragent_filter&&(s.$browser_type=this._is_bot()?"bot":"browser"),(s=pC({},l,this.persistence.properties(),this.sessionPersistence.properties(),s)).$is_identified=this._isIdentified(),Q_(this.config.property_denylist)?hC(this.config.property_denylist,function(e){delete s[e]}):eE.error(ux+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var f=this.config.sanitize_properties;f&&(eE.error(ax),s=f(s,e));var g=this.nn();return s.$process_person_profile=g,g&&!i&&this.sn("_calculate_event_properties"),s}tn(e,t,n){var r;if(void 0===t&&(t=!0),void 0===n&&(n=!1),!this.persistence||!this.nn())return e;if(this.Oi&&!n)return e;var i=this.persistence.get_initial_props(),o=null==(r=this.sessionPropsManager)?void 0:r.getSetOnceProps(),s=pC({},i,o||{},e||{}),a=this.config.sanitize_properties;return a&&(eE.error(ax),s=a(s,"$set_once")),t&&(this.Oi=!0),eb(s)?void 0:s}register(e,t){var n;null==(n=this.persistence)||n.register(e,t)}register_once(e,t,n){var r;null==(r=this.persistence)||r.register_once(e,t,n)}register_for_session(e){var t;null==(t=this.sessionPersistence)||t.register(e)}unregister(e){var t;null==(t=this.persistence)||t.unregister(e)}unregister_for_session(e){var t;null==(t=this.sessionPersistence)||t.unregister(e)}an(e,t){this.register({[e]:t})}getFeatureFlag(e,t){var n;return null==(n=this.featureFlags)?void 0:n.getFeatureFlag(e,t)}getFeatureFlagPayload(e){var t;return null==(t=this.featureFlags)?void 0:t.getFeatureFlagPayload(e)}getFeatureFlagResult(e,t){var n;return null==(n=this.featureFlags)?void 0:n.getFeatureFlagResult(e,t)}isFeatureEnabled(e,t){var n;return null==(n=this.featureFlags)?void 0:n.isFeatureEnabled(e,t)}reloadFeatureFlags(){var e;null==(e=this.featureFlags)||e.reloadFeatureFlags()}updateFlags(e,t,n){var r;null==(r=this.featureFlags)||r.updateFlags(e,t,n)}updateEarlyAccessFeatureEnrollment(e,t,n){var r;null==(r=this.featureFlags)||r.updateEarlyAccessFeatureEnrollment(e,t,n)}getEarlyAccessFeatures(e,t,n){var r;return void 0===t&&(t=!1),null==(r=this.featureFlags)?void 0:r.getEarlyAccessFeatures(e,t,n
2)}on(e,t){return this.Li.on(e,t)}onFeatureFlags(e){return this.featureFlags?this.featureFlags.onFeatureFlags(e):(e([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(e){return this.surveys?this.surveys.onSurveysLoaded(e):(e([],{isLoaded:!1,error:sx}),()=>{})}onSessionId(e){var t,n;return null!==(t=null==(n=this.sessionManager)?void 0:n.onSessionId(e))&&void 0!==t?t:()=>{}}getSurveys(e,t){void 0===t&&(t=!1),this.surveys?this.surveys.getSurveys(e,t):e([],{isLoaded:!1,error:sx})}getActiveMatchingSurveys(e,t){void 0===t&&(t=!1),this.surveys?this.surveys.getActiveMatchingSurveys(e,t):e([],{isLoaded:!1,error:sx})}renderSurvey(e,t){var n;null==(n=this.surveys)||n.renderSurvey(e,t)}displaySurvey(e,t){var n;void 0===t&&(t=QS),null==(n=this.surveys)||n.displaySurvey(e,t)}cancelPendingSurvey(e){var t;null==(t=this.surveys)||t.cancelPendingSurvey(e)}canRenderSurvey(e){var t,n;return null!==(t=null==(n=this.surveys)?void 0:n.canRenderSurvey(e))&&void 0!==t?t:{visible:!1,disabledReason:sx}}canRenderSurveyAsync(e,t){var n,r;return void 0===t&&(t=!1),null!==(n=null==(r=this.surveys)?void 0:r.canRenderSurveyAsync(e,t))&&void 0!==n?n:Promise.resolve({visible:!1,disabledReason:sx})}un(e){return!e||rb(e)?(eE.critical("Unique user id has not been set in posthog.identify"),!1):e===YE?(eE.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(e.toLowerCase())&&!["undefined","null"].includes(e.toLowerCase())||(eE.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'),!1)}identify(e,t,n){if(!this.__loaded||!this.persistence)return eE.uninitializedWarning("posthog.identify");if(sb(e)&&(e=e.toString(),eE.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.un(e)&&this.sn("posthog.identify")){var r=this.get_distinct_id();this.register({$user_id:e}),this.get_property(oE)||this.register_once({$had_persisted_distinct_id:!0,$device_id:r},""),e!==r&&e!==this.get_property(sE)&&(this.unregister(sE),this.register({distinct_id:e}));var i,o=(this.persistence.get_property(UE)||nC)===nC;e!==r&&o?(this.persistence.set_property(UE,rC),this.setPersonPropertiesForFlags({$set:t||{},$set_once:n||{}},!1),this.capture(lC,{distinct_id:e,$anon_distinct_id:r},{$set:t||{},$set_once:n||{}}),this.$i=zS(e,t,n),null==(i=this.featureFlags)||i.setAnonymousDistinctId(r)):(t||n)&&this.setPersonProperties(t,n),e!==r&&(this.reloadFeatureFlags(),this.unregister(LE))}}setPersonProperties(e,t){if((e||t)&&this.sn("posthog.setPersonProperties")){var n=zS(this.get_distinct_id(),e,t);this.$i!==n?(this.setPersonPropertiesForFlags({$set:e||{},$set_once:t||{}},!0),this.capture("$set",{$set:e||{},$set_once:t||{}}),this.$i=n):eE.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(e,t,n){if(e&&t){var r=this.getGroups(),i=r[e]!==t;if(i&&this.resetGroupPropertiesForFlags(e),this.register({$groups:P_({},r,{[e]:t})}),i||n){var o={$group_type:e,$group_key:t};n&&(o.$group_set=n),this.capture(cC,o)}n&&this.setGroupPropertiesForFlags({[e]:n}),i&&!n&&this.reloadFeatureFlags()}else eE.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,t){var n;void 0===t&&(t=!0),null==(n=this.featureFlags)||n.setPersonPropertiesForFlags(e,t)}resetPersonPropertiesForFlags(){var e;null==(e=this.featureFlags)||e.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(e,t){var n;void 0===t&&(t=!0),this.sn("posthog.setGroupPropertiesForFlags")&&(null==(n=this.featureFlags)||n.setGroupPropertiesForFlags(e,t))}resetGroupPropertiesForFlags(e){var t;null==(t=this.featureFlags)||t.resetGroupPropertiesForFlags(e)}reset(e){var t,n,r,i,o,s,a,u;if(eE.info("reset"),!this.__loaded)return eE.uninitializedWarning("posthog.reset");var l,c=this.get_property(oE),d=this.get_property(vE);if(this.consent.reset(),null==(t=this.persistence)||t.clear(),null==(n=this.sessionPersistence)||n.clear(),tb(d)||null==(l=this.persistence)||l.register({[vE]:d}),null==(r=this.surveys)||r.reset(),null==(i=this.Yi)||i.stop(),null==(o=this.featureFlags)||o.reset(),null==(s=this.conversations)||s.reset(),null==(a=this.persistence)||a.set_property(UE,nC),null==(u=this.sessionManager)||u.resetSessionId(),this.$i=null,this.config.cookieless_mode===tC)this.register_once({distinct_id:YE,$device_id:null},"");else{var h=this.config.get_device_id(xC());this.register_once({distinct_id:h,$device_id:e?h:c},"")}this.register({$last_posthog_reset:(new Date).toISOString()},1),delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()}setIdentity(e,t){var n;this.config.identity_distinct_id=e,this.config.identity_hash=t,this.alias(e),null==(n=this.conversations)||n.ln()}clearIdentity(){var e;delete this.config.identity_distinct_id,delete this.config.identity_hash,null==(e=this.conversations)||e.hn()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,t;return null!==(e=null==(t=this.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0).sessionId)&&void 0!==e?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var{sessionId:t,sessionStartTimestamp:n}=this.sessionManager.checkAndGetSessionAndWindowId(!0),r=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+t);if(null!=e&&e.withTimestamp&&n){var i,o=null!==(i=e.timestampLookBack)&&void 0!==i?i:10;if(!n)return r;r+="?t="+Math.max(Math.floor(((new Date).getTime()-n)/1e3)-o,0)}return r}alias(e,t){return e===this.get_property(iE)?(eE.critical("Attempting to create alias for existing People user - aborting."),-2):this.sn("posthog.alias")?(tb(t)&&(t=this.get_distinct_id()),e!==t?(this.an(sE,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(eE.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var t=P_({},this.config);if(Z_(e)){var n,r,i,o,s,a,u,l,c,d;pC(this.config,px(e));var h=this.Hi();null==(n=this.persistence)||n.update_config(this.config,t,h),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new vk(P_({},this.config,{persistence:"sessionStorage"}),h);var p=this.Di(this.config.debug);ub(p)&&(this.config.debug=p),ub(this.config.debug)&&(this.config.debug?(A_.DEBUG=!0,OC.R()&&OC.N("ph_debug",!0),eE.info("set_config",{config:e,oldConfig:t,newConfig:P_({},this.config)})):(A_.DEBUG=!1,OC.R()&&OC.q("ph_debug"))),null==(r=this.exceptionObserver)||r.onConfigChange(),null==(i=this.exceptions)||i.onConfigChange(),null==(o=this.sessionRecording)||o.startIfEnabledOrStop(),null==(s=this.autocapture)||s.startIfEnabled(),null==(a=this.heatmaps)||a.startIfEnabled(),null==(u=this.exceptionObserver)||u.startIfEnabledOrStop(),null==(l=this.deadClicksAutocapture)||l.startIfEnabledOrStop(),null==(c=this.surveys)||c.loadIfEnabled(),this.cn(),null==(d=this.externalIntegrations)||d.startIfEnabledOrStop()}}_overrideSDKInfo(e,t){A_.LIB_NAME=e,A_.LIB_VERSION=t}startSessionRecording(e){var t,n,r,i,o,s=!0===e,a={sampling:s||!(null==e||!e.sampling),linked_flag:s||!(null==e||!e.linked_flag),url_trigger:s||!(null==e||!e.url_trigger),event_trigger:s||!(null==e||!e.event_trigger)};Object.values(a).some(Boolean)&&(null==(t=this.sessionManager)||t.checkAndGetSessionAndWindowId(),a.sampling&&(null==(n=this.sessionRecording)||n.overrideSampling()),a.linked_flag&&(null==(r=this.sessionRecording)||r.overrideLinkedFlag()),a.url_trigger&&(null==(i=this.sessionRecording)||i.overrideTrigger("url")),a.event_trigger&&(null==(o=this.sessionRecording)||o.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!(null==(e=this.sessionRecording)||!e.started)}captureException(e,t){if(this.exceptions){var n=new Error("PostHog syntheticException"),r=this.exceptions.buildProperties(e,{handled:!0,syntheticException:n});return this.exceptions.sendExceptionEvent(P_({},r,t))}}addExceptionStep(e,t){var n;null==(n=this.exceptions)||n.addExceptionStep(e,t)}captureLog(e){var t;null==(t=this.logs)||t.captureLog(e)}get logger(){var e,t;return null!==(e=null==(t=this.logs)?void 0:t.logger)&&void 0!==e?e:gx.dn}startExceptionAutocapture(e){this.set_config({capture_exceptions:null==e||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(e){var t,n;return null!==(t=null==(n=this.toolbar)?void 0:n.loadToolbar(e))&&void 0!==t&&t}get_property(e){var t;return null==(t=this.persistence)?void 0:t.props[e]}getSessionProperty(e){var t;return null==(t=this.sessionPersistence)?void 0:t.props[e]}toString(){var e,t=null!==(e=this.config.name)&&void 0!==e?e:lx;return t!==lx&&(t=lx+"."+t),t}_isIdentified(){var e,t;return(null==(e=this.persistence)?void 0:e.get_property(UE))===rC||(null==(t=this.sessionPersistence)?void 0:t.get_property(UE))===rC}nn(){var e,t;return!("never"===this.config.person_profiles||this.config.person_profiles===iC&&!this._isIdentified()&&eb(this.getGroups())&&(null==(e=this.persistence)||null==(e=e.props)||!e[sE])&&(null==(t=this.persistence)||null==(t=t.props)||!t[GE]))}Xi(){return!0===this.config.capture_pageleave||"if_capture_pageview"===this.config.capture_pageleave&&(!0===this.config.capture_pageview||"history_change"===this.config.capture_pageview)}createPersonProfile(){this.nn()||this.sn("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.sn("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}sn(e){return"never"===this.config.person_profiles?(eE.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.an(GE,!0),!0)}Hi(){if("always"===this.config.cookieless_mode)return!0;var e=this.consent.isOptedOut();return this.config.disable_persistence||e&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==eC)}cn(){var e,t,n,r,i=this.Hi();return(null==(e=this.persistence)?void 0:e._r)!==i&&(null==(n=this.persistence)||n.set_disabled(i)),(null==(t=this.sessionPersistence)?void 0:t._r)!==i&&(null==(r=this.sessionPersistence)||r.set_disabled(i)),i}opt_in_capturing(e){var t;if(this.config.cookieless_mode!==tC){if(this.Ri()){var n,r,i,o,s;this.reset(!0),null==(n=this.sessionManager)||n.destroy(),null==(r=this.pageViewM
2anager)||r.destroy(),this.sessionManager=new LS(this),this.pageViewManager=new KC(this),this.persistence&&(this.sessionPropsManager=new NS(this,this.sessionManager,this.persistence));var a,u=null!==(i=null==(o=this.config.__extensionClasses)?void 0:o.sessionRecording)&&void 0!==i?i:null==(s=gx.__defaultExtensionClasses)?void 0:s.sessionRecording;u&&(this.sessionRecording=this.Mi(this.sessionRecording,new u(this)),this.Qi&&(null==(a=this.sessionRecording)||null==a.onRemoteConfig||a.onRemoteConfig(this.Qi)))}var l,c;this.consent.optInOut(!0),this.cn(),this.Ji(),null==(t=this.sessionRecording)||t.startIfEnabledOrStop(),this.config.cookieless_mode==eC&&(null==(l=this.surveys)||l.loadIfEnabled()),(tb(null==e?void 0:e.captureEventName)||null!=e&&e.captureEventName)&&this.capture(null!==(c=null==e?void 0:e.captureEventName)&&void 0!==c?c:"$opt_in",null==e?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Ki()}else eE.warn(ox)}opt_out_capturing(){var e,t,n;this.config.cookieless_mode!==tC?(this.config.cookieless_mode===eC&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.cn(),this.config.cookieless_mode===eC&&(this.register({distinct_id:YE,$device_id:null}),null==(e=this.sessionRecording)||e.stopRecording(),this.sessionRecording=void 0,null==(t=this.sessionManager)||t.destroy(),null==(n=this.pageViewManager)||n.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.Ki(),this.Ji())):eE.warn(ox)}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var e=this.consent.consent;return 1===e?"granted":0===e?"denied":"pending"}is_capturing(){return this.config.cookieless_mode===tC||(this.config.cookieless_mode===eC?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.cn()}_is_bot(){return D_?MS(D_,this.config.custom_blocked_useragents):void 0}Ki(){__&&("visible"===__.visibilityState?this.Fi||(this.Fi=!0,this.capture(aC,{title:__.title},{send_instantly:!0}),this.Ai&&(__.removeEventListener(oC,this.Ai),this.Ai=null)):this.Ai||(this.Ai=this.Ki.bind(this),_C(__,oC,this.Ai)))}debug(e){!1===e?(null==v_||v_.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(null==v_||v_.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}Lr(){var e,t,n,r,i,o,s=this.qi||{};return"advanced_disable_flags"in s?!!s.advanced_disable_flags:!1!==this.config.advanced_disable_flags?!!this.config.advanced_disable_flags:!0===this.config.advanced_disable_decide?(eE.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(n="advanced_disable_decide",r=eE,i=(t="advanced_disable_flags")in(e=s)&&!ob
vendor: 9,626 bytes, line 2
2(e[t]),o=n in e&&!ob(e[n]),i?e[t]:!!o&&(r&&r.warn("Config field '"+n+"' is deprecated. Please use '"+t+"' instead. The old field will be removed in a future major version."),e[n]))}rn(e){if(ob(this.config.before_send))return e;var t=Q_(this.config.before_send)?this.config.before_send:[this.config.before_send],n=e;for(var r of t){if(n=r(n),ob(n)){var i="Event '"+e.event+"' was rejected in beforeSend function";return lb(e.event)?eE.warn(i+". This can cause unexpected behavior."):eE.info(i),null}n.properties&&!eb(n.properties)||eE.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return n}getPageViewId(){var e;return null==(e=this.pageViewManager.dr)?void 0:e.pageViewId}captureTraceFeedback(e,t){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:t})}captureTraceMetric(e,t,n){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:t,$ai_metric_value:String(n)})}Di(e){var t=ub(e)&&!e,n=OC.R()&&"true"===OC.A("ph_debug");return!t&&(!!n||e)}}gx.__defaultExtensionClasses={},gx.dn={trace:tx=()=>{},debug:tx,info:tx,warn:tx,error:tx,fatal:tx},function(e,t){for(var n=0;t.length>n;n++)e.prototype[t[n]]=mC(e.prototype[t[n]])}(gx,["identify"]);function mx(e){return e instanceof Element&&(e.id===KE||!(null==e.closest||!e.closest(".toolbar-global-fade-container")))}function vx(e){return!!e&&1===e.nodeType}function yx(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function Dx(e){return!!e&&3===e.nodeType}function _x(e){return!!e&&11===e.nodeType&&vx(e.host)}function bx(e){return e?V_(e).split(/\s+/):[]}function wx(e){var t=null==v_?void 0:v_.location.href;return!!(t&&e&&e.some(e=>t.match(e)))}function Ex(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return bx(t)}function Cx(e){return ob(e)?null:V_(e).split(/(\s+)/).filter(e=>Hx(e)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function kx(e){var t="";return Nx(e)&&!Rx(e)&&e.childNodes&&e.childNodes.length&&hC(e.childNodes,function(e){var n;Dx(e)&&e.textContent&&(t+=null!==(n=Cx(e.textContent))&&void 0!==n?n:"")}),V_(t)}function Sx(e){return tb(e.target)?e.srcElement||null:null!=(t=e.target)&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}var xx=["a","button","form","input","select","textarea","label"];function Fx(e,t){if(tb(t))return!0;var n,r=function(e){if(t.some(t=>e.matches(t)))return{v:!0}};for(var i of e)if(n=r(i))return n.v;return!1}function Ax(e){var t=e.parentNode;return!(!t||!vx(t))&&t}var Tx=["next","previous","prev",">","<"],Ix=[".ph-no-rageclick",".ph-no-capture"],Px=e=>!e||yx(e,"html")||!vx(e),Ox=(e,t)=>{if(!v_||Px(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,r=[e],i=e;i.parentNode&&!yx(i,"body");)if(_x(i.parentNode))r.push(i.parentNode.host),i=i.parentNode.host;else{var o=Ax(i);if(!o)break;if(t||xx.indexOf(o.tagName.toLowerCase())>-1)n=!0;else{var s=v_.getComputedStyle(o);s&&"pointer"===s.getPropertyValue("cursor")&&(n=!0)}r.push(o),i=o}return{parentIsUsefulElement:n,targetElementList:r}};function Nx(e){for(var t=e;t.parentNode&&!yx(t,"body");t=t.parentNode){var n=Ex(t);if($_(n,"ph-sensitive")||$_(n,"ph-no-capture"))return!1}if($_(Ex(e),"ph-include"))return!0;var r=e.type||"";if(nb(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var i=e.name||e.id||"";return!nb(i)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,""))}function Rx(e){return!!(yx(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||yx(e,"select")||yx(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var Bx="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",Lx=new RegExp("^(?:"+Bx+")$"),Mx=new RegExp(Bx),jx="\\d{3}-?\\d{2}-?\\d{4}",zx=new RegExp("^("+jx+")$"),Ux=new RegExp("("+jx+")");function Hx(e,t){if(void 0===t&&(t=!0),ob(e))return!1;if(nb(e)){if(e=V_(e),(t?Lx:Mx).test((e||"").replace(/[- ]/g,"")))return!1;if((t?zx:Ux).test(e))return!1}return!0}function qx(e){var t=kx(e);return Hx(t=(t+" "+Wx(e)).trim())?t:""}function Wx(e){var t="";return e&&e.childNodes&&e.childNodes.length&&hC(e.childNodes,function(e){var n;if(e&&"span"===(null==(n=e.tagName)?void 0:n.toLowerCase()))try{var r=kx(e);t=(t+" "+r).trim(),e.childNodes&&e.childNodes.length&&(t=(t+" "+Wx(e)).trim())}catch(e){eE.error("[AutoCapture]",e)}}),t}function $x(e){return e.replace(/"|\\"/g,'\\"')}function Vx(e){var t=e.attr__class;return t?Q_(t)?t:bx(t):void 0}class Gx{constructor(e){this.disabled=!1===e;var t=Z_(e)?e:{};this.thresholdPx=t.threshold_px||30,this.timeoutMs=t.timeout_ms||1e3,this.clickCount=t.click_count||3,this.clicks=[]}isRageClick(e,t,n){if(this.disabled)return!1;var r=this.clicks[this.clicks.length-1];if(r&&Math.abs(e-r.x)+Math.abs(t-r.y)<this.thresholdPx&&this.timeoutMs>n-r.timestamp){if(this.clicks.push({x:e,y:t,timestamp:n}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:t,timestamp:n}];return!1}}var Kx="$copy_autocapture",Yx=tE("[AutoCapture]");function Jx(e,t){return t.length>e?t.slice(0,e)+"...":t}function Qx(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do{t=t.previousSibling}while(t&&!vx(t));return t}var Xx=tE("[ExceptionAutocapture]");function Zx(e,t,n){try{if(!(t in e))return()=>{};var r=e[t],i=n(r);return X_(i)&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=i,()=>{e[t]=r}}catch(e){return()=>{}}}var eF=tE("[TracingHeaders]"),tF=tE("[Web Vitals]"),nF=9e5,rF="disabled",iF="lazy_loading",oF="awaiting_config",sF="missing_config";tE("[SessionRecording]"),tE("[SessionRecording]");var aF="[SessionRecording]",uF=tE(aF),lF=tE("[Heatmaps]");function cF(e){return Z_(e)&&"clientX"in e&&"clientY"in e&&sb(e.clientX)&&sb(e.clientY)}var dF=tE("[Product Tours]"),hF=["$set_once","$set"],pF=tE("[SiteApps]"),fF="Error while initializing PostHog app with config id ";function gF(e,t,n){if(ob(e))return!1;switch(n){case"exact":return e===t;case"contains":var r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(r,"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch(e){return!1}default:return!1}}class mF{constructor(e){this.vn=new RS,this.fn=(e,t)=>this.pn(e,t)&&this.gn(e,t)&&this.mn(e,t)&&this.yn(e,t),this.pn=(e,t)=>null==t||!t.event||(null==e?void 0:e.event)===(null==t?void 0:t.event),this._instance=e,this.bn=new Set,this._n=new Set}init(){var e,t;tb(null==(e=this._instance)?void 0:e._addCaptureHook)||null==(t=this._instance)||t._addCaptureHook((e,t)=>{this.on(e,t)})}register(e){var t,n;if(!tb(null==(t=this._instance)?void 0:t._addCaptureHook)&&(e.forEach(e=>{var t,n;null==(t=this._n)||t.add(e),null==(n=e.steps)||n.forEach(e=>{var t;null==(t=this.bn)||t.add((null==e?void 0:e.event)||"")})}),null!=(n=this._instance)&&n.autocapture)){var r,i=new Set;e.forEach(e=>{var t;null==(t=e.steps)||t.forEach(e=>{null!=e&&e.selector&&i.add(null==e?void 0:e.selector)})}),null==(r=this._instance)||r.autocapture.setElementSelectors(i)}}on(e,t){var n;null!=t&&0!=e.length&&(this.bn.has(e)||this.bn.has(null==t?void 0:t.event))&&this._n&&(null==(n=this._n)?void 0:n.size)>0&&this._n.forEach(e=>{this.wn(t,e)&&this.vn.emit("actionCaptured",e.name)})}xn(e){this.onAction("actionCaptured",t=>e(t))}wn(e,t){if(null==(null==t?void 0:t.steps))return!1;for(var n of t.steps)if(this.fn(e,n))return!0;return!1}onAction(e,t){return this.vn.on(e,t)}gn(e,t){if(null!=t&&t.url){var n,r=null==e||null==(n=e.properties)?void 0:n.$current_url;if(!r||"string"!=typeof r)return!1;if(!gF(r,t.url,t.url_matching||"contains"))return!1}return!0}mn(e,t){return!!this.Sn(e,t)&&!!this.kn(e,t)&&!!this.Cn(e,t)}Sn(e,t){var n;if(null==t||!t.href)return!0;var r=this.In(e);if(r.length>0)return r.some(e=>gF(e.href,t.href,t.href_matching||"exact"));var i,o=(null==e||null==(n=e.properties)?void 0:n.$elements_chain)||"";return!!o&&gF((i=o.match(/(?::|")href="(.*?)"/))?i[1]:"",t.href,t.href_matching||"exact")}kn(e,t){var n;if(null==t||!t.text)return!0;var r=this.In(e);if(r.length>0)return r.some(e=>gF(e.text,t.text,t.text_matching||"exact")||gF(e.$el_text,t.text,t.text_matching||"exact"));var i,o,s,a=(null==e||null==(n=e.properties)?void 0:n.$elements_chain)||"";return!!a&&(i=function(e){for(var t,n=[],r=/(?::|")text="(.*?)"/g;!ob(t=r.exec(e));)n.includes(t[1])||n.push(t[1]);return n}(a),o=t.text,s=t.text_matching||"exact",i.some(e=>gF(e,o,s)))}Cn(e,t){var n,r;if(null==t||!t.selector)return!0;var i=null==e||null==(n=e.properties)?void 0:n.$element_selectors;if(null!=i&&i.includes(t.selector))return!0;var o=(null==e||null==(r=e.properties)?void 0:r.$elements_chain)||"";if(t.selector_regex&&o)try{return new RegExp(t.selector_regex).test(o)}catch(e){return!1}return!1}In(e){var t;return null==(null==e||null==(t=e.properties)?void 0:t.$elements)?[]:null==e?void 0:e.properties.$elements}yn(e,t){return null==t||!t.properties||0===t.properties.length||qS(t.properties.reduce((e,t)=>{var n=Q_(t.value)?t.value.map(String):null!=t.value?[String(t.value)]:[];return e[t.key]={values:n,operator:t.operator||"exact"},e},{}),null==e?void 0:e.properties)}}class vF{constructor(e){this._instance=e,this.Tn=new Map,this.En=new Map,this.Mn=new Map}Pn(e,t){return!!e&&qS(e.propertyFilters,null==t?void 0:t.properties)}Rn(e,t){var n=new Map;
2return e.forEach(e=>{var r;null==(r=e.conditions)||null==(r=r[t])||null==(r=r.values)||r.forEach(t=>{if(null!=t&&t.name){var r=n.get(t.name)||[];r.push(e.id),n.set(t.name,r)}})}),n}On(e,t,n){var r=(n===yk?this.Tn:this.En).get(e),i=[];return this.Ln(e=>{i=e.filter(e=>null==r?void 0:r.includes(e.id))}),i.filter(r=>{var i,o=null==(i=r.conditions)||null==(i=i[n])||null==(i=i.values)?void 0:i.find(t=>t.name===e);return this.Pn(o,t)})}register(e){var t;tb(null==(t=this._instance)?void 0:t._addCaptureHook)||(this.Fn(e),this.An(e))}An(e){var t=e.filter(e=>{var t,n;return(null==(t=e.conditions)?void 0:t.actions)&&(null==(n=e.conditions)||null==(n=n.actions)||null==(n=n.values)?void 0:n.length)>0});0!==t.length&&(null==this.Nn&&(this.Nn=new mF(this._instance),this.Nn.init(),this.Nn.xn(e=>{this.onAction(e)})),t.forEach(e=>{var t,n,r,i,o;e.conditions&&null!=(t=e.conditions)&&t.actions&&null!=(n=e.conditions)&&null!=(n=n.actions)&&n.values&&(null==(r=e.conditions)||null==(r=r.actions)||null==(r=r.values)?void 0:r.length)>0&&(null==(i=this.Nn)||i.register(e.conditions.actions.values),null==(o=e.conditions)||null==(o=o.actions)||null==(o=o.values)||o.forEach(t=>{if(t&&t.name){var n=this.Mn.get(t.name);n&&n.push(e.id),this.Mn.set(t.name,n||[e.id])}}))}))}Fn(e){var t,n=e.filter(e=>{var t,n;return(null==(t=e.conditions)?void 0:t.events)&&(null==(n=e.conditions)||null==(n=n.events)||null==(n=n.values)?void 0:n.length)>0}),r=e.filter(e=>{var t,n;return(null==(t=e.conditions)?void 0:t.cancelEvents)&&(null==(n=e.conditions)||null==(n=n.cancelEvents)||null==(n=n.values)?void 0:n.length)>0});0===n.length&&0===r.length||(null==(t=this._instance)||t._addCaptureHook((e,t)=>{this.onEvent(e,t)}),this.Tn=this.Rn(e,yk),this.En=this.Rn(e,Dk))}onEvent(e,t){var n,r=this.le(),i=this.$n(),o=this.Dn(),s=(null==(n=this._instance)||null==(n=n.persistence)?void 0:n.props[i])||[];if(o===e&&t&&s.length>0){var a,u;r.info("event matched, removing item from activated items",{event:e,eventPayload:t,existingActivatedItems:s});var l=(null==t||null==(a=t.properties)?void 0:a.$survey_id)||(null==t||null==(u=t.properties)?void 0:u.$product_tour_id);if(l){var c=s.indexOf(l);0>c||(s.splice(c,1),this.qn(s))}}else{if(this.En.has(e)){var d=this.On(e,t,Dk);d.length>0&&(r.info("cancel event matched, cancelling items",{event:e,itemsToCancel:d.map(e=>e.id)}),d.forEach(e=>{var t=s.indexOf(e.id);0>t||s.splice(t,1),this.jn(e.id)}),this.qn(s))}if(this.Tn.has(e)){r.info("event name matched",{event:e,eventPayload:t,items:this.Tn.get(e)});var h=this.On(e,t,yk);this.qn(s.concat(h.map(e=>e.id)||[]))}}}onAction(e){var t,n=this.$n(),r=(null==(t=this._instance)||null==(t=t.persistence)?void 0:t.props[n])||[];this.Mn.has(e)&&this.qn(r.concat(this.Mn.get(e)||[]))}qn(e){var t=this.le(),n=[...new Set(e)].filter(e=>!this.Hn(e));t.info("updating activated items",{activatedItems:n}),this.Un(n)}getActivatedIds(){var e,t=this.$n();return(null==(e=this._instance)||null==(e=e.persistence)?void 0:e.props[t])||[]}getEventToItemsMap(){return this.Tn}Bn(){return this.Nn}}class yF extends vF{constructor(e){super(e)}$n(){return RE}Dn(){return Ek}Ln(e){var t;null==(t=this._instance)||t.getSurveys(e)}jn(e){var t;null==(t=this._instance)||t.cancelPendingSurvey(e)}le(){return KS}Un(e){var t;null==(t=this._instance)||null==(t=t.persistence)||t.register({[RE]:e})}Hn(){return!1}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var DF="SDK is not enabled or survey functionality is not yet loaded",_F="Disabled. Not loading surveys.",bF=null!=v_&&v_.location?ek(v_.location.hash,"__posthog")||ek(location.hash,"state"):null,wF="_postHogToolbarParams",EF=tE("[Toolbar]"),CF=tE("[FeatureFlags]"),kF=tE("[FeatureFlags]",{debugEnabled:!0}),SF="\" failed. Feature flags didn't load in time.",xF=e=>{for(var t={},n=0;e.length>n;n++)t[e[n]]=!0;return t},FF=e=>{var t={};for(var[n,r]of fC(e||{}))r&&(t[n]=r);return t},AF=tE("[Error tracking]"),TF="Refusing to render web experiment since the viewer is a likely bot",IF={icontains:(e,t)=>!!v_&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!v_&&-1===t.href.toLowerCase().indexOf(e.toLowerCase()),regex:(e,t)=>!!v_&&jS(t.href,e),not_regex:(e,t)=>!!v_&&!jS(t.href,e),exact:(e,t)=>
2t.href===e,is_not:(e,t)=>t.href!==e};class PF{get qt(){return this._instance.config}constructor(e){var t=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getWebExperiments(e=>{PF.zn("retrieved web experiments from the server"),t.Vn=new Map,e.forEach(e=>{if(e.feature_flag_key){var n;t.Vn&&(PF.zn("setting flag key ",e.feature_flag_key," to web experiment ",e),null==(n=t.Vn)||n.set(e.feature_flag_key,e));var r=t._instance.getFeatureFlag(e.feature_flag_key);nb(r)&&e.variants[r]&&t.Wn(e.name,r,e.variants[r].transforms)}else if(e.variants)for(var i in e.variants){var o=e.variants[i];PF.Zn(o)&&t.Wn(e.name,i,o.transforms)}})},e)},this._instance=e,this._instance.onFeatureFlags(e=>{this.onFeatureFlags(e)})}initialize(){}onFeatureFlags(e){if(this._is_bot())PF.zn(TF);else if(!this.qt.disable_web_experiments){if(ob(this.Vn))return this.Vn=new Map,this.loadIfEnabled(),void this.previewWebExperiment();PF.zn("applying feature flags",e),e.forEach(e=>{var t;if(this.Vn&&null!=(t=this.Vn)&&t.has(e)){var n,r=this._instance.getFeatureFlag(e),i=null==(n=this.Vn)?void 0:n.get(e);r&&null!=i&&i.variants[r]&&this.Wn(i.name,r,i.variants[r].transforms)}})}}previewWebExperiment(){var e=PF.getWindowLocation();if(null!=e&&e.search){var t=XC(null==e?void 0:e.search,"__experiment_id"),n=XC(null==e?void 0:e.search,"__experiment_variant");t&&n&&(PF.zn("previewing web experiments "+t+" && "+n),this.getWebExperiments(e=>{this.Gn(parseInt(t),n,e)},!1,!0))}}loadIfEnabled(){this.qt.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,t,n){if(this.qt.disable_web_experiments&&!n)return e([]);var r=this._instance.get_property("$web_experiments");if(r&&!t)return e(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.qt.token),method:"GET",callback:t=>e(200===t.statusCode&&t.json&&t.json.experiments||[])})}Gn(e,t,n){var r=n.filter(t=>t.id===e);r&&r.length>0&&(PF.zn("Previewing web experiment ["+r[0].name+"] with variant ["+t+"]"),this.Wn(r[0].name,t,r[0].variants[t].transforms))}static Zn(e){return!ob(e.conditions)&&PF.Qn(e)&&PF.Jn(e)}static Qn(e){var t;if(ob(e.conditions)||ob(null==(t=e.conditions)?void 0:t.url))return!0;var n,r,i,o=PF.getWindowLocation();return!!o&&(null==(n=e.conditions)||!n.url||IF[null!==(r=null==(i=e.conditions)?void 0:i.urlMatchType)&&void 0!==r?r:"icontains"](e.conditions.url,o))}
2static getWindowLocation(){return null==v_?void 0:v_.location}static Jn(e){var t;if(ob(e.conditions)||ob(null==(t=e.conditions)?void 0:t.utm))return!0;var n=sk();if(n.utm_source){var r,i,o,s,a,u,l,c,d=null==(r=e.conditions)||null==(r=r.utm)||!r.utm_campaign||(null==(i=e.conditions)||null==(i=i.utm)?void 0:i.utm_campaign)==n.utm_campaign,h=null==(o=e.conditions)||null==(o=o.utm)||!o.utm_source||(null==(s=e.conditions)||null==(s=s.utm)?void 0:s.utm_source)==n.utm_source,p=null==(a=e.conditions)||null==(a=a.utm)||!a.utm_medium||(null==(u=e.conditions)||null==(u=u.utm)?void 0:u.utm_medium)==n.utm_medium,f=null==(l=e.conditions)||null==(l=l.utm)||!l.utm_term||(null==(c=e.conditions)||null==(c=c.utm)?void 0:c.utm_term)==n.utm_term;return d&&p&&f&&h}return!1}static zn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];eE.info("[WebExperiments] "+e,n)}Wn(e,t,n){this._is_bot()?PF.zn(TF):"control"!==t?n.forEach(n=>{if(n.selector){var r;PF.zn("applying transform of variant "+t+" for experiment "+e+" ",n);var i=null==(r=document)?void 0:r.querySelectorAll(n.selector);null==i||i.forEach(e=>{var t=e;n.html&&(t.innerHTML=n.html),n.css&&t.setAttribute("style",n.css)})}}):PF.zn("Control variants leave the page unmodified.")}_is_bot(){return D_&&this._instance?MS(D_,this.qt.custom_blocked_useragents):void 0}}var OF=tE("[Conversations]"),NF="Conversations not available yet.",RF={featureFlags:class{constructor(e){this.Kn=!1,this.Yn=!1,this.Xn=!1,this.es=!1,this.ts=!1,this.rs=!1,this.ns=!1,this.ss=!1,this._instance=e,this.featureFlagEventHandlers=[]}get qt(){return this._instance.config}get ni(){return this._instance.persistence}os(e){return this._instance.get_property(e)}us(){var e,t;return null!==(e=null==(t=this.ni)?void 0:t.wr(this.qt.feature_flag_cache_ttl_ms))&&void 0!==e&&e}ls(){return!!this.us()&&(this.ss||this.Xn||(this.ss=!0,CF.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}hs(){var e,t=null!==(e=this.qt.evaluation_contexts)&&void 0!==e?e:this.qt.evaluation_environments;return!this.qt.evaluation_environments||this.qt.evaluation_contexts||this.ns||(CF.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.ns=!0),null!=t&&t.length?t.filter(e=>{var t=e&&"string"==typeof e&&e.trim().length>0;return t||CF.error("Invalid evaluation context found:",e,"Expected non-empty string"),t}):[]}cs(){return this.hs().length>0}ds(){var e=this.qt.flag_keys;if(!tb(e)){if(Q_(e))return e.filter(e=>{var t=e&&"string"==typeof e&&e.trim().length>0;return t||CF.error("Invalid flag key found:",e,"Expected non-empty string"),t});CF.error("Invalid flag_keys found:",e,"Expected array of non-empty strings")}}initialize(){var e,t,{config:n}=this._instance,r=null!==(e=null==(t=n.bootstrap)?void 0:t.featureFlags)&&void 0!==e?e:{};if(Object.keys(r).length){var i,o,s=null!==(i=null==(o=n.bootstrap)?void 0:o.featureFlagPayloads)&&void 0!==i?i:{},a=Object.keys(r).filter(e=>!!r[e]).reduce((e,t)=>(e[t]=r[t]||!1,e),{}),u=Object.keys(s).filter(e=>a[e]).reduce((e,t)=>(s[t]&&(e[t]=s[t]),e),{});this.receivedFeatureFlags({featureFlags:a,featureFlagPayloads:u})}}updateFlags(e,t,n){var r=null!=n&&n.merge?this.getFlagVariants():{},i=null!=n&&n.merge?this.getFlagPayloads():{},o=P_({},r,e),s=P_({},i,t),a={};for(var[u,l]of Object.entries(o)){var c="string"==typeof l;a[u]={key:u,enabled:!!c||Boolean(l),variant:c?l:void 0,reason:void 0,metadata:tb(null==s?void 0:s[u])?void 0:{id:0,version:void 0,description:void 0,payload:s[u]}}}this.receivedFeatureFlags({flags:a})}get hasLoadedFlags(){return this.Yn}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this.os(xE),t=this.os(TE),n=this.os(IE);if(!n&&!t)return e||{};var r=pC({},e||{}),i=[...new Set([...Object.keys(n||{}),...Object.keys(t||{})])];for(var o of i){var s,a,u=r[o],l=null==t?void 0:t[o],c=tb(l)?null!==(s=null==u?void 0:u.enabled)&&void 0!==s&&s:!!l,d=tb(l)?u.variant:"string"==typeof l?l:void 0,h=null==n?void 0:n[o],p=P_({},u,{enabled:c,variant:c?null!=d?d:null==u?void 0:u.variant:void 0});c!==(null==u?void 0:u.enabled)&&(p.original_enabled=null==u?void 0:u.enabled),d!==(null==u?void 0:u.variant)&&(p.original_variant=null==u?void 0:u.variant),h&&(p.metadata=P_({},null==u?void 0:u.metadata,{payload:h,original_payload:null==u||null==(a=u.metadata)?void 0:a.payload})),r[o]=p}return this.Kn||(CF.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:n,finalDetails:r}),this.Kn=!0),r}getFlagVariants(){var e=this.os(CE),t=this.os(TE);if(!t)return e||{};for(var n=pC({},e),r=Object.keys(t),i=0;r.length>i;i++)n[r[i]]=t[r[i]];return this.Kn||(CF.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:n}),this.Kn=!0),n}getFlagPayloads(){var e=this.os(FE),t=this.os(IE);if(!t)return e||{};for(var n=pC({},e||{}),r=Object.keys(t),i=0;r.length>i;i++)n[r[i]]=t[r[i]];return this.Kn||(CF.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:n}),this.Kn=!0),n}reloadFeatureFlags(){this.es||this.qt.advanced_disable_feature_flags||this.vs||(this._instance.Li.emit("featureFlagsReloading",!0),this.vs=setTimeout(()=>{this.fs()},5))}ps(){clearTimeout(this.vs),this.vs=void 0}ensureFlagsLoaded(){this.Yn||this.Xn||this.vs||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.es=e}fs(e){var t;if(this.ps(),!this._instance.Lr())if(this.Xn)this.ts=!0;else{var n=this.qt.token,r=this.os(oE),i={token:n,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:P_({},(null==(t=this.ni)?void 0:t.get_initial_props())||{},this.os(PE)||{}),group_properties:this.os(OE),timezone:fk()};ib(r)||tb(r)||(i.$device_id=r),(null!=e&&e.disableFlags||this.qt.advanced_disable_feature_flags)&&(i.disable_flags=!0),this.cs()&&(i.evaluation_contexts=this.hs());var o=this.ds();tb(o)||(i.flag_keys=o);var s=!!this.qt.advanced_only_evaluate_survey_feature_flags,a=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+(this.qt.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":""));this.Xn=!0,this._instance._send_request({method:"POST",url:a,data:i,compression:this.qt.disable_compression?void 0:jk,timeout:this.qt.feature_flag_request_timeout_ms,callback:e=>{var t,n,r,o=!0;if(200===e.statusCode&&(this.ts||(this.$anon_distinct_id=void 0),o=!1),this.Xn=!1,!i.disable_flags||this.ts){this.rs=!o;var a=[];e.error?e.error instanceof Error?a.push("AbortError"===e.error.name?"timeout":"connection_error"):a.push("unknown_error"):200!==e.statusCode&&a.push("api_error_"+e.statusCode),null!=(t=e.json)&&t.errorsWhileComputingFlags&&a.push("errors_while_computing_flags");var u,l=!(null==(n=e.json)||null==(n=n.quotaLimited)||!n.includes("feature_flags"));l&&a.push("quota_limited"),null==(r=this.ni)||r.register({[jE]:a}),l?CF.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more."):(i.disable_flags||this.receivedFeatureFlags(null!==(u=e.json)&&void 0!==u?u:{},o,{partialResponse:s}),this.ts&&(this.ts=!1,this.fs()))}}})}}getFeatureFlag(e,t){var n;if(void 0===t&&(t={}),!t.fresh||this.rs)if(this.Yn||this.getFlags()&&this.getFlags().length>0){if(!this.ls()){var r=this.getFeatureFlagResult(e,t);return null!==(n=null==r?void 0:r.variant)&&void 0!==n?n:null==r?void 0:r.enabled}}else CF.warn('getFeatureFlag for key "'+e+SF)}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){var t=this.getFeatureFlagResult(e,{send_event:!1});return null==t?void 0:t.payload}getFeatureFlagResult(e,t){if(void 0===t&&(t={}),!t.fresh||this.rs)if(this.Yn||this.getFlags()&&this.getFlags().length>0){if(!this.ls()){var n=this.getFlagVariants(),r=e in n,i=n[e],o=this.getFlagPayloads()[e],s=String(i),a=this.os(AE)||void 0,u=this.os(zE)||void 0,l=this.os(LE)||{};if(this.qt.advanced_feature_flags_dedup_per_session){var c,d=this._instance.get_session_id(),h=this.os(ME);d&&d!==h&&(l={},null==(c=this.ni)||c.register({[LE]:l,[ME]:d}))}if((t.send_event||!("send_event"in t))&&(!(e in l)||!l[e].includes(s))){var p,f,g,m,v,y,D,_,b,w;Q_(l[e])?l[e].push(s):l[e]=[s],null==(p=this.ni)||p.register({[LE]:l});var E=this.getFeatureFlagDetails(e),C=[...null!==(f=this.os(jE))&&void 0!==f?f:[]];tb(i)&&C.push("flag_missing");var k={$feature_flag:e,$feature_flag_response:i,$feature_flag_payload:o||null,$feature_flag_request_id:a,$feature_flag_evaluated_at:u,$feature_flag_bootstrapped_response:(null==(g=this.qt.bootstrap)||null==(g=g.featureFlags)?void 0:g[e])||null,$feature_flag_bootstrapped_payload:(null==(m=this.qt.bootstrap)||null==(m
2=m.featureFlagPayloads)?void 0:m[e])||null,$used_bootstrap_value:!this.rs};tb(null==E||null==(v=E.metadata)?void 0:v.version)||(k.$feature_flag_version=E.metadata.version);var S,x=null!==(y=null==E||null==(D=E.reason)?void 0:D.description)&&void 0!==y?y:null==E||null==(_=E.reason)?void 0:_.code;x&&(k.$feature_flag_reason=x),null!=E&&null!=(b=E.metadata)&&b.id&&(k.$feature_flag_id=E.metadata.id),tb(null==E?void 0:E.original_variant)&&tb(null==E?void 0:E.original_enabled)||(k.$feature_flag_original_response=tb(E.original_variant)?E.original_enabled:E.original_variant),null!=E&&null!=(w=E.metadata)&&w.original_payload&&(k.$feature_flag_original_payload=null==E||null==(S=E.metadata)?void 0:S.original_payload),C.length&&(k.$feature_flag_error=C.join(",")),this._instance.capture("$feature_flag_called",k)}if(r){var F=o;if(!tb(o))try{F=JSON.parse(o)}catch(e){}return{key:e,enabled:!!i,variant:"string"==typeof i?i:void 0,payload:F}}}}else CF.warn('getFeatureFlagResult for key "'+e+SF)}getRemoteConfigPayload(e,t){var n=this.qt.token,r={distinct_id:this._instance.get_distinct_id(),token:n};this.cs()&&(r.evaluation_contexts=this.hs());var i=this.ds();tb(i)||(r.flag_keys=i),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:r,compression:this.qt.disable_compression?void 0:jk,timeout:this.qt.feature_flag_request_timeout_ms,callback(n){var r,i=null==(r=n.json)?void 0:r.featureFlagPayloads;t((null==i?void 0:i[e])||void 0)}})}isFeatureEnabled(e,t){if(void 0===t&&(t={}),!t.fresh||this.rs){if(this.Yn||this.getFlags()&&this.getFlags().length>0){var n=this.getFeatureFlag(e,t);return tb(n)?void 0:!!n}CF.warn('isFeatureEnabled for key "'+e+SF)}}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(t=>t!==e)}receivedFeatureFlags(e,t,n){if(this.ni){this.Yn=!0;var r=this.getFlagVariants(),i=this.getFlagPayloads(),o=this.getFlagsWithDetails();!function(e,t,n,r,i,o){void 0===n&&(n={}),void 0===r&&(r={}),void 0===i&&(i={});var s=(e=>{var t=e.flags;return t?(e.featureFlags=Object.fromEntries(Object.keys(t).map(e=>{var n;return[e,null!==(n=t[e].variant)&&void 0!==n?n:t[e].enabled]})),e.featureFlagPayloads=Object.fromEntries(Object.keys(t).filter(e=>t[e].enabled).filter(e=>{var n;return null==(n=t[e].metadata)?void 0:n.payload}).map(e=>{var n;return[e,null==(n=t[e].metadata)?void 0:n.payload]}))):CF.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e})(e),a=s.flags,u=s.featureFlags,l=s.featureFlagPayloads;if(u){var c=e.requestId,d=e.evaluatedAt;if(Q_(u)){CF.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var h={};if(u)for(var p=0;u.length>p;p++)h[u[p]]=!0;t&&t.register({[kE]:u,[CE]:h})}else{var f=u,g=l,m=a;if(null!=o&&o.partialResponse)f=P_({},n,f),g=P_({},r,g),m=P_({},i,m);else if(e.errorsWhileComputingFlags)if(a){var v=new Set(Object.keys(a).filter(e=>{var t;return!(null!=(t=a[e])&&t.failed)}));f=P_({},n,Object.fromEntries(Object.entries(f).filter(e=>{var[t]=e;return v.has(t)}))),g=P_({},r,Object.fromEntries(Object.entries(g||{}).filter(e=>{var[t]=e;return v.has(t)}))),m=P_({},i,Object.fromEntries(Object.entries(m||{}).filter(e=>{var[t]=e;return v.has(t)})))}else f=P_({},n,f),g=P_({},r,g),m=P_({},i,m);t&&t.register(P_({[kE]:Object.keys(FF(f)),[CE]:f||{},[FE]:g||{},[xE]:m||{}},c?{[AE]:c}:{},d?{[zE]:d}:{}))}}}(e,this.ni,r,i,o,n),t||(this.ss=!1),this.gs(t)}}override(e,t){void 0===t&&(t=!1),CF.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this.ni)return CF.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(!1===e)return this.ni.unregister(TE),this.ni.unregister(IE),this.gs(),kF.info("All overrides cleared");if(Q_(e)){var t=xF(e);return this.ni.register({[TE]:t}),this.gs(),kF.info("Flag overrides set",{flags:e})}if(e&&"object"==typeof e&&("flags"in e||"payloads"in e)){var n,r=e;if(this.Kn=Boolean(null!==(n=r.suppressWarning)&&void 0!==n&&n),"flags"in r)if(!1===r.flags)this.ni.unregister(TE),kF.info("Flag overrides cleared");else if(r.flags){if(Q_(r.flags)){var i=xF(r.flags);this.ni.register({[TE]:i})}else this.ni.register({[TE]:r.flags});kF.info("Flag overrides set",{flags:r.flags})}return"payloads"in r&&(!1===r.payloads?(this.ni.unregister(IE),kF.info("Payload overrides cleared")):r.payloads&&(this.ni.register({[IE]:r.payloads}),kF.info("Payload overrides set",{payloads:r.payloads}))),void this.gs()}if(e&&"object"==typeof e)return this.ni.register({[TE]:e}),this.gs(),kF.info("Flag overrides set",{flags:e});CF.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:e})}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.Yn){var{flags:t,flagVariants:n}=this.ys();e(t,n)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,n){var r,i=(this.os(SE)||[]).find(t=>t.flagKey===e),o={["$feature_enrollment/"+e]:t},s={$feature_flag:e,$feature_enrollment:t,$set:o};i&&(s.$early_access_feature_name=i.name),n&&(s.$feature_enrollment_stage=n),this._instance.capture("$feature_enrollment_update",s),this.setPersonPropertiesForFlags(o,!1);var a=P_({},this.getFlagVariants(),{[e]:t});null==(r=this.ni)||r.register({[kE]:Object.keys(FF(a)),[CE]:a}),this.gs()}
2getEarlyAccessFeatures(e,t,n){void 0===t&&(t=!1);var r=this.os(SE),i=n?"&"+n.map(e=>"stage="+e).join("&"):"";if(r&&!t)return e(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this.qt.token+i),method:"GET",callback:t=>{var n,r;if(t.json){var i=t.json.earlyAccessFeatures;return null==(n=this.ni)||n.unregister(SE),null==(r=this.ni)||r.register({[SE]:i}),e(i)}}})}ys(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter(e=>t[e]),flagVariants:Object.keys(t).filter(e=>t[e]).reduce((e,n)=>(e[n]=t[n],e),{})}}gs(e){var{flags:t,flagVariants:n}=this.ys();this.featureFlagEventHandlers.forEach(r=>r(t,n,{errorsLoading:e}))}setPersonPropertiesForFlags(e,t){void 0===t&&(t=!0);var n=this.os(PE)||{},r=(null==e?void 0:e.$set)||(null!=e&&e.$set_once?{}:e),i=null==e?void 0:e.$set_once,o={};if(i)for(var s in i)({}).hasOwnProperty.call(i,s)&&(s in n||(o[s]=i[s]));this._instance.register({[PE]:P_({},n,o,r)}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(PE)}setGroupPropertiesForFlags(e,t){void 0===t&&(t=!0);var n=this.os(OE)||{};0!==Object.keys(n).length&&Object.keys(n).forEach(t=>{n[t]=P_({},n[t],e[t]),delete e[t]}),this._instance.register({[OE]:P_({},n,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this.os(OE)||{};this._instance.register({[OE]:P_({},t,{[e]:{}})})}else this._instance.unregister(OE)}reset(){this.Yn=!1,this.Xn=!1,this.es=!1,this.ts=!1,this.rs=!1,this.$anon_distinct_id=void 0,this.ps(),this.Kn=!1}}},BF={sessionRecording:class{get qt(){return this._instance.config}get ni(){return this._instance.persistence}get started(){var e;return!(null==(e=this.bs)||!e.isStarted)}get status(){var e,t;return this._s===oF||this._s===sF?this._s:null!==(e=null==(t=this.bs)?void 0:t.status)&&void 0!==e?e:this._s}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this._s=rF,this.ws=void 0,this._instance=e,!this._instance.sessionManager)throw uF.error("started without valid sessionManager"),new Error(aF+" started without valid sessionManager. This is a bug.");if(this.qt.cookieless_mode===tC)throw new Error(aF+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get xs(){var e,t=!(null==(e=this._instance.get_property(vE))||!e.enabled),n=!this.qt.disable_session_recording,r=this.qt.disable_session_recording||this._instance.consent.isOptedOut();return v_&&t&&n&&!r}startIfEnabledOrStop(e){var t;if(!this.xs||null==(t=this.bs)||!t.isStarted){var n=!tb(Object.assign)&&!tb(Array.from);this.xs&&n?(this.Ss(e),uF.info("starting")):(this._s=rF,this.stopRecording())}}Ss(e){var t,n,r;this.xs&&(this._s!==oF&&this._s!==sF&&(this._s=iF),null!=x_&&null!=(t=x_.__PosthogExtensions__)&&null!=(t=t.rrweb)&&t.record&&null!=(n=x_.__PosthogExtensions__)&&n.initSessionRecording?this.ks(e):null==(r=x_.__PosthogExtensions__)||null==r.loadExternalDependency||r.loadExternalDependency(this._instance,this.Cs,t=>{if(t)return uF.error("could not load recorder",t);this.ks(e)}))}stopRecording(){var e,t;null==(e=this.ws)||e.call(this),this.ws=void 0,null==(t=this.bs)||t.stop()}Is(){var e,t;null==(e=this.ws)||e.call(this),this.ws=void 0,null==(t=this.bs)||t.discard()}Ts(){var e;null==(e=this.ni)||e.unregister(EE)}Es(e,t){if(ob(e))return null;var n,r=sb(e)?e:parseFloat(e);return"number"!=typeof(n=r)||!Number.isFinite(n)||0>n||n>1?(uF.warn(t+" must be between 0 and 1. Ignoring invalid value:",e),null):r}Ms(e){if(this.ni){var t,n,r=this.ni,i=()=>{var t,n=!1===e.sessionRecording?void 0:e.sessionRecording,i=this.Es(null==(t=this.qt.session_recording)?void 0:t.sampleRate,"session_recording.sampleRate"),o=this.Es(null==n?void 0:n.sampleRate,"remote config sampleRate"),s=null!=i?i:o;ob(s)&&this.Ts();var a=null==n?void 0:n.minimumDurationMilliseconds;r.register({[vE]:P_({cache_timestamp:Date.now(),enabled:!!n},n,{networkPayloadCapture:P_({capturePerformance:e.capturePerformance},null==n?void 0:n.networkPayloadCapture),canvasRecording:{enabled:null==n?void 0:n.recordCanvas,fps:null==n?void 0:n.canvasFps,quality:null==n?void 0:n.canvasQuality},sampleRate:s,minimumDurationMilliseconds:tb(a)?null:a,endpoint:null==n?void 0:n.endpoint,triggerMatchType:null==n?void 0:n.triggerMatchType,masking:null==n?void 0:n.masking,urlTriggers:null==n?void 0:n.urlTriggers,version:null==n?void 0:n.version,triggerGroups:null==n?void 0:n.triggerGroups})})};i(),null==(t=this.ws)||t.call(this),this.ws=null==(n=this._instance.sessionManager)?void 0:n.onSessionId(i)}}onRemoteConfig(e){return"sessionRecording"in e?!1===e.sessionRecording?(this.Ms(e),void this.Is()):(this.Ms(e),void this.startIfEnabledOrStop()):(this._s===oF&&(this._s=sF,uF.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(e,t){var n;void 0===t&&(t="log"),null!=(n=this.bs)&&n.log?this.bs.log(e,t):uF.warn("log called before recorder was ready")}get Cs(){var e,t,n=null==(e=this._instance)||null==(e=e.persistence)?void 0:e.get_property(vE);return(null==n||null==(t=n.scriptConfig)?void 0:t.script)||"lazy-recorder"}Ps(){var e,t,n=this._instance.get_property(vE);if(!n)return!1;try{t="object"==typeof n?n:JSON.parse(n)}catch(e){return uF.warn("persisted remote config for session recording is invali
2d and will be ignored",e),!1}var r=null!==(e=t.cache_timestamp)&&void 0!==e?e:Date.now();return 36e5>=Date.now()-r}ks(e){var t,n;if(null==(t=x_.__PosthogExtensions__)||!t.initSessionRecording)return uF.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[XE]:!0});if(this.bs||(this.bs=null==(n=x_.__PosthogExtensions__)?void 0:n.initSessionRecording(this._instance),this.bs._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.Ps()){if(this._s===sF||this._s===oF)return;return this._s=oF,uF.info("persisted remote config is stale, requesting fresh config before starting"),void new Lk(this._instance).load()}this._s=iF,this.bs.start(e)}onRRwebEmit(e){var t;null==(t=this.bs)||null==t.onRRwebEmit||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this.bs||null==(t=this.ni)||t.register({[DE]:!0}),null==(e=this.bs)||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.bs||null==(t=this.ni)||t.register({[yE]:!0}),null==(e=this.bs)||e.overrideSampling()}overrideTrigger(e){var t,n;this.bs||null==(n=this.ni)||n.register({["url"===e?_E:bE]:!0}),null==(t=this.bs)||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return(null==(e=this.bs)?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var n;return!(null==(n=this.bs)||!n.tryAddCustomEvent(e,t))}}},LF={autocapture:class{constructor(e){this.Rs=!1,this.Os=null,this.Ls=!1,this.instance=e,this.rageclicks=new Gx(e.config.rageclick),this.Fs=null}initialize(){this.startIfEnabled()}get qt(){var e,t,n=Z_(this.instance.config.autocapture)?this.instance.config.autocapture:{};return n.url_allowlist=null==(e=n.url_allowlist)?void 0:e.map(e=>new RegExp(e)),n.url_ignorelist=null==(t=n.url_ignorelist)?void 0:t.map(e=>new RegExp(e)),n}As(){if(this.isBrowserSupported()){if(v_&&__){var e=e=>{e=e||(null==v_?void 0:v_.event);try{this.Ns(e)}catch(t){Yx.error("Failed to capture event",t)}};if(_C(__,"submit",e,{capture:!0}),_C(__,"change",e,{capture:!0}),_C(__,"click",e,{capture:!0}),this.qt.capture_copied_text){var t=e=>{e=e||(null==v_?void 0:v_.event);try{this.Ns(e,Kx)}catch(t){Yx.error("Failed to capture copy/cut event",t)}};_C(__,"copy",t,{capture:!0}),_C(__,"cut",t,{capture:!0})}}}else Yx.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.Rs&&(this.As(),this.Rs=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.Ls=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[uE]:!!e.autocapture_opt_out}),this.Os=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.Fs=e}getElementSelectors(e){var t,n=[];return null==(t=this.Fs)||t.forEach(t=>{var r=null==__?void 0:__.querySelectorAll(t);null==r||r.forEach(r=>{e===r&&n.push(t)})}),n}get isEnabled(){var e,t,n=null==(e=this.instance.persistence)?void 0:e.props[uE];if(ib(this.Os)&&!ub(n)&&!this.instance.Lr())return!1;var r=null!==(t=this.Os)&&void 0!==t?t:!!n;return!!this.instance.config.autocapture&&!r}Ns(e,t){if(void 0===t&&(t="$autocapture"),this.isEnabled){var n,r=Sx(e);Dx(r)&&(r=r.parentNode||null),"$autocapture"===t&&"click"===e.type&&e instanceof MouseEvent&&this.instance.config.rageclick&&null!=(n=this.rageclicks)&&n.isRageClick(e.clientX,e.clientY,e.timeStamp||(new Date).getTime())&&function(e,t){if(!v_||Px(e))return!1;var n,r,i;if(ub(t)?(n=!!t&&Ix,r=void 0):(n=null!==(i=null==t?void 0:t.css_selector_ignorelist)&&void 0!==i?i:Ix,r=null==t?void 0:t.content_ignorelist),!1===n)return!1;var{targetElementList:o}=Ox(e,!1);return!function(e,t){if(!1===e||tb(e))return!1;var n;if(!0===e)n=Tx;else{if(!Q_(e))return!1;if(e.length>10)return eE.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;n=e.map(e=>e.toLowerCase())}return t.some(e=>{var{safeText:t,ariaLabel:r}=e;return n.some(e=>t.includes(e)||r.includes(e))})}(r,o.map(e=>{var t;return{safeText:kx(e).toLowerCase(),ariaLabel:(null==(t=e.getAttribute("aria-label"))?void 0:t.toLowerCase().trim())||""}}
vendor: 1,369 bytes, line 2
2))&&!Fx(o,n)}(r,this.instance.config.rageclick)&&this.Ns(e,"$rageclick");var i=t===Kx;if(r&&function(e,t,n,r,i){var o,s,a,u;if(void 0===n&&(n=void 0),!v_||Px(e))return!1;if(null!=(o=n)&&o.url_allowlist&&!wx(n.url_allowlist))return!1;if(null!=(s=n)&&s.url_ignorelist&&wx(n.url_ignorelist))return!1;if(null!=(a=n)&&a.dom_event_allowlist){var l=n.dom_event_allowlist;if(l&&!l.some(e=>t.type===e))return!1}var{parentIsUsefulElement:c,targetElementList:d}=Ox(e,r);if(!function(e,t){var n=null==t?void 0:t.element_allowlist;if(tb(n))return!0;var r,i=function(e){if(n.some(t=>e.tagName.toLowerCase()===t))return{v:!0}};for(var o of e)if(r=i(o))return r.v;return!1}(d,n))return!1;if(!Fx(d,null==(u=n)?void 0:u.css_selector_allowlist))return!1;var h=v_.getComputedStyle(e);if(h&&"pointer"===h.getPropertyValue("cursor")&&"click"===t.type)return!0;var p=e.tagName.toLowerCase();switch(p){case"html":return!1;case"form":return(i||["submit"]).indexOf(t.type)>=0;case"input":case"select":case"textarea":return(i||["change","click"]).indexOf(t.type)>=0;default:return c?(i||["click"]).indexOf(t.type)>=0:(i||["click"]).indexOf(t.type)>=0&&(xx.indexOf(p)>-1||"true"===e.getAttribute("contenteditable"))}}(r,e,this.qt,i,i?["copy","cut"]:void 0)){var{props:o,explicitNoCapture:s}=function(e,t){var n,r,{e:i,maskAllElementAttributes:o,maskAllText:s,elementAttributeIgnoreList:a,elementsC
2hainAsString:u}=t;if(!vx(e))return{props:{}};for(var l=[e],c=e;c.parentNode&&!yx(c,"body");)if(_x(c.parentNode))l.push(c.parentNode.host),c=c.parentNode.host;else{if(!vx(c.parentNode))break;l.push(c.parentNode),c=c.parentNode}var d,h,p=[],f={},g=!1,m=!1;if(hC(l,e=>{var t=Nx(e);if(yx(e,"a")){var n=e.getAttribute("href");g=t&&!!n&&Hx(n)&&n}$_(Ex(e),"ph-no-capture")&&(m=!0),p.push(function(e,t,n,r){var i=e.tagName.toLowerCase(),o={tag_name:i};xx.indexOf(i)>-1&&!n&&(o.$el_text="a"===i.toLowerCase()||"button"===i.toLowerCase()?Jx(1024,qx(e)):Jx(1024,kx(e)));var s=Ex(e);s.length>0&&(o.classes=s.filter(function(e){return""!==e})),hC(e.attributes,function(n){var i;if((!Rx(e)||-1!==["name","id","class","aria-label"].indexOf(n.name))&&(null==r||!r.includes(n.name))&&!t&&Hx(n.value)&&(!nb(i=n.name)||"_ngcontent"!==i.substring(0,10)&&"_nghost"!==i.substring(0,7))){var s=n.value;"class"===n.name&&(s=bx(s).join(" ")),o["attr__"+n.name]=Jx(1024,s)}});for(var a=1,u=1,l=e;l=Qx(l);)a++,l.tagName===e.tagName&&u++;return o.nth_child=a,o.nth_of_type=u,o}(e,o,s,a));var r=function(e){if(!Nx(e))return{};var t={};return hC(e.attributes,function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){var n=e.name.replace("data-ph-capture-attribute-",""),r=e.value;n&&r&&Hx(r)&&(t[n]=r)}}),t}(e);pC(f,r)}),m)return{props:{},explicitNoCapture:m};if(s||(p[0].$el_text=yx(e,"a")||yx(e,"button")?qx(e):kx(e)),g){var v,y;p[0].attr__href=g;var D=null==(v=QC(g))?void 0:v.host,_=null==v_||null==(y=v_.location)?void 0:y.host;D&&_&&D!==_&&(d=g)}return{props:pC({$event_type:i.type,$ce_version:1},u?{}:{$elements:p},{$elements_chain:(h=p,function(e){return e.map(e=>{var t,n,r="";if(e.tag_name&&(r+=e.tag_name),e.attr_class)for(var i of(e.attr_class.sort(),e.attr_class))r+="."+i.replace(/"/g,"");var o=P_({},e.text?{text:e.text}:{},{"nth-child":null!==(t=e.nth_child)&&void 0!==t?t:0,"nth-of-type":null!==(n=e.nth_of_type)&&void 0!==n?n:0},e.href?{href:e.href}:{},e.attr_id?{attr_id:e.attr_id}:{},e.attributes),s={};return fC(o).sort((e,t)=>{var[n]=e,[r]=t;return n.localeCompare(r)}).forEach(e=>{var[t,n]=e;return s[$x(t.toString())]=$x(n.toString())}),(r+=":")+fC(s).map(e=>{var[t,n]=e;return t+'="'+n+'"'}).join("")}).join(";")}(function(e){return e.map(e=>{var t,n,r={text:null==(t=e.$el_text)?void 0:t.slice(0,400),tag_name:e.tag_name,href:null==(n=e.attr__href)?void 0:n.slice(0,2048),attr_class:Vx(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return fC(e).filter(e=>{var[t]=e;return 0===t.indexOf("attr__")}).forEach(e=>{var[t,n]=e;return r.attributes[t]=n}),r})}(h)))},null!=(n=p[0])&&n.$el_text?{$el_text:null==(r=p[0])?void 0:r.$el_text}:{},d&&"click"===i.type?{$external_click_url:d}:{},f)}}(r,{e:e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.qt.element_attribute_ignorelist,elementsChainAsString:this.Ls});if(s)return!1;var a=this.getElementSelectors(r);if(a&&a.length>0&&(o.$element_selectors=a),t===Kx){var u,l=Cx(null==v_||null==(u=v_.getSelection())?void 0:u.toString()),c=e.type||"clipboard";if(!l)return!1;o.$selected_content=l,o.$copy_type=c}return this.instance.capture(t,o),!0}}}isBrowserSupported(){return X_(null==__?void 0:__.querySelectorAll)}},historyAutocapture:class{constructor(e){var t;this._instance=e,this.$s=(null==v_||null==(t=v_.location)?void 0:t.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return"history_change"===this._instance.config.capture_pageview}startIfEnabled(){this.isEnabled&&(eE.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.Ds&&this.Ds(),this.Ds=void 0,eE.info("History API monitoring stopped")}monitorHistoryChanges(){var e,t;if(v_&&v_.history){var n=this;null!=(e=v_.history.pushState)&&e.__posthog_wrapped__||Zx(v_.history,"pushState",e=>function(t,r,i){e.call(this,t,r,i),n.qs("pushState")}),null!=(t=v_.history.replaceState)&&t.__posthog_wrapped__||Zx(v_.history,"replaceState",e=>function(t,r,i){e.call(this,t,r,i),n.qs("replaceState")}),this.js()}}qs(e){try{var t,n=null==v_||null==(t=v_.location)?void 0:t.pathname;if(!n)return;n!==this.$s&&this.isEnabled&&this._instance.capture(aC,{navigation_type:e}),this.$s=n}catch(r){eE.error("Error capturing "+e+" pageview",r)}}js(){if(!this.Ds){var e=()=>{this.qs("popstate")};_C(v_,"popstate",e),this.Ds=()=>{v_&&v_.removeEventListener("popstate",e)}}}},heatmaps:class{get qt(){return this.instance.config}constructor(e){var t;this.Hs=!1,this.Rs=!1,this.Us=null,this.instance=e,this.Hs=!(null==(t=this.instance.persistence)||!t.props[lE]),this.rageclicks=new Gx(e.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var e=5e3;return Z_(this.qt.capture_heatmaps)&&this.qt.capture_heatmaps.flush_interval_milliseconds&&(e=this.qt.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return ob(this.qt.capture_heatmaps)?ob(this.qt.enable_heatmaps)?this.Hs:this.qt.enable_heatmaps:!1!==this.qt.capture_heatmaps}startIfEnabled(){if(this.isEnabled){if(this.Rs)return;lF.info("starting..."),this.Bs(),this.At()}else{var e;clearInterval(null!==(e=this.Us)&&void 0!==e?e:void 0),this.zs(),this.getAndClearBuffer()}}onRemoteConfig(e){if("heatmaps"in e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[lE]:t}),this.Hs=t,this.startIfEnabled()}}getAndClearBuffer(){var e=this.M;return this.M=void 0,e}Vs(e){this.Mt(e.originalEvent,"deadclick")}At(){this.Us&&clearInterval(this.Us),this.Us="visible"===(null==__?void 0:__.visibilityState)?setInterval(this.Zr.bind(this),this.flushIntervalMilliseconds):null}Bs(){v_&&__&&(this.Ws=this.Zr.bind(this),_C(v_,sC,this.Ws),this.Zs=e=>this.Mt(e||(null==v_?void 0:v_.event)),_C(__,"click",this.Zs,{capture:!0}),this.Gs=e=>this.Qs(e||(null==v_?void 0:v_.event)),_C(__,"mousemove",this.Gs,{capture:!0}),this.Js=new qC(this.instance,UC,this.Vs.bind(this)),this.Js.startIfEnabledOrStop(),this.Ks=this.At.bind(this),_C(__,oC,this.Ks),this.Rs=!0)}zs(){var e;v_&&__&&(this.Ws&&v_.removeEventListener(sC,this.Ws),this.Zs&&__.removeEventListener("click",this.Zs,{capture:!0}),this.Gs&&__.removeEventListener("mousemove",this.Gs,{capture:!0}),this.Ks&&__.removeEventListener(oC,this.Ks),clearTimeout(this.Ys),null==(e=this.Js)||e.stop(),this.Rs=!1)}Xs(e,t){var n=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),i=this.instance.scrollManager.scrollElement(),o=function(e,t,n){for(var r=e;r&&vx(r)&&!yx(r,"body");){if(r===n)return!1;if($_(t,null==v_?void 0:v_.getComputedStyle(r).position))return!0;r=Ax(r)}return!1}(Sx(e),["fixed","sticky"],i);return{x:e.clientX+(o?0:r),y:e.clientY+(o?0:n),target_fixed:o,type:t}}Mt(e,t){var n;if(void 0===t&&(t="click"),!mx(e.target)&&cF(e)){var r=this.Xs(e,t);null!=(n=this.rageclicks)&&n.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&this.eo(P_({},r,{type:"rageclick"})),this.eo(r)}}Qs(e){!mx(e.target)&&cF(e)&&(clearTimeout(this.Ys),this.Ys=setTimeout(()=>{this.eo(this.Xs(e,"mousemove"))},500))}eo(e){if(v_){var t=v_.location.href,n=this.qt.custom_personal_data_properties,r=this.qt.mask_personal_data_properties?[...nk,...n||[]]:[],i=ZC(t,r,ik);this.M=this.M||{},this.M[i]||(this.M[i]=[]),this.M[i].push(e)}}Zr(){this.M&&!eb(this.M)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:qC,webVitalsAutocapture:class{constructor(e){var t;this.Hs=!1,this.Rs=!1,this.M={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.ro=()=>{clearTimeout(this.io),0!==this.M.metrics.length&&(this._instance.capture("$web_vitals",this.M.metrics.reduce((e,t)=>
2P_({},e,{["$web_vitals_"+t.name+"_event"]:P_({},t),["$web_vitals_"+t.name+"_value"]:t.value}),{})),this.M={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.ht=e=>{var t;this.M=this.M||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var n=this.no();if(!tb(n))if(ob(null==e?void 0:e.name)||ob(null==e?void 0:e.value))tF.error("Invalid metric received",e);else if(!this.so||this.so>e.value){this.M.url!==n&&(this.ro(),this.io=setTimeout(this.ro,this.flushToCaptureTimeoutMs)),tb(this.M.url)&&(this.M.url=n),this.M.firstMetricTimestamp=tb(this.M.firstMetricTimestamp)?Date.now():this.M.firstMetricTimestamp,e.attribution&&e.attribution.interactionTargetElement&&(e.attribution.interactionTargetElement=void 0);var r=null==(t=this._instance.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0),i=P_({},e,{$current_url:n,timestamp:Date.now()});tb(r)||(i.$session_id=r.sessionId,i.$window_id=r.windowId),this.M.metrics.push(i),this.M.metrics.length===this.allowedMetrics.length&&this.ro()}else tF.error("Ignoring metric with value >= "+this.so,e)},this.oo=()=>{if(!this.Rs){var e,t,n,r,i=x_.__PosthogExtensions__;tb(i)||tb(i.postHogWebVitalsCallbacks)||({onLCP:e,onCLS:t,onFCP:n,onINP:r}=i.postHogWebVitalsCallbacks),e&&t&&n&&r?(this.allowedMetrics.indexOf("LCP")>-1&&e(this.ht.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&t(this.ht.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&n(this.ht.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&r(this.ht.bind(this)),this.Rs=!0):tF.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this.Hs=!(null==(t=this._instance.persistence)||!t.props[pE]),this.startIfEnabled()}get ao(){return this._instance.config.capture_performance}get allowedMetrics(){var e,t,n=Z_(this.ao)?null==(e=this.ao)?void 0:e.web_vitals_allowed_metrics:void 0;return ob(n)?(null==(t=this._instance.persistence)?void 0:t.props[mE])||["CLS","FCP","INP","LCP"]:n}get flushToCaptureTimeoutMs(){return(Z_(this.ao)?this.ao.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var e=Z_(this.ao)?this.ao.web_vitals_attribution:void 0;return null!=e&&e}get so(){var e=Z_(this.ao)&&sb(this.ao.__web_vitals_max_value)?this.ao.__web_vitals_max_value:nF;return e>0&&6e4>=e?nF:e}get isEnabled(){var e=null==b_?void 0:b_.protocol;if("http:"!==e&&"https:"!==e)return tF.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=Z_(this.ao)?this.ao.web_vitals:ub(this.ao)?this.ao:void 0;return ub(t)?t:this.Hs}startIfEnabled(){this.isEnabled&&!this.Rs&&(tF.info("enabled, starting..."),this.lr(this.oo))}onRemoteConfig(e){if("capturePerformance"in e){var t=Z_(e.capturePerformance)&&!!e.capturePerformance.web_vitals,n=Z_(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[pE]:t}),this._instance.persistence.register({[mE]:n})),this.Hs=t,this.startIfEnabled()}}lr(e){var t,n;null!=(t=x_.__PosthogExtensions__)&&t.postHogWebVitalsCallbacks?e():null==(n=x_.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",t=>{t?tF.error("failed to load script",t):e()})}no(){var e=v_?v_.location.href:void 0;if(e){var t=this._instance.config.custom_personal_data_properties,n=this._instance.config.mask_personal_data_properties?[...nk,...t||[]]:[];return ZC(e,n,ik)}tF.error("Could not determine current URL")}}},MF={exceptionObserver:class{constructor(e){var t,n,r;this.oo=()=>{var e;if(v_&&this.isEnabled&&null!=(e=x_.__PosthogExtensions__)&&e.errorWrappingFunctions){var t=x_.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,n=x_.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,r=x_.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.uo&&this.qt.capture_unhandled_errors&&(this.uo=t(this.captureException.bind(this))),!this.lo&&this.qt.capture_unhandled_rejections&&(this.lo=n(this.captureException.bind(this))),!this.ho&&this.qt.capture_console_errors&&(this.ho=r(this.captureException.bind(this)))}catch(i){Xx.error("failed to start",i),this.co()}}},this._instance=e,this.do=!(null==(t=this._instance.persistence)||!t.props[cE]),this.vo=new vb({refillRate:null!==(n=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)&&void 0!==n?n:1,bucketSize:null!==(r=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)&&void 0!==r?r:10,refillInterval:1e4,Gt:Xx}),this.qt=this.fo(),this.startIfEnabledOrStop()}fo(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return Z_(e)?t=P_({},t,e):(tb(e)?this.do:e)&&(t=P_({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.qt.capture_console_errors||this.qt.capture_unhandled_errors||this.qt.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(Xx.info("enabled"),this.co(),this.lr(this.oo)):this.co()}lr(e){var t,n;null!=(t=x_.__PosthogExtensions__)&&t.errorWrappingFunctions&&e(
2),null==(n=x_.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,"exception-autocapture",t=>{if(t)return Xx.error("failed to load script",t);e()})}co(){var e,t,n;null==(e=this.uo)||e.call(this),this.uo=void 0,null==(t=this.lo)||t.call(this),this.lo=void 0,null==(n=this.ho)||n.call(this),this.ho=void 0}onRemoteConfig(e){"autocaptureExceptions"in e&&(this.do=!!e.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[cE]:this.do}),this.qt=this.fo(),this.startIfEnabledOrStop())}onConfigChange(){this.qt=this.fo()}captureException(e){var t,n,r,i=null!==(t=null==e||null==(n=e.$exception_list)||null==(n=n[0])?void 0:n.type)&&void 0!==t?t:"Exception";this.vo.consumeRateLimit(i)?Xx.info("Skipping exception capture because of client rate limiting.",{exception:i}):null==(r=this._instance.exceptions)||r.sendExceptionEvent(e)}},exceptions:class{constructor(e){var t,n;this.po=[],this.mo=new Ew([new Rw,new $w,new Lw,new Bw,new qw,new Hw,new jw,new Ww],function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];return function(t,r){void 0===r&&(r=0);for(var i=[],o=t.split("\n"),s=r;o.length>s;s++){var a=o[s];if(1024>=a.length){var u=Nw.test(a)?a.replace(Nw,"$1"):a;if(!u.match(/\S*Error: /)){for(var l of n){var c=l(u,e);if(c){i.push(c);break}}if(i.length>=50)break}}}return function(e){if(!e.length)return[];var t=Array.from(e);return t.reverse(),t.slice(0,50).map(e=>{return P_({},e,{filename:e.filename||(n=t,n[n.length-1]||{}).filename,function:e.function||Cw});var n})}(i)}}("web:javascript",Tw,Ow)),this._instance=e,this.po=null!==(t=null==(n=this._instance.persistence)?void 0:n.get_property(dE))&&void 0!==t?t:[],this.yo=Jw(this.bo()),this._o=new Qw(this.yo)}onConfigChange(){this.yo=Jw(this.bo()),this._o.setConfig(this.yo)}onRemoteConfig(e){var t,n,r;if("errorTracking"in e){var i=null!==(t=null==(n=e.errorTracking)?void 0:n.suppressionRules)&&void 0!==t?t:[],o=null==(r=e.errorTracking)?void 0:r.captureExtensionExceptions;this.po=i,this._instance.persistence&&this._instance.persistence.register({[dE]:this.po,[hE]:o})}}get wo(){var e,t=!!this._instance.get_property(hE),n=this._instance.config.error_tracking.captureExtensionExceptions;return null!==(e=null!=n?n:t)&&void 0!==e&&e}buildProperties(e,t){return this.mo.buildFromUnknown(e,{syntheticException:null==t?void 0:t.syntheticException,mechanism:{handled:null==t?void 0:t.handled}})}addExceptionStep(e,t){if(this.yo.enabled)try{if(!nb(e)||0===e.trim().length)return void AF.warn("Ignoring exception step because message must be a non-empty string");var n=this.xo(t),{sanitizedProperties:r,droppedKeys:i}=function(e){if(!e)return{sanitizedProperties:{},droppedKeys:[]};var t=[];return{sanitizedProperties:Object.keys(e).reduce((n,r)=>Kw.has(r)?(t.push(r),n):(n[r]=e[r],n),{}),droppedKeys:t}}(n);i.length>0&&AF.warn("Ignoring reserved exception step fields",{droppedKeys:i}),this._o.add(P_({[Vw]:e,[Gw]:(new Date).toISOString()},r))}catch(e){AF.error("Failed to add exception step. Ignoring breadcrumb.",e)}}sendExceptionEvent(e){try{var t=e.$exception_list;if(this.So(t)){if(this.ko(t))return this.Co("Exception dropped: matched a suppression rule"),void AF.info("Skipping exception capture because a suppression rule matched");if(!this.wo&&this.Io(t))return this.Co("Exception dropped: thrown by a browser extension"),void AF.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.To(t))return this.Co("Exception dropped: thrown by the PostHog SDK"),void AF.info("Skipping exception capture because it was thrown by the PostHog SDK")}var n=this.yo.enabled&&ob(e.$exception_steps)?this.Eo(e):e;try{var r=this._instance.capture("$exception",n,{_noTruncate:!0,_batchKey:"exceptionEvent",en:!0});return r&&this._o.clear(),r}catch(e){return AF.error("Failed to capture exception event. Dropping this exception.",e),void this._o.clear()}}catch(e){return void AF.error("Failed to process exception event. Ignoring this exception.",e)}}Eo(e){try{var t=this._o.getAttachable();return 0===t.length?e:P_({},e,{$exception_steps:t})}catch(t){return AF.error("Failed to read buffered exception steps. Capturing exception without steps.",t),e}}Co(e){this.yo.enabled&&this._o.add({[Vw]:e,[Gw]:(new Date).toISOString()})}xo(e){return Z_(e)?P_({},e):{}}bo(){var e,t;return null!==(e=null==(t=this._instance.config.error_tracking)?void 0:t.exception_steps)&&void 0!==e?e:{}}ko(e){if(0===e.length)return!1;var t=e.reduce((e,t)=>
2{var{type:n,value:r}=t;return nb(n)&&n.length>0&&e.$exception_types.push(n),nb(r)&&r.length>0&&e.$exception_values.push(r),e},{$exception_types:[],$exception_values:[]});return this.po.some(e=>{var n=e.values.map(e=>{var n,r=US[e.operator],i=Q_(e.value)?e.value:[e.value],o=null!==(n=t[e.key])&&void 0!==n?n:[];return i.length>0&&r(i,o)});return"OR"===e.type?n.some(Boolean):n.every(Boolean)})}Io(e){return e.flatMap(e=>{var t,n;return null!==(t=null==(n=e.stacktrace)?void 0:n.frames)&&void 0!==t?t:[]}).some(e=>e.filename&&e.filename.startsWith("chrome-extension://"))}To(e){if(e.length>0){var t,n,r,i,o=null!==(t=null==(n=e[0].stacktrace)?void 0:n.frames)&&void 0!==t?t:[],s=o[o.length-1];return null!==(r=null==s||null==(i=s.filename)?void 0:i.includes("posthog.com/static"))&&void 0!==r&&r}return!1}So(e){return!ob(e)&&Q_(e)}}},jF=P_({productTours:class{get ni(){return this._instance.persistence}constructor(e){this.Mo=null,this.Po=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){"productTours"in e&&(this.ni&&this.ni.register({[gE]:!!e.productTours}),this.loadIfEnabled())}loadIfEnabled(){var e,t;this.Mo||(e=this._instance).config.disable_product_tours||null==(t=e.persistence)||!t.get_property(gE)||this.lr(()=>this.Ro())}lr(e){var t,n;null!=(t=x_.__PosthogExtensions__)&&t.generateProductTours?e():null==(n=x_.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,"product-tours",t=>{t?dF.error("Could not load product tours script",t):e()})}Ro(){var e;!this.Mo&&null!=(e=x_.__PosthogExtensions__)&&e.generateProductTours&&(this.Mo=x_.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(void 0===t&&(t=!1),!Q_(this.Po)||t){var n=this.ni;if(n){var r=n.props[BE];if(Q_(r)&&!t)return this.Po=r,void e(r,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:t=>{var r=t.statusCode;if(200!==r||!t.json){var i="Product Tours API could not be loaded, status: "+r;return dF.error(i),void e([],{isLoaded:!1,error:i})}var o=Q_(t.json.product_tours)?t.json.product_tours:[];this.Po=o,n&&n.register({[BE]:o}),e(o,{isLoaded:!0})}})}else e(this.Po,{isLoaded:!0})}getActiveProductTours(e){ob(this.Mo)?e([],{isLoaded:!1,error:"Product tours not loaded"}):this.Mo.getActiveProductTours(e)}showProductTour(e){var t;null==(t=this.Mo)||t.showTourById(e)}previewTour(e){this.Mo?this.Mo.previewTour(e):this.lr(()=>{var t;this.Ro(),null==(t=this.Mo)||t.previewTour(e)})}dismissProductTour(){var e;null==(e=this.Mo)||e.dismissTour("user_clicked_skip")}nextStep(){var e;null==(e=this.Mo)||e.nextStep()}previousStep(){var e;null==(e=this.Mo)||e.previousStep()}clearCache(){var e;this.Po=null,null==(e=this.ni)||e.unregister(BE)}resetTour(e){var t;null==(t=this.Mo)||t.resetTour(e)}resetAllTours(){var e;null==(e=this.Mo)||e.resetAllTours()}cancelPendingTour(e){var t;null==(t=this.Mo)||t.cancelPendingTour(e)}}},RF),zF={siteApps:class{constructor(e){this._instance=e,this.Oo=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}Lo(e,t){if(t){var n=this.globalsForEvent(t);this.Oo.push(n),this.Oo.length>1e3&&(this.Oo=this.Oo.slice(10))}}get siteAppLoaders(){var e;return null==(e=x_._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.siteApps}initialize(){if(this.isEnabled){var e=this._instance._addCaptureHook(this.Lo.bind(this));this.Fo=()=>{e(),this.Oo=[],this.Fo=void 0}}}globalsForEvent(e){var t,n,r,i,o,s,a;if(!e)throw new Error("Event payload is required");var u={},l=this._instance.get_property("$groups")||[],c=this._instance.get_property("$stored_group_properties")||{};for(var[d,h]of Object.entries(c))u[d]={id:l[d],type:d,properties:h};var{$set_once:p,$set:f}=e;return{event:P_({},O_(e,hF),{properties:P_({},e.properties,f?{$set:P_({},null!==(t=null==(n=e.properties)?void 0:n.$set)&&void 0!==t?t:{},f)}:{},p?{$set_once:P_({},null!==(r=null==(i=e.properties)?void 0:i.$set_once)&&void 0!==r?r:{},p)}:{}),elements_chain:null!==(o=null==(s=e.properties)?void 0:s.$elements_chain)&&void 0!==o?o:"",distinct_id:null==(a=e.properties)?void 0:a.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:u}}setupSiteApp(e){var t=this.apps[e.id],n=()=>{var n;!t.errored&&this.Oo.length&&(pF.info("Processing "+this.Oo.length+" events for site app with id "+e.id),this.Oo.forEach(e
2=>null==t.processEvent?void 0:t.processEvent(e)),t.processedBuffer=!0),Object.values(this.apps).every(e=>e.processedBuffer||e.errored)&&(null==(n=this.Fo)||n.call(this))},r=!1,i=i=>{t.errored=!i,t.loaded=!0,pF.info("Site app with id "+e.id+" "+(i?"loaded":"errored")),r&&n()};try{var{processEvent:o}=e.init({posthog:this._instance,callback(e){i(e)}});o&&(t.processEvent=o),r=!0}catch(t){pF.error(fF+e.id,t),i(!1)}if(r&&t.loaded)try{n()}catch(n){pF.error("Error while processing buffered events PostHog app with config id "+e.id,n),t.errored=!0}}Ao(){var e=this.siteAppLoaders||[];for(var t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(var n of e)this.setupSiteApp(n)}No(e){if(0!==Object.keys(this.apps).length){var t=this.globalsForEvent(e);for(var n of Object.values(this.apps))try{null==n.processEvent||n.processEvent(t)}catch(t){pF.error("Error while processing event "+e.event+" for site app "+n.id,t)}}}onRemoteConfig(e){var t,n,r,i=this;if(null!=(t=this.siteAppLoaders)&&t.length)return this.isEnabled?(this.Ao(),void this._instance.on("eventCaptured",e=>this.No(e))):void pF.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if(null==(n=this.Fo)||n.call(this),null!=(r=e.siteApps)&&r.length)if(this.isEnabled){var o=function(e){var t;x_["__$$ph_site_app_"+e]=i._instance,null==(t=x_.__PosthogExtensions__)||null==t.loadSiteApp||t.loadSiteApp(i._instance,a,t=>{if(t)return pF.error(fF+e,t)})};for(var{id:s,url:a}of e.siteApps)o(s)}else pF.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},UF={tracingHeaders:class{constructor(e){this.$o=void 0,this.Do=void 0,this.oo=()=>{var e,t,n=this.qo()||[];tb(this.$o)&&(null==(e=x_.__PosthogExtensions__)||null==(e=e.tracingHeadersPatchFns)||e._patchXHR(n,this._instance.get_distinct_id(),this._instance.sessionManager)),tb(this.Do)&&(null==(t=x_.__PosthogExtensions__)||null==(t=t.tracingHeadersPatchFns)||t._patchFetch(n,this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=e}initialize(){this.startIfEnabledOrStop()}lr(e){var t,n;null!=(t=x_.__PosthogExtensions__)&&t.tracingHeadersPatchFns&&e(),null==(n=x_.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,"tracing-headers",t=>{if(t)return eF.error("failed to load script",t);e()})}qo(){var e;return null!==(e=this._instance.config.addTracingHeaders)&&void 0!==e?e:this._instance.config.__add_tracing_headers}startIfEnabledOrStop(){var e,t;this.qo()?this.lr(this.oo):(null==(e=this.$o)||e.call(this),null==(t=this.Do)||t.call(this),this.$o=void 0,this.Do=void 0)}}},HF=P_({surveys:class{get qt(){return this._instance.config}constructor(e){this.jo=void 0,this._surveyManager=null,this.Ho=!1,this.Uo=[],this.Bo=null,this._instance=e,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this.qt.disable_surveys){var t=e.surveys;if(ob(t))return KS.warn("Flags not loaded yet. Not loading surveys.");var n=Q_(t);this.jo=n?t.length>0:t,KS.info("flags response received, isSurveysEnabled: "+this.jo),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var n=localStorage.key(t);(null!=n&&n.startsWith(YS)||null!=n&&n.startsWith("inProgressSurvey_"))&&e.push(n)}e.forEach(e=>localStorage.removeItem(e))}loadIfEnabled(){if(!this._surveyManager)if(this.Ho)KS.info("Already initializing surveys, skipping...");else if(this.qt.disable_surveys)KS.info(_F);else if(this.qt.cookieless_mode&&this._instance.consent.isOptedOut())KS.info("Not loading surveys in cookieless mode without consent.");else{var e=null==x_?void 0:x_.__PosthogExtensions__;if(e){if(!tb(this.jo)||this.qt.advanced_enable_surveys){var t=this.jo||this.qt.advanced_enable_surveys;this.Ho=!0;try{var n=e.generateSurveys;if(n)return void this.zo(n,t);var r=e.loadExternalDependency;if(!r)return void this.Vo(ZE);r(this._instance,"surveys",n=>{n||!e.generateSurveys?this.Vo("Could not load surveys script",n):this.zo(e.generateSurveys,t)})}catch(e){throw this.Vo("Error initializing surveys",e),e}finally{this.Ho=!1}}}else KS.error("PostHog Extensions not found.")}}zo(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new yF(this._instance),KS.info("Surveys loaded successfully"),this.Wo({isLoaded:!0})}Vo(e,t){KS.error(e,t),this.Wo({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.Uo.push(e),this._surveyManager&&this.Wo({isLoaded:!0}),()=>{this.Uo=this.Uo.filter(t=>t!==e)}}getSurveys(e,t){if(void 0===t&&(t=!1),this.qt.disable_surveys)return KS.info(_F),e([]);var n,r=this._instance.get_property(NE);if(r&&!t)return e(r,{isLoaded:!0});"undefined"!=typeof Promise&&this.Bo?this.Bo.then(t=>{var{surveys:n,context:r}=t;return e(n,r)}):("undefined"!=typeof Promise&&(this.Bo=new Promise(e=>{n=e})),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this.qt.token),method:"GET",timeout:this.qt.surveys_request_timeout_ms,callback:t=>{var r;this.Bo=null;var i=t.statusCode;if(200!==i||!t.json){var o="Surveys API could not be loaded, status: "+i;KS.error(o);var s={isLoaded:!1,error:o};return e([],s),void(null==n||n({surveys:[],context:s}))}var a,u=t.json.surveys||[],l=u.filter(e=>function(e){return!(!e.start_date||e.end_date)}(e)&&(function(e){var t;return!(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)||!t.length)}(e)||function(e){var t;return!(null==(t=e.conditions)||null==(t=t.actions)||null==(t=t.values)||!t.length)}(e)));l.length>0&&(null==(a=this._surveyEventReceiver)||a.register(l)),null==(r=this._instance.persistence)||r.register({[NE]:u});var c={isLoaded:!0};e(u,c),null==n||n({surveys:u,context:c})}}))}
vendor: 5,652 bytes, line 2
2Wo(e){for(var t of this.Uo)try{if(!e.isLoaded)return t([],e);this.getSurveys(t)}catch(e){KS.error("Error in survey callback",e)}}getActiveMatchingSurveys(e,t){if(void 0===t&&(t=!1),!ob(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);KS.warn("init was not called")}Zo(e){var t=null;return this.getSurveys(n=>{var r;t=null!==(r=n.find(t=>t.id===e))&&void 0!==r?r:null}),t}Go(e){if(ob(this._surveyManager))return{eligible:!1,reason:DF};var t="string"==typeof e?this.Zo(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(ob(this._surveyManager))return KS.warn("init was not called"),{visible:!1,disabledReason:DF};var t=this.Go(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return ob(this._surveyManager)?(KS.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:DF})):new Promise(n=>{this.getSurveys(t=>{var r,i=null!==(r=t.find(t=>t.id===e))&&void 0!==r?r:null;if(i){var o=this.Go(i);n({visible:o.eligible,disabledReason:o.reason})}else n({visible:!1,disabledReason:"Survey not found"})},t)})}renderSurvey(e,t,n){var r;if(ob(this._surveyManager))KS.warn("init was not called");else{var i="string"==typeof e?this.Zo(e):e;if(null!=i&&i.id)if(JS.includes(i.type)){var o=null==__?void 0:__.querySelector(t);if(o)return null!=(r=i.appearance)&&r.surveyPopupDelaySeconds?(KS.info("Rendering survey "+i.id+" with delay of "+i.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout(()=>{var e,t;KS.info("Rendering survey "+i.id+" with delay of "+(null==(e=i.appearance)?void 0:e.surveyPopupDelaySeconds)+" seconds"),null==(t=this._surveyManager)||t.renderSurvey(i,o,n),KS.info("Survey "+i.id+" rendered")},1e3*i.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(i,o,n);KS.warn("Survey element not found")}else KS.warn("Surveys of type "+i.type+" cannot be rendered in the app");else KS.warn("Survey not found")}}displaySurvey(e,t){var n;if(ob(this._surveyManager))KS.warn("init was not called");else{var r=this.Zo(e);if(r){var i=r;if(null!=(n=r.appearance)&&n.surveyPopupDelaySeconds&&t.ignoreDelay&&(i=P_({},r,{appearance:P_({},r.appearance,{surveyPopupDelaySeconds:0})})),t.displayType!==Ak&&t.initialResponses&&KS.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),!1===t.ignoreConditions){var o=this.canRenderSurvey(r);if(!o.visible)return void KS.warn("Survey is not eligible to be displayed: ",o.disabledReason)}t.displayType!==Tk?this._surveyManager.handlePopoverSurvey(i,t):this.renderSurvey(i,t.selector,t.properties)}else KS.warn("Survey not found")}}cancelPendingSurvey(e){ob(this._surveyManager)?KS.warn("init was not called"):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;null==(e=this._surveyManager)||e.handlePageUnload()}}},RF),qF={toolbar:class{constructor(e){this.instance=e}Qo(e){x_.ph_toolbar_state=e}Jo(){var e;return null!==(e=x_.ph_toolbar_state)&&void 0!==e?e:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(e,t,n){if(void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===n&&(n=void 0),bC(this.instance.config))return!1;if(!v_||!__)return!1;e=null!=e?e:v_.location,n=null!=n?n:v_.history;try{if(!t){try{v_.localStorage.setItem("test","test"),v_.localStorage.removeItem("test")}catch(s){return!1}t=null==v_?void 0:v_.localStorage}var r,i=bF||ek(e.hash,"__posthog")||ek(e.hash,"state"),o=i?gC(()=>JSON.parse(atob(decodeURIComponent(i))))||gC(()=>JSON.parse(decodeURIComponent(i))):null;return o&&"ph_authorize"===o.action?((r=o).source="url",r&&Object.keys(r).length>0&&(o.desiredHash?e.hash=o.desiredHash:n?n.replaceState(n.state,"",e.pathname+e.search):e.hash="")):((r=JSON.parse(t.getItem(wF)||"{}")).source="localstorage",delete r.userIntent),!(!r.token||this.instance.config.token!==r.token||(this.loadToolbar(r),0))}catch(s){return!1}}Ko(e){var t=x_.ph_load_toolbar||x_.ph_load_editor;!ob(t)&&X_(t)?t(e,this.instance):EF.warn("No toolbar load function found")}loadToolbar(e){var t=!(null==__||!__.getElementById(KE));if(!v_||t)return!1;var n="custom"===this.instance.requestRouter.region&&this.instance.config.advanced_disable_toolbar_metrics,r=P_({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},n?{instrument:!1}:{});if(v_.localStorage.setItem(wF,JSON.stringify(P_({},r,{source:void 0}))),2===this.Jo())this.Ko(r);else if(0===this.Jo()){var i;this.Qo(1),null==(i=x_.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this.instance,"toolbar",e=>{if(e)return EF.error("[Toolbar] Failed to load",e),void this.Qo(0);this.Qo(2),this.Ko(r)}),_C(v_,"turbolinks:load",()=>{this.Qo(0),this.loadToolbar(r)})}return!0}Yo(e){return this.loadToolbar(e)}maybeLoadEditor(e,t,n){return void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===n&&(n=void 0),this.maybeLoadToolbar(e,t,n)}}},WF=P_({experiments:PF},RF),$F={conversations:class{constructor(e){this.Xo=void 0,this._conversationsManager=null,this.ea=!1,this.ta=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this._instance.config.disable_conversations){var t=e.conversations;ob(t)||(ub(t)?this.Xo=t:(this.Xo=t.enabled,this.ta=t),this.loadIfEnabled())}}reset(){var e;null==(e=this._conversationsManager)||e.reset(),this._conversationsManager=null,this.Xo=void 0,this.ta=null}loadIfEnabled(){if(!(this._conversationsManager||this.ea||this._instance.config.disable_conversations||bC(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var e=null==x_?void 0:x_.__PosthogExtensions__;
2if(e&&!tb(this.Xo)&&this.Xo)if(this.ta&&this.ta.token){this.ea=!0;try{var t=e.initConversations;if(t)return this.ra(t),void(this.ea=!1);var n=e.loadExternalDependency;if(!n)return void this.ia(ZE);n(this._instance,"conversations",t=>{t||!e.initConversations?this.ia("Could not load conversations script",t):this.ra(e.initConversations),this.ea=!1})}catch(e){this.ia("Error initializing conversations",e),this.ea=!1}}else OF.error("Conversations enabled but missing token in remote config.")}}ra(e){if(this.ta)try{this._conversationsManager=e(this.ta,this._instance),OF.info("Conversations loaded successfully")}catch(e){this.ia("Error completing conversations initialization",e)}else OF.error("Cannot complete initialization: remote config is null")}ia(e,t){OF.error(e,t),this._conversationsManager=null,this.ea=!1}show(){this._conversationsManager?this._conversationsManager.show():OF.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return!0===this.Xo&&!ib(this._conversationsManager)}isVisible(){var e,t;return null!==(e=null==(t=this._conversationsManager)?void 0:t.isVisible())&&void 0!==e&&e}sendMessage(e,t,n){var r=this;return I_(function*(){return r._conversationsManager?r._conversationsManager.sendMessage(e,t,n):(OF.warn(NF),null)})()}getMessages(e,t){var n=this;return I_(function*(){return n._conversationsManager?n._conversationsManager.getMessages(e,t):(OF.warn(NF),null)})()}markAsRead(e){var t=this;return I_(function*(){return t._conversationsManager?t._conversationsManager.markAsRead(e):(OF.warn(NF),null)})()}getTickets(e){var t=this;return I_(function*(){return t._conversationsManager?t._conversationsManager.getTickets(e):(OF.warn(NF),null)})()}requestRestoreLink(e){var t=this;return I_(function*(){return t._conversationsManager?t._conversationsManager.requestRestoreLink(e):(OF.warn(NF),null)})()}restoreFromToken(e){var t=this;return I_(function*(){return t._conversationsManager?t._conversationsManager.restoreFromToken(e):(OF.warn(NF),null)})()}restoreFromUrlToken(){var e=this;return I_(function*(){return e._conversationsManager?e._conversationsManager.restoreFromUrlToken():(OF.warn(NF),null)})()}getCurrentTicketId(){var e,t;return null!==(e=null==(t=this._conversationsManager)?void 0:t.getCurrentTicketId())&&void 0!==e?e:null}getWidgetSessionId(){var e,t;return null!==(e=null==(t=this._conversationsManager)?void 0:t.getWidgetSessionId())&&void 0!==e?e:null}ln(){var e;null==(e=this._conversationsManager)||e.setIdentity()}hn(){var e;null==(e=this._conversationsManager)||e.clearIdentity()}}},VF={logs:class{constructor(e){var t;this.na=!1,this.sa=!1,this.Gt=tE("[logs]"),this.oa=[],this.aa=0,this.ua=0,this.la=!1,this._instance=e,this._instance&&null!=(t=this._instance.config.logs)&&t.captureConsoleLogs&&(this.na=!0)}initialize(){this.loadIfEnabled()}onRemoteConfig(e){var t,n=null==(t=e.logs)?void 0:t.captureConsoleLogs;!ob(n)&&n&&(this.na=!0,this.loadIfEnabled())}reset(){this.oa=[],this.qr&&(clearTimeout(this.qr),this.qr=void 0),this.aa=0,this.ua=0,this.la=!1}loadIfEnabled(){if(this.na&&!this.sa){var e=null==x_?void 0:x_.__PosthogExtensions__;if(e){var t=e.loadExternalDependency;t?t(this._instance,"logs",t=>{var n;t||null==(n=e.logs)||!n.initializeLogs?this.Gt.error("Could not load logs script",t):(e.logs.initializeLogs(this._instance),this.sa=!0)}):this.Gt.error(ZE)}else this.Gt.error("PostHog Extensions not found.")}}captureLog(e){var t,n,r,i,o,s;if(this._instance.is_capturing())if(e&&e.body){var a=null!==(t=null==(n=this._instance.config.logs)?void 0:n.flushIntervalMs)&&void 0!==t?t:3e3,u=null!==(r=null==(i=this._instance.config.logs)?void 0:i.maxLogsPerInterval)&&void 0!==r?r:1e3,l=Date.now();if(a>l-this.ua||(this.ua=l,this.aa=0,this.la=!1),u>this.aa){this.aa++;var c=function(e,t){var n=e.level||"info",{text:r,number:i}=yw[n]||Dw,o=String(Date.now())+"000000",s={};t.distinctId&&(s.posthogDistinctId=t.distinctId),t.sessionId&&(s.sessionId=t.sessionId),t.currentUrl&&(s["url.full"]=t.currentUrl),t.screenName&&(s["screen.name"]=t.screenName),t.appState&&(s["app.state"]=t.appState),t.activeFeatureFlags&&t.activeFeatureFlags.length>0&&(s.feature_flags=t.activeFeatureFlags);var a=P_({},s,e.attributes||{}),u={timeUnixNano:o,observedTimeUnixNano:o,severityNumber:i,severityText:r,body:{stringValue:e.body},attributes:bw(a)};return e.trace_id&&(u.traceId=e.trace_id),e.span_id&&(u.spanId=e.span_id),tb(e.trace_flags)||(u.flags=e.trace_flags),u}(e,this.ha());this.oa.push({record:c}),(null!==(o=null==(s=this._instance.config.logs)?void 0:s.maxBufferSize)&&void 0!==o?o:100)>this.oa.length?this.ca():this.flushLogs()}else this.la||(this.Gt.warn("captureLog dropping logs: exceeded "+u+" logs per "+a+"ms"),this.la=!0)}else this.Gt.warn("captureLog requires a body")}get logger(){return this.da||(this.da={trace:(e,t)=>this.captureLog({body:e,level:"trace",attributes:t}),debug:(e,t)=>this.captureLog({body:e,level:"debug",attributes:t}),info:(e,t)=>this.captureLog({body:e,level:"info",attributes:t}),warn:(e,t)=>this.captureLog({body:e,level:"warn",attributes:t}),error:(e,t)=>
2this.captureLog({body:e,level:"error",attributes:t}),fatal:(e,t)=>this.captureLog({body:e,level:"fatal",attributes:t})}),this.da}flushLogs(e){if(this.qr&&(clearTimeout(this.qr),this.qr=void 0),0!==this.oa.length){var t=this.oa;this.oa=[];var n=this._instance.config.logs,r=P_({"service.name":(null==n?void 0:n.serviceName)||"unknown_service"},(null==n?void 0:n.environment)&&{"deployment.environment":n.environment},(null==n?void 0:n.serviceVersion)&&{"service.version":n.serviceVersion},null==n?void 0:n.resourceAttributes),i=function(e,t,n,r){return{resourceLogs:[{resource:{attributes:bw(t)},scopeLogs:[{scope:{name:n,version:r},logRecords:e}]}]}}(t.map(e=>e.record),r,A_.LIB_NAME,A_.LIB_VERSION),o=this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token);this._instance.Bi({method:"POST",url:o,data:i,compression:"best-available",batchKey:"logs",transport:e})}}ca(){var e,t;this.qr||(this.qr=setTimeout(()=>{this.qr=void 0,this.flushLogs()},null!==(e=null==(t=this._instance.config.logs)?void 0:t.flushIntervalMs)&&void 0!==e?e:3e3))}ha(){var e,t={};if(t.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var{sessionId:n}=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);t.sessionId=n}if(null!=x_&&null!=(e=x_.location)&&e.href&&(t.currentUrl=x_.location.href),this._instance.featureFlags){var r=this._instance.featureFlags.getFlags();r&&r.length>0&&(t.activeFeatureFlags=r)}return t}}},GF=P_({},RF,BF,LF,MF,jF,zF,HF,UF,qF,WF,$F,VF);gx.__defaultExtensionClasses=P_({},GF);var KF,YF=(KF=nx[lx]=new gx,function(){function e(){e.done||(e.done=!0,cx=!1,hC(nx,function(e){e._dom_loaded()}))}null!=__&&__.addEventListener?"complete"===__.readyState?e():_C(__,"DOMContentLoaded",e,{capture:!1}):v_&&eE.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),KF);let JF=!1;const QF=e=>{switch(e){case"error":return"#f44336";case"success":return"#4caf50";default:return"#2196f3"}},XF=e=>t=>{let{gridUnit:n}=t;return{position:"fixed",bottom:5*n,left:"50%",transform:"translateX(-50%)",padding:"".concat(3*n,"px ").concat(5*n,"px"),background:QF(e),color:"white",borderRadius:1.5*n,boxShadow:"0 ".concat(n,"px ").concat(3*n,"px rgba(0,0,0,0.2)"),zIndex:9999,display:"flex",alignItems:"center",gap:3*n,maxWidth:"90vw",fontSize:4*n}},ZF=e=>{let{gridUnit:t}=e;return{background:"transparent",border:"none",color:"white",cursor:"pointer",padding:t,fontSize:4*t,lineHeight:1,opacity:.8,"&:hover":{opacity:1}}},eA=e=>{let{message:t,type:n,onDismiss:r,duration:i=5e3}=e;const[o,s]=(0,ee.useState)(!0);return(0,ee.useEffect)(()=>{const e=setTimeout(()=>{s(!1),setTimeout(r,300)},i);return()=>clearTimeout(e)},[i,r]),o?p_("div",{css:XF(n),role:"alert","aria-live":"polite",children:[h_("span",{children:t}),h_("button",{css:ZF,onClick:r,"aria-label":"Dismiss",children:"\xd7"})]}):null},tA=(0,ee.createContext)({showToast:()=>{},showError:()=>{},showSuccess:()=>{},showInfo:()=>{}});let nA=0;const rA=e=>{let{children:t}=e;const[n,r]=(0,ee.useState)([]),i=(0,ee.useCallback)(e=>{r(t=>t.filter(t=>t.id!==e))},[]),o=(0,ee.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info";const n=++nA;r(r=>[...r,{id:n,message:e,type:t}])},[]),s=(0,ee.useCallback)(e=>{o(e,"error")},[o]),a=(0,ee.useCallback)(e=>{o(e,"success")},[o]),u=(0,ee.useCallback)(e=>{o(e,"info")},[o]),l={showToast:o,showError:s,showSuccess:a,showInfo:u};return p_(tA.Provider,{value:l,children:[t,n.map(e=>h_(eA,{message:e.message,type:e.type,onDismiss:()=>i(e.id)},e.id))]})};var iA=function(e,t){var n=arguments;if(null==t||!Sr.call(t,"css"))return ee.createElement.apply(void 0,n);var r=n.length,i=new Array(r);i[0]=Ir,i[1]=Fr(e,t);for(var o=2;o<r;o++)i[o]=n[o];return ee.createElement.apply(null,i)};!function(e){var t;t||(t=e.JSX||(e.JSX={}))}(iA||(iA={}));function oA(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return yr(t)}function sA(){}function aA(e){return null==e?sA:function(){return this.querySelector(e)}}function uA(){return[]}function lA(e){return null==e?uA:function(){return this.querySelectorAll(e)}}function cA(e){return function(){return function(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}(e.apply(this,arguments))}}function dA(e){return function(){return this.matches(e)}}function hA(e){return function(t){return t.matches(e)}}var pA=Array.prototype.find;function fA(){return this.firstElementChild}var gA=Array.prototype.filter;function mA(){return Array.from(this.children)}function vA(e){return new Array(e.length)}function yA(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function DA(e,t,n,r,i,o){for(var s,a=0,u=t.length,l=o.length;a<l;++a)(s=t[a])?(s.__data__=o[a],r[a]=s):n[a]=new yA(e,o[a]);for(;a<u;
vendor: 12,553 bytes, line 2
2++a)(s=t[a])&&(i[a]=s)}function _A(e,t,n,r,i,o,s){var a,u,l,c=new Map,d=t.length,h=o.length,p=new Array(d);for(a=0;a<d;++a)(u=t[a])&&(p[a]=l=s.call(u,u.__data__,a,t)+"",c.has(l)?i[a]=u:c.set(l,u));for(a=0;a<h;++a)l=s.call(e,o[a],a,o)+"",(u=c.get(l))?(r[a]=u,u.__data__=o[a],c.delete(l)):n[a]=new yA(e,o[a]);for(a=0;a<d;++a)(u=t[a])&&c.get(p[a])===u&&(i[a]=u)}function bA(e){return e.__data__}function wA(e){return"object"===typeof e&&"length"in e?e:Array.from(e)}function EA(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}yA.prototype={constructor:yA,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};var CA="http://www.w3.org/1999/xhtml";const kA={svg:"http://www.w3.org/2000/svg",xhtml:CA,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function SA(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),kA.hasOwnProperty(t)?{space:kA[t],local:e}:e}function xA(e){return function(){this.removeAttribute(e)}}function FA(e){return function(){this.removeAttributeNS(e.space,e.local)}}function AA(e,t){return function(){this.setAttribute(e,t)}}function TA(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function IA(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function PA(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function OA(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function NA(e){return function(){this.style.removeProperty(e)}}function RA(e,t,n){return function(){this.style.setProperty(e,t,n)}}function BA(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function LA(e,t){return e.style.getPropertyValue(t)||OA(e).getComputedStyle(e,null).getPropertyValue(t)}function MA(e){return function(){delete this[e]}}function jA(e,t){return function(){this[e]=t}}function zA(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function UA(e){return e.trim().split(/^|\s+/)}function HA(e){return e.classList||new qA(e)}function qA(e){this._node=e,this._names=UA(e.getAttribute("class")||"")}function WA(e,t){for(var n=HA(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function $A(e,t){for(var n=HA(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function VA(e){return function(){WA(this,e)}}function GA(e){return function(){$A(this,e)}}function KA(e,t){return function(){(t.apply(this,arguments)?WA:$A)(this,e)}}function YA(){this.textContent=""}function JA(e){return function(){this.textContent=e}}function QA(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function XA(){this.innerHTML=""}function ZA(e){return function(){this.innerHTML=e}}function eT(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function tT(){this.nextSibling&&this.parentNode.appendChild(this)}function nT(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function rT(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===CA&&t.documentElement.namespaceURI===CA?t.createElement(e):t.createElementNS(n,e)}}function iT(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function oT(e){var t=SA(e);return(t.local?iT:rT)(t)}function sT(){return null}function aT(){var e=this.parentNode;e&&e.removeChild(this)}function uT(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function lT(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function cT(e){return function(){var t=this.__on;if(t){for(var n,r=0,i=-1,o=t.length;r<o;++r)n=t[r],e.type&&n.type!==e.type||n.name!==e.name?t[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?t.length=i:delete this.__on}}}function dT(e,t,n){return function(){var r,i=this.__on,o=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(i)for(var s=0,a=i.length;s<a;++s)if((r=i[s]).type===e.type&&r.name===e.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),void(r.value=t);this.addEventListener(e.type,o,n),r={type:e.type,name:e.name,value:t,listener:o,options:n},i?i.push(r):this.__on=[r]}}function hT(e,t,n){var r=OA(e),i=r.CustomEvent;"function"===typeof i?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function pT(e,t){return function(){return hT(this,e,t)}}function fT(e,t){return function(){return hT(this,e,t.apply(this,arguments))}}qA.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var gT=[null];function mT(e,t){this._groups=e,this._parents=t}function vT(){return new mT([[document.documentElement]],gT)}mT.prototype=vT.prototype={constructor:mT,select:function(e){"function"!==typeof e&&(e=aA(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o,s,a=t[i],u=a.length,l=r[i]=new Array(u),c=0;c<u;++c)(o=a[c])&&(s=e.call(o,o.__data__,c,a))&&("__data__"in o&&(s.__data__=o.__data__),l[c]=s);return new mT(r,this._parents)},selectAll:function(e){e="function"===typeof e?cA(e):lA(e);for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var s,a=t[o],u=a.length,l=0;l<u;++l)(s=a[l])&&(r.push(e.call(s,s.__data__,l,a)),i.push(s));return new mT(r,i)},selectChild:function(e){return this.select(null==e?fA:function(e){return function(){return pA.call(this.children,e)}}("function"===typeof e?e:hA(e)))},selectChildren:function(e){return this.selectAll(null==e?mA:function(e){return function(){return gA.call(this.children,e)}}("function"===typeof e?e:hA(e)))},filter:function(e){"function"!==typeof e&&(e=dA(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o,s=t[i],a=s.length,u=r[i]=[],l=0;l<a;++l)(o=s[l])&&e.call(o,o.__data__,l,s)&&u.push(o);return new mT(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,bA);var n=t?_A:DA,r=this._parents,i=this._groups;"function"!==typeof e&&(e=function(e){return function(){return e}}(e));for(var o=i.length,s=new Array(o),a=new Array(o),u=new Array(o),l=0;l<o;++l){var c=r[l],d=i[l],h=d.length,p=wA(e.call(c,c&&c.__data__,l,r)),f=p.length,g=a[l]=new Array(f),m=s[l]=new Array(f);n(c,d,g,m,u[l]=new Array(h),p,t);for(var v,y,D=0,_=0;D<f;++D)if(v=g[D]){for(D>=_&&(_=D+1);!(y=m[_])&&++_<f;);v._next=y||null}}return(s=new mT(s,r))._enter=a,s._exit=u,s},enter:function(){return new mT(this._enter||this._groups.map(vA),this._parents)},exit:function(){return new mT(this._exit||this._groups.map(vA),this._parents)},join:function(e,t,n){var r=this.enter(),i=this,o=this.exit();return"function"===typeof e?(r=e(r))&&(r=r.selection()):r=r.append(e+""),null!=t&&(i=t(i))&&(i=i.selection()),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,o=r.length,s=Math.min(i,o),a=new Array(i),u=0;u<s;++u)for(var l,c=n[u],d=r[u],h=c.length,p=a[u]=new Array(h),f=0;f<h;++f)(l=c[f]||d[f])&&(p[f]=l);for(;u<i;++u)a[u]=n[u];return new mT(a,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r,i=e[t],o=i.length-1,s=i[o];--o>=0;)(r=i[o])&&(s&&4^r.compareDocumentPosition(s)&&s.parentNode.insertBefore(r,s),s=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=EA);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var s,a=n[o],u=a.length,l=i[o]=new Array(u),c=0;c<u;++c)(s=a[c])&&(l[c]=s);l.sort(t)}return new mT(i,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var s=r[i];if(s)return s}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i,o=t[n],s=0,a=o.length;s<a;++s)(i=o[s])&&e.call(i,i.__data__,s,o);return this},attr:function(e,t){var n=SA(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==t?n.local?FA:xA:"function"===typeof t?n.local?PA:IA:n.local?TA:AA)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?NA:"function"===typeof t?BA:RA)(e,t,null==n?"":n)):LA(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?MA:"function"===typeof t?zA:jA)(e,t)):this.node()[e]},classed:function(e,t){var n=UA(e+"");if(arguments.length<2){for(var r=HA(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"===typeof t?KA:t?VA:GA)(n,t))},text:function(e){return arguments.length?this.each(null==e?YA:("function"===typeof e?QA:JA)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?XA:("function"===typeof e?eT:ZA)(e)):this.node().innerHTML},raise:function(){return this.each(tT)},lower:function(){return this.each(nT)},append:function(e){var t="function"===typeof e?e:oT(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})},insert:function(e,t){var n="function"===typeof e?e:oT(e),r=null==t?sT:"function"===typeof t?t:aA(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(aT)},clone:function(e){return this.select(e?lT:uT)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,i,o=function(e){return e.trim().split(/^|\s+/).map(function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}(e+""),s=o.length;if(!(arguments.length<2)){for(a=t?dT:cT,r=0;r<s;++r)this.each(a(o[r],t,n));return this}var a=this.node().__on;if(a)for(var u,l=0,c=a.length;l<c;++l)for(r=0,u=a[l];r<s;++r)if((i=o[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(e,t){return this.each(("function"===typeof t?fT:pT)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r,i=e[t],o=0,s=i.length;o<s;++o)(r=i[o])&&(yield r)}};const yT=vT;var DT={value:()=>{}};function _T(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new bT(r)}function bT(e){this._=e}function wT(e,t){for(var n,r=0,i=e.length;r<i;++r)if((n=e[r]).name===t)return n.value}function ET(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=DT,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}bT.prototype=_T.prototype={constructor:bT,on:function(e,t){var n,r,i=this._,o=(r=i,(e+"").trim().split(/^|\s+/).map(function(e){var t="",n=e.indexOf(".");if(n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!r.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}})),s=-1,a=o.length;if(!(arguments.length<2)){if(null!=t&&"function"!==typeof t)throw new Error("invalid callback: "+t);for(;++s<a;)if(n=(e=o[s]).type)i[n]=ET(i[n],e.name,t);else if(null==t)for(n in i)i[n]=ET(i[n],e.name,null);return this}for(;++s<a;)if((n=(e=o[s]).type)&&(n=wT(i[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new bT(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=0,n=(r=this._[e]).length;o<n;++o)r[o].value.apply(t,i)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}};const CT=_T;
vendor: 5,230 bytes, line 2
2var kT,ST,xT=0,FT=0,AT=0,TT=0,IT=0,PT=0,OT="object"===typeof performance&&performance.now?performance:Date,NT="object"===typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function RT(){return IT||(NT(BT),IT=OT.now()+PT)}function BT(){IT=0}function LT(){this._call=this._time=this._next=null}function MT(e,t,n){var r=new LT;return r.restart(e,t,n),r}function jT(){IT=(TT=OT.now())+PT,xT=FT=0;try{!function(){RT(),++xT;for(var e,t=kT;t;)(e=IT-t._time)>=0&&t._call.call(void 0,e),t=t._next;--xT}()}finally{xT=0,function(){var e,t,n=kT,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:kT=t);ST=e,UT(r)}(),IT=0}}function zT(){var e=OT.now(),t=e-TT;t>1e3&&(PT-=t,TT=e)}function UT(e){xT||(FT&&(FT=clearTimeout(FT)),e-IT>24?(e<1/0&&(FT=setTimeout(jT,e-OT.now()-PT)),AT&&(AT=clearInterval(AT))):(AT||(TT=OT.now(),AT=setInterval(zT,1e3)),xT=1,NT(jT)))}function HT(e,t,n){var r=new LT;return t=null==t?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}LT.prototype=MT.prototype={constructor:LT,restart:function(e,t,n){if("function"!==typeof e)throw new TypeError("callback is not a function");n=(null==n?RT():+n)+(null==t?0:+t),this._next||ST===this||(ST?ST._next=this:kT=this,ST=this),this._call=e,this._time=n,UT()},stop:function(){this._call&&(this._call=null,this._time=1/0,UT())}};var qT=CT("start","end","cancel","interrupt"),WT=[];function $T(e,t,n,r,i,o){var s=e.__transition;if(s){if(n in s)return}else e.__transition={};!function(e,t,n){var r,i=e.__transition;function o(e){n.state=1,n.timer.restart(s,n.delay,n.time),n.delay<=e&&s(e-n.delay)}function s(o){var l,c,d,h;if(1!==n.state)return u();for(l in i)if((h=i[l]).name===n.name){if(3===h.state)return HT(s);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete i[l]):+l<t&&(h.state=6,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete i[l])}if(HT(function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(o))}),n.state=2,n.on.call("start",e,e.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(d=n.tween.length),l=0,c=-1;l<d;++l)(h=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(r[++c]=h);r.length=c+1}}function a(t){for(var i=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(u),n.state=5,1),o=-1,s=r.length;++o<s;)r[o].call(e,i);5===n.state&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){for(var r in n.state=6,n.timer.stop(),delete i[t],i)return;delete e.__transition}i[t]=n,n.timer=MT(o,0,n.time)}(e,n,{name:t,index:r,group:i,on:qT,tween:WT,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function VT(e,t){var n=KT(e,t);if(n.state>0)throw new Error("too late; already scheduled");return n}function GT(e,t){var n=KT(e,t);if(n.state>3)throw new Error("too late; already running");return n}function KT(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function YT(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var JT,QT=180/Math.PI,XT={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ZT(e,t,n,r,i,o){var s,a,u;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(u=e*n+t*r)&&(n-=e*u,r-=t*u),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,u/=a),e*r<t*n&&(e=-e,t=-t,u=-u,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*QT,skewX:Math.atan(u)*QT,scaleX:s,scaleY:a}}function eI(e,t,n,r){function i(e){return e.length?e.pop()+" ":""}return function(o,s){var a=[],u=[];return o=e(o),s=e(s),function(e,r,i,o,s,a){if(e!==i||r!==o){var u=s.push("translate(",null,t,null,n);a.push({i:u-4,x:YT(e,i)},{i:u-2,x:YT(r,o)})}else(i||o)&&s.push("translate("+i+t+o+n)}(o.translateX,o.translateY,s.translateX,s.translateY,a,u),function(e,t,n,o){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:YT(e,t)})):t&&n.push(i(n)+"rotate("+t+r)}(o.rotate,s.rotate,a,u),function(e,t,n,o){e!==t?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:YT(e,t)}):t&&n.push(i(n)+"skewX("+t+r)}(o.skewX,s.skewX,a,u),function(e,t,n,r,o,s){if(e!==n||t!==r){var a=o.push(i(o)+"scale(",null,",",null,")");s.push({i:a-4,x:YT(e,n)},{i:a-2,x:YT(t,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,s.scaleX,s.scaleY,a,u),o=s=null,function(e){for(var t,n=-1,r=u.length;++n<r;)a[(t=u[n]).i]=t.x(e);return a.join("")}}}var tI=eI(function(e){const t=new("function"===typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?XT:ZT(t.a,t.b,t.c,t.d,t.e,t.f)},"px, ","px)","deg)"),nI=eI(function(e){return null==e?XT:(JT||(JT=document.createElementNS("http://www.w3.org/2000/svg","g")),JT.setAttribute("transform",e),(e=JT.transform.baseVal.consolidate())?ZT((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):XT)},", ",")",")");function rI(e,t){var n,r;return function(){var i=GT(this,e),o=i.tween;if(o!==n)for(var s=0,a=(r=n=o).length;s<a;++s)if(r[s].name===t){(r=r.slice()).splice(s,1);break}i.tween=r}}function iI(e,t,n){var r,i;if("function"!==typeof n)throw new Error;return function(){var o=GT(this,e),s=o.tween;if(s!==r){i=(r=s).slice();for(var a={name:t,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===t){i[u]=a;break}u===l&&i.push(a)}o.tween=i}}
vendor: 4,215 bytes, line 2
2function oI(e,t,n){var r=e._id;return e.each(function(){var e=GT(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)}),function(e){return KT(e,r).value[t]}}function sI(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function aI(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function uI(){}var lI=.7,cI=1/lI,dI="\\s*([+-]?\\d+)\\s*",hI="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",pI="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",fI=/^#([0-9a-f]{3,8})$/,gI=new RegExp("^rgb\\(".concat(dI,",").concat(dI,",").concat(dI,"\\)$")),mI=new RegExp("^rgb\\(".concat(pI,",").concat(pI,",").concat(pI,"\\)$")),vI=new RegExp("^rgba\\(".concat(dI,",").concat(dI,",").concat(dI,",").concat(hI,"\\)$")),yI=new RegExp("^rgba\\(".concat(pI,",").concat(pI,",").concat(pI,",").concat(hI,"\\)$")),DI=new RegExp("^hsl\\(".concat(hI,",").concat(pI,",").concat(pI,"\\)$")),_I=new RegExp("^hsla\\(".concat(hI,",").concat(pI,",").concat(pI,",").concat(hI,"\\)$")),bI={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function wI(){return this.rgb().formatHex()}function EI(){return this.rgb().formatRgb()}function CI(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=fI.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?kI(t):3===n?new FI(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?SI(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?SI(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=gI.exec(e))?new FI(t[1],t[2],t[3],1):(t=mI.exec(e))?new FI(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=vI.exec(e))?
vendor: 5,623 bytes, line 2
2SI(t[1],t[2],t[3],t[4]):(t=yI.exec(e))?SI(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=DI.exec(e))?NI(t[1],t[2]/100,t[3]/100,1):(t=_I.exec(e))?NI(t[1],t[2]/100,t[3]/100,t[4]):bI.hasOwnProperty(e)?kI(bI[e]):"transparent"===e?new FI(NaN,NaN,NaN,0):null}function kI(e){return new FI(e>>16&255,e>>8&255,255&e,1)}function SI(e,t,n,r){return r<=0&&(e=t=n=NaN),new FI(e,t,n,r)}function xI(e,t,n,r){return 1===arguments.length?function(e){return e instanceof uI||(e=CI(e)),e?new FI((e=e.rgb()).r,e.g,e.b,e.opacity):new FI}(e):new FI(e,t,n,null==r?1:r)}function FI(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function AI(){return"#".concat(OI(this.r)).concat(OI(this.g)).concat(OI(this.b))}function TI(){const e=II(this.opacity);return"".concat(1===e?"rgb(":"rgba(").concat(PI(this.r),", ").concat(PI(this.g),", ").concat(PI(this.b)).concat(1===e?")":", ".concat(e,")"))}function II(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function PI(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function OI(e){return((e=PI(e))<16?"0":"")+e.toString(16)}function NI(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new BI(e,t,n,r)}function RI(e){if(e instanceof BI)return new BI(e.h,e.s,e.l,e.opacity);if(e instanceof uI||(e=CI(e)),!e)return new BI;if(e instanceof BI)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=NaN,a=o-i,u=(o+i)/2;return a?(s=t===o?(n-r)/a+6*(n<r):n===o?(r-t)/a+2:(t-n)/a+4,a/=u<.5?o+i:2-o-i,s*=60):a=u>0&&u<1?0:s,new BI(s,a,u,e.opacity)}function BI(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function LI(e){return(e=(e||0)%360)<0?e+360:e}function MI(e){return Math.max(0,Math.min(1,e||0))}function jI(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function zI(e,t,n,r,i){var o=e*e,s=o*e;return((1-3*e+3*o-s)*t+(4-6*o+3*s)*n+(1+3*e+3*o-3*s)*r+s*i)/6}sI(uI,CI,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:wI,formatHex:wI,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return RI(this).formatHsl()},formatRgb:EI,toString:EI}),sI(FI,xI,aI(uI,{brighter(e){return e=null==e?cI:Math.pow(cI,e),new FI(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?lI:Math.pow(lI,e),new FI(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new FI(PI(this.r),PI(this.g),PI(this.b),II(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:AI,formatHex:AI,formatHex8:function(){return"#".concat(OI(this.r)).concat(OI(this.g)).concat(OI(this.b)).concat(OI(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:TI,toString:TI})),sI(BI,function(e,t,n,r){return 1===arguments.length?RI(e):new BI(e,t,n,null==r?1:r)},aI(uI,{brighter(e){return e=null==e?cI:Math.pow(cI,e),new BI(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?lI:Math.pow(lI,e),new BI(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new FI(jI(e>=240?e-240:e+120,i,r),jI(e,i,r),jI(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new BI(LI(this.h),MI(this.s),MI(this.l),II(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=II(this.opacity);return"".concat(1===e?"hsl(":"hsla(").concat(LI(this.h),", ").concat(100*MI(this.s),"%, ").concat(100*MI(this.l),"%").concat(1===e?")":", ".concat(e,")"))}}));const UI=e=>()=>e;function HI(e,t){return function(n){return e+n*t}}function qI(e){return 1===(e=+e)?WI:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):UI(isNaN(t)?n:t)}}function WI(e,t){var n=t-e;return n?HI(e,n):UI(isNaN(e)?t:e)}const $I=function e(t){var n=qI(t);function r(e,t){var r=n((e=xI(e)).r,(t=xI(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),s=WI(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=s(t),e+""}}return r.gamma=e,r}(1);function VI(e){return function(t){var n,r,i=t.length,o=new Array(i),s=new Array(i),a=new Array(i);for(n=0;n<i;++n)r=xI(t[n]),o[n]=r.r||0,s[n]=r.g||0,a[n]=r.b||0;return o=e(o),s=e(s),a=e(a),r.opacity=1,function(e){return r.r=o(e),r.g=s(e),r.b=a(e),r+""}}}VI(function(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],s=r>0?e[r-1]:2*i-o,a=r<t-1?e[r+2]:2*o-i;return zI((n-r/t)*t,s,i,o,a)}}),VI(function(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],o=e[r%t],s=e[(r+1)%t],a=e[(r+2)%t];return zI((n-r/t)*t,i,o,s,a)}});var GI=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,KI=new RegExp(GI.source,"g");function YI(e,t){var n,r,i,o=GI.lastIndex=KI.lastIndex=0,s=-1,a=[],u=[];for(e+="",t+="";(n=GI.exec(e))&&(r=KI.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),a[s]?a[s]+=i:a[++s]=i),(n=n[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,u.push({i:s,x:YT(n,r)})),o=KI.lastIndex;return o<t.length&&(i=t.slice(o),a[s]?a[s]+=i:a[++s]=i),a.length<2?u[0]?function(e){return function(t){return e(t)+""}}(u[0].x):function(e){return function(){return e}}(t):(t=u.length,function(e){for(var n,r=0;r<t;++r)a[(n=u[r]).i]=n.x(e);return a.join("")})}function JI(e,t){var n;return("number"===typeof t?YT:t instanceof CI?$I:(n=CI(t))?(t=n,$I):YI)(e,t)}function QI(e){return function(){this.removeAttribute(e)}}function XI(e){return function(){this.removeAttributeNS(e.space,e.local)}}
vendor: 5,272 bytes, line 2
2function ZI(e,t,n){var r,i,o=n+"";return function(){var s=this.getAttribute(e);return s===o?null:s===r?i:i=t(r=s,n)}}function eP(e,t,n){var r,i,o=n+"";return function(){var s=this.getAttributeNS(e.space,e.local);return s===o?null:s===r?i:i=t(r=s,n)}}function tP(e,t,n){var r,i,o;return function(){var s,a,u=n(this);if(null!=u)return(s=this.getAttribute(e))===(a=u+"")?null:s===r&&a===i?o:(i=a,o=t(r=s,u));this.removeAttribute(e)}}function nP(e,t,n){var r,i,o;return function(){var s,a,u=n(this);if(null!=u)return(s=this.getAttributeNS(e.space,e.local))===(a=u+"")?null:s===r&&a===i?o:(i=a,o=t(r=s,u));this.removeAttributeNS(e.space,e.local)}}function rP(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&function(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,i)),n}return i._value=t,i}function iP(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&function(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,i)),n}return i._value=t,i}function oP(e,t){return function(){VT(this,e).delay=+t.apply(this,arguments)}}function sP(e,t){return t=+t,function(){VT(this,e).delay=t}}function aP(e,t){return function(){GT(this,e).duration=+t.apply(this,arguments)}}function uP(e,t){return t=+t,function(){GT(this,e).duration=t}}var lP=yT.prototype.constructor;function cP(e){return function(){this.style.removeProperty(e)}}var dP=0;function hP(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function pP(){return++dP}var fP=yT.prototype;hP.prototype=function(e){return yT().transition(e)}.prototype={constructor:hP,select:function(e){var t=this._name,n=this._id;"function"!==typeof e&&(e=aA(e));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s)for(var a,u,l=r[s],c=l.length,d=o[s]=new Array(c),h=0;h<c;++h)(a=l[h])&&(u=e.call(a,a.__data__,h,l))&&("__data__"in a&&(u.__data__=a.__data__),d[h]=u,$T(d[h],t,n,h,d,KT(a,n)));return new hP(o,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!==typeof e&&(e=lA(e));for(var r=this._groups,i=r.length,o=[],s=[],a=0;a<i;++a)for(var u,l=r[a],c=l.length,d=0;d<c;++d)if(u=l[d]){for(var h,p=e.call(u,u.__data__,d,l),f=KT(u,n),g=0,m=p.length;g<m;++g)(h=p[g])&&$T(h,t,n,g,p,f);o.push(p),s.push(u)}return new hP(o,s,t,n)},selectChild:fP.selectChild,selectChildren:fP.selectChildren,filter:function(e){"function"!==typeof e&&(e=dA(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o,s=t[i],a=s.length,u=r[i]=[],l=0;l<a;++l)(o=s[l])&&e.call(o,o.__data__,l,s)&&u.push(o);return new hP(r,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),s=new Array(r),a=0;a<o;++a)for(var u,l=t[a],c=n[a],d=l.length,h=s[a]=new Array(d),p=0;p<d;++p)(u=l[p]||c[p])&&(h[p]=u);for(;a<r;++a)s[a]=t[a];return new hP(s,this._parents,this._name,this._id)},selection:function(){return new lP(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=pP(),r=this._groups,i=r.length,o=0;o<i;++o)for(var s,a=r[o],u=a.length,l=0;l<u;++l)if(s=a[l]){var c=KT(s,t);$T(s,e,n,l,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new hP(r,this._parents,e,n)},call:fP.call,nodes:fP.nodes,node:fP.node,size:fP.size,empty:fP.empty,each:fP.each,on:function(e,t){var n=this._id;return arguments.length<2?KT(this.node(),n).on.on(e):this.each(function(e,t,n){var r,i,o=function(e){return(e+"").trim().split(/^|\s+/).every(function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e})}(t)?VT:GT;return function(){var s=o(this,e),a=s.on;a!==r&&(i=(r=a).copy()).on(t,n),s.on=i}}(n,e,t))},attr:function(e,t){var n=SA(e),r="transform"===n?nI:JI;return this.attrTween(e,"function"===typeof t?(n.local?nP:tP)(n,r,oI(this,"attr."+e,t)):null==t?(n.local?XI:QI)(n):(n.local?eP:ZI)(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!==typeof t)throw new Error;var r=SA(e);return this.tween(n,(r.local?rP:iP)(r,t))},style:function(e,t,n){var r="transform"===(e+="")?tI:JI;return null==t?this.styleTween(e,function(e,t){var n,r,i;return function(){var o=LA(this,e),s=(this.style.removeProperty(e),LA(this,e));return o===s?null:o===n&&s===r?i:i=t(n=o,r=s)}}(e,r)).on("end.style."+e,cP(e)):"function"===typeof t?this.styleTween(e,function(e,t,n){var r,i,o;return function(){var s=LA(this,e),a=n(this),u=a+"";return null==a&&(this.style.removeProperty(e),u=a=LA(this,e)),s===u?null:s===r&&u===i?o:(i=u,o=t(r=s,a))}}(e,r,oI(this,"style."+e,t))).each(function(e,t){var n,r,i,o,s="style."+t,a="end."+s;return function(){var u=GT(this,e),l=u.on,c=null==u.value[s]?o||(o=cP(t)):void 0;l===n&&i===c||(r=(n=l).copy()).on(a,i=c),u.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,i,o=n+"";return function(){var s=LA(this,e);return s===o?null:s===r?i:i=t(r=s,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!==typeof t)throw new Error;return this.tween(r,function(e,t,n){var r,i;
vendor: 11,013 bytes, line 2
2function o(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&function(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}(e,o,n)),r}return o._value=t,o}(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"===typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(oI(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!==typeof e)throw new Error;return this.tween(t,function(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&function(e){return function(t){this.textContent=e.call(this,t)}}(r)),t}return r._value=e,r}(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,i=KT(this.node(),n).tween,o=0,s=i.length;o<s;++o)if((r=i[o]).name===e)return r.value;return null}return this.each((null==t?rI:iI)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"===typeof e?oP:sP)(t,e)):KT(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"===typeof e?aP:uP)(t,e)):KT(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(function(e,t){if("function"!==typeof t)throw new Error;return function(){GT(this,e).ease=t}}(t,e)):KT(this.node(),t).ease},easeVarying:function(e){if("function"!==typeof e)throw new Error;return this.each(function(e,t){return function(){var n=t.apply(this,arguments);if("function"!==typeof n)throw new Error;GT(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(o,s){var a={value:s},u={value:function(){0===--i&&o()}};n.each(function(){var n=GT(this,r),i=n.on;i!==e&&((t=(e=i).copy())._.cancel.push(a),t._.interrupt.push(a),t._.end.push(u)),n.on=t}),0===i&&o()})},[Symbol.iterator]:fP[Symbol.iterator]};var gP={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};function mP(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error("transition ".concat(t," not found"));return n}yT.prototype.interrupt=function(e){return this.each(function(){!function(e,t){var n,r,i,o=e.__transition,s=!0;if(o){for(i in t=null==t?null:t+"",o)(n=o[i]).name===t?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete o[i]):s=!1;s&&delete e.__transition}}(this,e)})},yT.prototype.transition=function(e){var t,n;e instanceof hP?(t=e._id,e=e._name):(t=pP(),(n=gP).time=RT(),e=null==e?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var s,a=r[o],u=a.length,l=0;l<u;++l)(s=a[l])&&$T(s,e,t,l,a,n||mP(s,t));return new hP(r,this._parents,e,t)};const{abs:vP,max:yP,min:DP}=Math;function _P(e){return[+e[0],+e[1]]}function bP(e){return[_P(e[0]),_P(e[1])]}["w","e"].map(wP),["n","s"].map(wP),["n","w","e","s","nw","ne","sw","se"].map(wP);function wP(e){return{type:e}}function EP(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,o,s,a,u,l,c,d,h,p=e._root,f={data:r},g=e._x0,m=e._y0,v=e._x1,y=e._y1;if(!p)return e._root=f,e;for(;p.length;)if((l=t>=(o=(g+v)/2))?g=o:v=o,(c=n>=(s=(m+y)/2))?m=s:y=s,i=p,!(p=p[d=c<<1|l]))return i[d]=f,e;if(a=+e._x.call(null,p.data),u=+e._y.call(null,p.data),t===a&&n===u)return f.next=p,i?i[d]=f:e._root=f,e;do{i=i?i[d]=new Array(4):e._root=new Array(4),(l=t>=(o=(g+v)/2))?g=o:v=o,(c=n>=(s=(m+y)/2))?m=s:y=s}while((d=c<<1|l)===(h=(u>=s)<<1|a>=o));return i[h]=p,i[d]=f,e}function CP(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function kP(e){return e[0]}function SP(e){return e[1]}function xP(e,t,n){var r=new FP(null==t?kP:t,null==n?SP:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function FP(e,t,n,r,i,o){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function AP(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var TP=xP.prototype=FP.prototype;function IP(e){return function(){return e}}function PP(e){return 1e-6*(e()-.5)}function OP(e){return e.x+e.vx}function NP(e){return e.y+e.vy}TP.copy=function(){var e,t,n=new FP(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=AP(r),n;for(e=[{source:r,target:n._root=new Array(4)}];r=e.pop();)for(var i=0;i<4;++i)(t=r.source[i])&&(t.length?e.push({source:t,target:r.target[i]=new Array(4)}):r.target[i]=AP(t));return n},TP.add=function(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return EP(this.cover(t,n),t,n,e)},TP.addAll=function(e){var t,n,r,i,o=e.length,s=new Array(o),a=new Array(o),u=1/0,l=1/0,c=-1/0,d=-1/0;for(n=0;n<o;++n)isNaN(r=+this._x.call(null,t=e[n]))||isNaN(i=+this._y.call(null,t))||(s[n]=r,a[n]=i,r<u&&(u=r),r>c&&(c=r),i<l&&(l=i),i>d&&(d=i));if(u>c||l>d)return this;for(this.cover(u,l).cover(c,d),n=0;n<o;++n)EP(this,s[n],a[n],e[n]);return this},TP.cover=function(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,o=(r=Math.floor(t))+1;else{for(var s,a,u=i-n||1,l=this._root;n>e||e>=i||r>t||t>=o;)switch(a=(t<r)<<1|e<n,(s=new Array(4))[a]=l,l=s,u*=2,a){case 0:i=n+u,o=r+u;break;case 1:n=i-u,o=r+u;break;case 2:i=n+u,r=o-u;break;case 3:n=i-u,r=o-u}this._root&&this._root.length&&(this._root=l)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this},TP.data=function(){var e=[];return this.visit(function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)}),e},TP.extent=function(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},TP.find=function(e,t,n){var r,i,o,s,a,u,l,c=this._x0,d=this._y0,h=this._x1,p=this._y1,f=[],g=this._root;for(g&&f.push(new CP(g,c,d,h,p)),null==n?n=1/0:(c=e-n,d=t-n,h=e+n,p=t+n,n*=n);u=f.pop();)if(!(!(g=u.node)||(i=u.x0)>h||(o=u.y0)>p||(s=u.x1)<c||(a=u.y1)<d))if(g.length){var m=(i+s)/2,v=(o+a)/2;f.push(new CP(g[3],m,v,s,a),new CP(g[2],i,v,m,a),new CP(g[1],m,o,s,v),new CP(g[0],i,o,m,v)),(l=(t>=v)<<1|e>=m)&&(u=f[f.length-1],f[f.length-1]=f[f.length-1-l],f[f.length-1-l]=u)}else{var y=e-+this._x.call(null,g.data),D=t-+this._y.call(null,g.data),_=y*y+D*D;if(_<n){var b=Math.sqrt(n=_);c=e-b,d=t-b,h=e+b,p=t+b,r=g.data}}return r},TP.remove=function(e){if(isNaN(o=+this._x.call(null,e))||isNaN(s=+this._y.call(null,e)))return this;var t,n,r,i,o,s,a,u,l,c,d,h,p=this._root,f=this._x0,g=this._y0,m=this._x1,v=this._y1;if(!p)return this;if(p.length)for(;;){if((l=o>=(a=(f+m)/2))?f=a:m=a,(c=s>=(u=(g+v)/2))?g=u:v=u,t=p,!(p=p[d=c<<1|l]))return this;if(!p.length)break;(t[d+1&3]||t[d+2&3]||t[d+3&3])&&(n=t,h=d)}for(;p.data!==e;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):t?(i?t[d]=i:delete t[d],(p=t[0]||t[1]||t[2]||t[3])&&p===(t[3]||t[2]||t[1]||t[0])&&!p.length&&(n?n[h]=p:this._root=p),this):(this._root=i,this)},TP.removeAll=function(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this},TP.root=function(){return this._root},TP.size=function(){var e=0;return this.visit(function(t){if(!t.length)do{++e}while(t=t.next)}),e},TP.visit=function(e){var t,n,r,i,o,s,a=[],u=this._root;for(u&&a.push(new CP(u,this._x0,this._y0,this._x1,this._y1));t=a.pop();)if(!e(u=t.node,r=t.x0,i=t.y0,o=t.x1,s=t.y1)&&u.length){var l=(r+o)/2,c=(i+s)/2;(n=u[3])&&a.push(new CP(n,l,c,o,s)),(n=u[2])&&a.push(new CP(n,r,c,l,s)),(n=u[1])&&a.push(new CP(n,l,i,o,c)),(n=u[0])&&a.push(new CP(n,r,i,l,c))}return this},TP.visitAfter=function(e){var t,n=[],r=[];for(this._root&&n.push(new CP(this._root,this._x0,this._y0,this._x1,this._y1));t=n.pop();){var i=t.node;if(i.length){var o,s=t.x0,a=t.y0,u=t.x1,l=t.y1,c=(s+u)/2,d=(a+l)/2;(o=i[0])&&n.push(new CP(o,s,a,c,d)),(o=i[1])&&n.push(new CP(o,c,a,u,d)),(o=i[2])&&n.push(new CP(o,s,d,c,l)),(o=i[3])&&n.push(new CP(o,c,d,u,l))}r.push(t)}for(;t=r.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this},TP.x=function(e){return arguments.length?(this._x=e,this):this._x},TP.y=function(e){return arguments.length?(this._y=e,this):this._y};const RP=4294967296;var BP=Math.PI*(3-Math.sqrt(5));function LP(e){var t,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,s=.6,a=new Map,u=MT(d),l=CT("tick","end"),c=function(){let e=1;return()=>(e=(1664525*e+1013904223)%RP)/RP}();function d(){h(),l.call("tick",t),n<r&&(u.stop(),l.call("end",t))}function h(r){var u,l,c=e.length;void 0===r&&(r=1);for(var d=0;d<r;++d)for(n+=(o-n)*i,a.forEach(function(e){e(n)}),u=0;u<c;++u)null==(l=e[u]).fx?l.x+=l.vx*=s:(l.x=l.fx,l.vx=0),null==l.fy?l.y+=l.vy*=s:(l.y=l.fy,l.vy=0);return t}function p(){for(var t,n=0,r=e.length;n<r;++n){if((t=e[n]).index=n,null!=t.fx&&(t.x=t.fx),null!=t.fy&&(t.y=t.fy),isNaN(t.x)||isNaN(t.y)){var i=10*Math.sqrt(.5+n),o=n*BP;t.x=i*Math.cos(o),t.y=i*Math.sin(o)}(isNaN(t.vx)||isNaN(t.vy))&&(t.vx=t.vy=0)}}function f(t){return t.initialize&&t.initialize(e,c),t}return null==e&&(e=[]),p(),t={tick:h,restart:function(){return u.restart(d),t},stop:function(){return u.stop(),t},nodes:function(n){return arguments.length?(e=n,p(),a.forEach(f),t):e},alpha:function(e){return arguments.length?(n=+e,t):n},alphaMin:function(e){return arguments.length?(r=+e,t):r},alphaDecay:function(e){return arguments.length?(i=+e,t):+i},alphaTarget:function(e){return arguments.length?(o=+e,t):o},velocityDecay:function(e){return arguments.length?(s=1-e,t):1-s},randomSource:function(e){return arguments.length?(c=e,a.forEach(f),t):c},force:function(e,n){return arguments.length>1?(null==n?a.delete(e):a.set(e,f(n)),t):a.get(e)},find:function(t,n,r){var i,o,s,a,u,l=0,c=e.length;for(null==r?r=1/0:r*=r,l=0;l<c;++l)(s=(i=t-(a=e[l]).x)*i+(o=n-a.y)*o)<r&&(u=a,r=s);return u},on:function(e,n){return arguments.length>1?(l.on(e,n),t):l.on(e)}}}function MP(e){return"string"===typeof e?new mT([[document.querySelector(e)]],[document.documentElement]):new mT([[e]],gT)}function jP(e,t,n){this.k=e,this.x=t,this.y=n}jP.prototype={constructor:jP,scale:function(e){return 1===e?this:new jP(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new jP(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var zP;new jP(1,0,0);jP.prototype;const UP=(e,t)=>
2{const{seeds:n,side:r}=e,{holeWidth:i,holeHeight:o}=e,s=function(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const o=(arguments.length>5?arguments[5]:void 0)||n/12,s=Array(e).fill(0).map((e,n)=>{const s=i[n],a=s?s.x:o+n%6*o*2,u=s?s.y:o+Math.floor(n/6)*o*2;return{name:n,radius:s?s.radius:o,x:a,y:1===t?u:r-u}});return s}(n,r,i,o,MP(t).selectAll("circle").data(),e.seedRadius),a=LP(s).velocityDecay(.3).force("x",function(e){var t,n,r,i=IP(.1);function o(e){for(var i,o=0,s=t.length;o<s;++o)(i=t[o]).vx+=(r[o]-i.x)*n[o]*e}function s(){if(t){var o,s=t.length;for(n=new Array(s),r=new Array(s),o=0;o<s;++o)n[o]=isNaN(r[o]=+e(t[o],o,t))?0:+i(t[o],o,t)}}return"function"!==typeof e&&(e=IP(null==e?0:+e)),o.initialize=function(e){t=e,s()},o.strength=function(e){return arguments.length?(i="function"===typeof e?e:IP(+e),s(),o):i},o.x=function(t){return arguments.length?(e="function"===typeof t?t:IP(+t),s(),o):e},o}(i/2).strength(.1)).force("y",function(e){var t,n,r,i=IP(.1);function o(e){for(var i,o=0,s=t.length;o<s;++o)(i=t[o]).vy+=(r[o]-i.y)*n[o]*e}function s(){if(t){var o,s=t.length;for(n=new Array(s),r=new Array(s),o=0;o<s;++o)n[o]=isNaN(r[o]=+e(t[o],o,t))?0:+i(t[o],o,t)}}return"function"!==typeof e&&(e=IP(null==e?0:+e)),o.initialize=function(e){t=e,s()},o.strength=function(e){return arguments.length?(i="function"===typeof e?e:IP(+e),s(),o):i},o.y=function(t){return arguments.length?(e="function"===typeof t?t:IP(+t),s(),o):e},o}(o/2).strength(.1)).force("center",function(e,t){var n,r=1;function i(){var i,o,s=n.length,a=0,u=0;for(i=0;i<s;++i)a+=(o=n[i]).x,u+=o.y;for(a=(a/s-e)*r,u=(u/s-t)*r,i=0;i<s;++i)(o=n[i]).x-=a,o.y-=u}return null==e&&(e=0),null==t&&(t=0),i.initialize=function(e){n=e},i.x=function(t){return arguments.length?(e=+t,i):e},i.y=function(e){return arguments.length?(t=+e,i):t},i.strength=function(e){return arguments.length?(r=+e,i):r},i}(i/2,o/2)).force("collide",function(e){var t,n,r,i=1,o=1;function s(){for(var e,s,u,l,c,d,h,p=t.length,f=0;f<o;++f)for(s=xP(t,OP,NP).visitAfter(a),e=0;e<p;++e)u=t[e],d=n[u.index],h=d*d,l=u.x+u.vx,c=u.y+u.vy,s.visit(g);function g(e,t,n,o,s){var a=e.data,p=e.r,f=d+p;if(!a)return t>l+f||o<l-f||n>c+f||s<c-f;if(a.index>u.index){var g=l-a.x-a.vx,m=c-a.y-a.vy,v=g*g+m*m;v<f*f&&(0===g&&(v+=(g=PP(r))*g),0===m&&(v+=(m=PP(r))*m),v=(f-(v=Math.sqrt(v)))/v*i,u.vx+=(g*=v)*(f=(p*=p)/(h+p)),u.vy+=(m*=v)*f,a.vx-=g*(f=1-f),a.vy-=m*f)}}}function a(e){if(e.data)return e.r=n[e.data.index];for(var t=e.r=0;t<4;++t)e[t]&&e[t].r>e.r&&(e.r=e[t].r)}function u(){if(t){var r,i,o=t.length;for(n=new Array(o),r=0;r<o;++r)i=t[r],n[i.index]=+e(i,r,t)}}return"function"!==typeof e&&(e=IP(null==e?1:+e)),s.initialize=function(e,n){t=e,r=n,u()},s.iterations=function(e){return arguments.length?(o=+e,s):o},s.strength=function(e){return arguments.length?(i=+e,s):i},s.radius=function(t){return arguments.length?(e="function"===typeof t?t:IP(+t),u(),s):e},s}().radius(e=>e.radius+.8).iterations(2)).on("tick",function(){const e=MP(t).selectAll("circle").data(s,e=>String(e.name));e.join(e=>e.append("circle").attr("r",e=>e.radius).attr("cx",e=>e.x).attr("cy",e=>e.y),e=>e.attr("cx",e=>e.x).attr("cy",e=>e.y)),e.exit().remove()});return a},HP=e=>{const t=(0,ee.useRef)(null),n=(0,ee.useRef)(null);(0,ee.useEffect)(()=>{n.current=UP(e,t.current)});const{showHint:r,isHouse:i,side:o,holeWidth:s,holeHeight:a,isHighlighted:u}=e;return h_("svg",{css:e=>{const{boardSide1:t,boardSide2:n,seedSide1:s,seedSide2:a}=e.colors,l=1===o?t:n,c=1===o?s:a,d=u?"red":xI(l).darker(.2),h=function(){var e=oA.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(zP||(zP=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n from {\n background: ",";\n }\n to {\n background: white;\n }"])),l);return{borderRadius:i?e.gridUnit:"100%",padding:e.gridUnit,background:l,animation:u?"highlight 2s linear 0s infinite alternate":r?"".concat(h," 2s linear 0s infinite alternate"):void 0,border:"2px s
2olid ".concat(d),circle:{fill:c}}},width:s,height:a,children:h_("g",{ref:e=>{t.current=e}})})},qP=(e,t)=>e.seeds===t.seeds&&e.isHouse===t.isHouse&&e.holeHeight===t.holeHeight&&e.holeWidth===t.holeWidth&&e.showHint===t.showHint&&e.isHighlighted===t.isHighlighted,WP=ee.memo(e=>h_(HP,c({},e)),qP);var $P=n(252),VP=n.n($P);const GP=VP().bind({hand:"Pointing_hand__HY7e9",rotate:"Pointing_rotate__StaDc"}),KP=e=>h_("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",x:"0px",y:"0px",viewBox:"0 0 100 125",className:GP("hand",{rotate:0===e.currentActiveSide}),children:h_("g",{children:h_("path",{d:"M91.238,60.696c-2.649-7.036-5.144-19.826-9.098-26.221C81.027,32.673,68.17,15.459,68.17,15.459l-0.014,0.009 c-0.616-1.002-1.568-1.801-2.78-2.169c-2.645-0.812-5.444,0.679-6.252,3.322c-0.412,1.348-0.223,2.733,0.407,3.877l-0.005,0.003 l0.794,1.638c0,0,4.896,7.872,5.216,8.457l-2.669,1.334c-0.239-0.422-9.645-14.932-9.645-14.932l-0.02,0.01 c-0.586-0.991-1.485-1.81-2.653-2.236c-2.667-0.971-5.613,0.405-6.583,3.07c-0.51,1.4-0.361,2.871,0.27,4.099l-0.007,0.005 l1.398,2.55c0,0,6.95,10.53,7.036,10.66l-2.686,1.344c-0.015-0.018-0.022-0.04-0.038-0.059L39.291,20.522 c-0.623-1.015-1.567-1.842-2.781-2.26c-2.446-0.842-5.946,0.931-6.762,3.3c-0.563,1.637-0.266,3.353,0.63,4.687l-0.022,0.015 l0.219,0.393l8.563,13.387l-2.671,1.335L15.347,8.357c0,0,1.186,1.963-0.008,0.003c-1.193-1.961-1.7-2.389-3.17-2.896 C9.328,4.488,6.229,5.998,5.25,8.841c-0.589,1.712-0.049,3.306,0.7,4.886c0.747,1.58-0.009,0.004-0.009,0.004l19.242,35.465 l1.663,3.076L37.397,69.2L31.9,66.088l-0.015-0.008c-0.321-0.242-9.317-8.033-11.516-9.758c-2.198-1.723-5.592-3.096-8.312-2.963 s-4.461,1.516-5.033,2.39c-0.574,0.875-0.89,2.244,0.186,3.382c0.801,0.848,12.438,13.107,12.438,13.107s2.355,2.008,2.817,2.388 l-0.001,0.004l14.4,8.667l5.525,2.983l17.931,8.552L95,78.516C95,78.516,92.743,64.696,91.238,60.696z"})})}),YP=e=>({position:"absolute",display:"flex",alignItems:"center",width:"100%",height:"100%"}),JP=e=>({position:"absolute",display:"flex",height:"95%",alignItems:"center",right:"55%",zIndex:4,justifyContent:"flex-end",width:"100%",cursor:"pointer",borderRadius:"100% 0 0 5px",background:e.colors.sowingDirection,"&:hover":{background:e.colors.sowingDirectionDarker}}),QP=e=>c(c({},JP(e)),{},{right:void 0,borderRadius:"0 100% 5px 0",justifyContent:"flex-start",left:"55%"});function XP(e){return h_("div",{onClick:e.onClick,css:JP,children:"\u25c0\u25c0\u25c0\u25c0"})}function ZP(e){return h_("div",{onClick:e.onClick,css:QP,children:"\u25b6\u25b6\u25b6\u25b6"})}const eO=e=>p_("div",{css:YP,children:[h_(XP,{onClick:e.sowLeft}),h_(ZP,{onClick:e.sowRight})]});var tO=n(122);const nO="undefined"!==typeof window?ee.useLayoutEffect:ee.useEffect;function rO(e,t,n){const[r,i]=function(e,t,n){const[r,i]=(0,ee.useState)(()=>t(e)),o=(0,ee.useCallback)(()=>{const o=t(e);tO(r,o)||(i(o),n&&n())},[r,e,n]);return nO(o),[r,o]}(e,t,n);return nO(function(){const t=e.getHandlerId();if(null!=t)return e.subscribeToStateChange(i,{handlerIds:[t]})},[e,i]),r}function iO(e,t,n){return rO(t,e||(()=>({})),()=>n.reconnect())}function oO(e,t){const n=[...t||[]];return null==t&&"function"!==typeof e&&n.push(e),(0,ee.useMemo)(()=>"function"===typeof e?e():e,n)}function sO(e){return(0,ee.useMemo)(()=>e.hooks.dragSource(),[e])}function aO(e){return(0,ee.useMemo)(()=>e.hooks.dragPreview(),[e])}function uO(e,t,n,r){let i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!==typeof e||!e||"object"!==typeof t||!t)return!1;const o=Object.keys(e),s=Object.keys(t);if(o.length!==s.length)return!1;const a=Object.prototype.hasOwnProperty.bind(t);for(let u=0;u<o.length;u++){const s=o[u];if(!a(s))return!1;const l=e[s],c=t[s];if(i=n?n.call(r,l,c,s):void 0,!1===i||void 0===i&&l!==c)return!1}return!0}function lO(e){return null!==e&&"object"===typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function cO(e){return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!(0,ee.isValidElement)(t)){const r=t;return e(r,n),r}const r=t;!function(e){if("string"===typeof e.type)return;const t=e.type.displayName||e.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(t," into a <div>, or turn it into a ")+"drag source or a drop target itself.")}(r);const i=n?t=>e(t,n):e;return function(e,t){const n=e.ref;return qt("string"!==typeof n,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?(0,ee.cloneElement)(e,{ref:e=>{hO(n,e),hO(t,e)}}):(0,ee.cloneElement)(e,{ref:t})}(r,i)}}function dO(e){const t={};return Object.keys(e).forEach(n=>{const r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{const e=cO(r);t[n]=()=>e}}),t}function hO(e,t){"function"===typeof e?e(t):e.current=t}class pO{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t}reconnectDragPreview(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.dragPreview,n=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();n&&this.disconnectDragPreview(),this.handlerId&&(t?n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions)):this.lastConnectedDragPreview=t)}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!uO(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!uO(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=dO({dragSource:(e,t)=>{this.clearDragSource(),this.dragSourceOptions=t||null,lO(e)?this.dragSourceRef=e:this.dragSourceNode=e,this.reconnectDragSource()},dragPreview:(e,t)=>{this.clearDragPreview(),this.dragPreviewOptions=t||null,lO(e)?this.dragPreviewRef=e:this.dragPreviewNode=e,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}function fO(){const{dragDropManager:e}=(0,ee.useContext)(qi);return qt(null!=e,"Expected drag drop context"),e}let gO=!1,mO=!1;class vO{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){qt(!gO,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return gO=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{gO=!1}}isDragging(){if(!this.sourceId)return!1;qt(!mO,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return mO=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{mO=!1}}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}
2getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}class yO{beginDrag(){const e=this.spec,t=this.monitor;let n=null;return n="object"===typeof e.item?e.item:"function"===typeof e.item?e.item(t):{},null!==n&&void 0!==n?n:null}canDrag(){const e=this.spec,t=this.monitor;return"boolean"===typeof e.canDrag?e.canDrag:"function"!==typeof e.canDrag||e.canDrag(t)}isDragging(e,t){const n=this.spec,r=this.monitor,{isDragging:i}=n;return i?i(r):t===e.getSourceId()}endDrag(){const e=this.spec,t=this.monitor,n=this.connector,{end:r}=e;r&&r(t.getItem(),t),n.reconnect()}constructor(e,t,n){this.spec=e,this.monitor=t,this.connector=n}}function DO(e,t,n){const r=fO(),i=function(e,t,n){const r=(0,ee.useMemo)(()=>new yO(e,t,n),[t,n]);return(0,ee.useEffect)(()=>{r.spec=e},[e]),r}(e,t,n),o=function(e){return(0,ee.useMemo)(()=>{const t=e.type;return qt(null!=t,"spec.type must be defined"),t},[e])}(e);nO(function(){if(null!=o){const[e,s]=function(e,t,n){const r=n.getRegistry(),i=r.addSource(e,t);return[i,()=>r.removeSource(i)]}(o,i,r);return t.receiveHandlerId(e),n.receiveHandlerId(e),s}},[r,t,n,i,o])}function _O(e,t){const n=oO(e,t);qt(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=function(){const e=fO();return(0,ee.useMemo)(()=>new vO(e),[e])}(),i=function(e,t){const n=fO(),r=(0,ee.useMemo)(()=>new pO(n.getBackend()),[n]);return nO(()=>(r.dragSourceOptions=e||null,r.reconnect(),()=>r.disconnectDragSource()),[r,e]),nO(()=>(r.dragPreviewOptions=t||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,t]),r}(n.options,n.previewOptions);return DO(n,r,i),[iO(n.collect,r,i),sO(i),aO(i)]}function bO(e){return(0,ee.useMemo)(()=>e.hooks.dropTarget(),[e])}class wO{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!uO(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=dO({dropTarget:(e,t)=>{this.clearDropTarget(),this.dropTargetOptions=t,lO(e)?this.dropTargetRef=e:this.dropTargetNode=e,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}let EO=!1;class CO{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}canDrop(){if(!this.targetId)return!1;qt(!EO,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return EO=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{EO=!1}}isOver(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)}getItemType(){return this.internalMonitor.getItemType()}
2getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}class kO{canDrop(){const e=this.spec,t=this.monitor;return!e.canDrop||e.canDrop(t.getItem(),t)}hover(){const e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}drop(){const e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}constructor(e,t){this.spec=e,this.monitor=t}}function SO(e,t,n){const r=fO(),i=function(e,t){const n=(0,ee.useMemo)(()=>new kO(e,t),[t]);return(0,ee.useEffect)(()=>{n.spec=e},[e]),n}(e,t),o=function(e){const{accept:t}=e;return(0,ee.useMemo)(()=>(qt(null!=e.accept,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}(e);nO(function(){const[e,s]=function(e,t,n){const r=n.getRegistry(),i=r.addTarget(e,t);return[i,()=>r.removeTarget(i)]}(o,i,r);return t.receiveHandlerId(e),n.receiveHandlerId(e),s},[r,t,i,n,o.map(e=>e.toString()).join("|")])}function xO(e,t){const n=oO(e,t),r=function(){const e=fO();return(0,ee.useMemo)(()=>new CO(e),[e])}(),i=function(e){const t=fO(),n=(0,ee.useMemo)(()=>new wO(t.getBackend()),[t]);return nO(()=>(n.dropTargetOptions=e||null,n.reconnect(),()=>n.disconnectDropTarget()),[e]),n}(n.options);return SO(n,r,i),[iO(n.collect,r,i),bO(i)]}const FO=e=>({isDragging:!!e.isDragging()}),AO=e=>({isOver:!!e.isOver(),isOverCurrent:!!e.isOver({shallow:!0}),canDrop:!!e.canDrop()}),TO=e=>{const t=(0,ee.useContext)(Ls),{boardProperties:n}=(0,ee.useContext)(es),{gameStage:r,gameType:i,gameMode:o}=(0,ee.useContext)(Rs),[s,a]=(0,ee.useState)(!1),[{isDragging:u},l]=_O({type:"Hole",item:{index:e.index,side:e.side,seeds:e.seeds,playableDirections:e.playableDirections},collect:FO,canDrag:t=>r===Ts&&e.isValidMove}),c=t=>{e.dispatch({type:"USER_PLAY",index:e.index,side:e.side,direction:t})},d=()=>{a(!1),c(1)},h=()=>{a(!1),c(-1)};function p(){if(e.adjacentSeeds){if(e.index<2||e.index>5){const t=e.index<2?1:-1;return c(t)}return e.setNeedsCaptureSowingDirection({sowLeft:h,sowRight:d})}a(!0)}const[{canDrop:f},g]=xO({accept:["Store","Hole"],collect:AO,drop:(t,n)=>{if(n.didDrop())return;const r=n.getItem();return"Store"===r.type?p():(e.dispatch({type:"USER_PLAY",index:r.index,side:r.side,direction:as(r.index,e.index)}),n.getItem())},canDrop:(t,n)=>{const r=n.getItem();return"Store"===r.type&&e.isValidMove||r.side===e.side&&(e.index===gs(r.index-1)&&r.playableDirections.includes(-1)||e.index===gs(r.index+1)&&r.playableDirections.includes(1))}}),m=t&&t.index===e.index&&t.side===e.side,{side:v,showHint:y,isValidMove:D}=e,{holeWidth:_,holeHeight:b}=n,w=i===As&&4===e.index;return h_("div",{ref:l,css:e=>({borderRadius:w?e.gridUnit:"100%",backgroundColor:m?e.colors.grey9:"white"}),"data-testid":"draggable-hole-".concat(e.side,"-").concat(e.index),"data-seed-count":e.seeds,onClick:()=>{if(e.isValidMove&&!s&&t&&t.storeClicked)return p();e.dispatch({type:"USER_CLICK_HOLE",index:e.index,side:e.side})},children:p_("div",{ref:g,css:e=>{const n=f?e.colors.grey1:u?e.colors.grey8:m?e.colors.grey4:"white",i=u||r===Ts&&D||t&&t.storeClicked&&D?"grab":"not-allowed";return{position:"relative",borderRadius:w?e.gridUnit:"100%",margin:"0 ".concat(.5*e.gridUnit,"px"),cursor:i,backgroundColor:n}},children:[s&&h_(eO,{sowRight:d,sowLeft:h}),e.children,h_(WP,{side:e.side,isHouse:w,index:e.index,seeds:u?0:e.seeds,holeWidth:_,holeHeight:b,showHint:y&&("multi"===o||0!==v)&&D,isHighlighted:e.isHighlighted}),e.isActive&&h_(KP,{side:e.side,currentActiveSide:e.currentActiveSide})]})})},IO=TO,PO=e=>h_("div",{css:t=>({borderRadius:"100%",width:2.5*t.gridUnit,height:2.5*t.gridUnit,backgroundColor:0===e.side?t.colors.seedOrange:t.colors.seedGrey,margin:1})}),OO=PO,NO=e=>h_("div",{css:t=>{const n=1===e.side?t.colors.boardOrange:t.colors.boardGrey;return{width:e.holeWidth,height:e.holeHeight,background:n,display:"flex",justifyContent:"center",alignContent:1===e.side?"flex-start":"flex-end",flexWrap:"wrap",padding:t.gridUnit,marginBottom:t.gridUnit/2,borderRadius:t.gridUnit,border:"2px s
2olid ".concat(e.isHighlighted?"red":n)}},children:Array(e.seeds).fill(0).map((t,n)=>h_(OO,{side:e.side},"some-seed-".concat(n)))}),RO=NO;const BO=e=>({isDragging:!!e.isDragging()});var LO={name:"zl1inp",styles:"display:flex;justify-content:center"};const MO=e=>{const t=(0,ee.useContext)(Ls),[,n]=_O({type:"Store",item:{side:e.side,seeds:1,playableDirections:[]},collect:BO,canDrag:t=>e.seeds>0});return h_("div",{css:LO,children:h_("div",{ref:n,onClick:()=>{e.dispatch&&e.dispatch({type:"USER_CLICK_STORE",side:e.side})},css:n=>({backgroundColor:t&&t.storeClicked&&t.side===e.side?n.colors.grey7:"white"}),children:h_(RO,{holeWidth:200,holeHeight:25,side:e.side,seeds:e.seeds})})})},jO=e=>{let{gridUnit:t,colors:n}=e;return{width:2.5*t,height:2.5*t,borderRadius:"100%",marginBottom:t,backgroundColor:n.activeGreen}},zO=()=>h_("div",{css:jO}),UO=VP().bind({rear:"Side_rear__sTdT5",front:"Side_front__wu0Q+",sideWrapper:"Side_sideWrapper__Df28V",boardSide:"Side_boardSide__SgnCl",boardSide0:"Side_boardSide0__Ee2Tr",portrait:"Side_portrait__y0tS3",active:"Side_active__s89ur"});function HO(e,t){return t[ts[e]]}const qO=e=>{let{store:t,frontHoles:n,rearHoles:r,adjacentHoles:i,side:o,activeIndex:s,validMoves:a=[],isActive:u,idle:l,showHints:c,dispatch:d}=e;const[h,p]=(0,ee.useState)(null),f=(0,ee.useContext)(Qo),{boardProperties:g}=(0,ee.useContext)(es),m=g.highlightedHoles;return p_("div",{className:UO({sideWrapper:!0}),"data-testid":"side-".concat(o),children:[p_("div",{className:UO({boardSide:1===o,boardSide0:0===o}),children:[h_("div",{className:UO("front"),children:n.map((e,t)=>{const n=a.find(e=>e.index===t);let r=null;return h&&(0===t?r=h_(ZP,{onClick:e=>{e.stopPropagation(),h.sowRight(),p(null)}}):7===t&&(r=h_(XP,{onClick:e=>{e.stopPropagation(),h.sowLeft(),p(null)}}))),h_(IO,{dispatch:d,isValidMove:void 0!==n,showHint:!1!==c&&!0===l&&void 0!==n,playableDirections:n?n.directions:[],isActive:s<8&&s===t,index:t,seeds:e,adjacentSeeds:HO(t,i),side:o,currentActiveSide:u?o:ks(o),isHighlighted:m[o].includes(t),setNeedsCaptureSowingDirection:p,children:r},"side_".concat(o,"_").concat(t,"_front"))})}),h_("div",{className:UO("rear",f),children:r.map((e,t)=>{const n=t+8,r=a.find(e=>e.index===n);return h_(IO,{dispatch:d,isValidMove:void 0!==r,showHint:!1!==c&&!0===l&&void 0!==r,playableDirections:r?r.directions:[],isActive:s===n,index:n,seeds:e,side:o,currentActiveSide:u?o:ks(o),isHighlighted:m[o].includes(n),setNeedsCaptureSowingDirection:p},"side_".concat(o,"_").concat(n,"_rear"))})}),h_("div",{css:oA({textAlign:"center"},"",""),children:void 0!==t&&t>=0&&h_(MO,{seeds:t,side:o,dispatch:d})})]}),u&&h_(zO,{})]})},WO=qO,$O=VP().bind({portrait:"Board_portrait__1otbR",sideSeparator:"Board_sideSeparator__uDTzy",shrink:"Board_shrink__dqe2E"}),VO=e=>{const[t,n]=e.gameState,r=e.store;let i,o;0===e.startingSide?(i=Math.floor(r),o=Math.ceil(r)):(o=Math.floor(r),i=Math.ceil(r));const{dispatch:s,currentPlayer:a,activeSide:u,activeIndex:l}=e,{settings:d}=(0,ee.useContext)(Rs),h=!1!==d.showHints,p={rearHoles:ls(t),frontHoles:us(t),adjacentHoles:us(n),validMoves:0===a?bs(t,n):[],side:0,activeIndex:0===u?l:-1,isActive:0===a,dispatch:s,idle:e.idle,showHints:h,store:e.gameType===As?i:void 0},f={rearHoles:ls(n),frontHoles:us(n),adjacentHoles:us(t),validMoves:1===a?bs(n,t):[],side:1,activeIndex:1===u?l:-1,isActive:1===a,dispatch:s,store:e.gameType===As?o:void 0,idle:e.idle,showHints:h};return p_("div",{className:e.className,css:oA({position:"relative"},"",""),children:[h_(WO,c({},p)),h_("div",{className:$O("sideSeparator")}),h_(WO,c({},f)),e.children]})},GO=e=>({position:"relative",height:8*e.gridUnit,lineHeight:"".concat(5*e.gridUnit,"px"),verticalAlign:"middle",display:"flex",cursor:"pointer"}),KO=e=>({boxSizing:"border-box",display:"inline-block",cursor:"pointer",border:"".concat(e.gridUnit,"px solid ").concat(e.colors.grey9),background:"white",borderRadius:"100%",marginRight:2*e.gridUnit,height:5*e.gridUnit,width:5*e.gridUnit,"&::before":{content:"''",margin:"auto"}}),YO=e=>({position:"absolute",top:0,left:0,width:"100%",height:"100%",margin:0,opacity:0,cursor:"pointer",zIndex:1,"&:checked ~ i":{border:"".concat(e.gridUnit,"px solid ").concat(e.colors.grey6),boxShadow:"0px 0px ".concat(e.gridUnit,"px ").concat(e.colors.grey4),background:e.colors.grey4}}),JO=e=>{const{label:t,checked:n,id:r,value:i,onChange:o,testId:s}=e;return p_("label",{htmlFor:r,css:GO,"data-testid":s,children:[h_("input",{type:"radio",css:YO,checked:n,id:r,value:i,name:e.name,onChange:o}),h_("i",{css:KO}),h_("span",{children:t})]},t)},QO=JO,XO=e=>{let{gridUnit:t}=e;return{justifyContent:"space-between",display:"flex",flexDirection:"column",paddingTop:2*t,marginBottom:4*t}},ZO=e=>h_("div",{css:XO,children:e.children});const eN=e=>({position:"absolute",top:0,zIndex:1,background:"#ffffff11",display:"flex",width:"100%",height:"100%",
2justifyContent:"center",alignItems:"center"}),tN=e=>({background:"white",padding:5*e.gridUnit,boxShadow:"0 0 ".concat(3*e.gridUnit,"px 1px"),borderRadius:e.gridUnit,textAlign:"center",div:{padding:2*e.gridUnit}}),nN=[{labelKey:"gameOver.gameType.kujifunza",value:Fs},{labelKey:"gameOver.gameType.kiswahili",value:As}];var rN={name:"r5hahk",styles:"margin-right:20px"};const iN=e=>{const{t:t}=Fe(),[n,r]=(0,ee.useState)(!1),[i,o]=(0,ee.useState)(e.gameType||""),s=e=>{o(e.currentTarget.value)};return h_("div",{css:eN,children:p_("div",{css:tN,children:[void 0!==e.won?h_("div",{children:e.won?t("gameOver.won"):t("gameOver.lost")}):null,e.isMultiplayer?h_("div",{children:h_("a",{css:e=>e.button,href:"/multiplayer",children:t("gameOver.backToLobby")})}):p_(d_,{children:[h_("div",{children:p_("label",{htmlFor:"computerStarts",children:[h_("span",{css:rN,children:t("gameOver.computerStarts")}),h_("input",{checked:n,onChange:e=>{r(e.target.checked)},type:"checkbox",id:"computerStarts"})]})}),h_("div",{children:h_(ZO,{children:nN.map(e=>{let{labelKey:n,value:r}=e;return h_(QO,{label:t(n),id:"gameOver-".concat(r),onChange:s,value:r,checked:i===r,name:"gameType"},r)})})}),h_("div",{children:h_("a",{css:e=>e.button,href:"/game?startingSide=".concat(n?0:1,"&gameType=").concat(i),children:t("gameOver.startNewGame")})})]})]})})},oN=iN;const{gtag:sN=function(){console.warn(...arguments),console.warn("failed to load gtag")}}=window;function aN(e,t){sN("config","G-1QEZXPWG5V",c({page_title:e,page_location:t},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}))}function uN(e){sN("event","game_started",e),YF.capture("game_started",e)}function lN(e){sN("event","game_won",e),YF.capture("game_won",e)}function cN(e){sN("event","game_lost",e),YF.capture("game_lost",e)}function dN(e){sN("event","tutorial_navigated_forward",{help_index:e}),YF.capture("tutorial_navigated_forward",{help_index:e})}const hN=()=>{const{user:e}=m_(),[t,n]=(0,ee.useState)(!1),[r,i]=(0,ee.useState)(null),o=(0,ee.useCallback)(async t=>{if(e)try{n(!0);const r=zD(l_,"users/".concat(e.uid,"/gameHistory")),o=c(c({},t),{},{completedAt:Date.now()});await function(e,t){e=qa(e),Gy("push",e._path),Uy("push",t,e._path,!0);const n=iD(e._repo),r=AD(n),i=UD(e,r),o=UD(e,r);let s;return s=null!=t?HD(o,t).then(()=>o):Promise.resolve(o),i.then=s.then.bind(s),i.catch=s.then.bind(s,void 0),i}(r,o),i(null)}catch(r){throw console.error("Error adding game to history:",r),i("Failed to save game to history"),r}finally{n(!1)}else console.warn("Cannot add game to history: user not authenticated")},[e]),s=(0,ee.useCallback)(async t=>{if(!e)return[];try{n(!0);const r=e_(zD(l_,"users/".concat(e.uid,"/gameHistory")),ZD("completedAt"),function(e){if("number"!==typeof e||Math.floor(e)!==e||e<=0)throw new Error("limitToLast: First argument must be a positive integer.");return new QD(e)}(t)),o=await WD(r);if(!o.exists())return[];const s=[];return o.forEach(e=>{const t=e.val();s.push({gameId:t.gameId,gameType:t.gameType,mode:t.mode,result:t.result,opponent:t.opponent,numberOfTurns:t.numberOfTurns,startingSide:t.startingSide,expertLevel:t.expertLevel,completedAt:t.completedAt,duration:t.duration})}),s.sort((e,t)=>t.completedAt-e.completedAt),i(null),s}catch(r){return console.error("Error fetching recent games:",r),i("Failed to load recent games"),[]}finally{n(!1)}},[e]),a=(0,ee.useCallback)(async()=>{if(!e)return{gamesPlayed:0,gamesWon:0,gamesLost:0,totalTurns:0,averageTurns:0,winRate:0};try{n(!0);const t=zD(l_,"users/".concat(e.uid,"/gameHistory")),r=Date.now()-6048e5,o=e_(t,ZD("completedAt"),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return $y("startAt","key",t,!0),new JD(e,t)}(r)),s=await WD(o);if(!s.exists())return{gamesPlayed:0,gamesWon:0,gamesLost:0,totalTurns:0,averageTurns:0,winRate:0};const a=[];s.forEach(e=>{const t=e.val();a.push({gameId:t.gameId,gameType:t.gameType,mode:t.mode,result:t.result,opponent:t.opponent,numberOfTurns:t.numberOfTurns,startingSide:t.startingSide,expertLevel:t.expertLevel,completedAt:t.completedAt,duration:t.duration})});const u=a.length,l=a.filter(e=>"won"===e.result).length,c=a.filter(e=>"lost"===e.result).length,d=a.reduce((e,t)=>
2e+t.numberOfTurns,0),h=u>0?d/u:0,p=u>0?l/u:0;return i(null),{gamesPlayed:u,gamesWon:l,gamesLost:c,totalTurns:d,averageTurns:Math.round(h),winRate:Math.round(100*p)/100}}catch(t){return console.error("Error fetching weekly stats:",t),i("Failed to load statistics"),{gamesPlayed:0,gamesWon:0,gamesLost:0,totalTurns:0,averageTurns:0,winRate:0}}finally{n(!1)}},[e]);return{addGameToHistory:o,getRecentGames:s,getWeeklyStats:a,loading:t,error:r}},pN={beginner:1,intermediate:2,expert:5,multiplayer:0},fN=e=>{const t=(0,ee.useContext)(Rs),n=t.settings,r=t.gameType,i=t.setGameStage,o=(0,ee.useContext)(Qo),s=(0,ee.useContext)(Hs),a=(0,ee.useContext)(Ms).dispatch,{addGameToHistory:u}=hN(),l=(0,ee.useRef)(Date.now()),c=s.currentPlayer,d=s.currentGameState,h=s.currentSequence[s.currentSequenceIndex],p=h?h.index:-1,f=s.currentSequence.length>0&&s.currentSequenceIndex===s.currentSequence.length-1,g=(e=>!!e&&(is(e)?ys(e):vs(e[0])))(d),m=(e=>!!e&&(is(e)?ys(e):vs(e[ks(0)])))(d),v=f&&(g||m),y=n.playbackSpeed,D=h?h.side:c;return(0,ee.useEffect)(()=>{i&&i(d&&is(d)?"namua":"mtaji")},[d,i]),(0,ee.useEffect)(()=>{if(-1!==p&&!f){const e=setInterval(()=>{a({type:"SEQUENCE_STEP_FORWARD"})},y);return()=>clearInterval(e)}if(f&&!v){const e=setTimeout(()=>{a({type:"CHANGE_PLAYER",side:ks(c)})},1500);return()=>clearTimeout(e)}},[p,c,a,f,v,y]),(0,ee.useEffect)(()=>{if(!v)return;const e=s.moveHistory.length,t={numberOfTurns:e,startingSide:n.startingSide,gameType:r,expertLevel:n.expertLevel},i=g?"won":"lost";g?lN(t):cN(t);const o=Date.now(),a="single_".concat(l.current,"_").concat(o);u({gameId:a,gameType:r,mode:"single",result:i,opponent:"AI",numberOfTurns:e,startingSide:n.startingSide,expertLevel:n.expertLevel,duration:o-l.current}).catch(e=>{console.error("Failed to save game to history:",e)})},[v,n.expertLevel,n.startingSide,s.moveHistory,r,g,u]),(0,ee.useEffect)(()=>{if(v&&s.currentSequenceIndex===s.currentSequence.length-1||s.thinking||0!==c||-1!==s.currentSequenceIndex)return;a({type:"THINKING"});const e=(e=>e[0].every(e=>2===e)&&e[1].every(e=>2===e))(d)?1:pN[n.expertLevel]||1;setTimeout(()=>{const[t]=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;const r=Number.MIN_SAFE_INTEGER,i=Number.MAX_SAFE_INTEGER;return Is(bs(e[t],e[ks(t)])).map(o=>({move:o,score:Os({state:e,player:t,move:o,depth:n,alpha:r,beta:i},t)})).sort((e,t)=>t.score-e.score).map(e=>e.move)}(d,c,e);if(t){const e={type:"USER_PLAY",index:t.index,direction:t.direction,side:c};setTimeout(()=>{a(e)},1500)}else console.log("problem getting state"),console.log(d,c,e)},500)}),(0,ee.useEffect)(()=>{uN({gameType:r,startingSide:n.startingSide,expertLevel:n.expertLevel})},[n.startingSide,r,n.expertLevel]),h_("div",{css:e=>{let t=8*(e.holeWidth+16)+10,n=4*(e.holeHeight+16)+10;return o===Jo?{transformOrigin:"top left",transform:"translate(".concat(n+(r===As?35:0),"px) rotate(90deg)"),height:n,width:t}:{}},"data-testid":"board-container",children:h_(VO,{dispatch:a,gameType:r,store:s.store,startingSide:n.startingSide,gameState:d,activeSide:D,currentPlayer:c,activeIndex:p,idle:f||-1===s.currentSequenceIndex,children:v?h_(oN,{won:g}):null})})},gN=fN,mN="profile-stats",vN=e=>"lang-".concat(e),yN=e=>{const t=(e=>{if("undefined"===typeof window)return null;try{const t=new URLSearchParams(window.location.search).get("ff_".concat(e));return null===t?null:"true"===t||"1"===t}catch(t){return null}})(e);if(null!==t)return t;try{return!0===YF.isFeatureEnabled(e)}catch(n){return!1}},DN=e=>{const[t,n]=(0,ee.useState)(()=>yN(e));return(0,ee.useEffect)(()=>{let t;n(yN(e));try{t=YF.onFeatureFlags(()=>n(yN(e)))}catch(r){}return()=>{try{var e;null===(e=t)||void 0===e||e()}catch(n){}}},[e]),t};const _N=qe.filter(e=>Ge.includes(e.code)),bN=(0,ee.createContext)(_N),wN=e=>{let{children:t}=e;const n=function(){const e=DN(vN("fr")),t=DN(vN("de")),n=DN(vN("pt")),r=DN(vN("zh")),i=DN(vN("sw"));return(0,ee.useMemo)(()=>{const o={fr:e,de:t,pt:n,zh:r,sw:i};return qe.filter(e=>Ge.includes(e.code)||!0===o[e.code])},[e,t,n,r,i])}();return h_(bN.Provider,{value:n,children:t})};function EN(){return(0,ee.useContext)(bN)}const CN=e=>{let{gridUnit:t,fontSize:n,colors:r}=e;return{padding:"".concat(2*t,"px ").concat(3*t,"px"),fontSize:n,color:r.textPrimary,background:"white",border:"2px s
2olid ".concat(r.grey8),borderRadius:2*t,cursor:"pointer",outline:"none","&:focus":{borderColor:r.primary}}},kN=e=>{let{gridUnit:t,fontSize:n,colors:r}=e;return{fontSize:n,fontWeight:"600",color:r.textPrimary,marginRight:2*t}};var SN={name:"8irbms",styles:"display:inline-flex;align-items:center"};const xN=e=>{let{label:t,testId:n="language-selector",className:r}=e;const{t:i,i18n:o}=Fe(),s=EN(),a=(0,ee.useMemo)(()=>s.some(e=>e.code===o.language)?s:[...s,...qe.filter(e=>e.code===o.language)],[s,o.language]);return p_("label",{className:r,css:SN,children:[t?h_("span",{css:kN,children:t}):null,h_("select",{css:CN,value:o.language,onChange:e=>{const t=e.currentTarget.value;Ve(t)&&Je(t)},"data-testid":n,"aria-label":null!==t&&void 0!==t?t:i("common.language"),children:a.map(e=>{let{code:t,nativeName:n}=e;return h_("option",{value:t,children:n},t)})})]})};var FN=n(173),AN=n.n(FN),TN=n(161),IN=n.n(TN),PN=n(366),ON=n.n(PN),NN=n(123),RN=n.n(NN),BN="bodyAttributes",LN="htmlAttributes",MN="titleAttributes",jN={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"},zN=(Object.keys(jN).map(function(e){return jN[e]}),"charset"),UN="cssText",HN="href",qN="http-equiv",WN="innerHTML",$N="itemprop",VN="name",GN="property",KN="rel",YN="src",JN="target",QN={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},XN="defaultTitle",ZN="defer",eR="encodeSpecialCharacters",tR="onChangeClientState",nR="titleTemplate",rR=Object.keys(QN).reduce(function(e,t){return e[QN[t]]=t,e},{}),iR=[jN.NOSCRIPT,jN.SCRIPT,jN.STYLE],oR="data-react-helmet",sR="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},aR=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),uR=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lR=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},cR=function(e){return!1===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},dR=function(e){var t=mR(e,jN.TITLE),n=mR(e,nR);if(n&&t)return n.replace(/%s/g,function(){return Array.isArray(t)?t.join(""):t});var r=mR(e,XN);return t||r||void 0},hR=function(e){return mR(e,tR)||function(){}},pR=function(e,t){return t.filter(function(t){return"undefined"!==typeof t[e]}).map(function(t){return t[e]}).reduce(function(e,t){return uR({},e,t)},{})},fR=function(e,t){return t.filter(function(e){return"undefined"!==typeof e[jN.BASE]}).map(function(e){return e[jN.BASE]}).reverse().reduce(function(t,n){if(!t.length)for(var r=Object.keys(n),i=0;i<r.length;i++){var o=r[i].toLowerCase();if(-1!==e.indexOf(o)&&n[o])return t.concat(n)}return t},[])},gR=function(e,t,n){var r={};return n.filter(function(t){return!!Array.isArray(t[e])||("undefined"!==typeof t[e]&&bR("Helmet: "+e+' should be of type "Array". Instead found type "'+sR(t[e])+'"'),!1)}).map(function(t){return t[e]}).reverse().reduce(function(e,n){var i={};n.filter(function(e){for(var n=void 0,o=Object.keys(e),s=0;s<o.length;s++){var a=o[s],u=a.toLowerCase();-1===t.indexOf(u)||n===KN&&"canonical"===e[n].toLowerCase()||u===KN&&"stylesheet"===e[u].toLowerCase()||(n=u),-1===t.indexOf(a)||a!==WN&&a!==UN&&a!==$N||(n=a)}if(!n||!e[n])return!1;var l=e[n].toLowerCase();return r[n]||(r[n]={}),i[n]||(i[n]={}),!r[n][l]&&(i[n][l]=!0,!0)}).reverse().forEach(function(t){return e.push(t)});for(var o=Object.keys(i),s=0;s<o.length;s++){var a=o[s],u=RN()({},r[a],i[a]);r[a]=u}return e},[]).reverse()},mR=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.hasOwnProperty(t))return r[t]}return null},vR=function(){var e=Date.now();return function(t){var n=Date.now();n-e>16?(e=n,t(n)):setTimeout(function(){vR(t)},0)}}(),yR=function(e){return clearTimeout(e)},DR="undefined"!==typeof window?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||vR:globalThis.requestAnimationFrame||vR,_R="undefined"!==typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||yR:globalThis.cancelAnimationFrame||yR,bR=function(e){return console&&"function"===typeof console.warn&&console.warn(e)},wR=null,ER=function(e,t){var n=e.baseTag,r=e.bodyAttributes,i=e.htmlAttributes,o=e.linkTags,s=e.metaTags,a=e.noscriptTags,u=e.onChangeClientState,l=e.scriptTags,c=e.styleTags,d=e.title,h=e.titleAttributes;SR(jN.BODY,r),SR(jN.HTML,i),kR(d,h);var p={baseTag:xR(jN.BASE,n),linkTags:xR(jN.LINK,o),metaTags:xR(jN.META,s),noscriptTags:xR(jN.NOSCRIPT,a),scriptTags:xR(jN.SCRIPT,l),styleTags:xR(jN.STYLE,c)},f={},g={};
2Object.keys(p).forEach(function(e){var t=p[e],n=t.newTags,r=t.oldTags;n.length&&(f[e]=n),r.length&&(g[e]=p[e].oldTags)}),t&&t(),u(e,f,g)},CR=function(e){return Array.isArray(e)?e.join(""):e},kR=function(e,t){"undefined"!==typeof e&&document.title!==e&&(document.title=CR(e)),SR(jN.TITLE,t)},SR=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute(oR),i=r?r.split(","):[],o=[].concat(i),s=Object.keys(t),a=0;a<s.length;a++){var u=s[a],l=t[u]||"";n.getAttribute(u)!==l&&n.setAttribute(u,l),-1===i.indexOf(u)&&i.push(u);var c=o.indexOf(u);-1!==c&&o.splice(c,1)}for(var d=o.length-1;d>=0;d--)n.removeAttribute(o[d]);i.length===o.length?n.removeAttribute(oR):n.getAttribute(oR)!==s.join(",")&&n.setAttribute(oR,s.join(","))}},xR=function(e,t){var n=document.head||document.querySelector(jN.HEAD),r=n.querySelectorAll(e+"["+oR+"]"),i=Array.prototype.slice.call(r),o=[],s=void 0;return t&&t.length&&t.forEach(function(t){var n=document.createElement(e);for(var r in t)if(t.hasOwnProperty(r))if(r===WN)n.innerHTML=t.innerHTML;else if(r===UN)n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText));else{var a="undefined"===typeof t[r]?"":t[r];n.setAttribute(r,a)}n.setAttribute(oR,"true"),i.some(function(e,t){return s=t,n.isEqualNode(e)})?i.splice(s,1):o.push(n)}
2),i.forEach(function(e){return e.parentNode.removeChild(e)}),o.forEach(function(e){return n.appendChild(e)}),{oldTags:i,newTags:o}},FR=function(e){return Object.keys(e).reduce(function(t,n){var r="undefined"!==typeof e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r},"")},AR=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce(function(t,n){return t[QN[n]||n]=e[n],t},t)},TR=function(e,t,n){switch(e){case jN.TITLE:return{toComponent:function(){return function(e,t,n){var r,i=((r={key:t})[oR]=!0,r),o=AR(n,i);return[ee.createElement(jN.TITLE,o,t)]}(0,t.title,t.titleAttributes)},toString:function(){return function(e,t,n,r){var i=FR(n),o=CR(t);return i?"<"+e+" "+oR+'="true" '+i+">"+cR(o,r)+"</"+e+">":"<"+e+" "+oR+'="true">'+cR(o,r)+"</"+e+">"}(e,t.title,t.titleAttributes,n)}};case BN:case LN:return{toComponent:function(){return AR(t)},toString:function(){return FR(t)}};default:return{toComponent:function(){return function(e,t){return t.map(function(t,n){var r,i=((r={key:n})[oR]=!0,r);return Object.keys(t).forEach(function(e){var n=QN[e]||e;if(n===WN||n===UN){var r=t.innerHTML||t.cssText;i.dangerouslySetInnerHTML={__html:r}}else i[n]=t[e]}),ee.createElement(e,i)})}(e,t)},toString:function(){return function(e,t,n){return t.reduce(function(t,r){var i=Object.keys(r).filter(function(e){return!(e===WN||e===UN)}).reduce(function(e,t){var i="undefined"===typeof r[t]?t:t+'="'+cR(r[t],n)+'"';return e?e+" "+i:i},""),o=r.innerHTML||r.cssText||"",s=-1===iR.indexOf(e);return t+"<"+e+" "+oR+'="true" '+i+(s?"/>":">"+o+"</"+e+">")},"")}(e,t,n)}}}},IR=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,i=e.htmlAttributes,o=e.linkTags,s=e.metaTags,a=e.noscriptTags,u=e.scriptTags,l=e.styleTags,c=e.title,d=void 0===c?"":c,h=e.titleAttributes;return{base:TR(jN.BASE,t,r),bodyAttributes:TR(BN,n,r),htmlAttributes:TR(LN,i,r),link:TR(jN.LINK,o,r),meta:TR(jN.META,s,r),noscript:TR(jN.NOSCRIPT,a,r),script:TR(jN.SCRIPT,u,r),style:TR(jN.STYLE,l,r),title:TR(jN.TITLE,{title:d,titleAttributes:h},r)}},PR=function(e){var t,n;return n=t=function(t){function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,t.apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),n.prototype.shouldComponentUpdate=function(e){return!ON()(this.props,e)},n.prototype.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case jN.SCRIPT:case jN.NOSCRIPT:return{innerHTML:t};case jN.STYLE:return{cssText:t}}throw new Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},n.prototype.flattenArrayTypeChildren=function(e){var t,n=e.child,r=e.arrayTypeChildren,i=e.newChildProps,o=e.nestedChildren;return uR({},r,((t={})[n.type]=[].concat(r[n.type]||[],[uR({},i,this.mapNestedChildrenToProps(n,o))]),t))},n.prototype.mapObjectTypeChildren=function(e){var t,n,r=e.child,i=e.newProps,o=e.newChildProps,s=e.nestedChildren;switch(r.type){case jN.TITLE:return uR({},i,((t={})[r.type]=s,t.titleAttributes=uR({},o),t));case jN.BODY:return uR({},i,{bodyAttributes:uR({},o)});case jN.HTML:return uR({},i,{htmlAttributes:uR({},o)})}return uR({},i,((n={})[r.type]=uR({},o),n))},n.prototype.mapArrayTypeChildrenToProps=function(e,t){var n=uR({},t);return Object.keys(e).forEach(function(t){var r;n=uR({},n,((r={})[t]=e[t],r))}),n}
2,n.prototype.warnOnInvalidChildren=function(e,t){return!0},n.prototype.mapChildrenToProps=function(e,t){var n=this,r={};return ee.Children.forEach(e,function(e){if(e&&e.props){var i=e.props,o=i.children,s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce(function(t,n){return t[rR[n]||n]=e[n],t},t)}(lR(i,["children"]));switch(n.warnOnInvalidChildren(e,o),e.type){case jN.LINK:case jN.META:case jN.NOSCRIPT:case jN.SCRIPT:case jN.STYLE:r=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:r,newChildProps:s,nestedChildren:o});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:s,nestedChildren:o})}}}),t=this.mapArrayTypeChildrenToProps(r,t)},n.prototype.render=function(){var t=this.props,n=t.children,r=lR(t,["children"]),i=uR({},r);return n&&(i=this.mapChildrenToProps(n,i)),ee.createElement(e,i)},aR(n,null,[{key:"canUseDOM",set:function(t){e.canUseDOM=t}}]),n}(ee.Component),t.propTypes={base:AN().object,bodyAttributes:AN().object,children:AN().oneOfType([AN().arrayOf(AN().node),AN().node]),defaultTitle:AN().string,defer:AN().bool,encodeSpecialCharacters:AN().bool,htmlAttributes:AN().object,link:AN().arrayOf(AN().object),meta:AN().arrayOf(AN().object),noscript:AN().arrayOf(AN().object),onChangeClientState:AN().func,script:AN().arrayOf(AN().object),style:AN().arrayOf(AN().object),title:AN().string,titleAttributes:AN().object,titleTemplate:AN().string},t.defaultProps={defer:!0,encodeSpecialCharacters:!0},t.peek=e.peek,t.rewind=function(){var t=e.rewind();return t||(t=IR({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),t},n}(IN()(function(e){return{baseTag:fR([HN,JN],e),bodyAttributes:pR(BN,e),defer:mR(e,ZN),encode:mR(e,eR),htmlAttributes:pR(LN,e),linkTags:gR(jN.LINK,[KN,HN],e),metaTags:gR(jN.META,[VN,zN,qN,GN,$N],e),noscriptTags:gR(jN.NOSCRIPT,[WN],e),onChangeClientState:hR(e),scriptTags:gR(jN.SCRIPT,[YN,WN],e),styleTags:gR(jN.STYLE,[UN],e),title:dR(e),titleAttributes:pR(MN,e)}},function(e){wR&&_R(wR),e.defer?wR=DR(function(){ER(e,function(){wR=null})}):(ER(e),wR=null)},IR)(function(){return null}));PR.renderStatic=PR.rewind;const OR=e=>{},NR=[{labelKey:"settings.difficulty.beginner",value:"beginner"},{labelKey:"settings.difficulty.intermediate",value:"intermediate"},{labelKey:"settings.difficulty.expert",value:"expert"}],RR=[{labelKey:"settings.speed.fast",value:400},{labelKey:"settings.speed.slow",value:550},{labelKey:"settings.speed.superSlow",value:750}],BR=[{labelKey:"settings.on",value:"on",id:"hints-on"},{labelKey:"settings.off",value:"off",id:"hints-off"}],LR=e=>{let{gridUnit:t,colors:n}=e;return{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",display:"flex",flexDirection:"column",background:n.grey95,color:n.textPrimary,zIndex:1e3,overflow:"hidden"}},MR=e=>{let{gridUnit:t,colors:n,fontSize:r}=e;return{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"".concat(5*t,"px"),borderBottom:"2px solid ".concat(n.grey8),background:"white"}},jR=e=>{let{gridUnit:t,fontSize:n}=e;return{fontSize:6*t,fontWeight:"bold",margin:0}},zR=e=>{let{gridUnit:t}=e;return{flex:1,display:"flex",flexDirection:"column",gap:"".concat(6*t,"px"),padding:"".concat(5*t,"px"),background:"white",overflowY:"auto"}},UR=e=>{let{gridUnit:t}=e;return{display:"flex",flexDirection:"column",gap:"".concat(2*t,"px")}},HR=e=>{let{gridUnit:t,fontSize:n,colors:r}=e;return{fontSize:n,fontWeight:"600",color:r.textPrimary,marginBottom:t}},qR=e=>{const{t:t}=Fe(),{settings:n,setGameSettings:r=OR,gameMode:i}=(0,ee.useContext)(Rs),o="multi"===i,s=e=>{const t=e.currentTarget.value;let i=c(c({},n),{},{expertLevel:t});r(i)},a=e=>{let t=c(c({},n),{},{playbackSpeed:+e.currentTarget.value});r(t)},u=e=>{const t="on"===e.currentTarget.value;r(c(c({},n),{},{showHints:t}))};return(0,ee.useEffect)(()=>{aN("Bao | Game settings",window.location.href)}),p_("div",{css:LR,"data-testid":"settings-form",children:[p_(PR,{children:[h_("title",{children:"Bawo | Game settings"}),h_("meta",{name:"description",content:"Game settings"})]}),p_("header",{css:MR,children:[h_("h1",{css:jR,children:t("settings.title")}),h_("button",{css:e=>c({},e.primaryButton),onClick:()=>Do(-1),children:t("common.back")})]}),p_("div",{css:zR,children:[h_("div",{css:UR,"data-testid":"language-setting",children:h_(xN,{label:t("settings.language"),testId:"settings-language-selector"})}),!o&&p_("div",{css:UR,children:[h_("label",{css:HR,htmlFor:"expertLevel",children:t("settings.aiDifficulty")}),h_(ZO,{children:NR.map(e=>{let{labelKey:r,value:i}=e;return h_(QO,{label:t(r),id:i,checked:n.expertLevel===i,value:i,name:"expertLevel",onCh
2ange:s},i)})})]}),p_("div",{css:UR,children:[h_("label",{css:HR,htmlFor:"playbackSpeed",children:t("settings.animationSpeed")}),h_(ZO,{children:RR.map(e=>{let{labelKey:r,value:i}=e;return h_(QO,{label:t(r),id:String(i),checked:n.playbackSpeed===i,value:i,name:"playbackSpeed",onChange:a},i)})})]}),!o&&p_("div",{css:UR,"data-testid":"move-hints-setting",children:[h_("span",{css:HR,id:"move-hints-label",children:t("settings.moveHints")}),h_(ZO,{children:BR.map(e=>{let{labelKey:r,value:i,id:o}=e;const s=!1!==n.showHints,a="on"===i?s:!s;return h_(QO,{label:t(r),id:o,testId:"move-hints-".concat(i),checked:a,value:i,name:"moveHints",onChange:u},o)})})]})]})]})},WR=qR,$R=e=>{let{gridUnit:t,colors:n}=e;return{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",display:"flex",flexDirection:"column",background:n.grey95,color:n.textPrimary,zIndex:1e3,overflow:"hidden"}},VR=e=>{let{gridUnit:t,colors:n}=e;return{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"".concat(5*t,"px"),borderBottom:"2px solid ".concat(n.grey8),background:"white"}},GR=e=>{let{gridUnit:t}=e;return{fontSize:6*t,fontWeight:"bold",margin:0}},KR=e=>{let{gridUnit:t}=e;return{flex:1,display:"flex",flexDirection:"column",padding:"".concat(5*t,"px"),background:"white",overflowY:"auto"}},YR=e=>{let{colors:t}=e;return{width:"100%",textAlign:"center",borderCollapse:"collapse"}},JR=e=>{let{gridUnit:t}=e;return{tableLayout:"fixed",padding:t,display:"table",width:"100%"}},QR=e=>c({borderBottom:"2px solid ".concat(e.colors.grey8)},JR(e)),XR=e=>{let{gridUnit:t}=e;return{display:"block",overflowY:"auto"}},ZR=e=>{let{gridUnit:t,fontSize:n,colors:r}=e;return{padding:"".concat(2*t,"px"),fontSize:n,fontWeight:"600",color:r.textPrimary}},eB=e=>{let{gridUnit:t,fontSize:n,colors:r}=e;return{padding:"".concat(2*t,"px"),fontSize:n,color:r.grey1}},tB=e=>{const{t:t}=Fe();let n;if("multi"===e.gameMode&&null!=e.playerSide){const r=0===e.user;n=t(e.user===e.playerSide?r?"history.hostYou":"history.guestYou":r?"history.host":"history.guest")}else n=t(0===e.user?"history.bot":"history.you");return p_("tr",{css:JR,children:[h_("td",{css:eB,children:n}),h_("td",{css:eB,children:e.index}),h_("td",{css:eB,children:e.direction})]})},nB=e=>{var t;const{t:n}=Fe(),r=(0,ee.useContext)(Bs),i=(0,ee.useContext)(Rs).gameMode,o=(e.moveHistory||(null===r||void 0===r||null===(t=r.properties)||void 0===t?void 0:t.moveHistory)||[]).filter(e=>"USER_PLAY"===e.action.type),s=e.game&&e.playerId?e.playerId===e.game.host?0:1:null;return(0,ee.useEffect)(()=>{aN("Bao | Game history",window.location.href)}),p_("div",{css:$R,"data-testid":"history-page",children:[p_(PR,{children:[h_("title",{children:"Bawo | Move History"}),h_("meta",{name:"description",content:"Game move history"})]}),p_("header",{css:VR,children:[h_("h1",{css:GR,children:n("history.title")}),h_("button",{css:e=>c({},e.primaryButton),onClick:()=>Do(-1),children:n("common.back")})]}),h_("div",{css:KR,children:0===o.length?h_("p",{css:e=>{let{gridUnit:t,colors:n}=e;return{fontSize:4*t,color:n.grey3,textAlign:"center",marginTop:10*t}},children:n("history.empty")}):p_("table",{css:YR,children:[h_("thead",{css:QR,children:p_("tr",{children:[h_("th",{css:ZR,children:n("history.columns.user")}),h_("th",{css:ZR,children:n("history.columns.moveIndex")}),h_("th",{css:ZR,children:n("history.columns.moveDirection")})]})}),h_("tbody",{css:XR,children:o.map((e,t)=>h_(tB,{user:e.action.side,index:e.action.index,direction:e.action.direction,gameMode:i,playerSide:s},"row_".concat(t)))})]})})]})},rB=nB;var iB,oB;const sB=["title","titleId"];function aB(){return aB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aB.apply(null,arguments)}function uB(e,t){let{title:n,titleId:r}=e,i=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,sB);return ee.createElement("svg",aB({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",ref:t,"aria-labelledby":r},i),n?ee.createElement("title",{id:r},n):null,iB||(iB=ee.createElement("line",{x1:18,y1:6,x2:6,y2:18})),oB||(oB=ee.createElement("line",{x1:6,y1:6,x2:18,y2:18})))}const lB=ee.forwardRef(uB),cB=(n.p,e=>{let{gridUnit:t}=e;return{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.6)",zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center",padding:5*t}}),dB={position:"relative",background:"white",borderRadius:"8px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.3)",maxWidth:"90vw",maxHeight:"90vh",overflow:"auto"},hB={position:"absolute",top:"10px",right:"10px",background:"white",border:"2px s
2olid #333",borderRadius:"50%",width:"36px",height:"36px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)",transition:"all 0.2s ease",zIndex:10,":hover":{backgroundColor:"#f5f5f5",transform:"scale(1.1)"},svg:{width:"20px",height:"20px",stroke:"#333"}},pB=e=>{let{children:t,onClose:n}=e;const r=()=>{n?n():Do("/game")};return h_("div",{css:cB,onClick:e=>{e.target===e.currentTarget&&r()},children:p_("div",{css:dB,children:[h_("button",{css:hB,onClick:r,"aria-label":"Close",type:"button",children:h_(lB,{})}),t]})})},fB=pB,gB=e=>({0:e[0],1:e[1]}),mB=e=>[e[0],e[1]],vB=e=>({gameId:e.gameId,roomCode:e.roomCode,host:e.host,guest:e.guest||null,settings:e.settings,gameType:e.gameType,gameState:mB(e.gameState),moveHistory:e.moveHistory||[],currentPlayer:e.currentPlayer,status:e.status,players:e.players||{},createdAt:e.createdAt,updatedAt:e.updatedAt}),yB="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",DB=e=>{const[t,n]=(0,ee.useState)(null),[r,i]=(0,ee.useState)(!1),[o,s]=(0,ee.useState)(null);(0,ee.useEffect)(()=>{if(!e)return void n(null);i(!0);const t=KD(zD(l_,"games/".concat(e)),e=>{const t=e.val();if(t)try{const e=vB(t);n(e),s(null)}catch(r){console.error("Error deserializing game:",r),s("Failed to load game data")}else n(null),s("Game not found");i(!1)},e=>{console.error("Error listening to game:",e),s("Failed to connect to game"),i(!1)});return()=>t()},[e]);const a=(0,ee.useCallback)(async(e,t,n,r)=>{try{i(!0);const s=(()=>{const e=Date.now(),t=Math.random().toString(36).substring(2,9);return"".concat(e,"_").concat(t)})(),a=(()=>{let e="";for(let t=0;t<6;t++){const t=Math.floor(36*Math.random());e+=yB[t]}return e})(),u=((e,t,n,r,i,o)=>{const s=Date.now();return{gameId:e,roomCode:t,host:n,guest:null,settings:i,gameType:o,gameState:r,moveHistory:[],currentPlayer:i.startingSide,status:"waiting",players:{[n]:{playerId:n,side:0,connected:!0,lastSeen:s}},createdAt:s,updatedAt:s}})(s,a,e,t,n,r),l=zD(l_,"games/".concat(s)),c=zD(l_,"roomCodes/".concat(a));await HD(l,(e=>({gameId:e.gameId,roomCode:e.roomCode,host:e.host,guest:e.guest,settings:e.settings,gameType:e.gameType,gameState:gB(e.gameState),moveHistory:e.moveHistory,currentPlayer:e.currentPlayer,status:e.status,players:e.players,createdAt:e.createdAt,updatedAt:e.updatedAt}))(u)),await HD(c,s);try{const t=zD(l_,"users/".concat(e,"/activeGames/").concat(s));await HD(t,!0)}catch(o){console.warn("Could not update active games:",o instanceof Error?o.message:o)}return i(!1),s}catch(a){return console.error("Error creating game:",a),s("Failed to create game"),i(!1),null}},[]),u=(0,ee.useCallback)(async(e,t)=>{try{i(!0);const r=zD(l_,"roomCodes/".concat(e.toUpperCase())),o=await WD(r);if(!o.exists())return s("Invalid room code"),i(!1),null;const a=o.val(),u=zD(l_,"games/".concat(a)),l=await WD(u);if(!l.exists())return s("Game not found"),i(!1),null;const d=l.val(),h=vB(d);if(h.guest)return s("Game is full"),i(!1),null;const p=Date.now(),f="players/".concat(t);await qD(u,{[f]:{playerId:t,side:1,connected:!0,lastSeen:p},guest:t,status:"active",updatedAt:p});try{const e=zD(l_,"users/".concat(t,"/activeGames/").concat(a));await HD(e,!0)}catch(n){console.warn("Could not update active games:",n instanceof Error?n.message:n)}return i(!1),c(c({},h),{},{guest:t,status:"active"})}catch(r){return console.error("Error joining game:",r),s("Failed to join game"),i(!1),null}},[]),l=(0,ee.useCallback)(async(n,r,i)=>{if(e&&t)try{const o=Date.now(),s={playerId:0===i?t.host:t.guest,index:n,direction:r,side:i,timestamp:o},a=zD(l_,"games/".concat(e)),u=zD(l_,"games/".concat(e,"/moveHistory")),l=await WD(u),c=l.exists()?l.val():[];await qD(a,{moveHistory:[...c,s],updatedAt:o})}catch(o){console.error("Error sending move:",o),s("Failed to send move")}},[e,t]),d=(0,ee.useCallback)(async(t,n)=>{if(e)try{const r=zD(l_,"games/".concat(e));await qD(r,{gameState:gB(t),currentPlayer:n,updatedAt:Date.now()})}catch(r){console.error("Error updating game state:",r),s("Failed to update game state")}},[e]),h=(0,ee.useCallback)(async e=>{try{const t=zD(l_,"users/".concat(e,"/activeGames")),n=await WD(t);if(!n.exists())return[];const r=Object.keys(n.val());return(await Promise.all(r.map(async e=>{const t=zD(l_,"games/".concat(e)),n=await WD(t);return n.exists()?vB(n.val()):null}
2))).filter(Boolean)}catch(t){return console.error("Error fetching player games:",t),[]}},[]),p=(0,ee.useCallback)(()=>{n(null),s(null)},[]);return{game:t,loading:r,error:o,createGame:a,joinGame:u,sendMove:l,updateGameState:d,getPlayerGames:h,leaveGame:p}},_B=(e,t)=>{const n=(0,ee.useRef)(null);return(0,ee.useEffect)(()=>{if(!e||!t)return;const r=zD(l_,"games/".concat(e,"/players/").concat(t));n.current=r;(async()=>{try{await HD(r,{playerId:t,connected:!0,lastSeen:a_()});const e=function(e){return e=qa(e),new OD(e._repo,e._path)}(r);await e.update({connected:!1,lastSeen:a_()})}catch(If){console.error("Error setting up presence:",If)}})();const i=setInterval(async()=>{try{await HD(zD(l_,"games/".concat(e,"/players/").concat(t,"/lastSeen")),a_())}catch(If){console.error("Error updating heartbeat:",If)}},3e4);return()=>{clearInterval(i),n.current&&HD(zD(l_,"games/".concat(e,"/players/").concat(t,"/connected")),!1)}},[e,t]),null};var bB={name:"azd58z",styles:"margin-bottom:8px;font-weight:bold;font-size:14px"},wB={name:"xagbzs",styles:"margin-bottom:6px"},EB={name:"1pi78hi",styles:"display:flex;align-items:center;gap:6px"},CB={name:"1t2ro3e",styles:"color:#ff9800;font-weight:500"};const kB=e=>{let{game:t,playerId:n,currentPlayer:r}=e;if(!t)return null;const i=t.players[t.host],o=t.guest?t.players[t.guest]:null,s=n===t.host,a=s?o:i,u=s?0:1,l=0===u?"Blue (Top)":"Pink (Bottom)",c=r===u,d=c?"Your turn":"Opponent's turn";return p_("div",{"data-testid":"connection-status",css:e=>({position:"absolute",top:10,right:10,background:"rgba(255, 255, 255, 0.95)",padding:"12px 16px",borderRadius:6,fontSize:"13px",color:e.colors.grey5,boxShadow:"0 2px 8px rgba(0,0,0,0.15)",zIndex:100,minWidth:200}),children:[p_("div",{css:bB,"data-testid":"room-code",children:[h_("strong",{children:"Room Code:"})," ",t.roomCode]}),p_("div",{css:wB,"data-testid":"player-info",children:[h_("strong",{children:"You:"})," ",s?"Host":"Guest"," \u2022 ",l]}),h_("div",{"data-testid":"turn-indicator",css:oA({marginBottom:8,padding:"4px 8px",background:c?"#e3f2fd":"#f5f5f5",borderRadius:4,fontWeight:"bold",color:c?"#1976d2":"#666"},"",""),children:d}),a?p_("div",{css:EB,"data-testid":"opponent-status",children:[h_("div",{css:oA({width:8,height:8,borderRadius:"50%",background:a.connected?"#4caf50":"#f44336"},"","")}),p_("span",{children:["Opponent: ",a.connected?"Connected":"Disconnected"]})]}):h_("div",{css:CB,"data-testid":"waiting-status",children:"Waiting for opponent to join..."})]})};const SB=e=>h_(fB,{children:h_(WR,c({},e))}),xB=e=>h_(fB,{children:h_(rB,c({},e))});var FB={name:"1k2dqi3",styles:"text-align:center;padding:40px"},AB={name:"1k2dqi3",styles:"text-align:center;padding:40px"};const TB=e=>{const{gameId:t}=e,{user:n}=m_(),r=n?n.uid:"",{game:i,loading:o,error:s,sendMove:a,updateGameState:u}=DB(null!==t&&void 0!==t?t:null),{addGameToHistory:l}=hN();_B(null!==t&&void 0!==t?t:null,r);const d=(0,ee.useContext)(Qo),h=(0,ee.useRef)(!1),p=(0,ee.useRef)(0),f=(0,ee.useRef)(0),g=i&&r===i.host?0:1,m=i?i.gameState:zs.currentGameState,[v,y]=m,D=(64-cs(v)-cs(y))/2,[_,b]=(0,ee.useReducer)(Us,c(c({},zs),{},{store:D,currentGameState:m,currentPlayer:i?i.currentPlayer:0,settings:i?i.settings:zs.settings})),w=_.currentPlayer,E=_.currentGameState,C=_.currentSequence[_.currentSequenceIndex],k=C?C.index:-1,S=_.currentSequence.length>0&&_.currentSequenceIndex===_.currentSequence.length-1,x=E&&vs(E[ks(g)]),F=E&&vs(E[g]),A=S||-1===_.currentSequenceIndex,T=(x||F)&&A,I=_.settings.playbackSpeed,P=C?C.side:w,O=E&&is(E)?"namua":"mtaji";if((0,ee.useEffect)(()=>{const e=_.currentSequence.length>0&&-1!==_.currentSequenceIndex;if(i&&!h.current&&!e){const e=i.moveHistory?i.moveHistory.length:0;if(e>p.current&&i.moveHistory&&i.moveHistory.length>0){const t=i.moveHistory[i.moveHistory.length-1];t&&t.side!==g&&(_s(t.index,t.direction,E[t.side],E[ks(t.side)])?b({type:"USER_PLAY",index:t.index,direction:t.direction,side:t.side}):console.warn("Invalid opponent move received from Firebase:",t)),p.current=e}}},[i,E,w,g,_.currentSequence,_.currentSequenceIndex]),(0,ee.useEffect)(()=>{const e=-1===_.currentSequenceIndex;i&&e&&i.currentPlayer!==w&&b({type:"CHANGE_PLAYER",side:i.currentPlayer})},[i,w,_.currentSequenceIndex]),(0,ee.useEffect)(()=>
2{if(-1!==k&&!S){const e=setInterval(()=>{b({type:"SEQUENCE_STEP_FORWARD"})},I);return()=>clearInterval(e)}if(S&&!T){const e=setTimeout(()=>{b({type:"CHANGE_PLAYER",side:ks(w)})},1500);return()=>clearTimeout(e)}},[k,w,b,S,T,I]),(0,ee.useEffect)(()=>{const e=_.moveHistory[_.moveHistory.length-1],t=_.moveHistory.length;if(e&&"USER_PLAY"===e.action.type&&e.action.side===g&&t>f.current&&!h.current){h.current=!0;const n=e.action,r=e.sequence;if(!r||0===r.length)return void(h.current=!1);const i=r[r.length-1].state,o=ks(n.side);Promise.all([a(n.index,n.direction,n.side),u(i,o)]).then(()=>{f.current=t,h.current=!1}).catch(e=>{console.error("Error sending move to Firebase:",e),h.current=!1})}},[_.moveHistory,g,a,u]),(0,ee.useEffect)(()=>{i&&uN({gameType:i.gameType,startingSide:i.settings.startingSide,expertLevel:"multiplayer"})},[i]),(0,ee.useEffect)(()=>{if(!T||!i||!t)return;const e=_.moveHistory.length,n={numberOfTurns:e,startingSide:g,gameType:i.gameType,expertLevel:"multiplayer"},r=x?"won":"lost";x?lN(n):cN(n);const o=0===g?i.guest:i.host;l({gameId:t,gameType:i.gameType,mode:"multi",result:r,opponent:o||"Unknown",numberOfTurns:e,startingSide:g,expertLevel:"multiplayer",duration:Date.now()-i.createdAt}).catch(e=>{console.error("Failed to save game to history:",e)})},[T,g,_.moveHistory,i,x,t,l]),!n||o||!i)return h_("div",{css:FB,children:n?"Loading game...":"Authenticating..."});if(s)return p_("div",{css:AB,children:[p_("div",{children:["Error: ",s]}),h_("button",{onClick:()=>window.location.href="/multiplayer",children:"Back to Lobby"})]});const N=w===g&&!h.current;return h_(Ls.Provider,{value:_.gamePlay,children:p_(Rs.Provider,{value:{settings:_.settings,gameStage:O,gameType:i.gameType,gameMode:"multi",setGameSettings:e=>{b({type:"UPDATE_SETTINGS",settings:e})}},children:[h_(kB,{game:i,playerId:r,currentPlayer:w}),h_("div",{css:e=>{let t=8*(e.holeWidth+16)+10,n=4*(e.holeHeight+16)+10;const r=i.gameType===As?35:0;return d===Jo?{transformOrigin:"top left",transform:"translate(".concat(n+r,"px) rotate(90deg)"),height:n,width:t}:{}},"data-testid":"board-container",children:h_(VO,{dispatch:N?b:()=>{},gameType:i.gameType,store:_.store,startingSide:i.settings.startingSide,gameState:E,activeSide:P,currentPlayer:w,activeIndex:k,idle:A,children:T?h_(oN,{won:x,isMultiplayer:!0}):null})}),p_(To,{children:[h_(SB,{path:"settings"}),h_(xB,{path:"history",moveHistory:_.moveHistory,playerId:r,game:i})]})]})})},IB=e=>c(c({},e.button),{},{width:160,textAlign:"center",boxShadow:"0 1px 1px 1px",marginTop:5*e.gridUnit}),PB=e=>{const{t:t}=Fe();return(0,ee.useEffect)(()=>{let e=localStorage.getItem("bao_player_id");e||(e=(()=>{const e=Date.now(),t=Math.random().toString(36).substring(2,15);return"player_".concat(e,"_").concat(t)})(),localStorage.setItem("bao_player_id",e))},[]),p_("div",{css:e=>{let{gridUnit:t}=e;return{position:"fixed",left:0,top:5*t,width:"100vw",height:"100vh",display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"}},children:[h_(WP,{holeWidth:300,holeHeight:300,seeds:32,side:1}),h_("a",{css:IB,href:"/game",children:t("home.playSage")}),h_("a",{css:e=>c(c({},IB(e)),{},{display:"none"}),href:"/multiplayer",children:t("home.playMultiplayer")}),h_("a",{css:IB,href:"/game/help",children:t("home.howToPlay")}),h_("a",{css:IB,href:"/contact",children:t("home.feedback")}),h_("div",{css:e=>({marginTop:5*e.gridUnit}),children:h_(xN,{label:t("common.language")})})]})},OB=PB,NB=e=>h_("button",{onClick:e.onClick,css:e=>{let{iconSize:t,gridUnit:n,colors:r}=e;return{padding:n,display:"inline-block",borderRadius:"".concat(n,"px ").concat(n,"px 0 0"),svg:{width:t,height:t,fill:r.grey2},div:{fontSize:3*n,color:r.grey4,textAlign:"center"}}},children:e.children});var RB,BB;const LB=["title","titleId"];function MB(){return MB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},MB.apply(null,arguments)}function jB(e,t){let{title:n,titleId:r}=e,i=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,LB);return ee.createElement("svg",MB({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",ref:t,"aria-labelledby":r},i),n?ee.createElement("title",{id:r},n):null,RB||(RB=ee.createElement("path",{d:"M460.6 147.3L353 256.9c-.8.8-.8 2 0 2.8l75.3 80.2c5.1 5.1 5.1 13.3 0 18.4-2.5 2.5-5.9 3.8-9.2 3.8s-6.7-1.3-9.2-3.8l-75-79.9c-.8-.8-2.1-.8-2.9 0L313.7 297c-15.3 15.5-35.6 24.1-57.4 24.2-22.1.1-43.1-9.2-58.6-24.9l-17.6-17.9c-.8-.8-2.1-.8-2.9 0l-75 79.9c-2.5 2.5-5.9 3.8-9.2 3.8s-6.7-1.3-9.2-3.8c-5.1-5.1-5.1-13.3 0-18.4l75.3-80.2c.7-.8.7-2 0-2.8L51.4 147.3c-1.3-1.3-3.4
2-.4-3.4 1.4V368c0 17.6 14.4 32 32 32h352c17.6 0 32-14.4 32-32V148.7c0-1.8-2.2-2.6-3.4-1.4z"})),BB||(BB=ee.createElement("path",{d:"M256 295.1c14.8 0 28.7-5.8 39.1-16.4L452 119c-5.5-4.4-12.3-7-19.8-7H79.9c-7.5 0-14.4 2.6-19.8 7L217 278.7c10.3 10.5 24.2 16.4 39 16.4z"})))}const zB=ee.forwardRef(jB);n.p;var UB;const HB=["title","titleId"];function qB(){return qB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qB.apply(null,arguments)}function WB(e,t){let{title:n,titleId:r}=e,i=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,HB);return ee.createElement("svg",qB({xmlns:"http://www.w3.org/2000/svg",width:512,height:512,viewBox:"0 0 512 512",ref:t,"aria-labelledby":r},i),void 0===n?ee.createElement("title",{id:r},"ionicons-v5_logos"):n?ee.createElement("title",{id:r},n):null,UB||(UB=ee.createElement("path",{d:"M496,109.5a201.8,201.8,0,0,1-56.55,15.3,97.51,97.51,0,0,0,43.33-53.6,197.74,197.74,0,0,1-62.56,23.5A99.14,99.14,0,0,0,348.31,64c-54.42,0-98.46,43.4-98.46,96.9a93.21,93.21,0,0,0,2.54,22.1,280.7,280.7,0,0,1-203-101.3A95.69,95.69,0,0,0,36,130.4C36,164,53.53,193.7,80,211.1A97.5,97.5,0,0,1,35.22,199v1.2c0,47,34,86.1,79,95a100.76,100.76,0,0,1-25.94,3.4,94.38,94.38,0,0,1-18.51-1.8c12.51,38.5,48.92,66.5,92.05,67.3A199.59,199.59,0,0,1,39.5,405.6,203,203,0,0,1,16,404.2,278.68,278.68,0,0,0,166.74,448c181.36,0,280.44-147.7,280.44-275.8,0-4.2-.11-8.4-.31-12.5A198.48,198.48,0,0,0,496,109.5Z"})))}const $B=ee.forwardRef(WB),VB=(n.p,e=>{const{t:t}=Fe();return p_("div",{css:e=>({width:8*(e.holeWidth+16)+10,height:4*(e.holeHeight+16)+10,fontSize:4*e.gridUnit,textAlign:"center",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}),children:[h_("div",{children:h_(NB,{children:h_("a",{href:"mailto:[email protected]?subject=".concat(encodeURIComponent(t("contact.emailSubject"))),children:h_(zB,{})})})}),h_("div",{children:h_(NB,{children:h_("a",{href:"https://twitter.com/dodopat",children:h_($B,{})})})}),h_("a",{css:Nr.button,href:"/",children:t("common.home")})]})}),GB=VB;function KB(){}function YB(){}const JB=/^(?:[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u
20EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDDC0-\uDDF3\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD40-\uDD59\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDD4A-\uDD65\uDD6F-\uDD85\uDE80-\uDEA9\uDEB0\uDEB1\uDEC2-\uDEC7\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61\uDF80-\uDF89\uDF8B\uDF8E\uDF90-\uDFB5\uDFB7\uDFD1\uDFD3]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8\uDFC0-\uDFE0]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDB0-\uDDDB\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD80E\uD80F\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46\uDC60-\uDFFF]|\uD810[\uDC00-\uDFFA]|\uD811[\uDC00-\uDE46]|\uD818[\uDD00-\uDD1D]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDD40-\uDD6C\uDE4
20-\uDE7F\uDEA0-\uDEB8\uDEBB-\uDED3\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3\uDFF2-\uDFF6]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDDD0-\uDDED\uDDF0\uDEC0-\uDEDE\uDEE0-\uDEE2\uDEE4\uDEE5\uDEE7-\uDEED\uDEF0-\uDEF4\uDEFE\uDEFF\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79])(?:[\$0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u0870-\u0887\u0889-\u088F\u0897-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5C\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDC-\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1715\u171F-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B4C\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA827\uA82C\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFB
2D3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF65-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDDC0-\uDDF3\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD40-\uDD59\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDD30-\uDD39\uDD40-\uDD65\uDD69-\uDD6D\uDD6F-\uDD85\uDE80-\uDEA9\uDEAB\uDEAC\uDEB0\uDEB1\uDEC2-\uDEC7\uDEFA-\uDF1C\uDF27\uDF30-\uDF50\uDF70-\uDF85\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC46\uDC66-\uDC75\uDC7F-\uDCBA\uDCC2\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD44-\uDD47\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDC9-\uDDCC\uDDCE-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E-\uDE41\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74\uDF80-\uDF89\uDF8B\uDF8E\uDF90-\uDFB5\uDFB7-\uDFC0\uDFC2\uDFC5\uDFC7-\uDFCA\uDFCC-\uDFD3\uDFE1\uDFE2]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E-\uDC61\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDED0-\uDEE3\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF39\uDF40-\uDF46]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCE9\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEB0-\uDEF8\uDF60-\uDF67\uDFC0-\uDFE0\uDFF0-\uDFF9]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDDB0-\uDDDB\uDDE0-\uDDE9\uDEE0-\uDEF6\uDF00-\uDF10\uDF12-\uDF3A\uDF3E-\uDF42\uDF50-\uDF5A\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD80E\uD80F\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC40-\uDC55\uDC60-\uDFFF]|\uD810[\uDC00-\uDFFA]|\uD811[\uDC00-\uDE46]|\uD818[\uDD00-\uDD39]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDD40-\uDD6C\uDD70-\uDD79\uDE40-\uDE7F\uDEA0-\uDEB8\uDEBB-\uDED3\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3\uDFE4\uDFF0-\uDFF6]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD833[\uDCF0-\uDCF9\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC30-\uDC6D\uDC8F\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAE\uDEC0-\uDEF9]|\uD839[\uDCD0-\uDCF9\uDDD0-\uDDFA\uDEC0-\uDEDE\uDEE0-\uDEF5\uDEFE\uDEFF\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]|\uDB40[\uDD00-\uDDEF])*$/,QB=/^(?:[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u
20EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDDC0-\uDDF3\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD40-\uDD59\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDD4A-\uDD65\uDD6F-\uDD85\uDE80-\uDEA9\uDEB0\uDEB1\uDEC2-\uDEC7\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61\uDF80-\uDF89\uDF8B\uDF8E\uDF90-\uDFB5\uDFB7\uDFD1\uDFD3]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8\uDFC0-\uDFE0]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDB0-\uDDDB\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD80E\uD80F\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46\uDC60-\uDFFF]|\uD810[\uDC00-\uDFFA]|\uD811[\uDC00-\uDE46]|\uD818[\uDD00-\uDD1D]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDD40-\uDD6C\uDE4
20-\uDE7F\uDEA0-\uDEB8\uDEBB-\uDED3\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3\uDFF2-\uDFF6]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDDD0-\uDDED\uDDF0\uDEC0-\uDEDE\uDEE0-\uDEE2\uDEE4\uDEE5\uDEE7-\uDEED\uDEF0-\uDEF4\uDEFE\uDEFF\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79])(?:[\$\x2D0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u0870-\u0887\u0889-\u088F\u0897-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5C\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDC-\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1715\u171F-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B4C\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA827\uA82C\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFB
2D3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF65-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDDC0-\uDDF3\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD40-\uDD59\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDD30-\uDD39\uDD40-\uDD65\uDD69-\uDD6D\uDD6F-\uDD85\uDE80-\uDEA9\uDEAB\uDEAC\uDEB0\uDEB1\uDEC2-\uDEC7\uDEFA-\uDF1C\uDF27\uDF30-\uDF50\uDF70-\uDF85\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC46\uDC66-\uDC75\uDC7F-\uDCBA\uDCC2\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD44-\uDD47\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDC9-\uDDCC\uDDCE-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E-\uDE41\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74\uDF80-\uDF89\uDF8B\uDF8E\uDF90-\uDFB5\uDFB7-\uDFC0\uDFC2\uDFC5\uDFC7-\uDFCA\uDFCC-\uDFD3\uDFE1\uDFE2]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E-\uDC61\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDED0-\uDEE3\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF39\uDF40-\uDF46]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCE9\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEB0-\uDEF8\uDF60-\uDF67\uDFC0-\uDFE0\uDFF0-\uDFF9]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDDB0-\uDDDB\uDDE0-\uDDE9\uDEE0-\uDEF6\uDF00-\uDF10\uDF12-\uDF3A\uDF3E-\uDF42\uDF50-\uDF5A\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD80E\uD80F\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC40-\uDC55\uDC60-\uDFFF]|\uD810[\uDC00-\uDFFA]|\uD811[\uDC00-\uDE46]|\uD818[\uDD00-\uDD39]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDD40-\uDD6C\uDD70-\uDD79\uDE40-\uDE7F\uDEA0-\uDEB8\uDEBB-\uDED3\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3\uDFE4\uDFF0-\uDFF6]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD833[\uDCF0-\uDCF9\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC30-\uDC6D\uDC8F\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAE\uDEC0-\uDEF9]|\uD839[\uDCD0-\uDCF9\uDDD0-\uDDFA\uDEC0-\uDEDE\uDEE0-\uDEF5\uDEFE\uDEFF\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]|\uDB40[\uDD00-\uDDEF])*$/,XB={};function ZB(e,t){return((t||XB).jsx?QB:JB).test(e)}const eL=/[ \t\n\f\r]/g;function tL(e){return""===e.replace(eL,"")}class nL{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function rL(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new nL(n,r,t)}function iL(e){return e.toLowerCase()}nL.prototype.normal={},nL.prototype.property={},nL.prototype.space=void 0;class oL{constructor(e,t){this.attribute=t,this.property=e}}oL.prototype.attribute="",oL.prototype.booleanish=!1,oL.prototype.boolean=!1,oL.prototype.commaOrSpaceSeparated=!1,oL.prototype.commaSeparated=!1,oL.prototype.defined=!1,oL.prototype.mustUseProperty=!1,oL.prototype.number=!1,oL.prototype.overloadedBoolean=!1,oL.prototype.property="",oL.prototype.spaceSeparated=!1,oL.prototype.space=void 0;let sL=0;const aL=fL(),uL=fL(),lL=fL(),cL=fL(),dL=fL(),hL=fL(),pL=fL();function fL(){return 2**++sL}const gL=Object.keys(r);class mL extends oL{constructor(e,t,n,i){let o=-1;if(super(e,t),vL(this,"space",i),"number"===typeof n)for(;++o<gL.length;){const e=gL[o];vL(this,gL[o],(n&r[e])===r[e])}}}
vendor: 4,135 bytes, line 2
2function vL(e,t,n){n&&(e[t]=n)}function yL(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new mL(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[iL(r)]=r,n[iL(o.attribute)]=r}return new nL(t,n,e.space)}mL.prototype.defined=!0;const DL=yL({properties:{ariaActiveDescendant:null,ariaAtomic:uL,ariaAutoComplete:null,ariaBusy:uL,ariaChecked:uL,ariaColCount:cL,ariaColIndex:cL,ariaColSpan:cL,ariaControls:dL,ariaCurrent:null,ariaDescribedBy:dL,ariaDetails:null,ariaDisabled:uL,ariaDropEffect:dL,ariaErrorMessage:null,ariaExpanded:uL,ariaFlowTo:dL,ariaGrabbed:uL,ariaHasPopup:null,ariaHidden:uL,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:dL,ariaLevel:cL,ariaLive:null,ariaModal:uL,ariaMultiLine:uL,ariaMultiSelectable:uL,ariaOrientation:null,ariaOwns:dL,ariaPlaceholder:null,ariaPosInSet:cL,ariaPressed:uL,ariaReadOnly:uL,ariaRelevant:null,ariaRequired:uL,ariaRoleDescription:dL,ariaRowCount:cL,ariaRowIndex:cL,ariaRowSpan:cL,ariaSelected:uL,ariaSetSize:cL,ariaSort:null,ariaValueMax:cL,ariaValueMin:cL,ariaValueNow:cL,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function _L(e,t){return t in e?e[t]:t}function bL(e,t){return _L(e,t.toLowerCase())}const wL=yL({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:hL,acceptCharset:dL,accessKey:dL,action:null,allow:null,allowFullScreen:aL,allowPaymentRequest:aL,allowUserMedia:aL,alt:null,as:null,async:aL,autoCapitalize:null,autoComplete:dL,autoFocus:aL,autoPlay:aL,blocking:dL,capture:null,charSet:null,checked:aL,cite:null,className:dL,cols:cL,colSpan:null,content:null,contentEditable:uL,controls:aL,controlsList:dL,coords:cL|hL,crossOrigin:null,data:null,dateTime:null,decoding:null,default:aL,defer:aL,dir:null,dirName:null,disabled:aL,download:lL,draggable:uL,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:aL,formTarget:null,headers:dL,height:cL,hidden:lL,high:cL,href:null,hrefLang:null,htmlFor:dL,httpEquiv:dL,id:null,imageSizes:null,imageSrcSet:null,inert:aL,inputMode:null,integrity:null,is:null,isMap:aL,itemId:null,itemProp:dL,itemRef:dL,itemScope:aL,itemType:dL,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:aL,low:cL,manifest:null,max:null,maxLength:cL,media:null,method:null,min:null,minLength:cL,multiple:aL,muted:aL,name:null,nonce:null,noModule:aL,noValidate:aL,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:aL,optimum:cL,pattern:null,ping:dL,placeholder:null,playsInl
2ine:aL,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:aL,referrerPolicy:null,rel:dL,required:aL,reversed:aL,rows:cL,rowSpan:cL,sandbox:dL,scope:null,scoped:aL,seamless:aL,selected:aL,shadowRootClonable:aL,shadowRootDelegatesFocus:aL,shadowRootMode:null,shape:null,size:cL,sizes:null,slot:null,span:cL,spellCheck:uL,src:null,srcDoc:null,srcLang:null,srcSet:null,start:cL,step:null,style:null,tabIndex:cL,target:null,title:null,translate:null,type:null,typeMustMatch:aL,useMap:null,value:uL,width:cL,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:dL,axis:null,background:null,bgColor:null,border:cL,borderColor:null,bottomMargin:cL,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:aL,declare:aL,event:null,face:null,frame:null,frameBorder:null,hSpace:cL,leftMargin:cL,link:null,longDesc:null,lowSrc:null,marginHeight:cL,marginWidth:cL,noResize:aL,noHref:aL,noShade:aL,noWrap:aL,object:null,profile:null,prompt:null,rev:null,rightMargin:cL,rules:null,scheme:null,scrolling:uL,standby:null,summary:null,text:null,topMargin:cL,valueType:null,version:null,vAlign:null,vLink:null,vSpace:cL,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:aL,disableRemotePlayback:aL,prefix:null,property:null,results:cL,security:null,unselectable:null},space:"html",transform:bL}),EL=yL({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav
2-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:pL,accentHeight:cL,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:cL,amplitude:cL,arabicForm:null,ascent:cL,attributeName:null,attributeType:null,azimuth:cL,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:cL,by:null,calcMode:null,capHeight:cL,className:dL,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:cL,diffuseConstant:cL,direction:null,display:null,dur:null,divisor:cL,dominantBaseline:null,download:aL,dx:null,dy:null,edgeMode:null,editable:null,elevation:cL,enableBackground:null,end:null,event:null,exponent:cL,externalResourcesRequired:null,fill:null,fillOpacity:cL,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:hL,g2:hL,glyphName:hL,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:cL,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:cL,horizOriginX:cL,horizOriginY:cL,id:null,ideographic:cL,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:cL,k:cL,k1:cL,k2:cL,k3:cL,k4:cL,kernelMatrix:pL,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:cL,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:cL,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,on
2Zoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:cL,overlineThickness:cL,paintOrder:null,panose1:null,path:null,pathLength:cL,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:dL,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:cL,pointsAtY:cL,pointsAtZ:cL,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:pL,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:pL,rev:pL,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:pL,requiredFeatures:pL,requiredFonts:pL,requiredFormats:pL,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:cL,specularExponent:cL,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:cL,strikethroughThickness:cL,string:null,stroke:null,strokeDashArray:pL,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:cL,strokeOpacity:cL,strokeWidth:null,style:null,surfaceScale:cL,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:pL,tabIndex:cL,tableValues:null,target:null,targetX:cL,targetY:cL,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:pL,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:cL,underlineThickness:cL,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:cL,values:null,vAlphabetic:cL,vMathematical:cL,vectorEffect:null,vHanging:cL,vIdeographic:cL,version:null,vertAdvY:cL,vertOriginX:cL,vertOriginY:cL,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:cL,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:_L}),CL=yL({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),kL=yL({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:bL}),SL=yL({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),xL=rL([DL,wL,CL,kL,SL],"html"),FL=rL([DL,EL,CL,kL,SL],"svg"),AL=/[A-Z]/g,TL=/-[a-z]/g,IL=/^data[-\w.:]+$/i;function PL(e){return"-"+e.toLowerCase()}function OL(e){return e.charAt(1).toUpperCase()}const NL={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var RL=n(294);const BL=ML("end"),LL=ML("start");function ML(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"===typeof n.line&&n.line>0&&"number"===typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"===typeof n.offset&&n.offset>-1?n.offset:void 0}}}function jL(e){return e&&"object"===typeof e?"position"in e||"type"in e?UL(e.position):"start"in e||"end"in e?UL(e):"line"in e||"column"in e?zL(e):"":""}function zL(e){return HL(e&&e.line)+":"+HL(e&&e.column)}function UL(e){return zL(e&&e.start)+"-"+zL(e&&e.end)}function HL(e){return e&&"number"===typeof e?e:1}class qL extends Error{constructor(e,t,n){super(),"string"===typeof t&&(n=t,t=void 0);let r="",i={},o=!1;if(t&&(i="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:c({},t)),"string"===typeof e?r=e:!i.cause&&e&&(o=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"===typeof n){const e=n.indexOf(":");-1===e?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){const e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=s?s.line:void 0,this.name=jL(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=o&&i.cause&&"string"===typeof i.cause.stack?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}qL.prototype.file="",qL.prototype.name="",qL.prototype.reason="",qL.prototype.message="",qL.prototype.stack="",qL.prototype.column=void 0,qL.prototype.line=void 0,qL.prototype.ancestors=void 0,qL.prototype.cause=void 0,qL.prototype.fatal=void 0,qL.prototype.place=void 0,qL.prototype.ruleId=void 0,qL.prototype.source=void 0;const WL={}.hasOwnProperty,$L=new Map,VL=/[A-Z]/g,GL=new Set(["table","tbody","thead","tfoot","tr"]),KL=new Set(["td","th"]),YL="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function JL(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!==typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,i,o){const s=Array.isArray(i.children),a=LL(n);return t(r,i,o,s,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!==typeof t.jsx)throw new TypeError("Expected `jsx` in production options");
vendor: 9,410 bytes, line 2
2if("function"!==typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,i,o){const s=Array.isArray(i.children)?n:t;return o?s(r,i,o):s(r,i)}}(0,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?FL:xL,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},o=QL(i,e,void 0);return o&&"string"!==typeof o?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function QL(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let i=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(i=FL,e.schema=i);e.ancestors.push(t);const o=nM(e,t.tagName,!1),s=function(e,t){const n={};let r,i;for(i in t.properties)if("children"!==i&&WL.call(t.properties,i)){const o=tM(e,i,t.properties[i]);if(o){const[i,s]=o;e.tableCellAlignToStyle&&"align"===i&&"string"===typeof s&&KL.has(t.tagName)?r=s:n[i]=s}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let a=eM(e,t);GL.has(t.tagName)&&(a=a.filter(function(e){return"string"!==typeof e||!("object"===typeof(t=e)?"text"===t.type&&tL(t.value):tL(t));var t}));return XL(e,s,o,t),ZL(s,a),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}rM(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let i=r;"svg"===t.name&&"html"===r.space&&(i=FL,e.schema=i);e.ancestors.push(t);const o=null===t.name?e.Fragment:nM(e,t.name,!0),s=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];KB(t.type);const i=t.expression;KB(i.type);const o=i.properties[0];KB(o.type),Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else rM(e,t.position);else{const i=r.name;let o;if(r.value&&"object"===typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];KB(t.type),o=e.evaluater.evaluateExpression(t.expression)}else rM(e,t.position);else o=null===r.value||r.value;n[i]=o}return n}(e,t),a=eM(e,t);return XL(e,s,o,t),ZL(s,a),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);rM(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return ZL(r,eM(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function XL(e,t,n,r){"string"!==typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ZL(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function eM(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:$L;for(;++r<t.children.length;){const o=t.children[r];let s;if(e.passKeys){const e="element"===o.type?o.tagName:"mdxJsxFlowElement"===o.type||"mdxJsxTextElement"===o.type?o.name:void 0;if(e){const t=i.get(e)||0;s=e+"-"+t,i.set(e,t+1)}}const a=QL(e,o,s);void 0!==a&&n.push(a)}return n}function tM(e,t,n){const r=function(e,t){const n=iL(t);let r=t,i=oL;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&IL.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(TL,OL);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!TL.test(e)){let n=e.replace(AL,PL);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=mL}return new i(r,t)}(e.schema,t);if(!(null===n||void 0===n||"number"===typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e,t){const n=t||{};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}(n):n.join(" ").trim()),"style"===r.property){let t="object"===typeof n?n:function(e,t){try{return RL(t,{reactCompat:!0})}catch(If){if(e.ignoreInvalidStyle)return{};const n=If,r=new qL("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=YL+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)WL.call(e,n)&&(t[iM(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?NL[r.property]||r.property:r.attribute,n]}}function nM(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,i=-1;for(;++i<e.length;){const t=ZB(e[i])?{type:"Identifier",name:e[i]}:{type:"Literal",value:e[i]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(i&&"Literal"===t.type),optional:!1}:t}r=n}else r=ZB(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return WL.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);rM(e)}function rM(e,t){const n=new qL("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=YL+"#cannot-handle-mdx-estrees-without-createevaluater",n}function iM(e){let t=e.replace(VL,oM);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function oM(e){return"-"+e.toLowerCase()}const sM={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},aM={};function uM(e,t,n){if(function(e){return Boolean(e&&"object"===typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return lM(e.children,t,n)}return Array.isArray(e)?lM(e,t,n):""}function lM(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=uM(e[i],t,n);return r.join("")}function cM(e,t,n,r){const i=e.length;let o,s=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);s<r.length;)o=r.slice(s,s+1e4),o.unshift(t,0),e.splice(...o),s+=1e4,t+=1e4}function dM(e,t){return e.length>0?(cM(e,e.length,0,t),e):t}class hM{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null===t||void 0===t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const i=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&pM(this.left,n),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),pM(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),pM(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);pM(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);pM(this.left,t.reverse())}}}function pM(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function fM(e){const t={};let n,r,i,o,s,a,u,l=-1;const d=new hM(e);for(;++l<d.length;){for(;l in t;)l=t[l];if(n=d.get(l),l&&"chunkFlow"===n[1].type&&"listItemPrefix"===d.get(l-1)[1].type&&(a=n[1]._tokenizer.events,i=0,i<a.length&&"lineEndingBlank"===a[i][1].type&&(i+=2),i<a.length&&"content"===a[i][1].type))for(;++i<a.length&&"content"!==a[i][1].type;)"chunkText"===a[i][1].type&&(a[i][1]._isInFirstContentOfListItem=!0,i++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,gM(d,l)),l=t[l],u=!0);else if(n[1]._container){for(i=l,r=void 0;i--;)if(o=d.get(i),"lineEnding"===o[1].type||"lineEndingBlank"===o[1].type)"enter"===o[0]&&(r&&(d.get(r)[1].type="lineEndingBlank"),o[1].type="lineEnding",r=i);else if("linePrefix"!==o[1].type&&"listItemIndent"!==o[1].type)break;r&&(n[1].end=c({},d.get(r)[1].start),s=d.slice(r,l),s.unshift(n),d.splice(r,l-r+1,s))}}return cM(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function gM(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._c
2ontentTypeTextTrailing=!0));const a=s.events,u=[],l={};let c,d,h=-1,p=n,f=0,g=0;const m=[g];for(;p;){for(;e.get(++i)[1]!==p;);o.push(i),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),d&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++h<a.length;)"exit"===a[h][0]&&"enter"===a[h-1][0]&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(g=h+1,m.push(g),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):m.pop(),h=m.length;h--;){const t=a.slice(m[h],m[h+1]),n=o.pop();u.push([n,n+t.length-1]),e.splice(n,2,t)}for(u.reverse(),h=-1;++h<u.length;)l[f+u[h][0]]=f+u[h][1],f+=u[h][1]-u[h][0]-1;return l}const mM={}.hasOwnProperty;function vM(e,t){let n;for(n in t){const r=(mM.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let o;if(i)for(o in i){mM.call(r,o)||(r[o]=[]);const e=i[o];yM(r[o],Array.isArray(e)?e:e?[e]:[])}}}function yM(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);cM(e,0,0,r)}const DM=IM(/[A-Za-z]/),_M=IM(/[\dA-Za-z]/),bM=IM(/[#-'*+\--9=?A-Z^-~]/);function wM(e){return null!==e&&(e<32||127===e)}const EM=IM(/\d/),CM=IM(/[\dA-Fa-f]/),kM=IM(/[!-/:-@[-`{-~]/);function SM(e){return null!==e&&e<-2}function xM(e){return null!==e&&(e<0||32===e)}function FM(e){return-2===e||-1===e||32===e}const AM=IM(/(?:[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B60\u1B7D-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDEAD\uDED0\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F])|(?:[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1F
vendor: 9,179 bytes, line 2
2BF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD803[\uDD8E\uDD8F\uDED1-\uDED8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDC00-\uDCEF\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA])/),TM=IM(/\s/);function IM(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function PM(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return function(r){if(FM(r))return e.enter(n),s(r);return t(r)};function s(r){return FM(r)&&o++<i?(e.consume(r),s):(e.exit(n),t(r))}}const OM={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),PM(e,t,"linePrefix")},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,i(t)}function i(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):SM(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),i)}}};const NM={tokenize:function(e){const t=this,n=[];let r,i,o,s=0;return a;function a(r){if(s<n.length){const i=n[s];return t.containerState=i[1],e.attempt(i[0].continuation,u,l)(r)}return l(r)}function u(e){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&D();const n=t.events.length;let i,o=n;for(;o--;)if("exit"===t.events[o][0]&&"chunkFlow"===t.events[o][1].type){i=t.events[o][1].end;break}y(s);let a=n;for(;a<t.events.length;)t.events[a][1].end=c({},i),a++;return cM(t.events,o+1,0,t.events.slice(n)),t.events.length=a,l(e)}return a(e)}function l(i){if(s===n.length){if(!r)return p(i);if(r.currentConstruct&&r.currentConstruct.concrete)return g(i);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(RM,d,h)(i)}function d(e){return r&&D(),y(s),p(e)}function h(e){return t.parser.lazy[t.now().line]=s!==n.length,o=t.now().offset,g(e)}function p(n){return t.containerState={},e.attempt(RM,f,g)(n)}function f(e){return s++,n.push([t.currentConstruct,t.containerState]),p(e)}function g(n){return null===n?(r&&D(),y(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:i}),m(n))}function m(n){return null===n?(v(e.exit("chunkFlow"),!0),y(0),void e.consume(n)):SM(n)?(e.consume(n),v(e.exit("chunkFlow")),s=0,t.interrupt=void 0,a):(e.consume(n),m)}function v(e,n){const a=t.sliceStream(e);if(n&&a.push(null),e.previous=i,i&&(i.next=e),i=e,r.defineSkip(e.start),r.write(a),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<o&&(!r.events[e][1].end||r.events[e][1].end.offset>o))return;const n=t.events.length;let i,a,u=n;for(;u--;)if("exit"===t.events[u][0]&&"chunkFlow"===t.events[u][1].type){if(i){a=t.events[u][1].end;break}i=!0}for(y(s),e=n;e<t.events.length;)t.events[e][1].end=c({},a),e++;cM(t.events,u+1,0,t.events.slice(n)),t.events.length=e}}function y(r){let i=n.length;for(;i-- >r;){const r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function D(){r.write([null]),i=void 0,r=void 0,t.containerState._closeFlow=void 0}}},RM={tokenize:function(e,t,n){return PM(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};const BM={partial:!0,tokenize:function(e,t,n){return function(t){return FM(t)?PM(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||SM(e)?t(e):n(e)}}};const LM={resolve:function(e){return fM(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?i(t):SM(t)?e.check(MM,o,i)(t):(e.consume(t),r)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},MM={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),PM(e,i,"linePrefix")};function i(i){if(null===i||SM(i))return n(i);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}};const jM={tokenize:function(e){const t=this,n=e.attempt(BM,function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n},e.attempt(this.parser.constructs.flowInitial,r,PM(e,e.attempt(this.parser.constructs.flow,r,e.attempt(LM,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const zM={resolveAll:WM()},UM=qM("string"),HM=qM("text");function qM(e){return{resolveAll:WM("text"===e?$M:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],i=t.attempt(r,o,s);return o;function o(e){return u(e)?i(e):s(e)}function s(e){if(null!==e)return t.enter("data"),t.consume(e),a;t.consume(e)}function a(e){return u(e)?(t.exit("data"),i(e)):(t.consume(e),a)}function u(e){if(null===e)return!0;const t=r[e];let i=-1;if(t)for(;++i<t.length;){const e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function WM(e){return function(t,n){let r,i=-1;for(;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function $M(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],i=t.sliceStream(r);let o,s=i.length,a=-1,u=0;for(;s--;){const e=i[s];if("string"===typeof e){for(a=e.length;32===e.charCodeAt(a-1);)u++,a--;if(a)break;a=-1}else if(-2===e)o=!0,u++;else if(-1!==e){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const i={type:n===e.length||o||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:c({},r.end)};r.end=c({},i.start),r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,["enter",i,t],["exit",i,t]),n+=2)}n++}return e}const VM={name:"thematicBreak",tokenize:function(e,t,n){let r,i=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,o(e)}(t)};function o(o){return o===r?(e.enter("thematicBreakSequence"),s(o)):i>=3&&(null===o||SM(o))?(e.exit("thematicBreak"),t(o)):n(o)}function s(t){return t===r?(e.consume(t),i++,s):(e.exit("thematicBreakSequence"),FM(t)?PM(e,o,"whitespace")(t):o(t))}}};const GM={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(BM,i,o);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,PM(e,t,"listItemIndent",r.containerState.size+1)(n)}function o(n){return r.containerState.furtherBlankLines||!FM(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine
vendor: 1,328 bytes, line 2
2=void 0,s(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(YM,t,s)(n))}function s(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,PM(e,e.attempt(GM,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,s=0;return function(t){const i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:EM(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(VM,n,u)(t):u(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(t)}return n(t)};function a(t){return EM(t)&&++s<10?(e.consume(t),a):(!r.interrupt||s<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),u(t)):n(t)}function u(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(BM,r.interrupt?n:l,e.attempt(KM,d,c))}
vendor: 9,613 bytes, line 2
2function l(e){return r.containerState.initialBlankLine=!0,o++,d(e)}function c(t){return FM(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},KM={partial:!0,tokenize:function(e,t,n){const r=this;return PM(e,function(e){const i=r.events[r.events.length-1];return!FM(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},YM={partial:!0,tokenize:function(e,t,n){const r=this;return PM(e,function(e){const i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}};const JM={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(FM(t))return PM(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return i(t)};function i(r){return e.attempt(JM,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return n(t)};function i(n){return FM(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};function QM(e,t,n,r,i,o,s,a,u){const l=u||Number.POSITIVE_INFINITY;let c=0;return function(t){if(60===t)return e.enter(r),e.enter(i),e.enter(o),e.consume(t),e.exit(o),d;if(null===t||32===t||41===t||wM(t))return n(t);return e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),f(t)};function d(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(n))}function h(t){return 62===t?(e.exit("chunkString"),e.exit(a),d(t)):null===t||60===t||SM(t)?n(t):(e.consume(t),92===t?p:h)}function p(t){return 60===t||62===t||92===t?(e.consume(t),h):h(t)}function f(i){return c||null!==i&&41!==i&&!xM(i)?c<l&&40===i?(e.consume(i),c++,f):41===i?(e.consume(i),c--,f):null===i||32===i||40===i||wM(i)?n(i):(e.consume(i),92===i?g:f):(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(i))}function g(t){return 40===t||41===t||92===t?(e.consume(t),f):f(t)}}function XM(e,t,n,r,i,o){const s=this;let a,u=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(o),l};function l(d){return u>999||null===d||91===d||93===d&&!a||94===d&&!u&&"_hiddenFootnoteSupport"in s.parser.constructs?n(d):93===d?(e.exit(o),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):SM(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(t){return null===t||91===t||93===t||SM(t)||u++>999?(e.exit("chunkString"),l(t)):(e.consume(t),a||(a=!FM(t)),92===t?d:c)}function d(t){return 91===t||92===t||93===t?(e.consume(t),u++,c):c(t)}}function ZM(e,t,n,r,i,o){let s;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(i),e.consume(t),e.exit(i),s=40===t?41:t,a;return n(t)};function a(n){return n===s?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(o),u(n))}function u(t){return t===s?(e.exit(o),a(s)):null===t?n(t):SM(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),PM(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),l(t))}function l(t){return t===s||null===t||SM(t)?(e.exit("chunkString"),u(t)):(e.consume(t),92===t?c:l)}function c(t){return t===s||92===t?(e.consume(t),l):l(t)}}function ej(e,t){let n;return function r(i){if(SM(i))return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r;if(FM(i))return PM(e,r,n?"linePrefix":"lineSuffix")(i);return t(i)}}function tj(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const nj={name:"definition",tokenize:function(e,t,n){const r=this;let i;return function(t){return e.enter("definition"),function(t){return XM.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function o(t){return i=tj(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),s):n(t)}function s(t){return xM(t)?ej(e,a)(t):a(t)}function a(t){return QM(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function u(t){return e.attempt(rj,l,l)(t)}function l(t){return FM(t)?PM(e,c,"whitespace")(t):c(t)}function c(o){return null===o||SM(o)?(e.exit("definition"),r.parser.defined.push(i),t(o)):n(o)}}},rj={partial:!0,tokenize:function(e,t,n){return function(t){return xM(t)?ej(e,r)(t):n(t)};function r(t){return ZM(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return FM(t)?PM(e,o,"whitespace")(t):o(t)}function o(e){return null===e||SM(e)?t(e):n(e)}}};const ij={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),PM(e,i,"linePrefix",5)(t)};function i(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return null===t?a(t):SM(t)?e.attempt(oj,o,a)(t):(e.enter("codeFlowValue"),s(t))}function s(t){return null===t||SM(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),s)}function a(n){return e.exit("codeIndented"),t(n)}}},oj={partial:!0,tokenize:function(e,t,n){const r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):SM(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):PM(e,o,"linePrefix",5)(t)}function o(e){const o=r.events[r.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):SM(e)?i(e):n(e)}}};const sj={name:"headingAtx",resolve:function(e,t){let n,r,i=e.length-2,o=3;"whitespace"===e[o][1].type&&(o+=2);i-2>o&&"whitespace"===e[i][1].type&&(i-=2);"atxHeadingSequence"===e[i][1].type&&(o===i-1||i-4>o&&"whitespace"===e[i-2][1].type)&&(i-=o+1===i?2:4);i>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[i][1].end},r={type:"chunkText",start:e[o][1].start,end:e[i][1].end,contentType:"text"},cM(e,o,i-o+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),i(t)}(t)};function i(t){return 35===t&&r++<6?(e.consume(t),i):null===t||xM(t)?(e.exit("atxHeadingSequence"),o(t)):n(t)}function o(n){return 35===n?(e.enter("atxHeadingSequence"),s(n)):null===n||SM(n)?(e.exit("atxHeading"),t(n)):FM(n)?PM(e,o,"whitespace")(n):(e.enter("atxHeadingText"),a(n))}function s(t){return 35===t?(e.consume(t),s):(e.exit("atxHeadingSequence"),o(t))}function a(t){return null===t||35===t||xM(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),a)}}};const aj={name:"setextUnderline",resolveTo:function(e,t){let n,r,i,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){n=o;break}"paragraph"===e[o][1].type&&(r=o)}else"content"===e[o][1].type&&e.splice(o,1),i||"definition"!==e[o][1].type||(i=o);const s={type:"setextHeading",start:c({},e[n][1].start),end:c({},e[e.length-1][1].end)};e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",s,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end=c({},e[i][1].end)):e[n][1]=s;return e.push(["exit",s,t]),e},tokenize:function(e,t,n){const r=this;let i;return function(t){let s,a=r.events.length;for(;a--;)if("lineEnding"!==r.events[a][1].type&&"linePrefix"!==r.events[a][1].type&&"content"!==r.events[a][1].type){s="paragraph"===r.events[a][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||s))return e.enter("setextHeadingLine"),i=t,function(t){return e.enter("setextHeadingLineSequence"),o(t)}(t);return n(t)};function o(t){return t===i?(e.consume(t),o):(e.exit("setextHeadingLineSequence"),FM(t)?PM(e,s,"lineSuffix")(t):s(t))}function s(r){return null===r||SM(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const uj=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],lj=["pre","script","style","textarea"],cj={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let i,o,s,a,u;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),l}(t)};function l(a){return 33===a?(e.consume(a),c):47===a?(e.consume(a),o=!0,p):63===a?(e.consume(a),i=3,r.interrupt?t:N):DM(a)?(e.consume(a),s=String.fromCharCode(a),f):n(a)}function c(o){return 45===o?(e.consume(o),i=2,d):91===o?(e.consume(o),i=5,a=0,h):DM(o)?(e.consume(o),i=4,r.interrupt?t:N):n(o)}function d(i){return 45===i?(e.consume(i),r.interrupt?t:N):n(i)}function h(i){const o="CDATA[";
vendor: 4,148 bytes, line 2
2return i===o.charCodeAt(a++)?(e.consume(i),6===a?r.interrupt?t:S:h):n(i)}function p(t){return DM(t)?(e.consume(t),s=String.fromCharCode(t),f):n(t)}function f(a){if(null===a||47===a||62===a||xM(a)){const u=47===a,l=s.toLowerCase();return u||o||!lj.includes(l)?uj.includes(s.toLowerCase())?(i=6,u?(e.consume(a),g):r.interrupt?t(a):S(a)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(a):o?m(a):v(a)):(i=1,r.interrupt?t(a):S(a))}return 45===a||_M(a)?(e.consume(a),s+=String.fromCharCode(a),f):n(a)}function g(i){return 62===i?(e.consume(i),r.interrupt?t:S):n(i)}function m(t){return FM(t)?(e.consume(t),m):C(t)}function v(t){return 47===t?(e.consume(t),C):58===t||95===t||DM(t)?(e.consume(t),y):FM(t)?(e.consume(t),v):C(t)}function y(t){return 45===t||46===t||58===t||95===t||_M(t)?(e.consume(t),y):D(t)}function D(t){return 61===t?(e.consume(t),_):FM(t)?(e.consume(t),D):v(t)}function _(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),u=t,b):FM(t)?(e.consume(t),_):w(t)}function b(t){return t===u?(e.consume(t),u=null,E):null===t||SM(t)?n(t):(e.consume(t),b)}function w(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||xM(t)?D(t):(e.consume(t),w)}function E(e){return 47===e||62===e||FM(e)?v(e):n(e)}function C(t){return 62===t?(e.consume(t),k):n(t)}function k(t){return null===t||SM(t)?S(t):FM(t)?(e.consume(t),k):n(t)}function S(t){return 45===t&&2===i?(e.consume(t),T):60===t&&1===i?(e.consume(t),I):62===t&&4===i?(e.consume(t),R):63===t&&3===i?(e.consume(t),N):93===t&&5===i?(e.consume(t),O):!SM(t)||6!==i&&7!==i?null===t||SM(t)?(e.exit("htmlFlowData"),x(t)):(e.consume(t),S):(e.exit("htmlFlowData"),e.check(dj,B,x)(t))}function x(t){return e.check(hj,F,B)(t)}function F(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),A}function A(t){return null===t||SM(t)?x(t):(e.enter("htmlFlowData"),S(t))}function T(t){return 45===t?(e.consume(t),N):S(t)}function I(t){return 47===t?(e.consume(t),s="",P):S(t)}function P(t){if(62===t){const n=s.toLowerCase();return lj.includes(n)?(e.consume(t),R):S(t)}return DM(t)&&s.length<8?(e.consume(t),s+=String.fromCharCode(t),P):S(t)}function O(t){return 93===t?(e.consume(t),N):S(t)}function N(t){return 62===t?(e.consume(t),R):45===t&&2===i?(e.consume(t),N):S(t)}function R(t){return null===t||SM(t)?(e.exit("htmlFlowData"),B(t)):(e.consume(t),R)}function B(n){return e.exit("htmlFlow"),t(n)}}},dj={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(BM,t,n)}}},hj={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(SM(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i;return n(t)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const pj={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},fj={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,i={partial:!0,tokenize:function(e,t,n){let i=0;return s;function s(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),u}function u(t){return e.enter("codeFencedFence"),FM(t)?PM(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}function l(t){return t===o?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===o?(i++,e.consume(t),c):i>=a?(e.exit("codeFencedFenceSequence"),FM(t)?PM(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||SM(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let o,s=0,a=0;return function(t){return function(t){const n=r.events[r.events.length-1];return s=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,o=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(t)}(t)};function u(t){return t===o?(a++,e.consume(t),u):a<3?n(t):(e.exit("codeFencedFenceSequence"),FM(t)?PM(e,l,"whitespace")(t):l(t))}function l(n){return null===n||SM(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(pj,p,y)(n)):(e.enter("co
2deFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(n))}function c(t){return null===t||SM(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),l(t)):FM(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),PM(e,d,"whitespace")(t)):96===t&&t===o?n(t):(e.consume(t),c)}function d(t){return null===t||SM(t)?l(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(t))}function h(t){return null===t||SM(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),l(t)):96===t&&t===o?n(t):(e.consume(t),h)}function p(t){return e.attempt(i,y,f)(t)}function f(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),g}function g(t){return s>0&&FM(t)?PM(e,m,"linePrefix",s+1)(t):m(t)}function m(t){return null===t||SM(t)?e.check(pj,p,y)(t):(e.enter("codeFlowValue"),v(t))}function v(t){return null===t||SM(t)?(e.exit("codeFlowValue"),m(t)):(e.consume(t),v)}function y(n){return e.exit("codeFenced"),t(n)}}};const gj=document.createElement("i");function mj(e){const t="&"+e+";";gj.innerHTML=t;const n=gj.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}const vj={name:"characterReference",tokenize:function(e,t,n){const r=this;let i,o,s=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),i=31,o=_M,l(t))}function u(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,o=CM,l):(e.enter("characterReferenceValue"),i=7,o=EM,l(t))}function l(a){if(59===a&&s){const i=e.exit("characterReferenceValue");return o!==_M||mj(r.sliceSerialize(i))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)}return o(a)&&s++<i?(e.consume(a),l):n(a)}}};const yj={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return kM(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const Dj={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),PM(e,t,"linePrefix")}}};function _j(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const bj={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&cM(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,i,o,s=e.length,a=0;for(;s--;)if(n=e[s][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[s][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(i){if("enter"===e[s][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=s,"labelLink"!==n.type)){a=2;break}}else"labelEnd"===n.type&&(i=s);const u={type:"labelLink"===e[r][1].type?"link":"image",start:c({},e[r][1].start),end:c({},e[e.length-1][1].end)},l={type:"label",start:c({},e[r][1].start),end:c({},e[i][1].end)},d={type:"labelText",start:c({},e[r+a+2][1].end),end:c({},e[i-2][1].start)};return o=[["enter",u,t],["enter",l,t]],o=dM(o,e.slice(r+1,r+a+3)),o=dM(o,[["enter",d,t]]),o=dM(o,_j(t.parser.constructs.insideSpan.null,e.slice(r+a+4,i-3),t)),o=dM(o,[["exit",d,t],e[i-2],e[i-1],["exit",l,t]]),o=dM(o,e.slice(i+1)),o=dM(o,[["exit",u,t]]),cM(e,r,e.length,o),e},tokenize:function(e,t,n){const r=this;let i,o,s=r.events.length;for(;s--;)if(("labelImage"===r.events[s][1].type||"labelLink"===r.events[s][1].type)&&!r.events[s][1]._balanced){i=r.events[s][1];break}return function(t){if(!i)return n(t);if(i._inactive)return c(t);return o=r.parser.defined.includes(tj(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a}
vendor: 17,096 bytes, line 2
2;function a(t){return 40===t?e.attempt(wj,l,o?l:c)(t):91===t?e.attempt(Ej,l,o?u:c)(t):o?l(t):c(t)}function u(t){return e.attempt(Cj,l,c)(t)}function l(e){return t(e)}function c(e){return i._balanced=!0,n(e)}}},wj={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return xM(t)?ej(e,i)(t):i(t)}function i(t){return 41===t?l(t):QM(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return xM(t)?ej(e,a)(t):l(t)}function s(e){return n(e)}function a(t){return 34===t||39===t||40===t?ZM(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):l(t)}function u(t){return xM(t)?ej(e,l)(t):l(t)}function l(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},Ej={tokenize:function(e,t,n){const r=this;return function(t){return XM.call(r,e,i,o,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.includes(tj(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}},Cj={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const kj={name:"labelStartImage",resolveAll:bj.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};function Sj(e){return null===e||xM(e)||TM(e)?1:AM(e)?2:void 0}const xj={name:"attention",resolveAll:function(e,t){let n,r,i,o,s,a,u,l,d=-1;for(;++d<e.length;)if("enter"===e[d][0]&&"attentionSequence"===e[d][1].type&&e[d][1]._close)for(n=d;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[d][1]).charCodeAt(0)){if((e[n][1]._close||e[d][1]._open)&&(e[d][1].end.offset-e[d][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[d][1].end.offset-e[d][1].start.offset)%3))continue;a=e[n][1].end.offset-e[n][1].start.offset>1&&e[d][1].end.offset-e[d][1].start.offset>1?2:1;const h=c({},e[n][1].end),p=c({},e[d][1].start);Fj(h,-a),Fj(p,a),o={type:a>1?"strongSequence":"emphasisSequence",start:h,end:c({},e[n][1].end)},s={type:a>1?"strongSequence":"emphasisSequence",start:c({},e[d][1].start),end:p},i={type:a>1?"strongText":"emphasisText",start:c({},e[n][1].end),end:c({},e[d][1].start)},r={type:a>1?"strong":"emphasis",start:c({},o.start),end:c({},s.end)},e[n][1].end=c({},o.start),e[d][1].start=c({},s.end),u=[],e[n][1].end.offset-e[n][1].start.offset&&(u=dM(u,[["enter",e[n][1],t],["exit",e[n][1],t]])),u=dM(u,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",i,t]]),u=dM(u,_j(t.parser.constructs.insideSpan.null,e.slice(n+1,d),t)),u=dM(u,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",r,t]]),e[d][1].end.offset-e[d][1].start.offset?(l=2,u=dM(u,[["enter",e[d][1],t],["exit",e[d][1],t]])):l=0,cM(e,n-1,d-n+3,u),d=n+u.length-l-2;break}d=-1;for(;++d<e.length;)"attentionSequence"===e[d][1].type&&(e[d][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Sj(r);let o;return function(t){return o=t,e.enter("attentionSequence"),s(t)};function s(a){if(a===o)return e.consume(a),s;const u=e.exit("attentionSequence"),l=Sj(a),c=!l||2===l&&i||n.includes(a),d=!i||2===i&&l||n.includes(r);return u._open=Boolean(42===o?c:c&&(i||!d)),u._close=Boolean(42===o?d:d&&(l||!c)),t(a)}}};function Fj(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Aj={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return DM(t)?(e.consume(t),o):64===t?n(t):u(t)}function o(e){return 43===e||45===e||46===e||_M(e)?(r=1,s(e)):u(e)}function s(t){return 58===t?(e.consume(t),r=0,a):(43===t||45===t||46===t||_M(t))&&r++<32?(e.consume(t),s):(r=0,u(t))}function a(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||wM(r)?n(r):(e.consume(r),a)}function u(t){return 64===t?(e.consume(t),l):bM(t)?(e.consume(t),u):n(t)}function l(e){return _M(e)?c(e):n(e)}function c(n){return 46===n?(e.consume(n),r=0,l):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||_M(t))&&r++<63){const n=45===t?d:c;return e.consume(t),n}return n(t)}}};const Tj={name:"htmlText",tokenize:function(e,t,n){const r=this;let i,o,s;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),a};function a(t){return 33===t?(e.consume(t),u):47===t?(e.consume(t),_):63===t?(e.consume(t),y):DM(t)?(e.consume(t),E):n(t)}function u(t){return 45===t?(e.consume(t),l):91===t?(e.consume(t),o=0,p):DM(t)?(e.consume(t),v):n(t)}function l(t){return 45===t?(e.consume(t),h):n(t)}function c(t){return null===t?n(t):45===t?(e.consume(t),d):SM(t)?(s=c,P(t)):(e.consume(t),c)}function d(t){return 45===t?(e.consume(t),h):c(t)}function h(e){return 62===e?I(e):45===e?d(e):c(e)}function p(t){const r="CDATA[";return t===r.charCodeAt(o++)?(e.consume(t),6===o?f:p):n(t)}function f(t){return null===t?n(t):93===t?(e.consume(t),g):SM(t)?(s=f,P(t)):(e.consume(t),f)}function g(t){return 93===t?(e.consume(t),m):f(t)}function m(t){return 62===t?I(t):93===t?(e.consume(t),m):f(t)}function v(t){return null===t||62===t?I(t):SM(t)?(s=v,P(t)):(e.consume(t),v)}function y(t){return null===t?n(t):63===t?(e.consume(t),D):SM(t)?(s=y,P(t)):(e.consume(t),y)}function D(e){return 62===e?I(e):y(e)}function _(t){return DM(t)?(e.consume(t),b):n(t)}function b(t){return 45===t||_M(t)?(e.consume(t),b):w(t)}function w(t){return SM(t)?(s=w,P(t)):FM(t)?(e.consume(t),w):I(t)}function E(t){return 45===t||_M(t)?(e.consume(t),E):47===t||62===t||xM(t)?C(t):n(t)}function C(t){return 47===t?(e.consume(t),I):58===t||95===t||DM(t)?(e.consume(t),k):SM(t)?(s=C,P(t)):FM(t)?(e.consume(t),C):I(t)}function k(t){return 45===t||46===t||58===t||95===t||_M(t)?(e.consume(t),k):S(t)}function S(t){return 61===t?(e.consume(t),x):SM(t)?(s=S,P(t)):FM(t)?(e.consume(t),S):C(t)}function x(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),i=t,F):SM(t)?(s=x,P(t)):FM(t)?(e.consume(t),x):(e.consume(t),A)}function F(t){return t===i?(e.consume(t),i=void 0,T):null===t?n(t):SM(t)?(s=F,P(t)):(e.consume(t),F)}function A(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||xM(t)?C(t):(e.consume(t),A)}function T(e){return 47===e||62===e||xM(e)?C(e):n(e)}function I(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function P(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),O}function O(t){return FM(t)?PM(e,N,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):N(t)}function N(t){return e.enter("htmlTextData"),s(t)}}};const Ij={name:"labelStartLink",resolveAll:bj.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const Pj={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return SM(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const Oj={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,i=3;if(("lineEnding"===e[i][1].type||"space"===e[i][1].type)&&("lineEnding"===e[r][1].type||"space"===e[r][1].type))for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}t=i-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,i,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),s(t)};function s(t){return 96===t?(e.consume(t),o++,s):(e.exit("codeTextSequence"),a(t))}function a(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),a):96===t?(i=e.enter("codeTextSequence"),r=0,l(t)):SM(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):(e.enter("codeTextData"),u(t))}function u(t){return null===t||32===t||96===t||SM(t)?(e.exit("codeTextData"),a(t)):(e.consume(t),u)}function l(n){return 96===n?(e.consume(n),r++,l):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(i.type="codeTextData",u(n))}}};const Nj={42:GM,43:GM,45:GM,48:GM,49:GM,50:GM,51:GM,52:GM,53:GM,54:GM,55:GM,56:GM,57:GM,62:JM},Rj={91:nj},Bj={[-2]:ij,[-1]:ij,32:ij},Lj={35:sj,42:VM,45:[aj,VM],60:cj,61:aj,95:VM,96:fj,126:fj},Mj={38:vj,92:yj},jj={[-5]:Dj,[-4]:Dj,[-3]:Dj,33:kj,38:vj,42:xj,60:[Aj,Tj],91:Ij,92:[Pj,yj],93:bj,95:xj,96:Oj},zj={null:[xj,zM]},Uj={null:[42,95]},Hj={null:[]};function qj(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let s=[],a=[],u=!0;const l={attempt:y(function(e,t){D(e,t.from)}),check:y(v),consume:function(e){SM(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,_()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++));c.previous=e,u=!0},enter:function(e,t){const n=t||{};return n.type=e,n.start=f(),c.events.push(["enter",n,c]),a.push(n),n},exit:function(e){const t=a.pop();return t.end=f(),c.events.push(["exit",t,c]),t},interrupt:y(v,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){i[e.line]=e.column,_()},events:[],now:f,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let s;if("string"===typeof o)s=o;else switch(o){case-5:s="\r";break;case-4:s="\n";break;case-3:s="\r\n";break;case-2:s=t?" ":"\t";break;case-1:if(!t&&i)continue;s=" ";break;default:s=String.fromCharCode(o)}i=-2===o,r.push(s)}return r.join("")}(p(e),t)},sliceStream:p,write:function(e){if(s=dM(s,e),g(),null!==s[s.length-1])return[];return D(t,0),c.events=_j(o,c.events,c),c.events}};let d,h=t.tokenize.call(c,l);return t.resolveAll&&o.push(t),c;function p(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,o)];else{if(s=e.slice(n,i),r>-1){const e=s[0];"string"===typeof e?s[0]=e.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}(s,e)}function f(){const{_bufferIndex:e,_index:t,line:n,column:i,offset:o}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:o}}function g(){let e;for(;r._index<s.length;){const t=s[r._index];if("string"===typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)m(t.charCodeAt(r._bufferIndex));else m(t)}}function m(e){u=void 0,d=e,h=h(e)}function v(e,t){t.restore()}function y(e,t){return function(n,i,o){let s,d,h,p;return Array.isArray(n)?g(n):"tokenize"in n?g([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return g([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function g(e){return s=e,d=0,0===e.length?o:m(e[d])}function m(e){return function(n){p=function(){const e=f(),t=c.previous,n=c.currentConstruct,i=c.events.length,o=Array.from(a);return{from:i,restore:s};function s(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=i,a=o,_()}}(),h=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return y(n);return e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,v,y)(n)}}function v(t){return u=!0,e(h,p),i}function y(e){return u=!0,p.restore(),++d<s.length?m(s[d]):o}}}function D(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&cM(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function _(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Wj(e){const t=function(e){const t={};let n=-1;for(;++n<e.length;)vM(t,e[n]);return t}([i,...(e||{}).extensions||[]]),n={constructs:t,content:r(OM),defined:[],document:r(NM),flow:r(jM),lazy:{},string:r(UM),text:r(HM)};return n;function r(e){return function(t){return qj(n,e,t)}}}const $j=/[\0\t\n\r]/g;function Vj(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||65535===(65535&n)||65534===(65535&n)||n>1114111?"\ufffd":String.fromCodePoint(n)}const Gj=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Kj(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return Vj(n.slice(t?2:1),t?16:10)}return mj(n)||e}const Yj={}.hasOwnProperty;function Jj(e,t,n){return"string"!==typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(te),autolinkProtocol:k,autolinkEmail:k,atxHeading:o(Q),blockQuote:o(V),characterEscape:k,characterReference:k,codeFenced:o(G),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(G,s),codeText:o(K,s),codeTextData:k,data:k,codeFlowValue:k,definition:o(Y),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(J),hardBreakEscape:o(X),hardBreakTrailing:o(X),htmlFlow:o(Z,s),htmlFlowData:k,htmlText:o(Z,s),htmlTextData:k,image:o(ee),label:s,link:o(te),listItem:o(re),listItemValue:h,listOrdered:o(ne,d),listUnordered:o(ne),paragraph:o(ie),reference:j,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(Q),strong:o(oe),thematicBreak:o(ae)},exit:{atxHeading:u(),atxHeadingSequence:b,autolink:u(),autolinkEmail:$,autolinkProtocol:W,blockQuote:u(),characterEscapeValue:S,characterReferenceMarkerHexadecimal:U,characterReferenceMarkerNumeric:U,characterReferenceValue:H,characterReference:q,codeFenced:u(m),codeFencedFence:g,codeFencedFenceInfo:p,codeFencedFenceMeta:f,codeFlowValue:S,codeIndented:u(v),codeText:u(I),codeTextData:S,data:S,definition:u(),definitionDestinationString:_,definitionLabelString:y,definitionTitleString:D,emphasis:u(),hardBreakEscape:u(F),hardBreakTrailing:u(F),htmlFlow:u(A),htmlFlowData:S,htmlText:u(T),htmlTextData:S,image:u(O),label:R,labelText:N,lineEnding:x,link:u(P),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:z,resourceDestinationString:B,resourceTitleString:L,resource:M,setextHeading:u(C),setextHeadingLineSequence:E,setextHeadingText:w,strong:u(),thematicBreak:u()}};Xj(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const o={stack:[r],tokenStack:[],config:t,enter:a,exit:l,buffer:s,resume:c,data:n},u=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])u.push(d);else{d=i(e,u.pop(),d)}for(d=-1;++d<e.length;){const n=t[e[d][0]];Yj.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},o),e[d][1])}if(o.tokenStack.length>0){const e=o.tokenStack[o.tokenStack.length-1];(e[1]||ez).call(o,void 0,e[0])}for(r.position={start:Qj(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Qj(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r,i,o,s,a=t-1,u=-1,l=!1;for(;++a<=n;){const t=e[a];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?u++:u--,s=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||s||u||o||(o=a),s=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:s=void 0}if(!u&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===u&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let s=a;for(i=void 0;s--;){const t=e[s];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",l=!0),t[1].type="lineEnding",i=s}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}
vendor: 6,757 bytes, line 2
2o&&(!i||o<i)&&(r._spread=!0),r.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||a,0,["exit",r,t[2]]),a++,n++}if("listItemPrefix"===t[1].type){const i={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=i,e.splice(a,0,["enter",i,t[2]]),a++,n++,o=void 0,s=!0}}}return e[t][1]._spread=l,n}function o(e,t){return n;function n(n){a.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Qj(t.start),end:void 0}}function u(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+jL({start:e.start,end:e.end})+"): it\u2019s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||ez).call(this,e,r[0])}n.position.end=Qj(e.end)}function c(){return function(e,t){const n=t||aM;return uM(e,"boolean"!==typeof n.includeImageAlt||n.includeImageAlt,"boolean"!==typeof n.includeHtml||n.includeHtml)}(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function f(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function m(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function y(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=tj(this.sliceSerialize(e)).toLowerCase()}function D(){const e=this.resume();this.stack[this.stack.length-1].title=e}function _(){const e=this.resume();this.stack[this.stack.length-1].url=e}function b(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function E(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function C(){this.data.setextHeadingSlurpLineEnding=void 0}function k(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=se(),n.position={start:Qj(e.start),end:void 0},t.push(n)),this.stack.push(n)}function S(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Qj(e.end)}function x(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=Qj(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(k.call(this,e),S.call(this,e))}function F(){this.data.atHardBreak=!0}function A(){const e=this.resume();this.stack[this.stack.length-1].value=e}function T(){const e=this.resume();this.stack[this.stack.length-1].value=e}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function P(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function O(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(Gj,Kj)}(t),n.identifier=tj(t).toLowerCase()}function R(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function B(){const e=this.resume();this.stack[this.stack.length-1].url=e}function L(){const e=this.resume();this.stack[this.stack.length-1].title=e}function M(){this.data.inReference=void 0}function j(){this.data.referenceType="collapsed"}function z(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=tj(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function U(e){this.data.characterReferenceType=e.type}function H(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=Vj(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=mj(t)}this.stack[this.stack.length-1].value+=r}function q(e){this.stack.pop().position.end=Qj(e.end)}function W(e){S.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function $(e){S.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function V(){return{type:"blockquote",children:[]}}function G(){return{type:"code",lang:null,meta:null,value:""}}function K(){return{type:"inlineCode",value:""}}function Y(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function J(){return{type:"emphasis",children:[]}}function Q(){return{type:"heading",depth:0,children:[]}}function X(){return{type:"break"}}function Z(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function ie(){return{type:"paragraph",children:[]}}function oe(){return{type:"strong",children:[]}}function se(){return{type:"text",value:""}}function ae(){return{type:"thematicBreak"}}}(n)(function(e){for(;!fM(e););return e}(Wj(n).document().write(function(){let e,t=1,n="",r=!0;return function(i,o,s){const a=[];let u,l,c,d,h;for(i=n+("string"===typeof i?i.toString():new TextDecoder(o||void 0).decode(i)),c=0,n="",r&&(65279===i.charCodeAt(0)&&c++,r=void 0);c<i.length;){if($j.lastIndex=c,u=$j.exec(i),d=u&&void 0!==u.index?u.index:i.length,h=i.charCodeAt(d),!u){n=i.slice(c);break}if(10===h&&c===d&&e)a.push(-3),e=void 0;else switch(e&&(a.push(-5),e=void 0),c<d&&(a.push(i.slice(c,d)),t+=d-c),h){case 0:a.push(65533),t++;break;case 9:for(l=4*Math.ceil(t/4),a.push(-2);t++<l;)a.push(-1);break;case 10:a.push(-4),t=1;break;default:e=!0,t=1}c=d+1}return s&&(e&&a.push(-5),n&&a.push(n),a.push(null)),a}}
vendor: 3,357 bytes, line 2
2()(e,t,!0))))}function Qj(e){return{line:e.line,column:e.column,offset:e.offset}}function Xj(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Xj(e,r):Zj(e,r)}}function Zj(e,t){let n;for(n in t)if(Yj.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function ez(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+jL({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+jL({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+jL({start:t.start,end:t.end})+") is still open")}function tz(e){const t=this;t.parser=function(n){return Jj(n,c(c(c({},t.data("settings")),e),{},{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}const nz="object"===typeof self?self:globalThis,rz=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);const[o,s]=t[i];switch(o){case 0:case-1:return n(s,i);case 1:{const e=n([],i);for(const t of s)e.push(r(t));return e}case 2:{const e=n({},i);for(const[t,n]of s)e[r(t)]=r(n);return e}case 3:return n(new Date(s),i);case 4:{const{source:e,flags:t}=s;return n(new RegExp(e,t),i)}case 5:{const e=n(new Map,i);for(const[t,n]of s)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,i);for(const t of s)e.add(r(t));return e}case 7:{const{name:e,message:t}=s;return n(new nz[e](t),i)}case 8:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:e}=new Uint8Array(s);return n(new DataView(e),s)}}return n(new nz[o](s),i)};return r})(new Map,e)(0),iz="",{toString:oz}={},{keys:sz}=Object,az=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=oz.call(e).slice(8,-1);switch(n){case"Array":return[1,iz];case"Object":return[2,iz];case"Date":return[3,iz];case"RegExp":return[4,iz];case"Map":return[5,iz];case"Set":return[6,iz];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},uz=e=>{let[t,n]=e;return 0===t&&("function"===n||"symbol"===n)},lz=function(e){let{json:t,lossy:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=[];return((e,t,n,r)=>{const i=(e,t)=>{const i=r.push(e)-1;return n.set(t,i),i},o=r=>{if(n.has(r))return n.get(r);let[s,a]=az(r);switch(s){case 0:{let t=r;switch(a){case"bigint":s=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);t=null;break;case"undefined":return i([-1],r)}return i([s,t],r)}case 1:{if(a){let e=r;return"DataView"===a?e=new Uint8Array(r.buffer):"ArrayBuffer"===a&&(e=new Uint8Array(r)),i([a,[...e]],r)}const e=[],t=i([s,e],r);for(const n of r)e.push(o(n));return t}case 2:{if(a)switch(a){case"BigInt":return i([a,r.toString()],r);case"Boolean":case"Number":case"String":return i([a,r.valueOf()],r)}if(t&&"toJSON"in r)return o(r.toJSON());const n=[],u=i([s,n],r);for(const t of sz(r))!e&&uz(az(r[t]))||n.push([o(t),o(r[t])]);return u}case 3:return i([s,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return i([s,{source:e,flags:t}],r)}case 5:{const t=[],n=i([s,t],r);for(const[i,s]of r)(e||!uz(az(i))&&!uz(az(s)))&&t.push([o(i),o(s)]);return n}case 6:{const t=[],n=i([s,t],r);
2for(const i of r)!e&&uz(az(i))||t.push(o(i));return n}}const{message:u}=r;return i([s,{name:a,message:u}],r)};return o})(!(t||n),!!t,new Map,r)(e),r},cz="function"===typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?rz(lz(e,t)):structuredClone(e):(e,t)=>rz(lz(e,t));function dz(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let s="";if(37===o&&_M(e.charCodeAt(n+1))&&_M(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){const t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(s=String.fromCharCode(o,t),i=1):s="\ufffd"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function hz(e,t){const n=[{type:"text",value:"\u21a9"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function pz(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const fz=function(e){if(null===e||void 0===e)return mz;if("function"===typeof e)return gz(e);if("object"===typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=fz(e[n]);return gz(r);function r(){let e=-1;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(;++e<t.length;)if(t[e].apply(this,r))return!0;return!1}}(e):function(e){const t=e;return gz(n);function n(n){const r=n;let i;for(i in e)if(r[i]!==t[i])return!1;return!0}}(e);if("string"===typeof e)return function(e){return gz(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function gz(e){return function(t,n,r){return Boolean(vz(t)&&e.call(this,t,"number"===typeof n?n:void 0,r||void 0))}}function mz(){return!0}function vz(e){return null!==e&&"object"===typeof e&&"type"in e}const yz=[],Dz=!0,_z=!1;function bz(e,t,n,r){let i;"function"===typeof t&&"function"!==typeof n?(r=n,n=t):i=t;const o=fz(i),s=r?-1:1;!function e(i,a,u){const l=i&&"object"===typeof i?i:{};if("string"===typeof l.type){const e="string"===typeof l.tagName?l.tagName:"string"===typeof l.name?l.name:void 0;Object.defineProperty(c,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return c;function c(){let l,c,d,h=yz;if((!t||o(i,a,u[u.length-1]||void 0))&&(h=function(e){if(Array.isArray(e))return e;if("number"===typeof e)return[Dz,e];return null===e||void 0===e?yz:[e]}(n(i,u)),h[0]===_z))return h;if("children"in i&&i.children){const t=i;if(t.children&&"skip"!==h[0])for(c=(r?t.children.length:-1)+s,d=u.concat(t);c>-1&&c<t.children.length;){const n=t.children[c];if(l=e(n,c,d)(),l[0]===_z)return l;c="number"===typeof l[1]?l[1]:c+s}}return h}}(e,void 0,[])()}function wz(e,t,n,r){let i,o,s;"function"===typeof t&&"function"!==typeof n?(o=void 0,s=t,i=n):(o=t,s=n,i=r),bz(e,o,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return s(e,r,n)},i)}function Ez(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&"text"===o.type?o.value="["+o.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&"text"===s.type?s.value+=r:i.push({type:"text",value:r}),i}function Cz(e){const t=e.spread;return null===t||void 0===t?e.children.length>1:t}function kz(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(Sz(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Sz(t.slice(i),i>0,!1)),o.join("")}function Sz(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}const xz={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}
vendor: 4,404 bytes, line 2
2,footnoteReference:function(e,t){const n="string"===typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=dz(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let s,a=e.footnoteCounts.get(r);void 0===a?(a=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=o+1,a+=1,e.footnoteCounts.set(r,a);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,u);const l={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,l),e.applyData(t,l)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ez(e,t);const i={src:dz(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)},image:function(e,t){const n={src:dz(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ez(e,t);const i={href:dz(r.url||"")};null!==r.title&&void 0!==r.title&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)},link:function(e,t){const n={href:dz(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),i=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Cz(n[r])}return t}(n):Cz(t),o={},s=[];if("boolean"===typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const e=r[a];(i||0!==a||"element"!==e.type||"p"!==e.tagName)&&s.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||i?s.push(e):s.push(...e.children)}const u=r[r.length-1];u&&(i||"element"!==u.type||"p"!==u.tagName)&&s.push({type:"text",value:"\n"});const l={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,l),e.applyData(t,l)},list:function(e,t){const n={},r=e.all(t);let i=-1;for("number"===typeof t.start&&1!==t.start&&(n.start=t.start);++i<r.length;){const e=r[i];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=LL(t.children[1]),s=BL(t.children[t.children.length-1]);o&&s&&(r.position={start:o,end:s}),i.push(r)}const o={type:"element",tagName:"table",properties:{}
2,children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,i=0===(r?r.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,s=o?o.length:t.children.length;let a=-1;const u=[];for(;++a<s;){const n=t.children[a],r={},s=o?o[a]:void 0;s&&(r.align=s);let l={type:"element",tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),u.push(l)}const l={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,l),e.applyData(t,l)},text:function(e,t){const n={type:"text",value:kz(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:Fz,yaml:Fz,definition:Fz,footnoteDefinition:Fz};function Fz(){}const Az=["children"],Tz={}.hasOwnProperty,Iz={};function Pz(e,t){e.position&&(t.position=function(e){const t=LL(e),n=BL(e);if(t&&n)return{start:t,end:n}}(e))}function Oz(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;if("string"===typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&i&&Object.assign(n.properties,cz(i)),"children"in n&&n.children&&null!==r&&void 0!==r&&(n.children=r)}return n}function Nz(e,t){const n=t.data||{},r=!("value"in t)||Tz.call(n,"hProperties")||Tz.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function Rz(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Bz(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Lz(e,t){const n=function(e,t){const n=t||Iz,r=new Map,i=new Map,o=new Map,s=c(c({},xz),n.handlers),a={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const i=a.one(n[r],e);if(i){if(r&&"break"===n[r-1].type&&(Array.isArray(i)||"text"!==i.type||(i.value=Bz(i.value)),!Array.isArray(i)&&"element"===i.type)){const e=i.children[0];e&&"text"===e.type&&(e.value=Bz(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t},applyData:Oz,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:s,one:function(e,t){const n=e.type,r=a.handlers[n];if(Tz.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if("children"in e){const{children:t}=e,n=be(e,Az),r=cz(n);return r.children=a.all(e),r}return cz(e)}return(a.options.unknownHandler||Nz)(a,e,t)},options:n,patch:Pz,wrap:Rz};return wz(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a}(e,t),r=n.one(e,void 0),i=function(e){const t="string"===typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||hz,r=e.options.footnoteBackLabel||pz,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let u=-1;for(;++u<e.footnoteOrder.length;){const i=e.footnoteById.get(e.footnoteOrder[u]);if(!i)continue;const o=e.all(i),s=String(i.identifier).toUpperCase(),l=dz(s.toLowerCase());let c=0;const d=[],h=e.footnoteCounts.get(s);for(;void 0!==h&&++c<=h;){d.length>0&&d.push({type:"text",value:" "});let e="string"===typeof n?n:n(u,c);"string"===typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+l+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"===typeof r?r:r(u,c),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const p=o[o.length-1];if(p&&"element"===p.type&&"p"===p.tagName){const e=p.children[p.children.length-1];e&&"text"===e.type?e.value+=" ":p.children.push({type:"text",value:" "}),p.children.push(...d)}else o.push(...d);const f={type:"element",tagName:"li",properties:{id:t+"fn-"+l},children:e.wrap(o,!0)};e.patch(i,f),a.push(f)}if(0!==a.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:c(c({},cz(s)),{},{id:"footnote-label"}),children:[{type:"text",value:i}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)}
2,{type:"text",value:"\n"}]}}(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:"\n"},i),o}function Mz(e,t){return e&&"run"in e?async function(n,r){const i=Lz(n,c({file:r},t));await e.run(i,r)}:function(n,r){return Lz(n,c({file:r},e||t))}}function jz(e){if(e)throw e}var zz=n(240);function Uz(e){if("object"!==typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Hz(){const e=[],t={run:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];let i=-1;const o=n.pop();if("function"!==typeof o)throw new TypeError("Expected function as last argument, not "+o);!function t(r){const s=e[++i];let a=-1;if(r)o(r);else{for(var u=arguments.length,l=new Array(u>1?u-1:0),c=1;c<u;c++)l[c-1]=arguments[c];for(;++a<n.length;)null!==l[a]&&void 0!==l[a]||(l[a]=n[a]);n=l,s?function(e,t){let n;return i;function i(){for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];const u=e.length>i.length;let l;u&&i.push(o);try{l=e.apply(this,i)}catch(r){if(u&&n)throw r;return o(r)}u||(l&&l.then&&"function"===typeof l.then?l.then(s,o):l instanceof Error?o(l):s(l))}function o(e){if(!n){n=!0;for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];t(e,...i)}}function s(e){o(null,e)}}(s,t)(...l):o(null,...l)}}(null,...n)},use:function(n){if("function"!==typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const qz={basename:function(e,t){if(void 0!==t&&"string"!==typeof t)throw new TypeError('"ext" argument must be a string');Wz(e);let n,r=0,i=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else i<0&&(n=!0,i=o+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let s=-1,a=t.length-1;for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else s<0&&(n=!0,s=o+1),a>-1&&(e.codePointAt(o)===t.codePointAt(a--)?a<0&&(i=o):(a=-1,i=s));r===i?i=s:i<0&&(i=e.length);return e.slice(r,i)},dirname:function(e){if(Wz(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){Wz(e);let t,n=e.length,r=-1,i=0,o=-1,s=0;for(;n--;){const a=e.codePointAt(n);if(47!==a)r<0&&(t=!0,r=n+1),46===a?o<0?o=n:1!==s&&(s=1):o>-1&&(s=-1);else if(t){i=n+1;break}}if(o<0||r<0||0===s||1===s&&o===r-1&&o===i+1)return"";return e.slice(o,r)},join:function(){let e,t=-1;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(;++t<r.length;)Wz(r[t]),r[t]&&(e=void 0===e?r[t]:e+"/"+r[t]);return void 0===e?".":function(e){Wz(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,i="",o=0,s=-1,a=0,u=-1;for(;++u<=e.length;){if(u<e.length)n=e.codePointAt(u);else{if(47===n)break;n=47}if(47===n){if(s===u-1||1===a);else if(s!==u-1&&2===a){if(i.length<2||2!==o||46!==i.codePointAt(i.length-1)||46!==i.codePointAt(i.length-2))if(i.length>2){if(r=i.lastIndexOf("/"),r!==i.length-1){r<0?(i="",o=0):(i=i.slice(0,r),o=i.length-1-i.lastIndexOf("/")),s=u,a=0;continue}}else if(i.length>0){i="",o=0,s=u,a=0;continue}t&&(i=i.length>0?i+"/..":"..",o=2)}else i.length>0?i+="/"+e.slice(s+1,u):i=e.slice(s+1,u),o=u-s-1;s=u,a=0}else 46===n&&a>-1?a++:a=-1}return i}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(e)},sep:"/"};function Wz(e){if("string"!==typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const $z={cwd:function(){return"/"}};function Vz(e){return Boolean(null!==e&&"object"===typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function Gz(e){if("string"===typeof e)e=new URL(e);else if(!Vz(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const Kz=["history","path","basename","stem","extname","dirname"];class Yz{constructor(e){let t;t=e?Vz(e)?{path:e}:"string"===typeof e||function(e){return Boolean(e&&"object"===typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":$z.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<Kz.length;){const e=Kz[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}
2for(n in t)Kz.includes(n)||(this[n]=t[n])}get basename(){return"string"===typeof this.path?qz.basename(this.path):void 0}set basename(e){Qz(e,"basename"),Jz(e,"basename"),this.path=qz.join(this.dirname||"",e)}get dirname(){return"string"===typeof this.path?qz.dirname(this.path):void 0}set dirname(e){Xz(this.basename,"dirname"),this.path=qz.join(e||"",this.basename)}get extname(){return"string"===typeof this.path?qz.extname(this.path):void 0}set extname(e){if(Jz(e,"extname"),Xz(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=qz.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Vz(e)&&(e=Gz(e)),Qz(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"===typeof this.path?qz.basename(this.path,this.extname):void 0}set stem(e){Qz(e,"stem"),Jz(e,"stem"),this.path=qz.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new qL(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"===typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function Jz(e,t){if(e&&e.includes(qz.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+qz.sep+"`")}function Qz(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Xz(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const Zz=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},eU={}.hasOwnProperty;class tU extends Zz{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Hz()}copy(){const e=new tU;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(zz(!0,{},this.namespace)),e}data(e,t){return"string"===typeof e?2===arguments.length?(oU("data",this.frozen),this.namespace[e]=t,this):eU.call(this.namespace,e)&&this.namespace[e]||void 0:e?(oU("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"===typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=uU(e),n=this.parser||this.Parser;return rU("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),rU("process",this.parser||this.Parser),iU("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){const o=uU(e),s=n.parse(o);function a(e,n){e||!n?i(e):r?r(n):t(void 0,n)}n.run(s,o,function(e,t,r){if(e||!t||!r)return a(e);const i=t,o=n.stringify(i,r);var s;"string"===typeof(s=o)||function(e){return Boolean(e&&"object"===typeof e&&"byteLength"in e&&"byteOffset"in e)}(s)?r.value=o:r.result=o,a(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),rU("processSync",this.parser||this.Parser),iU("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,jz(e),t=r}),aU("processSync","process",n),t}run(e,t,n){sU(e),this.freeze();const r=this.transformers;return n||"function"!==typeof t||(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,o){const s=uU(t);r.run(e,s,function(t,r,s){const a=r||e;t?o(t):i?i(a):n(void 0,a,s)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){jz(e),n=t,r=!0}),aU("runSync","run",r),n}stringify(e,t){this.freeze();const n=uU(t),r=this.compiler||this.Compiler;return iU("stringify",r),sU(e),r(e,n)}use(e){const t=this.attachers,n=this.namespace;if(oU("use",this.frozen),null===e||void 0===e);else if("function"===typeof e){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];l(e,i)}else{if("object"!==typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?u(e):a(e)}return this;function s(e){if("function"===typeof e)l(e,[]);else{if("object"!==typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;l(t,n)}else a(e)}}function a(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(e.plugins),e.settings&&(n.settings=zz(!0,n.settings,e.settings))}function u(e){let t=-1;if(null===e||void 0===e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){s(e[t])}}}function l(e,n){let r=-1,i=-1;for(;++r<t.length;)if(t[r][0]===e){i=r;break}if(-1===i)t.push([e,...n]);else if(n.length>0){let[r,...o]=n;const s=t[i][1];Uz(s)&&Uz(r)&&(r=zz(!0,s,r)),t[i]=[e,r,...o]}}}}const nU=(new tU).freeze();function rU(e,t){if("function"!==typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function iU(e,t){if("function"!==typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function oU(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function sU(e){if(!Uz(e)||"string"!==typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function aU(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function uU(e){return function(e){return Boolean(e&&"object"===typeof e&&"message"in e&&"messages"in e)}(e)?e:new Yz(e)}const lU=[],cU={allowDangerousHtml:!0},dU=/^(https?|ircs?|mailto|xmpp)$/i,hU=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function pU(e){const t=fU(e),n=gU(e);return mU(t.runSync(t.parse(n),n),e)}function fU(e){const t=e.rehypePlugins||lU,n=e.remarkPlugins||lU,r=e.remarkRehypeOptions?c(c({},e.remarkRehypeOptions),cU):cU;return nU().use(tz).use(n).use(Mz,r).use(t)}function gU(e){const t=e.children||"",n=new Yz;return"string"===typeof t&&(n.value=t),n}function mU(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,s=t.skipHtml,a=t.unwrapDisallowed,u=t.urlTransform||vU;for(const l of hU)Object.hasOwn(t,l.from)&&YB((l.from,l.to&&l.to,l.id));return wz(e,function(e,t,i){if("raw"===e.type&&i&&"number"===typeof t)return s?i.children.splice(t,1):i.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in sM)if(Object.hasOwn(sM,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=sM[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=u(String(n||""),t,e))}}if("element"===e.type){let s=n?!n.includes(e.tagName):!!o&&o.includes(e.tagName);if(!s&&r&&"number"===typeof t&&(s=!r(e,t,i)),s&&i&&"number"===typeof t)return a&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}),JL(e,{Fragment:Rr.Fragment,components:i,ignoreInvalidStyle:!0,jsx:Rr.jsx,jsxs:Rr.jsxs,passKeys:!0,passNode:!0})}function vU(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return-1===t||-1!==i&&t>i||-1!==n&&t>n||-1!==r&&t>r||dU.test(e.slice(0,t))?e:""}const yU=e=>{let{gridUnit:t}=e;return{marginTop:5*t,marginBottom:5*t,width:"100%",minHeight:65*t,overflowY:"auto",boxSizing:"border-box",lineHeight:"".concat(8*t,"px"),p:{fontSize:4*t,lineHeight:"".concat(6*t,"px"),margin:0}}},DU=e=>h_("div",{css:yU,children:h_(pU,{children:e.text})});var _U,bU;const wU=["title","titleId"];function EU(){return EU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},EU.apply(null,arguments)}function CU(e,t){let{title:n,titleId:r}=e,i=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,wU);return ee.createElement("svg",EU({xmlns:"http://www.w3.org/2000/svg",height:24,viewBox:"0 0 24 24",width:24,ref:t,"aria-labelledby":r},i),n?ee.createElement("title",{id:r},n):null,_U||(_U=ee.createElement("path",{d:"M0 0h24v24H0z",fill:"none"})),bU||(bU=ee.createElement("path",{d:"M6 6h12v12H6z"})))}const kU=ee.forwardRef(CU);n.p;var SU,xU;const FU=["title","titleId"];function AU(){return AU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},AU.apply(null,arguments)}function TU(e,t){let{title:n,titleId:r}=e,i=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,FU);return ee.createElement("svg",AU({xmlns:"http://www.w3.org/2000/svg",height:24,viewBox:"0 0 24 24",width:24,ref:t,"aria-labelledby":r},i),n?ee.createElement("title",{id:r},n):null,SU||(SU=ee.createElement("path",{d:"M8 5v14l11-7z"})),xU||(xU=ee.createElement("path",{d:"M0 0h24v24H0z",fill:"none"})))}const IU=ee.forwardRef(TU),PU=(n.p,()=>{});function OU(){return h_("div",{css:()=>({height:38})})}const NU=e=>{const t=xs(e.moveIndex,e.moveDirection,1,e.gameState),[n,r]=(0,ee.useState)(-1),[i,o]=(0,ee.useState)(!1),{boardProperties:s}=(0,ee.useContext)(es),a=t[n],u=a?a.state:e.gameState;(0,ee.useEffect)(()=>{const e=setTimeout(()=>
2{i&&(n<t.length-1?r(n+1):o(!1))},800);return()=>clearTimeout(e)},[n,t.length,i]),(0,ee.useEffect)(()=>{r(-1)},[e.instruction]);const l=2.5,d=c(c({},s),{},{boardWidth:s.boardWidth/l,boardHeight:s.boardHeight/l,holeHeight:s.holeHeight/l,holeWidth:s.holeWidth/l,highlightedHoles:e.highlightedHoles||s.highlightedHoles});return p_("div",{css:oA({display:"flex",background:"white",flexDirection:"column",alignItems:"center"},"",""),children:[0===t.length?h_(OU,{}):h_("span",{css:e=>({border:"3px solid",borderRadius:"100%",marginBottom:2*e.gridUnit,display:"block",width:6*e.gridUnit,height:6*e.gridUnit,animation:"highlight 2s linear 0s infinite alternate"}),onClick:()=>{r(-1),o(e=>!e)},children:h_(i?kU:IU,{})}),h_(es.Provider,{value:{boardProperties:d,setBoardProperties:()=>{}},children:h_(VO,{store:0,startingSide:0,dispatch:PU,currentPlayer:1,activeSide:a?a.side:1,activeIndex:a?a.index:-1,gameState:u,idle:!i})}),h_(DU,{text:e.instruction})]})},RU=NU;const BU=[{id:"introduction",gameState:[os(),os()],moveIndex:-1,moveDirection:1},{id:"validMoves",gameState:[os(),os()],moveIndex:8,moveDirection:-1},{id:"clockwiseSowing",gameState:[os(),[0,1,0,1,8,0,1,0,0,0,0,0,0,0,0,0,0]],moveIndex:4,moveDirection:1},{id:"antiClockwiseSowing",gameState:[os(),[0,1,0,1,8,0,1,0,0,0,0,0,0,0,0,0,0]],moveIndex:4,moveDirection:-1},{id:"capturing",gameState:[os(),[2,0,2,0,2,0,1,0,0,0,0,0,0,0,0,0,0]],moveIndex:0,moveDirection:1,highlightedHoles:{1:[0,2,4,6],0:[]}},{id:"kimbiKichwa",gameState:[os(),os()],moveIndex:2,moveDirection:-1,highlightedHoles:{0:[0,1,6,7],1:[]}},{id:"mandatoryCapturing",gameState:[[7,0,3,0,0,0,0,0,0,0,9,0,0,2,1,1],[0,2,0,2,5,0,4,8,0,2,1,2,3,0,0,0,0]],moveIndex:9,moveDirection:-1},{id:"takataTurn",gameState:[[0,0,3,0,0,0,0,3,0,0,9,0,0,2,1,1],[0,2,0,2,5,0,4,8,0,1,1,12,3,0,0,0,0]],moveIndex:1,moveDirection:1},{id:"gameEnding",gameState:[[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[0,0,0,0,0,0,0,0,1,2,3,1,4,4,3,2]],moveIndex:-1,moveDirection:1}];var LU={name:"82a6rk",styles:"flex:1"},MU={name:"82a6rk",styles:"flex:1"};const jU=e=>{const{t:t}=Fe(),n=e.screenIndex?parseInt(e.screenIndex,10):0,r=Number.isNaN(n)?0:n,i=Math.max(0,Math.min(r,BU.length-1)),o=BU[i],s=t("help.screens.".concat(o.id,".title")),a=t("help.screens.".concat(o.id,".instruction"));(0,ee.useEffect)(()=>{aN("Bao | How to play",window.location.href),dN(i),i===BU.length-1&&(sN("event","tutorial_complete"),YF.capture("tutorial_complete"))},[i]);const u=i>0,l=i<BU.length-1,d=u?t("help.screens.".concat(BU[i-1].id,".title")):null,h=l?t("help.screens.".concat(BU[i+1].id,".title")):null,p=e=>{let{gridUnit:t,colors:n}=e;return{display:"flex",flexDirection:"column",alignItems:"flex-start",textDecoration:"none",borderRadius:2*t,transition:"background-color 0.2s",paddingTop:2*t,paddingBottom:2*t,color:n.grey3,flex:1,":hover":{backgroundColor:n.grey95}}},f=e=>{let{gridUnit:t,colors:n}=e;return{fontSize:3*t,fontWeight:"600",color:n.grey1,textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:t}},g=e=>{let{fontSize:t,colors:n}=e;return{fontSize:t,fontWeight:"500",color:n.primary}};return p_("div",{css:e=>{let{boardHeight:t,boardWidth:n}=e;return{background:"white",transformOrigin:"top left",display:"flex",flexDirection:"column"}},children:[p_(PR,{children:[p_("title",{children:["Bawo | How to Play | ",s]}),h_("meta",{name:"description",content:"".concat(s," | ").concat(a)})]}),h_(RU,{instruction:a,gameState:o.gameState,moveIndex:o.moveIndex,moveDirection:o.moveDirection,highlightedHoles:o.highlightedHoles}),p_("nav",{css:e=>{let{gridUnit:t}=e;return{display:"flex",justifyContent:"space-between",gap:5*t}},children:[u?p_(jo,{"data-testid":"previous",to:"/game/help/".concat(i-1),css:e=>c(c({},p(e)),{},{alignItems:"flex-start"}),onClick:()=>function(e){sN("event","tutorial_navigated_backward",{help_index:e}),YF.capture("tutorial_navigated_backward",{help_index:e})}(i-1),children:[p_("span",{css:f,children:["\u2190 ",t("help.previous")]}),h_("span",{css:g,children:d})]}):h_("div",{css:LU}),l?p_(jo,{"data-testid":"next",to:"/game/help/".concat(i+1),css:e=>c(c({},p(e)),{},{alignItems:"flex-end"}),onClick:()=>dN(i+1),children:[p_("span",{css:f,children:[t("help.next")," \u2192"]}),h_("span",{css:g,children:h})]}):h_("div",{css:MU})]})]})},zU=jU;const UU=e=>{let{colors:t,gridUnit:n}=e;return{position:"fixed",left:0,width:"100vw",height:"100vh",display:"flex",justifyContent:"center",alignItems:"center",background:t.grey95,overflowY:"auto",padding:5*n}},HU=e=>{let{colors:t,gridUnit:n}=e;return{background:"white",color:t.textPrimary,padding:10*n,borderRadius:3*n,boxShadow:"0 ".concat(n,"px ").concat(1.5*n,"px rgba(0,0,0,0.1)"),minWidth:"400px",maxWidth:"600px",width:"100%"}},qU=e=>{let{colors:t,gridUnit:n}=e;return{marginBottom:8*n,padding:6*n,background:t.grey95,borderRadius:2*n}},WU=e=>{let{gridUnit:t}=e;return{padding:4*t,borderRadius:1.5*t,textAlign:"center"}};var $U={name:"1efi8gv",styles:"font-weight:bold"},VU={name:"1efi8gv",styles:"font-weight:bold"};const GU=e=>{const{user:t,signInWithGoogle:n,signOut:r,isAnonymous:i}
2=m_(),{getWeeklyStats:o,loading:s}=hN(),{showError:a}=(0,ee.useContext)(tA),[u,l]=(0,ee.useState)(null),[d,h]=(0,ee.useState)(!1);(0,ee.useEffect)(()=>{(async()=>{const e=await o();l(e)})()},[o]);return h_("div",t?{css:UU,children:p_("div",{css:HU,children:[h_("h1",{css:e=>({marginTop:0,marginBottom:7.5*e.gridUnit,textAlign:"center"}),children:"Profile & Stats"}),p_("div",{css:qU,children:[h_("h3",{css:e=>({marginTop:0,marginBottom:4*e.gridUnit}),children:"Account"}),p_("div",i?{children:[h_("p",{css:e=>({margin:0,marginBottom:4*e.gridUnit,color:e.colors.grey1}),children:"You're currently signed in as a guest. Sign in with Google to save your progress across devices."}),h_("button",{css:e=>c(c({},e.primaryButton),{},{width:"100%"}),onClick:async()=>{h(!0);try{await n()}catch(If){console.error("Sign in failed:",If),a("Failed to sign in with Google. Please try again.")}finally{h(!1)}},disabled:d,children:d?"Signing in...":"Sign in with Google"})]}:{children:[p_("div",{css:e=>({marginBottom:4*e.gridUnit}),children:[h_("div",{css:e=>({fontSize:3.5*e.gridUnit,color:e.colors.grey1,marginBottom:e.gridUnit}),children:"Email"}),h_("div",{css:$U,children:t.email||"Not available"})]}),p_("div",{css:e=>({marginBottom:4*e.gridUnit}),children:[h_("div",{css:e=>({fontSize:3.5*e.gridUnit,color:e.colors.grey1,marginBottom:e.gridUnit}),children:"Display Name"}),h_("div",{css:VU,children:t.displayName||"Anonymous"})]}),h_("button",{css:e=>c(c({},e.secondaryButton),{},{width:"100%"}),onClick:async()=>{try{await r(),Do("/")}catch(If){console.error("Sign out failed:",If),a("Failed to sign out. Please try again.")}},children:"Sign Out"})]})]}),p_("div",{css:e=>({marginBottom:8*e.gridUnit}),children:[h_("h3",{css:e=>({marginTop:0,marginBottom:4*e.gridUnit}),children:"Last 7 Days"}),s?h_("div",{css:e=>({textAlign:"center",padding:5*e.gridUnit}),children:"Loading stats..."}):u?p_("div",{css:e=>({display:"grid",gridTemplateColumns:"1fr 1fr",gap:4*e.gridUnit}),children:[p_("div",{css:e=>c(c({},WU(e)),{},{background:"#e3f2fd"}),children:[h_("div",{css:e=>({fontSize:8*e.gridUnit,fontWeight:"bold",color:e.colors.primary}),children:u.gamesPlayed}),h_("div",{css:e=>({fontSize:3.5*e.gridUnit,color:e.colors.grey1,marginTop:e.gridUnit}),children:"Games Played"})]}),p_("div",{css:e=>c(c({},WU(e)),{},{background:"#e8f5e9"}),children:[h_("div",{css:e=>({fontSize:8*e.gridUnit,fontWeight:"bold",color:"#388e3c"}),children:u.gamesWon}),h_("div",{css:e=>({fontSize:3.5*e.gridUnit,color:e.colors.grey1,marginTop:e.gridUnit}),children:"Games Won"})]}),p_("div",{css:e=>c(c({},WU(e)),{},{background:"#ffebee"}),children:[h_("div",{css:e=>({fontSize:8*e.gridUnit,fontWeight:"bold",color:"#d32f2f"}),children:u.gamesLost}),h_("div",{css:e=>({fontSize:3.5*e.gridUnit,color:e.colors.grey1,marginTop:e.gridUnit}),children:"Games Lost"})]}),p_("div",{css:e=>c(c({},WU(e)),{},{background:"#f3e5f5"}),children:[p_("div",{css:e=>({fontSize:8*e.gridUnit,fontWeight:"bold",color:"#7b1fa2"}),children:[Math.round(100*u.winRate),"%"]}),h_("div",{css:e=>({fontSize:3.5*e.gridUnit,color:e.colors.grey1,marginTop:e.gridUnit}),children:"Win Rate"})]}),p_("div",{css:e=>c(c({},WU(e)),{},{background:"#fff3e0",gridColumn:"1 / -1"}),children:[h_("div",{css:e=>({fontSize:7*e.gridUnit,fontWeight:"bold",color:"#e65100"}),children:u.averageTurns}),h_("div",{css:e=>({fontSize:3.5*e.gridUnit,color:e.colors.grey1,marginTop:e.gridUnit}),children:"Average Turns per Game"})]})]}):h_("div",{css:e=>({textAlign:"center",padding:5*e.gridUnit,color:e.colors.grey1}),children:"No game history available"})]}),h_("button",{css:e=>c(c({},e.button),{},{width:"100%"}),onClick:()=>Do("/"),children:"Back to Home"})]})}:{css:UU,children:h_("div",{css:e=>({color:e.colors.textPrimary}),children:"Loading..."})})},KU=e=>{let{path:t}=e;const n=DN(mN);return(0,ee.useEffect)(()=>{n||Do("/",{replace:!0})},[n]),n?h_(GU,{path:t}):null};var YU=n(856),JU=n.n(YU),QU=function(e){var t=e.condition,n=e.wrapper,r=e.children;return t?n(r):r};function XU(){return XU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},XU.apply(this,arguments)}
2function ZU(e,t){return ZU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ZU(e,t)}var eH,tH="top",nH="bottom";!function(e){e.STRICT="strict",e.LAX="lax",e.NONE="none"}(eH||(eH={}));var rH="hidden",iH="byCookieValue",oH="CookieConsent",sH=["children"],aH={disableStyles:!1,hideOnAccept:!0,hideOnDecline:!0,location:nH,visible:iH,onAccept:function(e){},onDecline:function(){},cookieName:oH,cookieValue:"true",declineCookieValue:"false",setDeclineCookie:!0,buttonText:"I understand",declineButtonText:"I decline",debug:!1,expires:365,containerClasses:"CookieConsent",contentClasses:"",buttonClasses:"",buttonWrapperClasses:"",declineButtonClasses:"",buttonId:"rcc-confirm-button",declineButtonId:"rcc-decline-button",extraCookieOptions:{},disableButtonStyles:!1,enableDeclineButton:!1,flipButtons:!1,sameSite:eH.LAX,ButtonComponent:function(e){var t=e.children,n=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,sH);return ee.createElement("button",Object.assign({},n),t)},overlay:!1,overlayClasses:"",onOverlayClick:function(){},acceptOnOverlayClick:!1,ariaAcceptLabel:"Accept cookies",ariaDeclineLabel:"Decline cookies",acceptOnScroll:!1,acceptOnScrollPercentage:25,customContentAttributes:{},customContainerAttributes:{},customButtonProps:{},customDeclineButtonProps:{},customButtonWrapperAttributes:{},style:{},buttonStyle:{},declineButtonStyle:{},contentStyle:{},overlayStyle:{}},uH={visible:!1,style:{alignItems:"baseline",background:"#353535",color:"white",display:"flex",flexWrap:"wrap",justifyContent:"space-between",left:"0",position:"fixed",width:"100%",zIndex:"999"},buttonStyle:{background:"#ffd42d",border:"0",borderRadius:"0px",boxShadow:"none",color:"black",cursor:"pointer",flex:"0 0 auto",padding:"5px 10px",margin:"15px"},declineButtonStyle:{background:"#c12a2a",border:"0",borderRadius:"0px",boxShadow:"none",color:"#e5e5e5",cursor:"pointer",flex:"0 0 auto",padding:"5px 10px",margin:"15px"},contentStyle:{flex:"1 0 300px",margin:"15px"},overlayStyle:{position:"fixed",left:0,top:0,width:"100%",height:"100%",zIndex:"999",backgroundColor:"rgba(0,0,0,0.3)"}},lH=function(e){return e+"-legacy"},cH=function(e){var t,n;function r(){var t;return(t=e.apply(this,arguments)||this).state=uH,t.handleScroll=function(){var e=XU({},aH,t.props).acceptOnScrollPercentage,n=document.documentElement,r=document.body,i="scrollTop",o="scrollHeight";(n[i]||r[i])/((n[o]||r[o])-n.clientHeight)*100>e&&t.accept(!0)},t.removeScrollListener=function(){t.props.acceptOnScroll&&window.removeEventListener("scroll",t.handleScroll)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,ZU(t,n);var i=r.prototype;return i.componentDidMount=function(){var e=this.props.debug;(void 0===this.getCookieValue()||e)&&(this.setState({visible:!0}),this.props.acceptOnScroll&&window.addEventListener("scroll",this.handleScroll,{passive:!0}))},i.componentWillUnmount=function(){this.removeScrollListener()},i.accept=function(e){var t;void 0===e&&(e=!1);var n=XU({},aH,this.props),r=n.cookieName,i=n.cookieValue,o=n.hideOnAccept,s=n.onAccept;this.setCookie(r,i),s(null!=(t=e)&&t),o&&(this.setState({visible:!1}),this.removeScrollListener())},i.overlayClick=function(){var e=XU({},aH,this.props),t=e.acceptOnOverlayClick,n=e.onOverlayClick;t&&this.accept(),n()},i.decline=function(){var e=XU({},aH,this.props),t=e.cookieName,n=e.declineCookieValue,r=e.hideOnDecline,i=e.onDecline;e.setDeclineCookie&&this.setCookie(t,n),i(),r&&this.setState({visible:!1})},i.setCookie=function(e,t){var n=this.props,r=n.extraCookieOptions,i=n.expires,o=n.sameSite,s=this.props.cookieSecurity;void 0===s&&(s=!window.location||"https:"===window.location.protocol);var a=XU({expires:i},r,{sameSite:o,secure:s});o===eH.NONE&&JU().set(lH(e),t,a),JU().set(e,t,a)},i.getCookieValue=function(){return function(e){void 0===e&&(e=oH);var t=JU().get(e);return void 0===t?JU().get(lH(e)):t}(this.props.cookieName)},i.render=function(){var e=this;switch(this.props.visible){case rH:return null;case iH:if(!this.state.visible)return null}var t=this.props,n=t.location,r=t.style,i=t.buttonStyle,o=t.declineButtonStyle,s=t.contentStyle,a=t.disableStyles,u=t.buttonText,l=t.declineButtonText,c=t.containerClasses,d=t.contentClasses,h=t.buttonClasse
2s,p=t.buttonWrapperClasses,f=t.declineButtonClasses,g=t.buttonId,m=t.declineButtonId,v=t.disableButtonStyles,y=t.enableDeclineButton,D=t.flipButtons,_=t.ButtonComponent,b=t.overlay,w=t.overlayClasses,E=t.overlayStyle,C=t.ariaAcceptLabel,k=t.ariaDeclineLabel,S=t.customContainerAttributes,x=t.customContentAttributes,F=t.customButtonProps,A=t.customDeclineButtonProps,T=t.customButtonWrapperAttributes,I={},P={},O={},N={},R={};switch(a?(I=Object.assign({},r),P=Object.assign({},i),O=Object.assign({},o),N=Object.assign({},s),R=Object.assign({},E)):(I=Object.assign({},XU({},this.state.style,r)),N=Object.assign({},XU({},this.state.contentStyle,s)),R=Object.assign({},XU({},this.state.overlayStyle,E)),v?(P=Object.assign({},i),O=Object.assign({},o)):(P=Object.assign({},XU({},this.state.buttonStyle,i)),O=Object.assign({},XU({},this.state.declineButtonStyle,o)))),n){case tH:I.top="0";break;case nH:I.bottom="0"}var B=[];return y&&B.push(ee.createElement(_,Object.assign({key:"declineButton",style:O,className:f,id:m,"aria-label":k,onClick:function(){e.decline()}},A),l)),B.push(ee.createElement(_,Object.assign({key:"acceptButton",style:P,className:h,id:g,"aria-label":C,onClick:function(){e.accept()}},F),u)),D&&B.reverse(),ee.createElement(QU,{condition:b,wrapper:function(t){return ee.createElement("div",{style:R,className:w,onClick:function(){e.overlayClick()}},t)}},ee.createElement("div",Object.assign({className:""+c,style:I},S),ee.createElement("div",Object.assign({style:N,className:d},x),this.props.children),ee.createElement("div",Object.assign({className:""+p},T),B.map(function(e){return e}))))},r}(ee.Component);cH.defaultProps=aH;const dH=cH,hH=()=>h_(dH,{cookieName:"baoAppCookieConsent",children:"This website uses cookies to enhance the user experience. By continuing to use this website, you consent to the use of analytics cookies that are based solely on your interactions with this app."});const pH=e=>{let{colors:t}=e;return{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",display:"flex",flexDirection:"column",background:t.grey95,overflow:"hidden",zIndex:1e3}},fH=e=>{let{gridUnit:t}=e;return{display:"flex",justifyContent:"space-between",alignItems:"center",padding:5*t,borderBottom:"2px solid #e0e0e0",background:"white"}},gH=e=>{let{gridUnit:t}=e;return{fontSize:6*t,fontWeight:"bold",margin:0}};var mH={name:"o6svz9",styles:"flex:1;display:flex;justify-content:center;align-items:center;background:white"},vH={name:"1wjykim",styles:"color:#333"},yH={name:"xubfrv",styles:"flex:1;display:flex;flex-direction:column;gap:48px;padding:40px;background:white;color:#333;overflow-y:auto"},DH={name:"syufst",styles:"display:flex;gap:12px;margin-bottom:30px"},_H={name:"1pd0v2w",styles:"text-align:center;padding:20px"},bH={name:"cn3xcj",styles:"margin-bottom:12px"},wH={name:"3w0yoi",styles:"display:flex;flex-direction:column;gap:8px"},EH={name:"1m012t0",styles:"padding:12px;background:#f5f5f5;border-radius:6px;cursor:pointer;transition:background 0.2s;&:hover{background:#e0e0e0;}"},CH={name:"1066lcq",styles:"display:flex;justify-content:space-between;align-items:center"},kH={name:"3x3c54",styles:"font-weight:bold;margin-bottom:4px"},SH={name:"rgntm7",styles:"font-size:12px;color:#666"},xH={name:"p39o",styles:"text-align:center;padding:20px;color:#666"};const FH=e=>{const{t:t}=Fe(),{user:n}=m_(),[r,i]=(0,ee.useState)([]),[o,s]=(0,ee.useState)(!0),{getPlayerGames:a}=DB(null);(0,ee.useEffect)(()=>{if(!n)return void s(!1);let e=!1;return(async()=>{s(!0);try{const t=await a(n.uid);e||i(t)}finally{e||s(!1)}})(),()=>{e=!0}},[n,a]);const u=e=>"waiting"===e.status?t("multiplayerLobby.status.waiting"):"active"===e.status?t("multiplayerLobby.status.active"):"paused"===e.status?t("multiplayerLobby.status.paused"):t("multiplayerLobby.status.finished");return n?p_("div",{css:pH,children:[p_("header",{css:fH,children:[h_("h1",{css:gH,children:t("multiplayerLobby.title")}),h_("button",{css:e=>c({},e.primaryButton),onClick:()=>Do("/"),children:t("multiplayerLobby.backToHome")})]}),p_("div",{css:yH,children:[p_("div",{css:DH,children:[h_("button",{css:e=>c(c({},e.primaryButton),{},{flex:1}),onClick:()=>Do("/multiplayer/create"),children:t("multiplayerLobby.createGame")}),h_("button",{css:e=>c(c({},e.button),{},{flex:1}),onClick:()=>Do("/multiplayer/join"),children:t("multiplayerLobby.joinGame")})]}),o?h_("div",{css:_H,children:t("multiplayerLobby.loading")}):r.length>0?p_("div",{children:[h_("h3",{css:bH,children:t("multiplayerLobby.yourActiveGames")}),h_("div",{css:wH,children:r.map(e=>h_("div",{css:EH,onClick:()=>Do("/multiplayer/game/".concat(e.gameId)),children:p_("div",{css:CH,children:[p_("div",{children:[h_("div",{css:kH,children:t("multiplayerLobby.room",{code:e.roomCode})}),h_("div",{css:SH,children:u(e)})]}),h_("button",{css:e=>c(c({},e.button),{},{padding:"6px 12px",fontSize:12}),children:t("multiplayerLobby.resume")})]})},e.gameId))})]}):h_("div",{css:xH,children:t("multiplayerLobby.noActiveGames")})]})]}):h_("div",{css:pH,children:h_("div",{css:mH,children:h_("div",{css:vH,children:t("multiplayerLobby.authenticating")})})})}
2,AH=e=>{let{colors:t,gridUnit:n}=e;return{position:"fixed",left:0,width:"100vw",height:"100vh",display:"flex",justifyContent:"flex-start",alignItems:"center",flexDirection:"column",background:t.grey95,overflowY:"auto","@media (min-width: 480px)":{justifyContent:"center"}}},TH=e=>{let{colors:t,gridUnit:n}=e;return{background:"white",color:t.textPrimary,padding:"".concat(6*n,"px ").concat(5*n,"px"),width:"100%",minHeight:"100vh",boxSizing:"border-box",paddingTop:18*n,"@media (min-width: 480px)":{padding:10*n,paddingTop:10*n,borderRadius:3*n,boxShadow:"0 ".concat(n,"px ").concat(1.5*n,"px rgba(0,0,0,0.1)"),minWidth:"400px",maxWidth:"500px",minHeight:"auto",width:"auto"}}},IH=e=>{let{gridUnit:t}=e;return{marginBottom:6*t}},PH=e=>{let{colors:t,gridUnit:n}=e;return{marginTop:6*n,padding:4*n,background:t.grey95,borderRadius:1.5*n,fontSize:3.5*n,color:t.grey1}},OH=[{labelKey:"createGame.gameType.kujifunza",value:Fs},{labelKey:"createGame.gameType.kiswahili",value:As}],NH=[{labelKey:"createGame.youStart",value:0},{labelKey:"createGame.opponentStarts",value:1}],RH=e=>{const{t:t}=Fe(),{user:n}=m_(),[r,i]=(0,ee.useState)(Fs),[o,s]=(0,ee.useState)(0),[a,u]=(0,ee.useState)(!1),{createGame:l}=DB(null);if(!n)return h_("div",{css:AH,children:h_("div",{css:e=>({color:e.colors.textPrimary}),children:t("createGame.authenticating")})});return h_("div",{css:AH,children:p_("div",{css:TH,children:[h_("h1",{css:e=>({marginTop:0,marginBottom:5*e.gridUnit,textAlign:"center",fontSize:6*e.gridUnit,"@media (min-width: 480px)":{marginBottom:7.5*e.gridUnit,fontSize:"2em"}}),children:t("createGame.title")}),p_("div",{css:IH,children:[h_("label",{css:e=>({display:"block",marginBottom:2*e.gridUnit,fontWeight:"bold"}),children:t("createGame.gameTypeLabel")}),h_(ZO,{children:OH.map(e=>{let{labelKey:n,value:o}=e;return h_(QO,{label:t(n),id:"gameType-".concat(o),checked:r===o,value:o,name:"gameType",onChange:e=>{i(e.currentTarget.value)}},o)})})]}),p_("div",{css:IH,children:[h_("label",{css:e=>({display:"block",marginBottom:2*e.gridUnit,fontWeight:"bold"}),children:t("createGame.startingSideLabel")}),h_(ZO,{children:NH.map(e=>{let{labelKey:n,value:r}=e;return h_(QO,{label:t(n),id:"startingSide-".concat(r),checked:o===r,value:r,name:"startingSide",onChange:e=>{s(+e.currentTarget.value)}},r)})})]}),p_("div",{css:e=>({display:"flex",flexDirection:"column",gap:3*e.gridUnit,"@media (min-width: 480px)":{flexDirection:"row"}}),children:[h_("button",{css:e=>c(c({},e.primaryButton),{},{flex:1,padding:4*e.gridUnit,fontSize:4*e.gridUnit,"@media (min-width: 480px)":{padding:3*e.gridUnit}}),onClick:async()=>{if(!n)return;u(!0);const e=r===As?js:zs.currentGameState,i={playbackSpeed:400,expertLevel:"expert",startingSide:o,showHints:!0},s=await l(n.uid,e,i,r);s?setTimeout(()=>{Do("/multiplayer/game/".concat(s))},500):(u(!1),alert(t("createGame.failed")))},disabled:a,children:t(a?"createGame.creating":"createGame.create")}),h_("button",{css:e=>c(c({},e.secondaryButton),{},{flex:1,padding:4*e.gridUnit,fontSize:4*e.gridUnit,"@media (min-width: 480px)":{padding:3*e.gridUnit}}),onClick:()=>Do("/multiplayer"),disabled:a,children:t("common.cancel")})]}),p_("div",{css:PH,children:[h_("p",{css:e=>({margin:0,marginBottom:2*e.gridUnit}),children:h_("strong",{children:t("createGame.howItWorks")})}),p_("ol",{css:e=>({margin:0,paddingLeft:5*e.gridUnit}),children:[h_("li",{children:t("createGame.step1")}),h_("li",{children:t("createGame.step2")}),h_("li",{children:t("createGame.step3")})]})]})]})})},BH=e=>{let{colors:t,gridUnit:n}=e;return{position:"fixed",left:0,width:"100vw",height:"100vh",display:"flex",justifyContent:"flex-start",alignItems:"center",flexDirection:"column",background:t.grey95,overflowY:"auto","@media (min-width: 480px)":{justifyContent:"center"}}},LH=e=>{let{colors:t,gridUnit:n}=e;return{background:"white",color:t.textPrimary,padding:"".concat(6*n,"px ").concat(5*n,"px"),width:"100%",minHeight:"100vh",boxSizing:"border-box",paddingTop:18*n,"@media (min-width: 480px)":{padding:10*n,paddingTop:10*n,borderRadius:3*n,boxShadow:"0 ".concat(n,"px ").concat(1.5*n,"px rgba(0,0,0,0.1)"),minWidth:"400px",maxWidth:"500px",minHeight:"auto",width:"auto"}}},MH=e=>t=>{let{colors:n,gridUnit:r}=t;return{width:"100%",boxSizing:"border-box",padding:"".concat(3*r,"px ").concat(4*r,"px"),fontSize:4.5*r,border:e?"2px solid #f44336":"2px solid ".concat(n.grey8),borderRadius:1.5*r,outline:"none",textAlign:"center",letterSpacing:"4px",fontWeight:"bold",textTransform:"uppercase",transition:"border-color 0.2s","&:focus":{borderColor:n.primary},"&:disabled":{background:n.grey95,cursor:"not-allowed"}}},jH=e=>{let{colors:t,gridUnit:n}=e;return{marginTop:2*n,color:"#f44336",fontSize:3.5*n,textAlign:"center"}},zH=e=>{let{colors:t,gridUnit:n}=e;return{marginTop:6*n,padding:4*n,background:t.grey95,borderRadius:1.5*n,fontSize:3.5*n,color:t.grey1}},UH=e=>{const{t:t}=Fe(),{user:n}=m_(),[r,i]=(0,ee.useState)(""),[o,s]=(0,ee.useState)(!1),[a,u]=(0,ee.useState)(null),{joinGame:l}=DB(null);if(!n)return h_("div",{css:BH,children:h_("div",{css:e=>({color:e.colors.textPrimary}),children:t("joinGame.authenticating")})});const d=async()=>
2{if(!n)return;if(!r||6!==r.length)return void u(t("joinGame.errorInvalid"));s(!0),u(null);const e=await l(r.toUpperCase(),n.uid);e?Do("/multiplayer/game/".concat(e.gameId)):(u(t("joinGame.errorFailed")),s(!1))};return h_("div",{css:BH,children:p_("div",{css:LH,children:[h_("h1",{css:e=>({marginTop:0,marginBottom:5*e.gridUnit,textAlign:"center",fontSize:6*e.gridUnit,"@media (min-width: 480px)":{marginBottom:7.5*e.gridUnit,fontSize:"2em"}}),children:t("joinGame.title")}),p_("div",{css:e=>({marginBottom:6*e.gridUnit}),children:[h_("label",{htmlFor:"roomCode",css:e=>({display:"block",marginBottom:2*e.gridUnit,fontWeight:"bold"}),children:t("joinGame.roomCode")}),h_("input",{id:"roomCode",type:"text",value:r,onChange:e=>{const t=e.currentTarget.value.toUpperCase().replace(/[^A-Z0-9]/g,"");t.length<=6&&(i(t),u(null))},onKeyPress:e=>{"Enter"!==e.key||o||d()},placeholder:t("joinGame.placeholder"),disabled:o,css:MH(!!a)}),a&&h_("div",{css:jH,children:a})]}),p_("div",{css:e=>({display:"flex",flexDirection:"column",gap:3*e.gridUnit,"@media (min-width: 480px)":{flexDirection:"row"}}),children:[h_("button",{css:e=>c(c({},e.primaryButton),{},{flex:1,padding:4*e.gridUnit,fontSize:4*e.gridUnit,"@media (min-width: 480px)":{padding:3*e.gridUnit}}),onClick:d,disabled:o||!r,children:t(o?"joinGame.joining":"joinGame.join")}),h_("button",{css:e=>c(c({},e.secondaryButton),{},{flex:1,padding:4*e.gridUnit,fontSize:4*e.gridUnit,"@media (min-width: 480px)":{padding:3*e.gridUnit}}),onClick:()=>Do("/multiplayer"),disabled:o,children:t("common.cancel")})]}),p_("div",{css:zH,children:[h_("p",{css:e=>({margin:0,marginBottom:2*e.gridUnit}),children:h_("strong",{children:t("joinGame.howToJoin")})}),p_("ol",{css:e=>({margin:0,paddingLeft:5*e.gridUnit}),children:[h_("li",{children:t("joinGame.step1")}),h_("li",{children:t("joinGame.step2")}),h_("li",{children:t("joinGame.step3")})]})]})]})})},HH=e=>({position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",opacity:e?1:0,visibility:e?"visible":"hidden",transition:"opacity 0.3s ease, visibility 0.3s ease",zIndex:999}),qH=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"left";return c({position:"fixed",top:0,bottom:0,width:"280px",maxWidth:"85vw",backgroundColor:"white",boxShadow:"2px 0 8px rgba(0, 0, 0, 0.15)",transform:e?"translateX(0)":"left"===t?"translateX(-100%)":"translateX(100%)",transition:"transform 0.3s ease",zIndex:1e3,overflowY:"auto"},"left"===t?{left:0}:{right:0})},WH=e=>{let{isOpen:t,onClose:n,children:r,side:i="left"}=e;return(0,ee.useEffect)(()=>{const e=e=>{e instanceof KeyboardEvent&&"Escape"===e.key&&t&&n()};return t&&(document.addEventListener("keydown",e),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",e),document.body.style.overflow="unset"}},[t,n]),p_(d_,{children:[h_("div",{css:HH(t),onClick:n}),h_("div",{css:qH(t,i),children:r})]})},$H=WH,VH=["introduction","validMoves","clockwiseSowing","antiClockwiseSowing","capturing","kimbiKichwa","mandatoryCapturing","takataTurn","gameEnding"];var GH,KH;const YH=["title","titleId"];function JH(){return JH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},JH.apply(null,arguments)}function QH(e,t){let{title:n,titleId:r}=e,i=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,YH);return ee.createElement("svg",JH({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",ref:t,"aria-labelledby":r},i),n?ee.createElement("title",{id:r},n):null,GH||(GH=ee.createElement("path",{d:"M256 76c48.1 0 93.3 18.7 127.3 52.7S436 207.9 436 256s-18.7 93.3-52.7 127.3S304.1 436 256 436c-48.1 0-93.3-18.7-127.3-52.7S76 304.1 76 256s18.7-93.3 52.7-127.3S207.9 76 256 76m0-28C14
21.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48z"})),KH||(KH=ee.createElement("path",{d:"M256.7 160c37.5 0 63.3 20.8 63.3 50.7 0 19.8-9.6 33.5-28.1 44.4-17.4 10.1-23.3 17.5-23.3 30.3v7.9h-34.7l-.3-8.6c-1.7-20.6 5.5-33.4 23.6-44 16.9-10.1 24-16.5 24-28.9s-12-21.5-26.9-21.5c-15.1 0-26 9.8-26.8 24.6H192c.7-32.2 24.5-54.9 64.7-54.9zm-26.3 171.4c0-11.5 9.6-20.6 21.4-20.6 11.9 0 21.5 9 21.5 20.6s-9.6 20.6-21.5 20.6-21.4-9-21.4-20.6z"})))}const XH=ee.forwardRef(QH);n.p;var ZH;const eq=["title","titleId"];function tq(){return tq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tq.apply(null,arguments)}function nq(e,t){let{title:n,titleId:r}=e,i=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,eq);return ee.createElement("svg",tq({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",ref:t,"aria-labelledby":r},i),n?ee.createElement("title",{id:r},n):null,ZH||(ZH=ee.createElement("path",{d:"M433 288.8c-7.7 0-14.3 5.9-14.9 13.6-6.9 83.1-76.8 147.9-161.8 147.9-89.5 0-162.4-72.4-162.4-161.4 0-87.6 70.6-159.2 158.2-161.4 2.3-.1 4.1 1.7 4.1 4v50.3c0 12.6 13.9 20.2 24.6 13.5L377 128c10-6.3 10-20.8 0-27.1l-96.1-66.4c-10.7-6.7-24.6.9-24.6 13.5v45.7c0 2.2-1.7 4-3.9 4C148 99.8 64 184.6 64 288.9 64 394.5 150.1 480 256.3 480c100.8 0 183.4-76.7 191.6-175.1.8-8.7-6.2-16.1-14.9-16.1z"})))}const rq=ee.forwardRef(nq);n.p;var iq;const oq=["title","titleId"];function sq(){return sq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sq.apply(null,arguments)}function aq(e,t){let{title:n,titleId:r}=e,i=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,oq);return ee.createElement("svg",sq({xmlns:"http://www.w3.org/2000/svg",enableBackground:"new 0 0 24 24",viewBox:"0 0 24 24",fill:"currentColor",width:"36px",height:"36px",ref:t,"aria-labelledby":r},i),n?ee.createElement("title",{id:r},n):null,iq||(iq=ee.createElement("g",null,ee.createElement("path",{d:"M0,0h24v24H0V0z",fill:"none"}),ee.createElement("path",{d:"M19.14,12.94c0.04-0.3,0.06-0.61,0.06-0.94c0-0.32-0.02-0.64-0.07-0.94l2.03-1.58c0.18-0.14,0.23-0.41,0.12-0.61 l-1.92-3.32c-0.12-0.22-0.37-0.29-0.59-0.22l-2.39,0.96c-0.5-0.38-1.03-0.7-1.62-0.94L14.4,2.81c-0.04-0.24-0.24-0.41-0.48-0.41 h-3.84c-0.24,0-0.43,0.17-0.47,0.41L9.25,5.35C8.66,5.59,8.12,5.92,7.63,6.29L5.24,5.33c-0.22-0.08-0.47,0-0.59,0.22L2.74,8.87 C2.62,9.08,2.66,9.34,2.86,9.48l2.03,1.58C4.84,11.36,4.8,11.69,4.8,12s0.02,0.64,0.07,0.94l-2.03,1.58 c-0.18,0.14-0.23,0.41-0.12,0.61l1.92,3.32c0.12,0.22,0.37,0.29,0.59,0.22l2.39-0.96c0.5,0.38,1.03,0.7,1.62,0.94l0.36,2.54 c0.05,0.24,0.24,0.41,0.48,0.41h3.84c0.24,0,0.44-0.17,0.47-0.41l0.36-2.54c0.59-0.24,1.13-0.56,1.62-0.94l2.39,0.96 c0.22,0.08,0.47,0,0.59-0.22l1.92-3.32c0.12-0.22,0.07-0.47-0.12-0.61L19.14,12.94z M12,15.6c-1.98,0-3.6-1.62-3.6-3.6 s1.62-3.6,3.6-3.6s3.6,1.62,3.6,3.6S13.98,15.6,12,15.6z"}))))}const uq=ee.forwardRef(aq);n.p;var lq;const cq=["title","titleId"];function dq(){return dq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dq.apply(null,arguments)}function hq(e,t){let{title:n,titleId:r}=e,i=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,cq);return ee.createElement("svg",dq({viewBox:"0 0 51 50",ref:t,"aria-labelledby":r},i),n?ee.createElement("title",{id:r},n):null,lq||(lq=ee.createElement("g",null,ee.createElement("circle",{r:6,cx:18.84919134469164,cy:25.579805749705027}),ee.createElement("circle",{r:6,cx:32.400606194072886,cy:24.420211574897014}),ee.createElement("circle",{r:4.8125,cx:24.739783352748436,cy:14.653873630500604}),ee.createElement("circle",{r:4.8125,cx:26.510417348652435,cy:35.34610919548636}))))}const pq=ee.forwardRef(hq);n.p;var fq,gq;const mq=["title","titleId"];function vq(){return vq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vq.apply(null,arguments)}function yq(e,t){let{title:n,titleId:r}=e,i=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,mq);return ee.createElement("svg",vq({xmlns:"http://www.w3.org/2000/svg",enableBackgroun
2d:"new 0 0 24 24",viewBox:"0 0 24 24",fill:"black",width:"36px",height:"36px",ref:t,"aria-labelledby":r},i),n?ee.createElement("title",{id:r},n):null,fq||(fq=ee.createElement("g",null,ee.createElement("rect",{fill:"none",height:24,width:24}))),gq||(gq=ee.createElement("g",null,ee.createElement("g",null,ee.createElement("g",null,ee.createElement("path",{d:"M23,8c0,1.1-0.9,2-2,2c-0.18,0-0.35-0.02-0.51-0.07l-3.56,3.55C16.98,13.64,17,13.82,17,14c0,1.1-0.9,2-2,2s-2-0.9-2-2 c0-0.18,0.02-0.36,0.07-0.52l-2.55-2.55C10.36,10.98,10.18,11,10,11s-0.36-0.02-0.52-0.07l-4.55,4.56C4.98,15.65,5,15.82,5,16 c0,1.1-0.9,2-2,2s-2-0.9-2-2s0.9-2,2-2c0.18,0,0.35,0.02,0.51,0.07l4.56-4.55C8.02,9.36,8,9.18,8,9c0-1.1,0.9-2,2-2s2,0.9,2,2 c0,0.18-0.02,0.36-0.07,0.52l2.55,2.55C14.64,12.02,14.82,12,15,12s0.36,0.02,0.52,0.07l3.55-3.56C19.02,8.35,19,8.18,19,8 c0-1.1,0.9-2,2-2S23,6.9,23,8z"}))))))}const Dq=ee.forwardRef(yq);n.p;var _q,bq;const wq=["title","titleId"];function Eq(){return Eq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Eq.apply(null,arguments)}function Cq(e,t){let{title:n,titleId:r}=e,i=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,wq);return ee.createElement("svg",Eq({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",ref:t,"aria-labelledby":r},i),n?ee.createElement("title",{id:r},n):null,_q||(_q=ee.createElement("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"})),bq||(bq=ee.createElement("polyline",{points:"9 22 9 12 15 12 15 22"})))}const kq=ee.forwardRef(Cq);n.p;var Sq;const xq=["title","titleId"];function Fq(){return Fq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fq.apply(null,arguments)}function Aq(e,t){let{title:n,titleId:r}=e,i=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,xq);return ee.createElement("svg",Fq({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",ref:t,"aria-labelledby":r},i),n?ee.createElement("title",{id:r},n):null,Sq||(Sq=ee.createElement("path",{d:"M184 448h48c4.4 0 8-3.6 8-8V72c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v368c0 4.4 3.6 8 8 8zM88 448h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8H88c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zM280.1 448h47.8c4.5 0 8.1-3.6 8.1-8.1V232.1c0-4.5-3.6-8.1-8.1-8.1h-47.8c-4.5 0-8.1 3.6-8.1 8.1v207.8c0 4.5 3.6 8.1 8.1 8.1zM368 136.1v303.8c0 4.5 3.6 8.1 8.1 8.1h47.8c4.5 0 8.1-3.6 8.1-8.1V136.1c0-4.5-3.6-8.1-8.1-8.1h-47.8c-4.5 0-8.1 3.6-8.1 8.1z"})))}const Tq=ee.forwardRef(Aq);n.p;const Iq=e=>{let{gridUnit:t}=e;return{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"".concat(2*t,"px"),borderBottom:"2px solid #e0e0e0"}},Pq=e=>{let{gridUnit:t}=e;return{fontSize:4*t,fontWeight:"bold",margin:0}},Oq={background:"none",border:"none",cursor:"pointer",padding:"8px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",transition:"background-color 0.2s",":hover":{backgroundColor:"#f0f0f0"},"& svg":{width:"24px",height:"24px"}},Nq={padding:"8px 0"},Rq={padding:"12px 20px 8px",fontSize:"12px",fontWeight:"600",color:"#666",textTransform:"uppercase",letterSpacing:"0.5px"},Bq={display:"flex",alignItems:"center",padding:"12px 20px",textDecoration:"none",color:"#333",transition:"background-color 0.2s",cursor:"pointer",":hover":{backgroundColor:"#f5f5f5"},"&.active":{backgroundColor:"#e8f4f8",borderLeft:"4px solid #1976d2",paddingLeft:"16px","& svg":{width:"20px",height:"20px",marginRight:"16px",flexShrink:0}},"& svg":{width:"20px",height:"20px",marginRight:"16px",flexShrink:0}},Lq={fontSize:"16px",fontWeight:"500"},Mq={height:"1px",backgroundColor:"#e0e0e0",margin:"8px 0"};var jq={name:"kdbhus",styles:"height:100%;display:flex;flex-direction:column"},zq={name:"9jwnf3",styles:"flex:1;overflow-y:auto"},Uq={name:"9zznp",styles:"padding:16px 20px;border-top:1px solid #e0e0e0;font-size:12px;color:#666;text-align:center"},Hq={name:"gd89df",styles:"margin-bottom:8px;font-weight:600;color:#1976d2"};const qq=e=>{let{onClose:t}=e;const n=Wo(),{t:r}=Fe(),i=DN(mN),o=n.pathname.includes("/game"),s=n.pathname.includes("/multiplayer"),a=n.pathname.includes("/game/help"),u=s?"multiplayer":"singleplayer",l="/"===n.pathname,c="/game"===n.pathname,d=n.pathname.includes("/settings"),h=n.pathname.includes("/history"),p="/game/restart"===n.pathname,f="/game/help"===n.pathname,g="/contact"===n.pathname,m="/profile"===n.pathname,v=ee.useMemo(()=>VH.map((e,t)=>({index:t,title:r("help.screens.".concat(e,".title"))})),[r]);return p_("div",{css:jq,children:[p_("div",{css:Iq,children:[h_("h2",{css:Pq,children:r("menu.title")}),h_("button",{css:Oq,onClick:t,"aria-label":r("menu.closeMenu"),children:h_(lB,{})})]}),p_("nav",{css:zq,children:[p_("div",{css:Nq,children:[h_("div",{css:Rq,children:r("menu.sections.navigation")}),p_(jo,{to:"/",css:Bq,className:l?"active":"",onClick:t,children:[h_(kq,{}),h_("span",{css:Lq,children:r("menu.items.home")})]}),i&&p_(jo,{to:"/profile",css:Bq,className:m?"active":"",onClick:t,children:[h_(Tq,{}),h_("span",{css:Lq,children:r("menu.items.profileStats")})]}),o&&!s&&p_(jo,{to:"/game",css:Bq,className:c?"active":"",onClick:t,children:[h_(pq,{}),h_("span",{css:Lq,children:r("menu.items.resumeGame")})]}),s&&p_(jo,{to:"/multiplayer",css:Bq,onClick:t,children:[h_(pq,{}),h_("span",{css:Lq,children:r("menu.items.multiplayerLobby")})]})]}),h_("div",{css:Mq}),o&&!s&&p_(d_,{children:[p_("div",{css:Nq,children:[h_("div",{css:Rq,children:r("menu.sections.singlePlayer")}),p_(jo,{to:"/game/settings",css:Bq,className:d?"active":"",onClick:t,children:[h_(uq,{}),h_("span",{css:Lq,children:r("menu.items.settings")})]}),p_(jo,{to:"/game/history",css:Bq,className:h?"active":"",onClick:t,children:[h_(Dq,{}),h_("span",{css:Lq,children:r("menu.items.moveHistory")})]}),p_(jo,{to:"/game/restart",css:Bq,className:p?"active":"",onClick:t,children:[h_(rq,{}),h_("span",{css:Lq,children:r("menu.items.restartGame")})]})]}),h_("div",{css:Mq})]}),s&&n.pathname.includes("/game/")&&(()=>{const e=n.pathname.replace(/\/(settings|history)$/,"");return p_(d_,{children:[p_("div",{css:Nq,children:[h_("div",{css:Rq,children:r("menu.sections.multiplayer")}),p_(jo,{to:"".concat(e,"/settings"),css:Bq,className:d?"active":"",onClick:t,children:[h_(uq,{}),h_("span",{css:Lq,children:r("menu.items.settings")})]}),p_(jo,{to:"".concat(e,"/history"),css:Bq,className:h?"active":"",onClick:t,children:[h_(Dq,{}),h_("span",{css:Lq,children:r("menu.items.moveHistory")})]})]}),h_("div",{css:Mq})]})})(),p_("div",{css:Nq,children:[h_("div",{css:Rq,children:r("menu.sections.help")}),!a&&p_(jo,{to:"/game/help",css:Bq,className:f?"active":"",onClick:t,children:[h_(XH,{}),h_("span",{css:Lq,children:r("menu.items.howToPlay")})]}),a&&h_(d_,{children:v.map(e=>{const r=n.pathname==="/game/help/".concat(e.index)||0===e.index&&"/game/help"===n.pathname;return p_(jo,{to:"/game/help/".concat(e.index),css:Bq,className:r?"active":"",onClick:t,children:[h_(XH,{}),h_("span",{css:Lq,children:e.title})]},e.index)})}),p_(jo,{to:"/contact",css:Bq,className:g?"active":"",onClick:t,children:[h_(Dq,{}),h_("span",{css:Lq,children:r("menu.items.feedback")})]})]})]}),p_("div",{css:Uq,children:["multiplayer"===u&&h_("div",{css:Hq,children:r("menu.footer.multiplayerActive")}
2),h_("div",{children:r("menu.footer.tagline")})]})]})},Wq=qq;var $q,Vq,Gq;const Kq=["title","titleId"];function Yq(){return Yq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yq.apply(null,arguments)}function Jq(e,t){let{title:n,titleId:r}=e,i=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,Kq);return ee.createElement("svg",Yq({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",ref:t,"aria-labelledby":r},i),n?ee.createElement("title",{id:r},n):null,$q||($q=ee.createElement("line",{x1:3,y1:6,x2:21,y2:6})),Vq||(Vq=ee.createElement("line",{x1:3,y1:12,x2:21,y2:12})),Gq||(Gq=ee.createElement("line",{x1:3,y1:18,x2:21,y2:18})))}const Qq=ee.forwardRef(Jq),Xq=(n.p,e=>{let{gridUnit:t,iconSize:n,colors:r}=e;return{position:"fixed",top:"".concat(5*t,"px"),left:"".concat(5*t,"px"),zIndex:998,background:r.grey95,border:"2px solid ".concat(r.grey4),borderRadius:"".concat(t,"px"),width:n,height:n,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",transition:"all 0.2s ease",":hover":{backgroundColor:"#f5f5f5",transform:"scale(1.05)",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.2)"},":active":{transform:"scale(0.95)"},svg:{fill:r.grey8,stroke:r.grey0}}}),Zq=e=>{let{onClick:t}=e;const{t:n}=Fe();return h_("button",{css:Xq,onClick:t,"aria-label":n("menuButton.openMenu"),type:"button",children:h_(Qq,{})})},eW=Zq,tW=()=>{const e=EN(),t=(0,ee.useRef)(!1);return(0,ee.useEffect)(()=>{const n=e.map(e=>e.code),r=Oe();let i;if(r)i=Ve(r)&&n.includes(r)?r:We;else{if(t.current)return;t.current=!0,i=Ye(n)}Qe.language!==i&&Je(i,{persist:!1})},[e]),null},nW=()=>((()=>{const{user:e,loading:t,signInAnonymous:n}=m_();(0,ee.useEffect)(()=>{t||e||n().catch(e=>{console.error("Failed to auto sign-in:",e)})},[e,t,n])})(),(()=>{const{user:e,loading:t}=m_(),n=(0,ee.useRef)(null);(0,ee.useEffect)(()=>{t||(e?(n.current&&n.current!==e.uid&&YF.reset(),YF.identify(e.uid,c(c({is_anonymous:e.isAnonymous},e.email?{email:e.email}:{}),e.displayName?{name:e.displayName}:{})),n.current=e.uid):n.current&&(YF.reset(),n.current=null))},[e,t])})(),null);const rW=e=>{let{orientation:t,isMenuOpen:n,setIsMenuOpen:r}=e;return p_("div",{className:Ko,children:[h_(eW,{onClick:()=>r(!0)}),h_($H,{isOpen:n,onClose:()=>r(!1),children:h_(Wq,{onClose:()=>r(!1)})}),p_(To,{css:e=>{let{boardHeight:n,boardWidth:r,gridUnit:i}=e;return{width:t===Jo?n:r,height:t===Jo?r:n}},children:[h_(OB,{path:"/"}),h_(zU,{path:"/game/help/:screenIndex"}),h_(zU,{path:"/game/help"}),h_(WR,{path:"/game/settings"}),h_(rB,{path:"/game/history"}),h_(oN,{path:"/game/restart"}),h_(gN,{path:"/game"}),h_(GB,{path:"/contact"}),h_(KU,{path:"/profile"}),h_(FH,{path:"/multiplayer"}),h_(RH,{path:"/multiplayer/create"}),h_(UH,{path:"/multiplayer/join"}),h_(TB,{path:"/multiplayer/game/:gameId/*"})]}),h_(hH,{})]})},iW=function(){const{innerWidth:e,innerHeight:t}=window,[n,r]=(0,ee.useState)(e<t?Jo:Yo),[i,o]=(0,ee.useState)(Nr),[s,a]=(0,ee.useState)(Xo),[u,l]=(0,ee.useState)(!1),d="0"===wt.parse(window.location.search).startingSide?0:1,[h,p]=(0,ee.useState)(()=>c(c({},Ns.settings),{},{showHints:qs()})),f=(0,ee.useCallback)(e=>{Pe("showHints",e.showHints),p(e)},[]),[g,m]=(0,ee.useState)(Ns.gameType),[v,y]=(0,ee.useState)(Ns.gameStage),[D,_]=(0,ee.useReducer)(Us,c(c({},zs),{},{currentPlayer:d,settings:c(c({},h),{},{startingSide:d})}));return(0,ee.useEffect)(()=>{const e=()=>{const{innerWidth:e,innerHeight:t,location:n}=window,i=n.pathname.includes("/help"),s=e<t,[u,l]=s?[t,e]:[e,t],d=Math.min(600,u-20),h=Math.min(l,d/2),p=(d-10)/8-16,f=(h-10)/4-16,g=document.body;
2g&&(g.style.setProperty("--holeHeight","".concat(f,"px")),g.style.setProperty("--holeWidth","".concat(p,"px")),g.style.setProperty("--boardHeight","".concat(h,"px")),g.style.setProperty("--boardWidth","".concat(d,"px")),i&&s&&(g.style.setProperty("--boardHeight","".concat(d,"px")),g.style.setProperty("--boardWidth","".concat(h,"px"))));const m={holeWidth:p,holeHeight:f,boardWidth:d,boardHeight:h,highlightedHoles:{0:[],1:[]}};r(s?Jo:Yo),a(m),o(c(c({},Nr),{},{holeHeight:f,holeWidth:p,boardHeight:h,boardWidth:d}))};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),h_(Ae,{i18n:Qe,children:h_(wN,{children:p_(g_,{children:[h_(nW,{}),h_(tW,{}),h_(kr,{theme:i,children:h_(rA,{children:h_(Gi,{backend:en,children:h_(Qo.Provider,{value:n,children:h_(es.Provider,{value:{setBoardProperties:a,boardProperties:s},children:h_(Rs.Provider,{value:{settings:h,gameStage:v,gameType:g,gameMode:"single",setGameStage:y,setGameType:m,setGameSettings:f},children:h_(Ms.Provider,{value:{dispatch:_},children:h_(Hs.Provider,{value:D,children:h_(Ls.Provider,{value:D.gamePlay,children:h_(Bs.Provider,{value:{properties:{nextPlayer:ks(D.currentPlayer),gameState:D.currentGameState,moveHistory:D.moveHistory}},children:h_(To,{children:h_(rW,{path:"/*",orientation:n,isMenuOpen:u,setIsMenuOpen:l})})})})})})})})})})})})]})})})};Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));JF||"undefined"===typeof window||(YF.init("phc_Ccanb3qPhDVWoG2QQdEvDHBvfAy9ceTgAtjugHPx6UEt",{api_host:"https://b.bawo.app",ui_host:"https://eu.posthog.com",capture_pageview:"history_change",capture_pageleave:"if_capture_pageview",person_profiles:"always"}),JF=!0);const oW=document.getElementById("root");(0,o.createRoot)(oW).render(h_(iW,{})),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then(e=>{e.unregister()})})()})(); 3//# sourceMappingURL=main.a593d66a.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.